---
title: "Short-term forecasting and predictive control of rooftop greenhouse microclimate using multi-horizon machine learning models"
description: "This study presents a data-driven forecasting and control framework tailored to rooftop smart greenhouses integrated into buildings for urban agriculture—a…"
url: https://greencode.ai/publications/short-term-forecasting-and-predictive-control-of-rooftop-greenhouse-microclimate/
---

# Short-term forecasting and predictive control of rooftop greenhouse microclimate using multi-horizon machine learning models

- **Authors:** [Joaquim Cebolla-Alemany](https://orcid.org/0000-0002-3958-6913 "ORCID profile of Joaquim Cebolla-Alemany") , [Yunyao Cheng](https://orcid.org/0000-0002-1819-4056 "ORCID profile of Yunyao Cheng") , [Laia Pintó-Espín](https://orcid.org/0009-0005-8816-6252 "ORCID profile of Laia Pintó-Espín") , [Michele Albano](https://orcid.org/0000-0002-3777-9981 "ORCID profile of Michele Albano") , [Marcel Macarulla](https://orcid.org/0000-0002-5469-7291 "ORCID profile of Marcel Macarulla") , [Santiago Gassó-Domingo](https://orcid.org/0000-0003-0481-4522 "ORCID profile of Santiago Gassó-Domingo")
- **Contributing partner:** [Aalborg University](https://greencode.ai/partners/aalborg-universitet/ "Aalborg Universitet in GreenCode")
- **Published in:** Smart Agricultural Technology
- **Published:** Mar 2026
- **Type:** Journal article
- **DOI:** [10.1016/j.atech.2025.101733](https://doi.org/10.1016/j.atech.2025.101733)

### Synopsis

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.

Abstract as published.

 [Download PDF](https://doi.org/10.1016/j.atech.2025.101733) [View at the publisher](https://doi.org/10.1016/j.atech.2025.101733) [All publications](https://greencode.ai/publications/)Cite this work

Cebolla-Alemany, J., Cheng, Y., Pintó-Espín, L., Albano, M., Macarulla, M., & Gassó-Domingo, S. (2026). Short-term forecasting and predictive control of rooftop greenhouse microclimate using multi-horizon machine learning models. Smart Agricultural Technology, 13, 101733. <https://doi.org/10.1016/j.atech.2025.101733>
