# Wind Power Short-Term Prediction Based on LSTM and Discrete Wavelet Transform
## 3 Proposed DWT_LSTM Forecasting Method
### Discrete Wavelet Transform (DWT)  
Considering that the wind power generation is caused by a variety of natural factors, including wind speed, wind direction, air density, air pressure, and wind turbine friction, the output power series of the wind turbine is non-stationary, volatile, and time-ordered. The influence of these factors on output power are different. The wind speed and wind direction are the two major factors affecting the wind power generation. The wind power signal contains the components of various frequencies: the contribution of the low-frequency components and high-frequency components of wind power data are of different importance to its dynamic behavior.  
If these components with different frequencies can be learned by independent LSTMs respectively, the performance of data mining will be improved. Thus, the divide and conquer strategy requires the decomposition of the original wind power data into low-frequency sub-signal and high-frequency sub-signal by a proper decomposition algorithm.  
This paper uses the discrete wavelet transform for decomposing the original wind power data. It uses a time-scale function to analyze data, so that wavelet transform has multi-scale resolution and time-shifting characteristics. Scaling operations can observe signals on different scales. Therefore, the wavelet transform is very suitable for dealing with non-stationary time series problems including wind power data.  
Assuming that the square of \(x(t)\) can be integral, \(x(t)\) can be expanded under a wavelet basis function. This operation is called a continuous wavelet transform of \(x(t)\). The mathematical definition of the wavelet basis function is:  
\[\Psi_{a,b}(t)\ =\ \frac{1}{\sqrt{|a|}}\Phi(\frac{t-b}{a}),a\
eq 0,b\in R. \tag{12}\]  
The mathematical definition of continuous wavelet transform of \(x(t)\) is:  
\[W_{x}(a,b){=}<\ x(t),\Psi_{a,b}(t)>=\frac{1}{\sqrt{|a|}}\int_{R}x_{t}(t) \overline{\Phi(\frac{t-b}{a})}dt. \tag{13}\]  
In Equations (12) and (13), \(a\) represents the scale parameter, and \(b\) represents the time center parameter. When \(a\) and \(b\) change continuously, the whole transformation process is called continuous wavelet transform. However, in practical applications, the continuous transformation which greatly  
Figure 2: The training process of LSTM.  
increases the computational complexity, application cost, and the implementation difficulty, is actually replaced by discrete wavelet transform (DWT) with a small step size.  
Discrete wavelet transform makes the application of wavelet transform easy to be put into practice. It discretizes the \(a\) and \(b\) parameters exponentially, which reduces the computational complexity and avoids the information redundancy caused by continuous wavelet transform. The discrete wavelet transform of \(x(t)\) is defined as:  
\[W_{x}(j,k)=<\ x(t),\Psi_{j,k}(t)>\ =\ \frac{1}{\sqrt{|a|}}\int_{R}x_{t}(t) \overline{\Phi(\frac{t-b}{a})}dt. \tag{14}\]  
In Formula (14), \(a\) and \(b\) are discrete, \(a=a_{0}^{j}\), \(b=ka_{0}^{j}b_{0}\), \(a_{0}>1\), \(b_{0}>0\), \(j\in Z\), \(k\in Z\).  
The algorithm for discrete wavelet transform is the Mallat algorithm proposed in 1988. It is actually a signal decomposition method. For the multi-resolution characteristics of wavelets, the variable \(j\) is used to determine the resolution at different scales. Specifically, the main contour of the original signal is observed on a large scale, and the detailed information of the original signal are observed on a small scale. Finally, the decomposition results are obtained by the stepwise increase of \(j\): one approximate signal (i.e., low-frequency components) and \(n\) (the value of \(n\) needs to be set by a human) detail signals (i.e., high frequency) \(d_{n},d_{n-1},d_{n-2}\ldots,d_{1}\). The original signal and the two types of sub-signals are satisfied by the following equation:  
\[x(t)=a_{n}+d_{n}+d_{n-1}+\ldots+d_{1}. \tag{15}\]  
A schematic diagram of discrete wavelet transform decomposition is shown in Figure 3.