A Two-Stage Decomposition Wind Direction Prediction Method Based on LSTM

Through the two-stage decomposition wind direction prediction method based on LSTM, the wind direction data of the wind power unit is decomposed and deep learning prediction is carried out, which solves the control problem of the wind power unit under wind direction instability, and achieves efficient wind power prediction and power generation efficiency improvement.

CN114792171BActive Publication Date: 2025-06-10ZHEJIANG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210581104.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-25
Publication Date
2025-06-10
Estimated Expiration
2042-05-25

AI Technical Summary

Technical Problem

Under the influence of random wind direction, intermittent and instability, wind turbines are difficult to achieve efficient control, resulting in the impact of power generation efficiency and capacity profit.

Method used

The two-stage decomposition wind direction prediction method based on LSTM is adopted, and the wind direction data is featured extracted through STL and VMD decomposition methods, and a deep learning prediction model is constructed to achieve accurate prediction of future short-term wind direction data.

Benefits of technology

It improves the accuracy and adaptability of wind direction prediction, reduces parameter sensitivity, enhances the prediction effect, and achieves efficient adjustment of wind turbines and improves power generation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114792171B_ABST
    Figure CN114792171B_ABST
Patent Text Reader

Abstract

The present invention discloses a two-stage decomposition wind direction prediction method based on LSTM. First, historical wind direction data of the area to be analyzed is obtained, sampled and divided to generate training samples, and each training sample is an original sequence data. Then, the original sequence data is subjected to the first-stage decomposition, decomposing the original sequence into a trend subsequence, a seasonal subsequence and a residual subsequence. The residual subsequence obtained from the first-stage decomposition is subjected to the second-stage decomposition, and after decomposition, H modal subsequences are obtained. Finally, an LSTM prediction model is constructed, and the decomposed trend subsequence, seasonal subsequence and modal subsequence are used to train the constructed LSTM prediction model, and the trained LSTM prediction model is used to predict the future wind direction. The present invention has the characteristics of good adaptability, insensitivity to parameters, high prediction accuracy, etc., and realizes the accurate prediction of the wind direction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of wind direction prediction, and in particular, relates to a two-stage decomposition wind direction prediction method based on LSTM. Background Art

[0002] As the world's energy is becoming increasingly depleted, wind power generation is developing rapidly as an environmentally friendly and renewable new energy source, and its access to the grid is also growing continuously. In wind power generation, the yaw system is an important component of the wind turbine. It is the actuator that enables the wind turbine to quickly and efficiently complete wind operations and reduce power losses of the wind turbine. However, due to the random, intermittent and unstable characteristics of wind direction, it not only poses severe challenges to the efficient control of wind turbines, but also has a significant impact on the wind power conversion efficiency. Therefore, in order to achieve efficient regulation of the yaw system and improve the power generation efficiency of wind turbines and the production capacity profit of wind power, an accurate wind direction prediction model is indispensable. Summary of the invention

[0003] The purpose of this application is to provide a two-stage decomposition wind direction prediction method based on LSTM, which decomposes the original time series data of wind direction through two-stage decomposition to fully explore the potential characteristics of time series data; then uses deep learning methods to establish a wind direction prediction model, and predicts each subsequence after decomposition; finally, the prediction results of each subsequence are linearly integrated to obtain the prediction results of the original time series, thereby improving the accuracy of time series prediction and realizing accurate prediction of future short-term wind direction data.

[0004] To achieve the above purpose, the technical solution adopted by this application is:

[0005] A two-stage decomposition wind direction prediction method based on LSTM, comprising:

[0006] Obtain historical wind direction data of the area to be analyzed, sample and divide the data to generate training samples, each training sample is an original sequence data;

[0007] The original sequence data is decomposed into trend subsequence, seasonal subsequence and residual subsequence by the first stage decomposition;

[0008] The residual subsequence obtained by the first stage decomposition is decomposed in the second stage to obtain H modal subsequences;

[0009] An LSTM prediction model was constructed, and the decomposed trend subsequence, seasonal subsequence and modal subsequence were used to train the constructed LSTM prediction model. The trained LSTM prediction model was used to predict the future wind direction.

[0010] Furthermore, the sampling and dividing of data to generate training samples includes:

[0011] Sample the historical wind direction data at fixed time intervals, and divide all the sampled data obtained by sampling according to a preset data volume to obtain training samples;

[0012] Divide each data in the training samples by 360 to obtain the training samples after class normalization processing.

[0013] Further, the first-stage decomposition of the original sequence data, which decomposes the original sequence data into a trend subsequence, a seasonal subsequence, and a residual subsequence, includes:

[0014] Initialize the decomposition parameters and start the inner loop;

[0015] Subtract the trend subsequence of the previous inner loop from the original sequence data to remove the trend;

[0016] Perform a smoothing operation on the detrended subsequence to obtain a periodic subsequence;

[0017] Remove the low-frequency sequence from the periodic subsequence to obtain a seasonal subsequence;

[0018] Subtract the seasonal subsequence of this inner loop from the original sequence data to remove the season;

[0019] Perform a smoothing operation on the deseasoned subsequence to obtain a trend subsequence;

[0020] Calculate to obtain a residual subsequence;

[0021] Judge whether the residual subsequence is less than a given threshold. If it is less, the decomposition is completed, and the final trend subsequence, seasonal subsequence, and residual subsequence are output; if not, enter the outer loop to calculate the robust weight, and then continue to enter the next inner loop.

[0022] Further, the second-stage decomposition of the residual subsequence obtained by the first-stage decomposition is performed by using the VMD decomposition method, including:

[0023] Represent the residual subsequence as a function f(t), and decompose the function f(t) into H modal functions u(t), where t represents the time variable, and perform the Hilbert transform on each modal function u i (t)(i ∈ [1, H]) to obtain its single-sided spectrum u′ i (t), and the calculation formula is as follows:

[0024]

[0025] Among them, δ(t) is the Dirac distribution, and j represents a fixed constant in the transformation process;

[0026] With the central frequency ω of each mode i (t) as the reference, the single-sided spectrum u′ of each mode i (t) is modulated to its corresponding fundamental frequency band Ψ i (t) through the following formula, and the calculation formula is as follows:

[0027]

[0028] Construct a variational model:

[0029]

[0030] where f(t) is the residual subsequence data, and δ t (Ψ i (t)) represents the derivative of Ψ i (t) with respect to the time variable t;

[0031] Construct the Lagrangian function L. By adding the quadratic regularization factor C and the Lagrange multiplier θ(t), the expression of the constructed Lagrangian function L is as follows:

[0032]

[0033] where u i (t) represents the i-th mode function, θ i (t) represents the i-th Lagrange multiplier, H represents the number of mode functions, δ(t) represents the Dirac distribution, and Ψ i (t) represents the fundamental frequency band corresponding to the i-th mode function, and f(t) represents the function of the residual subsequence;

[0034] Using the alternating direction method of multipliers, alternately iterate to solve the optimal solution of the Lagrangian function L according to the following formula:

[0035]

[0036]

[0037]

[0038] where are the Fourier transform results of f(t), u i (t), θ(t), respectively. n is the number of iterations, N is the maximum number of iterations (n ∈ [1, N]), and τ represents the noise tolerance which is a constant, τ ∈ (0, 1);

[0039] The iteration terminates when the following conditions are met:

[0040]

[0041] Wherein, e is the stopping threshold. When the condition is met, the iteration is terminated and the H modal subsequences obtained by decomposition are output.

[0042] The present application proposes a two-stage decomposition wind direction prediction method based on LSTM, which uses the STL (Seasonal-Trend decomposition procedure based on Loess, seasonal trend decomposition based on local weighted regression) decomposition method to select features of random, intermittent, and unstable wind direction data, and screen out features with high correlation; at the same time, the VMD (Variational Mode Decomposition) decomposition method is used to perform secondary decomposition on the residual components with unclear change patterns, and further explore the characteristic information of wind direction input; finally, the LSTM neural network is used to construct a wind direction prediction model to predict each subsequence obtained by decomposition, and finally the prediction results are added to obtain the final prediction result. The wind direction prediction method based on the data decomposition-feature extraction strategy of the present application has the characteristics of good adaptability, parameter insensitivity, high prediction accuracy, etc., and realizes the accurate prediction of wind direction. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 This is a flow chart of the two-stage decomposition wind direction prediction method based on LSTM in this application;

[0044] Figure 2 This is a flow chart of the STL decomposition method of the embodiment of the present application;

[0045] Figure 3 This is a flow chart of the VMD decomposition method according to an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0047] In one embodiment, Figure 1 As shown, a two-stage decomposition wind direction prediction method based on LSTM is provided, including:

[0048] Step S1, obtaining historical wind direction data of the area to be analyzed, sampling and dividing the data to generate training samples, each training sample is an original sequence data.

[0049] This application constructs a wind direction prediction model and uses the wind direction prediction model constructed by training historical wind direction data to accurately predict future short-term wind direction data.

[0050] In this embodiment, historical wind direction data of the area to be analyzed is used to generate a training sample dataset, that is, the historical wind direction data is sampled at fixed time intervals, and all the sampled data obtained by sampling is divided according to a preset data volume to obtain training samples. Then, each data in the training samples is divided by 360 to obtain the training samples after class normalization processing.

[0051] Specifically, obtain the historical database of the wind farm data storage server, set the sampled data point as the wind direction value, and the sampling interval as a fixed time length. Divide all the sampled data into multiple samples according to the preset data volume to ensure that the data volume of each sample is equal. For example, each training sample includes several data. Perform preprocessing operations of class normalization on the data of each training sample. Specifically, divide the value of each data point by 360 to obtain a new value, and then set the sequence composed of each new value as the original sequence of the training sample. Each training sample after preprocessing is a sequence of original data, which is a data sequence, and each data in the sequence is a sampled data point.

[0052] Step S2: Perform the first-stage decomposition on the original sequence data, and decompose the original sequence data into a trend subsequence, a seasonal subsequence, and a residual subsequence.

[0053] Specifically, in this application, the STL (Seasonal-Trend decomposition procedure based on Loess) decomposition method is used to perform the first-stage decomposition on the preprocessed original sequence data. The decomposition method consists of an inner loop and an outer loop. The inner loop is responsible for calculating and obtaining the trend subsequence and the seasonal subsequence, and the outer loop is responsible for calculating and obtaining the residual subsequence. Decompose each data point in the original sequence data, and then the decomposed data form subsequences. The relationship between the three subsequences can be expressed by formula (1):

[0054] Y t =T t +S t +R t t=1,2,…N (1)

[0055] Among them, Y t represents the data point at time t in the original sequence data, T t represents the data point at time t in the trend subsequence, S t represents the data point at time t in the seasonal subsequence, and R t represents the data point at time t in the residual subsequence.

[0056] The STL decomposition method is as Figure 2 shown, and the specific steps are as follows:

[0057] 2.1), Initialize the decomposition parameters and start the inner loop.

[0058] First, set the number of inner loop iterations \(n\). (i) , the number of outer loop iterations \(n\). (o) , the number of data points per cycle \(n\). (p) , the first smoothing parameter \(n\). (s) , the second smoothing parameter \(n\). (l) and the third smoothing parameter \(n\). (t) , then start the \(k\)-th inner loop. Let represent the trend subsequence and the seasonal subsequence at time \(t\) at the end of the \((k - 1)\)-th inner loop respectively. When \(k = 0\), initialize the trend subsequence where \(k\) represents the number of inner loop iterations and \(t\) represents time.

[0059] 2.2), Subtract the trend subsequence of the previous inner loop from the original sequence data to remove the trend.

[0060] Subtract the trend subsequence of the previous inner loop from the original sequence \(Y\) t to obtain the detrended subsequence The calculation formula is as follows:

[0061]

[0062] 2.3), Perform a smoothing operation on the detrended subsequence to obtain the periodic subsequence.

[0063] Perform a LOESS (locally weighted regression) smoothing operation with \(q = n\) on the detrended subsequence , \(d = 1\), where \(q\) and \(d\) are parameters in the LOESS smoothing operation, and \(n\) (s) is the preset value of the parameter \(q\). The LOESS smoothing operation calculates the smoothed value for each data point in the subsequence, including the data points in the previous and next cycles of the subsequence. After the smoothing operation, a periodic subsequence of length \((N + 2n\) (s) ) is obtained (p)

[0064] 2.4), Remove the low-frequency sequence from the periodic subsequence to obtain the seasonal subsequence.

[0065] Perform moving averages of lengths \(n\) on the periodic subsequence in sequence, then perform a LOESS smoothing operation with \(q = n\) (p) , \(n\) (p) , 3, and then perform a LOESS smoothing operation with \(q = n\) (l) , \(d = 1\) to obtain the low-frequency sequence Then, use formula (3) to calculate the seasonal subsequence of the k-th inner loop. The calculation formula is as follows:

[0066]

[0067] 2.5), Subtract the seasonal subsequence of this inner loop from the original sequence to remove the season.

[0068] Use the original sequence Y t Subtract the seasonal subsequence of this inner loop to obtain the subsequence The calculation formula is as follows:

[0069]

[0070] 2.6), Perform a smoothing operation on the deseasoned subsequence to obtain the trend subsequence.

[0071] For the deseasoned subsequence perform a LOESS smoothing operation with q = n (t) , d = 1 to obtain the trend subsequence of the k-th inner loop where n (t) represents the preset value of the parameter q in the LOESS smoothing operation on the subsequence .

[0072] 2.7), Calculate to obtain the residual subsequence

[0073] The calculation formula is as follows:

[0074]

[0075] 2.8), Determine whether the residual subsequence is less than a given threshold. If it is less, the decomposition is completed, and the final trend subsequence, seasonal subsequence, and residual subsequence are output; if it is not less, enter the outer loop to calculate the robust weight, and then continue to enter the next inner loop.

[0076] When entering the outer loop to calculate the robust weight, define the robust weight of the data at time t as ρ t , then there is the following formula:

[0077]

[0078] where, R t represents the residual subsequence data at time t, median() represents the median function, B() represents the bisquare function, u represents the independent variable of the B function, and the expression of the B function is as follows:

[0079]

[0080] Thus, the robust weight ρ is obtained. t It is used to reduce the influence of the outer loop on the seasonal and trend updates in the next inner loop.

[0081] Step S3: Perform a second-stage decomposition on the residual subsequence obtained from the first-stage decomposition to obtain H modal subsequences.

[0082] In this embodiment, the VMD (Variational Mode Decomposition) decomposition method is used for the second-stage decomposition, and the residual subsequence function is decomposed into H modal functions, as Figure 3 shown. The decomposition steps are as follows:

[0083] Analyze the residual subsequence: Represent the residual subsequence as a function f(t), which can be decomposed into H modal functions u(t), where t represents the time variable. Perform the Hilbert Transform on each modal function u i (t) (i ∈ [1, H]) to obtain its single-sided spectrum u′ i (t). The calculation formula is as follows:

[0084]

[0085] where δ(t) is the Dirac distribution, j represents a fixed constant in the transformation process, and π is a constant.

[0086] Using the center frequency ω of each mode i (t) as a reference, modulate the single-sided spectrum u′ of each mode i (t) to its corresponding base frequency band Ψ i (t) through formula (8). The calculation formula is as follows:

[0087]

[0088] Construct a variational model: If the residual subsequence is to be decomposed into H modal subsequences, it is necessary to ensure that the decomposition sequence is a modal function u with a finite bandwidth centered at the frequency ω i (t), and the sum of the estimated bandwidths of each modal function u i (t) is minimized. The constraint condition is that the sum of each modal function u i (t) is equal to the residual subsequence function f(t). i (t)

[0089] Furthermore, construct the following variational model:

[0090]

[0091] Among them, f(t) is the residual subsequence data, and δ t represents the derivative of formula 9 with respect to the time variable t.

[0092] Solve the variational model: Construct the Lagrangian function L. By adding the quadratic regularization factor C and the Lagrangian multiplier θ(t), the above constrained variational problem is transformed into an unconstrained variational problem. The expression of the constructed Lagrangian function L is as follows:

[0093]

[0094] Among them, u i (t) represents the i-th mode function, and θ i (t) represents the i-th Lagrangian multiplier, H represents the number of mode functions, δ(t) represents the Dirac distribution, and Ψ i (t) represents the corresponding fundamental frequency band of the i-th mode function, and f(t) is expressed as a function of the residual subsequence.

[0095] Next, use the alternating direction method of multipliers to continuously update each mode subsequence and its center frequency. Finally, the optimal solution of the variational model can be obtained. All mode subsequences can be obtained according to the following formula:

[0096]

[0097]

[0098]

[0099] Among them, are the Fourier transform results of f(t), u i (t), θ(t), respectively. n is the number of iterations, N is the maximum number of iterations (n ∈ [1, N]), and τ represents the noise tolerance which is a constant, τ ∈ (0, 1). is the mode function of the (n + 1)-th iteration. Similarly, is the mode function of the n-th iteration. That is to say, all variables containing n or n + 1 in this embodiment represent the variables corresponding to the corresponding iteration number, which will not be elaborated here.

[0100] Among them, formulas (12) and (13) are responsible for the update. Substitute the Fourier transform of the mode subsequence obtained in each decomposition cycle into the formula for update, and then update the center frequency. Continuously loop and update until the current decomposition number i reaches the target decomposition number H. Then update the Lagrangian multiplier according to formula (14) and enter the next iteration condition judgment step.

[0101] The iteration terminates when the following conditions are met:

[0102]

[0103] Among them, e is the stop threshold. When the above conditions are met, the iteration terminates, and the H modal subsequences obtained by decomposition are output.

[0104] Step S4: Construct an LSTM prediction model, and use the decomposed trend subsequence, seasonal subsequence, and modal subsequence to train the constructed LSTM prediction model, and use the trained LSTM prediction model to predict the future wind direction.

[0105] In this embodiment, the trend subsequence, seasonal subsequence, and H modal subsequences obtained after decomposing the training samples twice are used as the data set of the LSTM (Long Short Time Memory) prediction model, and the constructed LSTM prediction model is trained.

[0106] When constructing the LSTM prediction model, the first-layer neural network is used to input the training set data, then a neural network with a one-dimensional output is added, and a suitable activation function is set, and finally the model is compiled. Then, continue to select a suitable loss function and optimizer, and the model construction is completed.

[0107] The parameters involved in the LSTM prediction model in this embodiment are: the input feature dimension, the output feature dimension, the number of neurons in each layer of the network; the optimizer, the maximum number of iterations, the gradient threshold, the initial learning rate, the number of iterations for learning rate decay, and the decay factor.

[0108] During training, the training set data is imported into the prediction model for training and saving to obtain a trained LSTM prediction model.

[0109] When predicting the future wind direction, load the trained model, input the test set data into the LSTM prediction model, and obtain the prediction results of each subsequence. Finally, the prediction results of each subsequence are linearly integrated to obtain the final prediction result.

[0110] The above-described embodiments merely represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.

Claims

1. A two-stage decomposition wind direction prediction method based on LSTM, characterized in that, the two-stage decomposition wind direction prediction method based on LSTM includes: Obtain the historical wind direction data of the area to be analyzed, sample and divide the data to generate training samples, and each training sample is an original sequence data; Perform the first-stage decomposition on the original sequence data, and decompose the original sequence data into a trend subsequence, a seasonal subsequence, and a residual subsequence; Perform the second-stage decomposition on the residual subsequence obtained from the first-stage decomposition, and obtain H modal subsequences after decomposition; Construct an LSTM prediction model, use the decomposed trend subsequence, seasonal subsequence, and modal subsequence to train the constructed LSTM prediction model, and use the trained LSTM prediction model to predict the future wind direction; Among them, the sampling and dividing the data to generate training samples includes: Sample the historical wind direction data at a fixed time interval, divide all the sampled data according to a preset data volume to obtain training samples; Divide each data in the training samples by 360 to obtain the training samples after class normalization processing; The performing the first-stage decomposition on the original sequence data and decomposing the original sequence data into a trend subsequence, a seasonal subsequence, and a residual subsequence includes: Initialize the decomposition parameters and start the inner loop; Subtract the trend subsequence of the previous inner loop from the original sequence data to remove the trend; Perform a smoothing operation on the detrended subsequence to obtain a periodic subsequence; Remove the low-frequency sequence in the periodic subsequence to obtain a seasonal subsequence; Subtract the seasonal subsequence of this inner loop from the original sequence data to remove the season; Perform a smoothing operation on the deseasoned subsequence to obtain a trend subsequence; Calculate to obtain a residual subsequence; Judge whether the residual subsequence is less than a given threshold. If it is less than, the decomposition is completed, and the final trend subsequence, seasonal subsequence, and residual subsequence are output; if it is not less than, enter the outer loop to calculate the robust weight, and then continue to enter the next inner loop; The performing the second-stage decomposition on the residual subsequence obtained from the first-stage decomposition and using the VMD decomposition method for the second-stage decomposition includes: The residual subsequence is represented as a function f(t), and the function f(t) is decomposed into H mode functions u(t), where t represents the time variable. For each mode function u i (t) (i ∈ [1, H]), perform the Hilbert transform to obtain its single-sided spectrum u′ i (t), and the calculation formula is as follows: Among them, δ(t) is the Dirac distribution, and j represents a fixed constant in the transformation process; With the center frequency ω of each mode i (t) as a reference, the single-sided spectrum u′ of each mode i (t) is modulated to its corresponding fundamental frequency band Ψ i (t) through the following formula. The calculation formula is as follows: Construct a variational model: where f(t) is the residual subsequence data, δ t (Ψ i (t)) represents the derivative of Ψ i (t) with respect to the time variable t; Construct a Lagrangian function L, and by adding a quadratic regularization factor C and a Lagrange multiplier θ(t), the expression of the constructed Lagrangian function L is as follows: where, u i (t) represents the i-th mode function, θ i (t) represents the i-th Lagrange multiplier, H represents the number of mode functions, δ(t) represents the Dirac distribution, Ψ i (t) represents the fundamental frequency band corresponding to the i-th mode function, and f(t) represents the function of the residual subsequence; Use the alternating direction method of multipliers to alternately iterate and solve the optimal solution of the Lagrangian function L according to the following formula: Among them, are the Fourier transform results of f(t), u i (t), θ(t), n is the number of iterations, N is the maximum number of iterations (n ∈ [1, N]), τ represents the noise tolerance which is a constant, τ ∈ (0, 1); The iteration terminates when the following conditions are met: Among them, e is the stopping threshold, and when the conditions are met, the iteration terminates, and the H modal subsequences obtained by decomposition are output.

Citation Information

Patent Citations

  • Short-term wind speed prediction method based on two-stage decomposition and limit learning machine

    CN109299430A

  • Four-stage hybrid short-time wind direction prediction method

    CN111523728A