Short-term forecasting and predictive control of rooftop greenhouse microclimate using multi-horizon machine learning models
• Multiple greenhouse temperature forecasting data-driven models evaluated. • Novel application of machine learning to building-integrated smart greenhouses. • Three temporal horizons studied for model predictive control application. • Robust results show consistent R 2 above 0.96 with real data for all time horizons. • Fuzzy control outperforms threshold control reaching more than 60% energy savings. This study presents a data-driven forecasting and control framework tailored to rooftop smart greenhouses integrated into buildings for urban agriculture—a context rarely addressed in existing literature. By combining internal environmental data, external meteorological inputs, and actuator operation states, the framework enables short-term temperature forecasting with high temporal resolution (5, 10, and 15-minute horizons). Advanced feature engineering techniques—including lag variables, rolling statistics, and derived indicators—were applied to capture complex greenhouse dynamics. Seven regression-based machine learning models (namely, Decision Tree, Random Forest, Gradient Boosting, XGBoost, LightGBM, Support Vector Regression, and Multi-layer Perceptron) were trained and systematically compared using cross-validation and SHAP-based interpretability. The best-performing model for each horizon was selected and integrated into a threshold-based and a fuzzy logic-based predictive control system. Results from real-world rooftop greenhouse data show robust forecasting performance (R² > 0.98, MAE between 0.280 and 0.311, and RMSE between 0.638 and 0.728 for the best performing model across all horizons) and demonstrate that the fuzzy controller achieved over 60% energy savings compared to traditional threshold-based strategies, while maintaining climate stability. This work highlights the feasibility of deploying data-driven MPC strategies in building-integrated greenhouse environments and their compatibility with digital twin ecosystems. It also identifies key challenges for generalization, including dataset size, system configuration, and geographical variability.
Authors
- Michele Albano (ORCID: https://orcid.org/0000-0002-3777-9981)
- Marcel Macarulla (ORCID: https://orcid.org/0000-0002-5469-7291)
- Yunyao Cheng (ORCID: https://orcid.org/0000-0002-1819-4056)
- Joaquim Cebolla-Alemany (ORCID: https://orcid.org/0000-0002-3958-6913)
- Santiago Gassó (ORCID: https://orcid.org/0000-0003-0481-4522)
- L.M.V.G. Pinto (ORCID: https://orcid.org/0009-0005-8816-6252)
Publication Details
- Journal
- Smart Agricultural Technology
- Published
- 2025-12-17
- DOI
- https://doi.org/10.1016/j.atech.2025.101733
- Primary Topic
- Greenhouse Technology and Climate Control
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- ITEA
- European Commission
- Universitat Politècnica de Catalunya
- Agència de Gestió d'Ajuts Universitaris i de Recerca
- Agencia Estatal de Investigación