Optimizing Energy Forecasting Using ANN and RF Models for HVAC and Heating Predictions

Industry 5.0 is transforming energy demand by integrating sustainability into energy planning, ensuring market stability while minimizing environmental impact for future generations. There are several patterns for calculating energy consumption depending on whether it is measured daily, monthly, or annually through the integration of artificial intelligence approaches, particularly Artificial Neural Networks (ANNs) and Random Forests (RFs), and within the framework of Industry 5.0. This study employs machine learning techniques to analyze energy consumption data from two distinct buildings in Spain: the LUCIA facility in Valladolid and the FUHEM Building in Madrid. The implementation was conducted using custom MATLAB code developed in-house. Our approach systematically evaluates and compares the predictive performance of Artificial Neural Networks (ANNs) and Random Forests (RFs) for energy demand forecasting, leveraging each algorithm’s unique characteristics to assess their suitability for this application. The performances of both models are calculated using the Root Mean Square Percentage Error (RMSPE), Root Mean Square Relative Percentage Error (RMSRPE), Mean Absolute Percentage Error (MAPE), Mean Absolute Relative Percentage Error (MARPE), Kling–Gupta Efficiency (KGE), and also the coefficient of determination, R2. Training times are validated using ANN and RF models. Lucia RF took 2.8 s, while Lucia ANN took 40 s; FUHEM RF took 0.3 s, compared to FUHEM ANN, which took 1.1 s. The performances of the two models are described in detail to show the effectiveness of each of them.

Authors

Institutions

Publication Details

Journal
Applied Sciences
Published
2025-06-17
DOI
https://doi.org/10.3390/app15126806
Citations
10
Primary Topic
Building Energy and Comfort Optimization
Type
article
Field-Weighted Citation Impact
10.06

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Optimizing Energy Forecasting Using ANN and RF Models for HVAC and Heating Predictions

Javier M. Rey-Hernández, Khaled M. Salem, Ahmed Omar Elgharib, Francisco Javier Rey Martı́nez
10 citations
Applied Sciences
Building Energy and Comfort Optimization
10.06
article

Optimizing Energy Forecasting Using ANN and RF Models for HVAC and Heating Predictions

Javier M. Rey-Hernández, Khaled M. Salem, Ahmed Omar Elgharib, Francisco Javier Rey Martı́nez
article en
10 citations

Abstract

Industry 5.0 is transforming energy demand by integrating sustainability into energy planning, ensuring market stability while minimizing environmental impact for future generations. There are several patterns for calculating energy consumption depending on whether it is measured daily, monthly, or annually through the integration of artificial intelligence approaches, particularly Artificial Neural Networks (ANNs) and Random Forests (RFs), and within the framework of Industry 5.0. This study employs machine learning techniques to analyze energy consumption data from two distinct buildings in Spain: the LUCIA facility in Valladolid and the FUHEM Building in Madrid. The implementation was conducted using custom MATLAB code developed in-house. Our approach systematically evaluates and compares the predictive performance of Artificial Neural Networks (ANNs) and Random Forests (RFs) for energy demand forecasting, leveraging each algorithm’s unique characteristics to assess their suitability for this application. The performances of both models are calculated using the Root Mean Square Percentage Error (RMSPE), Root Mean Square Relative Percentage Error (RMSRPE), Mean Absolute Percentage Error (MAPE), Mean Absolute Relative Percentage Error (MARPE), Kling–Gupta Efficiency (KGE), and also the coefficient of determination, R2. Training times are validated using ANN and RF models. Lucia RF took 2.8 s, while Lucia ANN took 40 s; FUHEM RF took 0.3 s, compared to FUHEM ANN, which took 1.1 s. The performances of the two models are described in detail to show the effectiveness of each of them.

Applied SciencesVol. 15(12)
Universidad de Valladolid (ES), Arab Academy for Science, Technology, and Maritime Transport (EG), Universidad de Málaga (ES)
Universidad de Málaga, Universidad Politécnica de Madrid, Universidad de Valladolid, CYTED Ciencia y Tecnología para el Desarrollo
Openalex Percentile: Top 2%
Building Energy and Comfort Optimization
10.06
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.