Spatiotemporal wind power prediction method based on adaptive wavelet decomposition and improved transformer

By using adaptive wavelet decomposition and an improved Transformer method, the problems of high computational complexity, insufficient long-term dependence, and non-stationarity of traditional Transformer networks in wind power prediction are solved, and high-precision wind power prediction is achieved.

CN119853015BActive Publication Date: 2025-11-28HEBEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510058809.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-11-28
Estimated Expiration
2045-01-15

AI Technical Summary

Technical Problem

Traditional Transformer networks have high computational complexity in wind power prediction, lack good perception of local features of time series, have insufficient ability to model long-term dependencies, and face the problem of non-stationarity of wind power, resulting in unsatisfactory prediction results.

Method used

We employ an adaptive wavelet decomposition and improved Transformer approach to extract multi-level time-frequency features of wind power sequences using an adaptive multi-level wavelet decomposition algorithm. Combined with a frequency domain normalization module and a spatiotemporal encoder layer, we use a causal convolutional self-attention mechanism to extract time features and introduce a stationarity correction loss function to correct for non-stationarity. We then construct a U-Net network for wind power prediction.

Benefits of technology

It improves the accuracy and robustness of wind power prediction, effectively extracts multi-level time-frequency features, alleviates frequency deviation, enhances the ability to capture long-term dependencies, handles data distribution shifts caused by non-stationarity, and improves the model's prediction performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119853015B_ABST
    Figure CN119853015B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of wind power prediction, and particularly relates to a spatio-temporal wind power prediction method based on adaptive wavelet decomposition and improved Transform. First, wind power sequences of a target wind farm in a historical period and feature sequences influencing the wind power are obtained and preprocessed, the correlation of each feature sequence and the wind power sequence is calculated, the feature sequences with high correlation with the wind power are reserved, and the wind power sequence and the reserved feature sequences are normalized. Then, frequency domain features of the wind power sequence and each feature sequence are extracted. The frequency domain features of the wind power sequence and each feature sequence form a feature, and the feature is subjected to periodic embedding and spatial embedding to obtain a model input feature. Finally, a wind power prediction model is constructed based on a Transform network, including a U-Net network, an inverse Fourier transform and a prediction layer. The input feature is input into the U-Net network for feature extraction, the output feature of the U-Net network is subjected to the inverse Fourier transform, and then the prediction layer to obtain a wind power prediction value. The method solves the problems of high noise, high volatility and non-stationarity of wind power data, and improves the prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of wind power prediction, and particularly relates to a spatio-temporal wind power prediction method based on adaptive wavelet decomposition and improved Transformer. BACKGROUND

[0002] The power generation of a wind turbine is affected by wind speed, wind direction and time, and other factors, and shows obvious randomness, volatility and intermittency, which increases the difficulty of wind power management. Accurate prediction of wind power can greatly reduce this uncertainty, and plays an important role in realizing high wind power penetration grid connection, maintaining power supply and demand balance, improving power system operation efficiency and economy, etc.

[0003] Deep learning-based methods have shown great advantages in wind power prediction, and research has proved the feasibility of Transformer network in wind power prediction tasks. Through the highly parallelized self-attention mechanism, it realizes effective sequence feature learning, has faster training speed and stronger long-term dependency modeling capability. However, the self-attention used in the traditional Transformer network adopts point-by-point dot product calculation of attention, which not only has high computational complexity, but also lacks good perception of local features of time series, and long-term dependency modeling also has limitations, so the long-term prediction ability and local feature extraction ability of the traditional Transformer network are poor, and it is difficult to achieve ideal results in the wind power prediction task. At the same time, the wind power prediction method based on Transformer faces the challenge of the inherent non-stationarity of wind power. Some researches preprocess the wind power time series through normalization, difference and other stationary methods to eliminate the non-stationarity of the wind power time series, but this leads to over-stationary problem, making it difficult for the model to capture important trend, seasonality and other time information in the time series.

[0004] In view of the above problems, the present application provides a spatio-temporal wind power prediction method based on adaptive wavelet decomposition and improved Transformer. SUMMARY

[0005] In view of the deficiencies of the prior art, the technical problem to be solved by the present application is to provide a spatio-temporal wind power prediction method based on adaptive wavelet decomposition and improved Transformer.

[0006] The technical problem solved by the present application adopts the following technical solution:

[0007] A spatio-temporal wind power prediction method based on adaptive wavelet decomposition and improved Transformer, comprising the following steps:

[0008] First step: obtain the wind power sequence of the target wind farm in the historical period and the feature sequence affecting the wind power, and pre-process, calculate the correlation of each feature sequence and the wind power sequence, retain the feature sequence with high correlation with the wind power, and normalize the wind power sequence and the retained feature sequence;

[0009] Second step: extract the frequency domain features of the wind power sequence and each feature sequence;

[0010] Using an adaptive multi-level wavelet decomposition algorithm to decompose the wind power sequence step by step, obtaining a plurality of high-frequency components and a low-frequency component; the decomposition process is represented as:

[0011]

[0012] A0=X origin (3)

[0013]

[0014] In the formula, D k , A k is the high-frequency component and the low-frequency component obtained by the k-level decomposition, A k-1 is the low-frequency component obtained by the k-1-level decomposition, A0 is the initial low-frequency component, X origin is the wind power sequence, σ(·) represents the sigmoid activation function, is the learnable weight matrix and bias of the low-pass filter of the k-level, is the learnable weight matrix and bias of the high-pass filter of the k-level, ε represents a learnable parameter, l1, l2,..., l c is the coefficient of the low-pass filter, h1, h2,..., h c is the coefficient of the high-pass filter, and c is the number of coefficients.

[0015] Each high-frequency component and low-frequency component passes through a frequency domain normalization module to obtain a frequency domain normalized high-frequency component and a frequency domain normalized low-frequency component; all frequency domain normalized high-frequency components and low-frequency components are concatenated in the feature dimension to obtain the frequency domain features of the wind power sequence;

[0016] Similarly, the frequency domain features of each feature sequence are obtained;

[0017] Third step: the frequency domain features of the wind power sequence and each feature sequence form a feature X, and the feature X is periodically embedded and spatially embedded to obtain a feature X in .

[0018] Step 4: Construct a wind power prediction model based on the Transformer network, including a U-Net network, inverse Fourier transform, and prediction layer; then use the feature X... in The input is fed into the U-Net network for feature extraction. The output features of the U-Net network are then subjected to inverse Fourier transform and then passed through the prediction layer to obtain the predicted wind power value.

[0019] The U-Net network includes multiple spatiotemporal encoder layers and spatiotemporal decoder layers, with each spatiotemporal encoder layer having a skip connection to its corresponding spatiotemporal decoder layer. Both the spatiotemporal encoder layer and the spatiotemporal decoder layer include a spatiotemporal attention block, layer normalization, and a feedforward neural network. The input features are residually connected to the spatiotemporal attention block and then to themselves. The features obtained from the residual connections are then normalized by the layer and used as the input features of the feedforward neural network. The input features of the feedforward neural network are residually connected to the output features and then normalized by the layer to obtain the output features of the spatiotemporal encoder layer or the spatiotemporal decoder layer.

[0020] Step 5: Train the wind power prediction model. Update the parameters of the wind power prediction model, high-pass filter, and low-pass filter through backpropagation to obtain the trained wind power prediction model. Use the trained wind power prediction model to predict wind power.

[0021] Furthermore, during model training, the training loss is calculated using a stationarity correction loss function; the stationarity correction loss function L is expressed as:

[0022] L=L1+λL2 (12)

[0023]

[0024] In the formula, L1 is the Huber loss, L2 is the data distribution constraint loss, λ and δ are hyperparameters, and Y, These are the actual and predicted values ​​of the wind power series, R(Y), respectively. The actual value Y and the predicted value of the wind power series. The autocorrelation matrix, ||·|| F Y is the F-norm, and Conv(·) is the covariance calculation function; i Y j Let these represent the wind power sequences starting at time i and time j, respectively, where i,j∈[t+1,t+ΔT], t is the current time, ΔT is the time step, and μ i μ j They represent Y respectively i and Y j The variance.

[0025] Further, the space-time attention block comprises a multi-head self-attention unit, a causal convolution self-attention unit and a gate fusion unit; the multi-head self-attention unit extracts spatial features by using multi-head self-attention, the causal convolution self-attention unit extracts time features by using causal convolution self-attention, and the gate fusion unit fuses the spatial features and the time features to obtain space-time fusion features; the fusion process of the gate fusion unit is represented as:

[0026] X ST,out =z⊙X S +(1-z)⊙X T (9)

[0027] z=σ(X S W z,1 +X F W z,2 +b z ) (10)

[0028] In the formula, X ST,out is the space-time fusion feature, X s and X T are the spatial feature and the time feature respectively, ⊙ represents an element-wise dot product, W z,1 and W z,2 are learnable weight parameters, and b z is a bias.

[0029] Further, an intra-day embedding matrix, a day embedding matrix, a month embedding matrix and a space embedding matrix are defined, and intra-day embedding features, day embedding features and month embedding features are extracted from the intra-day embedding matrix, the day embedding matrix and the month embedding matrix respectively; the features X, the intra-day embedding features, the day embedding features, the month embedding features and the space embedding features are concatenated in the feature dimension to obtain the feature X in .

[0030] Compared with the prior art, the present application has the following advantages:

[0031] 1. In view of the problems of high noise, high volatility and non-stationarity of the original time series data faced by the existing space-time wind power prediction, different feature modes of the sequence are mixed in the time domain, and it is difficult to effectively extract multiple feature modes at different resolutions only by relying on time domain analysis. In order to solve these problems, the wavelet decomposition algorithm is improved in the present application, and the wavelet decomposition coefficients are adaptively adjusted in the training process, thereby optimizing the wavelet decomposition process. This adaptive feature enables the model to maintain high prediction accuracy under different environments and conditions. By wavelet decomposition, each sequence is decomposed into low-frequency components and high-frequency components, which can effectively extract multi-level time-frequency features and fully exploit the characteristics of the sequence, thereby improving the noise resistance and making the model more robust when processing high-noise data.

[0032] 2、The frequency decomposition is applied to the time sequence and input into the Transformer model for feature extraction, and the frequency deviation problem occurs, which leads to the model mainly learning the low-frequency characteristics in the sequence, and ignoring the high-frequency characteristics, so that the model focuses on the frequency characteristics with higher energy, and cannot accurately capture important high-frequency characteristics, therefore, the frequency domain normalization module is proposed, the low-frequency component and the high-frequency component are normalized in the frequency domain, and then input into the model for feature extraction, the model is biased to the low-frequency characteristics, and important high-frequency characteristics can be effectively captured, so that the model equally learns the characteristics in different frequency bands, so as to alleviate the frequency deviation problem, and improve the wind power prediction accuracy.

[0033] 3、In view of the problem that the long-time modeling capability of the self-attention mechanism is limited when extracting time characteristics, the causal attention mechanism is introduced in the space-time encoder layer and the space-time decoder layer to extract time characteristics, so that the time characteristics of the long-time sequence can be better extracted, the calculation burden caused by the increase of the sequence length in the self-attention mechanism is avoided, and the local feature extraction capability of the model is improved. The self-attention mechanism is used to extract spatial characteristics, and the capturing capability of the global spatial correlation is enhanced, so that the space-time characteristics of the wind power sequence can be more comprehensively understood. In view of the problems that the traditional Transformer cannot process the spatial correlation of the wind power time sequence data and the long-time modeling capability is insufficient, the prediction model of the application can enhance the capturing capability of the model for long-time dependence by aggregating the characteristics of different time scales, can extract and integrate information at different levels, and can capture multi-scale long-time correlation and global spatial correlation by the space-time encoder and decoder layers.

[0034] 4、In view of the problem that the non-stationarity of the wind power time sequence hinders the stable feature propagation in the deep layer and destroys the data distribution, and the problem that the previous stationarization method is over-stationarized, the stationarity correction loss function of the application can effectively process the data distribution deviation problem caused by the non-stationarity, avoid the over-stationarization phenomenon caused by the traditional stationarization method, and maintain the time dependence, so as to improve the prediction performance of the model. BRIEF DESCRIPTION OF DRAWINGS

[0035] Figure 1 It is the overall flowchart of the application;

[0036] Figure 2 It is the structure diagram of the wind power prediction model of the application;

[0037] Figure 3 It is the structure diagram of the U-Net network of the application;

[0038] Figure 4 It is the structure diagram of the space-time encoder layer of the application;

[0039] Figure 5 a mean absolute error (MAE) plot for different models;

[0040] Figure 6 a root mean square error (RMSE) plot for different models;

[0041] Figure 7 a comparison chart of the wind power prediction value of the application and the true value. DETAILED DESCRIPTION

[0042] The specific embodiments are described below with reference to the accompanying drawings, which are only used to specifically introduce the technical solutions of the application, and do not limit the protection scope of the application.

[0043] The application provides a spatiotemporal wind power prediction method based on adaptive wavelet decomposition and improved Transformer (referred to as method, see Figures 1-7 ), comprising the following steps:

[0044] Step 1: Obtain the wind power sequence of the target wind farm in the historical period and the feature sequence affecting the wind power, preprocess each sequence; calculate the correlation of each feature sequence and the wind power sequence, and retain the feature sequence with high correlation with the wind power; normalize the wind power sequence and the retained feature sequence;

[0045] The preprocessing includes outlier processing and missing value filling; the Pearson correlation coefficient method is used to evaluate the correlation between each feature sequence and the wind power sequence, the feature sequence with a correlation coefficient greater than 0.2 is retained, and the feature with low correlation with the wind power is excluded, so as to reduce the complexity of model training, improve the training speed and prediction accuracy; the wind power sequence and the retained feature sequence are normalized to eliminate the potential influence of the dimension difference between different parameters on the prediction result.

[0046] Step 2: Extract the frequency domain features of the wind power sequence and each feature sequence;

[0047] Use the adaptive multi-level wavelet decomposition algorithm to decompose the wind power sequence and each retained feature sequence respectively, decompose each sequence into multiple high-frequency components and a low-frequency component, and pass each high-frequency component and low-frequency component through a frequency domain normalization module to obtain the frequency domain normalized high-frequency component and low-frequency component; concatenate all frequency domain normalized high-frequency components and low-frequency components of the same sequence in the feature dimension to obtain the frequency domain features of the sequence;

[0048] Taking the wind power sequence as an example, it is assumed that the wind power sequence is decomposed into K high-frequency components D1, D2, … D K and a low-frequency component A K; the low-frequency component corresponds to the trend information of the wind power, reflecting the overall and long-term trend change of the wind power; the high-frequency component corresponds to the detail information of the wind power, reflecting the rapid fluctuation and local change of the wind power. All the high-frequency components and the low-frequency components are input into a frequency domain normalization module, and are first converted from the time domain to the frequency domain through Fourier transform to obtain Fourier-transformed high-frequency components and low-frequency components Fourier-transformed high-frequency components and low-frequency components After normalization processing, frequency-domain normalized high-frequency components and low-frequency components are obtained and low-frequency components are obtained wherein || represents a concatenation operation;

[0049] The process of adaptive multi-level wavelet decomposition is as follows: db4 wavelet is used to initialize a high-pass filter and a low-pass filter, and the wind power sequence is decomposed step by step using the high-pass filter and the low-pass filter, and the decomposition process is represented as follows:

[0050]

[0051]

[0052] A0=X origin (3)

[0053]

[0054] In the formula, D k , A k is the high-frequency component and the low-frequency component obtained by the k-level decomposition, A k-1 is the low-frequency component obtained by the k-1-level decomposition, A0 is the initial low-frequency component, X origin is the wind power sequence, σ(·) represents a sigmoid activation function, is the learnable weight matrix and bias of the low-pass filter of the k-level, is the learnable weight matrix and bias of the high-pass filter of the k-level; ε represents a learnable parameter, which is initialized to a value close to zero; l1, l2,..., l c is the coefficient of the low-pass filter, h1, h2,..., h c is the coefficient of the high-pass filter, and c is the number of coefficients.

[0055] Step 3: The frequency domain features of the wind power sequence and the reserved individual feature sequence are combined to form a feature X = [x1, x2,..., xN], where x1, x2,..., xN are the frequency domain features of the individual sequence, and r is the number of sequences. The feature X is input into an embedding layer to realize periodic embedding and spatial embedding, so as to extract the spatiotemporal correlation of each time sequence, and obtain a feature X r ] T ; wherein x1, x2,..., xN r are the frequency domain features of the individual sequence, and r is the number of sequences; the feature X is input into an embedding layer to realize periodic embedding and spatial embedding, so as to extract the spatiotemporal correlation of each time sequence, and obtain a feature X in ;

[0056] Step 3.1: Obtain the intra-day embedding feature, the day embedding feature and the month embedding feature;

[0057] Define the learnable intra-day embedding matrix , the day embedding matrix and the month embedding matrix to store the time features of the information; wherein N t represents the number of samples in a day, N d represents the number of days in a year, N m represents the number of months, d t , d d , d m respectively represent the intra-day, day and month embedding dimensions; the intra-day embedding feature , the day embedding feature and the month embedding feature are extracted from the intra-day embedding matrix, the day embedding matrix and the month embedding matrix respectively according to the intra-day, day and month time information corresponding to the wind power sequence of the first L steps of the N wind turbines of the wind farm at t moment.

[0058] Step 3.2: Define the spatial embedding feature , wherein d s represents the spatial embedding dimension.

[0059] Step 3.3: Cascade the features X, the intra-day embedding feature E t , the day embedding feature E d , the month embedding feature E m and the spatial embedding feature E s in the feature dimension to obtain the feature X in = X||E t ||E d ||E m ||E s , that is, the input feature of the model.

[0060] Step 4: Construct a wind power prediction model based on a Transformer network, including a U-Net network, an inverse Fourier transform and a prediction layer.

[0061] The U-Net network comprises an encoder and a decoder, the encoder comprises a plurality of spatio-temporal encoder layers and spatio-temporal decoder layers, each spatio-temporal encoder layer is connected to a corresponding spatio-temporal decoder layer by a skip connection; the output feature of the previous spatio-temporal encoder layer is down-sampled to obtain the input feature of the next spatio-temporal encoder layer; the output feature of the previous spatio-temporal decoder layer is up-sampled to obtain the input feature of the next spatio-temporal decoder layer.

[0062] The spatio-temporal encoder layer and the spatio-temporal decoder layer have the same architecture, and each comprises a spatio-temporal attention block, layer normalization and a feedforward neural network; the input feature is connected to itself in residual connection after passing through the spatio-temporal attention block, the feature obtained by the residual connection is input into the feedforward neural network after layer normalization, and the input feature and the output feature of the feedforward neural network are connected in residual connection and then subjected to layer normalization to obtain the output feature of the spatio-temporal encoder layer or the spatio-temporal decoder layer.

[0063] The spatio-temporal attention block comprises a multi-head self-attention unit, a causal convolution self-attention unit and a gate fusion unit, the multi-head self-attention unit is used to extract spatial features, the causal convolution self-attention unit is used to extract temporal features, and the gate fusion unit is used to fuse the spatial features and the temporal features to obtain spatio-temporal fusion features, i.e. the output feature of the spatio-temporal attention block; in the multi-head self-attention unit, the input feature X of the spatio-temporal attention block is subjected to multi-head self-attention, and in each head, the input feature X is first subjected to linear projection to obtain a query vector, a key vector and a value vector; ST,in h h h

[0064]

[0065] In the formula, W and W are weight matrices, and H is the number of attention heads;

[0066] The query vector, the key vector and the value vector are subjected to attention calculation by using standard dot product, and the attention calculation of the h head is represented as:

[0067]

[0068] In the formula, head h is the attention calculation result of the h head, softmax(·) is a softmax activation function, and d k is the dimension of the key vector;

[0069] The multi-head attention calculation results are concatenated and then subjected to linear projection to obtain the output feature of the multi-head self-attention unit, i.e. the spatial feature X S ;​​​​

[0070] X S =(head1||head2||...||head H )W s (8)

[0071] where W s is a weight matrix;

[0072] In the spatio-temporal attention block, the temporal feature X T is extracted using the causal convolution self-attention unit; in the standard dot product self-attention mechanism, the similarity between the query vector and the key vector is calculated based on the point-by-point dot product, and the local context information in the sequence is not fully utilized, while the causal convolution attention introduces a causal convolution layer, which performs convolution operation on the time series through a one-dimensional convolution kernel, and the output of each layer is obtained from the hidden input of the previous layer and the input information of the previous position, and it is ensured that the current position cannot obtain future information.

[0073] The gating fusion unit fuses the spatial feature X s and the temporal feature X T to obtain the spatio-temporal fusion feature, i.e., the output feature X ST,out ∈R L×d of the spatio-temporal attention block; the calculation formula is:

[0074] X ST,out =z⊙X S +(1-z)⊙X T (9)

[0075] z=σ(X S W z,1 +X F W z,2 +b z ) (10)

[0076] where W z,1 ∈R d×d and W z,2 ∈R d×d are learnable weight parameters, b z ∈R d is a bias, and ⊙ represents an element-wise dot product.

[0077] The output feature of the U-Net network is subjected to inverse Fourier transform to convert it to the time domain; the feature after the inverse Fourier transform is subjected to a prediction layer to obtain the wind power prediction value; the prediction layer is composed of two fully connected layers, and the wind power prediction value is calculated by the following formula:

[0078]

[0079] wherein, is the wind power prediction value of future ΔT time steps, X O is the feature after inverse Fourier transform, W1∈R L×ΔT , W2∈R d×1 is a learnable weight parameter, and b1, b2 is a bias.

[0080] Step 5: Train the wind power prediction model, calculate the training loss through the stationarity correction loss function as follows, update the parameters of the wind power prediction model, the high-pass filter and the low-pass filter through back propagation, obtain the trained wind power prediction model, and use the trained wind power prediction model for wind power prediction;

[0081] The stationarity correction loss function L is:

[0082] L=L1+λL2 (12)

[0083]

[0084] In the formula, L1 is Huber loss, L2 is data distribution constraint loss, λ and δ are hyperparameters, Y, are the true value and the predicted value of the wind power sequence respectively, R(Y), is the autocorrelation matrix of the true value Y and the predicted value of the wind power sequence, ||·||F F is the F-norm, and Conv(·) is the covariance calculation function; Y i , Y j represent the wind power sequence starting at i and j, i, j∈[t+1,t+ΔT], μ i , μ j represent the variance of Y i and Y j .

[0085] The stationarity correction loss function effectively alleviates the data distribution deviation problem caused by non-stationarity, not only restores the data distribution and retains the key information in non-stationarity, but also maintains the time dependence of the wind power sequence; the data distribution constraint loss is used to regulate the stationarity correlation between the front and rear sequences, corrects the data distribution, and improves the robustness of processing non-stationary wind power sequences.

[0086] In order to verify the effectiveness of the method, the model is used to predict the future 12 steps (2 hours) of wind power according to the past 24 time steps (4 hours) of wind power, and compared with the existing Transformer, Informer and iTransformer models, the mean absolute error (MAE) and root mean square error (RMSE) are selected to evaluate the model performance.Figure 5 is the average absolute error curve of each model, Figure 6 is the root mean square error curve of each model, Figure 7 is the wind power prediction value of the application compared with the true value.

[0087] From the figure, it can be seen that the MAE and RMSE of the method of the application at each time step are significantly lower than those of other models, and the wind power prediction value is closer to the true value, and has good prediction performance. This result shows that the model of the application performs well in extracting the complex characteristics of high fluctuation and non-stationary wind power sequence, which is due to the automatic adjustment of the coefficients of high-pass filter and low-pass filter through adaptive multi-level wavelet decomposition, which effectively extracts multi-level time-frequency characteristics. The frequency deviation is alleviated through frequency domain normalization, and the prediction accuracy is improved. The time-space encoder layer and the time-space decoder layer enhance the ability of the model to capture long-time dependence, and the causal convolution self-attention improves the ability to extract local features and process long time series, and the stationary correction loss function handles the data distribution deviation caused by non-stationarity, restores the data distribution and retains the non-stationarity information, while maintaining the time dependence, further improving the stability of the model, therefore the model of the application can effectively capture the time domain, space domain and frequency domain characteristics, significantly improve the accuracy and efficiency of wind power prediction.

[0088] The unmentioned part of the application is applicable to the prior art.

Claims

1. A spatiotemporal wind power prediction method based on adaptive wavelet decomposition and improved Transformer, characterized in that, The method includes the following steps: Step 1: Obtain the historical wind power sequence and the feature sequence affecting wind power of the target wind farm and perform preprocessing. Calculate the correlation between each feature sequence and the wind power sequence, retain the feature sequence with high correlation to wind power, and normalize the wind power sequence and the retained feature sequence. Step 2: Extract the frequency domain features of the wind power sequence and each feature sequence; An adaptive multi-level wavelet decomposition algorithm is used to decompose the wind power sequence step by step, resulting in multiple high-frequency components and one low-frequency component; the decomposition process is represented as follows: A0=X origin (3) In the formula, D k A k These are the high-frequency and low-frequency components obtained from the k-th level decomposition, A k-1 It is the low-frequency component obtained from the (k-1)th level decomposition, A0 is the initial low-frequency component, X origin It is a wind power sequence, where σ(·) represents the sigmoid activation function. It is the learnable weight matrix and bias of the k-th level low-pass filter. This represents the learnable weight matrix and bias of the k-th level high-pass filter, where ε represents the learnable parameters, l1, l2, ..., l c These are the coefficients of the low-pass filter, h1, h2, ..., h c These are the coefficients of the high-pass filter, and c is the number of coefficients; Each high-frequency component and low-frequency component is processed by a frequency domain normalization module to obtain frequency domain normalized high-frequency components and low-frequency components; all frequency domain normalized high-frequency components and low-frequency components are cascaded in the feature dimension to obtain the frequency domain features of the wind power sequence. Similarly, the frequency domain features of each feature sequence are obtained; Step 3: The frequency domain features of the wind power sequence and each feature sequence are combined to form feature X. Periodic embedding and spatial embedding are then performed on feature X to obtain feature X. in ; Step 4: Construct a wind power prediction model based on the Transformer network, including a U-Net network, inverse Fourier transform, and prediction layer; then use the feature X... in The input is fed into the U-Net network for feature extraction. The output features of the U-Net network are then subjected to inverse Fourier transform and then passed through the prediction layer to obtain the predicted wind power value. The U-Net network includes multiple spatiotemporal encoder layers and spatiotemporal decoder layers, with each spatiotemporal encoder layer having a skip connection to its corresponding spatiotemporal decoder layer. Both the spatiotemporal encoder layer and the spatiotemporal decoder layer include a spatiotemporal attention block, layer normalization, and a feedforward neural network. The input features are residually connected to the spatiotemporal attention block and then to themselves. The features obtained from the residual connections are then normalized by the layer and used as the input features of the feedforward neural network. The input features of the feedforward neural network are residually connected to the output features and then normalized by the layer to obtain the output features of the spatiotemporal encoder layer or the spatiotemporal decoder layer. Step 5: Train the wind power prediction model. Update the parameters of the wind power prediction model, high-pass filter, and low-pass filter through backpropagation to obtain the trained wind power prediction model. Use the trained wind power prediction model to predict wind power.

2. The spatiotemporal wind power prediction method based on adaptive wavelet decomposition and improved Transformer according to claim 1, characterized in that, During model training, the training loss is calculated using the stationarity correction loss function; the stationarity correction loss function L is expressed as: L=L1+λL2 (12) In the formula, L1 is the Huber loss, L2 is the data distribution constraint loss, λ and δ are hyperparameters, and Y, These are the actual and predicted values ​​of the wind power series, R(Y), respectively. The actual value Y and the predicted value of the wind power series. The autocorrelation matrix, ||·|| F Y is the F-norm, and Conv(·) is the covariance calculation function; i Y j Let these represent the wind power sequences starting at time i and time j, respectively, where i,j∈[t+1,t+ΔT], t is the current time, ΔT is the time step, and μ i μ j They represent Y respectively i and Y j The variance.

3. The spatiotemporal wind power prediction method based on adaptive wavelet decomposition and improved Transformer according to claim 1 or 2, characterized in that, The spatiotemporal attention block includes a multi-head self-attention unit, a causal convolutional self-attention unit, and a gated fusion unit. The multi-head self-attention unit extracts spatial features using multi-head self-attention, the causal convolutional self-attention unit extracts temporal features using causal convolutional self-attention, and the gated fusion unit fuses the spatial and temporal features to obtain spatiotemporal fused features. The fusion process of the gated fusion unit is represented as follows: X ST,out =z⊙X S +(1-z)⊙X T (9) z=σ(X S W z,1 +X F W z,2 +b z ) (10) In the formula, X ST,out It is a spatiotemporal fusion feature, X s X T These represent spatial and temporal features, respectively. ⊙ denotes element-wise dot product, and W... z,1 and W z,2 It is a learnable weight parameter, b z It is a bias.

4. The spatiotemporal wind power prediction method based on adaptive wavelet decomposition and improved Transformer according to claim 1, characterized in that, Define intraday embedding matrix, daily embedding matrix, monthly embedding matrix and spatial embedding matrix, and extract intraday embedding features, daily embedding features and monthly embedding features from intraday embedding matrix, daily embedding matrix and monthly embedding matrix respectively; By concatenating feature X, intraday embedding features, daily embedding features, monthly embedding features, and spatial embedding features along the feature dimension, we obtain feature X. in .

Citation Information

Patent Citations

  • Method for predicting wind speed and power of wind farm based on wavelet decomposition and support vector machine

    CN105184391A

  • Regional wind power generation power prediction method and system based on multi-scale double-space-time network

    CN116451873A