A wind power prediction method, system, device and medium
By using Granger causal testing and attention mechanism combined with convolutional neural network in the wind power prediction model, the problems of data redundancy and training speed of existing models are solved, and more efficient and accurate wind power prediction is achieved.
Patent Information
- Application Number
- CN202410532105.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-04-29
AI Technical Summary
Existing wind power power prediction models are difficult to fully explore the intrinsic correlation of time series data, and the training speed is slow when there is too much data, so they cannot take into account both reducing data redundancy and effectively retaining prediction information of the original data.
The attention mechanism based on Granger causality test and convolutional neural network combined with long and short-term memory neural network are used to determine the input variables through nonlinear Granger causality test, and the G-A-CNN-LSTM model is constructed, and wind power data of different seasons and cluster categories are selected for training and testing.
It improves the accuracy of wind power prediction, reduces the redundancy of input data, improves the training speed and generalization capabilities of the model, and can more accurately predict short-term wind power data.
Smart Images

Figure CN118396036B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electric energy, and in particular relates to a wind power prediction method, system, device and medium based on an attention mechanism of Granger causality test and a convolutional neural network combined with a long short-term memory neural network. Background Art
[0002] China is rich in wind energy resources, and developing wind power technology is an inevitable choice to adapt to the current development trend of my country. Since wind energy itself has the characteristics of randomness, volatility, and periodicity, it will cause the volatility and randomness of wind turbine output power. Large-scale wind power grid connection will inevitably have an adverse impact on the stable operation of the power grid. Therefore, wind power prediction technology can effectively solve the above problems to a certain extent, which is of great significance to the operation and maintenance, dispatching of the power system and the stable operation of the power market.
[0003] Scholars at home and abroad have been committed to using a variety of methods to improve the prediction effect of wind power. The physical model method and the statistical model method were initially successfully applied. In recent years, with the rapid growth of computer computing power, artificial intelligence methods represented by artificial neural networks and combined model methods that integrate the above methods have gradually been applied to wind power prediction. Common combined models can be divided into four categories: (1) combining prediction models with optimization algorithms for wind power prediction; (2) combining prediction models with data mining algorithms for wind power prediction; (3) combining prediction models with data mining algorithms and optimization algorithms for wind power prediction; (4) combining attention mechanisms with other models for wind power prediction.
[0004] The first three types of combination models are mainly based on reducing the subjectivity of manual adjustment of model parameters or reducing the redundancy and instability of original data when modeling. However, when making predictions, this type of model cannot fully explore the inherent correlation of time series data, and when there is a lot of data, the model training speed is slow due to the inability to parallelize calculations.
[0005] The attention mechanism does not use cyclic calculations but directly establishes the relationship between the model input and output. Therefore, it can be calculated in parallel, and the computing speed is greatly improved compared with conventional models. It also has a strong ability to capture remote dependency information. In recent years, it has been widely used in the field of wind power forecasting to solve the problems of the above-mentioned combined model and improve the prediction accuracy of wind power.
[0006] However, there are still the following problems in the prediction of wind power: when determining the input variables of the wind power prediction model, dimensionality reduction methods such as correlation analysis and principal component analysis are often used, or input variables are reversely selected based on the prediction results. Although these methods are widely used, they often cannot take into account both reducing data redundancy and effectively retaining the prediction information of the original data, and there are certain limitations on improving the prediction accuracy of the wind power prediction model.
[0007] In view of this, in order to improve the prediction accuracy of the wind power prediction model and solve the above-mentioned problems, the present invention is specially proposed. Summary of the invention
[0008] The present invention aims at the defects of the prior art and provides a wind power prediction method, system, device and medium, which can effectively improve the wind power prediction accuracy, predict the short-term output of wind power plants in the future, and provide more sufficient and reliable information for the dispatching and operation of power systems.
[0009] In order to achieve the above object, the present invention adopts the following technical solution:
[0010] A wind power prediction method comprises the following steps:
[0011] S1: Obtain historical data of wind farms, pre-process the historical data of wind farms, and perform correlation analysis on factors affecting wind power to select meteorological factors with better correlation;
[0012] S2: The meteorological series of different seasons were clustered using the k-means++ algorithm and the SOM algorithm. The clustering results of the k-means++ algorithm and the SOM model with different k values were comprehensively evaluated based on the entropy weight method, and different optimal clustering algorithms were selected for the original data of different seasons.
[0013] S3: After performing a nonlinear test on the original wind power sequence based on BDS, the nonlinear Granger causality test method is used to determine whether there is a Granger causal relationship between the meteorological sequence and the power generation sequence in wind power data of different seasons and different clustering categories, and to determine the input variables for the wind power prediction model based on the attention mechanism;
[0014] S4: Construct a model based on the attention mechanism of Granger causality test and convolutional neural network combined with long short-term memory neural network. Select the first 70% and 10% of wind power data in different seasons and different clustering categories as training sets and validation sets to train the model, and the last 20% as the test set to test the prediction effect of the model, and obtain the short-term wind power prediction value and prediction effect.
[0015] Furthermore, in step S1, the historical data includes measured meteorological data and actual power generation data, wherein the measured meteorological data includes wind speed and direction at 10m, 30m, 50m and 70m of the wind tower, as well as temperature, air pressure and relative humidity.
[0016] Furthermore, in step S2, the specific calculation steps of weighted comprehensive evaluation using the entropy weight method are as follows:
[0017] 1) Data standardization. There are two indicators for calculation:
[0018] Positive indicators:
[0019]
[0020] Negative indicators:
[0021]
[0022] in represents the jth index x j The normalized value of the i-th solution;
[0023] 2) Calculate the variability index: the jth index x j The variability index of the i-th solution is:
[0024]
[0025] 3) Calculate information entropy: The information entropy of the jth indicator is:
[0026]
[0027] 4) Calculate the information entropy redundancy: The information entropy redundancy of the jth indicator is:
[0028] g j =1-e j (5)
[0029] 5) Calculate the weight of each indicator: The weight of the jth indicator is:
[0030]
[0031] Where m represents the number of indicators.
[0032] 6) Calculate the comprehensive scores of different solutions: The comprehensive score of the i-th solution is:
[0033]
[0034] The one with the highest score is the best solution.
[0035] Furthermore, in step S2, the entropy weight method is used to weight and evaluate the optimal clustering of the original wind power data, and the process is as follows:
[0036] 1) Calculate the input variables of clustering algorithms in different seasons and normalize them. The input variables include meteorological factors with good correlation with wind power in different seasonal categories selected by S1, as well as the daily average μ and intraday variance σ of wind power. 2 , intraday kurtosis kur and intraday skew. The calculation formulas are:
[0037]
[0038]
[0039]
[0040]
[0041] where x i represents some data in the original wind power sequence, and n represents the total number of data in different seasons;
[0042] 2) Cluster analysis of meteorological series in different seasons was performed using k-means++ algorithm and SOM algorithm with different k values;
[0043] 3) Calculate the clustering results of the power series based on the clustering results of the meteorological series, and calculate the CH score values of the two respectively;
[0044] 4) The entropy weight method is used to weight the CH scores of meteorological series and wind power series in different seasons;
[0045] 5) Filter out the optimal clusters in different seasons.
[0046] Furthermore, in step S3, the specific definition of BDS is as follows:
[0047] For a random variable sequence {u t , t=1,…,T}, where the variables are independent and identically distributed, and the relevant integral is:
[0048]
[0049] in, is{u t}The random vector sequence is constructed in a certain way, and m is the embedding dimension.
[0050] The central limit theorem of the relevant integral under the null hypothesis is as follows:
[0051] When m≥2, T→∞ and Sometimes, there are
[0052]
[0053]
[0054] in, Indicates the probability of the following events occurring simultaneously; express A consistent estimate of ; N(0,1) represents the standard normal distribution.
[0055] Will and Substitute the consistent estimate of V m The expression of is:
[0056]
[0057] in, Indicates that the distribution converges under the original hypothesis; W m,T (∈) is the expression of the BDS test statistic, and its rejection region is |W m,T (∈)|>z α / 2 , z α / 2 Represents the α / 2 upper quantile of the standard normal distribution.
[0058] Furthermore, in step S3, the specific steps of the nonlinear Granger causality test method are as follows:
[0059] set up The null hypothesis is:
[0060]
[0061] Where f represents the joint probability distribution function, g(X, Y, Z) is denoted as g, which is a weight function that is always positive. There are three possible values: g1 = f Y (y), g3=f Y (y) / f X,Y (x, y).
[0062] According to the value of g2, the original hypothesis is simplified to:
[0063] q=E[f x,y,z (X, Y, Z)f Y (Y)-f X,Y (X, Y)f Y,Z (Y, Z)] (17)
[0064] Then, based on the exponential function, the natural estimate of the null hypothesis can be obtained as:
[0065]
[0066] in (||·||) represents the norm.
[0067] D W The random variable W in W i The local density estimate at is expressed as:
[0068]
[0069] Substituting into the above formula, we get the estimate of the null hypothesis:
[0070]
[0071] In meeting d X =d Y =d Z Under the premise of , ε is expressed as:
[0072] ε n =C n -β (twenty one)
[0073] And when If the original hypothesis "X t Not Y t If the Granger causation is true, then the following conclusions hold:
[0074]
[0075] Furthermore, in step S4, the convolutional neural network includes: an input layer, a convolutional layer, a pooling layer and a fully connected layer, and its calculation process includes convolution calculation and pooling calculation. The specific calculation process is as follows:
[0076] The calculation formula for convolution is:
[0077]
[0078] in, Represents the value of the lth layer at position (i, j) after convolution calculation; Table 1 shows the weight of the mth row and nth column of the lth layer; g represents the activation function; f represents the size of the convolution kernel; b l Represents the bias term of the lth layer.
[0079] Furthermore, in step S4, the cell state of the long short-term memory neural network is controlled by three "gates": forget gate, input gate and output gate, and the calculation process is as follows:
[0080] 1) The forget gate discards information. The forget gate is based on the current input x t And the output h at the previous momentt-1 Determine how much of the cell state at the previous moment can be saved. The calculation formula of the forget gate is as follows:
[0081] f t =σ(W f ·[h t-1 , x t ]+b f ) (twenty four)
[0082] Among them, W f represents the parameter matrix, σ represents the sigmoid activation function, b f represents the bias term, f t Indicates the proportion of cell state saved at the previous moment. The calculation formula of the sigmoid activation function is:
[0083]
[0084] 2) Input gate adds information. The input gate adds information according to h t-1 and x t Determines the ratio of the current information added into the cell state.
[0085] i t =σ(W i ·[h t-1 , x t ]+b i ) (26)
[0086]
[0087] in, represents candidate cell information, i t represents the ratio of added information, tanh represents the tanh activation function, and its calculation formula is:
[0088]
[0089] 3) Update the cell state. Update the cell state according to the calculated cell state preservation ratio, added information ratio, last moment cell information, and candidate cell information.
[0090]
[0091] 4) Output gate outputs the result. The output gate determines the output ratio of the current cell state based on the current input and the previous output.
[0092] o t =σ(W o ·[h t-1 , x t ]+b o ) (30)
[0093] h t =o t *tanh(C t ) (31)
[0094] Among them, t Indicates the current cell state preservation ratio.
[0095] The present invention also discloses a wind power prediction system, which can be used to implement the above-mentioned wind power prediction method, including:
[0096] The data acquisition module pre-processes the original data and performs correlation analysis on the factors affecting wind power to select meteorological factors with better correlation;
[0097] The data analysis module uses the k-means++ algorithm and the SOM algorithm to cluster the meteorological series of different seasons. Based on the entropy weight method, the clustering results of the k-means++ algorithm and the SOM model with different k values are comprehensively evaluated, and different optimal clustering algorithms are selected for the original data of different seasons.
[0098] The data causality test module uses the nonlinear Granger causality test method to determine whether there is a Granger causal relationship between the meteorological sequence and the power generation sequence in the wind power data of different seasons and different clustering categories, and determines the input variables for the wind power prediction model based on the attention mechanism.
[0099] The data prediction module constructs a model based on the attention mechanism of Granger causality test and the convolutional neural network combined with the long short-term memory neural network. The first 70% and 10% of the wind power data of different seasons and different clustering categories are selected as the training set and validation set to train the model, and the last 20% is used as the test set to test the prediction effect of the model, and the short-term wind power prediction value and prediction effect are obtained.
[0100] The present invention also discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned wind power prediction method is implemented.
[0101] Compared with the prior art, the advantages of the present invention are:
[0102] The method of using nonlinear Granger causality test to determine the input variables of the prediction model can help CNN extract accurate historical data features, reduce input data redundancy, and improve the prediction accuracy of the Attention-LSTM model.
[0103] The constructed GA-CNN-LSTM model has improved prediction effects in all categories compared with the LSTM and CNN-LSTM models. This also shows that the model that combines the Granger causality test and attention mechanism with the traditional deep learning network can make more accurate short-term predictions of future wind power data compared with the original model and has better generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0104] Figure 1 It is a flow chart of a wind power prediction method based on the attention mechanism of Granger causality test and convolutional neural network combined with long short-term memory neural network of the present invention;
[0105] Figure 2 This is a flow chart of evaluating clustering effect using the entropy weight method in an embodiment of the present invention;
[0106] Figure 3 This is a clustering result diagram of the first and third categories of summer and autumn clustered by using the SOM algorithm in an embodiment of the present invention;
[0107] Figure 4 It is an overall structure diagram of a wind power prediction model based on CNN-LSTM-Attention in an embodiment of the present invention;
[0108] Figure 5 It is an overall structure diagram of a wind power prediction model based on LSTM-Attention in an embodiment of the present invention;
[0109] Figure 6 1 is a comparison chart of the prediction effects of GA-CNN-LSTM and GA-LSTM in an embodiment of the present invention;
[0110] Figure 7 This is a comparison chart of the prediction effects of CNN-LSTM and LSTM in an embodiment of the present invention;
[0111] Figure 8 This is a diagram showing the wind power ramp event recognition results for the second type of test set in summer and autumn in an embodiment of the present invention. DETAILED DESCRIPTION
[0112] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0113] Example 1
[0114] like Figure 1As shown, a wind power prediction method includes the following steps:
[0115] S1: Obtain historical data of wind farms, pre-process the historical data of wind farms, and perform correlation analysis on factors affecting wind power to select meteorological factors with better correlation;
[0116] S2: The meteorological series of different seasons were clustered using the k-means++ algorithm and the SOM algorithm. The clustering results of the k-means++ algorithm and the SOM model with different k values were comprehensively evaluated based on the entropy weight method, and different optimal clustering algorithms were selected for the original data of different seasons.
[0117] S3: After performing a nonlinear test on the original wind power sequence based on BDS, the nonlinear Granger causality test method is used to determine whether there is a Granger causal relationship between the meteorological sequence and the power generation sequence in wind power data of different seasons and different clustering categories, and to determine the input variables for the wind power prediction model based on the attention mechanism;
[0118] S4: Construct a model based on the attention mechanism of Granger causality test and convolutional neural network combined with long short-term memory neural network. Select the first 70% and 10% of wind power data in different seasons and different clustering categories as training sets and validation sets to train the model, and the last 20% as the test set to test the prediction effect of the model, and obtain the short-term wind power prediction value and prediction effect.
[0119] Furthermore, in step S1, the historical data includes measured meteorological data and actual power generation data, wherein the measured meteorological data includes wind speed and direction at 10m, 30m, 50m and 70m of the wind tower, as well as temperature, air pressure and relative humidity.
[0120] Furthermore, in step S2, the specific calculation steps of weighted comprehensive evaluation using the entropy weight method are as follows:
[0121] 1) Data standardization. There are two indicators for calculation:
[0122] Positive indicators:
[0123]
[0124] Negative indicators:
[0125]
[0126] in represents the jth index x j The normalized value of the i-th solution;
[0127] 2) Calculate the variability index: the jth index xj The variability index of the i-th solution is:
[0128]
[0129] 3) Calculate information entropy: The information entropy of the jth indicator is:
[0130]
[0131] 4) Calculate the information entropy redundancy: The information entropy redundancy of the jth indicator is:
[0132] g j =1-e j (5)
[0133] 5) Calculate the weight of each indicator: The weight of the jth indicator is:
[0134]
[0135] Where m represents the number of indicators.
[0136] 6) Calculate the comprehensive scores of different solutions: The comprehensive score of the i-th solution is:
[0137]
[0138] The one with the highest score is the best solution.
[0139] Furthermore, in step S2, the entropy weight method is used to weight and evaluate the optimal clustering of the original wind power data, and the process is as follows:
[0140] 1) Calculate the input variables of clustering algorithms in different seasons and normalize them. The input variables include meteorological factors with good correlation with wind power in different seasonal categories selected by S1, as well as the daily average μ and intraday variance σ of wind power. 2 , intraday kurtosis kur and intraday skew. The calculation formulas are:
[0141]
[0142]
[0143]
[0144]
[0145] where x i represents some data in the original wind power sequence, and n represents the total number of data in different seasons;
[0146] 2) Cluster analysis of meteorological series in different seasons was performed using k-means++ algorithm and SOM algorithm with different k values;
[0147] 3) Calculate the clustering results of the power series based on the clustering results of the meteorological series, and calculate the CH score values of the two respectively;
[0148] 4) The entropy weight method is used to weight the CH scores of meteorological series and wind power series in different seasons;
[0149] 5) Filter out the optimal clusters in different seasons.
[0150] Furthermore, in step S3, the BDS is used to perform a nonlinear test on the original wind power sequence. The core of the BDS test statistic is the correlation integral, which is specifically defined as follows:
[0151] For a random variable sequence {u t , t=1,…,T}, where the variables are independent and identically distributed, and the relevant integral is:
[0152]
[0153] in, is{u t}The random vector sequence is constructed in a certain way, and m is the embedding dimension.
[0154] The central limit theorem of the relevant integral under the null hypothesis is as follows:
[0155] When m≥2, T→∞ and Sometimes, there are
[0156]
[0157]
[0158] in, Indicates the probability of the following events occurring simultaneously; express A consistent estimate of ; N(0,1) represents the standard normal distribution.
[0159] Will and Substitute the consistent estimate of V m The expression of is:
[0160]
[0161] in, Indicates that the distribution converges under the original hypothesis; W m,T (∈) is the expression of the BDS test statistic, and its rejection region is |Wm,T (∈)|>z α / 2 , z α / 2 Represents the α / 2 upper quantile of the standard normal distribution.
[0162] Furthermore, in step S3, the specific principle of the nonlinear Granger causality test method is as follows:
[0163] set up The null hypothesis is:
[0164]
[0165] Where f represents the joint probability distribution function, g(X, Y, Z) is denoted as g, which is a weight function that is always positive. There are three possible values: g1 = f Y (y), g3=f Y (y) / f X,Y (x, y).
[0166] According to the value of g2, the original hypothesis is simplified to:
[0167] q=E[f X,Y,Z (X, Y, Z)f Y (Y)-f X,Y (X, Y)f Y,Z (Y, Z)] (17)
[0168] Then, based on the exponential function, the natural estimate of the null hypothesis can be obtained as:
[0169]
[0170] in (||·||) represents the norm.
[0171] D W The random variable W in W i The local density estimate at is expressed as:
[0172]
[0173] Substituting into the above formula, we get the estimate of the null hypothesis:
[0174]
[0175] In meeting d X =d Y =d Z Under the premise of , ε can be expressed as:
[0176] ε n =Cn -β (twenty one)
[0177] And when If the original hypothesis "X t Not Y t Granger causality is true, the following conclusions hold:
[0178]
[0179] Furthermore, in step S4, the convolutional neural network (CNN) is usually composed of four parts: input layer, convolution layer, pooling layer and fully connected layer. The main calculation process is convolution calculation and pooling calculation. The specific calculation process is as follows:
[0180] The calculation formula for convolution is:
[0181]
[0182] in, Represents the value of the lth layer at position (i, j) after convolution calculation; Table 1 shows the weight of the mth row and nth column of the lth layer; g represents the activation function (Relu activation function is usually used in CNN); f represents the size of the convolution kernel; b l Represents the bias term of the lth layer.
[0183] There are many ways to calculate pooling, the more common ones are average pooling, maximum pooling and K-max pooling. Average pooling refers to calculating the average value of all data points in a certain area block and taking the average value as the output result; maximum pooling refers to taking the maximum data in a certain area block as the output result; K-max pooling refers to taking the first K maximum values in a certain area block as the output result.
[0184] Furthermore, in step S4, the cell state of the long short-term memory neural network (LSTM) is controlled by three "gates": forget gate, input gate and output gate, and the calculation process is divided into the following four steps:
[0185] 1) The forget gate discards information. The forget gate is based on the current input x t And the output h at the previous moment t-1 Determine how much of the cell state at the previous moment can be saved. The calculation formula of the forget gate is as follows:
[0186] f t =σ(W f ·[h t-1 , x t ]+b f ) (twenty four)
[0187] Among them, W f represents the parameter matrix, σ represents the sigmoid activation function, b frepresents the bias term, f t Indicates the proportion of cell state saved at the previous moment. The calculation formula of the sigmoid activation function is:
[0188]
[0189] 2) Input gate adds information. The input gate adds information according to h t-1 and x t Determines the ratio of the current information added into the cell state.
[0190] i t =σ(W i ·[h t-1 , x t ]+b i ) (26)
[0191]
[0192] in, represents candidate cell information, i t represents the ratio of added information, tanh represents the tanh activation function, and its calculation formula is:
[0193]
[0194] 3) Update the cell state. Update the cell state according to the calculated cell state preservation ratio, added information ratio, last moment cell information, and candidate cell information.
[0195]
[0196] 4) Output gate outputs the result. The output gate determines the output ratio of the current cell state based on the current input and the previous output.
[0197] o t =σ(W o ·[h t-1 ,x t ]+b o ) (30)
[0198] h t =o t *tanh(C t ) (31)
[0199] Among them, t Indicates the current cell state preservation ratio.
[0200] Furthermore, in step S4, the wind power prediction method based on the attention mechanism and convolutional neural network combined with long short-term memory neural network (CNN-LSTM-Attention) is as follows:
[0201] For wind power data of different seasons and different clustering categories, we first use one-dimensional convolution (Conv1D) to extract input meteorological data and wind power features, then use maximum pooling (Maxpooling) to discard redundant information, and after the output results of CNN are regularized, the LSTM network is used to extract time series features. Finally, the attention layer is used to highlight important information from the output of the LSTM network, and the model output results are sent to the fully connected layer to obtain the wind power prediction results.
[0202] The wind power prediction model based on the attention mechanism and convolutional neural network combined with long short-term memory neural network (CNN-LSTM-Attention) is written in the Tensorflow framework. The model parameters and training methods are as follows:
[0203] Parameters of the CNN layer and the training method of the model: the number of convolutional layers is 3, the number of convolution kernels in the three layers are 4, 16, and 32 respectively, relu is selected for activation, and maximum pooling is selected for pooling calculation.
[0204] Parameters of the LSTM layer and the training method of the model: the number of stacked layers of the network is 2, the number of neurons in the first layer is 128, the number of neurons in the second layer is 256, Dropout is set in the second layer and the ratio is 0.1, the moving time step is 4, the prediction method is single-step prediction (that is, the meteorological factors and wind power of the previous hour are used to predict the wind power of the next moment), the batch size is 100, the gradient descent algorithm is Adam, and the activation function is relu. The training method is to use the model parameter saving function provided by Tensorflow, and train 100 times, 50 times, and 50 times at the learning rate of 1×10-4, 1×10-5, and 1×10-6.
[0205] The following is an experiment based on the above wind power prediction method, which specifically includes the following steps:
[0206] Step S1. Before conducting the correlation analysis, based on the seasonal characteristics analysis of wind power generation, the wind power data is divided into three types: spring, summer, autumn and winter. The Spearman correlation coefficient and Kendall correlation coefficient are used to perform correlation analysis on the measured meteorological data and actual power generation data of a wind farm in central China for two years from January 1, 2019 to December 31, 2020. The wind power and meteorological factors in the three seasonal category data are selected according to the degree of correlation. Finally, 30m wind speed and 50m wind speed in summer and autumn, 30m wind speed, 50m wind speed and 70m wind speed in spring, and 10m wind speed, 30m wind speed and 50m wind speed in winter are selected as the model input variables for subsequent cluster analysis.
[0207] Step S2: Use entropy weight method to evaluate clustering effect. The specific flow chart is as follows: Figure 2 Before using the entropy weight method, the k-means++ algorithm and SOM algorithm with different k values were used to perform cluster analysis on the meteorological series of different seasons. The clustering results of the power series were calculated based on the clustering results of the meteorological series, and the CH scores of the two were calculated respectively.
[0208] The CH scores of the meteorological series and power series clustering results of the two clustering algorithms are shown in Tables 1 and 2.
[0209] Table 1 k-means++ algorithm calculation results
[0210]
[0211] Table 2 SOM algorithm calculation results
[0212]
[0213]
[0214] From the above calculation results, it can be seen that for the clustering results in summer and autumn, if the CH score of the meteorological series clustering results is evaluated alone, the value of the SOM algorithm is 212.349, which is significantly greater than the k-means++ algorithm with all k values, so its clustering effect should be the best. However, at this time, the CH score of the power clustering result of the k-means++ algorithm with a k value of 2 is 265.259, which is significantly higher than the 226.939 of the SOM algorithm, and its power series clustering effect is better than the latter. It can be seen that there is an obvious "one rises and the other falls" relationship between the two CH scores. Therefore, it is necessary to conduct a comprehensive analysis of the calculation results of the CH score to select the optimal clustering of the original wind power data in different seasons.
[0215] Since the larger the CH score result, the better the clustering effect, the CH score is regarded as a positive indicator when performing normalization calculation. The CH score normalization matrix of the clustering results of wind power data in different seasonal categories and the weight results calculated according to the entropy weight method are shown in Tables 3 and 4.
[0216] Table 3 Normalization results of wind power data clustering evaluation indicators
[0217]
[0218] Table 4 Weights of evaluation indicators for wind power data clustering results
[0219]
[0220] According to the above results, the comprehensive scores of different clustering algorithm schemes are calculated using formula (7). The calculation results are shown in Table 5.
[0221] Table 5 Comprehensive evaluation scores of wind power data clustering algorithms in different seasons
[0222]
[0223] According to the above results, for the summer and autumn wind power data, the comprehensive score of the SOM algorithm is 0.905, which is higher than the comprehensive score of the k-means++ algorithm; while for the spring and winter data, the k-means++ algorithm with a k value of 2 has the highest score, with a comprehensive score of 0.963 and 1.281. Therefore, for the wind power data in summer and autumn, the SOM algorithm is used for cluster analysis; for the wind power data in spring and winter, the k-means++ algorithm is used for cluster analysis, and the k value is 2.
[0224] According to the above results, SOM and k-means++ algorithms were used to perform cluster analysis on the original wind power data in different seasons. The characteristics of each category are shown in Table 6.
[0225] Table 6 Clustering results in different seasons
[0226]
[0227] Figure 3 The results of clustering the first and third categories using the SOM algorithm in summer and autumn are shown. It can be seen that the curve characteristics of each category are different. The clustering curves of 30m wind speed, 50m wind speed and the third category of power generation in summer and autumn are relatively tight. At the same time, it is noted that the first category of wind power curve clusters in summer and autumn are relatively sparse, but the overall volatility and symmetry of the curve clusters are relatively similar. The curves have no obvious left or right deviations while fluctuating greatly. Combining these two points, it can be seen that the clustering effect of the original sequence in summer and autumn is good.
[0228] Step S3: Before performing the BDS test, a VAR model is selected to eliminate the linear components of the meteorological series and the power series, and then a nonlinear feature test is performed on the generated residual series.
[0229] The BDS test was carried out using the 10m wind speed and power generation in the first type of wind power sequence in spring as an example, and the results are shown in Table 7.
[0230] Table 7 BDS test results of the first type of 10m wind speed and power generation in spring
[0231]
[0232] As can be seen from the table above, the Z statistics obtained by the BDS test are all greater than the critical values of 1.96 and 2.58 of the normal distribution at the 5% and 10% significance levels when the embedding dimension is taken from 2 to 6. At the same time, the p values corresponding to the 10m wind speed and power generation are also very close to 0, so the original hypothesis is rejected, indicating that the 10m wind speed and historical power data of the first category in spring have nonlinear characteristics. After calculation, the BDS test rejected the hypothesis that all sequences in the spring, summer, autumn and winter wind power data have linear characteristics. Based on this, the nonlinear Granger causality test method is selected to determine whether there is a Granger causal relationship between the meteorological sequence and the power generation sequence in wind power data of different seasons and different clustering categories.
[0233] The software developed by Diks and Panchenko was used to perform nonlinear Granger causality tests on wind power data of different seasons and different clustering categories. The test data was based on the residual sequence generated above. The bandwidth was selected as 0.5 and the lag order was selected as 2 to 4. The calculation results are shown in Tables 8 to 14.
[0234] Table 8 Granger causality test results between the first type of meteorological data in spring and power generation
[0235]
[0236] Table 9 Granger causality test results between the second type of meteorological data in spring and power generation
[0237]
[0238] Table 10 Granger causality test results between the first type of meteorological data in summer and autumn and power generation
[0239]
[0240]
[0241] Table 11 Granger causality test results between the second type of meteorological data in summer and autumn and power generation
[0242]
[0243] Table 12 Granger causality test results between the third type of meteorological data in summer and autumn and power generation
[0244]
[0245]
[0246] Table 13 Granger causality test results between the first type of meteorological data and power generation in winter
[0247]
[0248] Table 14 Granger causality test results between the second type of meteorological data and power generation in winter
[0249]
[0250] According to the above calculation results, at the 5% significance level, for the first type of 10m wind speed sequence in spring, when the lag order is 2, 3, and 4, the p-values obtained by testing are very close to 0, so the null hypothesis is rejected. Therefore, there is reason to believe that the 10m wind speed is the nonlinear Granger cause of the change in power generation; for the first type of 10m wind direction sequence in spring, when the lag order is 2, 3, and 4, the p-values obtained by testing are 0.811, 0.993, and 0.999, all greater than the critical value of 0.05, so the null hypothesis is not rejected. Therefore, there is no evidence that the 10m wind direction is the nonlinear Granger cause of power change; for the first type of temperature sequence in summer and autumn, when the lag order is 2, the p-value obtained by testing is 0.022, which is less than the critical value of 0.05, so the null hypothesis is rejected. Therefore, there is reason to believe that temperature is the nonlinear Granger cause of wind power change. For the rest of the data, the argumentation method is the same. The final test results are shown in Table 15.
[0251] Table 15 Nonlinear Granger causality test results for different seasons and cluster categories
[0252]
[0253] *Note: “+” means yes, “-” means no
[0254] From the test results, it can be seen that in the wind power sequences of different seasons and different clustering categories, all wind speed sequences are nonlinear Granger causes of wind power changes, which is consistent with the principle of wind power generation. At the same time, the air pressure sequences in all categories are also nonlinear Granger causes of wind power changes. From the principle of wind speed change, it can be seen that pressure produces wind, and the size of wind speed is proportional to the pressure gradient, so the change of air pressure can indirectly cause the change of wind power. Combining these two points, it can be seen that the method of using Granger causality test to determine the input variables of the prediction model can not only identify the direct factors that cause wind power changes, but also identify the factors that cause wind speed changes, which is consistent with the basic principle of wind power generation.
[0255] In summary, the method of using Granger causality test to determine the input variables of the prediction model obtains more prediction information than the results of the previous correlation analysis, while eliminating redundant meteorological variables, solving the problem that the traditional method of determining the input variables of the wind power prediction model cannot take both into account.
[0256] Step S4: construct the following wind power prediction models, which are a model based on the attention mechanism and convolutional neural network combined with long short-term memory neural network (abbreviated as A-CNN-LSTM) and a model based on the attention mechanism and long short-term memory neural network (abbreviated as A-LSTM), such as Figure 4 and Figure 5 To facilitate the comparison of model prediction accuracy, the models that add Granger causality test to determine the input variables are called GA-CNN-LSTM and GA-LSTM, and the output results of LSTM and CNN-LSTM are calculated synchronously.
[0257] In order to quantitatively analyze the prediction results and verify the effectiveness of the method proposed in this invention, the determination coefficient (R-squared, R 2 ), Mean Absolute Error (MAE), Root Mean Square Error (RMSE) and Model prediction accuracy (MPA) as evaluation indicators. At the same time, in order to analyze the final prediction results more comprehensively, the experimental results are divided into two parts. First, the prediction results of all categories of test sets are analyzed as a whole, and then the prediction results of wind power ramp power in some test sets are comprehensively compared.
[0258] The first 70% and 10% of wind power data from different seasons and different clustering categories were selected as training sets and validation sets to train the model, and the last 20% was used as the test set to test the prediction effect of the model. The calculation results of the wind power prediction effect evaluation index of each test set are shown in Tables 16 to 22.
[0259] Table 16 Evaluation indexes of wind power prediction effect of different models in the first category in spring
[0260]
[0261]
[0262] Table 17 Evaluation indexes of wind power prediction effect of different models in the second category in spring
[0263]
[0264] Table 18 Evaluation indexes of wind power prediction effect of different models in the first category in summer and autumn
[0265]
[0266] Table 19 Evaluation indexes of wind power prediction effect of different models in the second category in summer and autumn
[0267]
[0268] Table 20 Evaluation indexes of wind power prediction effect of different models in the third category in summer and autumn
[0269]
[0270] Table 21 Evaluation indexes of wind power prediction effect of different models in the first category in winter
[0271]
[0272] Table 22 Evaluation indexes of wind power prediction effect of different models of the second type in winter
[0273]
[0274] Based on the above calculation results, we can further analyze and draw the following conclusions:
[0275] (1) As shown in Tables 23 and 24, compared with the prediction model without nonlinear Granger causality test, the MPA of the GA-CNN-LSTM model constructed by the present invention and the GA-LSTM model similar thereto in different seasons and different clustering categories are improved, and the RMSE is reduced, which shows that the method of determining the input variables of the prediction model by using the nonlinear Granger causality test can effectively improve the prediction accuracy of the model while reducing the redundancy of input data and making full use of the original data prediction information. In addition, the prediction effect of the constructed GA-CNN-LSTM and the GA-LSTM model similar thereto is improved in all categories compared with the LSTM and CNN-LSTM models, which also shows that the model combining the Granger causality test and the attention mechanism with the traditional deep learning network can make more accurate short-term predictions of future wind power data compared with the original model, and has better generalization ability.
[0276] Table 23 Comparison of model prediction effects before and after nonlinear Granger causality test
[0277]
[0278]
[0279] Table 24 Comparison of prediction effects between G-A-CNN-LSTM, GA-LSTM model and original model
[0280]
[0281] *Note: “↑” indicates rising, “↓” indicates falling
[0282] (2) Figure 6 and 7 As shown in the figure, for the GA-LSTM model, the prediction effect of the GA-CNN-LSTM model with CNN added to extract input data features is improved in all categories. However, the prediction effect of the single CNN-LSTM model is not better than that of the LSTM model in all categories. In the first category of summer and autumn, the second category of summer and autumn, and the second category of winter, the prediction accuracy decreased by 2.27%, 1.29%, and 0.20%, respectively, and the RMSE increased by 6.46%, 8.30%, and 1.26%, respectively. This shows that the method of determining the model input variables by nonlinear Granger causality test can help CNN extract more accurate features of data at different times, thereby improving the prediction accuracy of the model. However, the method of inputting all meteorological variables into the model for calculation, due to the impurities in the data, even if the features of historical data are extracted by CNN, is easy to cause the model to learn the wrong mapping relationship, which ultimately reduces the prediction accuracy.
[0283] Wind power ramping events refer to the phenomenon that wind farm power changes significantly in a short period of time when extreme weather occurs. The emergence of this phenomenon will have a strong impact on the new power system and bring great difficulties to the stable operation of the power grid. Based on this, this example analyzes the prediction effect when wind power ramping events occur separately on the basis of an overall analysis of the prediction results of all clustering category test sets, in order to test the comprehensive prediction ability of the constructed model.
[0284] The prediction result of the wind power ramp event referred to in this example refers to the use of the ramp definition to identify the ramp events in the test set, and the identified results are used as the prediction results. When the change in wind power in 1 hour exceeds 15% to 20% of the total installed capacity, it is determined that a ramp event has occurred. Therefore, the ramp amplitude threshold of the wind farm studied in this example can be obtained It is about 14.85~19.8MW. The average value is 17.33MW.
[0285] The second test set in summer and autumn, which has relatively more samples and relatively larger power variation, is selected to identify wind power ramp events. The results are as follows: Figure 8 shown.
[0286] Since climbing power is intermittent data, the MAE, RMSE and MPA of the climbing event prediction results are calculated to evaluate the prediction effect of the model, as shown in Table 25.
[0287] Table 25 Evaluation indexes of the second type of wind power ramp prediction effect in summer and autumn
[0288]
[0289] According to the above results, the prediction of wind power ramping power has almost reached the same conclusion as above. The prediction accuracy of GA-CNN-LSTM and GA-LSTM, which have determined the model input variables through Granger causality test, is 3.95% and 5.03% higher than that of the models without Granger test, and the RMSE is reduced by 15.4% and 18.1% respectively; among all the prediction models, GA-CNN-LSTM has the best prediction effect; the method combining attention mechanism and Granger causality test effectively improves the prediction effect of CNN-LSTM and LSTM models, and the prediction accuracy is improved by 5.38% and 3.34% respectively, and the RMSE is reduced by 19.6% and 15.4% respectively.
[0290] Based on all the above calculation results, the wind power prediction model that combines Granger causality test and attention mechanism can not only improve the overall prediction performance of the model, but also achieve better prediction of wind power ramping power with large fluctuations.
[0291] Example 2
[0292] Based on the same inventive concept as the above-mentioned embodiment 1, the present application also provides a wind power prediction system, including a data acquisition module, a data analysis module, a data causality verification module and a data prediction module:
[0293] Data acquisition module: Identify and correct abnormal data in the original data of the wind farm, and conduct correlation analysis between meteorological factors and wind power in different seasonal categories, screen out meteorological factors with good correlation, and provide input variables for subsequent cluster analysis;
[0294] Data analysis module: The meteorological series of different seasons were clustered using the k-means++ algorithm and the SOM algorithm. The clustering results of the k-means++ algorithm and the SOM model with different k values were comprehensively evaluated based on the entropy weight method, and different optimal clustering algorithms were selected for the original data of different seasons.
[0295] Data causality test module: For the original wind power sequence after BDS nonlinear test, the nonlinear Granger causality test method is used to determine whether there is a Granger causal relationship between the meteorological sequence and the power generation sequence in the wind power data of different seasons and different clustering categories, and to determine the input variables for the wind power prediction model based on the attention mechanism;
[0296] Data prediction module: Build a model based on attention mechanism and convolutional neural network combined with long short-term memory neural network (GA-CNN-LSTM). Select the first 70% and 10% of wind power data in different seasons and clustering categories as training sets and validation sets to train the model, and the last 20% as the test set to test the prediction effect of the model, and obtain the short-term wind power prediction value and prediction effect.
[0297] Embodiment 3 This embodiment provides an electronic device for implementing a method for predicting wind power in Embodiment 1; the electronic device includes a memory, at least one processor, a computer program stored in the memory and executable on the at least one processor, and at least one communication bus. The memory can be used to store the computer program, and the processor implements the steps of a method for predicting wind power in Embodiment 1 by running or executing the computer program stored in the memory and calling the data stored in the memory.
[0298] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device (such as audio data), etc. In addition, the memory may include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0299] At least one processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.
[0300] If the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device that can carry computer program code, recording medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory and read-only memory (ROM, Read-only Memory).
[0301] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes, and the scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0302] The present application is referred to with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0303] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.
[0304] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0305] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0306] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
[0307] It should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person skilled in the art should understand that the technical solution of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application, which should be included in the scope of the claims of the present application.
Claims
1. A wind power prediction method, characterized in that: The steps include: S1: Obtain historical data of wind farms, pre-process the historical data of wind farms, and perform correlation analysis on factors affecting wind power to select meteorological factors with better correlation; S2: The meteorological series of different seasons were clustered using the k-means++ algorithm and the SOM algorithm. The clustering results of the k-means++ algorithm and the SOM model with different k values were comprehensively evaluated based on the entropy weight method, and different optimal clustering algorithms were selected for the original data of different seasons. S3: After performing a nonlinear test on the original wind power sequence based on BDS, the nonlinear Granger causality test method is used to determine whether there is a Granger causal relationship between the meteorological sequence and the power generation sequence in wind power data of different seasons and different clustering categories, and to determine the input variables for the wind power prediction model based on the attention mechanism; S4: Construct a model based on the Granger causality test attention mechanism and convolutional neural network combined with long short-term memory neural network. Select the first 70% and 10% of wind power data from different seasons and different clustering categories as training sets and validation sets to train the model, and use the last 20% as the test set to test the prediction effect of the model, and obtain the short-term wind power prediction value and prediction effect. In step S3, the specific definition of BDS is as follows: For a random variable sequence {u t , t=1,…,T}, where the variables are independent and identically distributed, and the relevant integral is: in, is{u t }The random vector sequence constructed in a certain way, m is the embedding dimension; The central limit theorem of the relevant integral under the null hypothesis is as follows: When m≥2, T→∞ and Sometimes, there are in, Indicates the probability of the following events occurring simultaneously; express The consistent estimate of ; N(0,1) represents the standard normal distribution; Will and Substitute the consistent estimate of V m The expression of is: in, Indicates that the distribution converges under the original hypothesis; W m,T (∈) is the expression of the BDS test statistic, and its rejection region is |W m,T (∈)|>z α / 2 , z α / 2 represents the α / 2 upper quantile of the standard normal distribution; In step S3, the specific steps of the nonlinear Granger causality test method are as follows: set up The null hypothesis is: Where f represents the joint probability distribution function, g(X, Y, Z) is denoted as g, which is a weight function that is always positive; its value can be: g1 = f Y (y), g3=f Y (y) / f X,Y (x, y); According to the value of g2, the original hypothesis is simplified to: q=E[f X,Y,Z (X,Y,Z)f Y (Y)-f X,Y (X,Y)f Y,Z (Y,Z)] (17) Then, based on the exponential function, the natural estimate of the null hypothesis is: in (||·||) represents the norm; D W The random variable W in W i The local density estimate at is expressed as: Substituting into the above formula, we get the estimate of the null hypothesis: In meeting d X =d Y =d Z Under the premise of , ε is expressed as: ε n =Cn -β (21) And when C>0 If the original hypothesis "X t Not Y t If the Granger causation is true, then the following conclusions hold:
2. A wind power prediction method according to claim 1, characterized in that: In step S1, the historical data includes measured meteorological data and actual power generation data; wherein the measured meteorological data includes wind speed and direction at 10m, 30m, 50m and 70m of the wind tower, as well as temperature, air pressure and relative humidity.
3. A wind power prediction method according to claim 1, characterized in that: In step S2, the specific calculation steps of weighted comprehensive evaluation using the entropy weight method are as follows: 1) Data standardization; the calculation is divided into two indicators: Positive indicators: Negative indicators: in represents the jth index x j The normalized value of the i-th solution; 2) Calculate the variability index: the jth index x j The variability index of the i-th solution is: 3) Calculate information entropy: The information entropy of the jth indicator is: 4) Calculate the information entropy redundancy: The information entropy redundancy of the jth indicator is: g j =1-e j (5) 5) Calculate the weight of each indicator: The weight of the jth indicator is: Where m represents the number of indicators; 6) Calculate the comprehensive scores of different solutions: The comprehensive score of the i-th solution is: The one with the highest score is the best solution.
4. A wind power prediction method according to claim 3, characterized in that: In step S2, the entropy weight method is used to weight and evaluate the optimal clustering of the original wind power data. The process is as follows: 1) Calculate the input variables of clustering algorithms in different seasons and normalize them; the input variables include meteorological factors with good correlation with wind power in different seasonal categories selected by S1, as well as the daily average μ and intra-day variance σ of wind power. 2 , intraday kurtosis kur and intraday skew; the calculation formulas are: where x i represents some data in the original wind power sequence, and n represents the total number of data in different seasons; 2) Cluster analysis of meteorological series in different seasons was performed using k-means++ algorithm and SOM algorithm with different k values; 3) Calculate the clustering results of the power series based on the clustering results of the meteorological series, and calculate the CH score values of the two respectively; 4) The entropy weight method is used to weight the CH scores of meteorological series and wind power series in different seasons; 5) Filter out the optimal clusters in different seasons.
5. A wind power prediction method according to claim 1, characterized in that: In step S4, the convolutional neural network includes: an input layer, a convolutional layer, a pooling layer and a fully connected layer, and its calculation process includes convolution calculation and pooling calculation. The specific calculation process is as follows: The calculation formula for convolution is: in, Represents the value of the lth layer at position (i, j) after convolution calculation; Table 1 shows the weight of the mth row and nth column of the lth layer; g represents the activation function; f represents the size of the convolution kernel; b l Represents the bias term of the lth layer.
6. A wind power prediction method according to claim 1, characterized in that: In step S4, the cell state of the long short-term memory neural network is controlled by three "gates": forget gate, input gate and output gate, and the calculation process is as follows: 1) The forget gate discards information; the forget gate is based on the current input x t And the output h at the previous moment t-1 Determine how much of the cell state at the previous moment can be saved. The calculation formula of the forget gate is as follows: f t =σ(W f ·[h t-1 ,x t ]+b f ) (24) Among them, W f represents the parameter matrix, σ represents the sigmoid activation function, b f represents the bias term, f t Indicates the proportion of cell state saved at the previous moment; the calculation formula of the sigmoid activation function is: 2) Input gate adds information; the input gate adds information according to h t-1 and x t Determines the ratio of current information added into the cell state; i t =σ(W i ·[h t-1 ,x t ]+b i ) (26) in, represents the candidate cell information, i t represents the ratio of added information, tanh represents the tanh activation function, and its calculation formula is: 3) Updating the cell state; updating the cell state according to the calculated cell state preservation ratio, information addition ratio, cell information at the last moment, and candidate cell information; 4) Output gate outputs the result; the output gate determines the proportion of the current cell state output based on the current input and the previous output; the t =σ(W o ·[h t-1 ,x t ]+b o ) (30) h t =o t *tanh(C t ) (31) Among them, t Indicates the current cell state preservation ratio.
7. A wind power prediction system, characterized in that: The system can be used to implement the wind power prediction method according to any one of claims 1 to 6, comprising: The data acquisition module pre-processes the original data and performs correlation analysis on the factors affecting wind power to select meteorological factors with better correlation; The data analysis module uses the k-means++ algorithm and the SOM algorithm to cluster the meteorological series of different seasons. Based on the entropy weight method, the clustering results of the k-means++ algorithm and the SOM model with different k values are comprehensively evaluated, and different optimal clustering algorithms are selected for the original data of different seasons. The data causality test module uses the nonlinear Granger causality test method to determine whether there is a Granger causal relationship between the meteorological sequence and the power generation sequence in the wind power data of different seasons and different clustering categories, and determines the input variables for the wind power prediction model based on the attention mechanism. The data prediction module constructs a model based on the attention mechanism of Granger causality test and the convolutional neural network combined with the long short-term memory neural network. The first 70% and 10% of the wind power data of different seasons and different clustering categories are selected as the training set and validation set to train the model, and the last 20% is used as the test set to test the prediction effect of the model, and the short-term wind power prediction value and prediction effect are obtained.
8. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the wind power prediction method according to one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Short-term wind power interval prediction method
CN117933076A
LSTM-SVR subway station temperature prediction method based on characteristic of multiple periods
WO2024077969A1