Abstract:
The shift toward renewable energy sources has raised the importance of accurate solar irradiance
forecasting, especially for optimising photovoltaic energy systems. In regions with variable climates,
reliable daily forecasting becomes a challenge due to rapid and unpredictable changes
in atmospheric conditions. This research investigates machine learning approaches for improving
the accuracy of solar irradiance predictions under different weather conditions, including
clear, overcast, partly cloudy, and rainy conditions. A five-year dataset (2020–2024) for Hambantota
was collected from the Weather Query Builder database, including global horizontal
irradiance (W/m2) and meteorological parameters such as temperature (°C), relative humidity
(%), wind speed (km/h), and cloud cover (%). These parameters were used as input variables to
train and test multiple machine learning models, including Random Forest (RF), Extreme Gradient
Boosting (XGBoost), Convolutional Neural Network (CNN), and a hybrid Convolutional
Neural Network–Long Short-Term Memory (CNN-LSTM) architecture. Evaluation metrics included
Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute
Percentage Error (MAPE). Results show that the CNN-LSTM consistently achieved the highest
accuracy across all weather conditions. Under clear skies, the model achieved a MAE of
2.0 W/m2, a RMSE of 3.3 W/m2, and a MAPE of 0.7%. In overcast conditions, performance
remained strong (MAE = 6.65W/m2, RMSE = 13.62 W/m2, MAPE = 4.1%). During rainy
days, CNN-LSTM reduced MAPE to 8.5%, compared to 19.7% for CNN, representing a 57%
improvement. Error distribution histograms also indicated that the model’s predictions were
closely centered and symmetrical, reflecting reduced bias and variance compared to other models.
In contrast, RF, XGBoost, and CNN models showed higher deviations, particularly under
rainy and partly cloudy conditions. These results confirm the effectiveness of using deep hybrid
learning models for handling the complex and nonlinear patterns associated with weatherdependent
solar irradiance data. This research contributes toward building better forecasting
systems that can increase the stability and efficiency of solar energy integration into power
grids, especially in climatically varying regions.