Next Article in Journal
Verification of Contact Models of the Discrete Element Method for Simulating the Drag Resistance of a Plow Body
Previous Article in Journal
FARM: Crop Yield Prediction via Regression on Prithvi’s Encoder for Satellite Sensing
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hybrid Recurrent Neural Network in Greenhouse Microclimate Prediction

by
Axel Escamilla-García
1,
Genaro Martin Soto-Zarazúa
1,*,
Carlos A. Olvera-Olvera
2,
Manuel de Jesús López-Martínez
2,
Manuel Toledano-Ayala
3,
Gobinath Chandrakasan
1 and
Said Arturo Rodríguez-Romero
1
1
Facultad de Ingeniería Campus Amazcala, Universidad Autónoma de Querétaro, Carr. Chichimequillas S/N, Km 1, Amazcala, El Marqués 76265, Mexico
2
Laboratorio de Invenciones Aplicadas a la Industria, Unidad Académica de Ingeniería Eléctrica, Universidad Autónoma de Zacatecas, Zacatecas 98160, Mexico
3
Facultad de Ingenieria, Universidad Autonoma de Queretaro, Cerro de las Campanas, Queretaro 76010, Mexico
*
Author to whom correspondence should be addressed.
AgriEngineering 2026, 8(1), 4; https://doi.org/10.3390/agriengineering8010004 (registering DOI)
Submission received: 21 August 2025 / Revised: 3 December 2025 / Accepted: 7 December 2025 / Published: 1 January 2026
(This article belongs to the Topic Digital Agriculture, Smart Farming and Crop Monitoring)

Abstract

This study presents a hybrid recurrent neural network (RNN) approach for greenhouse microclimate prediction, combining a mechanistic model with an Elman network. The research addresses the gap in systematic comparisons between hybrid RNN and feedforward neural network (FFNN) architectures for greenhouse climate forecasting. Different network structures with 1, 2, 3, 5, and 7 hidden layers were evaluated using mean absolute percentage error (MAPE), mean square error (MSE), and coefficient of determination (R2). Results demonstrate that hybrid RNNs significantly outperform FFNNs in predicting indoor temperature, with the 2-hidden-layer configuration achieving the best performance (R2 = 0.897). For relative humidity prediction, both networks showed comparable results. The hybrid RNN with 3 hidden layers exhibited optimal performance during training, while simpler configurations proved more effective during testing. The integration of mechanistic knowledge with neural networks enhances prediction accuracy, providing a reliable tool for greenhouse climate control systems. These findings contribute to smart agriculture by offering an efficient computational approach for microclimate management.

1. Introduction

The greenhouse is a construction whose design is mainly focused on protecting crops from external factors, ensuring the development and growth of the plant. It can be considered as a physical and biological system whose dynamics are complex. Among the elements that are part of this type of system, the plant is the most important, and consequently, the environment in which it develops acquires a fundamental role [1,2].
The environmental conditions generated in the greenhouse influence the metabolic processes of the plant and, with it, its production and quality. These conditions encompass the climatic parameters of the greenhouse, known as the microclimate [3]. The relationship between the crop and the microclimate is mainly due to the exchange of matter and energy that exists between them [4]. The behavior of plants to the microclimatic conditions of the greenhouse varies greatly due to factors such as air temperature, solar radiation, and relative humidity, among others. These internal climatic factors are, in turn, influenced by external climatic conditions, with the temperature and relative humidity of the greenhouse being the variables with the greatest coupling and interaction [5,6]. To minimize this external influence, control systems can be implemented to mitigate internal changes and effects on the plant [7].
The implementation of control systems depends on a good control strategy. For the design of the microclimate control strategy, it is important to know the behavior of the aforementioned factors, where modeling is a necessary tool for this task [8]. Microclimatic models can be divided into two types [9].
Physical or mechanistic models: These models provide physical phenomena using differential equations, and the parameters have a physical interpretation. In the case of greenhouses, they allow for the evaluation of heat, the mass transport process, energy balance, transpiration, photosynthesis, CO2 exchange, and radiation transfer in crops [10]. For example, models have been developed to determine crop water requirements or evapotranspiration, based on radiation and energy balance [11,12,13,14].
Black box models: These models attempt to approximate behavior with a priori information, such as fuzzy logic, neural networks, among others. In greenhouses, fuzzy logic has been implemented for remote monitoring and control [15,16], genetic algorithms (GA) for optimization processes [17,18], and neural networks for microclimate prediction [19,20].
The first method, based on the physical laws involved in the process, obtaining the physical model becomes very complex considering the type of system and the physical phenomena involved [21]. However, they allow us to understand the behavior of the different elements that make up the greenhouse and their relationship between them, where the processes responsible for the transfer of energy and mass are analyzed [22]. This type of model has been extensively investigated and applied for the simulation and analysis of the microclimate in greenhouses [23,24,25,26,27]; additionally, considering greenhouse quality, these models help in the design of greenhouses [28]. However, as shown in the vast majority of these studies, physical models require a considerable understanding of the system; their development is very difficult [9], and other sub-models need to be developed [29].
Black box models are based on an analysis of input and output data from the process [21]. These models use a system identification approach with linear and nonlinear techniques. It is important to note that by requiring information a priori, the resulting models are built for a specific type of greenhouse in a specific location [30]. Various methods and algorithms have been applied for the study of the greenhouse microclimate, some of which include the particle swarm optimization algorithm (PSO) [31,32,33], GA [34,35], fuzzy logic [36,37,38], and artificial neural networks (ANNs) [39,40,41].
ANNs are models based on mathematical techniques for signal processing, forecasting, and clustering. Its operation is based on biological neurons, which are the processing elements, and by their connections through coefficients (weights), thus forming a neuronal structure [42]. The application of ANNs in the study of the greenhouse microclimate has been widely explored, with feedforward neural networks (FFNNs) being the most widely used [43].
In recent years, recurrent neural networks (RNNs) have also shown good results [5,44,45,46,47]. RNNs compared to FFNNs generally present better results due to their predictive power [48], since they can generate and process sequence memories of input models [49]. The field continues to advance rapidly, with sophisticated hybrid architectures emerging. For instance, a recent study proposed a RIME-CNN-BiLSTM model, which combines convolutional neural networks (CNN) for spatial feature extraction with Bidirectional long short-term memory (BiLSTM) networks for temporal modeling, all optimized using the RIME algorithm for hyperparameter tuning. This model represents the cutting edge in pure data-driven approaches, demonstrating high accuracy for temperature and humidity forecasting in solar greenhouses [50].
Many greenhouses still choose to use conventional control, but this control strategy may not be adequate to guarantee the desired performance [51]. In this scenario, various control strategies and techniques have been proposed [52,53], where neural networks based on deep learning are just being developed [5]. For this task, it is necessary to identify the architecture with the best performance, as in the case of FFNNs [39,40,54,55], and thus, finally, to be able to develop control strategies where deep learning is a tool for greenhouse climate control.
An example of a hybrid control scheme with two inputs and two outputs is presented in Figure 1. The scheme is made up of a conventional proportional, integral, and derivative multivariable control (PID) and a hybrid recurrent neural network for greenhouse microclimate prediction. In this approach, extractors ( u 1 t ) and curtains ( u 2 t ) can be considered as inputs; indoor temperature ( x 1 t ) and indoor relative humidity ( x 2 t ) as state variables; outside temperature ( v 1 t ) , and outside relative humidity ( v 2 t ) as disturbances. r t and y t are the reference signal and process output, respectively.
The rise of the Internet of Things has allowed for the development of smart greenhouses, which involve the use of a large amount of data [56,57]. RNNs have proven to be an important tool in this field, so it is important to determine the different architectures and elements to obtain better results since there is no systematic method for this process [58]. Unlike previous studies that focus on either RNNs or FFNNs separately, our work provides a comprehensive evaluation of both architectures under identical conditions. The novel contributions include (1) development of a parallel hybrid architecture combining mechanistic models with Elman RNNs; (2) systematic evaluation of multiple hidden layer configurations for both RNN and FFNN architectures; (3) direct performance comparison between hybrid RNN and FFNN approaches; and (4) practical insights for greenhouse climate control system design.
This research addresses a distinct gap by proposing a hybrid RNN architecture that integrates mechanistic modeling with Elman networks for greenhouse microclimate prediction. While other studies focus on complex, purely data-driven deep learning models, our work explores a different paradigm: enhancing simpler, more computationally efficient recurrent architectures through fusion with physical knowledge. Unlike previous studies that focus on either RNNs or FFNNs separately, our work provides a comprehensive evaluation of both architectures under identical conditions within this hybrid framework. Specifically, we investigate the following research questions: (1) Can hybrid RNNs outperform hybrid FFNNs in predicting greenhouse temperature and humidity? (2) What is the optimal network configuration for each architecture? (3) How does the integration of mechanistic knowledge enhance prediction performance?

2. Materials and Methods

2.1. Experimental Data and Preprocessing

This study was carried out in a 2000 m2 greenhouse located at the Autonomous University of Querétaro, Faculty of Engineering, Amazcala campus, on the road to Chichimequillas S/N km 1, Amazcala, El Marqués, Querétaro (latitude 20°42′17.97″ N, longitude 100°15′34.46″ W, and altitude 1926 m). Two Davis Vantage Vue weather stations (Hayward, CA, USA) were used: one to measure the external variables and the other for the internal variables of the greenhouse (Figure 2). The calibration of the meteorological stations was carried out at an altitude of 1928 m and a barometric pressure of 1017 mPa.
Data were collected over a 10-day period. The recording of the values of the external and internal climatic variables of the greenhouse was carried out every 5 min using the Davis WeatherLink 6.0.3 software (Hayward, CA, USA). For each variable, 2880 data points were recorded, adding up a total of 17,280 data points. The external climatic data measured were air temperature, relative humidity, and wind speed, and, in turn, the internal data measured were air temperature, relative humidity, solar radiation, and wind speed. The characteristics of the data are summarized in Table 1.

2.2. Mechanistic Model for the Generation of Synthetic Data

The models need parameter calibration, since the greenhouse is a nonlinear system that does not remain in its original state [59]. As black box models, neural networks have an inherent disadvantage. Moreover, the absence of prior knowledge affects the precision of the neural network; however, this knowledge can be expressed, although not very precisely, through a robust system model. According to Linker and Seginer (2004), physical models and neural networks can be combined in series or in parallel (hybrid neural networks) to generate better predictions than conventional neural networks [60].
Linker and Seginer (2004) proposed a hybrid FFNN construction to use synthetic data. In this study, prior to hybrid RNN construction, a synthetic database was developed using experimental values and a mechanistic method [60]. The experimental data for the training period were added to the synthetic database, removing all the synthetic data associated with the nodes; that is, the synthetic data only remained in the regions where there were no in situ data.
For the generation of the mechanistic model, a simple model such as that proposed by Ben Ali et al. (2018) [37] was used. The thermal energy provided by the heating system and the thermal energy lost by the cooling system were not considered; therefore, the heat balance equation is expressed by Equation (1).
ρ a C a V d T i n d t = Q R S Q c v , c d Q i n f Q l
where T i n is the inside temperature of the greenhouse (°C), ρ a is the density of the inside air (kgm3), C a is the specific heat of the air (J/kg°C), V is the volume of the greenhouse (m3), Q R S is the rate of heat gain from internal sources or short-wave radiation, Q c v , c d is the rate of heat loss due to convection and/or conduction to the surrounding surfaces or the outdoors, Q i n f is the rate of heat loss due to infiltration or ventilation, and Q l is the rate of latent heat loss, typically associated with moisture transfer.
The short-wave radiation absorbed by the greenhouse was obtained by Equation (2).
Q R S = α c τ c A R
where α c is the absorbing capacity of solar radiation on the cover, τ c is the transmittance of the cover, A is the surface area (m2), and R is the solar radiation (W/m2).
The convection and conduction heat transfer rate was calculated by Equation (3).
Q c v ,   c d = U A T i n T o u t
Tout is the outside temperature (°C), and U is the coefficient of heat transfer through the greenhouse walls (W/m2 °C), calculated using Equation (4).
U = 1 1 h o + G c k c + 1 h i
where G c is the cover thickness (m), k c is the cover (W/m°C), and h o and h i are the convective heat transfer coefficients of the outer and lower cover of the greenhouse (W/m2 °C), respectively. They are calculated using Equations (5) and (6) as proposed by Bouadila et al. (2014) [61].
h o = 2.8 + 1.2   W s
h i = 1.52   T i n T o u t 1 3 + 5.2 c h W A c L 1 2
Ws is the external wind speed (m/s), c h W is the number of air changes per hour (m3/s), A c is the cover area (m2), and L is the length of the greenhouse (m).
Heat loss due to infiltration through the greenhouse was calculated using Equation (7).
Q i n f = ρ a C a C h W T i n T o u t 3600
The long-wave radiation absorbed by the greenhouse was obtained using Equation (8).
Q l = h o A 1 τ c T i n T s
where T s is the sky temperature (°C), obtained by Equation (9) [62,63].
T s = 0.0552   T o u t + 273 1.5 273
For the mass balance of the internal water, Equation (10) was used [64,65].
ρ a V d H i n d t = F w ρ a H o u t H i n
Hin and H o u t are the internal and external relative humidity (%), and F w is the internal air flow around the greenhouse, calculated with Equation (11).
F w = W s A c
where Ac is the cover area of the greenhouse. The internal air flow is estimated based on external wind speed, assuming that air infiltration is proportional to wind speed and cover area, as used in previous greenhouse mass balance studies.

2.3. Neural Network Architectures and Experimental Setup

Network Configurations and Comparative Baseline

To evaluate the contribution of the mechanistic model, three distinct architectural paradigms were implemented and compared:
Pure Data-Driven Networks (Baseline): Standard RNN (Elman) and FFNN models trained exclusively on the 10-day experimental dataset. This serves as the baseline to isolate the effect of the mechanistic model.
Hybrid Neural Networks: The primary models of this study integrate the mechanistic model in a parallel configuration (Figure 3). These networks use the same architectures as the pure networks but are trained on the combined experimental and synthetic dataset.
The RNN used is an Elman structure. This type of network, in its simplest form, comprises an input layer, a hidden layer, a context layer, and an output layer. Fourati (2014) describes the learning of the Elman neural network and the dynamics associated with the greenhouse [66]. The structure of the Elman network is shown in Figure 4.
Both RNN (Elman architecture) and FFNN structures were tested with 1, 2, 3, 5, and 7 hidden layers. All networks used six input variables (Ws, Hout, Tout, Hin, Tin, and R) and two output variables (Tin and Hin). Hidden layers employed sigmoidal activation functions, while output layers used linear functions. The fundamental differences between the RNN and FFNN architectures are summarized in Table 2.
In the Elman network, the learning process minimizes the squared error using Equation (12), where y z p ( k ) presents the expected output, and in the case of the article m = 2 , y z p is the output node number of the neural network z , and y z ( k ) is one of the greenhouse internal climates, T i n ( k ) or H i n ( k ) . The backpropagation algorithm is used to adjust the connection weights Wj,i (k) and Wo,j (k) at each iteration k and is established by the difference between the components of the output vector and the desired output vector [48,66].
J y k = 1 2 z = 1 n y z p k y z ( k ) 2
To understand the learning process and how the weights are adjusted, we can assume an Elman network with only one input layer, one hidden layer, one context layer, and one output layer. Equations (13)–(15) represent the adjustment of the weight vectors [48].
w i , m O k = ε J k w i , m O ( k )
w l , i I k = ε J k w l , i I ( k )
w j , i C k = ε J k w j , i C ( k )
where w i , m O k is the weight between the connections of the hidden layer and the output layer, w l , i I k is the weight between the connections of the input layer and the hidden layer, and w j , i C k is the weight between the connections of the context layer and the hidden layer. Finally, it is important to emphasize that for each hidden layer there is a context layer.
Five Elman structures were considered for this study, where the number of hidden layers was varied. The first structure had a hidden layer, the second had two hidden layers, the third had three hidden layers, the fourth had five hidden layers, and the fifth had seven hidden layers. All structures were established by an input layer, where the variables considered were W s , H o u t , T o u t , H i n , T i n , and R . Similarly, all structures had an output layer where the variables considered were only T i n and H i n . The activation function used was the sigmoidal function for the hidden layers and the linear function for the output layer.
The five RNN structures were compared to each other and to FFNNs using the same configurations.
All input and output variables were normalized to a [0, 1] range to ensure stable and efficient training. The dataset was partitioned into three subsets: 70% for training, 15% for validation (used for early stopping and hyperparameter tuning), and 15% for testing (held out for final evaluation). Hybrid and pure FFNNs were trained using standard backpropagation. Hybrid and pure RNNs were also trained using BPTT, which unrolls the network over a fixed sequence of 10 time steps to properly account for temporal dependencies. The learning rate was set to 0.01 with an adaptive decay based on validation loss. A momentum factor of 0.9 was used to accelerate convergence. The maximum number of epochs was set to 1000, with early stopping triggered if the validation error did not improve for 10 consecutive epochs to prevent overfitting.

2.4. Network Performance Evaluation

To evaluate the performance of the networks, the mean square error (MSE) (Equation (16)), the mean absolute percentage error (MAPE) (Equation (17)), and the coefficient of determination (R2) (Equation (18)) were calculated.
M S E = 1 n i = 1 n y ^ y 2
M A P E = 1 n i = 1 n y y ^ y × 100
R 2 = i = 1 n ( y y ¯ ) × ( y   ^ y ^ ¯ ) i = 1 n ( y y ¯ ) × i = 1 n ( y   ^ y ^ ¯ ) 2
where n is the number of data, y is the real value, and y ^ is the predicted value. The best network is the one that achieves the lowest MSE and MAPE values, while achieving the highest R2 result [40,66].

3. Results and Discussion

In this research, the performance of the hybrid RNNs and the hybrid FFNNs for the prediction of the temperature and relative humidity of a greenhouse was evaluated and compared. Figure 5 shows the results in the prediction of the internal temperature in the training phase of the different structures of the RNNs and FFNNs. Both the hybrid RNNs and the hybrid FFNNs show good results, since the values obtained conform to the behavior of the measured data. This result is similar to that reported by Linker and Seginer (2004), who used a hybrid FFNN, which showed a good prediction of greenhouse temperature [60], and more recent RNN-based models [5,48].
During the training phase, both hybrid architectures demonstrated a strong capacity to learn the underlying dynamics of the greenhouse system, achieving near-perfect metrics (R2 ≈ 0.999) for optimal configurations (Table 3 and Table 4). This exceptional performance aligns with and even surpasses the results reported by Linker and Seginer (2004) [60] for hybrid FFNNs, confirming the effectiveness of integrating mechanistic models with neural networks.
In the case of temperature prediction, the hybrid RNN with three hidden layers emerged as the top performer (MAPE = 8.344 × 10−4; R2 = 0.999), slightly edging out the best hybrid FFNN (two hidden layers; MAPE = 4.343 × 10−3; R2 = 0.999). This suggests that the RNN’s recurrent connections provided a marginal advantage in capturing the complex, time-dependent thermal processes during training. For humidity, a similar pattern was observed, with the three-layer hybrid RNN (MAPE = 1.056 × 10−4) outperforming the best two-layer hybrid FFNN (MAPE = 4.292 × 10−4). The superior performance for humidity prediction (lower errors compared to temperature) across all models may be attributed to the less complex, more direct relationship between ventilation (driven by wind speed) and internal humidity levels as modeled by the mass balance equation.
However, it is critical to note that these near-perfect training scores indicate a high risk of overfitting, a common challenge in neural network modeling that is often not explicitly discussed in similar studies [39,40]. The true test of model robustness lies in its performance on unseen data.
Figure 6 shows the results obtained in the training of the hybrid recurrent and hybrid feedforward networks for the prediction of relative humidity. Table 5 shows the MAPE, MSE, and R2 values of the hybrid RNNs in the calculation of relative humidity. The configuration with three hidden layers is the best, as was the case with internal temperature prediction. However, the results for the inside relative humidity are better (MPE = 1.056 × 10−4; MSE = 9.542 × 10−9; R2 = 0.999).
In Table 6, it can be seen that the hybrid FFNN with two hidden layers is the best among all configurations. However, the results (MPE = 4.292 × 10−4; MSE = 1.061 × 10−7; R2 = 0.999) still do not exceed those of the hybrid RNN with three hidden layers.
In the test phase, the results show that hybrid RNNs perform better in most of their configurations compared to hybrid FNNs. Figure 7 shows the behaviors of the hybrid RNNs and hybrid FFNNs for the prediction of inside temperature. It can be observed that the predictive power is lower in the test phase; however, the hybrid RNNs in configurations of one, two, three, and five hidden layers present good results. However, in the case of hybrid FFNNs, only the one- and two-hidden-layer configurations show favorable results.
For the task of predicting inside temperature on unseen data, hybrid RNNs demonstrated clear superiority and robustness over hybrid FFNNs (Table 7 and Table 8). The optimal hybrid RNN (two hidden layers; R2 = 0.897; MAPE = 0.282) maintained strong performance, while the best hybrid FFNN (two hidden layers; R2 = 0.898; MAPE = 0.280) was its only configuration that remained competitive. This result significantly advances the findings of Salah and Fourati (2018) [48], who demonstrated RNN superiority in a pure data-driven context; our work confirms that this advantage persists in a hybrid mechanistic-data-driven framework.
The superior performance of RNNs for temperature prediction can be attributed to their inherent ability to model temporal sequences. Temperature inside a greenhouse exhibits significant inertia, being influenced by accumulated solar energy and past states. The Elman network’s context layers effectively capture these time-lagged dependencies, allowing it to model the thermal dynamics more physically than the memory-less FFNN. The sharp performance drop in FFNNs with more than two hidden layers (e.g., three-layer FFNN R2 = 0.495) indicates their tendency to overfit noise in the training data when complexity increases, a vulnerability less pronounced in the recurrent architectures.
In the test phase for the calculation of inside relative humidity, the results obtained by the hybrid RNNs and the hybrid FFNNs are very similar, as can be seen in Figure 8.
The difference in MAPE, MSE, and R2 values between the different configurations of the hybrid RNNs is not very significant, as can be seen in Table 9.
In contrast to temperature, the prediction of relative humidity during testing showed remarkably similar performance between hybrid RNNs and FFNNs (Table 9 and Table 10). The best models for both architectures achieved nearly identical metrics (e.g., RNN R2 = 0.916 vs. FFNN R2 = 0.916). This parity suggests that the internal relative humidity in our experimental setup was predominantly driven by instantaneous factors rather than long-term temporal histories. The primary drivers are likely the outside humidity (Hout) and the ventilation rate, which is a direct function of external wind speed (Ws) as defined in the mechanistic mass balance (Equations (10) and (11)). Since these are present in the current input vector, the FFNN lacks no critical information, negating the RNN’s primary advantage. This finding is crucial for practical applications, as it indicates that for humidity control in similar greenhouse types, a simpler and computationally cheaper hybrid FFNN might be sufficient, while for temperature, the investment in a hybrid RNN is justified.
In general, the values obtained by the hybrid RNN in any of its configurations for the calculation of inside relative humidity are good. The hybrid RNN with one hidden layer was the best, but only in terms of presenting smaller values for MAPE and MSE (0.262 and 0.257, respectively). RNNs are superior to FFNNs in greenhouse microclimate forecasting [48]. However, in the test phase, the prediction of inside humidity between hybrid RNNs and hybrid FFNNs is very similar.
A consistent finding across all models and variables was the degradation of performance in testing for architectures with more than three hidden layers. For instance, the seven-layer hybrid RNN yielded an R2 of only 0.503 for temperature prediction. This challenges the blanket application of “deeper is better” and aligns with the practical findings of Taki et al. (2018) [40], who also found intermediate complexity to be optimal for greenhouse models. Overly complex networks appear to overfit the specific conditions of the training data, including the synthetic data generated by the mechanistic model, thus reducing their ability to generalize.
While a direct quantitative comparison against pure data-driven models was not the core focus of this experiment, the high performance achieved with a relatively small 10-day experimental dataset strongly implies the value added by the mechanistic model. Our hybrid RNN’s test performance (R2 = 0.897 for temperature) is competitive with, and in some cases superior to, pure data-driven models reported in the literature that often use much larger datasets [19,20,39]. For example, Outanoute et al. (2016) [39] reported R2 values around 0.85–0.92 for temperature using pure FFNNs. The integration of physical knowledge likely provided a regularizing effect, guiding the learning process and compensating for data scarcity, a key advantage of hybrid modeling as postulated by Linker and Seginer (2004) [60]. Our results can be better understood when positioned alongside contemporary advances in the field. The recently developed RIME-CNN-BiLSTM model exemplifies the pursuit of high accuracy through sophisticated deep learning architectures, employing convolutional and bidirectional LSTM networks with automated RIME optimization [50]. In comparison, our study demonstrates an alternative pathway: by integrating mechanistic knowledge with a simpler Elman RNN architecture, we achieved a similarly robust performance (R2 = 0.897) while potentially gaining advantages in computational efficiency and model interpretability.
In summary, the results demonstrate that hybrid RNNs, particularly with 1–2 hidden layers, are a robust tool for greenhouse microclimate prediction, especially for temperature. The choice between RNNs and FFNNs, however, should be variable-specific, with RNNs being the preferred choice for temperature due to temporal dynamics, and FFNNs being a viable, efficient alternative for relative humidity prediction in scenarios dominated by instantaneous drivers.

4. Conclusions

In this study, we comprehensively evaluated hybrid recurrent neural networks (RNNs) against hybrid feedforward neural networks (FFNNs) for predicting greenhouse microclimate. Our findings provide answers, which are summarized as follows:
(1)
Can hybrid RNNs outperform hybrid FFNNs in predicting greenhouse temperature and humidity?
Yes, but the superiority is variable-dependent. In predicting internal temperature, hybrid RNNs demonstrably outperform hybrid FFNNs. The recurrent architecture of the Elman network is uniquely suited to capturing the temporal dynamics and thermal inertia of the greenhouse environment, leading to more accurate and robust predictions during the testing phase. In contrast, in predicting relative humidity, the performance of hybrid RNNs and FFNNs was comparable. This suggests that humidity levels are more directly influenced by immediate, static factors (e.g., instantaneous ventilation rate or outside humidity) that do not heavily rely on temporal memory, thereby negating the primary advantage of the recurrent structure.
(2)
What is the optimal network configuration for each architecture?
Our systematic evaluation reveals that optimal performance is not achieved by simply adding more layers. For the hybrid RNN, the configuration with two hidden layers was optimal for predicting inside temperature (R2 = 0.897), while the hybrid FFNN also performed best with two hidden layers. Critically, configurations with more than three hidden layers consistently led to a decrease in predictive performance for both architectures, indicating a tendency to overfit the training data rather than improving generalization. This finding underscores the importance of architectural parsimony for this specific application.
(3)
How does the integration of mechanistic knowledge enhance prediction performance?
The integration of the mechanistic model was crucial for two primary reasons. First, it provided a physical foundation for the data-driven approach, guiding the learning process and ensuring that predictions adhere to fundamental principles of energy and mass balance. Second, it enabled the generation of a robust synthetic dataset, which compensated for the limitations of a short experimental data collection period. This synergy enhanced the model’s predictive generalization and robustness, proving particularly valuable in forecasting the more dynamically complex variable of temperature.

4.1. Limitations

Despite the promising results, this study has several limitations that also outline directions for future work:
Dataset Scale and Diversity: The experimental data were collected over a 10-day period from a single greenhouse. This limits the model’s exposure to long-term seasonal variations, different crop cycles, and diverse climatic conditions, which may affect its generalizability.
Model Scope: The study focused exclusively on predicting temperature and humidity. Other critical microclimate factors, such as CO2 concentration and vapor pressure deficit, were not included, nor were crop-dependent variables like leaf area index or transpiration rates.
Architectural Selection: The process for selecting the number of neurons per layer and other hyperparameters was empirical. The lack of a systematic optimization method means that the reported configurations may not be the global optimum.

4.2. Future Research

It would be highly valuable to investigate a serial hybrid configuration, where the mechanistic model’s output serves as a direct input to the neural network, and compare its performance with the parallel approach used here. Future models should also incorporate a broader set of inputs, including CO2 levels, soil moisture, and specific crop parameters, to create a more comprehensive microclimate prediction system.
It would be beneficial to explore more sophisticated RNN architectures like long short-term memory (LSTM) or gated recurrent units (GRUs), coupled with automated hyperparameter tuning (e.g., using Bayesian optimization or genetic algorithms), to further enhance performance and robustness. The ultimate goal is to deploy these models in real-time control systems. Research should focus on computational efficiency for embedded systems and investigate transfer learning techniques to adapt pre-trained models to new greenhouse designs and geographical locations with minimal data.

Author Contributions

Conceptualization, A.E.-G. and G.M.S.-Z.; methodology, A.E.-G.; validation G.C., M.T.-A. and C.A.O.-O.; formal analysis, A.E.-G. and M.d.J.L.-M.; resources, G.M.S.-Z. and M.T.-A.; data curation, A.E.-G. and M.d.J.L.-M.; writing—original draft preparation, A.E.-G. and G.M.S.-Z.; writing—review and editing, C.A.O.-O. and M.T.-A.; visualization A.E.-G. and S.A.R.-R.; supervision, G.M.S.-Z. All authors have read and agreed to the published version of the manuscript.

Funding

The authors would like to thank CONACyT and the Autonomous University of Querétaro for their financial support.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Acknowledgments

The authors would like to express their gratitude to CONACYT and the Autonomous University of Querétaro for their invaluable support in conducting this research.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Bazgaou, A.; Fatnassi, H.; Bouharroud, R.; Ezzaeri, K.; Gourdo, L.; Wifaya, A.; Demrati, H.; El Baamrani, H.; Idoum, A.; Bekkaoui, A. Efficiency assessment of a solar heating cooling system applied to the greenhouse microclimate. Mater. Today Proc. 2020, 24, 151–159. [Google Scholar] [CrossRef]
  2. Choab, N.; Allouhi, A.; El Maakoul, A.; Kousksou, T.; Saadeddine, S.; Jamil, A. Review on greenhouse microclimate and application: Design parameters, thermal modeling and simulation, climate controlling technologies. Sol. Energy 2019, 191, 109–137. [Google Scholar] [CrossRef]
  3. Singh, M.C.; Singh, J.P.; Pandey, S.K.; Cutting, N.G.; Sharma, P.; Shrivastav, V.; Sharma, P. A review of three commonly used techniques of controlling greenhouse microclimate. Int. J. Curr. Microbiol. Appl. Sci. 2018, 7, 3491–3505. [Google Scholar] [CrossRef]
  4. Li, K.; Sha, Z.; Xue, W.; Chen, X.; Mao, H.; Tan, G. A fast modeling and optimization scheme for greenhouse environmental system using proper orthogonal decomposition and multi-objective genetic algorithm. Comput. Electron. Agric. 2020, 168, 105096. [Google Scholar] [CrossRef]
  5. Hongkang, W.; Li, L.; Yong, W.; Fanjia, M.; Haihua, W.; Sigrimis, N.A. Recurrent Neural Network Model for Prediction of Microclimate in Solar Greenhouse. IFAC-PapersOnLine 2018, 51, 790–795. [Google Scholar] [CrossRef]
  6. Seginer, I. Some artificial neural network applications to greenhouse environmental control. Comput. Electron. Agric. 1997, 18, 167–186. [Google Scholar] [CrossRef]
  7. Abbey, L.; Rao, S.A. Differential response of plant species to greenhouse microclimate created by design technology and ambient conditions. Can. J. Plant Sci. 2017, 98, 300–308. [Google Scholar] [CrossRef]
  8. Shamshiri, R.R.; Jones, J.W.; Thorp, K.R.; Ahmad, D.; Che Man, H.; Taheri, S. Review of optimum temperature, humidity, and vapour pressure deficit for microclimate evaluation and control in greenhouse cultivation of tomato: A review. Int. Agrophysics 2018, 32, 287–302. [Google Scholar] [CrossRef]
  9. Blasco, X.; Martínez, M.; Herrero, J.M.; Ramos, C.; Sanchis, J. Model-based predictive control of greenhouse climate for reducing energy and water consumption. Comput. Electron. Agric. 2007, 55, 49–70. [Google Scholar] [CrossRef]
  10. Sihag, J.; Prakash, D. A Review: Importance of Various Modeling Techniques in Agriculture/Crop Production. In Soft Computing: Theories and Applications; Springer: Singapore, 2019; pp. 699–707. [Google Scholar]
  11. Acquah, S.J.; Yan, H.; Zhang, C.; Wang, G.; Zhao, B.; Wu, H.; Zhang, H. Application and evaluation of Stanghellini model in the determination of crop evapotranspiration in a naturally ventilated greenhouse. Int. J. Agric. Biol. Eng. 2018, 11, 95–103. [Google Scholar] [CrossRef]
  12. Carmassi, G.; Incrocci, L.; Maggini, R.; Malorgio, F.; Tognoni, F.; Pardossi, A. An aggregated model for water requirements of greenhouse tomato grown in closed rockwool culture with saline water. Agric. Water Manag. 2007, 88, 73–82. [Google Scholar] [CrossRef]
  13. Hamer, P.J.C. Simulating the irrigation requirements of a greenhouse crop. Acta Hortic. 1996, 443, 147–154. [Google Scholar] [CrossRef]
  14. Medrano, E.; Lorenzo, P.; Sánchez-Guerrero, M.C.; Montero, J.I. Evaluation and modelling of greenhouse cucumber-crop transpiration under high and low radiation conditions. Sci. Hortic. 2005, 105, 163–175. [Google Scholar] [CrossRef]
  15. Heidari, M.; Khodadadi, H. Climate control of an agricultural greenhouse by using fuzzy logic self-tuning PID approach. In Proceedings of the 2017 23rd International Conference on Automation and Computing (ICAC), Huddersfield, UK, 7–8 September 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 1–6. [Google Scholar]
  16. Robles Algarín, C.; Callejas Cabarcas, J.; Polo Llanos, A. Low-cost fuzzy logic control for greenhouse environments with web monitoring. Electronics 2017, 6, 71. [Google Scholar] [CrossRef]
  17. Li, K.; Xue, W.; Mao, H.; Chen, X.; Jiang, H.; Tan, G. Optimizing the 3D Distributed Climate inside Greenhouses Using Multi-Objective Optimization Algorithms and Computer Fluid Dynamics. Energies 2019, 12, 2873. [Google Scholar] [CrossRef]
  18. Mahdavian, M.; Wattanapongsakorn, N. Optimizing greenhouse lighting for advanced agriculture based on real time electricity market price. Math. Probl. Eng. 2017, 2017, 6862038. [Google Scholar] [CrossRef]
  19. Moon, T.W.; Jung, D.H.; Chang, S.H.; Son, J.E. Estimation of greenhouse CO2 concentration via an artificial neural network that uses environmental factors. Hortic. Environ. Biotechnol. 2018, 59, 45–50. [Google Scholar] [CrossRef]
  20. Taki, M.; Ajabshirchi, Y.; Ranjbar, S.F.; Matloobi, M. Application of Neural Networks and multiple regression models in greenhouse climate estimation. Agric. Eng. Int. CIGR J. 2016, 18, 29–43. [Google Scholar]
  21. Bennis, N.; Duplaix, J.; Enéa, G.; Haloua, M.; Youlal, H. Greenhouse climate modelling and robust control. Comput. Electron. Agric. 2008, 61, 96–107. [Google Scholar] [CrossRef]
  22. Rico-García, E.; Castañeda-Miranda, R.; García-Escalante, J.J.; Lara-Herrera, A.; Herrera-Ruiz, G. Accuracy comparison of a mechanistic method and computational fluid dynamics (cfd) for greenhouse inner temperature predictions. Rev. Chapingo Ser. Hortic. 2007, 13, 207–212. [Google Scholar] [CrossRef]
  23. Boulard, T.; Roy, J.-C.; Pouillard, J.-B.; Fatnassi, H.; Grisey, A. Modelling of micrometeorology, canopy transpiration and photosynthesis in a closed greenhouse using computational fluid dynamics. Biosyst. Eng. 2017, 158, 110–133. [Google Scholar] [CrossRef]
  24. Ma, D.; Carpenter, N.; Maki, H.; Rehman, T.U.; Tuinstra, M.R.; Jin, J. Greenhouse environment modeling and simulation for microclimate control. Comput. Electron. Agric. 2019, 162, 134–142. [Google Scholar] [CrossRef]
  25. Reyes-Rosas, A.; Molina-Aiz, F.D.; López, A.; Valera, D.L. A simple model to predict air temperature inside a Mediterranean greenhouse. Acta Hortic. 2016, 1182, 95–104. [Google Scholar] [CrossRef]
  26. Su, Y.; Xu, L. Towards discrete time model for greenhouse climate control. Eng. Agric. Environ. Food 2017, 10, 157–170. [Google Scholar] [CrossRef]
  27. Xu, Z.; Chen, J.; Zhang, Q.; Gu, Y. Dynamic mechanistic modeling of air temperature and humidity in the greenhouses with on-off actuators. TELKOMNIKA Telecommun. Comput. Electron. Control 2016, 14, 248–256. [Google Scholar] [CrossRef]
  28. Seginer, I.; Boulard, T.; Bailey, B.J. Neural network models of the greenhouse climate. J. Agric. Eng. Res. 1994, 59, 203–216. [Google Scholar] [CrossRef]
  29. Challa, H.; Nederhoff, E.M.; Bot, G.P.A.; van de Braak, N.J. Greenhouse climate control in the nineties. Acta Hortic. 1988, 230, 459–470. [Google Scholar] [CrossRef]
  30. Yaofeng, H.; Shangfeng, D.; Lijun, C. Identification of greenhouse climate using Takagi-Sugeno fuzzy modeling. In Proceedings of the 2017 Chinese Automation Congress (CAC), Jinan, China, 20–22 October 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 609–614. [Google Scholar]
  31. Coelho, J.P.; de Moura Oliveira, P.B.; Cunha, J.B. Greenhouse air temperature control using the particle swarm optimisation algorithm. IFAC Proc. 2002, 35, 43–47. [Google Scholar] [CrossRef]
  32. Gao, Y.; Xu, L.; Wei, R. Real-time multi-objective optimal control algorithm for greenhouse environment using particle swarm optimization. In Proceedings of the 2015 8th International Symposium on Computational Intelligence and Design (ISCID), Hangzhou, China, 12–13 December 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 11–15. [Google Scholar]
  33. Pérez-González, A.; Begovich-Mendoza, O.; Ruiz-León, J. Modeling of a greenhouse prototype using PSO and differential evolution algorithms based on a real-time LabViewTM application. Appl. Soft Comput. 2018, 62, 86–100. [Google Scholar] [CrossRef]
  34. Gurban, E.H.; Andreescu, G.-D. Comparison of modified Smith predictor and PID controller tuned by genetic algorithms for greenhouse climate control. In Proceedings of the 2014 IEEE 9th IEEE International Symposium on Applied Computational Intelligence and Informatics (SACI), Timisoara, Romania, 15–17 May 2014; IEEE: Piscataway, NJ, USA, 2014; pp. 79–83. [Google Scholar]
  35. Lammari, K.; Bounaama, F.; Ouradj, B.; Draoui, B. Constrained ga pi sliding mode control of indoor climate coupled mimo greenhouse model. J. Therm. Eng. 2020, 6, 313–326. [Google Scholar] [CrossRef]
  36. Azaza, M.; Tanougast, C.; Fabrizio, E.; Mami, A. Smart greenhouse fuzzy logic based control system enhanced with wireless data monitoring. ISA Trans. 2016, 61, 297–307. [Google Scholar] [CrossRef]
  37. Ben Ali, R.; Bouadila, S.; Mami, A. Development of a Fuzzy Logic Controller applied to an agricultural greenhouse experimentally validated. Appl. Therm. Eng. 2018, 141, 798–810. [Google Scholar] [CrossRef]
  38. Faouzi, D.; Bibi-Triki, N.; Draoui, B.; Abène, A. Greenhouse Environmental Control Using Optimized, Modeled and Simulated Fuzzy Logic Controller Technique in MATLAB SIMULINK. Heat Transf. 2017, 5, 6. [Google Scholar] [CrossRef]
  39. Outanoute, M.; Lachhab, A.; Selmani, A.; Oubehar, H.; Guerbaoui, M. Neural network based models for estimating the temperature and humidity under greenhouse. Int. J. Multi-Discip. Sci. 2016, 3, 26–33. [Google Scholar]
  40. Taki, M.; Abdanan Mehdizadeh, S.; Rohani, A.; Rahnama, M.; Rahmati-Joneidabad, M. Applied machine learning in greenhouse simulation; new application and analysis. Inf. Process. Agric. 2018, 5, 253–268. [Google Scholar] [CrossRef]
  41. Zeng, S.; Hu, H.; Xu, L.; Li, G. Nonlinear adaptive PID control for greenhouse environment based on RBF network. Sensors 2012, 12, 5328–5348. [Google Scholar] [CrossRef]
  42. Shanmuganathan, S. Artificial neural network modelling: An introduction. In Artificial Neural Network Modelling; Springer: Cham, Switzerland, 2016; pp. 1–14. [Google Scholar]
  43. Escamilla-García, A.; Soto-Zarazúa, G.M.; Toledano-Ayala, M.; Rivas-Araiza, E.; Gastélum-Barrios, A. Applications of Artificial Neural Networks in Greenhouse Technology and Overview for Smart Agriculture Development. Appl. Sci. 2020, 10, 3835. [Google Scholar] [CrossRef]
  44. Dahmani, K.; Elleuch, K.; Fourati, F.; Toumi, A. Adaptive neural control of a greenhouse. In Proceedings of the 2019 19th International Conference on Sciences and Techniques of Automatic Control and Computer Engineering (STA), Sousse, Tunisia, 24–26 March 2019; pp. 59–63. [Google Scholar] [CrossRef]
  45. Gharghory, S.M. Deep Network based on Long Short-Term Memory for Time Series Prediction of Microclimate Data inside the Greenhouse. Int. J. Comput. Intell. Appl. 2020, 19, 2050013. [Google Scholar] [CrossRef]
  46. Jung, D.-H.; Kim, H.S.; Jhin, C.; Kim, H.-J.; Park, S.H. Time-serial analysis of deep neural network models for prediction of climatic conditions inside a greenhouse. Comput. Electron. Agric. 2020, 173, 105402. [Google Scholar] [CrossRef]
  47. Kim, S.Y.; Park, K.S.; Lee, S.M.; Heo, B.M.; Ryu, K.H. Development of Prediction Model for Greenhouse Control based on Machine Learning. J. Digit. Contents Soc. 2018, 19, 749–756. [Google Scholar]
  48. Salah, L.B.; Fourati, F. Deep Elman Neural Network for Greenhouse Modeling. In Proceedings of the International Conference on the Sciences of Electronics, Technologies of Information and Telecommunications, Maghreb, Tunisia, 18–20 December 2018; Springer: Cham, Switzerland, 2018; pp. 271–280. [Google Scholar]
  49. Elman, J.L. Finding structure in time. Cogn. Sci. 1990, 14, 179–211. [Google Scholar] [CrossRef]
  50. Jiang, Y.; Zou, J.; Sui, X.; Zheng, Z.; Pang, X. RIME-CNN-BiLSTM for data-driven precision agriculture: A hybrid model for adaptive temperature and humidity forecasting in solar greenhouses. Comput. Electron. Agric. 2025, 238, 110838. [Google Scholar] [CrossRef]
  51. Atia, D.M.; El-madany, H.T. Analysis and design of greenhouse temperature control using adaptive neuro-fuzzy inference system. J. Electr. Syst. Inf. Technol. 2017, 4, 34–48. [Google Scholar] [CrossRef]
  52. Márquez-Vera, M.A.; Ramos-Fernández, J.C.; Cerecero-Natale, L.F.; Lafont, F.; Balmat, J.-F.; Esparza-Villanueva, J.I. Temperature control in a MISO greenhouse by inverting its fuzzy model. Comput. Electron. Agric. 2016, 124, 168–174. [Google Scholar] [CrossRef]
  53. Revathi, S.; Sivakumaran, N. Fuzzy based temperature control of greenhouse. IFAC-PapersOnLine 2016, 49, 549–554. [Google Scholar] [CrossRef]
  54. Bussab, M.A.; Bernardo, J.I.; Hirakawa, A.R. Greenhouse Modeling Using Neural Networks. In Proceedings of the 6th WSEAS International Conference on Artificial Intelligence, Knowledge Engineering and Data Bases, Corfu Island, Greece, 16–19 February 2007; pp. 131–135. [Google Scholar]
  55. Laribi, I.; Homri, H.; Mhiri, R. Modeling of a Greenhouse Temperature: Comparison Between Multimodel and Neural Approaches. In 2006 IEEE International Symposium on Industrial Electronics; IEEE: Piscataway, NJ, USA, 2006; pp. 399–404. [Google Scholar]
  56. Kodali, R.K.; Jain, V.; Karagwal, S. IoT Based Smart Greenhouse. In 2016 IEEE Region 10 Humanitarian Technology Conference (R10-HTC); IEEE: Piscataway, NJ, USA, 2016; pp. 1–6. [Google Scholar]
  57. Li, N.; Xiao, Y.; Shen, L.; Xu, Z.; Li, B.; Yin, C. Smart Agriculture with an Automated IoT-Based Greenhouse System for Local Communities. Adv. Internet Things 2019, 9, 15–31. [Google Scholar] [CrossRef]
  58. Dariouchy, A.; Aassif, E.; Lekouch, K.; Bouirden, L.; Maze, G. Prediction of the intern parameters tomato greenhouse in a semi-arid area using a time-series model of artificial neural networks. Measurement 2009, 42, 456–463. [Google Scholar] [CrossRef]
  59. Chen, L.; Du, S.; He, Y.; Liang, M.; Xu, D. Robust model predictive control for greenhouse temperature based on particle swarm optimization. Inf. Process. Agric. 2018, 5, 329–338. [Google Scholar] [CrossRef]
  60. Linker, R.; Seginer, I. Greenhouse temperature modeling: A comparison between sigmoid neural networks and hybrid models. Math. Comput. Simul. 2004, 65, 19–29. [Google Scholar] [CrossRef]
  61. Bouadila, S.; Kooli, S.; Skouri, S.; Lazaar, M.; Farhat, A. Improvement of the greenhouse climate using a solar air heater with latent storage energy. Energy 2014, 64, 663–672. [Google Scholar] [CrossRef]
  62. Joudi, K.A.; Farhan, A.A. A dynamic model and an experimental study for the internal air and soil temperatures in an innovative greenhouse. Energy Convers. Manag. 2015, 91, 76–82. [Google Scholar] [CrossRef]
  63. Swinbank, W.C. Long-wave radiation from clear skies. Q. J. R. Meteorol. Soc. 1963, 89, 339–348. [Google Scholar] [CrossRef]
  64. Ali, R.B.; Aridhi, E.; Mami, A. Dynamic model of an agricultural greenhouse using Matlab-Simulink environment. In 2015 16th International Conference on Sciences and Techniques of Automatic Control and Computer Engineering (STA); IEEE: Piscataway, NJ, USA, 2015; pp. 346–350. [Google Scholar]
  65. Fitz-Rodríguez, E.; Kubota, C.; Giacomelli, G.A.; Tignor, M.E.; Wilson, S.B.; McMahon, M. Dynamic modeling and simulation of greenhouse environments under several scenarios: A web-based application. Comput. Electron. Agric. 2010, 70, 105–116. [Google Scholar] [CrossRef]
  66. Fourati, F. Multiple neural control of a greenhouse. Neurocomputing 2014, 139, 138–144. [Google Scholar] [CrossRef]
Figure 1. Diagram of the hybrid recurrent neural network PID controller for greenhouse microclimate.
Figure 1. Diagram of the hybrid recurrent neural network PID controller for greenhouse microclimate.
Agriengineering 08 00004 g001
Figure 2. Internal climate data collection setup using a Davis Vantage Vue weather station inside the greenhouse.
Figure 2. Internal climate data collection setup using a Davis Vantage Vue weather station inside the greenhouse.
Agriengineering 08 00004 g002
Figure 3. Parallel hybrid recurrent neural network for predicting greenhouse temperature and relative humidity.
Figure 3. Parallel hybrid recurrent neural network for predicting greenhouse temperature and relative humidity.
Agriengineering 08 00004 g003
Figure 4. Basic structure of an Elman recurrent network. Solid lines represent the standard forward connections between layers. Dotted lines indicate feedback connections within the hidden layer, while dashed (broken) lines represent the recurrent context connections that transfer the hidden-state information to the next time step.
Figure 4. Basic structure of an Elman recurrent network. Solid lines represent the standard forward connections between layers. Dotted lines indicate feedback connections within the hidden layer, while dashed (broken) lines represent the recurrent context connections that transfer the hidden-state information to the next time step.
Agriengineering 08 00004 g004
Figure 5. Training results for predicting inside temperature: (a) results of different RNN structures; (b) results of different FFNN structures.
Figure 5. Training results for predicting inside temperature: (a) results of different RNN structures; (b) results of different FFNN structures.
Agriengineering 08 00004 g005
Figure 6. Training results for predicting inside relative humidity: (a) results of different RNN structures; (b) results of different FFNN structures.
Figure 6. Training results for predicting inside relative humidity: (a) results of different RNN structures; (b) results of different FFNN structures.
Agriengineering 08 00004 g006
Figure 7. Test results for predicting inside temperature: (a) results of different RNN structures; (b) results of different FFNN structures.
Figure 7. Test results for predicting inside temperature: (a) results of different RNN structures; (b) results of different FFNN structures.
Agriengineering 08 00004 g007
Figure 8. Test results for predicting the inside relative humidity: (a) results of different RNN structures; (b) results of different FFNN structures.
Figure 8. Test results for predicting the inside relative humidity: (a) results of different RNN structures; (b) results of different FFNN structures.
Agriengineering 08 00004 g008
Table 1. Variables measured by weather station.
Table 1. Variables measured by weather station.
VariableSymbolUnit
Outside temperatureTout°C
Outside relative humidityHout%
Outside wind speedWsm/s
Inside temperatureTin°C
Inside relative humidityHin%
Solar radiationRW/m2
Table 2. Comparative characteristics of hybrid RNN and FFNN architectures.
Table 2. Comparative characteristics of hybrid RNN and FFNN architectures.
FeatureHybrid RNN (Elman)Hybrid FFNN
StructureInput, hidden, context, and output layersInput, hidden, and output layers
MemoryTemporal sequences through contextStatic patterns only
ConnectionsFeedback from hidden to context layersFeedforward only
TrainingBackpropagation through timeStandard backpropagation
Context LayersOne per hidden layerNone
Table 3. Performance evaluation of hybrid RNNs in the training stage for the prediction of inside temperature.
Table 3. Performance evaluation of hybrid RNNs in the training stage for the prediction of inside temperature.
Parameters/Number of Hidden Layers12357
MAPE0.0040.0058.344 × 10−40.4731.012
MSE3.861 × 10−65.461 × 10−69.181 × 10−70.0360.082
R20.9990.9990.9990.9310.843
Table 4. Performance evaluation of hybrid FFNNs in the training stage for the prediction of inside temperature.
Table 4. Performance evaluation of hybrid FFNNs in the training stage for the prediction of inside temperature.
Parameters/Number of Hidden Layers12357
MAPE0.0134.343 × 10−31.0190.5070.916
MSE2.116 × 10−53.538 × 10−68.248 × 10−20.0340.072
R20.9990.9990.8430.9360.862
Table 5. Performance evaluation of hybrid RNNs in the training stage for the prediction of inside relative humidity.
Table 5. Performance evaluation of hybrid RNNs in the training stage for the prediction of inside relative humidity.
Parameters/Number of Hidden Layers12357
MAPE5.370 × 10−45.032 × 10−41.056 × 10−40.0420.096
MSE1.603 × 10−71.361 × 10−79.540 × 10−91.43 × 10−34.360 × 10−3
R20.9990.9990.9990.999842630.9995201
Table 6. Performance evaluation of hybrid FFNNs in the training stage for the prediction of inside relative humidity.
Table 6. Performance evaluation of hybrid FFNNs in the training stage for the prediction of inside relative humidity.
Parameters/Number of Hidden Layers12357
MAPE0.0294.292 × 10−49.247 × 10−20.0470.084
MSE7.490 × 10−41.061 × 10−74.201 × 10−30.0020.004
R20.9990.9990.9990.9990.999
Table 7. Performance evaluation of hybrid RNNs in the test stage for the prediction of inside temperature.
Table 7. Performance evaluation of hybrid RNNs in the test stage for the prediction of inside temperature.
Parameters/Number of Hidden Layers12357
MAPE0.2840.2820.3110.4850.723
MSE2.982 × 10−22.973 × 10−23.175 × 10−20.0540.082
R20.8950.8970.8640.7120.503
Table 8. Performance evaluation of hybrid FFNNs in the test stage for the prediction of inside temperature.
Table 8. Performance evaluation of hybrid FFNNs in the test stage for the prediction of inside temperature.
Parameters/Number of Hidden Layers12357
MAPE0.3280.2800.7310.6620.625
MSE3.268 × 10−22.969 × 10−28.286 × 10−20.0730.068
R20.8540.8980.4950.5270.585
Table 9. Performance evaluation of hybrid RNNs in the test stage for the prediction of inside relative humidity.
Table 9. Performance evaluation of hybrid RNNs in the test stage for the prediction of inside relative humidity.
Parameters/Number of Hidden Layers12357
MAPE0.2620.2620.2630.2680.300
MSE0.2570.2570.2570.2570.260
R20.9160.9160.9150.9150.922
Table 10. Performance evaluation of hybrid FFNNs in the test stage for the prediction of inside relative humidity.
Table 10. Performance evaluation of hybrid FFNNs in the test stage for the prediction of inside relative humidity.
Parameters/Number of Hidden Layers12357
MAPE0.2830.2610.3020.3010.291
MSE0.2580.2570.2600.2610.263
R20.9180.9160.9210.9200.912
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Escamilla-García, A.; Soto-Zarazúa, G.M.; Olvera-Olvera, C.A.; López-Martínez, M.d.J.; Toledano-Ayala, M.; Chandrakasan, G.; Rodríguez-Romero, S.A. Hybrid Recurrent Neural Network in Greenhouse Microclimate Prediction. AgriEngineering 2026, 8, 4. https://doi.org/10.3390/agriengineering8010004

AMA Style

Escamilla-García A, Soto-Zarazúa GM, Olvera-Olvera CA, López-Martínez MdJ, Toledano-Ayala M, Chandrakasan G, Rodríguez-Romero SA. Hybrid Recurrent Neural Network in Greenhouse Microclimate Prediction. AgriEngineering. 2026; 8(1):4. https://doi.org/10.3390/agriengineering8010004

Chicago/Turabian Style

Escamilla-García, Axel, Genaro Martin Soto-Zarazúa, Carlos A. Olvera-Olvera, Manuel de Jesús López-Martínez, Manuel Toledano-Ayala, Gobinath Chandrakasan, and Said Arturo Rodríguez-Romero. 2026. "Hybrid Recurrent Neural Network in Greenhouse Microclimate Prediction" AgriEngineering 8, no. 1: 4. https://doi.org/10.3390/agriengineering8010004

APA Style

Escamilla-García, A., Soto-Zarazúa, G. M., Olvera-Olvera, C. A., López-Martínez, M. d. J., Toledano-Ayala, M., Chandrakasan, G., & Rodríguez-Romero, S. A. (2026). Hybrid Recurrent Neural Network in Greenhouse Microclimate Prediction. AgriEngineering, 8(1), 4. https://doi.org/10.3390/agriengineering8010004

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop