Short-term photovoltaic power generation power combined prediction method based on NGBoost and BiLSTM

By combining NGBoost and BiLSTM models in photovoltaic power prediction and using VMD decomposition and optimal weight combination method, the problem of low prediction accuracy in the prior art is solved, and a higher prediction accuracy of photovoltaic power generation is achieved.

CN119518677APending Publication Date: 2025-02-25CHINA THREE GORGES UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411243405.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

When calculating the combined weights of the existing photovoltaic power generation prediction methods, it is easy to have problems such that the weight is too large to one model and the other model is almost 0, resulting in low prediction accuracy.

Method used

The power combination prediction method of short-term photovoltaic power generation based on NGBoost and BiLSTM was used to analyze the correlation between photovoltaic output and meteorological factors through Pearson correlation coefficient and fuzzy C-mean clustering, and combined with VMD decomposition, reduce the power sequence complexity, and pass the optimal weight combination method Solve the weight allocation problem of model prediction results.

Benefits of technology

The short-term prediction accuracy of photovoltaic power generation is improved, the problem of large weight of a single model is avoided, and the prediction ability of the combined model is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119518677A_ABST
    Figure CN119518677A_ABST
Patent Text Reader

Abstract

The invention discloses a short-term photovoltaic power generation power combined prediction method based on NGBoost and BiLSTM, and the method comprises the following steps: analyzing the correlation between photovoltaic output and meteorological factors through employing a Pearson correlation coefficient, and constructing an NGBoost prediction model in combination with a fuzzy C-means clustering algorithm; constructing a prediction model based on a BiLSTM network in combination with a VMD method, decomposing historical power by using VMD, respectively predicting sub-components through the BiLSTM network, and reconstructing sub-component prediction results to obtain a power prediction result; the method comprises the following steps: calculating an extreme deviation (Prediction at Risk, PaR) in a historical prediction result, taking the extreme deviation as a weighting basis of an optimal weight combination method, and carrying out linear combination on a prediction result of an NGBoost prediction model and a prediction result of a BiLSTM network by using the optimal weight combination method to obtain a final power prediction value. According to the method, the complexity of a power sequence is reduced by using VMD decomposition, and the prediction accuracy of the BiLSTM is improved; the weight distribution problem of the prediction results of the two models is solved by adopting an optimal weight combination method, and the short-term prediction precision of the photovoltaic power generation power is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of photovoltaic power generation prediction in an electric power system, and in particular to a combined prediction method for short-term photovoltaic power generation based on NGBoost and BiLSTM. Background Art

[0002] The penetration rate of photovoltaic power output in my country's power grid has also increased year by year. Photovoltaic output is closely related to meteorological factors. Due to the high uncertainty of meteorological factors, large-scale photovoltaic grid connection will bring huge disturbance factors to the power system, which will inevitably have an adverse impact on the stability, reliability and economy of the power system. Accurate photovoltaic output forecasting is considered to be an effective solution. High-precision photovoltaic power generation forecasting can provide effective guidance for the dispatching and operation of the power grid and improve the stable operation of the power system. Therefore, it is of great significance to improve the accuracy of photovoltaic power generation prediction.

[0003] At present, prediction methods can be divided into physical methods, statistical methods, meta-heuristic learning methods and combination methods. Among them, the physical method mainly relies on weather forecasts to obtain meteorological data such as solar radiation intensity, relative humidity, and temperature, and directly calculates the photovoltaic power generation output by establishing a physical model. However, the physical model is easily affected by meteorological factors. The statistical method is based on analyzing the correlation between historical data such as solar radiation and photovoltaic output, establishing a correlation model between input and output, and realizing the prediction of future photovoltaic output. Compared with the physical method, the statistical method is simple to model, but it requires a large amount of historical data to establish a mapping model, which increases the difficulty of data processing. Meta-heuristic learning methods and combination methods are currently hot research. Meta-heuristic learning methods use machine learning and deep learning to express the characteristics of sample data, so as to obtain accurate photovoltaic output prediction results. The combination method is to combine different single models, complement the performance of different models, give full play to the advantages of different models, and obtain higher prediction accuracy. Therefore, the combination model can fully explore the potential correlation between data and make up for the shortcomings of a single model. However, in most studies, the combination models use overall error information such as mean square error or numerical error as the basis for weight calculation when calculating the combination weight. This may result in the phenomenon that the weight of one model is too large and the weight of the other model is almost 0, which is not the optimal choice. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a short-term photovoltaic power generation power combination prediction method based on Natural Gradient Boosting (NGBoost) and Bidirectional Long Short-term Memory (BiLSTM). The method establishes a similar day clustering model to concentrate similar features, highlight feature rules, and improve the prediction accuracy of the NGBoost model; VMD decomposition is used to effectively reduce the complexity of the original power sequence and improve the prediction accuracy of BiLSTM; the optimal weight combination method is used to effectively solve the weight allocation problem of the prediction results of the two models, thereby improving the short-term prediction accuracy of photovoltaic power generation.

[0005] The technical solution adopted by the present invention is:

[0006] The short-term photovoltaic power generation combined prediction method based on NGBoost and BiLSTM includes the following steps:

[0007] Step 1: Use the Pearson correlation coefficient to analyze the correlation between photovoltaic output and meteorological factors, and build an NGBoost prediction model based on the fuzzy C-means clustering algorithm;

[0008] Step 2: Combine the VMD method to build a prediction model based on the BiLSTM network, use VMD to decompose the historical power, use the BiLSTM network to predict the sub-components respectively, and reconstruct the sub-component prediction results to obtain the power prediction results;

[0009] Step 3: By calculating the extreme deviation (Prediction at Risk, PaR) in the historical prediction results and taking the extreme deviation as the weighting basis of the optimal weight combination method, the prediction results of the NGBoost prediction model and the prediction results of the BiLSTM network are linearly combined using the optimal weight combination method to obtain the final power prediction value.

[0010] In step 1, the specific calculation of the Pearson correlation coefficient is as follows:

[0011]

[0012] In formula (1), r represents the correlation coefficient; x i Indicates meteorological factors, such as light intensity, temperature, humidity, wind speed, etc.; i Represents photovoltaic power generation; represents the mean value of meteorological factors; represents the mean value of photovoltaic power generation; n represents the number of meteorological factor calculation data.

[0013] In step 1, the minimization objective function of the fuzzy C-means clustering algorithm is as follows:

[0014]

[0015] In formula (2), m is the number of clusters; i, j are class labels; u ij Represents sample x j Membership degree of class j; ||x i -c j || 2 is the distance from the sample to the cluster center; c j represents the jth cluster center; U is the membership matrix; V is the cluster center; N represents the total number of samples; C represents the number of clusters.

[0016] FCM is a continuous iterative calculation of the membership u ij and cluster center c j The process specifically includes the following steps:

[0017] (1). Initialize the membership matrix U = [u ij ], the initial membership matrix is ​​U (0) , the membership degree satisfies Start iteration.

[0018] (2). Calculate the cluster center c of step K (k) =[c j ];

[0019]

[0020] In formula (3): represents the membership of sample i to class j; m is the membership factor, which represents the importance of belonging to a certain class; N represents the number of samples; I represents the Ith sample; and c represents the cth cluster center.

[0021] (3). Update the membership matrix U (k) ;

[0022]

[0023] In formula (4), k represents the kth sample; c k represents the kth cluster center.

[0024] (4) Given a membership termination threshold ε, threshold ε>0, if ||U (k+1) -U (k) ||<ε,U (k+1) represents the k+1th membership matrix. Then the iteration is terminated, otherwise return to step (2).

[0025] In step 1, the NGBoost prediction model includes a gradient boosting algorithm for solving the probability regression problem. Different from the general gradient boosting algorithm, the NGBoost prediction model is used to estimate the parameter P of the probability distribution. θ (y|x), where x is the feature variable of the input model, y is the target variable, and θ is the parameter vector of the distribution. The NGBoost prediction model mainly includes the basic learner f (m) , parameter probability distribution P θ (y|x) and the scoring rule S(P θ |y) Three modules, each module is independent of each other and can be flexibly integrated according to different situations.

[0026] Through the gradient boosting method, each round of boosting uses the probability distribution parameter θ to be fitted, the prediction result y and the scoring rule S to generate a natural gradient As shown in formula (5):

[0027]

[0028] In formula (5): represents the model parameters of the i-th sample after the m-1th iteration; y i Represents the true output value of the i-th sample; Represents the inverse of the loss function with respect to the model parameters θ; Indicates that after the m-1th iteration, the model parameters are used For the i-th sample y i Model output for making predictions; Represents the gradient of parameter θ. m is the number of times the NGBoost model is promoted, i is the dimension of the probability distribution parameter, and the evaluation results of each parameter are calculated separately. By taking their total differentials, the natural gradient of the probability distribution parameter promoted for the mth time is obtained. This gradient measures the change in probability distribution based on KL divergence. It is obtained by calculating the expected value of the ratio of the logarithmic probability (i.e., the original difference in probability values) of the values ​​of x sampled from one distribution or another. It is more suitable for representing the rate of change in probability prediction than the gradient based on Euclidean distance.

[0029] As shown in formula (6), the selected basic learner is then used to construct the function f of feature x and natural gradient g (m) . Combined with the scoring rule S, the scaling factor ρ for this round of gradient boosting is finally generated (m) , as shown in formula (7), using the scaling factor ρ from the previous round (m-1) Scale the natural gradient and add it to the probability distribution parameter to get the improved probability distribution parameter Then, take the scaling factor that minimizes the cumulative sum of the evaluation results of all parameters, and finally get the scaling factor ρ for this improvement (m) .

[0030]

[0031] In the above formula: represents the natural gradient of the i-th sample in the m-th iteration; x i represents the feature vector of the i-th sample; n represents the number of samples; Represents the dataset used to train the model in the mth iteration, which contains the features x of each sample i and the corresponding natural gradient

[0032] As shown in formula (7), the role of the scaling factor ρ is to normalize the natural gradient and then multiply it by the learning rate η. Finally, the parameter θ of the probability distribution is continuously improved in this way, and the cycle continues until the prediction result meets the scoring rule or reaches the maximum number of iterations.

[0033]

[0034] In the above formula: (ρ (m) ·f (m) (x i )) means that in the mth iteration, the feature vector x of the i-th sample i Amount to adjust the base learner outputs when making predictions.

[0035] In step 2, the VMD algorithm includes the following steps:

[0036] S2.1: Perform Hilbert transform on the initial signal to obtain the analytical signals of k modal components and the single-sided spectrum:

[0037]

[0038] Where: δ(t) is the impulse function; u k (t) represents each mode function; t represents the time variable.

[0039] S2.2: Each mode u k The spectrum of (t) is modulated to the baseband, and we get:

[0040]

[0041] Where: k represents the center frequency; Represents the phasor description of the center frequency on the complex plane.

[0042] S2.3: Estimate the bandwidth of each modal signal by the Gaussian smoothness of the demodulated signal and construct the variational problem as follows:

[0043]

[0044] Where: {u 1}={u 1 ,…,u k}, represents the kth mode; {ω k}={ω 1 ,···,ω k}, indicating u k The kth center frequency of The analytic signal representing the source signal.

[0045] S2.4: The above constraints are transformed into unconstrained variational problems. The quadratic penalty factor α and the Lagrangian multiplication operator λ are introduced in equation (12). The extended Lagrangian expression is:

[0046]

[0047] Where: L({u k},{ω k},λ) represents the Lagrangian expression of the unconstrained variational problem; f(t) represents the original signal; K represents the number of modal components; It means to find the partial derivative of the source signal and the analytical signal.

[0048] S2.5: Use the multiplication operator alternating direction method to solve and update u 1 and ω k :

[0049]

[0050] Where: and They are f(ω) and λ n Fourier transform of (ω); n is the number of iterations; express Fourier transform of ; ω represents random frequency; and Both represent center frequency.

[0051] In step 2, the BiLSTM network is composed of two LSTMs, which can simultaneously capture the feature sequence from the future moment to the current time node, thereby obtaining the information flow of the entire time domain. The specific calculation steps are as follows:

[0052] f t =σ(W f ·[ht-1 ,X t ]+b f ) (14)

[0053] i t =σ(W i ·[h t-1 ,X t ]+b i ) (15)

[0054]

[0055] O t =σ(W O ·[h t-1 ,X t ]+b O ) (18)

[0056] h t =O t ⊙tanh(C t ) (19)

[0057]

[0058] Where: f H For the forget gate, i t is the input gate, O t is the output gate, W f , W i , W C and W O is the weight matrix, b f , b i , b C and b O is the bias vector, σ is the Sigmoid activation function, tanh is the hyperbolic tangent activation function, is the candidate cell state, C t is the new memory cell state, h t is the output of the hidden layer, ⊙ is the multiplication of the corresponding points, LSTM represents the LSTM network function, represents the forward hidden layer state, represents the reverse hidden layer state, U t and V t are the output weights of the forward LSTM propagation unit and the reverse LSTM propagation unit, respectively, y is the bias vector of the output layer at the current moment;

[0059] X t represents the input feature vector at time step t; h t-1 represents the hidden state of the previous time step; [h t-1 ,Xt ] represents the concatenation of the hidden state of the previous time step and the current input; C t-1 represents the cell state at the previous time step; Represents the previous forward hidden layer state; Represents the reverse hidden layer state at the next time step.

[0060] In step 2, as in equations (9), (10), (11), (12) and (13), VMD is used to decompose the historical power, and the complex photovoltaic power sequence is decomposed into several relatively stable sub-components; as in equation (22), the sub-components are predicted respectively by the BiLSTM network. A BiLSTM prediction network is constructed for each sub-component, and the temperature, humidity, light intensity, scattering intensity, wind direction and each sub-component are used as input variables of the prediction network for model training, so as to obtain the prediction results of the sub-components. The prediction results of the sub-components are linearly reconstructed to obtain the final photovoltaic power, and the predicted values ​​of each sub-component are added to obtain the final photovoltaic output power.

[0061] In step 3, the specific calculation of extreme deviation (Prediction at Risk, PaR) includes the following steps:

[0062] S3.1: Calculate the prediction error vector of a single model as:

[0063] ε=(ε 1 ,ε 2 ,…,ε T ) (twenty three)

[0064] Where: ε 1 ,ε 2 ,…,ε T Represent the sample errors respectively.

[0065] S3.2: Sort the errors in the vector by their absolute values ​​to obtain:

[0066] β= β 1 ,β 2 ,…,β γ (twenty four)

[0067] Where: β 1 ,β 2 ,…,β γ Represent the absolute value of each sample error.

[0068] S3.3: Define that when the confidence is (1-α), PaR is the element of β located at the [αT]th element. Then:

[0069] PaR=β [αT] (25)

[0070] Where: α represents the confidence level; β represents the PaR value calculated under the confidence level (1-α).

[0071] In step 3, the optimal weight combination legal right includes the following steps:

[0072] S3.4: Find the deviation matrix E, that is:

[0073]

[0074] Where: e 1t The meaning of is the prediction error of the first prediction method at time t, that is, the prediction error of the BiLSTM network at time t, e 2t is the prediction error of the NGBoost model at time t; N represents the number of samples.

[0075] S3.5: Define constraints RK T =1,R=[1,1] T ; R represents the normalization factor, K T represents the weight vector.

[0076] S3.6: Use the Lagrangian method to find the minimum value under this constraint;

[0077]

[0078] Where: R T represents the transpose of matrix R; E -1 represents the inverse of the matrix E.

[0079] According to the above steps, we can get K = [ω 1 ,ω 2 ] is the combined model weight, ω 1 and ω 2 They respectively represent the weight of a single model in the combined model.

[0080] The output prediction result expression is:

[0081] y t =ω 1 y 1t +ω 2 y 2t (28)

[0082] Where: y t is the output prediction result of the combined model at time t; y 1t and 2t They are the output prediction results of BiLSTM network and NGBoost model at time t respectively;

[0083] The above weight determination process1t and e 2t is the numerical error between the actual value and the predicted value, which is replaced by PaR as the basis for weight determination.

[0084] The present invention provides a short-term photovoltaic power generation combined prediction method based on NGBoost and BiLSTM, and the beneficial effects are as follows:

[0085] 1) The present invention establishes an NGBoost model based on fuzzy C-means clustering, which can concentrate similar feature information, highlight feature rules, and help improve the prediction accuracy of the model.

[0086] 2) The VMD decomposition used in the present invention effectively reduces the prediction difficulty of the original power sequence and improves the prediction accuracy of the BiLSTM network.

[0087] 3) The present invention adopts the optimal weight combination method to effectively solve the weight allocation problem of the prediction results of the two models. Among them, PaR is used instead of the overall deviation as the basis for weight determination, which avoids the situation where the weight tends to 0 due to the large overall error of one model, and improves the prediction accuracy of the combined model to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:

[0089] Figure 1 This is a flow chart of the short-term photovoltaic power generation combination prediction method based on NGBoost and BiLSTM of the present invention.

[0090] Figure 2a This is the FCM sunny weather clustering result diagram of the present invention.

[0091] Figure 2b This is the FCM cloudy weather clustering result diagram of the present invention.

[0092] Figure 2c This is the FCM rainy weather clustering result diagram of the present invention.

[0093] Figure 3 This is a composition diagram of the NGBoost algorithm of the present invention.

[0094] Figure 4 This is a parameter configuration diagram of NGBoost of the present invention.

[0095] Figure 5 This is a diagram of the specific training process of NGBoost of the present invention.

[0096] Figure 6 This is the decomposition result diagram of VMD of the present invention.

[0097] Figure 7 This is a network structure diagram of the BiLSTM of the present invention.

[0098] Figure 8 This is a combined prediction flow chart of the present invention combining VMD and BiLSTM.

[0099] FIG9 (1) is a prediction result 1 of each model under sunny weather conditions of the present invention;

[0100] FIG9(2) is the second prediction result of each model under sunny weather conditions according to the present invention.

[0101] FIG9 (3) is a prediction result 1 of each model under cloudy weather of the present invention;

[0102] FIG9(4) is the second prediction result of each model under cloudy weather according to the present invention.

[0103] FIG9 (5) is a prediction result 1 of each model under rainy weather of the present invention;

[0104] FIG9 (6) is the second prediction result of each model under rainy weather of the present invention. DETAILED DESCRIPTION

[0105] A short-term photovoltaic power generation power combination prediction method based on Natural Gradient Boosting (NGBoost) and Bidirectional Long Short-term Memory (BiLSTM) neural network was proposed. First, the NGBoost model was constructed by combining the similar day clustering theory. Secondly, the variational mode decomposition (VMD) method was used to build a prediction model based on the BiLSTM network. The historical power was decomposed using VMD, and the sub-components were predicted separately through the BiLSTM network. The sub-component prediction results were reconstructed to obtain the power prediction results. Finally, the prediction results of the NGBoost model and the prediction results of the BiLSTM network were linearly combined using the optimal weight combination method to obtain the final power prediction value.

[0106] Referring to the accompanying drawings in the embodiments, the present invention provides a technical solution: a short-term photovoltaic power generation combined prediction method based on NGBoost and BiLSTM, comprising the following steps:

[0107] S1: The Pearson correlation coefficient is used to analyze the correlation between photovoltaic output and meteorological factors, which mainly include temperature, relative humidity, light intensity, scattering intensity, wind speed and wind direction. The Pearson correlation coefficients of the two are calculated as shown in Table 1.

[0108] Table 1 Pearson correlation coefficient between photovoltaic output and meteorological factors

[0109]

[0110] The NGBoost prediction model is constructed by combining the fuzzy C-means clustering algorithm;

[0111] Preferably, in S1, the specific calculation of the Pearson correlation coefficient is as follows:

[0112]

[0113] Preferably, through the Pearson correlation coefficient analysis shown in Table 1, it can be seen that temperature, relative humidity, light intensity, scattering intensity and wind direction have a certain correlation with the original photovoltaic sequence and can be used as input features for regression analysis.

[0114] Preferably, in S1, the minimization objective function of the fuzzy C-means clustering algorithm is as follows:

[0115]

[0116] Where: m is the number of clusters; i, j are class labels; u ij Represents sample x j Membership degree of class j; ||x i -c j || 2 is the distance from the sample to the cluster center; U is the membership matrix; V is the cluster center. FCM is an iterative calculation of the membership u ij and cluster center c j The specific steps are as follows:

[0117] (1) Initialize the membership matrix U = [u ij ], the initial membership matrix is ​​U (0) , the membership degree satisfies Start iteration.

[0118] (2) Calculate the cluster center c of the Kth step (k) =[c j ];

[0119]

[0120] (3) Update the membership matrix U (k) ;

[0121]

[0122] (4) Given a membership termination threshold ε, threshold ε>0, if ||U (k+1) -U (k) ||<ε, terminate the iteration, otherwise return to step 2).

[0123] Preferably, the optimal membership matrix U and cluster center V can be obtained through the calculation steps of FCM, and the category to which the sample belongs can be determined based on U. In the clustering process, the mean, standard deviation, coefficient of variation, kurtosis, skewness and other variables of light intensity, temperature, relative humidity, scattering intensity and wind direction are used as clustering indicators. Figure 2a , Figure 2b and Figure 2c As shown in the figure, all historical data are clustered into three weather types: sunny, cloudy and rainy. The model is trained using similar day samples to predict the same weather as the similar day sample set. The sample set with the same weather conditions as the predicted day is selected to train the model for prediction, fully considering the impact of weather factors on the prediction results, and taking temperature, humidity, light intensity, scattering intensity and wind direction as the input parameters of the model.

[0124] Preferably, in S1, the NGBoost is a gradient boosting algorithm for solving the probability regression problem. Different from the general gradient boosting algorithm, the NGBoost algorithm aims to estimate the parameter P of the probability distribution. θ (y|x), where x is the feature variable of the input model, y is the target variable, and θ is the parameter vector of the distribution. Figure 3 As shown, the algorithm itself mainly includes the basic learner f (m) , parameter probability distribution P θ (y|x) and the scoring rule S(P θ |y) Three modules, each module is independent of each other.

[0125] Through the gradient boosting method, in each round of boosting, the probability distribution parameter θ to be fitted, the prediction result y and the scoring rule S are used to generate the natural gradient g, as shown in formula (5).

[0126]

[0127] In formula (5), m is the number of times the NGBoost model is promoted, i is the dimension of the probability distribution parameter, and the evaluation results of each parameter are calculated separately. By taking their total differentials, the natural gradient of the probability distribution parameter promoted for the mth time is obtained: This gradient measures the change in probability distribution based on KL divergence. It is obtained by calculating the expected value of the ratio of the logarithmic probability (i.e., the original difference in probability values) of the values ​​of x sampled from one distribution or another. It is more suitable for representing the rate of change in probability prediction than the gradient based on Euclidean distance.

[0128] As shown in formula (6), the selected basic learner is then used to construct the function f of feature x and natural gradient g (m) . Combined with the scoring rule S, the scaling factor ρ for this round of gradient boosting is finally generated (m) , as in formula (7), using the scaling factor ρ from the previous round(m-1) Scale the natural gradient and add it to the probability distribution parameter to get the improved probability distribution parameter Then take the scaling factor that minimizes the cumulative sum of the evaluation results of all parameters, and finally get the scaling factor ρ for this improvement (m) .

[0129]

[0130] As shown in formula (8), the role of the scaling factor ρ is to normalize the natural gradient and then multiply it by the learning rate η. Finally, the parameter θ of the probability distribution is continuously improved in this way, and the cycle continues until the prediction result meets the evaluation rule or reaches the maximum number of iterations.

[0131]

[0132] The weak learners in the NGBoost model usually use decision trees as base learners to fit the residuals in each step of the boosting process. In the probability distribution module, NGBoost can be used with any distribution with continuous parameters that are estimated by natural gradient descent to predict the conditional probability distribution. The scoring rules are mainly used to guide the training of the model to optimize the predicted distribution. For the specific parameter configuration of NGBoost, refer to Figure 4 As shown. If a training set is given The specific training process of NGBoost refers to Figure 5 shown.

[0133] S2: Combine the VMD method to build a prediction model based on the BiLSTM network, use VMD to decompose the historical power, use the BiLSTM network to predict the sub-components respectively, and reconstruct the sub-component prediction results to obtain the power prediction results;

[0134] Preferably, in S2, the specific steps of the VMD algorithm are as follows:

[0135] (1) Perform Hilbert transform on the initial signal to obtain the analytical signals of k modal components and the single-sided spectrum:

[0136]

[0137] Where: δ(t) is the impulse function.

[0138] (2) Each mode u k The spectrum of (t) is modulated to the baseband and we get:

[0139]

[0140] (3) By using the Gaussian smoothness of the demodulated signal, the bandwidth of each modal signal is estimated and the variational problem is constructed as follows:

[0141]

[0142] Where: {u 1}={u 1 ,…,u k}, represents the kth mode; {ω k}={ω 1 ,···,ω k}, indicating u k The kth center frequency of .

[0143] (4) The above constraints are transformed into an unconstrained variational problem. The quadratic penalty factor α and the Lagrangian multiplication operator λ are introduced in equation (9). The extended Lagrangian expression is:

[0144]

[0145] (5) Use the multiplication operator alternating direction method to solve and update u 1 and ω k .

[0146]

[0147] Where: and They are f(ω) and λ n (ω) is the Fourier transform; n is the number of iterations.

[0148] Preferably, since the original photovoltaic power sequence has a high noise level, the prediction accuracy of directly using the BiLSTM network may be low. Figure 6 As shown, in order to reduce the difficulty of predicting the original power, VMD is used to decompose the original power series into four sub-components: IMF1, IMF2, IMF3 and RES.

[0149] Preferably, in S2, referring to Figure 7 As shown in FIG. 1 , the BiLSTM network is composed of two LSTMs, which can simultaneously capture the feature sequence from the future moment to the current time node, thereby obtaining the information flow of the entire time domain. The specific calculation steps are as follows:

[0150] f t =σ(W f ·[h t-1 ,X t ]+b f ) (14)

[0151]

[0152]

[0153]

[0154]

[0155] Where: f t For the forget gate, i t is the input gate, O t is the output gate, W f , W i , W C and W O is the weight matrix, b f , b i , b C and b O is the bias vector, σ is the Sigmoid activation function, tanh is the hyperbolic tangent activation function, is the candidate cell state, C t is the new memory cell state, h t is the output of the hidden layer, ⊙ is the multiplication of the corresponding points, LSTM represents the LSTM network function, represents the forward hidden layer state, represents the reverse hidden layer state, U t and V t are the output weights of the forward LSTM propagation unit and the reverse LSTM propagation unit, respectively, y is the bias vector of the output layer at the current moment.

[0156] Finally, refer to Figure 8 As shown in the figure, the output result of photovoltaic power is predicted by combining VMD and BiLSTM network.

[0157] S3: By calculating the PaR in the historical prediction results and using the PaR as the weighting basis for the optimal weight combination method, the prediction results of the NGBoost model and the prediction results of the BiLSTM network are linearly combined using the optimal weight combination method to obtain the final power prediction value.

[0158] Preferably, in S3, the specific calculation steps of PaR are as follows:

[0159] (1) Calculate the prediction error vector of a single model as:

[0160] ε=(ε 1 ,ε 2 ,…,ε T ) (twenty three)

[0161] (2) Sort the errors in the vector by absolute value to obtain

[0162] β= β 1 ,β 2 ,…,β γ (twenty four)

[0163] (3) Define that when the confidence level is (1-α), PaR is the element located at the [αT]th element of β. Then we have

[0164] PaR=β [αT] (25)

[0165] Preferably, in S3, the optimal weight combination legal weighting step is as follows:

[0166] (1) Calculate the deviation matrix E, that is,

[0167]

[0168] Where: e 1t The meaning of is the prediction error of the first prediction method at time t, that is, the prediction error of the BiLSTM network at time t, e 2t is the prediction error of the NGBoost model at time t;

[0169] (2) Define the constraint condition RK T =1,R=[1,1] T ;

[0170] (3) Use the Lagrangian method to find the minimum value under the constraint condition;

[0171]

[0172] According to the above steps, we can get K = [ω 1 ,ω 2 ] is the combined model weight, and the output prediction result expression is:

[0173] y t =ω 1 y 1t +ω 2 y 2t (28)

[0174] Where: y t is the output prediction result of the combined model at time t; y 1t and 2t They are the output prediction results of the BiLSTM network and NGBoost model at time t.

[0175] The above weight determination process 1t and e 2tis the numerical error between the actual value and the predicted value, which is replaced by PaR as the basis for weight determination.

[0176] Verification example:

[0177] The present invention uses the historical data of a certain year and January to March of a certain year as training data, and the historical data of April to June of the following year in the sample set as test data to verify the effectiveness of the combined model.

[0178] The historical data after FCM clustering and VMD decomposition are input into the NGBoost model and BiLSTM network respectively, and the hyperparameters of the model are adjusted to achieve the best training result of the model. According to the error of historical data, the optimal weight method is used for weighting.

[0179] The performance of the proposed method was evaluated. Three error indicators were used to evaluate the photovoltaic power prediction results of all experimental models, namely root mean square error (RMSE), mean absolute error (MAE) and mean absolute percentage error (MAPE).

[0180]

[0181]

[0182] Where: P i is the actual power, is the predicted power, is the average value of the actual power on the forecast day, and n is the total number of samples.

[0183] The model is mainly predicted from the weather characteristics. The accuracy comparison of each model under different weather conditions is shown in Table 2.

[0184] Table 2 Comparison of model accuracy under different weather conditions

[0185]

[0186] The results show that the NGBoost model has a strong learning ability. When the unclustered data set is used for training and prediction, the NGBoost model can still make relatively accurate predictions. The RMSE, MAE, and MAPE of the prediction results for sunny, cloudy, and rainy days are 0.3315-0.3060-0.0834, 0.2886-0.2062-0.0864, ​​and 0.2631-0.2027-0.0697, respectively. After clustering the training samples, the prediction accuracy of NGBoost can be greatly improved. The RMSE of the FCM-NGBoost model for the prediction results of sunny, cloudy, and rainy days is 0.1477-0.2221-0.1406. The accuracy improvement is 55.44%-23.04%-46.56%, respectively. The RMSE, MAE, and MAPE of the BiLSTM network's sunny, cloudy, and rainy day prediction results are 0.3585-0.2880-0.0785, 1.2994-0.9099-0.3880, and 0.7256-0.5988-0.2059, respectively. The results show that the BiLSTM model cannot make accurate predictions for cloudy and rainy days. VMD is used to decompose the original photovoltaic power sequence to reduce the volatility and complexity of the original photovoltaic power sequence. The RMSE of the VMD-BiLSTM prediction results is 0.1931-0.4714-0.3849. The accuracy improvement is 46.13%-63.69%-46.95%, respectively. From the prediction results for cloudy days, it can be seen that VMD-BiLSTM can perceive sudden data changes and make more accurate predictions compared to the BiLSTM network.

[0187] In order to further improve the prediction accuracy, the prediction results of the above models are linearly combined using the optimal weight combination method. According to the overall error and PaR of the historical data, the combination weight ratio is calculated respectively, and the prediction results of the two are compared. The weight ratio is shown in Table 3.

[0188] Table 3 Weight ratio of combined model

[0189]

[0190] When using the overall error, the weight ratios of the FCM-NGBoost and VMD-BiLSTM models are 0.92-0.08, 0.95-0.05, and 0.89-0.11, respectively. In sunny and cloudy weather conditions, the overall error of BiLSTM for historical data prediction is too large, resulting in a large diagonal when using the overall error to calculate the error matrix, causing the weight to approach 0.

[0191] The use of PaR can improve this situation, so that the combined model has a certain proportion in the final prediction results, and the weight ratio of the model is optimized. The optimized weights are 0.68-0.32, 0.74-0.26, and 0.76-0.23 respectively.

[0192] From the prediction results, the RMSE, MAE, and MAPE of the NGBoost-BiLSTM model based on the overall deviation optimal weight method for sunny, cloudy, and rainy days are 0.1477-0.1267-0.0345, 0.2221-0.1542-0.0657, and 0.1406-0.1063-0.0365, respectively. Compared with a single model, the prediction accuracy is higher. It can also be seen from Figures 9(1), 9(2), 9(3), 9(4), 9(5), and 9(6) that the prediction results of the NGBoost-BiLSTM model are closer to the actual prediction results. The RMSE of the combined model based on the optimal weight method of PaR for the prediction results of sunny, cloudy, and rainy days are 0.1396-0.2174-0.1363, respectively, which is 9.1%-4.9%-15.3% higher than that of FCM-NGBoost and VMD-BiLSTM, and 27.7%-53.8%-64.6% higher than that of the combined model using the overall deviation. Compared with the combined model using the overall deviation, the overall accuracy has been slightly improved, with the RMSE increased by 5.4%-2.1%-3.0% respectively. From Figure 9(1) and Figure 9(2), it can be seen that the prediction results of the PaR prediction model for sunny days are similar to those of the overall error combination model. From Figure 9(3) and Figure 9(4), it can be seen that the PaR combination model is more in line with the actual output power at the peak and value mutation of cloudy weather. From Figure 9(5) and Figure 9(6), it can be seen that for rainy weather, the PaR combination model is more in line with the terminal data prediction results, and the overall change trend is more in line with the actual power. Therefore, the short-term photovoltaic power generation combined prediction method based on NGBoost and BiLSTM proposed in the present invention is a reliable and high-precision power prediction method.

Claims

1. A short-term photovoltaic power generation combined prediction method based on NGBoost and BiLSTM, characterized by The following steps are involved: Step 1: The Pearson correlation coefficient is used to analyze the correlation between photovoltaic output and meteorological factors, and the NGBoost prediction model is constructed by combining the fuzzy C-means clustering algorithm; Step 2: Combine the VMD method to build a prediction model based on the BiLSTM network, use VMD to decompose the historical power, use the BiLSTM network to predict the sub-components respectively, and reconstruct the sub-component prediction results to obtain the power prediction results; Step 3: By calculating the extreme deviation (Prediction at Risk, PaR) in the historical prediction results and taking the extreme deviation as the weighting basis of the optimal weight combination method, the prediction results of the NGBoost prediction model and the prediction results of the BiLSTM network are linearly combined using the optimal weight combination method to obtain the final power prediction value.

2. The short-term photovoltaic power generation combined prediction method based on NGBoost and BiLSTM according to claim 1 is characterized by: In step 1, the specific calculation of the Pearson correlation coefficient is as follows: In formula (1), r represents the correlation coefficient; x i Indicates meteorological factors, such as light intensity, temperature, humidity, wind speed, etc.; i Represents photovoltaic power generation; represents the mean value of meteorological factors; represents the mean value of photovoltaic power generation; n represents the number of meteorological factor calculation data.

3. The short-term photovoltaic power generation combined prediction method based on NGBoost and BiLSTM according to claim 2 is characterized by: In step 1, the minimization objective function of the fuzzy C-means clustering algorithm is as follows: In formula (2): m is the number of clusters; i, j are class labels; u ij Indicates the membership of sample x to class j; x i -c j 2 is the distance from the sample to the cluster center; c j represents the jth cluster center; U is the membership matrix; V is the cluster center; N represents the total number of samples; C represents the number of clusters; FCM is a continuous iterative calculation of the membership u ij and cluster center c j The process specifically includes the following steps: (1) Initialize the membership matrix U = u ij , the initial membership matrix is ​​U (0) , the membership degree satisfies Start iteration; (2). Calculate the cluster center c of step K (k) =c j ; In formula (3): represents the membership of sample i to class j; m is the membership factor, which indicates the importance of belonging to a certain class; N represents the number of samples; I represents the Ith sample; c represents the cth cluster center; (3). Update the membership matrix U (k) ; In formula (4), k represents the kth sample; c k represents the kth cluster center; (4) Given a membership termination threshold ε, threshold ε>0, if U (k+1) -U (k) <ε,U (k+1) represents the k+1th membership matrix; then the iteration is terminated, otherwise return to step (2).

4. The short-term photovoltaic power generation combined prediction method based on NGBoost and BiLSTM according to claim 3 is characterized by: In step 1, the NGBoost prediction model includes a gradient boosting algorithm for solving the probability regression problem; the NGBoost prediction model is used to estimate the parameter P of the probability distribution. θ (y|x), where x is the feature variable of the input model, y is the target variable, and θ is the parameter vector of the distribution; the NGBoost prediction model includes the basic learner f (m) , parameter probability distribution P θ (y|x) and the scoring rule S(P θ |y) Three modules, each module is independent of each other; Through the gradient boosting method, each round of boosting uses the probability distribution parameter θ to be fitted, the prediction result y and the scoring rule S to generate a natural gradient As shown in formula (5): In formula (5): represents the model parameters of the i-th sample after the m-1th iteration; y i Represents the true output value of the i-th sample; Represents the inverse of the loss function with respect to the model parameters θ; Indicates that after the m-1th iteration, the model parameters are used For the i-th sample y i Model output for making predictions; represents the gradient of the parameter θ; m is the number of times the NGBoost model is promoted, i is the dimension of the probability distribution parameter, and the evaluation results of each parameter are calculated separately. By taking its total differential, the natural gradient of the probability distribution parameter promoted for the mth time is obtained. As shown in formula (6), the basic learner is used to construct the function f of feature x and natural gradient g (m) ; Combined with the scoring rule S, the scaling factor ρ of this round of gradient boosting is finally generated (m) , as shown in formula (7), using the scaling factor ρ from the previous round (m-1) Scale the natural gradient and add it to the probability distribution parameter to get the improved probability distribution parameter Then, take the scaling factor that minimizes the cumulative sum of the evaluation results of all parameters, and finally get the scaling factor ρ for this improvement (m) ; In the above formula: represents the natural gradient of the i-th sample in the m-th iteration; x i represents the feature vector of the i-th sample; n represents the number of samples; Represents the dataset used to train the model in the mth iteration, which contains the features x of each sample i and the corresponding natural gradient As shown in formula (7), the role of the scaling factor ρ is to normalize the natural gradient and then multiply it by the learning rate η. Finally, the parameter θ of the probability distribution is continuously improved in this way until the prediction result meets the scoring rule or the maximum number of iterations is reached; In the above formula: (ρ (m) ·f (m) (x i )) means that in the mth iteration, the feature vector x of the i-th sample i Amount to adjust the base learner outputs when making predictions.

5. The short-term photovoltaic power generation combined prediction method based on NGBoost and BiLSTM according to claim 1 is characterized by: In step 2, the VMD algorithm includes the following steps: S2.1: Perform Hilbert transform on the initial signal to obtain the analytical signals of k modal components and the single-sided spectrum: Where: δ(t) is the impulse function; u k (t) represents each mode function; t represents the time variable; S2.2: Each mode u k The spectrum of (t) is modulated to the baseband and we get: Where: k represents the center frequency; Represents the phasor description of the center frequency on the complex plane; S2.3: Estimate the bandwidth of each modal signal by the Gaussian smoothness of the demodulated signal and construct the variational problem as follows: Where: {u1}={u1,…,u k }, represents the kth mode; {ω k }={ω1,…,ω k }, indicating u k The kth center frequency of a resolution signal representing the source signal; S2.4: The above constraints are transformed into unconstrained variational problems. The quadratic penalty factor α and the Lagrangian multiplication operator λ are introduced in equation (12). The extended Lagrangian expression is: Where: L({u k },{ω k },λ) represents the Lagrangian expression of the unconstrained variational problem; f(t) represents the original signal; K represents the number of modal components; It means to find the partial derivative of the source signal and analytical signal; S2.5: Use the multiplication operator alternating direction method to solve and update u1 and ω k : Where: and They are f(ω) and λ n Fourier transform of (ω); n is the number of iterations; express Fourier transform of ; ω represents random frequency; and Both represent center frequency.

6. The short-term photovoltaic power generation combined prediction method based on NGBoost and BiLSTM according to claim 5 is characterized by: In step 2, the BiLSTM network is composed of two LSTMs, which can simultaneously capture the feature sequence from the future moment to the current time node, thereby obtaining the information flow of the entire time domain. The specific calculation steps are as follows: f t =σ(W f ·[h t-1 ,X t ]+b f ) (14) i t =σ(W i ·[h t-1 ,X t ]+b i ) (15) The t =σ(W O ·[h t-1 ,X t ]+b O ) (18) h t =O t ⊙tanh(C t ) (19) Where: f H For the forget gate, i t is the input gate, O t is the output gate, W f , W i , W C and W O is the weight matrix, b f , b i , b C and b O is the bias vector, σ is the Sigmoid activation function, tanh is the hyperbolic tangent activation function, is the candidate cell state, C t is the new memory cell state, h t is the output of the hidden layer, ⊙ is the multiplication of the corresponding points, LSTM represents the LSTM network function, represents the forward hidden layer state, represents the reverse hidden layer state, U t and V t are the output weights of the forward LSTM propagation unit and the reverse LSTM propagation unit, respectively, y is the bias vector of the output layer at the current moment; X t represents the input feature vector at time step t; h t-1 represents the hidden state of the previous time step; [h t-1 ,X t ] represents the concatenation of the hidden state of the previous time step and the current input; C t-1 represents the cell state at the previous time step; Represents the previous forward hidden layer state; Represents the reverse hidden layer state at the next time step.

7. The short-term photovoltaic power generation combined prediction method based on NGBoost and BiLSTM according to claim 6 is characterized by: In step 2, as in equations (9), (10), (11), (12) and (13), VMD is used to decompose the historical power, and the complex photovoltaic power sequence is decomposed into several relatively stable sub-components; as in equation (22), the sub-components are predicted respectively by the BiLSTM network; a BiLSTM prediction network is constructed for each sub-component, and the temperature, humidity, light intensity, scattering intensity, wind direction and each sub-component are used as input variables of the prediction network for model training, thereby obtaining the prediction results of the sub-components; The prediction results of the sub-components are linearly reconstructed to obtain the final photovoltaic power, and the predicted values ​​of each sub-component are added together to obtain the final photovoltaic output power.

8. The short-term photovoltaic power generation combined prediction method based on NGBoost and BiLSTM according to claim 1 is characterized by: In step 3, the specific calculation of extreme deviation (Prediction at Risk, PaR) includes the following steps: S3.1: Calculate the prediction error vector of a single model as: ε=(ε1,ε2,…,ε T ) (23) Where: ε1,ε2,…,ε T Represent the sample errors respectively; S3.2: Sort the errors in the vector by their absolute values ​​to obtain: β= β1,β2,…,β γ (24) Where: β1,β2,…,β γ Respectively represent the absolute value of each sample error; S3.3: When the confidence is (1-α), PaR is defined as the element of β located at the [αT]th element; then: PaR=β [αT] (25) Where: α represents the confidence level; β represents the PaR value calculated under the confidence level (1-α); In step 3, the optimal weight combination legal right includes the following steps: S3.4: Find the deviation matrix E, that is: Where: e 1t The meaning of is the prediction error of the first prediction method at time t, that is, the prediction error of the BiLSTM network at time t, e 2t is the prediction error of the NGBoost model at time t; N represents the number of samples; S3.5: Define constraints RK T =1,R=[1,1] T ; R represents the normalization factor, K T represents the weight vector; S3.6: Use the Lagrangian method to find the minimum value under this constraint; Where: R T represents the transpose of matrix R; E -1 represents the inverse of the matrix E; According to the above steps, we get K = [ω1, ω2] as the weight of the combined model, where ω1 and ω2 represent the weight of a single model in the combined model. The output prediction result expression is: y t =ω1y 1t +ω2y 2t (28) Where: y t is the output prediction result of the combined model at time t; y 1t and 2t They are the output prediction results of BiLSTM network and NGBoost model at time t respectively; The above weight determination process 1t and e 2t is the numerical error between the actual value and the predicted value, which is replaced by PaR as the basis for weight determination.

Citation Information

Cited By

  • Malignant load identification method, apparatus and device, medium and program product

    CN121959198A

  • A malignant load identification method, device, equipment, medium and program product

    CN121959198B