Modeling Method and Prediction Method for Short-Term Wind Speed Prediction Model Based on LSTM Neural Network
By preprocessing the wind speed sequence data and optimizing the hyperparameters of the LSTM neural network, the problem of fluctuation characteristics revealing and hyperparameter selection in wind speed prediction is solved, and a more efficient short-term wind speed prediction effect is achieved.
Patent Information
- Application Number
- CN202210621834.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-02
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-06-02
AI Technical Summary
现有的深度学习算法在风速预测中无法揭示风速序列波动特性,且超参数选择困难,影响模型预测结果。
By preprocessing the original wind speed sequence data, the significant and regular fluctuations are eliminated, and the Bayesian optimization algorithm is used to optimize the hyperparameters of the LSTM neural network to establish a short-term wind speed prediction model.
It improves the accuracy of short-term wind speed prediction, reduces prediction errors, and improves the convergence speed and prediction effect of the model by about 9%-35%.
Smart Images

Figure CN114897260B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of wind speed prediction, and specifically relates to a method for modeling a short-term wind speed prediction model based on an LSTM neural network and a prediction method. Background Art
[0002] In recent years, due to the sharp demand for wind energy development and the grid connection of wind power generation, short-term wind power prediction (forecasting 4 hours in advance) has become increasingly important. The key factor affecting wind power generation is the wind speed at the hub height of the wind turbine. Therefore, it is crucial to predict the future wind speed size 4 hours in advance. However, affected by the combined effects of mesoscale airflows, local terrain, and wake effects of the fleet, the wind speed has strong fluctuation characteristics. With the rapid development of deep learning technology, many scholars have carried out wind speed prediction research using deep learning algorithms such as long short-term memory (LSTM), but still face several major problems:
[0003] 1) Deep learning algorithms are black boxes and cannot reveal the internal laws of the fluctuation characteristics of the wind speed sequence;
[0004] 2) Deep learning algorithms have a large number of hyperparameters, and have a great impact on the model prediction results. It is difficult to select the model hyperparameters.
[0005] Therefore, how to deeply explore the fluctuation characteristics of the wind speed sequence and optimize the selection of hyperparameters for deep learning algorithms is still a major problem to be further studied. Summary of the Invention
[0006] In view of this, the purpose of the present invention is to provide a method for modeling a short-term wind speed prediction model based on an LSTM neural network and a prediction method, which can improve the prediction effect of short-term wind speed by exploring the fluctuation characteristics of the wind speed sequence and optimizing the selection of hyperparameters.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] The present invention first proposes a method for modeling a short-term wind speed prediction model based on an LSTM neural network, including the following steps:
[0009] Step 1: Collect data to obtain the original wind speed sequence data;
[0010] Step 2: Preprocessing: Perform data transformation and standardization preprocessing on the original wind speed sequence data to obtain preprocessed wind speed sequence data, so as to eliminate the significant regular fluctuation characteristics in the original wind speed sequence data;
[0011] Step 3: Data segmentation: Segment the preprocessed wind speed sequence data into a training set and a validation set;
[0012] Step 4: Create an LSTM neural network model and initialize the hyperparameters;
[0013] Step 5: Train the LSTM neural network model with the training set and optimize and select the hyperparameters of the LSTM neural network model using the Bayesian optimization algorithm. The method is as follows:
[0014] 51) Based on Gaussian process regression, establish the functional relationship between the hyperparameters of the LSTM neural network model and the prediction error to obtain the error function;
[0015] 52) Update the LSTM neural network model with the hyperparameters corresponding to the local optimal solution of the error function to obtain the locally optimal LSTM neural network model;
[0016] 53) Use the validation set to verify the locally optimal LSTM neural network model, and calculate the root mean square error between the validation set data and the prediction data predicted by the locally optimal LSTM neural network model;
[0017] Judge whether the root mean square error corresponding to the locally optimal LSTM neural network model is less than the root mean square error corresponding to the current globally optimal LSTM neural network model; if so, use the locally optimal LSTM neural network model as the new globally optimal LSTM neural network model, and increment the iteration count by 1; if not, increment the iteration count by 1;
[0018] 54) Judge whether the iteration count has reached the maximum iteration count; if not, execute step 51); if so, end the iteration, and use the current globally optimal LSTM neural network model as the short-term wind speed prediction model.
[0019] Furthermore, in step 1, the collected original wind speed sequence data includes wind speed sequence data for a total of D days, with N samples per hour. Then the sample length H for each day is 24N, and the total sample length is DH.
[0020] Furthermore, in step 2, the method for preprocessing the original wind speed sequence data includes the following steps:
[0021] 21) Transformation: Assume that the original wind speed sequence data follows a Weibull distribution, and use the empirical method to calculate the parameter k of the Weibull distribution, so as to obtain the exponential change parameter m, and transform the original wind speed sequence data:
[0022] k = (Mean(U t ) / Std(U t )) -1.086
[0023] m = k / 3.6
[0024]
[0025] Among them, U t represents the original wind speed sequence data; represents the transformed wind speed sequence data; m represents the exponential change parameter; k represents the parameter of the Weibull distribution;
[0026] 22) Statistical mean wind speed: Classify the data corresponding to the same time of each day in the transformed wind speed sequence data and calculate the mean and standard deviation of ND sample numbers within each hour, denoted as μ t and σ t , where t takes values of h, 2h... 24h, corresponding to the node information of 24 moments;
[0027] 23) Smooth spline interpolation: Arrange the node information of the obtained 24 moments before and after to obtain the mean μ arranged as h, 2h... 24h, h, 2h... 24h t and the standard deviation σ t of 48 node information, then perform smooth spline interpolation on it, and take the 24 node information in the middle section as the data within a day to obtain the mean μ after interpolation processing 1t and the standard deviation σ 1t ;
[0028] 24) Standardization: Based on the obtained mean μ 1t and the standard deviation σ 1t , perform standardization processing on the transformed wind speed sequence data to eliminate the significant regular fluctuation characteristics in the original wind speed sequence data, and obtain the final preprocessed wind speed sequence data:
[0029]
[0030] Among them, represents the preprocessed wind speed sequence data obtained through preprocessing.
[0031] The present invention also proposes a short-term wind speed prediction method based on the LSTM neural network. The predicted wind speed sequence data U t is predicted by using the short-term wind speed prediction model created by the above-mentioned modeling method, and then the inverse transformation is performed on the predicted wind speed sequence data U t to obtain the actual predicted wind speed sequence data:
[0032] U' t =(U t σ 1t +μ 1t ) 1 / m
[0033] Among them, U' tdenotes the predicted wind speed sequence data obtained after the inverse transformation; U t denotes the predicted wind speed sequence data obtained before the inverse transformation.
[0034] The beneficial effects of the present invention are as follows:
[0035] The short-term wind speed prediction model modeling method based on the LSTM neural network of the present invention eliminates the significant regular fluctuation characteristics in the original wind speed sequence data through preprocessing, so as to better reveal the internal law of the fluctuation characteristics of the wind speed sequence, which is convenient for the LSTM neural network model to train and predict; by using the Bayesian optimization algorithm to optimize the selection of the hyperparameters of the LSTM neural network model, the convergence speed and prediction effect of the LSTM neural network model can be improved; through experiments, it is proved that the short-term wind speed prediction model obtained by using the modeling method of the present invention can improve the prediction effect of the short-term wind speed (4 hours in advance) by about 9%-35%. Description of the Drawings
[0036] In order to make the objectives, technical solutions and beneficial effects of the present invention clearer, the present invention provides the following drawings for description:
[0037] Figure 1 is the flowchart of the embodiment of the short-term wind speed prediction method based on the LSTM neural network of the present invention;
[0038] Figure 2 is the flowchart of data transformation and standardization preprocessing for the original wind speed sequence data;
[0039] Figure 3 is the curve graph of the original wind speed sequence data with a resolution of 10 minutes;
[0040] Figure 4 is the bar graph of the prediction error; (a) is for wind turbine #1; (b) is for wind turbine #2; (c) is for wind turbine #3;
[0041] Figure 5 is the comprehensive comparison graph of the prediction error distributions of each model. Detailed Embodiments
[0042] The following further describes the present invention with reference to the drawings and specific embodiments, so that those skilled in the art can better understand the present invention and be able to implement it, but the embodiments cited are not intended to limit the present invention.
[0043] As Figure 1 shown, the short-term wind speed prediction model modeling method based on the LSTM neural network in this embodiment includes the following steps:
[0044] Step 1: Collect data to obtain the original wind speed sequence data. In this embodiment, the collected original wind speed sequence data includes wind speed sequence data for a total of d days, with n samples per hour. Then the sample length for each day is H = 24n, and the total sample length is dH.
[0045] Step 2: Preprocessing: Perform data transformation and standardization preprocessing on the original wind speed sequence data to obtain preprocessed wind speed sequence data, so as to eliminate the significant regular fluctuation characteristics in the original wind speed sequence data. As Figure 2 shown, in this embodiment, the method for preprocessing the original wind speed sequence data (SSP preprocessing method) includes the following steps:
[0046] 21) Transformation: Assume that the original wind speed sequence data follows a Weibull distribution, and use the empirical method to calculate the parameter k of the Weibull distribution, so as to obtain the exponential change parameter m, and then transform the original wind speed sequence data:
[0047] k = (Mean(U t ) / Std(U t )) -1.086
[0048] m = k / 3.6
[0049]
[0050] where U t represents the original wind speed sequence data; represents the transformed wind speed sequence data; m represents the exponential change parameter; k represents the parameter of the Weibull distribution;
[0051] 22) Statistical time-averaged wind speed: Classify the data at the same time of each day in the transformed wind speed sequence data ; and calculate the mean and standard deviation of nD samples within each hour, denoted as μ t and σ t , where t takes values of h, 2h…24h, corresponding to the node information of 24 moments;
[0052] 23) Smooth spline interpolation: Arrange the obtained node information of 24 moments before and after to obtain 48 node information of the mean μ t and standard deviation σ t in the arrangement of h, 2h…24h, h, 2h…24h, then perform smooth spline interpolation on it, and take the 24 node information in the middle section as the data within a day to obtain the mean μ 1t and standard deviation σ 1t after interpolation processing;
[0053] 24) Standardization: Based on the obtained mean μ 1tand standard deviation σ 1t Perform standardization processing on the transformed wind speed sequence data to eliminate the fluctuating characteristics with significant patterns in the original wind speed sequence data, and obtain the final preprocessed wind speed sequence data:
[0054]
[0055] wherein represents the preprocessed wind speed sequence data obtained through preprocessing.
[0056] Step 3: Data segmentation: Segment the preprocessed wind speed sequence data into a training set, a validation set, and a test set. The training set is mainly used to train the LSTM neural network model; the test set is used to verify the prediction effect of the trained LSTM neural network model to avoid overfitting; the test set is mainly used to evaluate the prediction effect of the LSTM neural network model. Among them, in this embodiment, the data of the first 16h is used as the training set, the data of the subsequent 4h is used as the test set, and the remaining data is used as the validation set.
[0057] Step 4: Create an LSTM neural network model and initialize the hyperparameters. In this embodiment, the hyperparameters that need to be optimized for the LSTM neural network model include 5 hyperparameters: duration, hidden layer, number of hidden layer nodes, dropout rate, and learning rate, and the remaining hyperparameters are fixed values. Among them, the duration refers to predicting the value at the next moment using several past samples, and the range is 24 - 144; the hidden layer refers to the number of LSTM layers used, and the range is 1 - 2; the number of hidden layer nodes refers to the number of nodes in each LSTM hidden layer, and the range is 16 - 64; the dropout rate refers to the proportion of randomly discarded neurons during the training process of the LSTM model, and the range is 0.1 - 0.5; the learning rate refers to the initial learning rate of the model, and the range is 0.01 - 0.5. The initial values of these hyperparameters are randomly generated.
[0058] Step 5: Train the LSTM neural network model with the training set, and optimize and select the hyperparameters of the LSTM neural network model using the Bayesian optimization algorithm. The method is as follows:
[0059] 51) Based on Gaussian process regression, establish a functional relationship between the hyperparameters of the LSTM neural network model and the prediction error to obtain an error function;
[0060] 52) Update the LSTM neural network model with the hyperparameters corresponding to the local optimal solution of the error function to obtain a locally optimal LSTM neural network model;
[0061] 53) Use the validation set to verify the locally optimal LSTM neural network model, and calculate the root mean square error between the validation set data and the prediction data predicted by the locally optimal LSTM neural network model;
[0062] Determine whether the root mean square error corresponding to the local optimal LSTM neural network model is less than the root mean square error corresponding to the current global optimal LSTM neural network model; if so, use the local optimal LSTM neural network model as the new global optimal LSTM neural network model, and increment the iteration count by 1; if not, increment the iteration count by 1;
[0063] 54) Determine whether the iteration count has reached the maximum iteration count; if not, execute step 51); if so, end the iteration, and use the current global optimal LSTM neural network model as the short-term wind speed prediction model.
[0064] In this embodiment, the short-term wind speed prediction model modeling method based on the LSTM neural network preprocesses to remove the significantly regular fluctuation characteristics in the original wind speed sequence data, so as to better reveal the internal law of the wind speed sequence fluctuation characteristics, facilitating the training and prediction of the LSTM neural network model; by using the Bayesian optimization algorithm to optimize and select the hyperparameters of the LSTM neural network model, the convergence speed and prediction effect of the LSTM neural network model can be improved; through experiments, it is proved that the short-term wind speed prediction model obtained by using the modeling method of this embodiment can improve the prediction effect of the short-term wind speed (4 hours in advance) by about 9%-35%.
[0065] Specifically, for the short-term wind speed prediction method based on the LSTM neural network in this embodiment, the predicted wind speed sequence data U t is predicted by using the short-term wind speed prediction model created by using the above-mentioned modeling method of this embodiment, and then the predicted wind speed sequence data U t is inversely transformed to obtain the actual predicted wind speed sequence data:
[0066] U' t =(U t σ 1t +μ 1t ) 1 / m
[0067] where U' t represents the predicted wind speed sequence data obtained after the inverse transformation; U t represents the predicted wind speed sequence data obtained before the inverse transformation.
[0068] This embodiment can use a variety of error evaluation indicators to evaluate the prediction effect of the predicted wind speed data, as follows:
[0069]
[0070]
[0071]
[0072] where U't It represents the predicted wind speed sequence data obtained after the inverse transformation; N represents the number of samples.
[0073] Experimental verification
[0074] In this embodiment, the measured wind speed data of 3 wind turbines in a certain wind farm are used. The data includes 24 days with a resolution of 10 minutes, that is, the total length of the samples is 3456. The last 24 samples (i.e., 4 hours) are used as the test set to verify the improvement effect of the prediction accuracy for 4-hour-ahead prediction (24-step-ahead), as Figure 3 shown.
[0075] To verify the accuracy of the proposed prediction model, the results are compared with multiple prediction models, including the persistence method (PM), autoregressive integrated moving average (ARIMA), artificial neural network (ANN), ARIMA-ANN, seasonal preprocessing-artificial neural network (SEA-ANN), and BO-LSTM, a total of six models.
[0076] The prediction error indicators of the three wind turbines are as Figure 4 shown. It can be found that compared with other models, the overall prediction error of the short-term wind speed prediction model created in this embodiment is the lowest.
[0077] To accurately evaluate the prediction accuracy of each model, the errors predicted by the three wind turbines are statistically analyzed, and the model error distribution is plotted as Figure 5 shown. Generally speaking, the proposed model can reduce the short-term wind speed prediction error by about 9%-35%. The improvement effect of the prediction accuracy is very significant, and the volatility of the prediction error distribution is generally good.
[0078] The above-described embodiments are only preferred embodiments given to fully illustrate the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or transformations made by those skilled in the art on the basis of the present invention are all within the protection scope of the present invention. The protection scope of the present invention shall be subject to the claims.
Claims
1. A modeling method for a short-term wind speed prediction model based on an LSTM neural network, characterized in that: It includes the following steps: Step 1: Collect data to obtain the original wind speed sequence data; The collected original wind speed sequence data includes wind speed sequence data for a total of D days, with N samples per hour. Then the sample length H for each day is 24N, and the total sample length is DH; Step 2: Preprocessing: Perform data transformation and standardization preprocessing on the original wind speed sequence data to obtain the preprocessed wind speed sequence data, so as to eliminate the significant regular fluctuation characteristics in the original wind speed sequence data; The method for preprocessing the original wind speed sequence data includes the following steps: 21) Transformation: Assume that the original wind speed sequence data follows the Weibull distribution, and use the empirical method to calculate the parameter k of the Weibull distribution, so as to obtain the exponential change parameter m, and transform the original wind speed sequence data: k = (Mean(U t ) / Std(U t )) -1.086 m = k / 3.6 Among them, U t represents the original wind speed sequence data; represents the transformed wind speed sequence data; m represents the exponential change parameter; k represents the parameter of the Weibull distribution; 22) Statistically averaged wind speed: Classify the data corresponding to the same time of each day in the transformed wind speed sequence data ; and calculate the mean and standard deviation of ND sample numbers within each hour, denoted as μ t and σ t , where t takes values of h, 2h…24h, corresponding to the node information at 24 moments; 23) Smooth spline interpolation: Arrange the node information at 24 moments obtained before and after, and obtain the mean μ arranged as h, 2h…24h, h, 2h…24h t and the standard deviation σ t of 48 node information, then perform smooth spline interpolation on it, and take the 24 node information in the middle section as the data within a day to obtain the mean μ 1t and the standard deviation σ 1t ; 24) Standardization: Based on the obtained mean value μ 1t and standard deviation σ 1t , perform standardization processing on the transformed wind speed sequence data to eliminate the fluctuating characteristics with significant patterns in the original wind speed sequence data, and obtain the final preprocessed wind speed sequence data: Among them, represents the preprocessed wind speed sequence data obtained through preprocessing; Step 3: Data segmentation: Segment the preprocessed wind speed sequence data into a training set and a validation set; Step 4: Create an LSTM neural network model and initialize the hyperparameters; Step 5: Train the LSTM neural network model with the training set, and optimize and select the hyperparameters of the LSTM neural network model using the Bayesian optimization algorithm. The method is as follows: 51) Based on Gaussian process regression, establish the functional relationship between the hyperparameters of the LSTM neural network model and the prediction error to obtain the error function; 52) Update the LSTM neural network model with the hyperparameters corresponding to the local optimal solution of the error function to obtain the locally optimal LSTM neural network model; 53) Use the validation set to verify the locally optimal LSTM neural network model, and calculate the root mean square error between the validation set data and the prediction data predicted by the locally optimal LSTM neural network model; Judge whether the root mean square error corresponding to the locally optimal LSTM neural network model is less than the root mean square error corresponding to the current globally optimal LSTM neural network model; if so, use the locally optimal LSTM neural network model as the new globally optimal LSTM neural network model, and increment the iteration count by 1; if not, increment the iteration count by 1; 54) Judge whether the iteration count has reached the maximum iteration count; if not, execute step 51); if so, end the iteration, and use the current globally optimal LSTM neural network model as the short-term wind speed prediction model.
2. A short-term wind speed prediction method based on the LSTM neural network, characterized in that: The predicted wind speed sequence data is obtained by predicting with the short-term wind speed prediction model created by using the modeling method described in claim 1 Then, for the predicted wind speed sequence data Inverse transformation is performed to obtain the actual predicted wind speed sequence data: Among them, U t ' represents the predicted wind speed sequence data obtained after the inverse transformation; represents the predicted wind speed sequence data obtained before the inverse transformation.
Citation Information
Patent Citations
A wind power plant output correlation analysis method and device
CN109558968A
Wind speed prediction method and system based on long-term and short-term memory time neural network
CN111222677A
Wind speed prediction method based on hybrid neural network model
CN111695724A