Photovoltaic ultra-short-term power prediction and correction method based on multi-environmental factor and seasonal difference
Through the combination of correlation analysis, VMD decomposition and CNN-BiGRU-Attention model, combined with the error correction method of VMD-SSA-LSSVM, the problem of multiple environmental factors and seasonal differences in photovoltaic power prediction is solved, significantly improving the prediction accuracy and stability.
Patent Information
- Application Number
- CN202411449018.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-01-21
AI Technical Summary
The existing photovoltaic power prediction technology is difficult to effectively consider multiple environmental factors and seasonal differences, resulting in insufficient prediction accuracy, especially the periodicity and volatility of the output power of the photovoltaic system under different seasons.
This paper proposes a photovoltaic ultra-short-term power prediction and correction method with multiple environmental factors and seasonal differences. It screens the main environmental factors through correlation analysis, uses VMD to decompose photovoltaic time series data, combines the CNN-BiGRU-Attention model for prediction, and uses VMD- SSA-LSSVM performs secondary prediction and correction on the error sequence, optimizing the model parameters to adapt to changes in different seasons.
The accuracy and stability of the photovoltaic ultra -short -term power prediction is improved, especially in different seasons, MAE, RMSE, and MAPE of the modified prediction results have reached 0.013, 0.020 and 0.136, respectively, significantly better than a single model and traditional model.
Smart Images

Figure CN119340983A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of photovoltaic power generation, and in particular to a photovoltaic ultra-short-term power prediction and correction method considering multiple environmental factors and seasonal differences. Background Art
[0002] In recent years, with the rapid development of the global economy, environmental problems and energy crisis have led to increasingly severe supply and demand imbalances. Photovoltaic, as a clean and renewable energy source, has attracted much attention and been vigorously developed worldwide. However, the volatility, randomness and intermittency of photovoltaic output will bring challenges to the balance of supply and demand of the power grid, increase the difficulty of grid connection and real-time monitoring, and the problem of new energy consumption is relatively prominent. Accurate ultra-short-term photovoltaic power prediction can greatly improve the photovoltaic consumption capacity, which is of great significance to the short-term grid dispatching.
[0003] The data-driven statistical prediction method is the mainstream of current photovoltaic power prediction research. The mapping relationship between historical photovoltaic power and other environmental factors is mined through machine learning and other methods to predict photovoltaic power. A solar photovoltaic power prediction model based on machine learning is proposed in the prior art, which uses two methods, support vector machine and Gaussian process regression, and selects several basic input parameters, including photovoltaic panel temperature, ambient temperature, solar radiation, time of day, and relative humidity. In the prior art, 24 machine learning models for deterministic day-ahead power prediction based on numerical weather forecasts are compared and tested on a two-year 15-minute resolution data set of 16 photovoltaic power stations in Hungary. The experiment shows that machine learning is effective even under limited data availability. A photovoltaic power generation prediction method based on the Pearson coefficient is proposed in the prior art. In the prediction model, the Pearson coefficient is used for correlation test and irrelevant features are removed. The remaining features are predicted by regression using a long short-term memory network model, which can not only realize the short-term prediction of photovoltaic power generation, but also reduce the impact of noise on photovoltaic power generation prediction. The existing technology combines two deep learning architectures, long short-term memory and convolutional neural network, which exceeds the standard machine learning and single deep learning models in terms of prediction, accuracy and stability. Most of the above technologies only have a single prediction model, and the prediction accuracy needs to be improved. Existing PV power prediction literature rarely pays attention to the post-processing of the model.
[0004] The error sequence after a prediction contains some potential features, and predicting and correcting it can effectively improve the prediction accuracy. In the prior art, an improved long short-term memory network model is proposed to predict subsequences of different minute-hour-day intervals, and then support vector regression is used to analyze the initial time node to reduce the fluctuation error of the predicted value near zero. In the prior art, the historical prediction error between the training prediction data and the actual photovoltaic data is constructed, and the error correction module based on wavelet transform and k-nearest neighbor is used to correct the prediction error. The experimental results show that compared with the benchmark method, the hybrid model is conducive to improving the performance of photovoltaic power prediction. In the prior art, the measured irradiance is used to correct the irradiance in the numerical weather forecast, the particle swarm optimization algorithm is used to optimize the prediction model, and the error prediction model is introduced to further correct the prediction results. Through the verification of the actual power station, it is proved that the proposed method can effectively improve the short-term prediction accuracy. A deep learning method is proposed in the prior art to improve the performance of short-term one-hour solar energy forecasting, including data preprocessing, feature engineering, kernel principal component analysis, gated recurrent unit network training mode based on time classification, and post-processing with error correction. Experimental results prove the importance of data preprocessing and post-processing based on error correction. The above literature considers the correction of training errors, but ignores the impact of seasonal differences on photovoltaic power forecasting.
[0005] There are significant differences in environmental factors such as light intensity, sunshine duration, and temperature in different seasons. These differences directly affect the output power of the photovoltaic system. Based on the above problems, we propose a photovoltaic ultra-short-term power prediction and correction method based on multiple environmental factors and seasonal differences. Summary of the invention
[0006] The purpose of this section is to summarize some aspects of the embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0007] In view of the problems existing in the prior art, the present invention is proposed.
[0008] Therefore, the purpose of the present invention is to provide a photovoltaic ultra-short-term power prediction and correction method with multiple environmental factors and seasonal differences, and propose a prediction model optimization strategy taking into account seasonal differences. Photovoltaic output has obvious periodicity. A photovoltaic output probability prediction model is established under the premise of considering the season, and the model parameters are optimized so that the prediction accuracy of the prediction model in each season is optimal.
[0009] To solve the above technical problems, according to one aspect of the present invention, the present invention provides the following technical solutions:
[0010] The photovoltaic ultra-short-term power prediction and correction method considering multiple environmental factors and seasonal differences comprises the following steps:
[0011] Step 1: Conduct correlation analysis to screen out the main environmental factors that affect photovoltaic power;
[0012] It is necessary to select appropriate photovoltaic data features for correlation analysis. In the field of natural science, the Pearson correlation coefficient r is widely used to measure the degree of correlation between two variables. Its value is between -1 and 1. The expression of the Pearson correlation coefficient is:
[0013]
[0014] Where: r x1y is the eigenvalue x 1 and the predicted power y 1 The correlation coefficient of x 1,i is the eigenvalue i-th historical data; y 1 is the i-th predicted power value; are the average values of eigenvalue and prediction power respectively; n is the number of predictions;
[0015] When the calculated result is a positive value, it means that the feature is positively correlated with the predicted power. The larger the value, the higher the degree of linear correlation.
[0016] Step 2: Use VMD to extract signal features from photovoltaic time series data to obtain components with strong stability and different frequencies, and use the CNN-BiGRU-Attention model to predict each component once;
[0017] The steps of VMD method to decompose the original time series data are as follows:
[0018] (1) Assume that the photovoltaic power signal is:
[0019]
[0020] In the formula, u k (t) represents the decomposed IMF vector, K represents the preset number of decompositions, A k (t) is u k The amplitude of (t), for u k (t) phase angle, each IMF component has a corresponding center frequency;
[0021] (2) The original signal u k Decompose into K finite bandwidth modal functions, and obtain the one-sided spectrum of each modal function through Hilbert transform:
[0022]
[0023] Where, δ(t) is the pulse signal of each sub-mode;
[0024] (3) Compare the obtained unilateral spectrum of each mode with the estimated center frequency Multiply them together to transfer the spectrum of each mode to the corresponding baseband:
[0025]
[0026] (4) VMD uses the original signal sequence and the sum of each mode as constraints. The constraints are as follows:
[0027]
[0028] In the formula, {u k} is the set of PV power intrinsic mode classifications at time t, {w k} is the set of center frequencies relative to the eigenmode; f(t) is the original signal;
[0029] CNN Model
[0030] The CNN model maps input data to a high-dimensional space through local perception and weight sharing, and efficiently extracts key features of the input data. The convolution layer extracts input data features through convolution kernels with shared weights, and uses activation functions to perform nonlinear mapping on neurons. The pooling layer reduces the dimensionality of features obtained by the convolution operation through maximum pooling or mean pooling methods, compresses the number of features, and reduces the risk of overfitting. The fully connected layer consists of a fully connected neural network, which is used to flatten and integrate the features extracted by the convolution layer and the pooling layer.
[0031] BiGRU neural network model
[0032] BiGRU is a special variant of GRU, which consists of two layers of GRU models with the same output but opposite information transmission directions;
[0033] The parameter calculation of the GRU model can be expressed as:
[0034]
[0035] Where: X t is the input of the GRU model at time t; δ and tanh are the sigmoid and hyperbolic tangent activation functions respectively; is a candidate hidden state, given by the input X t and the hidden layer output h at the previous moment t-1 Calculated; h t is the hidden layer output; W c , W g, W are the weight matrices of the reset gate, update gate and candidate hidden state respectively; c t is the reset gate of GRU, indicating the input X at time t t and the hidden layer output h at the previous moment t-1 Hidden state for candidates The impact of t is the GRU update gate, indicating the hidden layer output h at the previous moment t-1 For the hidden layer output h at time t t The size of the effect;
[0036] According to the above GRU model, set the positive and negative sequence GRU layers to construct the BiGRU model. is the positive sequence GRU model output at time t, is the negative sequence GRU model output at time t;
[0037] The BiGRU model hidden layer output vector h t As input, the weight matrix is calculated according to the Attention weight distribution principle. The specific calculation steps are as follows:
[0038] (1) The hidden layer state vector h of the BiGRU model at the current time t t =[h 1,t ,h 2,t ,…h k,t ], where k is the length of the input sequence time window, and the temporal attention weight vector l corresponding to each historical moment at the current moment t t for
[20] :
[0039] l t =RELU(W d +b d ) (7)
[0040] Where: l t =[l 1,t ,l 2,t ,…,l k,t ]; W d is the trainable weight matrix; b d is the bias vector; RELU(·) represents the activation function, which is used to increase feature differences and make the weight distribution more concentrated;
[0041] (2) The attention weight is normalized by the softmax function to obtain the normalized weight coefficient β τ,t =[β 1,t ,β 2,t ,…,β τ,t ,…,β k,t ], where β τ,tis the attention weight value at the τth moment, which is weighted with the hidden layer state at each corresponding historical moment to obtain the comprehensive time series information state h t '.
[0042]
[0043] Step 3: Use VMD-SSA-LSSVM to make a second prediction of the error sequence and correct the result of the first prediction;
[0044] The LSSVM network realizes the function of online error correction. The prediction model is divided into six layers. The network structure and parameters of each layer are as follows:
[0045] (1) The input layer inputs the photovoltaic output component and meteorological data of length T into the prediction model after preprocessing and correlation analysis;
[0046] (2) The CNN layer consists of a one-dimensional convolution layer, a one-dimensional pooling layer, and a fully connected layer, which are used to extract key features of the input data. The convolution layer uses the tanh function as the activation function, and the pooling layer uses the maximum pooling method. After the input data is processed by the convolution layer and the pooling layer for dimensionality reduction, the spatial feature vector is extracted through the fully connected layer as the input of the BiGRU model. The fully connected layer uses the sigmoid function as the activation function.
[0047] (3) The BiGRU layer uses the RELU function as the activation function to build a single-layer BiGRU network, learn the internal connection and temporal change rules of the local features extracted by CNN, and predict the data at future moments;
[0048] (4) The attention layer is used to process the output vector of the BiGRU hidden layer. By calculating the weights corresponding to different hidden layer vectors, the optimal weight matrix is determined to effectively mine the deep temporal correlation between features.
[0049] (5) The output layer selects the sigmoid function as the activation function and calculates the final prediction result based on the output of the attention layer;
[0050] (6) The error correction layer uses the VMD-SSA-LSSVM network as the online error correction model.
[0051] As a preferred solution of the photovoltaic ultra-short-term power prediction and correction method with multiple environmental factors and seasonal differences described in the present invention, in which: in the step 1, the photovoltaic data characteristics include radiation, temperature, air pressure, humidity, and actual power generation of the photovoltaic field, and the sampling time interval is 15 minutes.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] 1) The VMD-CNN-BiGRU-Attention prediction model can give full play to the ability of VMD algorithm to decompose signals and CNN to extract spatial features. Combining the advantages of BiGRU model in extracting time series features and the ability of Attention mechanism to dynamically assign weights, it is possible to fully explore the relationship between distributed photovoltaic features and time series output under the condition of considering spatiotemporal correlation, so as to improve the accuracy of time series prediction.
[0054] 2) After VMD decomposition, the SSA algorithm can better decompose and analyze the decomposed modal function so that LSSVM can extract more detailed signal components and features, further reduce the prediction error and improve the prediction accuracy.
[0055] 3) The distributed photovoltaic ultra-short-term power prediction model and error online correction model proposed in this paper have good performance in different seasons, which is better than the single model and the traditional model. The MAE, RMSE and MAPE of the corrected prediction results reached 0.013, 0.020 and 0.136 respectively, which has good application prospects in the field of ultra-short-term prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the present invention will be described in detail below in combination with the accompanying drawings and detailed embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0057] Figure 1 This is the GRU structure diagram of the present invention;
[0058] Figure 2 This is the BiGRU model structure diagram of the present invention;
[0059] Figure 3 This is the structural diagram of the Attention mechanism of the present invention;
[0060] Figure 4 It is the VMD-CNN-BiGRU-Attention-SSA-LSSVM prediction model of the present invention;
[0061] Figure 5 It is the original sequence of the present invention;
[0062] Figure 6 is the VMD decomposition result of the present invention;
[0063] Figure 7 The prediction results of different seasons of the present invention;
[0064] Figure 8is the VMD decomposition result of the present invention;
[0065] Fig. 9 These are the error correction results for different seasons of the present invention. DETAILED DESCRIPTION
[0066] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0067] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0068] Secondly, the present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0069] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0070] The present invention provides the following technical solutions: a photovoltaic ultra-short-term power prediction and correction method based on multiple environmental factors and seasonal differences, and proposes a prediction model optimization strategy that takes seasonal differences into consideration. Photovoltaic output has obvious periodicity, and a photovoltaic output probability prediction model is established under the premise of considering the season, and the model parameters are optimized, so that the prediction accuracy of the prediction model in each season is optimal;
[0071] Example 1
[0072] A photovoltaic ultra-short-term power prediction and correction method based on multiple environmental factors and seasonal differences comprises the following steps:
[0073] Step 1: Conduct correlation analysis to screen out the main environmental factors that affect photovoltaic power. The photovoltaic data characteristics include radiation, temperature, air pressure, humidity, and the actual power generation of the photovoltaic field. The sampling interval is 15 minutes.
[0074] It is necessary to select appropriate photovoltaic data features for correlation analysis. In the field of natural science, the Pearson correlation coefficient r is widely used to measure the degree of correlation between two variables. Its value is between -1 and 1. The expression of the Pearson correlation coefficient is:
[0075]
[0076] Where: r x1y is the eigenvalue x 1 and the predicted power y 1 The correlation coefficient of x 1,i is the eigenvalue i-th historical data; y 1 is the i-th predicted power value; are the average values of eigenvalue and prediction power respectively; n is the number of predictions;
[0077] When the calculated result is a positive value, it means that the feature is positively correlated with the predicted power. The larger the value, the higher the degree of linear correlation.
[0078] Usually, the correlation of variables is determined by the range of values in Table 1. When the calculated result is a negative value, it is a negative correlation. Refer to the positive correlation for judgment.
[0079] Table 1 Correlation coefficient and correlation degree
[0080]
[0081] The historical data of a photovoltaic power plant were selected for analysis, including radiation, temperature, air pressure, humidity, and actual power generation of the photovoltaic power plant, with a sampling interval of 15 minutes. According to the Pearson correlation coefficient formula, the correlation coefficients between each characteristic value and photovoltaic output power are calculated as shown in Table 2. It can be seen that irradiance has the strongest correlation with photovoltaic power generation, while ambient temperature and air pressure are positively correlated with photovoltaic power generation, while air humidity is negatively correlated with photovoltaic power generation.
[0082] Table 2 Correlation coefficients between eigenvalues
[0083]
[0084]
[0085] Step 2: Use VMD to extract signal features from photovoltaic time series data to obtain components with strong stability and different frequencies, and use the CNN-BiGRU-Attention model to predict each component once;
[0086] The steps of VMD method to decompose the original time series data are as follows:
[0087] (1) Assume that the photovoltaic power signal is:
[0088]
[0089] In the formula, u k (t) represents the decomposed IMF vector, K represents the preset number of decompositions, A k (t) is u k The amplitude of (t), for u k (t) phase angle, each IMF component has a corresponding center frequency;
[0090] (2) The original signal u k Decompose into K finite bandwidth modal functions, and obtain the one-sided spectrum of each modal function through Hilbert transform:
[0091]
[0092] Where, δ(t) is the pulse signal of each sub-mode;
[0093] (3) Compare the obtained unilateral spectrum of each mode with the estimated center frequency Multiply them together to transfer the spectrum of each mode to the corresponding baseband:
[0094]
[0095] (4) VMD uses the original signal sequence and the sum of each mode as constraints. The constraints are as follows:
[0096]
[0097] In the formula, {u k} is the set of PV power intrinsic mode classifications at time t, {w k} is the set of center frequencies relative to the eigenmode; f(t) is the original signal;
[0098] CNN Model
[0099] The CNN model maps input data to a high-dimensional space through local perception and weight sharing, and efficiently extracts key features of the input data. The convolution layer extracts input data features through convolution kernels with shared weights, and uses activation functions to perform nonlinear mapping on neurons. The pooling layer reduces the dimensionality of features obtained by the convolution operation through maximum pooling or mean pooling methods, compresses the number of features, and reduces the risk of overfitting. The fully connected layer consists of a fully connected neural network, which is used to flatten and integrate the features extracted by the convolution layer and the pooling layer.
[0100] BiGRU neural network model
[0101] BiGRU is a special variant of GRU, which consists of two layers of GRU models with the same output but opposite information transmission directions;
[0102] The parameter calculation of the GRU model can be expressed as:
[0103]
[0104] Where: X t is the input of the GRU model at time t; δ and tanh are the sigmoid and hyperbolic tangent activation functions respectively; is a candidate hidden state, given by the input X t and the hidden layer output h at the previous moment t-1 Calculated; h t is the hidden layer output; W c , W g , W are the weight matrices of the reset gate, update gate and candidate hidden state respectively; c t is the reset gate of GRU, indicating the input X at time t t and the hidden layer output h at the previous moment t-1 Hidden state for candidates The impact of t is the GRU update gate, indicating the hidden layer output h at the previous moment t-1 For the hidden layer output h at time t t The size of the effect;
[0105] According to the above GRU model, set the positive and negative sequence GRU layers to construct the BiGRU model. is the positive sequence GRU model output at time t, is the negative sequence GRU model output at time t;
[0106] The BiGRU model hidden layer output vector h t As input, the weight matrix is calculated according to the Attention weight distribution principle. The specific calculation steps are as follows:
[0107] (1) The hidden layer state vector h of the BiGRU model at the current time t t =[h 1,t ,h 2,t ,…h k,t ], where k is the length of the input sequence time window, and the temporal attention weight vector l corresponding to each historical moment at the current moment t t for
[20] :
[0108] l t =RELU(W d +b d ) (7)
[0109] Where: l t =[l 1,t ,l 2,t ,…,l k,t]; W d is the trainable weight matrix; b d is the bias vector; RELU(·) represents the activation function, which is used to increase feature differences and make the weight distribution more concentrated;
[0110] (2) The attention weight is normalized by the softmax function to obtain the normalized weight coefficient β τ,t =[β 1,t ,β 2,t ,…,β τ,t ,…,β k,t ], where β τ,t is the attention weight value at the τth moment, which is weighted with the hidden layer state at each corresponding historical moment to obtain the comprehensive time series information state h t '.
[0111]
[0112] Step 3: Use VMD-SSA-LSSVM to make a second prediction of the error sequence and correct the result of the first prediction;
[0113] The LSSVM network realizes the function of online error correction. The prediction model is divided into six layers. The network structure and parameters of each layer are as follows:
[0114] (1) The input layer inputs the photovoltaic output component and meteorological data of length T into the prediction model after preprocessing and correlation analysis;
[0115] (2) The CNN layer consists of a one-dimensional convolution layer, a one-dimensional pooling layer, and a fully connected layer, which are used to extract key features of the input data. The convolution layer uses the tanh function as the activation function, and the pooling layer uses the maximum pooling method. After the input data is processed by the convolution layer and the pooling layer for dimensionality reduction, the spatial feature vector is extracted through the fully connected layer as the input of the BiGRU model. The fully connected layer uses the sigmoid function as the activation function.
[0116] (3) The BiGRU layer uses the RELU function as the activation function to build a single-layer BiGRU network, learn the internal connection and temporal change rules of the local features extracted by CNN, and predict the data at future moments;
[0117] (4) The attention layer is used to process the output vector of the BiGRU hidden layer. By calculating the weights corresponding to different hidden layer vectors, the optimal weight matrix is determined to effectively mine the deep temporal correlation between features.
[0118] (5) The output layer selects the sigmoid function as the activation function and calculates the final prediction result based on the output of the attention layer;
[0119] (6) The error correction layer uses the VMD-SSA-LSSVM network as the online error correction model.
[0120] Case Analysis
[0121] The ultra-short-term photovoltaic power prediction model was constructed using MATLAB, and the measured data of a photovoltaic station was used for simulation experiments. The power generation data and meteorological data of the photovoltaic station from January 1 to December 31, 2017 were used as an example to verify the effectiveness of the model and method proposed in this paper. The first 70% of the data set in each season was used as the training set, and the last 30% was used as the test set. Since the photovoltaic output is zero at night, this paper selects the data from 07:00 to 19:00 every day for simulation, with a sampling interval of 15 minutes. The photovoltaic power samples obtained are as follows Figure 5 The neural network model uses MAE as the loss function and uses the Adam optimizer for optimization. The parameters are obtained through grid search. The epoch is 50, the initial learning rate is 0.001, and it decays to 90% of the previous rate every 10 epochs. The batch size is 32.
[0122] Error indicators
[0123] The mean absolute error (MAE), root mean square error (RMSE) and coefficient of determination (R 2 ) is used as the main evaluation index to characterize the prediction accuracy of the model. MAE, RMSE and R 2 The calculation formula is as follows.
[0124]
[0125]
[0126] In the formula, p i 、p' i and are the actual value, predicted value and average value of the predicted value of photovoltaic power.
[0127] Analysis of ultra-short-term photovoltaic power prediction results
[0128] VMD decomposition effect
[0129] VMD decomposition requires setting the number of decomposition modes in advance. If the number of decompositions is too large, it will lead to over-decomposition and generate additional noise. If the number of decompositions is too small, it will lead to insufficient modal decomposition. Too many or too few will affect the prediction accuracy. The main basis for distinguishing whether it is over-decomposition is whether the center frequencies of each modal component are close, but there is currently no unified standard for judging whether the center frequencies are close. To this end, this paper calculates the reconstruction error of a series of K values with close center frequencies and the original sequence, and selects the appropriate K value by comparing the reconstruction error. The center frequencies of each component v when K takes different values are shown in Table 3. As K increases, the difference in the center frequencies of each component gradually decreases. When K = 6 and 7, the difference in the center frequencies of components v1 and v2 is small. According to the center frequency, K = 5, 6, and 7 are selected to decompose the IMF1 component. The reconstruction error of the VMD decomposition component under different K values is compared to select the optimal modal decomposition number. It can be seen that when K = 6 is selected, the VMD method used in this paper can greatly reduce the decomposition noise and effectively improve the prediction accuracy of the VMD-CNN-BiGRU-Attention prediction model for complex sequences. The decomposition results are shown in Table 3. Figure 6 shown.
[0130] Table 3 Center frequencies corresponding to different modal decomposition numbers K
[0131]
[0132]
[0133] Analysis of ultra-short-term photovoltaic power prediction results
[0134] In order to verify the superior performance of the VMD-CNN-BiGRU-Attention model proposed in this paper in improving the accuracy of photovoltaic power prediction, VMD-CNN-GRU-Attention, VMD-CNN-LSTM-Attention and VMD-CNN-BiLSTM-Attention were constructed as comparison models. The results are shown in the figure. Figure 7 The data from 07:00 to 19:00 on typical days in different seasons were selected for analysis.
[0135] Depend on Figure 7It can be seen that the prediction results of the VMD-CNN-BiGRU-Attention model can better fit the real value. Due to the strong volatility and randomness of photovoltaic output, it is difficult to capture its complex nonlinear relationship by directly predicting photovoltaic power. Therefore, the traditional VMD-CNN-LSTM-Attention prediction results have a poor fit with the real value. This is because the LSTM model is a unidirectional structure and cannot capture the bidirectional time series characteristics, resulting in low prediction accuracy. The VMD-CNN-BiLSTM-Attention takes into account the inadequacy of the prediction model in capturing bidirectional information. Although the prediction accuracy is higher than that of the unidirectional prediction model, the calculation is complex and the generalization ability is poor. The VMD-CNN-GRU-Attention prediction model has a better fit with the real value than the VMD-CNN-LSTM-Attention and VMD-CNN-BiLSTM-Attention models. The VMD-CNN-BiGRU-Attention prediction model can greatly improve the prediction accuracy and has the best fitting effect. The above model comparison experiments effectively verify the accuracy and effectiveness of the VMD-CNN-BiLSTM-Attention prediction model proposed in this paper.
[0136] As shown in Table 4, VMD-CNN-LSTM-Attention has the lowest prediction accuracy. Although LSTM performs well in processing long-term dependencies, it has a high computational complexity. Compared with the model in this paper, the MAE of this model is 3.251 higher, the RMSE is 5.879 higher, and the R 2 The GRU may be more efficient in computation, but it may be insufficient in capturing bidirectional information. Compared with the model in this paper, the MAE of this model is 2.543 higher, the RMSE is 3.797 higher, and the R 2 The bidirectionality of BiGRU may help better capture the bidirectional dependency of photovoltaic power, thereby improving the prediction accuracy. Since BiLSTM has more gates and internal states, its parameters are usually more than BiGRU, which leads to BiLSTM being more prone to overfitting under the same data set and training conditions, while BiGRU has better generalization ability due to fewer parameters. It can be concluded from Table 4 that the MAE of this model is 2.687 higher, the RMSE is 4.346 higher, and the R 2 0.45 lower.
[0137] By combining VMD, CNN, BiGRU and Attention mechanism, the model in this paper can comprehensively consider the temporal and spatial correlation, effectively extract the key features in the input data, and capture the bidirectional dependency of photovoltaic power, thereby achieving more accurate prediction. Through the above example analysis, the superior performance of the VMD-CNN-BiGRU-Attention model in improving the accuracy of photovoltaic power prediction is verified, and compared with the three comparison models, it performs well in prediction accuracy and has higher accuracy and adaptability.
[0138] Table 4 Comparison of prediction accuracy of each model
[0139]
[0140] Comparison of Error Correction Methods
[0141] By constructing the VMD-SSA-LSSVM error correction model, the prediction error at the current moment is predicted with the preliminary prediction results, historical errors, and related meteorological data as inputs. The preliminary prediction results are corrected according to the prediction error output by the VMD-SSA-LSSVM error prediction model to obtain the final prediction result. When new real-time data arrives, the prediction model and error prediction model are updated using these data to adapt to the real-time changes in the power output of the photovoltaic power station. This section uses the prediction results of the VMD-CNN-BiGRU-Attention model for experiments, and verifies the effectiveness of the VMD-SSA-LSSVM online error correction model by comparing it with LSSVM, SSA-LSSVM, and VMD-LSSVM. The mean absolute error, root mean square error, and mean absolute percentage error (MAPE) are selected as the main evaluation indicators to characterize the prediction accuracy of the model.
[0142]
[0143] In the formula, p i 、p' i and are the actual value, predicted value and average value of the predicted value of photovoltaic power.
[0144] As shown in Table 5, the prediction curve of the proposed VMD-SSA-LSSVM error correction model is closer to the true value curve than other methods. And the MAE, RMSE, and MAPE values are also small, which are 0.013, 0.020, and 0.136% respectively, which are 0.422, 0.782, and 5.601% lower than the single model LSSVM. This is because VMD enables the model to decompose the original time series data into multiple IMFs, each IMF represents a specific frequency component of the signal, which helps to extract more detailed and accurate signal features and provide more valuable information for subsequent predictions. The VMD decomposition results are shown in Figure 5. Figure 8 As shown. Compared with the SSA-LSSVM model, the error correction model selected in this paper reduces the error by 0.082, 0.456, and 3.570%. In addition, SSA can further decompose and analyze each IMF to extract more detailed signal components and features. The effectiveness of SSA is verified by comparing with the VMD-LSSVM model. The error correction model selected in this paper reduces the error by 0.118, 0.158, and 1.135%, respectively. LSSVM uses the features extracted by VMD and SSA as input to learn the relationship between these features and the target variable. The input features are more precise and detailed, and a more accurate prediction model can be established. This combination enables the model to more accurately capture the intrinsic structure and changing trend of the signal, thereby improving the prediction accuracy.
[0145] Table 5 Comparison of prediction accuracy of various error correction models
[0146]
[0147]
[0148] Although the present invention has been described above with reference to the embodiments, various modifications may be made thereto and parts thereof may be replaced by equivalents without departing from the scope of the present invention. In particular, as long as there is no structural conflict, the various features in the embodiments disclosed in the present invention may be used in combination with each other in any manner, and the fact that these combinations are not exhaustively described in this specification is only for the sake of omitting space and saving resources. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. Photovoltaic ultra-short-term power prediction and correction method with multiple environmental factors and seasonal differences, characterized by: The steps include: Step 1: Conduct correlation analysis to screen out the main environmental factors that affect photovoltaic power; It is necessary to select appropriate photovoltaic data features for correlation analysis. In the field of natural science, the Pearson correlation coefficient r is widely used to measure the degree of correlation between two variables. Its value is between -1 and 1. The expression of the Pearson correlation coefficient is: Where: r x1y is the correlation coefficient between the eigenvalue x1 and the predicted power y1; 1,i is the i-th historical data of the characteristic value; y1 is the i-th predicted power value; are the average values of eigenvalue and prediction power respectively; n is the number of predictions; When the calculated result is a positive value, it means that the feature is positively correlated with the predicted power. The larger the value, the higher the degree of linear correlation. Step 2: Use VMD to extract signal features from photovoltaic time series data to obtain components with strong stability and different frequencies, and use the CNN-BiGRU-Attention model to predict each component once; The steps of VMD method to decompose the original time series data are as follows: (1) Assume that the photovoltaic power signal is: In the formula, u k (t) represents the decomposed IMF vector, K represents the preset number of decompositions, A k (t) is u k The amplitude of (t), for u k (t) phase angle, each IMF component has a corresponding center frequency; (2) The original signal u k Decompose into K finite bandwidth modal functions, and obtain the one-sided spectrum of each modal function through Hilbert transform: Where, δ(t) is the pulse signal of each sub-mode; (3) Compare the obtained unilateral spectrum of each mode with the estimated center frequency Multiply them together to transfer the spectrum of each mode to the corresponding baseband: (4) VMD uses the original signal sequence and the sum of each mode as constraints. The constraints are as follows: In the formula, {u k } is the set of PV power intrinsic mode classifications at time t, {w k } is the set of center frequencies relative to the eigenmode; f(t) is the original signal; CNN Model The CNN model maps input data to a high-dimensional space through local perception and weight sharing, and efficiently extracts key features of the input data; The convolution layer extracts input data features through convolution kernels with shared weights and uses activation functions to perform nonlinear mapping on neurons. The pooling layer reduces the dimension of features obtained by the convolution operation through the maximum pooling or mean pooling method, compresses the number of features, and reduces the risk of overfitting. The fully connected layer is composed of a fully connected neural network, which is used to flatten and integrate the features extracted by the convolution layer and the pooling layer. BiGRU neural network model BiGRU is a special variant of GRU, which consists of two layers of GRU models with the same output but opposite information transmission directions; The parameter calculation of the GRU model can be expressed as: Where: X t is the input of the GRU model at time t; δ and tanh are the sigmoid and hyperbolic tangent activation functions respectively; is a candidate hidden state, given by the input X t and the hidden layer output h at the previous moment t-1 Calculated; h t is the hidden layer output; W c , W g , W are the weight matrices of the reset gate, update gate and candidate hidden state respectively; c t is the reset gate of GRU, indicating the input X at time t t and the hidden layer output h at the previous moment t-1 Hidden state for candidates The impact of t is the GRU update gate, indicating the hidden layer output h at the previous moment t-1 For the hidden layer output h at time t t The size of the effect; According to the above GRU model, set the positive and negative sequence GRU layers to construct the BiGRU model. is the positive sequence GRU model output at time t, is the negative sequence GRU model output at time t; The BiGRU model hidden layer output vector h t As input, the weight matrix is calculated according to the Attention weight distribution principle. The specific calculation steps are as follows: (1) The hidden layer state vector h of the BiGRU model at the current time t t =[h 1,t ,h 2,t ,…h k,t ], where k is the length of the input sequence time window, and the temporal attention weight vector l corresponding to each historical moment at the current moment t t for [20] : l t =RELU(IN d +b d ) (7) Where: l t =[l 1,t ,l 2,t ,…,l k,t ]; W d is the trainable weight matrix; b d is the bias vector; RELU(·) represents the activation function, which is used to increase feature differences and make the weight distribution more concentrated; (2) The attention weight is normalized by the softmax function to obtain the normalized weight coefficient β τ,t =[β 1,t ,β 2,t ,…,β τ,t ,…,β k,t ], where β τ,t is the attention weight value at the τth moment, which is weighted with the hidden layer state at each corresponding historical moment to obtain the comprehensive time series information state h t '. Step 3: Use VMD-SSA-LSSVM to make a second prediction of the error sequence and correct the result of the first prediction; The LSSVM network realizes the function of online error correction. The prediction model is divided into six layers. The network structure and parameters of each layer are as follows: (1) The input layer inputs the photovoltaic output component and meteorological data of length T into the prediction model after preprocessing and correlation analysis; (2) The CNN layer consists of a one-dimensional convolution layer, a one-dimensional pooling layer, and a fully connected layer, which are used to extract key features of the input data. The convolution layer uses the tanh function as the activation function, and the pooling layer uses the maximum pooling method. After the input data is processed by the convolution layer and the pooling layer for dimensionality reduction, the spatial feature vector is extracted through the fully connected layer as the input of the BiGRU model. The fully connected layer uses the sigmoid function as the activation function. (3) The BiGRU layer uses the RELU function as the activation function to build a single-layer BiGRU network, learn the internal connection and temporal change rules of the local features extracted by CNN, and predict the data at future moments; (4) The attention layer is used to process the output vector of the BiGRU hidden layer. By calculating the weights corresponding to different hidden layer vectors, the optimal weight matrix is determined to effectively mine the deep temporal correlation between features. (5) The output layer selects the sigmoid function as the activation function and calculates the final prediction result based on the output of the attention layer; (6) The error correction layer uses the VMD-SSA-LSSVM network as the online error correction model.
2. The photovoltaic ultra-short-term power prediction and correction method based on multiple environmental factors and seasonal differences according to claim 1 is characterized by: In step 1, the photovoltaic data characteristics include radiation, temperature, air pressure, humidity, and actual power generation of the photovoltaic field, and the sampling time interval is 15 minutes.
Citation Information
Cited By
New energy power generation prediction model optimization method and system based on artificial intelligence
CN120497920A
Photovoltaic power generation power prediction method and device
CN120527912A
Wind power plant shutdown and energy storage cooperative operation optimization method under multiple uncertain factors
CN121072897A