• 01 March, 2026
  • GreenCode

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

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: Joaquim Cebolla-Alemany, Yunyao Cheng, Laia Pintó-Espín, Michele Albano, Marcel Macarulla, Santiago Gassó-Domingo

Contributing partner: Aalborg University

Publication page and citation Download PDF