Abstract
Artificial neural networks are one of the main models for predicting PV power. The accuracy of input data in artificial neural networks is the main factor affecting the accuracy of PV power prediction. This article uses accurate weather data from historical measurements and uses the grey model GM(1,1) to predict the current weather data. When using the grey model, multiple lengths of historical data sequences are selected for prediction, and the average relative error is used to evaluate the fitting effect on historical data. The weather data predicted by the sequence with the best fitting effect on historical data is selected. The input data of the artificial neural network is obtained by weighting the weather data predicted by the weather forecast with the weather data predicted by the grey model. The weights are dynamically adjusted based on the fitting effect of the grey model on historical data. The simulation of existing photovoltaic power station data has verified the effectiveness of the algorithm proposed in this paper.
Introduction
In recent years, there has been rapid development in clean energy generation, particularly focusing on achieving carbon peak and carbon neutrality goals. 1 Among clean energy sources, wind and photovoltaic (PV) power have demonstrated remarkable growth, with PV, in particular, gaining widespread adoption due to its convenient installation and broad applicability.
The primary energy source for PV power generation is sunlight. However, the output power of PV is influenced by factors such as sunlight intensity, leading to significant uncertainties. The grid, on the other hand, has specific determinacy requirements for the power fed into it from PV systems. The uncertainty in PV power poses substantial challenges for grid scheduling and control.2–4 Consequently, PV power stations need to forecast future power generation to reduce uncertainty in grid integration.5,6
Prediction technologies have found mature applications in various engineering fields.7–10 In the realm of PV power prediction, artificial neural networks and its various enhanced algorithms11–14 dominate. While artificial neural networks theoretically can fit any function, improving accuracy for stochastic tasks like PV power prediction remains a challenge. In the literature, 11 a genetic algorithm neural network model optimized based on the Complete Ensemble Empirical Mode Decomposition (CEEMD) method has been proposed, showing increased accuracy in both daily and ultra-short-term predictions of PV power. Another study 12 introduced a method for ultra-short-term prediction of PV power based on spatiotemporal graph convolutional neural networks, reducing the root mean square error in short-term power prediction to 1.122%. A model combining variational mode decomposition, an improved arrow algorithm, and an enhanced extreme learning machine for short-term PV power prediction has also been proposed in the literature, 15 demonstrating enhanced prediction accuracy through the amalgamation of these algorithms. In Reference 16, a PV power prediction ensemble model based on similar day clustering is proposed. This model demonstrates adaptability to various weather conditions, providing accurate predictions for PV power under any weather type. Reference 17 employs wavelet analysis and genetic algorithm optimization for the Elman neural network. The optimized Elman neural network shows a reduction of over 10% in the average relative error of predictions in three scenarios: sunny, cloudy, and rainy days. While these methods have increased the accuracy of PV power predictions to some extent, they inevitably introduce a significant level of algorithmic complexity.
One of the key factors affecting the accuracy of artificial neural networks in PV power prediction is the strong randomness of weather-related data used as inputs.18–20 The quality of weather forecasts and the randomness of weather have a significant impact on the prediction results, seriously affecting the accuracy of predictions. Therefore, an algorithm is needed to appropriately process the results of weather forecasts to reduce the excessive dependence of prediction systems on weather forecast accuracy. This paper takes an approach from the perspective of input data, leveraging the advantages of grey models in short-term prediction performance. Firstly, the grey model predicts current weather data based on past actual weather data. Subsequently, based on the evaluation results of the grey model’s predictions, the weights of the grey model’s predicted weather data and weather forecast predicted data are dynamically selected. The data obtained by weighting these two weather data is then used as input for the artificial neural network. This approach improves the accuracy of PV power prediction without significantly increasing algorithmic complexity.
BP neural network model
The human brain contains an extensive number of neurons with highly interconnected pathways. Artificial Neural Networks (ANNs) emulate the structure of the human brain, describing neurons and their connections through mathematical expressions to form various types of neural networks.21,22
The primary mathematical expression for a neuron is as follows:
In this expression, x k represents a set of input signals. These signals undergo a weighted summation with weights represented by followed by consideration of a threshold represented by b, resulting in c. The value c is a linear combination of the input signals and the threshold. This signal then undergoes a transfer function f to obtain the output y of the neuron.
In neurons, both weight and transfer function are crucial factors. Weights determine the strength of connections between different neurons or between neurons and input/output signals. The transfer function is employed for the nonlinear mapping of the c value. Weights are determined through repeated training processes on sample data, and the transfer function is typically a single-valued function.
One of the most common and well-established ANN models is the Backpropagation (BP) neural network. In weight training, the BP neural network utilizes error backpropagation. BP networks typically consist of an input layer, an output layer, and several intermediate hidden layers. The input layer corresponds to the network’s input signals, and the output layer corresponds to the network’s output signals. Neurons in each layer are independent, and the constructed BP neural network theoretically performs well in solving nonlinear problems.
After each round of training on sample data, BP neural networks calculate errors. Training stops when the error meets a specified criterion; otherwise, it proceeds to the next round.
After each round of training on sample data, BP neural networks calculate errors. Training stops when the error meets a specified criterion; otherwise, it proceeds to the next round. From the above, it is evident that, with the neural network structure determined, the weights connecting neurons are the primary determinant of the network’s output accuracy. These weights are established through training on sample data, where the quality of the sample data directly impacts the network’s generalization performance.
Grey model GM(1,1)
The fundamental model for PV power prediction systems is generally based on artificial neural networks. Weather forecast data is the primary input for PV power prediction systems, and improving the quality of weather forecast data is beneficial for enhancing the generalization effect of the trained neural network.
To improve the generalization effect of neural networks used for PV power prediction, the weather forecast data is preprocessed using grey models. When obtaining sample data, since it belongs to past records, we not only acquire weather data from forecasts but also have access to historical actual weather data. When generalizing with neural networks, the actual weather data before that moment of generalization is also available. Using historical actual weather data is advantageous for enhancing the quality of input data for artificial neural networks.
Grey models employ mathematical methods such as cumulative generation and inverse cumulative restoration to predict data, which is very useful for exploring internal patterns in the data. Grey models require relatively few sample data, predicting with just more than or equal to 4 sample data, making them highly suitable for PV power prediction, especially in short-term forecasting scenarios. Based on historical actual weather data, the grey model, a commonly used grey model, predicts current weather data. According to the evaluation results of the grey model’s predictions, the weight of the data predicted by the grey model and the weather forecast-predicted data is selected. This weighted data is used as input for the PV power prediction neural network, contributing to an improvement in the quality of input data.
The most commonly used grey model is the GM(1, 1) model, The GM(1, 1) model’s process for handling historical actual weather data is as follows:
Firstly, the historical actual data sequence of weather forecast is cumulatively generated to obtain a new data sequence. The cumulative equation is as follows:
The GM(1, 1) model assumes that the cumulatively generated new data sequence follows the differential equation:
Discretizing the above equation and substituting the accumulated generated data sequence X1(k) x into it, we obtain the following:
Let
The above equations form a linear system with two unknowns, p and q, when n≥2, the method of least squares can be employed to solve for p and q. Let:
The formulas for solving p and q using the method of least squares are as follows:
Once p and q are solved, the general solution of the differential equation (3) with initial conditions at t = 1, u (1) = X1 (1) is as follows:
The predicted values of the cumulative sequence can be obtained by taking the values at the discrete points where
The original data sequence’s predicted values can be obtained by cumulatively reducing
For predicted values
Predictive system input data calculation
At this point, we already have weather data
Here, k1 and k2 are the weights for the weather data predicted by the weather forecast X
p
(n+1) and the data predicted by the grey model
The weight values of k1 and k2 will be determined based on the evaluation results of the grey model.
The prediction performance of the grey model can be measured by parameters such as the average relative error and posterior difference ratio. Among them, the method of calculating the average relative error is relatively simple and provides a good assessment. Therefore, this paper uses the average relative error to measure the prediction performance of the grey model.
Calculate the relative error for each original data predicted by the grey model:
Calculate the average relative error:
The values of k1 and k2 will be adjusted based on the size of (1) As (2) When the average relative error (3) When the mean relative error
Considering the aforementioned three principles and the relationship that k1 and k2 should satisfy in equation (12), we can obtain the following:
In actual processing, to prevent k1 and k2 from being less than 0, when
Of course, the weight determination function is not unique, but there are many options available. As long as the three principles and the constraints of formula (12) are met, it is feasible; the optimal parameter weight parameters may need to be validated through later prediction results.
Instance validation of the input data calculation method
The primary factors influencing PV power are solar irradiance, temperature, humidity, and atmospheric pressure. The input data for training and generalization of the BP neural network includes solar irradiance, temperature, humidity, and atmospheric pressure, with the output being PV power. The simulation data is from the actual operational data of a photovoltaic power station in Guizhou. The main parameters in the BP neural network model include maximum training times, learning rate, and training target accuracy. The parameters set in the prediction model of this article are as follows: maximum training frequency of 500 times, learning rate of 0.01, and training target accuracy of 0.00001.
Initially, this paper processes the numerical values of neural network input data such as solar irradiance, temperature, humidity, and atmospheric pressure using the proposed calculation method. To enhance the effectiveness of the grey model, the raw data at 4, 5, 6, and 7 points are used four times individually with the grey model. The iteration with the lowest average relative error in fitting the original data is selected for further computation.
The processed data from the algorithm, the weather forecast predicted data, and the actual data are compared in Figures 1–4, representing solar irradiance, temperature, humidity, and atmospheric pressure, respectively. Comparison chart of irradiance data. Comparison chart of temperature data. Comparison chart of humidity data. Comparison chart of atmospheric pressure data.



In Figures 1–4, the green curve represents the processed data after applying the proposed input data calculation method, the red curve represents the weather forecast predicted data, and the black curve represents the actual weather data. From Figures 1–4, it is evident that the green curve is closer to the black curve than the red curve, indicating that the processed data after applying the proposed input data calculation method is closer to the actual data, facilitating more accurate prediction of PV power data.
Table of data average relative error.
From the Table 1, it is evident that, compared to the weather forecast predicted data, the processed data after applying the proposed input data calculation method has a smaller average relative error with the actual data, indicating higher accuracy.
The weather forecast predicted data and the processed data after applying the proposed input data calculation method for solar irradiance, temperature, humidity, and atmospheric pressure are used as inputs for the neural network, with PV power data as the output. The results of the trained neural network for generalization are compared as shown in Figure 5. Comparison chart of prediction results of power.
In Figure 5, the green curve represents the generalization result using the processed data after applying the proposed input data calculation method as input, the red curve represents the generalization result using the weather forecast predicted data as input, and the black curve represents the actual PV power data. From Figure 5, it is evident that the green curve is closer to the black curve than the red curve, indicating that the generalization result using the processed data after applying the proposed input data calculation method as input is closer to the actual PV power.
After quantitative calculation, the average relative error of the neural network’s generalization for PV power using weather forecast predicted data as input is 24.91%, while using the processed data after applying the proposed input data calculation method as input reduces the average relative error to 16.90%, representing an 8.01% decrease in error, R2 improved 2.1%, and there was a significant improvement in prediction accuracy.
Conclusion
As an artificial neural network for photovoltaic prediction systems, the accuracy of the output optical power prediction data is mainly affected by the input weather data such as solar irradiance, temperature, humidity, and air pressure, as well as the structure of the artificial neural network itself. The improvement of input data accuracy can promote the improvement of output data accuracy for optical power prediction and has strong engineering application value.
The integration of weather data predicted based on the grey model with weather forecast predictions in this study yields more accurate weather data, contributing to the precision of input data for artificial neural networks.
This paper exclusively explores methods to enhance the accuracy of input data. Subsequent research could delve into integrating the techniques proposed in this paper with the structure of artificial neural networks, further advancing the accuracy of neural network predictions for PV power. On the other hand, this algorithm increases the computational complexity and may have a certain impact on the convergence of the model. At the same time, more algorithms and datasets need to be tested.
Statements and declarations
Footnotes
Acknowledgments
Thank you to the Guizhou Provincial Department of Science and Technology for providing funding support.
Conflicting interest
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The authors disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This research was funded by Guizhou Province Science and Technology Innovation Talent Team (Grant No.: CXTD[2022]008).
