CNN-LSTM-Attention-based wind power prediction method
By employing a CNN-LSTM-Attention hybrid architecture, which combines cross-correlation coefficient calculation and attention mechanisms, the problem of local features and long-term dependencies in wind power prediction is solved, achieving high-precision wind power prediction and enhancing the model's scalability and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-10
AI Technical Summary
Existing wind power prediction models struggle to capture both local features and long-term dependencies simultaneously, neglecting the time-series dynamic dependencies between variables, resulting in low prediction accuracy.
A hybrid architecture of CNN-LSTM-Attention is adopted. The lead-lag relationship between variables is quantified by calculating the cross-correlation coefficient. Convolutional neural network (CNN) is used to extract local features, long short-term memory network (LSTM) is used to mine long-term patterns, and attention mechanism is used to dynamically weight important historical time steps to build a multi-level collaborative mechanism.
It improves the accuracy and robustness of wind power prediction, enhances the scalability and reproducibility of the model, and can more accurately reflect the physical causal chain between wind speed and power, reducing prediction bias.
Smart Images

Figure CN121840587A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wind power prediction technology, and specifically to a wind power prediction method based on CNN-LSTM-Attention. Background Technology
[0002] Wind energy, as a crucial component of clean and renewable energy, plays a vital role in achieving the "dual carbon" goals. However, due to its inherent characteristics of high volatility, instability, and poor dispatchability, wind power's proportion in the power grid can negatively impact the grid's safe and stable operation when it reaches a certain level. Therefore, achieving high-precision, low-latency wind power forecasting has become a key technological approach to improving wind energy utilization.
[0003] Wind power forecasting involves establishing a mapping relationship between influencing factors such as wind speed and direction and power generation to accurately predict the future output power of wind farms. Existing technologies mainly include physical model prediction methods, statistical model prediction methods, machine learning and deep learning models, and combined prediction models. Although machine learning and deep learning models have significantly improved the accuracy of wind power forecasting due to their superior nonlinear fitting and time series modeling capabilities, becoming a research hotspot, their limitations in practical engineering applications cannot be ignored.
[0004] Most single deep learning models have limitations in handling wind power. For example, while Convolutional Neural Networks (CNNs) can effectively extract local features, they have inherent limitations when processing time-series data. CNN models focus on feature extraction within the local receptive field, making it difficult to capture long-term temporal dependencies. For tasks like wind power forecasting, which require comprehensive consideration of historical trends and cyclical characteristics, a single CNN model cannot effectively model the evolution of weather systems on a daily or even weekly scale. The translation invariance assumption of CNNs for input data is not entirely applicable in time-series forecasting, potentially overlooking crucial temporal sequence information. While Long Short-Term Memory (LSTM) networks can handle long-term dependencies in sequential data, they have significant shortcomings in feature extraction. A single LSTM model is insensitive to local changes in input features and struggles to effectively identify critical events such as sudden changes in wind speed. Furthermore, traditional LSTM models assign equal importance to all time steps, failing to focus on key time points that have a greater impact on the prediction results.
[0005] Furthermore, traditional models typically use contemporaneous values of variables for prediction, failing to capture lead or lag effects between variables such as wind speed and power. This approach limits the model's prediction accuracy. When significant time lead or lag effects exist between variables, directly using current feature values to predict the target variable at the next moment cannot accurately capture the true causal relationship. Taking wind power prediction as an example, changes in wind speed require a certain amount of time to be transmitted to power output. If this physical delay is ignored, the model will struggle to accurately reflect the dynamic relationship between wind speed and power, especially at critical time points such as sudden changes in wind speed, where prediction errors will significantly increase. Summary of the Invention
[0006] In view of the shortcomings of the prior art, the present invention provides a wind power prediction method based on CNN-LSTM-Attention.
[0007] The technical solution of this invention is:
[0008] A wind power prediction method based on CNN-LSTM-Attention, comprising the following steps:
[0009] Step 1: Obtain the wind power time series dataset, where each wind power time series data includes the current timestamp, wind speed, wind direction, radial wind, zonal wind and the corresponding wind power at that time;
[0010] Step 2: Perform missing value imputation and outlier removal on the original wind power time series dataset to construct a complete and reliable wind power time series dataset;
[0011] Step 3: Align the data in the complete and reliable wind power time series dataset to obtain the aligned wind power time series dataset, and divide the training set from the dataset;
[0012] Step 4: Build a CNN-LSTM-Attention prediction model;
[0013] Step 5: Train the CNN-LSTM-Attention prediction model using the training set to obtain the wind farm power prediction model;
[0014] Step 6: Apply the trained CNN-LSTM-Attention prediction model to predict wind power output.
[0015] Furthermore, according to the wind power prediction method, in step 2, outlier detection and labeling are performed on the original wind power time series dataset using the quartile method and box plots, and outliers are identified and removed; the MissForest algorithm is used to fill in the missing values in the original wind power time series dataset.
[0016] Furthermore, according to the wind power prediction method described above, step 2 will also include the wind power in the complete and reliable wind power time series dataset. Wind speed ,wind direction Zonal wind and the wind Treating them as feature variables, the dataset is represented as a feature matrix. .
[0017] Furthermore, according to the wind power prediction method described above, the method for aligning the data in the complete and reliable wind power time series dataset in step 3 is as follows: First, align the wind power... Respectively with wind speed ,wind direction Zonal wind and the wind Four pairs of feature variables are formed; then, in a backtracking window of length L, a set of lag steps is set for each pair of feature variables. =0,1,2,...,k, where the hysteresis step size is... For a feature variable in a pair of feature variables Lagging behind another feature variable The time step; then calculate the lag step for that group. A set of cross-correlation coefficients for each pair of feature variables is used, and the lag step size corresponding to the largest cross-correlation coefficient in this set is considered the optimal lag step size. ; Assume characteristic variables Lagging behind characteristic variables The time step is Then the characteristic matrix Middle characteristic variables Replace with lagged variables ,in This refers to the current moment.
[0018] Furthermore, according to the wind power prediction method described above, the lag step size is calculated according to equation (2). A set of cross-correlation coefficients for pairs of characteristic variables;
[0019] (2)
[0020] in, express Time-of-flight characteristic variables Lagging behind characteristic variables Time step Cross-correlation coefficients at different times; () indicates the operation of calculating covariance; This represents the distance from the current time t within a backtracking window of length L, with the current time t as the right endpoint. The index of the sample in the sequence at each step; Indicates the start time as The end time is Feature variables The interval; These represent the start time as The end time is Feature variables The interval; and They represent the characteristic variables respectively. and characteristic variables Standard deviation; Representing characteristic variables The mean.
[0021] Furthermore, according to the wind power prediction method described above, the final aligned wind power time series dataset in step 3 is represented as the following feature matrix:
[0022]
[0023] in This indicates the wind power output at the previous moment; Indicates lag Wind direction variable with time step; Indicates lag Wind speed variable with time step; Indicates lag Zonal wind variable with time step; Indicates lag Meridional wind variable with time step.
[0024] Furthermore, according to the wind power prediction method, the CNN-LSTM-Attention prediction model consists of a series of input layers, convolutional CNN layers, LSTM layers, attention layers, fully connected layers containing two fully connected network layers, and an output layer.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] (1) This invention overcomes the shortcomings of traditional models that ignore time-series dynamic dependencies by introducing cross-correlation coefficients to calculate the lead-lag relationship between variables. In the data preprocessing stage, cross-correlation coefficients under different lag steps are calculated to identify key information such as the highest correlation when wind speed leads power by 3 steps, thereby constructing time-aligned input features. This method enables the model to more accurately reflect the physical causal chain, avoids prediction bias caused by time-series misalignment, and improves the scientific nature of feature engineering.
[0027] (2) This invention adopts a CNN-LSTM-Attention hybrid architecture, which solves the problem that a single model cannot simultaneously capture local features and long-term dependencies. The convolutional neural network (CNN) layer extracts local fluctuations and short-term trends of wind speed, power and other sequences, the long short-term memory network (LSTM) layer mines long-term time series patterns, and the attention mechanism (Attention) layer dynamically weights important historical time steps. This multi-level collaborative mechanism enables the model to separate deterministic patterns from noisy data.
[0028] (3) The modular architecture of the present invention enhances the scalability and reproducibility of the method and overcomes the limitations of traditional rigid models that are difficult to optimize. Each module of the CNN-LSTM-Attention prediction model is independent, allowing the hyperparameters to be adjusted for different data characteristics. This flexibility makes the method easy to transfer to other application scenarios. Attached Figure Description
[0029] Figure 1 This is a flowchart illustrating the wind power prediction method based on CNN-LSTM-Attention in this embodiment.
[0030] Figure 2 This is a schematic diagram of the CNN-LSTM-Attention prediction model in this embodiment; Detailed Implementation
[0031] To facilitate understanding of this application, a more comprehensive description of this application will be provided below with reference to the accompanying drawings.
[0032] This invention provides a wind power prediction method based on CNN-LSTM-Attention. The core idea is as follows: Addressing the shortcoming of existing wind farm power prediction methods that do not fully quantify the temporal dependencies between variables, this invention proposes introducing cross-correlation coefficient calculation during the data preprocessing stage to systematically analyze the lead-lag effects between features such as wind speed and power. To address the difficulty of existing models in simultaneously capturing local fluctuations and long-term patterns, this invention designs a CNN-LSTM-Attention prediction model. CNN first extracts short-term features, and LSTM integrates long-term patterns based on these features. The two complement each other, overcoming the limitations of a single model in complex time-series data, and achieving multi-scale time-series feature extraction and dynamic information focusing. Furthermore, to address the problem of prediction instability caused by highly random data, an attention mechanism is used to enhance the model's robustness.
[0033] Figure 1 This is a flowchart illustrating the overall process of the CNN-LSTM-Attention-based wind power prediction method in this embodiment. Figure 1As shown, the method includes the following steps:
[0034] Step 1: Obtain the wind power time series dataset, where each wind power time series data includes the current timestamp, wind speed, wind direction, radial wind, zonal wind and the corresponding wind power at that time;
[0035] In this embodiment, the wind power time series dataset is derived from three years of measurement data from a wind farm in Europe, obtained from the European Centre for Medium-Range Weather Forecasts (ECMWF). The wind power... It is influenced by four corresponding weather forecast variables, namely wind speed. ,wind direction Zonal wind and the wind .
[0036] Step 2: Perform missing value imputation and outlier removal on the original wind power time series dataset to construct a complete and reliable wind power time series dataset, and then input the wind power data from it. Wind speed ,wind direction Zonal wind and the wind Treating wind power time series datasets as feature variables, the complete and reliable datasets are represented as feature matrices. ;
[0037] This implementation method, based on the common causes and distribution characteristics of outliers and missing values in the original wind power time series dataset, uses the quartile method and box plots to detect and label outliers in the original wind power time series dataset, identifying and removing extreme values; to address the issues of random and continuous missing values in the wind power data acquisition process, the MissForest algorithm is used to fill in the missing values in the original wind power time series dataset, constructing a complete and reliable wind power time series dataset to support subsequent prediction models;
[0038] In the outlier handling phase, based on the quartile method, the first quartile (Q1), third quartile (Q3), and interquartile range (IQR) are calculated for each wind power time-series data point arranged in order of data size in the original wind power time-series dataset. The normal value range is set as [Q1 - 1.5×IQR, Q3 + 1.5×IQR]. Extremely large or small values outside this range are identified as outliers. This method quantifies data dispersion through statistical quartiles, avoiding bias caused by subjective threshold settings. To further visualize the outlier distribution, box plots are used to display the outlier locations for each parameter, with tentacles indicating the normal range and outliers individually marked.
[0039] After the detection is completed, outliers are assigned NaN (null value) to prevent them from being misused in subsequent processing.
[0040] In the missing value imputation stage, the MissForest algorithm is used to impute random and continuous missing values in wind power data caused by sensor failures, transmission interruptions, etc. This algorithm, based on a random forest model, uses features with missing values as the dependent variable and complete features as the independent variable, predicting missing values through iterative regression: first, features with fewer missing values are imputed, and the feature matrix is gradually optimized until all missing values are replaced. After imputation, the root mean square error (RMSE) is used to evaluate the deviation between the imputed values and the true values, ensuring data integrity while minimizing information distortion. The entire process balances the rigor of data cleaning with the operability of practical applications, providing a high-quality input foundation for subsequent CNN-LSTM-Attention prediction models.
[0041] Finally, wind power Wind speed ,wind direction Zonal wind and the wind Treating wind power as a feature variable, the complete and reliable wind power time series dataset is represented as the feature matrix shown in equation (1). ;
[0042] (1)
[0043] Step 3: Convert the feature matrix The data is time-series aligned to obtain a time-series aligned wind power time-series dataset; and the aligned wind power time-series dataset is divided into a training set and a test set according to a certain ratio.
[0044] To quantify the lead-lag relationship among feature variables, this embodiment introduces cross-correlation coefficients to quantitatively analyze the lead-lag effect in wind power forecasting. By systematically evaluating the correlation strength among feature variables under different lag step sizes, the optimal lag time step for each feature variable with respect to the wind power to be predicted is determined, thereby constructing a time-aligned feature matrix and solving the problem of spurious correlation caused by ignoring time delays.
[0045] feature matrix The method for time-series alignment of the data is as follows: First, wind power... Respectively with wind speed ,wind direction Zonal wind and the wind Four pairs of feature variables are formed; then, in a backtracking window of length L, a set of lag steps is set for each pair of feature variables. =0,1,2,...,k, where the hysteresis step size is... Let j be the time step in which one characteristic variable j lags behind another characteristic variable i in a pair of characteristic variables; then calculate the lag step according to equation (2). A set of cross-correlation coefficients for each pair of feature variables is used, and the lag step size corresponding to the largest cross-correlation coefficient in this set is considered the optimal lag step size. Assume that feature variable j lags behind feature variable i by a time step of... Then the characteristic matrix Replace the characteristic variable j with a lagged variable ,in At the current time, the aligned feature matrix shown in equation (3) is finally obtained;
[0046] (2)
[0047] (3)
[0048] in, express The time step of feature variable j lags behind the time step of feature variable i. Cross-correlation coefficients at different times; ( ) indicates that it is a function for calculating covariance; Indicates the current time In a backtracking window with a right endpoint and a length of L, the distance from the current time t is... The index of the sample in the sequence at each step; Indicates the start time as The end time is The interval of the characteristic variable i; These represent the start time as The end time is The interval of the characteristic variable j; and Let i and j represent the standard deviations of feature variable i and feature variable j, respectively. This represents the mean of the characteristic variable i; This indicates the wind power output at the previous moment; Indicates lag Wind direction variable with time step; Indicates lag Wind speed variable with time step; Indicates lag Zonal wind variable with time step; Indicates lag Meridional wind variable with time step.
[0049] Finally, in this implementation, the aligned wind power time series dataset is divided into a training set and a test set in a 3:1 ratio. The training set is used for parameter learning and hyperparameter tuning during model training, while the test set is mainly used to objectively evaluate the predictive performance of the model after training is completed, so as to avoid overfitting of the model on the training data.
[0050] Step 4: Build the CNN-LSTM-Attention model;
[0051] In this embodiment, such as Figure 2 As shown, the CNN-LSTM-Attention prediction model consists of a cascaded input layer, convolutional layer (CNN), LSTM layer, attention layer (Multi-Head Attention), a fully connected layer containing two fully connected network layers Fc1 and Fc2, and an output layer. The model's data processing flow encompasses a four-level feature abstraction process. Input data first passes through a convolutional neural network (CNN) layer to extract local spatiotemporal features, capturing short-term fluctuation patterns in wind speed, power, and other sequences. Then, a long short-term memory network (LSTM) layer models long-term dependencies, learning periodic patterns in the sequence. Next, a self-attention mechanism is introduced to dynamically weight the importance of key time steps. Finally, a fully connected output layer generates the predicted power value. This architecture, through the synergistic cooperation of local perception, gating mechanisms, and attention focus, effectively handles complex temporal patterns in wind power data. While maintaining the model's expressive power, it also considers computational efficiency and interpretability requirements, providing an effective solution for wind power prediction. Specifically:
[0052] 1. Input layer: Used to receive data input in time series order;
[0053] 2. Convolutional Layer: Primarily used to extract local features. Parameters are set as follows: kernel size 3, number of filters 50, stride 1. Convolutional operations capture local features such as trends and periodic fluctuations in wind power data. The convolutional feature mapping process is as follows:
[0054] (4)
[0055] in, For convolution operations, For input items, This is the weight matrix. This is the offset.
[0056] 3. LSTM layer: Used to receive local features from the convolutional layer output, capturing long-term dependencies in the time series. The number of neurons is set to 256. Cell states are updated through a gating mechanism; the core formula is as follows:
[0057] (5)
[0058] (6)
[0059] (7)
[0060] (8)
[0061] (9)
[0062] (10)
[0063] in, , They represent Input and output at any moment express LSTM hides the node state at any given time. express function, Represents the weight matrix. Indicates bias. It is the hyperbolic tangent function.
[0064] 4. Attention Layer: Employs a multi-head self-attention mechanism to assign higher weights to key features by calculating the relevance of the query vector Q, key vector K, and value vector V. The core formula is as follows:
[0065] (11)
[0066] (12)
[0067] in, , , These represent the query vector, key vector, and value vector, respectively. It represents the dimension of the key vector, used for normalization; Function on correlation score Perform normalization; It refers to the number of heads that need attention.
[0068] 5. Fully connected layer and output layer: Fully connected layer Fc1 is used to map the output features of the attention layer into a 256-dimensional vector, and fully connected layer Fc2 is used to further map the 256-dimensional vector into a 10-dimensional vector. Finally, the output layer outputs the future wind power after a set time period.
[0069] Step 5: Build a CNN-LSTM-Attention prediction model;
[0070] Step 5: Train the CNN-LSTM-Attention prediction model using the training set to obtain the wind farm power prediction model;
[0071] This implementation performs batch processing on the aligned feature matrices from the training set to obtain input feature matrices with a batch size of 32, a sequence length of 20, and a feature dimension of 5. In other words, in this implementation, the input to the input layer during forward propagation is a feature matrix. Where 32 is the batch size and 20 is the sequence length. Then, the Convolutional Neural Network (CNN) layer extracts local short-term patterns from the input sequence through one-dimensional convolution operations. Specific parameters are: kernel size 3, number of filters 50, stride 1. The operation process can be represented as:
[0072] (13)
[0073] in, This represents a one-dimensional convolution operation. This is the activation function. The purpose of this layer is to efficiently capture the fluctuations and local correlations of features such as wind speed and power within adjacent time steps through local connectivity and weight sharing.
[0074] Then, the Long Short-Term Memory (LSTM) layer receives the output of the CNN layer. It models long-term dependencies through its gating mechanism. This layer has 256 neurons and processes temporal information encompassing the entire sequence. The operation follows the LSTM state update formula, ultimately outputting the hidden state at the last time step, with the following dimensionality changes:
[0075] (14)
[0076] The function of this layer is to analyze the evolution of features extracted by CNN over time, and to learn and memorize medium- and long-term time series patterns such as the evolution of weather systems.
[0077] Then, to reinforce key information, the sequence output by the LSTM layer is... Direct input to the attention layer. The attention layer employs a multi-head attention mechanism, with 8 heads. The operations of the attention layer can be represented as:
[0078] (15)
[0079] This layer dynamically evaluates and weights the importance of information from different historical time steps to the current prediction, focusing on key events such as sudden changes in wind speed to suppress noise interference and improve the model's response to abrupt changes. The attention mechanism does not change the input sequence length of 20, but transforms the feature dimension to a hidden dimension of 256. Finally, the output of the attention layer is aggregated along the sequence dimension (e.g., taking the last time step or a global average) to obtain a vector representation, which is then transformed through a two-layer fully connected network:
[0080] (16)
[0081] (17)
[0082] in, This indicates a linear layer with an output dimension of 256; Indicates the output dimension is A linear layer; final output That is, regarding the future Wind power prediction sequence at each time step.
[0083] When training the CNN-LSTM-Attention prediction model, the Mean Absolute Error (MAE) was used as the loss function. The Adam optimizer was selected, with an initial learning rate of 0.001. Early stopping was employed during training to prevent overfitting, ultimately yielding an optimized wind farm power prediction model.
[0084] Step 6: Apply the trained CNN-LSTM-Attention prediction model to predict wind power output;
[0085] This implementation validates the CNN-LSTM-Attention prediction model using a validation set. This implementation uses three widely used evaluation metrics—mean absolute error (MAE), root mean square error (RMSE), and interpretable variance (EV)—to evaluate the performance of the CNN-LSTM-Attention prediction model.
[0086] MAE is the absolute difference between the target value and the predicted value. It expresses the average absolute deviation between the predicted and the actual value, and is more robust to outliers than MSE and RMSE.
[0087] (18)
[0088] in and They represent the first The actual and predicted wind power values for each sample. This represents the number of samples.
[0089] RMSE is sensitive to particularly large or small errors in a set of data, thus it can effectively reflect the precision of the error. RMSE is the square root of MSE, and has a similar meaning to MSE, but its dimensions are consistent with the original data.
[0090] (19)
[0091] EV measures how similar the dispersion of the differences between all predicted values and the samples is to the dispersion of the samples themselves; it can also represent the degree to which the model explains the fluctuations in the dataset. If the value is 1, the model tends to be perfect.
[0092] (20)
[0093] in It is variance.
[0094] This implementation experimented with the prediction results for four different step sizes and demonstrated the effectiveness of the method by comparing the prediction results with and without using a data alignment method based on cross-correlation coefficients.
[0095] Overall, the data shows a consistent pattern across all evaluation metrics as the forecast time step increases: MAE and RMSE gradually increase, while EV gradually decreases. This trend aligns with the fundamental principles of time series forecasting—the longer the forecast time span, the higher the uncertainty, and consequently, the lower the model accuracy.
[0096] Table 1 Wind power forecast results
[0097] Data alignment methods based on cross-correlation coefficients reduce the impact of strong randomness and improve predictive model performance by optimizing the quality of input feature engineering. They inject crucial temporal causal information into deep learning models by quantifying and utilizing the hidden "lead-lag" dynamic relationships between variables, thereby improving prediction accuracy and interpretability.
[0098] This implementation also employs comparative algorithms including standalone LSTM, CNN-LSTM, and LSTM-Attention. Experimental results show that the CNN-LSTM-Attention prediction model significantly outperforms the comparative models in all metrics, demonstrating that the wind power prediction method based on CNN-LSTM-Attention can capture and interpret more of the inherent fluctuation patterns in the data, greatly enhancing the reliability of the prediction results and solving the problem that a single model cannot simultaneously capture local features and long-term dependencies. Furthermore, the independent modules of the CNN-LSTM-Attention prediction model allow for the adjustment of hyperparameters for different data characteristics, making the method easily transferable to other application scenarios.
[0099] It should be understood that, inspired by the technical concept of this invention, those skilled in the art can make various improvements or modifications based on the above content without departing from the scope of this invention, and these modifications still fall within the protection scope of this invention.
Claims
1. A wind power prediction method based on CNN-LSTM-Attention, characterized in that, The method includes the following steps: Step 1: Obtain the wind power time series dataset, where each wind power time series data includes the current timestamp, wind speed, wind direction, radial wind, zonal wind and the corresponding wind power at that time; Step 2: Perform missing value imputation and outlier removal on the original wind power time series dataset to construct a complete and reliable wind power time series dataset; Step 3: Perform time-series alignment on the data in the complete and reliable wind power time-series dataset to obtain the time-series aligned wind power time-series dataset, and divide the training set from this dataset; Step 4: Build a CNN-LSTM-Attention prediction model; Step 5: Train the CNN-LSTM-Attention prediction model using the training set to obtain the wind farm power prediction model; Step 6: Apply the trained CNN-LSTM-Attention prediction model to predict wind power output.
2. The wind power prediction method according to claim 1, characterized in that, In step 2, outlier detection and labeling are performed on the original wind power time series dataset using the quartile method and box plots, and outliers are identified and removed; the MissForest algorithm is used to fill in the missing values in the original wind power time series dataset.
3. The wind power prediction method according to claim 1, characterized in that, Step 2 will also include the wind power data in the complete and reliable wind power time series dataset. Wind speed ,wind direction Zonal wind and the wind Treating them as feature variables, the dataset is represented as a feature matrix. .
4. The wind power prediction method according to claim 3, characterized in that, Step 3 describes the method for aligning data in a complete and reliable wind power time series dataset: First, align the wind power... Respectively with wind speed ,wind direction Zonal wind and the wind Form four pairs of feature variables; Then, within a backtracking window of length L, a set of lag steps is set for each pair of feature variables. =0,1,2,...,k, where the hysteresis step size is... For a feature variable in a pair of feature variables Lagging behind another feature variable The time step; then calculate the lag step for that group. A set of cross-correlation coefficients for each pair of feature variables is used, and the lag step size corresponding to the largest cross-correlation coefficient in this set is considered the optimal lag step size. ; Assume characteristic variables Lagging behind characteristic variables The time step is Then the characteristic matrix Middle characteristic variables Replace with lagged variables ,in This refers to the current moment.
5. The wind power prediction method according to claim 4, characterized in that, Calculate the lag step length of this group according to formula (2). A set of cross-correlation coefficients for pairs of characteristic variables; (2) in, express Time-of-flight characteristic variables Lagging behind characteristic variables Time step Cross-correlation coefficients at different times; () indicates the operation of calculating covariance; This represents the distance from the current time t within a backtracking window of length L, with the current time t as the right endpoint. The index of the sample in the sequence at each step; Indicates the start time as The end time is Feature variables The interval; These represent the start time as The end time is Feature variables The interval; and They represent the characteristic variables respectively. and characteristic variables Standard deviation; Representing characteristic variables The mean.
6. The wind power prediction method according to claim 5, characterized in that, The final aligned wind power time series dataset in step 3 is represented by the following feature matrix: ; in This indicates the wind power output at the previous moment; Indicates lag Wind direction variable with time step; Indicates lag Wind speed variable with time step; Indicates lag Zonal wind variable with time step; Indicates lag Meridional wind variable with time step.
7. The wind power prediction method according to claim 1, characterized in that, The CNN-LSTM-Attention prediction model consists of a cascaded input layer, a convolutional CNN layer, an LSTM layer, an attention layer, a fully connected layer containing two fully connected network layers, and an output layer.