Wind power prediction method and system integrating deep learning and adaptive modeling mechanism
By integrating deep learning and adaptive modeling mechanisms, combining LSTM, LSTMEcor and Ridge models, and using random forests for data fusion, the problem of performance degradation of wind power power prediction models under the influence of seasonality and periodicity is solved, and a higher level of performance is achieved. Prediction accuracy and stability.
Patent Information
- Application Number
- CN202210079085.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-24
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-01-24
AI Technical Summary
The prediction performance of existing wind power power prediction models is prone to degradation when faced with seasonal and cyclical effects, and it is difficult for a single deep learning model to capture local information, resulting in a decrease in prediction accuracy, especially when the prediction period becomes longer.
Using a method that integrates deep learning and adaptive modeling mechanisms, through the LSTM network and adaptive error correction model (LSTMEcor) combined with the Ridge model, a random forest model is constructed for data fusion, and the posterior probability is used to weight the prediction value to improve prediction accuracy and stability. sex.
It achieves real-time online modeling and prediction of wind power, improves prediction accuracy and stability, and performs better than traditional non-adaptive methods especially in ultra-short-term prediction.
Smart Images

Figure CN115018111B
Abstract
Description
Technical Field
[0001] The present invention relates to a wind power prediction method and system integrating deep learning and adaptive modeling mechanism, belonging to the technical field of wind power prediction. Background Art
[0002] With the depletion of fossil energy and the intensification of environmental pollution, wind energy, as a clean and renewable energy, has received more and more attention at home and abroad. However, the randomness and volatility of wind energy have led to huge challenges in the development and utilization of wind energy. The key to solving this problem lies in whether accurate and real-time wind power forecasting can be achieved. Accurate and real-time wind power forecasting can not only effectively avoid the impact of wind power on the grid, but also provide effective guidance information for the optimal dispatch of electricity.
[0003] Wind power forecasting methods can be roughly divided into four methods: physical methods, traditional statistical methods, artificial intelligence methods, and hybrid methods. The artificial intelligence-based method is currently the most widely used method, which aims to fit the functional relationship between input and output through historical data. Deep learning models can fit more complex functional relationships and capture the nonlinear characteristics of wind power, which is very suitable for wind power forecasting. Wind power data is a time series data, and the long short-term memory network (LSTM) in deep learning can effectively capture this time correlation. And considering that wind power is affected by seasonal and cyclical factors, using a whole year of data to train LSTM can effectively capture such seasonal and cyclical factors.
[0004] At present, most prediction models ignore the useful information in the prediction residuals. This method of processing prediction errors is usually called post-processing technology. Conventional post-processing methods use historical errors or historical cumulative errors to correct the current prediction value in a direct or weighted manner. This simple use of errors often does not achieve good results, especially when the prediction time becomes longer, it will lead to a decrease in prediction performance. The data-driven error post-processing method attempts to directly fit the functional relationship between the input and output information of the model and the prediction residuals to achieve the purpose of direct prediction. After obtaining the predicted value of the error, it is used to correct the predicted value of the model, thereby further reducing the prediction error.
[0005] As time goes by, the functional relationship between historical data will change, a phenomenon called concept drift. When concept drift occurs, it will lead to a decrease in prediction accuracy, especially when the prediction time becomes longer. Therefore, in order to ensure that the model has stable prediction performance, the prediction model should have a certain degree of adaptive ability. A single deep learning model cannot capture the local information of wind power well due to its complex model and huge training data. Therefore, it is also necessary to combine local modeling technology to improve the prediction performance of wind power. Summary of the invention
[0006] The present invention provides a wind power prediction method and system integrating deep learning and adaptive modeling mechanism for predicting wind power.
[0007] The technical solution of the present invention is: a wind power prediction method integrating deep learning and adaptive modeling mechanism, comprising:
[0008] S1. Collect the complete annual historical real power series data of the wind farm, construct the modeling data set according to different prediction durations; divide the modeling data set into the first data set D y1 , the second data set D y2 ; The second data set D y2 Divide into the first validation set D val1 , the second validation set D val2 and the test set D test ;
[0009] S2. Using the first data set D y1 Train the LSTM network and save it to obtain the LSTM prediction model;
[0010] S3. Use the LSTM prediction model to predict the first validation set D val1 Make predictions and build the training set D of the LSTMEcor prediction model REP ;
[0011] S4. Simultaneously use LSTM prediction model, LSTM Ecor prediction model, and JITLRidge prediction model to predict the second validation set D val2 Make predictions and construct random forest training set D RF , train and save the random forest model;
[0012] S5. Simultaneously use LSTM prediction model, LSTM Ecor prediction model, and JITLRidge prediction model to predict the test set D test Make predictions and obtain power prediction values under different models; construct random forest query samples REP q ; Input the random forest query sample into the random forest model to obtain the posterior probability value of the corresponding output; use the posterior probability value to weightedly fuse the outputs of each power prediction value to obtain the final prediction value.
[0013] S1 includes: collecting the complete annual historical real power series data of the wind farm, constructing a modeling data set according to different prediction durations; and dividing the modeling data set into a first data set D according to the annual sequence. y1 , the second data set D y2 ; In the second data set D y2K samples are randomly selected every month and divided into two parts, namely the first validation set D val1 and the second validation set D val2 , the rest of the second data set is used as the test set D test ; The form of each sample in the modeling data set is: {x t ,y t}={(R t-l ,R t-l+1 ,…,R t ),R t+ahead}, x t As input, y represents the real power vector at time t. t As the output, it represents the predicted target value at time t, that is, the actual power value at time t+ahead, R t represents the real value of power at time t, l represents the delay variable, R t+ahead is the true value of the power at time t+ahead, where ahead represents the advance step and t represents time t or the tth sample.
[0014] S3, comprising: using the LSTM prediction model to predict the first validation set D val1 Make predictions and obtain the first validation set D val1 The power prediction value P corresponding to each sample in LSTM1,j1 , compare the power prediction value with the corresponding power true value R LSTM1,j1 Subtract and obtain the error value E LSTM1,j1 , the errors corresponding to all samples in the first validation set form an error series; the training set D of the LSTMEcor prediction model is constructed REP ; where j1 represents the j1th sample.
[0015] The D REP The sample format is: {(REP LSTM1,j1-l ,REP LSTM1,j1-l+1 ,…,REP LSTM1,j1 ),E LSTM1,j1+ahead}, ahead means the advance step, REP LSTM1,j1 =(R LSTM1,j1 ,E LSTM1,j1 ,P LSTM1,j1 ), ahead represents the advance step, and l represents the delay variable.
[0016] S4 includes: using the LSTM prediction model, the LSTMEcor prediction model, and the JITLRidge prediction model to predict the second validation set D val2 Make predictions and obtain the power prediction value P of each sample in the second validation set under the LSTM prediction model. LSTM2,j2 , the power prediction value P under the LSTMEcor prediction modelEcor,j2 , the power prediction value P under the JITLRidge prediction model JITL,j2 , and then obtain the errors corresponding to all samples in the second validation set to form an error series; construct a random forest training set D RF , train and save the random forest model; where j2 represents the j2th sample.
[0017] The D RF The sample form in is: {(REP LSTM2,j2-l ,REP LSTM2,j2-l+1 ,…,REP LSTM2,j2 ),L j2}REP LSTM2,j2 =(R LSTM2,j2 ,E LSTM2,j2 ,P LSTM2,j2 ), Among them, R LSTM2,j2 represents the true value of the power corresponding to the j2th sample in the second validation set; E JITL,j2 ,E Ecor,j2 ,E LSTM2,j2 They respectively represent the error values corresponding to the j2th sample in the second validation set under different prediction models.
[0018] The prediction process of the LSTMEcor prediction model is as follows:
[0019] ①Construct query sample REP of LSTMEcor prediction model j2 ;
[0020] ② Calculate query sample REP j2 and the training set D of the LSTMEcor prediction model REP The Euclidean similarity of all samples in is calculated, and the most similar p1 samples are selected; the GPR model is trained after normalization, and the error value E corresponding to the query sample is predicted j2 ;
[0021] ③ The predicted error value is used to compensate the power prediction value under the LSTM model to obtain the power prediction value P under the LSTMEcor model. Ecor,j2 :
[0022] P Ecor,j2 =P LSTM,j2 +E j2
[0023] Where: P Ecor,j2 is the power prediction value under the LSTMEcor prediction model.
[0024] The prediction process of the JITLRidge prediction model is as follows:
[0025] ① Input the second verification set D val2 The true value of the power of the sample in constructs the query sample R of the JITLRidge prediction model j2 ;
[0026] ② Calculate query sample R j2 and the first validation set D val1 The Euclidean distance of all samples is calculated, and the most similar p2 samples are selected; the Ridge model is trained after normalization, and the corresponding prediction value of the query point is predicted as the prediction value P of the JITLRidge prediction model JITL,j2 .
[0027] The S5 comprises:
[0028] ① Use LSTM prediction model, LSTMEcor prediction model and JITLRidge prediction model to test set D test Make predictions and obtain their respective power prediction values P LSTMtest,q ,P Ecortest,q ,P JITLtest,q ; Construct random forest query sample REP q ;
[0029] The REP q The form is: (REP LSTMtest,q-l ,REP LSTMtest,q-l+1 ,…,REP LSTMtest,q ), REP LSTMtest,q =(R LSTMtest,q ,E LSTMtest,q ,P LSTMtest,q ), where R LSTMtest,q ,E LSTMtest,q ,P LSTMtest,q They represent the LSTM prediction model for the test set D test The actual power value, error value and predicted power value obtained by prediction;
[0030] ② Random forest query sample REP q Input the random forest model to obtain the posterior probability value of the corresponding output;
[0031] ③Use the posterior probability value to weight the fusion of each power prediction value output to obtain the final prediction value:
[0032] Pre finall,q =p 0,q ×P JITLtest,q +p 1,q ×P Ecortest,q +p 2,q ×P LSTMtest,q
[0033] Where: p j,q(j=0, 1, 2) respectively represent the posterior probability values that can obtain the minimum error when using the JITLRidge prediction model, LSTMEcor prediction model, and LSTM prediction model for prediction.
[0034] According to another aspect of the present invention, a wind power prediction system integrating deep learning and adaptive modeling mechanism is provided, comprising:
[0035] The partitioning module is used to collect the complete annual historical real power series data of the wind farm and construct a modeling data set according to different prediction durations; the modeling data set is divided into the first data set D y1 , the second data set D y2 ; The second data set D y2 Divide into the first validation set D val1 , the second validation set D val2 and the test set D test ;
[0036] The first acquisition module is used to use the first data set D y1 Train the LSTM network and save it to obtain the LSTM prediction model;
[0037] Building a module for using the LSTM prediction model to predict the first validation set D val1 Make predictions and build the training set D of the LSTMEcor prediction model REP ;
[0038] The second acquisition module is used to simultaneously use the LSTM prediction model, the LSTMEcor prediction model, and the JITLRidge prediction model to predict the second validation set D val2 Make predictions and construct random forest training set D RF , train and save the random forest model;
[0039] The third acquisition module is used to simultaneously use the LSTM prediction model, the LSTMEcor prediction model, and the JITLRidge prediction model to predict the test set D test Make predictions and obtain power prediction values under different models; construct random forest query samples REP q ; Input the random forest query sample into the random forest model to obtain the posterior probability value of the corresponding output; use the posterior probability value to weightedly fuse the outputs of each power prediction value to obtain the final prediction value.
[0040] The beneficial effect of the present invention is that: in view of the fact that wind power generation is generally affected by seasonality and periodicity, the wind power prediction model inevitably encounters prediction performance degradation. In view of this problem, the powerful nonlinear feature processing capability of deep learning and the time-varying feature processing capability of adaptive learning are combined to realize real-time online modeling and prediction of wind power. On the one hand, a long short-term memory (LSTM) network prediction model is constructed offline based on annual wind power data to capture the complex features hidden in large-scale wind power data. On the other hand, the LSTMEcor prediction model is constructed online in real time based on the training set of the LSTMEcor prediction model, so as to estimate the future state LSTM prediction error, and then obtain the LSTM prediction output correction value as the power prediction value of the LSTMEcor prediction model. In addition, a JITLRidge prediction model is constructed with recent historical data as the modeling database to obtain the wind power prediction value of the JITLRidge prediction model. After obtaining the wind power prediction values of the three approaches, a random forest three-classification model is constructed. In the online prediction stage, the wind power prediction value is obtained through three types of prediction methods, and the posterior probability of the best performance of each type of prediction value is estimated through the classification model, and then the three prediction values are weighted and fused according to the Bayesian principle.
[0041] In summary, compared with the prior art, the present invention integrates deep learning and adaptive modeling mechanism for ultra-short-term wind power forecasting. Compared with traditional non-adaptive forecasting methods, the present invention has higher prediction accuracy and stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a flow chart of wind power prediction of the present invention;
[0043] Figure 2 This is the prediction curve of the proposed method 2 hours in advance (the first 500 samples of the test set are intercepted);
[0044] Figure 3 This is the prediction curve of the proposed method 4 hours in advance (the first 500 samples of the test set are intercepted). DETAILED DESCRIPTION
[0045] The invention is further described below in conjunction with the accompanying drawings and embodiments, but the content of the invention is not limited to the scope of the embodiments.
[0046] Example 1: Figure 1-3 As shown, a wind power prediction method integrating deep learning and adaptive modeling mechanism includes:
[0047] S1. Collect the complete annual historical real power series data of the wind farm, construct the modeling data set according to different prediction durations; divide the modeling data set into the first data set Dy1 , the second data set D y2 ; The second data set D y2 Divide into the first validation set D val1 , the second validation set D val2 and the test set D test ;
[0048] S2. Using the first data set D y1 Train the offline LSTM network and save it to obtain the LSTM prediction model;
[0049] S3. Use the LSTM prediction model to predict the first validation set D val1 Make predictions and build the training set D of the LSTMEcor prediction model REP ;
[0050] S4. Simultaneously use LSTM prediction model, LSTM Ecor prediction model, and JITLRidge prediction model to predict the second validation set D val2 Make predictions and construct random forest training set D RF , train and save the random forest model;
[0051] S5. Simultaneously use LSTM prediction model, LSTM Ecor prediction model, and JITLRidge prediction model to predict the test set D test Make predictions and obtain power prediction values under different models; construct random forest query samples REP q ; Input the random forest query sample into the random forest model to obtain the posterior probability value of the corresponding output; use the posterior probability value to weightedly fuse the outputs of each power prediction value to obtain the final prediction value.
[0052] Optionally, S1 includes: collecting complete annual historical real power series data of the wind farm, constructing a modeling data set according to different prediction durations; and dividing the modeling data set into a first data set D according to the annual sequence. y1 , the second data set D y2 ; In the second data set D y2 K samples are randomly selected every month and divided into two parts, namely the first validation set D val1 and the second validation set D val2 , the rest of the second data set is used as the test set D test ;D y1 Contains at least one year of data, so that the generalization performance of the model is higher; each sample in the modeling data set is in the form of: {x t ,y t}={(R t-l ,R t-l+1 ,…,R t ),Rt+ahead}, x t As input, y represents the real power vector at time t. t As the output, it represents the predicted target value at time t, that is, the actual power value at time t+ahead, R t represents the real value of power at time t, l represents the delay variable, R t+ahead is the true value of the power at time t+ahead, where ahead represents the advance step and t represents time t or the tth sample.
[0053] Optionally, S3 includes: using the LSTM prediction model to predict the first validation set D val1 Make predictions and obtain the first validation set D val1 The power prediction value P corresponding to each sample in LSTM1,j1 , compare the power prediction value with the corresponding power true value R LSTM1,j1 Subtract and obtain the error value E LSTM1,j1 , the errors corresponding to all samples in the first validation set form an error series; the training set D of the LSTME cor prediction model is constructed REP ; where j1 represents the j1th sample.
[0054] Optionally, the D REP The sample format is: {(REP LSTM1,j1-l ,REP LSTM1,j1-l+1 ,…,REP LSTM1,j1 ),E LSTM1,j1+ahead}, ahead means the advance step, REP LSTM1,j1 =(R LSTM1,j1 ,E LSTM1,j1 ,P LSTM1,j1 ).
[0055] The LSTM network consists of an input gate, a forget gate, an output gate, and a unit state update:
[0056] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0057] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0058]
[0059] o t =σ(W o ·[h t-1,x t ]+b o )
[0060] h t =o t *tanh(C t )
[0061] Among them, i t , f t , C t , o t ,h t They represent the input gate, forget gate, the current neuron state, the neuron state at the previous moment, the output gate, and the hidden layer output respectively; W i , W f , W C , W o and b i 、b f 、b c 、b o Respectively represent the weights and biases of the input gate, forget gate, unit state, and output gate; σ represents the sigmoid function; a fully connected layer is connected after the LSTM hidden layer output to obtain the final output:
[0062] f LSTM (h t )=W e ·h t +b e
[0063] In the formula, f LSTM (h t ) represents the final output of the network, W e , b e denote the weight and bias of the fully connected layer respectively. t It is the hidden layer output of LST M layer.
[0064] Optionally, S4 includes: using the LSTM prediction model, the LSTM Ecor prediction model, and the JITLRidge prediction model to predict the second validation set D val2 Make predictions and obtain the power prediction value P of each sample in the second validation set under the LSTM prediction model. LSTM2,j2 , the power prediction value P under the LSTMEcor prediction model Ecor,j2 , the power prediction value P under the JITLRidge prediction model JITL,j2 , according to the method in S3, the errors corresponding to all samples in the second validation set are obtained to form an error series; the random forest training set D is constructed RF , train and save the random forest model; where j2 represents the j2th sample.
[0065] Optionally, the D RF The sample form in is: {(REP LSTM2,j2-l ,REP LSTM2,j2-l+1 ,…,REP LSTM2,j2 ),L j2}REP LSTM2,j2 =(R LSTM2,j2 ,E LSTM2,j2 ,P LSTM2,j2 ), Among them, R LSTM2,j2 represents the true value of the power corresponding to the j2th sample in the second validation set; E JITL,j2 ,E Ecor,j2 ,E LSTM2,j2 They respectively represent the error values corresponding to the j2th sample in the second validation set under different prediction models.
[0066] Optionally, the prediction process of the LSTMEcor prediction model is as follows:
[0067] ①Construct query sample REP of LSTMEcor prediction model j2 ;
[0068] The REP j2 The form is: {(REP LSTM2,j2-l ,REP LSTM2,j2-l+1 ,…,REP LSTM2,j2 ),E LSTM2,j2+ahead}, REP LSTM2,j2 =(R LSTM2,j2 ,E LSTM2,j2 ,P LSTM2,j2 ), where R LSTM2,j2 ,E LSTM2,j2 ,P LSTM2,j2 They represent the use of LSTM prediction model for the second validation set D val2 The actual power value, error value, and power prediction value corresponding to the j2th sample obtained by prediction, where ahead represents the advance step;
[0069] ② Calculate query sample REP j2 and the training set D of the LSTMEcor prediction model REP The Euclidean similarity of all samples in is calculated, and the most similar p1 samples are selected; the GPR model is trained after normalization, and the error value E corresponding to the query sample is predicted j2 ;
[0070] The definition of Euclidean distance similarity is as follows:
[0071]
[0072] Among them, dn represents the Euclidean distance between the query sample and the historical sample, σ n yes The standard deviation of is a localization parameter.
[0073] ③ The predicted error value is used to compensate the power prediction value under the LSTM model to obtain the power prediction value P under the LSTMEcor model. Ecor,j2 :
[0074] P Ecor,j2 =P LSTM,j2 +E j2
[0075] Where: P Ecor,j2 is the power prediction value under the LSTMEcor prediction model, P LSTM2,j2 is the power prediction value under the LSTM prediction model.
[0076] If it is the test set D test To make a prediction, the second validation set D in step val2 Replace with test set D test ; Obtain the power prediction value P of the test set under the LSTMEcor prediction model Ecortest,q ;
[0077] Optionally, the prediction process of the JITLRidge prediction model is as follows:
[0078] ① Input the second verification set D val2 The true value of the power of the sample in constructs the query sample R of the JITLRidge prediction model j2 ; That is, the R j2 The form is: {(R j2-l ,R j2-l+1 ,…,R j2 ),R j2+ahead}, R j2 Denotes the second validation set D val2 The true value of the power of the j2th sample in;
[0079] ② Calculate query sample R j2 and the first validation set D val1 The Euclidean distance of all samples is calculated, and the most similar p2 samples are selected; the Ridge model is trained after normalization, and the corresponding prediction value of the query point is predicted as the prediction value P of the JITLRidge prediction model JITL,j2 .
[0080] If it is the test set D test To make a prediction, the second validation set D in step val2 Replace with test set Dtest ; Get the predicted value P of the test set in the JITLRidge prediction model JITLtest,q ;
[0081] The output of the GPR model is:
[0082]
[0083] Where C is an n×n covariance matrix and C i,j =C(x i ,x j ), k * =[C(x * ,x1),…,C(x * ,x n )] T , the predicted value of the final model is determined as represents the prediction variance.
[0084] The Ridge model is expressed as:
[0085]
[0086] Among them, ω represents the regression weight, λ represents the penalty coefficient; x i and i Represents the i-th sample features and labels.
[0087] Optionally, the S5 includes:
[0088] ① Use LSTM prediction model, LSTMEcor prediction model and JITLRidge prediction model to test set D test Make predictions and obtain the respective power prediction values P LSTMtest,q ,P Ecortest,q ,P JITLtest,q ; Construct random forest query sample REP q ; said REP q The form is: (REP LSTMtest,q-l ,REP LSTMtest,q-l+1 ,…,REP LSTMtest,q ), REP LSTMtest,q =(R LSTMtest,q ,E LSTMtest,q ,P LSTMtest,q ), where R LSTMtest,q ,E LSTMtest,q ,P LSTMtest,q They represent the LSTM prediction model for the test set D test The actual power value, error value, and power prediction value obtained by prediction.
[0089] ② Random forest query sample REP q Input the random forest model to obtain the posterior probability value of the corresponding output;
[0090] ③Use the posterior probability value to weight the fusion of each power prediction value output to obtain the final prediction value:
[0091] Pre finall,q =p 0,q ×P JITLtest,q +p 1,q ×P Ecortest,q +p 2,q ×P LSTMtest,q
[0092] Where: p j,q (j=0, 1, 2) represent the posterior probability values with the minimum error when using the JITLRidge prediction model, the LSTMEcor prediction model, and the LSTM prediction model respectively; for example: p 0,j Indicates that when JITLRidge is used as the final prediction value of the jth sample, there is p 0,j The probability can minimize the error, and
[0093] Optionally, the D test It can also be constructed using online power data of wind farms collected in real time.
[0094] An optional implementation of the present invention is described in detail below. In this embodiment, data from a wind farm in Belgium in 2018 and 2019 are taken as an example. The historical measured power is used as input and the actual power is used as output.
[0095] Step 1: Select the data of a wind farm in Belgium in 2018 and 2019. The data records the real power of the wind farm every 15 minutes. In the 2-hour forecast, the time delay is set to 20 (historical 20*15=300mins), and there are 34,704 samples in 2018; in the 4-hour forecast, the time delay is set to 30 (historical 450mins), and there are 34,488 samples in 2018. At the same time, the data from January to December 2019 are constructed in the same way. A total of 3,600 samples are randomly selected from each month to form D val1 and D val2 , and the remaining samples in 2019 are used as the test set. The final sample set is: {(R t-l ,R t-l+1 ,…,R t ),R t+ahead}, where R t R represents the real power value at time t, l represents the delay variable, l = 20 in the 2-hour forecast and l = 30 in the 4-hour forecast.t+ahead is the predicted target value, i.e., the real power value at time t+ahead; ahead represents the advance step, ahead = 8 (8*15min = 2 hours) in the 2-hour prediction, and ahead = 16 (16*15min = 4 hours) in the 4-hour prediction. The data set is normalized using the Z-score.
[0096] Table 1 Case data set information used
[0097] Prediction duration l ahead 2018 <![CDATA[D val1 ]]> <![CDATA[D val2 ]]> 2 hours 20 8 34704 1800 1800 4 hours 30 16 34488 1800 1800
[0098] Step 2: Using the first dataset D y1 Train the offline LSTM network and save it to obtain the LSTM prediction model; use the LSTM prediction model to train the first validation set D val1 Make predictions and obtain the first validation set D val1 The power prediction value P corresponding to each sample in LSTM1,j1 , compare the power prediction value with the corresponding power true value R LSTM1,j1 Subtract and obtain the error value E LSTM1,j1 , the errors corresponding to all samples in the first validation set form an error series; the training set D of the LSTMEcor prediction model is constructed REP ; Wherein, j1 represents the j1th sample;
[0099] Step 3: The prediction process of the LSTMEcor prediction model is as follows:
[0100] ①Construct query sample REP of LSTMEcor prediction model j2 ;
[0101] ② Calculate query sample REP j2 and the training set D of the LSTMEcor prediction model REP The Euclidean similarity of all samples in the query is calculated, and the 80 most similar samples are selected; the GPR model is trained after normalization, and the error value E corresponding to the query sample is predicted j2 ;
[0102] ③ The predicted error value is used to compensate the power prediction value under the LSTM model to obtain the power prediction value P under the LSTMEcor model. Ecor,j2 :
[0103] P Ecor,j2 =P LSTM,j2 +E j2
[0104] Where: P Ecor,j2 is the power prediction value under the LSTMEcor prediction model, P LSTM2,j2 is the power prediction value under the LSTM prediction model.
[0105] Step 4: The prediction process of the JITLRidge prediction model is as follows:
[0106] ①Construct query sample R of JITLRidge prediction model j2 ;
[0107] ② Calculate query sample R j2 and the first validation set D val1 The Euclidean distance of all samples is calculated, and the 200 most similar samples are selected. After normalization, the Ridge model is trained and the corresponding prediction value of the query point is predicted as the prediction value P of the JITLRidge prediction model. JITL,j2 .
[0108] Step 5: Use the LSTM prediction model, LSTMEcor prediction model, and JITLRidge prediction model to test the second validation set D val2 Make predictions and obtain the power prediction value P of each sample in the second validation set under the LSTM prediction model. LSTM2,j2 , the power prediction value P under the LSTMEcor prediction model Ecor,j2 , the power prediction value P under the JITLRidge prediction model JITL,j2 , and then obtain the errors corresponding to all samples in the second validation set to form an error series; construct a random forest training set D RF , train and save the random forest model; where j2 represents the j2th sample;
[0109] Step 6: In the online implementation phase, the prediction results of the three models are integrated through the posterior probability of random forest classification. The specific implementation steps are as follows:
[0110] ① Use LSTM prediction model, LSTMEcor prediction model and JITLRidge prediction model to test set D test Make predictions and obtain their respective power prediction values P JITLtest,q ,P Ecortest,q ,P LSTMtest,q ; Construct random forest query sample REP q ;
[0111] ② Random forest query sample REP q Input the random forest model to obtain the posterior probability value of the corresponding output;
[0112] ③Use the posterior probability value to weight the fusion of each power prediction value output to obtain the final prediction value:
[0113] Pre finall,q =p 0,q ×P JITLtest,q +p1,q ×P Ecortest,q +p 2,q ×P LSTMtest,q
[0114] The present invention compares the following methods: (1) persistence; (2) LSTM; (3) JITLRidge; (4) LSTMEcor; (5) the method proposed by the present invention. The comparison results are shown in Table 2. 2 And the root mean square error RMSE is the performance evaluation index, and its calculation formula is:
[0115]
[0116] Where N test is the number of test samples, y i and are the predicted value, the actual value, and the mean of the actual value. The smaller the RMSE, the higher the R 2 The larger the value, the better the prediction performance of the model for matrix concentration.
[0117] Table 2 Comparison of prediction performance of different prediction methods in different months with 2 hours and 4 hours in advance
[0118]
[0119]
[0120] In the table, LSTMEcor represents the LSTM prediction value after adaptive error correction, and Proposed represents the method proposed in the present invention. It can be seen that the method proposed in this embodiment has a significant improvement over the persistence method, the LSTM before correction, the LSTM after correction (LSTMEcor), and the instant learning (JITLRidge), proving the effectiveness of integrating deep learning and adaptive mechanisms. And in the 2-hour prediction, it can be found that the performance of the LSTM before correction is slightly worse than that of the persistence method. This is because the LSTM is trained with data from the previous year, while the persistence method uses the most recently obtained true value as the prediction value and also has a certain update mechanism. However, after the instant learning error correction, its performance is better than the persistence method, which further proves the importance of the model's adaptive mechanism.
[0121] Figure 2 , Figure 3 The following table shows the 2-hour and 4-hour prediction curves of the proposed method on the test set (selecting the first 500 sample local graphs). It can be seen that the predicted value can follow the true value very well. Table 2 shows the R 2Compared with the RMSE results, it can be seen that the proposed method has higher R in both 2-hour prediction and 4-hour prediction. 2 and lower RMSE, the effectiveness of the proposed method is verified through experiments.
[0122] Embodiment 2: According to another aspect of the present invention, a wind power prediction system integrating deep learning and adaptive modeling mechanism is provided, comprising:
[0123] The partitioning module is used to collect the complete annual historical real power series data of the wind farm and construct a modeling data set according to different prediction durations; the modeling data set is divided into the first data set D y1 , the second data set D y2 ; The second data set D y2 Divide into the first validation set D val1 , the second validation set D val2 and the test set D test ;
[0124] The first acquisition module is used to use the first data set D y1 Train the LSTM network and save it to obtain the LSTM prediction model;
[0125] Building a module for using the LSTM prediction model to predict the first validation set D val1 Make predictions and build the training set D of the LSTMEcor prediction model REP ;
[0126] The second acquisition module is used to simultaneously use the LSTM prediction model, the LSTMEcor prediction model, and the JITLRidge prediction model to predict the second validation set D val2 Make predictions and construct random forest training set D RF , train and save the random forest model;
[0127] The third acquisition module is used to simultaneously use the LSTM prediction model, the LSTMEcor prediction model, and the JITLRidge prediction model to predict the test set D test Make predictions and obtain power prediction values under different models; construct random forest query samples REP q ; Input the random forest query sample into the random forest model to obtain the posterior probability value of the corresponding output; use the posterior probability value to weightedly fuse the outputs of each power prediction value to obtain the final prediction value.
[0128] It should be noted that the above-mentioned modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above-mentioned modules can be located in the same processor; and / or the above-mentioned units are located in different processors in any combination. The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.
[0129] The specific implementation modes of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above implementation modes, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.
Claims
1. A wind power prediction method integrating deep learning and adaptive modeling mechanism, characterized by: include: S1. Collect the complete annual historical real power series data of the wind farm and construct the modeling data set according to different prediction durations; Divide the modeling dataset into the first dataset D y1 , the second data set D y2 ; The second data set D y2 Divide into the first validation set D val1 , the second validation set D val2 and the test set D test ; S2. Using the first data set D y1 Train the LSTM network and save it to obtain the LSTM prediction model; S3. Use the LSTM prediction model to predict the first validation set D val1 Make predictions and build the training set D of the LSTMEcor prediction model REP ; S4. Simultaneously use LSTM prediction model, LSTM Ecor prediction model, and JITLRidge prediction model to predict the second validation set D val2 Make predictions and construct random forest training set D RF , train and save the random forest model; S5. Simultaneously use LSTM prediction model, LSTM Ecor prediction model, and JITLRidge prediction model to predict the test set D test Make predictions and obtain power prediction values under different models; construct random forest query samples REP q ; Input the random forest query sample into the random forest model to obtain the posterior probability value of the corresponding output; use the posterior probability value to weightedly fuse the outputs of each power prediction value to obtain the final prediction value; The prediction process of the LSTMEcor prediction model is as follows: ①Construct query sample REP of LSTMEcor prediction model j2 ; ② Calculate query sample REP j2 and the training set D of the LSTMEcor prediction model REP The Euclidean similarity of all samples in is calculated, and the most similar p1 samples are selected; the GPR model is trained after normalization, and the error value E corresponding to the query sample is predicted j2 ; ③ The predicted error value is used to compensate the power prediction value under the LSTM model to obtain the power prediction value P under the LSTMEcor model. Ecor,j2 : P Ecor,j2 =P LSTM,j2 +E j2 Where: P Ecor,j2 is the power prediction value under the LSTMEcor prediction model; The prediction process of the JITLRidge prediction model is as follows: ①Construct query sample R of JITLRidge prediction model j2 ; ② Calculate query sample R j2 and the first validation set D val1 The Euclidean distance of all samples is calculated, and the most similar p2 samples are selected; the Ridge model is trained after normalization, and the corresponding prediction value of the query point is predicted as the prediction value P of the JITLRidge prediction model JITL,j2 .
2. The wind power prediction method integrating deep learning and adaptive modeling mechanism according to claim 1 is characterized in that: S1 includes: collecting the complete annual historical real power series data of the wind farm, constructing a modeling data set according to different prediction durations; and dividing the modeling data set into a first data set D according to the annual sequence. y1 , the second data set D y2 ; In the second data set D y2 K samples are randomly selected every month and divided into two parts, namely the first validation set D val1 and the second validation set D val2 , the rest of the second data set is used as the test set D test ; The form of each sample in the modeling data set is: {x t ,y t }={(R t-l ,R t-l+1 ,…,R t ),R t+ahead }, x t As input, y represents the real power vector at time t. t As the output, it represents the predicted target value at time t, that is, the actual power value at time t+ahead, R t represents the real value of power at time t, l represents the delay variable, R t+ahead is the true value of the power at time t+ahead, where ahead represents the advance step and t represents time t or the tth sample.
3. The wind power prediction method integrating deep learning and adaptive modeling mechanism according to claim 1 is characterized in that: S3, comprising: using the LSTM prediction model to predict the first validation set D val1 Make predictions and obtain the first validation set D val1 The power prediction value P corresponding to each sample in LSTM1,j1 , compare the power prediction value with the corresponding power true value R LSTM1,j1 Subtract and obtain the error value E LSTM1,j1 , the errors corresponding to all samples in the first validation set form an error series; the training set D of the LSTMEcor prediction model is constructed REP ; where j1 represents the j1th sample.
4. The wind power prediction method integrating deep learning and adaptive modeling mechanism according to claim 3 is characterized in that: The D REP The sample format is: {(REP LSTM1,j1-l ,REP LSTM1,j1-l+1 ,…,REP LSTM1,j1 ),E LSTM1,j1+ahead }, ahead means the advance step, REP LSTM1,j1 =(R LSTM1,j1 ,E LSTM1,j1 ,P LSTM1,j1 ), ahead represents the advance step, and l represents the delay variable.
5. The wind power prediction method integrating deep learning and adaptive modeling mechanism according to claim 1 is characterized in that: S4 includes: using the LSTM prediction model, the LSTMEcor prediction model, and the JITLRidge prediction model to predict the second validation set D val2 Make predictions and obtain the power prediction value P of each sample in the second validation set under the LSTM prediction model. LSTM2,j2 , the power prediction value P under the LSTMEcor prediction model Ecor,j2 , the power prediction value P under the JITLRidge prediction model JITL,j2 , and then obtain the errors corresponding to all samples in the second validation set to form an error series; construct a random forest training set D RF , train and save the random forest model; where j2 represents the j2th sample.
6. The wind power prediction method integrating deep learning and adaptive modeling mechanism according to claim 5 is characterized in that: The D RF The sample form in is: {(REP LSTM2,j2-l ,REP LSTM2,j2-l+1 ,…,REP LSTM2,j2 ),L j2 }REP LSTM2,j2 =(R LSTM2,j2 ,E LSTM2,j2 ,P LSTM2,j2 ), Among them, R LSTM2,j2 represents the true value of the power corresponding to the j2th sample in the second validation set; E JITL,j2 ,E Ecor,j2 ,E LSTM2,j2 They respectively represent the error values corresponding to the j2th sample in the second validation set under different prediction models.
7. The wind power prediction method integrating deep learning and adaptive modeling mechanism according to claim 1 is characterized in that: The S5 comprises: ① Use LSTM prediction model, LSTMEcor prediction model and JITLRidge prediction model to test set D test Make predictions and obtain the respective power prediction values P LSTMtest,q ,P Ecortest,q ,P JITLtest,q ; Construct random forest query sample REP q ; The REP q The form is: (REP LSTMtest,q-l ,REP LSTMtest,q-l+1 ,…,REP LSTMtest,q ), REP LSTMtest,q =(R LSTMtest,q ,E LSTMtest,q ,P LSTMtest,q ), where R LSTMtest,q ,E LSTMtest,q ,P LSTMtest,q They represent the LSTM prediction model for the test set D test The actual power value, error value and predicted power value obtained by prediction; ② Random forest query sample REP q Input the random forest model to obtain the posterior probability value of the corresponding output; ③Use the posterior probability value to weight the fusion of each power prediction value output to obtain the final prediction value: Pre finall,q =p 0,q ×P JITLtest,q +p 1,q ×P Ecortest,q +p 2,q ×P LSTMtest,q Where: p j,q (j=0, 1, 2) respectively represent the posterior probability values that can obtain the minimum error when using the JITLRidge prediction model, LSTMEcor prediction model, and LSTM prediction model for prediction.
8. A wind power prediction system integrating deep learning and adaptive modeling mechanism, characterized by: include: The partitioning module is used to collect the complete annual historical real power series data of the wind farm and construct the modeling data set according to different prediction durations; Divide the modeling dataset into the first dataset D y1 , the second data set D y2 ; The second data set D y2 Divide into the first validation set D val1 , the second validation set D val2 and the test set D test ; The first acquisition module is used to use the first data set D y1 Train the LSTM network and save it to obtain the LSTM prediction model; Building a module for using the LSTM prediction model to predict the first validation set D val1 Make predictions and build the training set D of the LSTMEcor prediction model REP ; The second acquisition module is used to simultaneously use the LSTM prediction model, the LSTMEcor prediction model, and the JITLRidge prediction model to predict the second validation set D val2 Make predictions and construct random forest training set D RF , train and save the random forest model; The third acquisition module is used to simultaneously use the LSTM prediction model, the LSTMEcor prediction model, and the JITLRidge prediction model to predict the test set D test Make predictions and obtain power prediction values under different models; construct random forest query samples REP q ; Input the random forest query sample into the random forest model to obtain the posterior probability value of the corresponding output; use the posterior probability value to weightedly fuse the outputs of each power prediction value to obtain the final prediction value; The prediction process of the LSTMEcor prediction model is as follows: ①Construct query sample REP of LSTMEcor prediction model j2 ; ② Calculate query sample REP j2 and the training set D of the LSTMEcor prediction model REP The Euclidean similarity of all samples in is calculated, and the most similar p1 samples are selected; the GPR model is trained after normalization, and the error value E corresponding to the query sample is predicted j2 ; ③ The predicted error value is used to compensate the power prediction value under the LSTM model to obtain the power prediction value P under the LSTMEcor model. Ecor,j2 : P Ecor,j2 =P LSTM,j2 +E j2 Where: P Ecor,j2 is the power prediction value under the LSTMEcor prediction model; The prediction process of the JITLRidge prediction model is as follows: ①Construct query sample R of JITLRidge prediction model j2 ; ② Calculate query sample R j2 and the first validation set D val1 The Euclidean distance of all samples is calculated, and the most similar p2 samples are selected; the Ridge model is trained after normalization, and the corresponding prediction value of the query point is predicted as the prediction value P of the JITLRidge prediction model JITL,j2 .
