Short temporary wind speed prediction method based on Relaxed Lasso-LSTM model
By combining traditional statistical methods and deep learning models, using the Relaxed Lasso-LSTM model, the problem of inaccurate and unstable prediction of individual models in wind speed prediction is solved, and more accurate and stable wind speed prediction results are achieved.
Patent Information
- Application Number
- CN202411070959.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-22
AI Technical Summary
Existing traditional wind speed prediction methods and a single deep learning model are difficult to accurately and stably predict wind speed, especially complex wind speed dynamic changes, resulting in inaccurate and unstable prediction results.
Combining traditional statistical methods and deep learning methods, the Relaxed Lasso-LSTM model is used to obtain and preprocess ERA5 reanalyze the data, perform multicollinearity test and feature selection, and use the Relaxed Lasso regression method to weight meteorological feature features as input to the LSTM model. Predict short-term wind speed.
It improves the accuracy and interpretability of wind speed prediction, improves the stability of prediction results, especially when the prediction step size is larger, it is more significant.
Smart Images

Figure CN119004398A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wind speed prediction, and in particular to a short-term wind speed prediction method based on a Relaxed Lasso-LSTM model. Background Art
[0002] As a clean and renewable energy source, wind energy is of great significance to promoting the green transformation of the global energy structure and responding to climate change. Wind speed prediction is a key link in the process of wind energy utilization. Accurate wind speed prediction not only helps wind farms to achieve efficient operation and reduce energy waste, but also helps power grid dispatching departments to better balance power and ensure the stable operation of the power grid. Short-term forecasts usually refer to short-term weather forecasts within 12 hours and near-term weather forecasts within 2 hours.
[0003] Traditional wind speed prediction methods include statistical methods and machine learning methods. Statistical methods include regression analysis methods such as Lasso regression and ridge regression, and time series analysis methods such as autoregressive model (AR) and autoregressive integrated moving average model (ARIMA). Machine learning methods include random forest, XGBoost and LightGBM. Sun Quande et al. [Sun Quande, Jiao Ruili, Xia Jiangjiang, et al. Research on wind speed correction of numerical weather forecast based on machine learning [J]. Meteorology, 2019, 45(3): 426-436.] Based on Lasso regression, random forest and deep learning methods, the data of 10m wind speed near the ground was corrected. First, Lasso regression was used to screen out the feature set of meteorological elements that affect the 10m wind speed, and it was used as the input variable. The results showed that Lasso regression can screen out the main features related to wind speed, and these three machine learning algorithms have better correction effects than the traditional correction method model output statistics (MOS) method.
[0004] Compared with traditional wind speed prediction methods, deep learning models can flexibly fit the nonlinear relationship between any prediction variable and probability distribution function. The current mainstream meteorological prediction models are mainly convolutional neural networks (CNN) represented by U-Net, recurrent neural networks represented by long short-term memory neural networks (LSTM), and random generation models represented by generative adversarial networks (GAN). However, a single deep learning model is still difficult to adapt to the complex dynamic changes of wind speed, so there are shortcomings such as inaccurate and unstable prediction results. The combined prediction model can effectively improve the accuracy and reliability of the prediction. Summary of the invention
[0005] In order to solve the problems of wind speed prediction in existing traditional wind speed prediction methods and single deep learning models, the present invention combines traditional statistical methods with deep learning methods, which can effectively overcome the shortcomings of a single model and achieve more accurate and stable prediction results.
[0006] To solve the above problems, the present invention adopts the following technical solutions:
[0007] A short-term wind speed prediction method based on the Relaxed Lasso-LSTM model includes the following steps:
[0008] Step 1: Obtain ERA5 reanalysis data, and sample the ERA5 reanalysis data according to the preset time range, spatial range, meteorological element type and sampling interval to obtain several groups of experimental data;
[0009] Step 2: Preprocess the experimental data;
[0010] Step 3: Perform a multicollinearity test on the experimental data after data preprocessing, remove meteorological elements with strong linear correlation, obtain the screened data, and divide the screened data into a training set and a test set;
[0011] Step 4: Use the Relaxed Lasso regression method to select meteorological element characteristic variables for the filtered data, and weight the meteorological element characteristic variables according to the regression coefficient of Relaxed Lasso as the input of the LSTM model, and use the training set to train the LSTM model;
[0012] Step 5: Obtain the wind speed data before the prediction time point as historical data input, use the trained LSTM model to predict the wind speed for multiple steps in the future, and output the short-term wind speed prediction result.
[0013] Beneficial effects of the present invention: Based on the Relaxed Lasso regression method which is more suitable for sparse high-dimensional data, the present invention uses the meteorological elements after feature selection as the input data of the LSTM model, and innovatively proposes a short-term wind speed prediction method based on the Relaxed Lasso-LSTM model, thereby improving the interpretability and accuracy of the wind speed prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a flow chart of the short-term wind speed prediction method based on the Relaxed Lasso-LSTM model described in an embodiment of the present invention;
[0015] Figure 2 It is the heat map of correlation coefficients of various meteorological elements;
[0016] Figure 3 This is a line chart of RMSE for different variable subsets of Relaxed Lasso;
[0017] Figure 4 This is the structure diagram of the LSTM model;
[0018] Figure 5 This is a comparison chart of the wind speed forecast values at 0 o'clock and 4 o'clock in the future predicted by the present invention and the actual wind speed values of ERA5. DETAILED DESCRIPTION
[0019] The technical solution of the present invention will be described in detail below in conjunction with the accompanying drawings and preferred embodiments.
[0020] like Figure 1 As shown, this embodiment provides a short-term wind speed prediction method based on a deep learning model, namely the Relaxed Lasso-LSTM model. The method mainly includes the steps of data preprocessing, multicollinearity test, Relaxed Lasso feature selection, and Relaxed Lasso-LSTM model wind speed prediction.
[0021] Step 1: Data acquisition: Obtain ERA5 reanalysis data, and sample the ERA5 reanalysis data according to the preset time range, spatial range, meteorological element type and sampling interval to obtain several groups of experimental data.
[0022] The data used in this invention comes from ERA5 reanalysis data. The time range is 00:00 on July 1, 2023 to 23:00 on December 31, 2023, with a sampling interval of 1 hour. The spatial range is a certain area (43.05°~45.15°N, 124.18°~127.05°E) grid data. After taking the average value of the longitude and latitude dimensions, a total of 4416 experimental data are collected. A total of 50 meteorological elements of ERA5 reanalysis data are selected as input for feature selection.
[0023] Step 2: Data preprocessing: Perform data preprocessing on the experimental data obtained in step 1.
[0024] The meteorological elements with serious data missing were deleted, and linear interpolation and outlier processing were performed on some meteorological elements with missing data. A total of 28 ERA5 meteorological elements were retained for further analysis, namely u10, v10, d2m, t2m, lblt, lict, lmld, lmlt, ltlt, lai_hv, lai_lv, skt, snowc, rsn, stl1, stl2, stl3, stl4, slhf, ssr, str, sp, sshf, ssrd, strd, tsn, wspd, and wdir. The detailed indicators of the above meteorological elements can be found at: https: / / cds.climate.copernicus.eu / cdsapp#! / dataset / reanalysis-era5-land?tab=overview.
[0025] In order to eliminate the influence of differences in dimension and order of magnitude and make different variables comparable, the minimum and maximum normalization method is used to map the experimental data to [0,1]. The calculation formula is as follows:
[0026]
[0027] Among them, x * represents the standardized value, x represents the value of the variable, min represents the minimum value of the experimental data, and max represents the maximum value of the experimental data.
[0028] Step 3, multicollinearity test: Perform a multicollinearity test on the experimental data after data preprocessing, eliminate meteorological elements with strong linear correlation, obtain the screened data, and divide the screened data into a training set and a test set in a ratio of 8:2.
[0029] Since the variables applicable to the Pearson correlation coefficient must be continuous data with a linear relationship and normal distribution, the present invention verifies the correlation between various meteorological elements through the Spearman correlation coefficient, which has a wider application range. The calculation formula of the Spearman correlation coefficient is as follows:
[0030]
[0031] Among them, d i is the rank difference between variables, and the Spearman correlation coefficient r s is between -1 and 1, and n is the sample size.
[0032] When the independent variables in the regression model are highly correlated, the model is considered to have multicollinearity. The existence of multicollinearity will lead to a decrease in the accuracy of the estimated coefficients or the performance of the model. Therefore, considering the Spearman correlation coefficient between the meteorological elements, the results are as follows: Figure 2 shown.
[0033] From the correlation coefficient heat map of each meteorological element, it can be seen that the correlation coefficients between d2m, t2m, lmlt, ltlt, lai_hv, lai_lv, skt, stl1, stl2 and stl3 are relatively high; the correlation coefficient between snowc and tsn is -0.9, and the above two groups of meteorological elements have strong linear correlation, which will lead to multicollinearity. Considering the correlation coefficients between the above meteorological elements and wind speed (wspd), d2m, t2m, ltlt, lai_hv, lai_lv, skt, stl1, stl2 and tsn with weak correlation with wind speed in each group are eliminated, and the regression model is constructed.
[0034] Step 4, Relaxed Lasso feature selection: Use the Relaxed Lasso regression method to select meteorological element characteristic variables for the filtered data, and weight the meteorological element characteristic variables according to the regression coefficient of Relaxed Lasso as the input of the LSTM model, and use the training set to train the LSTM model.
[0035] Lasso is a common penalized least squares regression method. For penalized least squares estimation:
[0036]
[0037] Among them, ||β|| q =∑ k∈{1,...,p} |β k | q is the coefficient vector l q norm, q is usually in the interval [0,2]; β is the regression coefficient; y iis the target variable value of the i-th sample; is the rank of the independent variable matrix of the i-th sample; λ is the regularization coefficient; n is the sample size. When q = 0, the coefficient estimate is equivalent to the Bridge estimate; when q = 1, it is equivalent to the Lasso estimate; when q = 2, it is equivalent to the Ridge regression estimate.
[0038] As a generalization of soft threshold and hard threshold, Hastie et al. [Hastie T, Tibshirani R, Tibshirani R J. Extended Comparisons of Best Subset Selection, Forward Stepwise Selection, and the Lasso [J]. 2017] proposed the Relaxed Lasso method. They scaled the Lasso estimate with the least squares estimate (LS) using two separate parameters λ and γ:
[0039]
[0040] in, Selected by Lasso, Selected by LS, 1ω λ is the variable ω λ ∈{1,...,p}, for all k∈{1,...,p}, we have:
[0041]
[0042] Relaxed Lasso estimation is only used in ω λ The parameter λ has the same function as in the Lasso estimation, which is used to control the variable selection, and the parameter γ controls the compression of the coefficients. When γ=1, the Relaxed Lasso estimation is equivalent to the Lasso estimation; when γ<1, the compression of the coefficients is reduced compared to the Lasso estimation; when γ=0, the Relaxed Lasso estimation is the limit of the above definition γ→0.
[0043] Hastie et al. have proved that the convergence rate of the Relaxed Lasso estimate is not affected by the number of variables p. However, if the p growth rate increases or the redundant variables increase too much, the convergence rate of the Lasso estimate will decrease. It can be seen that the Relaxed Lasso estimate is more suitable for sparse high-dimensional data. It can be used to describe the importance of meteorological factors on wind speed.
[0044] The Relaxed Lasso regression method is used to select the characteristic variables of meteorological elements for the 19 meteorological elements after screening. In order to find the optimal number of variables, the present invention sets the maximum number of variables for RelaxedLasso regression, obtains linear regression models of different variable subsets, and verifies the root mean square error (RMSE) of each linear regression model on the test set. The larger the RMSE, the worse the model effect. The number of meteorological element characteristic variables to be selected is determined based on the model effect. Finally, multiple linear regression models are compared to evaluate the effect of variable selection. The RMSE line graph of different variable subsets of RelaxedLasso is shown in the figure. Figure 3 shown.
[0045] Depend on Figure 3 It can be found that with the selection of variables, the overall model effect shows a downward trend, which is inevitable. However, the test accuracy when the number of variables is retained as 4 is similar to that when the number of variables is retained as 6, and is much better than other similar situations around, which is the best accuracy situation within 6. Therefore, the optimal situation with the number of variables retained as 4 is selected as the feature selection model for Relaxed Lasso regression.
[0046] The model was evaluated by comparing five feature selection methods including Relaxed Lasso, Lasso, ridge regression, partial least squares regression (PLS) and random forest. Mean squared error (MSE), mean absolute error (MAE), and coefficient of determination (R-squared, R 2 ) and model running time are used as evaluation indicators, and the performance evaluation results of each method are shown in Table 1.
[0047] Table 1 Feature selection model evaluation
[0048]
[0049] Comparison of MSE and R 2 The results show that Relaxed Lasso performs best. The feature selection regression coefficients of Relaxed Lasso, Ridge Regression and PLS methods are shown in Table 2.
[0050] Table 2 Feature selection regression coefficients
[0051]
[0052]
[0053] Finally, the feature selection variables u10, v10, stl3 and wspd of Relaxed Lasso were selected as the meteorological element characteristic variables, and the meteorological element characteristic variables u10, v10, stl3 and wspd were weighted using the regression coefficients of Relaxed Lasso and used as the input of the LSTM model for prediction.
[0054] Step 5: Relaxed Lasso-LSTM model wind speed prediction: Obtain the wind speed data before the prediction time point as historical data input, use the trained LSTM model to predict the wind speed for multiple steps in the future, and output the short-term wind speed prediction result.
[0055] LSTM is an improved version of the RNN network. It retains some characteristics of the RNN model, while alleviating the "gradient vanishing" and "gradient exploding" phenomena that occur in the RNN network, and can better handle long-distance time dependencies.
[0056] The LSTM structure diagram is as follows Figure 4 As shown in Figure 1, the core of LSTM is the cell state, which is represented by a long horizontal line running through the top of the model diagram. It determines which information should be retained by the network for subsequent calculations and which information should be forgotten, denoted by C. t LSTM introduces a special structure called a "gate" to delete or add information to the cell state. LSTM implements three gate calculations, namely the forget gate, input gate, and output gate, to protect and control the cell state.
[0057] This step can use the wind speed data of a period of time before the prediction time point, such as 24 hours, as historical data input, and use a three-layer LSTM to output the predicted wind speed for multiple steps in the future. The predicted wind speed (wspd) data in the present invention is calculated by the 10-meter latitudinal wind component (u10) and the 10-meter longitudinal wind component (v10), and the formula is as follows:
[0058]
[0059] The experiment found that when the prediction step is 5, that is, when predicting the wind speed 4 hours in the future, R 2 The model prediction effect is about 0.64, which is relatively poor, but still better than the prediction effect of a single LSTM model before improvement. Therefore, only the prediction effect of the model with a step size less than or equal to 5 is shown. The wind speed forecast values predicted by the Relaxed Lasso-LSTM model at 0:00 and 4:00 in the future are compared with the actual wind speed values of ERA5. Figure 5 shown.
[0060] In order to verify the effectiveness of the Relaxed Lasso-LSTM model, this model was compared with the LSTM model.2 As the evaluation index, the prediction model evaluation results are shown in Table 3.
[0061] Table 3 Prediction model evaluation
[0062]
[0063] The evaluation results of the prediction model show that when predicting the wind speed at 0 o'clock in the future, the Relaxed Lasso-LSTM model is better than the LSTM model R 2 Improved by 7.1%, predicting the wind speed for the next 4 years 2 The RelaxedLasso-LSTM model performs better than the LSTM model, and has a higher R 2 The improvement is more obvious.
[0064] This paper combines the traditional statistical method Relaxed Lasso with the deep learning model LSTM to effectively improve the accuracy of short-term wind speed prediction and the interpretability of the algorithm. The empirical analysis results are as follows:
[0065] (1) Relaxed Lasso is more suitable for feature selection of meteorological elements. Compared with Lasso, ridge regression, PLS and random forest methods, it has good performance in MSE, MAE and R 2 The performance of the three evaluation indicators is the best, and all evaluation indicators are significantly improved compared with the Lasso method;
[0066] (2) Compared with the LSTM model, the Relaxed Lasso-LSTM model proposed in this invention inputs the variables after feature selection into the LSTM model for wind speed prediction, and the MAE, MSE and R of the prediction of the future 0-4 hours are significantly higher than that of the LSTM model. 2 The evaluation indicators have all been improved, especially the prediction for the next 4 hours, R 2 The improvement is 24.8%, which means that Relaxed Lasso-LSTM performs better than the LSTM model and has higher prediction accuracy when the prediction step is larger.
[0067] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0068] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A short-term wind speed prediction method based on the Relaxed Lasso-LSTM model is characterized by: The following steps are involved: Step 1: Obtain ERA5 reanalysis data, and sample the ERA5 reanalysis data according to the preset time range, spatial range, meteorological element type and sampling interval to obtain several groups of experimental data; Step 2: Preprocess the experimental data; Step 3: Perform a multicollinearity test on the experimental data after data preprocessing, remove meteorological elements with strong linear correlation, obtain the screened data, and divide the screened data into a training set and a test set; Step 4: Use the Relaxed Lasso regression method to select meteorological element characteristic variables for the filtered data, and weight the meteorological element characteristic variables according to the regression coefficient of Relaxed Lasso as the input of the LSTM model, and use the training set to train the LSTM model; Step 5: Obtain the wind speed data before the prediction time point as historical data input, use the trained LSTM model to predict the wind speed for multiple steps in the future, and output the short-term wind speed prediction result.
2. The short-term wind speed prediction method based on the Relaxed Lasso-LSTM model according to claim 1, characterized in that: Step 2 includes the following steps: Delete the meteorological elements with serious data missing; Linear interpolation and outlier processing are performed on some meteorological elements with missing data; The minimum and maximum normalization method is used to map the experimental data to [0, 1].
3. The short-term wind speed prediction method based on the Relaxed Lasso-LSTM model according to claim 2, characterized in that: After data preprocessing, 28 meteorological elements are retained, namely u10, v10, d2m, t2m, lblt, lict, lmld, lmlt, ltlt, lai_hv, lai_lv, skt, snowc, rsn, stl1, stl2, stl3, stl4, slhf, ssr, str, sp, sshf, ssrd, strd, tsn, wspd, and wdir.
4. The short-term wind speed prediction method based on the Relaxed Lasso-LSTM model according to claim 1, characterized in that: In step 3, the Spearman correlation coefficient is used to verify the correlation between the meteorological elements.
5. The short-term wind speed prediction method based on the Relaxed Lasso-LSTM model according to claim 1, characterized in that: The meteorological elements eliminated in step 3 include d2m, t2m, ltlt, lai_hv, lai_lv, skt, stl1, stl2 and tsn.
6. The short-term wind speed prediction method based on the Relaxed Lasso-LSTM model according to claim 1, characterized in that: When using the Relaxed Lasso regression method to select meteorological element characteristic variables for the screened data, the following process is included: Set the maximum number of variables for Relaxed Lasso regression to obtain linear regression models for different variable subsets; Determine the number of meteorological element characteristic variables to be selected based on the model effect; Compare multiple linear regression models to assess the effect of variable selection.
7. The short-term wind speed prediction method based on the Relaxed Lasso-LSTM model according to claim 6, characterized in that: The characteristic variables of meteorological elements selected using the Relaxed Lasso regression method are u10, v10, stl3 and wspd.
8. The short-term wind speed prediction method based on the Relaxed Lasso-LSTM model according to claim 1, characterized in that: The prediction step size of the LSTM model is less than 5.
9. The short-term wind speed prediction method based on the Relaxed Lasso-LSTM model according to claim 1, characterized in that: The short-term wind speed forecast results include the wind speed forecast values for 0 hours in the future and 4 hours in the future.
10. The short-term wind speed prediction method based on the Relaxed Lasso-LSTM model according to claim 1, characterized in that: The sampling interval is 1 hour.
Citation Information
Patent Citations
Ultra-short-term wind speed prediction method
CN110210660A
CNN-LSTM-based wind speed prediction method
CN112285376A
Short-term wind power prediction method based on wind speed correction and fusion model
CN113379142A
Road surface temperature short-term and temporary prediction method and system based on feature engineering and LSTM
CN113536665A
LSTM-SA neural network ultra-short-term power prediction method driven by fan operation and maintenance data
CN115329937A
Cited By
Firefighter physical fatigue identification method based on LASSO multi-feature weighting and long and short term memory model
CN121421536A
A firefighter physical fatigue recognition method based on LASSO multi-feature weighting and long short-term memory model
CN121421536B
