TY - JOUR
T1 - Using Machine Learning Algorithms to Forecast Solar Energy Power Output
AU - Lari, Ali Jassim
AU - Sanfilippo, Antonio P.
AU - Bachour, Dunia
AU - Perez-Astudillo, Daniel
N1 - Publisher Copyright:
© 2025 by the authors.
PY - 2025/3
Y1 - 2025/3
N2 - Solar energy is an inherently variable energy resource, and the ensuing uncertainty in matching energy demand presents a challenge in its operational use as an alternative energy source. The factors influencing solar energy power generation include geographic location, solar radiation, weather conditions, and solar panel performance. Solar energy forecasting is performed using machine learning for better accuracy and performance. Due to the variability of solar energy, the forecasting window is an important aspect of solar energy forecasting that must be integrated into any machine learning model. This study evaluates the suitability of selected machine learning (ML) models comprising Linear Regression, Decision Tree, Random Forest and XGBoost, which have been proven to be effective at forecasting. The data forecasting horizon used was a 24-h window in steps of 30 min. We focused on the first 30-min, 3-h, 6-h, 12-h, and 24-h windows to gain an appreciation of the impact of forecasting duration on the accuracy of prediction using the selected machine learning algorithms. The study results show that Random Forest outperformed all other tested algorithms. It recorded the best values in all evaluation metrics: an average mean absolute error of 0.13, mean absolute percentage error of 0.6, root-mean-square error of 0.28 and R-squared value of 0.89.
AB - Solar energy is an inherently variable energy resource, and the ensuing uncertainty in matching energy demand presents a challenge in its operational use as an alternative energy source. The factors influencing solar energy power generation include geographic location, solar radiation, weather conditions, and solar panel performance. Solar energy forecasting is performed using machine learning for better accuracy and performance. Due to the variability of solar energy, the forecasting window is an important aspect of solar energy forecasting that must be integrated into any machine learning model. This study evaluates the suitability of selected machine learning (ML) models comprising Linear Regression, Decision Tree, Random Forest and XGBoost, which have been proven to be effective at forecasting. The data forecasting horizon used was a 24-h window in steps of 30 min. We focused on the first 30-min, 3-h, 6-h, 12-h, and 24-h windows to gain an appreciation of the impact of forecasting duration on the accuracy of prediction using the selected machine learning algorithms. The study results show that Random Forest outperformed all other tested algorithms. It recorded the best values in all evaluation metrics: an average mean absolute error of 0.13, mean absolute percentage error of 0.6, root-mean-square error of 0.28 and R-squared value of 0.89.
KW - Algorithm
KW - Machine learning
KW - Photovoltaic
KW - Solar energy
KW - Solar radiation
UR - http://www.scopus.com/inward/record.url?scp=86000621008&partnerID=8YFLogxK
U2 - 10.3390/electronics14050866
DO - 10.3390/electronics14050866
M3 - Article
AN - SCOPUS:86000621008
SN - 2079-9292
VL - 14
JO - Electronics (Switzerland)
JF - Electronics (Switzerland)
IS - 5
M1 - 866
ER -