Forecasting Thermal Demand in Citizen Energy Communities Using Machine Learning: Application to the Urberoa Case Study
摘要
Accurate thermal energy demand forecasting is vital for optimizing district heating networks and ensuring efficient energy management in Citizen Energy Communities, particularly those incorporating decentralized renewable sources. This work introduces a data-driven methodology for short- and mid-term thermal demand prediction based on insights from the FEDECOM project. Historical consumption records and meteorological forecasts are used to segment seasonal patterns and apply targeted preprocessing techniques, including outlier detection and temporally coherent imputation of missing data. An extensive set of features is engineered to represent meteorological conditions, calendar cycles, and domain-specific variables. Feature relevance is evaluated, and predictive models are trained using ensemble learning techniques. Forecasts are generated at 15-minute resolution across 24-hour horizons using recursive and direct multi-step prediction strategies validated through cross-validation. The proposed method consistently achieves strong performance, with LightGBM outperforming baseline models in terms of mean absolute error, root mean square error, coefficient of determination, and relative error metrics. This approach offers a scalable, generalizable solution to improve forecasting accuracy in urban energy systems, supporting proactive planning, better renewable energy integration, and enhanced operational efficiency in sustainable environments.