This study utilizes real data obtained from the PV power system situated within the College of Engineering building at the University of Misan, Iraq. The PV data were taken randomly based on six days for each condition state from different seasons of 2024. They were collected at three-minute intervals, spanning from 6 a.m. to 5 p.m. PV generation is influenced by several external elements, including sun radiation, ambient temperature, and cloud cover. Ultimately, the Matplotlib and Seaborn libraries in the Python approach library were utilized to create the visual depictions of the outcomes.
6.1. Sunny Days
The objective of this categorization test is to address the validation of the PV forecasting model in sunny weather circumstances. Precisely, a total of 1158 samples were recorded from 6 days that had clear skies. These samples were uniformly spread among various seasons to depict sunny weather circumstances. In total, 361 samples were taken on the 17th and 22nd of January to represent the winter season. Then, the 12th and 21st of March were chosen to represent the spring season, with a total of 384 samples, while the 7th and 8th of June were selected to represent the summer season, with 413 samples. The number of samples fluctuated due to the incidence of sunlight on the solar panels.
Figure 9 depicts the MAE values, comparing the predicted and actual power generation. The X-axis shows time divided into intervals of 3 min, while the Y-axis represents the MAE in watts.
Figure 9a demonstrates that the MAE function of the ANN-GA forecasting model is occasionally the lowest compared to the ANN and ANN-GWO models, as indicated in
Table 3. On days with clear skies, the MAE values recorded by the ANN-GA, ANN, and ANN-GWO are 16.0403 W, 17.3919 W, and 17.0240 W, respectively. Meanwhile, the MSE associated with ANN-GA is generally the lowest compared to the ANN and ANN-GWO, as indicated in
Figure 10a and
Table 3, which refers to the difference between the predicted and actual power generation of the PV system reducing to about 420.6154 W, 462.6080 W, and 477.552 W, respectively. According to the previous values, it is clear that the conventional ANN has a good MAE in sunny weather circumstances compared to the ANN-GWO model. However, it has failed to reach the required values of MSE and RMSE; as periods shift, certain patterns may emerge that impact the performance of each model in distinct ways. Nevertheless, it has been verified that the ANN-GWO model outperforms the ANN model in various conditions characterized by cloudiness and rainfall.
Figure 11a illustrates a comparison test between the theoretical PV power and the actual PV power for the three models during the periods of sunny days. It can be notable that there are fluctuations in the real capacity at various time intervals, with a peak occurring on January 17th at 12:03 p.m. and a trough on 3rd March at 8:25 a.m. Generally, the models are enhanced through the utilization of the GA and the GWO algorithm to exhibit a superior performance and accuracy, as they closely track the actual power levels in both high and low scenarios. In contrast, the basic ANN model drifts away from the standard generation of the PV test. Therefore, employing the optimization methods, such as the GA and GWO algorithm in the NN model, is essentially to enhance the precision of predictions in related applications for energy management and stability of the utilized power grid when it is connected with a PV plant.
6.2. Cloudy Days
In this categorization test, the PV prediction model is proposed for cloudy weather circumstances regarding various seasons. A total of 1063 samples were collected from six evenly distributed cloudy days across various seasons. Specifically, 330 samples were taken on the 2nd and 18th of January to represent the winter season, 356 samples were taken on 11th and 14th of March to represent the spring season, and 377 samples were taken on 22nd and 24th of June to represent the summer season. In overcast weather, the total number of samples is lower compared to bright weather due to the obstruction of sunlight by clouds, which prevents the solar panels from receiving sufficient light. Additionally, the sensor employed may not be sensitive enough to accurately measure the amount of radiation reaching it, resulting in some readings not being recorded.
The findings presented in
Figure 9b and
Figure 10b indicate the decline in MAE and MSE values for the suggested ANN-GA model. However, it is worth noting that ANN-GA initially exhibited the biggest percentage error during the 18th of January. Nevertheless, the model’s performance improves, subsequently surpassing both ANN and ANN-GWO. Hence, the MAE values range from 0 to 80 W throughout time is determined by computing the mean value of the ANN-GA, ANN, and ANN-GWO models, which are 17.8099 W, 21.8080 W, and 18.1780 W, respectively. Meanwhile, the MSE values for the models are 615.0131 W, 774.8360 W, and 629.6826 W, respectively.
Figure 11b introduces a rapprochement case between the anticipated and actual power generation using the ANN, ANN-GA, and ANN-GWO models in a short term with cloudy weather. Regarding reduction in solar radiation during cloudy weather tests, the production of PV electrical energy decreases throughout these time intervals. Significant spikes in the power consumption can be detected at specific intervals, for instance the day of 1/18 at 4:19 p.m. and during the specific period of day 3/14 at 8:36 a.m. These times occur as a consequence of reduced activity caused by cloud cover obstructing the sun’s radiation. Therefore, it may be inferred that the stable power predictions closely align with the actual capacity of the PV system. Hence, the three models demonstrate accurate prediction during calm periods but, during quick fluctuations, the ANN-GA and ANN-GWO algorithms exhibit superior performance with higher accuracy and more adaptability to the changes in weather conditions. Hence, the
R2 values for the GA-ANN, ANN, and ANN-GWO are 0.9347, 0.9209, and 0.9332, respectively, as indicated in
Table 4.
6.3. Rainy Days
In this case, rainy weather circumstances are utilized to assess the proposed PV forecasting prediction model. A total of 809 samples of a rainy state were collected over 6 days distributed across various seasons. To represent the winter season, the heaviest rain days were chosen, which were 11th and 30th of January, to collect 212 samples of these days. Moreover, there were 210 samples on the 19th and 24th of March that represent the spring season and 387 samples on the 20th and 10th of June that represent the summer season. Notably, during January, the duration of daylight hours is decreased in the heavy rainy weather states, which was not recorded in the PV data due to rain-laden clouds blocking radiation. Meanwhile, In June, there was a light rainfall on the 10th owing to the rising temperature. Additionally, a cloudy day was included to make up for the shortage of days with both sunny and cloudy weather. This is because June typically experiences intense sunlight and high temperatures in southern Iraq.
Figure 9c illustrates the MAE observed between forecasted and actual power generation during rainy weather conditions. Based on the data in this figure, it can be shown that the MAE associated with the ANN-GA is occasionally lower than that of both ANN and ANN-GWO, as indicated in
Table 5, specifically on the rainfall days. As a result, the MAE values of the suggested models for three proposals were recorded as 14.3067 W, 16.4599 W, and 15.8127 W, respectively.
Figure 10c shows the discrepancy in MSE between predicted and observed power generation during rainy weather conditions that are closer to zero. On one side, the MSE value of the ANN-GWO reaches 30,000 watts during the period from 8 a.m. to 12 noon on 11 January, as well as during the period of 10 to 11 a.m. on 10 June. There is an increase up to 50,000 in the ANN power prediction due to the excessive energy used during these periods, where the peak solar radiation level was recorded at 467.5926 W/m
2 on 10 June at 10:32 a.m. On the other side, the solar irradiance level was recorded as 193.8658 W/m
2 and 133.9699 W/m
2, between this point, in 3 min intervals. In this case, the fluctuation in the ANN prediction happens due to this rapid change in the solar irradiance. This sudden fluctuation in the input irradiance indicates a limitation in its ability to handle rapid variations in the input data of ANN model.
In general, it is noticed that the GA-ANN prediction is the lowest compared to the ANN and ANN-GWO models, as explained in
Table 5. Notably, the GA optimization shows consistently the superior performance across different scenarios when the MSE values of the proposed model, ANN, and ANN-GWO are 499.9573 W, 845.6225 W, and 645.8738 W, respectively. Furthermore,
Table 5 displays the
R2 of the proposed model, NN, and NN-GWO, which are reported as 0.8965, 0.8250, and 0.8663, respectively, as shown in
Figure 12b, due to a slightly lower correlation compared to clear-sky conditions.
Figure 11 displays the temporal variations in electrical power among the three models during the three-period tests.
Figure 11a shows that the values between the real PV power and estimative PV power match roughly when the irradiances are clear on sunny days. Meanwhile,
Figure 11b shows less matching between the two power tests on a cloudy day. However,
Figure 11c addresses the significant spikes in power levels, namely on 6/10 at 10:18 a.m. This is because of the higher fluctuation recordings for the input irradiance during this time of year when the rain was very heavy and fast, leading to cloud cover blocking the sun’s rays at intervals. Hence, the graph shows sharp fluctuations in power generation on those days. Furthermore, the output energy was diminished compared to sunny and cloudy days due to the presence of rain and clouds, which might obstruct the irradiance reaching the PV panels. This reduction can lead to lower solar energy productivity during rainy days. Nevertheless, the projected values produced by the suggested model continue to closely align with the real energy measurements.
In
Figure 12, comparisons of MAE and R
2 performance measurements across different meteorological seasons are presented. It is provided that the GA-ANN forecasting algorithm accommodates the most accurate PV generation pattern in three different climatic condition tests when compared with the outperformed ANN and ANN-GWO models, as it achieved the highest values of R
2 under sunny, cloudy, and rainy conditions at about 0.9516, 0.95332, and 0.8663, respectively, when it approached 1 as the degree to which the statistical model successfully predicts the outcome. Meanwhile, it is shown that the MAE values are closer to zero to refer to better prediction performance during the sunny, cloudy, and rainy days at about 17.0240 W, 18.1780 W, and 15.8127 W, respectively.
Figure 13 shows the relative error value between the power prediction and the power generation for the three-day cases. As noticed from
Figure 13a, the ANN-GA forecasting model demonstrates the greatest stability compared with the ANN-GWO and the ANN prediction models. In addition, the ANN approach exhibits larger and more pronounced swings, particularly during the periods of days 1/22 and 6/8, where the relative error exceeds 100% and falls below −100%. Hence, the ANN-GA forecasting model achieves the lowest relative percentage error of about 4.5%, while the ANN-GWO and ANN prediction models reach 5.5% and 6%, respectively.
Figure 13b exhibits several abrupt changes characterized by significant increases and decreases in the relative inaccuracy when the actual PV power and the predicted PV power of cloudy days are compared. It is noticed that some error rates exceed 400%, while others fall below −100%, indicating the presence of significant flaws in prediction. Hence, it can be provided that the ANN-GA approaches exhibit the highest accuracy and stability in the PV predicting generation as compared to the ANN-GWO and ANN methods. Consequently, the ANN-GA forecasting model acquires the lowest relative percentage error of about 6.5%, while the ANN-GWO and ANN prediction models reach 7% and 12.5%, respectively.
Finally,
Figure 13c illustrates a consistently constant relative error around zero for long periods in rainy weather. However, there is a specific period, namely 3/24 at 9:24 a.m., during which significant and abrupt negative fluctuations occur. These fluctuations result in a substantial decrease in relative error, reaching values as low as −5000% for all methods. This is because the PV system is influenced by fluctuations in weather conditions, as its performance is closely tied to the level of solar radiation that is significantly low and varies on rainy days. As a results, the ANN-GA forecasting model acquires the lowest relative percentage error of about 40%, while the ANN and ANN-GWO prediction models reach 44% and 56.5%, respectively.
Lastly,
Table 6 summarizes the comparison of PV energy regarding relative percentage errors for three categorization tests. It is demonstrated that enhancing PV prediction is a crucial objective to increase the unpredictability of weather conditions on rainy and overcast days. As a result, the ANN has been developed by using two different algorithms. Hence, the ANN-GA prediction model outperforms the other approaches in all-weather circumstances, since the measured values of the fitness functions were significantly lower than those of the other methods, indicating the commendable performance of this model. On the other hand, the main limitation of this research is that the PV data have been used as specific to a particular region, and only temperature and solar radiation were considered as inputs for the proposed models. It will be better to collect the PV data from various regions, with potential improvements by incorporating additional inputs such as humidity, dust, and other meteorological factors that could influence the accuracy of PV prediction.
Finally, the previous studies that have been mentioned in this paper focused on designing the PV power prediction models based on different techniques. Meanwhile, our research used very recent data collected from the year of 2024, which set it apart from previous works. In addition, two different NN optimization methods were implemented to compare between them. The results showed almost similar performance when compared to the research conducted by researchers in [
46], which used a 5 min time resolution. The study reported an RMSE of 19.87%, while our research yielded an RMSE of 20.5089 for sunny weather conditions, despite the differences in the proposed methodologies. Furthermore, the study that was conducted by researchers in [
47], North China, which focused on the winter period from 2016 to 2018, showed an RMSE of 6.23 MWh for clear days. In comparison, we found an RMSE of 20.5089 watts for clear days that indicates the accuracy and effectiveness of the proposed methods, even when considering different weather conditions and data ranges.