Forecasting Short-Term Photovoltaic Energy Production to Optimize Self-Consumption in Home Systems Based on Real-World Meteorological Data and Machine Learning
Paweł Kut () and
Katarzyna Pietrucha-Urbanik ()
Additional contact information
Paweł Kut: Department of Heat Engineering and Air Conditioning, Rzeszow University of Technology, Al. Powstancow Warszawy 6, 35-959 Rzeszow, Poland
Katarzyna Pietrucha-Urbanik: Department of Water Supply and Sewerage Systems, Faculty of Civil, Environmental Engineering and Architecture, Rzeszow University of Technology, Al. Powstancow Warszawy 6, 35-959 Rzeszow, Poland
Energies, 2025, vol. 18, issue 16, 1-31
Abstract:
Given the growing number of residential photovoltaic installations and the challenges of self-consumption, accurate short-term PV production forecasting can become a key tool in supporting energy management. This issue is particularly significant in systems without energy storage, where excess production is fed back into the grid, reducing the profitability of prosumer investments. This paper presents an approach to forecasting short-term energy production in residential photovoltaic installations, based on real meteorological data and the use of machine learning methods. The analysis is based on measurement data from a functioning PV installation and a local weather station. This study compares three models: classical linear regression, Random Forest and the XGBoost algorithm. The method of data preparation, the model training process and the assessment of their effectiveness based on real energy production measurements are presented. This paper also includes a practical calculation example and an analysis of selected days in order to compare the forecast results with the actual production. Of the three models compared, the highest accuracy was achieved for XGBoost, with an MAE = 1.25 kWh, RMSE = 1.93 kWh, and coefficient of determination R 2 = 0.94. Compared to linear regression, this means a 66% reduction in MAE and a 41% reduction in the Random Forest model, confirming the practical usefulness of this method in a real-world environment. The proposed approach can be used in energy management systems in residential buildings, without the need to use energy storage, and can support the development of a more conscious use of energy resources on a local scale.
Keywords: photovoltaic; forecasting; linear regression; random forest; XGBoost; energy optimization (search for similar items in EconPapers)
JEL-codes: Q Q0 Q4 Q40 Q41 Q42 Q43 Q47 Q48 Q49 (search for similar items in EconPapers)
Date: 2025
References: Add references at CitEc
Citations:
Downloads: (external link)
https://www.mdpi.com/1996-1073/18/16/4403/pdf (application/pdf)
https://www.mdpi.com/1996-1073/18/16/4403/ (text/html)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:gam:jeners:v:18:y:2025:i:16:p:4403-:d:1727192
Access Statistics for this article
Energies is currently edited by Ms. Agatha Cao
More articles in Energies from MDPI
Bibliographic data for series maintained by MDPI Indexing Manager ().