## 2 Materials and Methods
### Methods
#### 2.2.1 VPD Control Development
For the equation analysis, it is considered in Equation (9) that the air mass flow is the same at the input and output and, therefore, in Equation (10), the air mass flow and evaporation mass flow are related. \[VP_{sat}=0.61078\bigg{(}e^{[[\frac{[27,27](7)}{29,37+1}]}\bigg{)} \tag{2}\]1  
\[VP_{sat}=0.61078\bigg{(}e^{[[\frac{[27,27](7)}{29,37+1}]}\bigg{)} \tag{2}\]2  
where \(\dot{m_{a1}}=\) input air mass flow, \(\dot{m_{a2}}=\) output air mass flow, \(\dot{m_{f}}=\) evaporation mass flow, \(h_{1}=\) enthalpy input, \(h_{2}=\) enthalpy output and \(h_{fg2}=\) evaporation enthalpy. Equation (11) describes the evaporation rate for the airflow that circulates through the humidity system. \[VP_{sat}=0.61078\bigg{(}e^{[[\frac{[27,27](7)}{29,37+1}]}\bigg{)} \tag{2}\]3  
where \(T_{1}=\) input temperature, \(T_{2}=\) output temperature, \(h_{upour}=\) vapor enthalpy water, \(c_{pupour}=\) average vapor water specific heat, \(P=\) atmospheric pressure, \(p_{g1}=\) saturation pressure at input temperature, \(p_{g2}=\) saturation pressure at output temperature, \(\varphi_{1}=\) input relative humidity and \(\varphi_{2}=\) output relative humidity. When obtaining the evaporation rate, an analysis is executed to determine the output humidity. Thus, a consideration is made where the evaporation mass flow is equal to the air mass flow that multiplies the difference between the output and input humidity. Subsequently, \(\varphi_{2}\) is calculated [37]. Equation (11) describes the \(\dot{m_{f}}\) humidity system's behavior, which allows for obtaining the inside micro-greenhouse relative humidity. Control  
Design, simulation and implementation of FL and NN control for VPD and PID for soil moisture in the micro-greenhouse were executed. The heat, humidity and soil moisture systems were evaluated with three different types of control (PID, FL and NN), obtaining, as a result: FL for heat control, NN for humidity and PID for soil moisture. The use of intelligent control has facilitated the prediction of parameters in systems with complex dynamics. For example, fuzzy logic (FL) systems try to determine logically what must be done to achieve the control objectives from a knowledge base provided by a human operator [38]. The steps for the design of a system based on fuzzy logic are the following: define the state and control variables; the linguistic labels and the degree of membership of the fuzzy sets are defined; set the if-then rules and defuzzification stage [39]. The temperature control variable in the micro-greenhouse was \(T_{a,out}\). The control was designed by varying the \(\dot{m_{w}}\) in Equations (7) and (8). In Table 1, the fuzzy sets of state variables (\(Errorempt_{int}\)), (\(Errortemp_{ext}\)) and the control variable (\(Var\ Temp\ Int\)) can be observed. Vertex 1, 2 and 3 correspond to triangular fuzzy sets. Vertex 1, 2, 3 and 4 correspond to trapezoidal fuzzy sets, where 1 is the extreme left vertex. Table 1 shows the values that the fuzzy sets take at that vertex. The state variables can be calculated with Equations (12) and (13). [PERSON]'s method was designed to use if-then rules using complex knowledge expressed in natural language [40]. Recent research has used this method, as reported in [41; 42]. A Mamdani inference method was implemented in this work, the rules are shown in Tables 2 and 3. \[VP_{sat}=0.61078\bigg{(}e^{[[\frac{[27,27](7)}{29,37+1}]}\bigg{)} \tag{2}\]4  
\[VP_{sat}=0.61078\bigg{(}e^{[[\frac{[27,27](7)}{29,37+1}]}\bigg{)} \tag{2}\]5  
where \(T_{d}\) = desired temperature, \(T_{cu}\) = current temperature and \(T_{cx}\) = external temperature. Neural networks (NNs) are supported by computational models that use a set of units called artificial neurons, which when interacting with each other through links responsible for interconnecting them, can increase or inhibit the activation state of adjacent units [43].