# Prediction of Greenhouse Microclimatic Parameters Using Building Transient Simulation and Artificial Neural Networks

^{*}

## Abstract

**:**

## 1. Introduction

_{2}levels [1,2,3,4,5]. These innovations are vital in areas with sub-optimal climate conditions, extending cultivation periods beyond traditional growing seasons. However, the variability of these parameters, influenced by stochastic external climatic conditions, challenges the stability and efficiency of greenhouse microclimates.

## 2. Materials and Methods

^{2}, with a precision of ±5%. The measurement interval was set to every hour.

#### 2.1. TRNSYS Generalized Thermal Load Model

- -
- External atmospheric parameters remain constant during the time step calculation (hourly values of outside air parameters do not change).
- -
- There is no condensation inside the building, or in the inner surfaces of film.
- -
- Change in temperature and relative humidity inside the building is uniform.

- surface located in direction of wind flow:

- surface located in the leeward, oriented opposite to the direction of wind flow:

#### 2.2. Greenhouse Condition

^{3}tank stores water that is piped throughout the growing area. The geothermal heating system is regulated to maintain night temperature at 17 °C, and day temperature at 20 °C.

_{2}levels needed for plant growth development. In summer, natural ventilation is employed to cool the space; the roof domes open when internal temperatures exceed a specified threshold and close automatically when wing speeds surpass 35 km/h during rainfall or other meteorological events to ensure structural safety. During summer, the domes are predominantly open, while in winter, they are open for several hours daily to ensure fresh air intake. The recommendation for minimum fresh air flow for effective ventilation, providing sufficient CO

_{2}, is between 2 and 3 air changes per hour (ACH).

#### 2.3. Artificial Neutral Network Structure

^{2}), mean absolute error (MAE), and root mean square error (RMSE) [13]:

## 3. Results and Discussion

^{2}values ranging from 0.681 to 0.989. This demonstrates that data obtained from a typical meteorological year, as well as simulations of the physical load, can effectively substitute for the actual measurements for long-term temperature prediction in greenhouses. Variations in relative humidity are mainly due to deviations in real conditions on selected days from the predicted model of natural ventilation. For instance, strong winds led to the domes being closed, and consequently, the moisture model did align perfectly with the selected moisture settings in the TRNSYS model, resulting in reduced accuracy of the model. However, the trend of correlation between the data was still maintained.

## 4. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Al-Helal, I.M.; Abdel-Ghany, A.M. Energy Partition and Conversion of Solar and Thermal Radiation into Sensible and Latent Heat in a Greenhouse under Arid Conditions. Energy Build.
**2011**, 43, 1740–1747. [Google Scholar] [CrossRef] - Jirka, V.; Kučeravý, V.; Malý, M.; Pech, F.; Pokorný, J. Energy Flow in a Greenhouse Equipped with Glass Raster Lenses. Renew. Energy
**1999**, 16, 660–664. [Google Scholar] [CrossRef] - Aye, L.; Fuller, R.J.; Canal, A. Evaluation of a Heat Pump System for Greenhouse Heating. Int. J. Therm. Sci.
**2010**, 49, 202–208. [Google Scholar] [CrossRef] - Kürklü, A.; Bilgin, S. Cooling of a Polyethylene Tunnel Type Greenhouse by Means of a Rock Bed. Renew. Energy
**2004**, 29, 2077–2086. [Google Scholar] [CrossRef] - Berroug, F.; Lakhal, E.K.; El Omari, M.; Faraji, M.; El Qarnia, H. Numerical Study of Greenhouse Nocturnal Heat Losses. J. Therm. Sci.
**2011**, 20, 377–384. [Google Scholar] [CrossRef] - Petrakis, T.; Kavga, A.; Thomopoulos, V.; Argiriou, A.A. Neural Network Model for Greenhouse Microclimate Predictions. Agriculture
**2022**, 12, 780. [Google Scholar] [CrossRef] - Shen, Y.; Wei, R.; Xu, L. Energy Consumption Prediction of a Greenhouse and Optimization of Daily Average Temperature. Energies
**2018**, 11, 65. [Google Scholar] [CrossRef] - Mahmood, F.; Govindan, R.; Bermak, A.; Yang, D.; Khadra, C.; Al-Ansari, T. Energy Utilization Assessment of a Semi-Closed Greenhouse Using Data-Driven Model Predictive Control. J. Clean. Prod.
**2021**, 324, 129172. [Google Scholar] [CrossRef] - Đurić, O.E.; Tomić, V.; Milanović, P. Energetska optimizacija sistema za korišćenje geotermalne energije za grejanje plastenika. Poljoprivredna Tehnika
**2008**, 33, 49–55. [Google Scholar] - Ghosal, M.K.; Tiwari, G.N. Mathematical Modeling for Greenhouse Heating by Using Thermal Curtain and Geothermal Energy. Sol. Energy
**2004**, 76, 603–613. [Google Scholar] [CrossRef] - He, F.; Ma, C. Modeling Greenhouse Air Humidity by Means of Artificial Neural Network and Principal Component Analysis. Comput. Electron. Agric.
**2010**, 71, S19–S23. [Google Scholar] [CrossRef] - Taki, M.; Ajabshirchi, Y.; Ranjbar, S.F.; Rohani, A.; Matloobi, M. Heat Transfer and MLP Neural Network Models to Predict inside Environment Variables and Energy Lost in a Semi-Solar Greenhouse. Energy Build.
**2016**, 110, 314–329. [Google Scholar] [CrossRef] - Singh, V.K.; Tiwari, K.N. Prediction of Greenhouse Micro-Climate Using Artificial Neural Network. Appl. Ecol. Environ. Res.
**2017**, 15, 767–778. [Google Scholar] [CrossRef] - Koirala, A.; Walsh, K.B.; Wang, Z.; McCarthy, C. Deep Learning–Method Overview and Review of Use for Fruit Detection and Yield Estimation. Comput. Electron. Agric.
**2019**, 162, 219–234. [Google Scholar] [CrossRef] - Saleem, M.H.; Potgieter, J.; Arif, K.M. Plant Disease Detection and Classification by Deep Learning. Plants
**2019**, 8, 468. [Google Scholar] [CrossRef] - Zhang, Q.; Liu, Y.; Gong, C.; Chen, Y.; Yu, H. Applications of Deep Learning for Dense Scenes Analysis in Agriculture: A Review. Sensors
**2020**, 20, 1520. [Google Scholar] [CrossRef] [PubMed] - Pahlavan, R.; Omid, M.; Akram, A. Energy Input-Output Analysis and Application of Artificial Neural Networks for Predicting Greenhouse Basil Production. Energy
**2012**, 37, 171–176. [Google Scholar] [CrossRef] - Uchida Frausto, H.; Pieters, J.G. Modelling Greenhouse Temperature Using System Identification by Means of Neural Networks. Neurocomputing
**2004**, 56, 423–428. [Google Scholar] [CrossRef] - Fandel, G.; Letmathe, P.; Spengler, T.S.; Walther, G. Sustainable Operations. J. Bus. Econ.
**2021**, 91, 123–125. [Google Scholar] [CrossRef] - Castañeda-Miranda, A.; Castaño, V.M. Smart Frost Control in Greenhouses by Neural Networks Models. Comput. Electron. Agric.
**2017**, 137, 102–114. [Google Scholar] [CrossRef] - McDowell, T.P.; Emmerich, S.; Thornton, J.W.; Walton, G. Integration of Airflow and Energy Simulation Using CONTAM and TRNSYS. ASHRAE Trans.
**2003**, 109, 757–770. [Google Scholar] - Zhang, G.; Ding, X.; Li, T.; Pu, W.; Lou, W.; Hou, J. Dynamic Energy Balance Model of a Glass Greenhouse: An Experimental Validation and Solar Energy Analysis. Energy
**2020**, 198, 117281. [Google Scholar] [CrossRef] - Baglivo, C.; Mazzeo, D.; Panico, S.; Bonuso, S.; Matera, N.; Congedo, P.M.; Oliveti, G. Data from a Dynamic Simulation in a Free-Floating and Continuous Regime of a Solar Greenhouse Modelled in TRNSYS 17 Considering Simultaneously Different Thermal Phenomena. Data Br.
**2020**, 33, 106339. [Google Scholar] [CrossRef] [PubMed] - Baglivo, C.; Mazzeo, D.; Panico, S.; Bonuso, S.; Matera, N.; Congedo, P.M.; Oliveti, G. Complete Greenhouse Dynamic Simulation Tool to Assess the Crop Thermal Well-Being and Energy Needs. Appl. Therm. Eng.
**2020**, 179, 115698. [Google Scholar] [CrossRef] - Fidaros, D.K.; Baxevanou, C.A.; Bartzanas, T.; Kittas, C. Numerical Simulation of Thermal Behavior of a Ventilated Arc Greenhouse during a Solar Day. Renew. Energy
**2010**, 35, 1380–1386. [Google Scholar] [CrossRef] - Dayan, J.; Dayan, E.; Strassberg, Y.; Presnov, E. Simulation and Control of Ventilation Rates in Greenhouses. Math. Comput. Simul.
**2004**, 65, 3–17. [Google Scholar] [CrossRef] - Teitel, M.; Tanny, J. Natural Ventilation of Greenhouses: Experiments and Model. Agric. For. Meteorol.
**1999**, 96, 59–70. [Google Scholar] [CrossRef] - Kittas, C.; Karamanis, M.; Katsoulas, N. Air Temperature Regime in a Forced Ventilated Greenhouse with Rose Crop. Energy Build.
**2005**, 37, 807–812. [Google Scholar] [CrossRef] - Molina-Aiz, F.D.; Fatnassi, H.; Boulard, T.; Roy, J.C.; Valera, D.L. Comparison of Finite Element and Finite Volume Methods for Simulation of Natural Ventilation in Greenhouses. Comput. Electron. Agric.
**2010**, 72, 69–86. [Google Scholar] [CrossRef] - Boulard, T.; Fatnassi, H.; Roy, J.C.; Lagier, J.; Fargues, J.; Smits, N.; Rougier, M.; Jeannequin, B. Effect of Greenhouse Ventilation on Humidity of inside Air and in Leaf Boundary-Layer. Agric. For. Meteorol.
**2004**, 125, 225–239. [Google Scholar] [CrossRef] - Parra, J.P.; Baeza, E.; Montero, J.I.; Bailey, B.J. Natural Ventilation of Parral Greenhouses. Biosyst. Eng.
**2004**, 87, 355–366. [Google Scholar] [CrossRef] - Braun, J.E.; Mitchell, J.C. Solar Geometry for Fixed and Tracking Surfaces. Sol. Energy
**1983**, 31, 439–444. [Google Scholar] [CrossRef] - Zhu, S.; Deltour, J.; Wang, S. Modeling the Thermal Characteristics of Greenhouse Pond Systems. Aquac. Eng.
**1998**, 18, 201–217. [Google Scholar] [CrossRef] - Lim, A. A Comparative Study between TRNSYS and RC Thermal Models to Simulate a District Thermal Demand. Master’s Thesis, Eindhoven University of Technology, Eindhoven, The Netherlands, 2020. [Google Scholar]
- Castellucci, S.; Carlini, M. Modelling and Simulation for Energy Production Parametric Dependence in Greenhouses. Math. Probl. Eng.
**2010**, 2010, 590943. [Google Scholar] [CrossRef] - SCL Trnsys 18; Solar Energy Laboratory, University of Wisconsin-Madison: Madison, WI, USA, 2018; Volume 3, pp. 7–36.
- Djuric, O.E. Non-Isothermal Cavity Mixed Convection Research for Computational Fluid Dynamics and Thermal Behaviour Interoperability Development; University of Belgrade: Beograd, Serbia, 2008. [Google Scholar]
- Kanzow, C.; Yamashita, N.; Fukushima, M. Levenberg-Marquardt Methods with Strong Local Convergence Properties for Solving Nonlinear Equations with Convex Constraints. J. Comput. Appl. Math.
**2004**, 172, 375–397. [Google Scholar] [CrossRef] - Kim, S.Y.; Lee, S.M.; Park, K.S.; Ryu, K.H. Prediction Model of Internal Temperature Using Backpropagation Algorithm for Climate Control in Greenhouse. Hortic. Sci. Technol.
**2018**, 36, 713–729. [Google Scholar] [CrossRef]

**Figure 1.**Flow of energy inside the building. Arrows: Red—solar radiation; Black—convection to the air from soil and walls; Blue—infiltration and ventilation; White—heat flow from ground and outside of greenhouse.

**Figure 2.**Comparison of calculated and measured temperatures in the plant growing area in an interval of 5 days during the heating period.

**Figure 6.**Change in inside air temperature during the year (red line). The blue line indicates the optimal temperature value.

**Figure 7.**The relationship for training data between predicted (red line) and TRNSYS-obtained (blue dots) data for: (

**a**) temperature; (

**b**) relative humidity.

**Figure 8.**The relationship for test data between predicted (red line) and TRNSYS-obtained (blue dots) data for (

**a**) temperature; (

**b**) relative humidity.

**Figure 9.**Relationship, on the first day, between predicted (red line) and measured (blue dots) data for (

**a**) temperature; (

**b**) relative humidity.

**Figure 10.**Relationship on the second day between predicted (red line) and measured (blue dots) data for (

**a**) temperature; (

**b**) relative humidity.

**Figure 11.**Relationship on the third day between predicted (red line) and measured (blue dots) data for (

**a**) temperature; (

**b**) relative humidity.

**Figure 12.**Relationship on the fourth day between predicted (red line) and measured (blue dots) data for (

**a**) temperature; (

**b**) relative humidity.

Model | ANNs Neurons Scheme | Learning Rate | Epoch |
---|---|---|---|

M01 | 4-2-2 | 0.02 | 200 |

M02 | 4-3-2 | ||

M03 | 4-4-2 | ||

M04 | 4-5-2 | ||

M05 | 4-6-2 | ||

M06 | 4-7-2 | ||

M07 | 4-8-2 | ||

M08 | 4-9-2 | ||

M09 | 4-10-2 | ||

M10 | 4-6-2 | 0.018 | 200 |

M11 | 300 | ||

M12 | 0.0079 | 200 | |

M13 | 300 |

Model | R2 | MAE | RMSE | |||
---|---|---|---|---|---|---|

Temperature | RH | Temperature | RH | Temperature | RH | |

M01 | 0.8177 | 0.9957 | 0.1818 | 0.0043 | 0.4264 | 0.0653 |

M02 | 0.8147 | 0.9954 | 0.1848 | 0.0045 | 0.4230 | 0.0675 |

M03 | 0.8233 | 0.9957 | 0.1763 | 0.0043 | 0.4199 | 0.0656 |

M04 | 0.8256 | 0.9957 | 0.1740 | 0.0043 | 0.4171 | 0.0655 |

M05 | 0.8326 | 0.9955 | 0.1670 | 0.0044 | 0.4083 | 0.0666 |

M06 | 0.8096 | 0.9954 | 0.1902 | 0.0046 | 0.4361 | 0.0680 |

M07 | 0.8079 | 0.9944 | 0.1919 | 0.0056 | 0.4380 | 0.0750 |

M08 | 0.8174 | 0.9943 | 0.1824 | 0.4271 | 0.4271 | 0.0757 |

M09 | 0.8126 | 0.9946 | 0.1871 | 0.0053 | 0.4326 | 0.0731 |

Model | R2 | MAE | RMSE | |||
---|---|---|---|---|---|---|

Temperature | RH | Temperature | RH | Temperature | RH | |

M10 | 0.8141 | 0.9947 | 0.1857 | 0.0053 | 0.4301 | 0.0729 |

M11 | 0.8654 | 0.9956 | 0.1345 | 0.0043 | 0.3667 | 0.0660 |

M12 | 0.8829 | 0.9962 | 0.1169 | 0.0037 | 0.3420 | 0.0610 |

M13 | 0.8997 | 0.9966 | 0.1002 | 0.0034 | 0.3166 | 0.0587 |

Data | Parameter | Equation | Adj.R^{2} |
---|---|---|---|

train | Temperature | y = 0.7708× + 0.0186 | 0.681 |

Relative humidity | y = 1.022× + 0.0105 | 0.989 | |

test | Temperature | y = 0.8961× − 0.0151 | 0.903 |

Relative humidity | y = 1.003× + 0.00187 | 0.997 |

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. |

© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Ećim-Đurić, O.; Milanović, M.; Dimitrijević-Petrović, A.; Mileusnić, Z.; Dragičević, A.; Miodragović, R.
Prediction of Greenhouse Microclimatic Parameters Using Building Transient Simulation and Artificial Neural Networks. *Agronomy* **2024**, *14*, 1147.
https://doi.org/10.3390/agronomy14061147

**AMA Style**

Ećim-Đurić O, Milanović M, Dimitrijević-Petrović A, Mileusnić Z, Dragičević A, Miodragović R.
Prediction of Greenhouse Microclimatic Parameters Using Building Transient Simulation and Artificial Neural Networks. *Agronomy*. 2024; 14(6):1147.
https://doi.org/10.3390/agronomy14061147

**Chicago/Turabian Style**

Ećim-Đurić, Olivera, Mihailo Milanović, Aleksandra Dimitrijević-Petrović, Zoran Mileusnić, Aleksandra Dragičević, and Rajko Miodragović.
2024. "Prediction of Greenhouse Microclimatic Parameters Using Building Transient Simulation and Artificial Neural Networks" *Agronomy* 14, no. 6: 1147.
https://doi.org/10.3390/agronomy14061147