Wind power ultra-short-term prediction method based on time fusion Transform

By constructing a wind power prediction method based on time fusion Transformer and utilizing GRN, VSN and temporal multi-head attention mechanism, the problem of insufficient fusion of static features and temporal information is solved, high-precision wind power prediction is achieved, and the operating economy of wind farms and the stability of power systems are improved.

CN120632760APending Publication Date: 2025-09-12NANJING INST OF TECH
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510611395.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing ultra-short-term wind power forecasting methods fail to effectively utilize the static characteristics of wind farms and cannot effectively integrate temporal information, resulting in insufficient prediction accuracy and generalization ability.

Method used

A method based on time fusion Transformer is adopted to enhance the ability to capture static and temporal features by constructing input vectors, data processing modules, time fusion encoding modules and output modules, and combining GRN, VSN, LSTM and temporal multi-head attention mechanism.

Benefits of technology

It improves the accuracy of wind power prediction and the model's ability to perceive time attributes, enhances the prediction accuracy and modeling capabilities of complex nonlinear dynamic characteristics, and promotes the efficient absorption of wind power and the safe and stable operation of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632760A_ABST
    Figure CN120632760A_ABST
Patent Text Reader

Abstract

The invention discloses a wind power ultra-short-term prediction method based on time fusion Transform, and the method comprises the following steps: 1, collecting historical wind power data, numerical weather prediction (NWP) data and corresponding static data of a wind power plant, carrying out the coding of the data, and constructing an input vector; 2, constructing a data processing module, and performing feature extraction on historical wind power data, NWP data and static data to obtain different data representations; 3, constructing a time fusion coding module, carrying out time fusion coding, and enhancing time features represented by data; 4, constructing an output module, and completing the construction of a prediction model; and 5, training the prediction model by using related data to obtain optimal main parameters of the model. The method can achieve the ultra-short-term prediction of the wind power, and improves the prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wind power prediction, and in particular to an ultra-short-term wind power prediction method based on time fusion Transformer. Background Art

[0002] As the proportion of wind power in the energy mix increases annually, accurate wind power forecasting is crucial for the safe and stable operation of power grids and for improving wind power absorption capacity. Traditional ultra-short-term wind power forecasting methods primarily include physical models and data-driven models. While physical models utilize meteorological data for power forecasting, their accuracy is limited by the uncertainty and computational complexity of meteorological data. Data-driven models, such as statistical models and support vector machines, can capture the dynamic characteristics of wind power to a certain extent, but they fall short in addressing complex nonlinear relationships and long-term data dependencies. In recent years, deep learning methods, such as recurrent neural networks and long-short-term memory networks, have emerged. While these models can better handle dynamic time series data, existing ultra-short-term wind power forecasting methods often overlook the role of static features in improving forecast performance and fail to effectively incorporate temporal feature information. In particular, they remain deficient in capturing long-term dependencies. Therefore, the main drawbacks of existing technologies are their inability to effectively utilize the static characteristics of wind farms and their inability to incorporate temporal information, making it difficult to capture the complex nonlinearities and long-term data dependencies, resulting in insufficient prediction accuracy and generalization. Summary of the Invention

[0003] Purpose of the invention: The present invention provides a wind power ultra-short-term prediction method based on time fusion Transformer, which can realize ultra-short-term prediction of wind power and improve the accuracy of prediction.

[0004] Technical solution: The present invention provides a method for ultra-short-term wind power forecasting based on a time-fusion Transformer, comprising the following steps:

[0005] Step 1: Collect historical wind power data, numerical weather forecast (NWP) data and corresponding static data of the wind farm, encode them and construct an input vector;

[0006] Step 2: Construct a data processing module to extract features from historical wind power data, NWP data, and static data to obtain different data representations;

[0007] Step 3: Construct a time fusion coding module to perform time fusion coding and enhance the time features of data representation;

[0008] Step 4: Construct the output module to complete the prediction model construction;

[0009] Step 5: Use relevant data to train the prediction model and obtain the optimal main parameters of the model.

[0010] Furthermore, in step 1, the historical wind power data of the wind farm in the previous 12 hours is collected to construct the historical power input vector P t-11:t ; Encode the NWP data for the next 4 hours, including wind speed and direction at two different heights, and construct the NWP input matrix R t+1:t+4 =[R t+1 ,R t+2 ,R t+3 ,R t+4 ]; Encode the static data of the corresponding wind power historical power data, including the minute, hour, day of the week, and month of the collected data, and construct the static data input matrix S t-11:t+4 =[S t-11 ,...,S t ,S t+1 ,...,S t+4 ].

[0011] Furthermore, P t-11:t =[p t-11 ,p t-10 ,...,p t ]

[0012]

[0013] Where p represents wind power, r 1 Indicates the wind speed at the first height, r 2 Indicates the wind direction at the first height, r 3 Indicates the wind speed at the second height, r 4 Indicates the wind direction at the second height, s m Indicates minutes, s h Indicates hours, s d Indicates the day of the month, s w Indicates the week of the month.

[0014] Furthermore, in step 2, a data processing module is constructed to extract features from historical wind power data, NWP data, and static data to obtain different data representations, specifically including the following steps:

[0015] Step 21: Construct GRN and VSN;

[0016] Step 22: In static information processing, use four independent GRNs to encode the static data representation after variable selection to generate four static data representations S e 、S c 、S h and S s ,Right now:

[0017]

[0018] At the same time, in the processing of wind power historical power data, S s Fused with historical power and input into VSN, namely:

[0019]

[0020]

[0021] Similarly, in NWP data processing, NWP and S s Combine, input VSN, and get

[0022] Step 23, S c and S h As the initial values ​​of the cell state and hidden state of LSTM respectively, in the processing of wind power historical power data, the calculation process is expressed as:

[0023]

[0024] Where, F LSTM Represents the LSTM function;

[0025] Similarly, S c and S h As the initial values ​​of the cell state and hidden state of LSTM, respectively, in NWP data processing, we obtain

[0026] Furthermore, in step 21, the GRN includes two fully connected layers, a GLU, a skip connection layer, and a normalization layer; the calculation formula of the GRN is as follows:

[0027] F GRN (x) = LN(F Gate (F D (ELU(F D (x))))+x)

[0028]

[0029] Where, F GRN represents the GRN function, x represents the module input, LN represents layer normalization, F Gate represents the gate linear unit function, F D represents the fully connected layer function, ELU represents the exponential linear unit function, σ represents the Sigmoid function, F C represents the convolution function, ⊙ represents the Hadamard product, W D represents the weight of the fully connected layer, bD represents the bias of the fully connected layer;

[0030] VSN includes multiple GRNs, which linearly transform the static information at each moment to obtain a d-dimensional feature vector The variable selection weight is calculated using GRN and Softmax activation function, and then combined with the input after linear transformation. The calculation formula of VSN is as follows:

[0031]

[0032]

[0033] Where, v t represents the variable selection weight, Softmax represents the Softmax activation function, F VSN Represents the VSN function.

[0034] Furthermore, in step 3, a temporal fusion encoding module is constructed using GRN, temporal multi-head attention mechanism, and gated linear unit (GLU) to perform temporal fusion encoding and enhance the temporal features of data representation.

[0035] Furthermore, the static information generated in step 2 is represented as S e Respectively Fusion, after two independent GRNs, further refines and enriches static features to obtain a new data representation, namely:

[0036]

[0037] Secondly, After linear transformation, it is converted into Q, K and V feature matrices and input into the time multi-head attention mechanism, namely:

[0038]

[0039] Where, F SA represents the self-attention mechanism, F TMH represents the temporal multi-head attention mechanism, m represents the number of self-attention mechanisms, W Q 、W K 、W V With W H Represents Q, K, V and the weights of different self-attention mechanisms respectively, and D represents the scaling factor, which is used to control the size of Q and K after calculation;

[0040] Finally, after GLU, and with the time multi-head attention mechanism input Fusion, through GRN to achieve time fusion coding, that is:

[0041]

[0042] Where, Represents the output of the temporal fusion encoding module.

[0043] Furthermore, in step 4, the output of the temporal fusion coding module is Output from NWP data processing module Combined, through the normalization layer and the fully connected layer, the power at the time to be predicted is obtained The specific calculation process is expressed as:

[0044]

[0045] Furthermore, in step 5, the prediction model is trained using relevant data to obtain the optimal main parameters of the model, and the training loss function is set to the mean absolute error (MAE), that is:

[0046]

[0047] In the formula, T represents the number of samples, represents the predicted power at time t, p t represents the real power at time t;

[0048] The training set covers a time span of at least one year to obtain the optimal main parameters, including the number of LSTMs, the number of temporal multi-head attention mechanisms, and the number of neurons and layers in the fully connected layer of the output module.

[0049] Beneficial effects: Compared with the existing technology, the present invention has the following significant advantages: (1) static features are introduced, and the static features are effectively encoded and fused through VSN and GRN, which strengthens the model's utilization of static features, enables the model to have a stronger ability to perceive time attributes, and effectively improves the prediction accuracy; (2) a time fusion coding module is constructed, and a time multi-head attention mechanism is adopted, which not only effectively fuses historical power, NWP and static data, but also enhances the model's ability to capture time attributes and improves the modeling ability of complex nonlinear dynamic features; (3) through the joint application of GRN and GLU structures, the model's ability to represent features is further improved, so that the model can automatically generate more representative fusion features, thereby improving the prediction accuracy; (4) it shows obvious advantages in the test of actual wind farm data sets, and can more accurately capture the trend of wind power changes, which is conducive to improving the economy and safety of power system operation and promoting the efficient absorption of wind power. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 Schematic diagram of the method of the present invention.

[0051] Figure 2This is a structural diagram of the prediction model of the present invention.

[0052] Figure 3 This is a simulation result diagram of the present invention. DETAILED DESCRIPTION

[0053] like Figure 1 As shown in FIG, a method for ultra-short-term wind power prediction based on time fusion Transformer includes the following steps:

[0054] Step 1: Collect historical wind power data, numerical weather forecast (NWP) data, and corresponding static data from the wind farm, encode them, and construct an input vector;

[0055] Collect historical wind power data from the wind farm within the previous 12 hours and construct the historical power input vector P t-11:t Encode the NWP data for the next 4 hours, including wind speed and direction at two different heights, and construct the NWP input matrix R t+1:t+4 =[R t+1 ,R t+2 ,R t+3 ,R t+4 ]. Encode the static data of the corresponding wind power historical power data, including the minute, hour, day of the week, and month of the collected data, and construct the static data input matrix S t-11:t+4 =[S t-11 ,...,S t ,S t+1 ,...,S t+4 ]. Specifically,

[0056] P t-11:t =[p t-11 ,p t-10 ,...,p t ]

[0057]

[0058] Where p represents wind power, r 1 Indicates the wind speed at the first height, r 2 Indicates the wind direction at the first height, r 3 Indicates the wind speed at the second height, r 4 Indicates the wind direction at the second height, s m Indicates minutes, s h Indicates hours, s d Indicates the day of the month, s w Indicates the week of the month.

[0059] Step 2: Construct a data processing module to extract features from historical wind power data, NWP data, and static data to obtain different data representations;

[0060] like Figure 2 As shown in Figure 1, first, construct GRN and VSN. GRN consists of two fully connected layers, GLU, skip connection layer and normalization layer. The calculation formula of GRN is as follows:

[0061] F GRN (x) = LN(F Gate (F D (ELU(F D (x))))+x)

[0062]

[0063] Where, F GRN represents the GRN function, x represents the module input, LN represents layer normalization, F Gate represents the gate linear unit function, F D represents the fully connected layer function, ELU represents the exponential linear unit function, σ represents the Sigmoid function, F C represents the convolution function, ⊙ represents the Hadamard product, W D represents the weight of the fully connected layer, b D represents the bias of the fully connected layer.

[0064] VSN is composed of multiple GRNs, which linearly transform the static information at each moment to obtain a d-dimensional feature vector The variable selection weight is calculated using GRN and Softmax activation function, and then combined with the input after linear transformation. The calculation formula of VSN is as follows:

[0065]

[0066] Where, v t represents the variable selection weight, Softmax represents the Softmax activation function, F VSN Represents the VSN function.

[0067] Secondly, in static information processing, four independent GRNs are used to encode the static data representation after variable selection to generate four static data representations S e 、S c 、S h and S s ,Right now:

[0068]

[0069] At the same time, in the processing of wind power historical power data, Ss Fused with historical power and input into VSN, namely:

[0070]

[0071] Similarly, in NWP data processing, NWP and S s Combine, input VSN, and get

[0072] Finally, S c and S h As the initial values ​​of the cell state and hidden state of LSTM respectively, in the processing of wind power historical power data, the calculation process can be expressed as:

[0073]

[0074] Where, F LSTM Represents an LSTM function.

[0075] Similarly, S c and S h As the initial values ​​of the cell state and hidden state of LSTM, respectively, in NWP data processing, we obtain

[0076] Step 3: Construct a time fusion coding module to perform time fusion coding and enhance the temporal features of data representation;

[0077] like Figure 2 As shown, first, the static information generated in step 2 is represented as S e Respectively Fusion, after two independent GRNs, further refines and enriches static features to obtain a new data representation, namely:

[0078]

[0079] Secondly, After linear transformation, it is converted into Q, K and V feature matrices and input into the time multi-head attention mechanism, namely:

[0080]

[0081] Where, F SA represents the self-attention mechanism, F TMH represents the temporal multi-head attention mechanism, m represents the number of self-attention mechanisms, W Q 、W K 、W V With W H They represent Q, K, V and the weights of different self-attention mechanisms respectively, and D represents the scaling factor, which is used to control the size of Q and K after calculation.

[0082] Finally, after GLU, and with the time multi-head attention mechanism input Fusion, through GRN to achieve time fusion coding, that is:

[0083]

[0084] Where, Represents the output of the temporal fusion encoding module.

[0085] Step 4: Construct the output module and complete the prediction model construction;

[0086] like Figure 2 As shown, the output of the temporal fusion coding module is Output from NWP data processing module Combined with layer normalization and full connection layer, the power at the time to be predicted is obtained The specific calculation process can be expressed as:

[0087]

[0088] Step 5: Use relevant data to train the prediction model and obtain the optimal main parameters of the model;

[0089] First, the loss function for training is set to the mean absolute error (MAE), that is:

[0090]

[0091] In the formula, T represents the number of samples, represents the predicted power at time t, p t represents the real power at time t.

[0092] Secondly, the time span covered by the training set is at least one year, and the optimal main parameters are obtained, including the number of LSTMs, the number of temporal multi-head attention mechanisms, and the number of neurons and layers in the fully connected layer of the output module.

[0093] We selected data from the "Zone 7" wind farm in the 2014 Global Energy Forecasting Competition as our dataset. This dataset has a 1-hour resolution and includes wind speed and direction at altitudes of 10 and 100 meters. The 2012 data served as the training set for model training, comprising 8,783 data points. The January 2013 data served as the validation set for parameter adjustment, comprising 744 data points. The February 2013 data served as the test set, comprising 672 data points.

[0094] The best main parameters are shown in Table 1, and the prediction results are shown in Figure 3 As shown, from Figure 3It can be seen that the prediction curve of the method of the present invention has a good fit and a high prediction accuracy.

[0095] Table 1 Optimal main parameters

[0096]

[0097] In summary, the present invention provides a method for ultra-short-term wind power prediction based on time-fusion Transformer, which can achieve high-performance ultra-short-term wind power prediction and can be applied to actual projects. It can help wind farm operation and maintenance personnel and power system dispatchers arrange operation and maintenance plans in advance, thereby improving wind power consumption and the safe and stable operation of new power systems.

Claims

1. A wind power ultra-short-term prediction method based on time fusion Transformer, characterized by: The steps include: Step 1: Collect historical wind power data of wind farms, numerical weather forecast (NWP) data and corresponding static data, encode them and construct an input vector; Step 2: Construct a data processing module to extract features from historical wind power data, NWP data, and static data to obtain different data representations; Step 3: Construct a time fusion coding module to perform time fusion coding and enhance the time features of data representation; Step 4: Construct the output module to complete the prediction model construction; Step 5: Use relevant data to train the prediction model and obtain the optimal main parameters of the model.

2. The ultra-short-term wind power forecasting method based on time fusion Transformer according to claim 1 is characterized in that: In step 1, the historical wind power data of the wind farm in the previous 12 hours is collected to construct the historical power input vector P t-11:t ; Encode the NWP data for the next 4 hours, including wind speed and direction at two different heights, and construct the NWP input matrix R t+1:t+4 =[R t+1 ,R t+2 ,R t+3 ,R t+4 ]; Encode the static data of the corresponding wind power historical power data, including the minute, hour, day of the week, and month of the collected data, and construct the static data input matrix S t-11:t+4 =[S t-11 ,...,S t ,S t+1 ,...,S t+4 ].

3. The ultra-short-term wind power forecasting method based on time fusion Transformer according to claim 2 is characterized in that: P t-11:t =[p t-11 ,p t-10 ,...,p t ] Where p represents wind power, r 1 Indicates the wind speed at the first height, r 2 Indicates the wind direction at the first height, r 3 Indicates the wind speed at the second height, r 4 Indicates the wind direction at the second height, s m Indicates minutes, s h Indicates hours, s d Indicates the day of the month, s w Indicates the week of the month.

4. The ultra-short-term wind power forecasting method based on time fusion Transformer according to claim 1 is characterized in that: In step 2, a data processing module is constructed to extract features from historical wind power data, NWP data, and static data to obtain different data representations. The specific steps include the following: Step 21: Construct GRN and VSN; Step 22: In static information processing, use four independent GRNs to encode the static data representation after variable selection to generate four static data representations S e 、S c 、S h and S s ,Right now: At the same time, in the processing of wind power historical power data, S s Fused with historical power and input into VSN, namely: Similarly, in NWP data processing, NWP and S s Combine, input VSN, and get Step 23, S c and S h As the initial values ​​of the cell state and hidden state of LSTM respectively, in the processing of wind power historical power data, the calculation process is expressed as: Where, F LSTM Represents the LSTM function; Similarly, S c and S h As the initial values ​​of the cell state and hidden state of LSTM, respectively, in NWP data processing, we obtain 5. The ultra-short-term wind power forecasting method based on time fusion Transformer according to claim 4 is characterized in that: In step 21, the GRN includes two fully connected layers, GLU, a skip connection layer and a normalization layer; the calculation formula of the GRN is as follows: F GRN (x)=LN(F Gate (F D (TWO(F D (x))))+x) Where, F GRN represents the GRN function, x represents the module input, LN represents layer normalization, F Gate represents the gate linear unit function, F D represents the fully connected layer function, ELU represents the exponential linear unit function, σ represents the Sigmoid function, F C represents the convolution function, ⊙ represents the Hadamard product, W D represents the weight of the fully connected layer, b D represents the bias of the fully connected layer; VSN includes multiple GRNs, which linearly transform the static information at each moment to obtain a d-dimensional feature vector The variable selection weight is calculated using GRN and Softmax activation function, and then combined with the input after linear transformation. The calculation formula of VSN is as follows: Where, v t represents the variable selection weight, Softmax represents the Softmax activation function, F VSN Represents the VSN function.

6. The ultra-short-term wind power forecasting method based on time fusion Transformer according to claim 1, characterized in that: In step 3, a temporal fusion coding module is constructed using GRN, temporal multi-head attention mechanism, and gated linear unit GLU to perform temporal fusion coding and enhance the temporal features of data representation.

7. The ultra-short-term wind power forecasting method based on time fusion Transformer according to claim 6 is characterized in that: The static information generated in step 2 is represented as S e Respectively Fusion, after two independent GRNs, further refines and enriches static features to obtain a new data representation, namely: Secondly, After linear transformation, it is converted into Q, K and V feature matrices and input into the time multi-head attention mechanism, namely: Where, F SA represents the self-attention mechanism, F TMH represents the temporal multi-head attention mechanism, m represents the number of self-attention mechanisms, W Q 、W K 、W V With W H Represents Q, K, V and the weights of different self-attention mechanisms respectively, and D represents the scaling factor, which is used to control the size of Q and K after calculation; Finally, after GLU, and with the time multi-head attention mechanism input Fusion, through GRN to achieve time fusion coding, that is: Where, Represents the output of the temporal fusion encoding module.

8. The ultra-short-term wind power forecasting method based on time fusion Transformer according to claim 1 is characterized in that: In step 4, the output of the temporal fusion coding module is Output from NWP data processing module Combined, through the normalization layer and the fully connected layer, the power at the time to be predicted is obtained The specific calculation process is expressed as:

9. The ultra-short-term wind power forecasting method based on time fusion Transformer according to claim 1, characterized in that: In step 5, the prediction model is trained using relevant data to obtain the optimal main parameters of the model, and the training loss function is set to the mean absolute error MAE, that is: In the formula, T represents the number of samples, represents the predicted power at time t, p t represents the real power at time t; The training set covers a time span of at least one year to obtain the optimal main parameters, including the number of LSTMs, the number of temporal multi-head attention mechanisms, and the number of neurons and layers in the fully connected layer of the output module.

Citation Information

Cited By

  • Ultra-short-term wind power prediction method based on hybrid network

    CN121150040A

  • A hybrid network-based ultra-short-term wind power prediction method

    CN121150040B

  • Wind power prediction method based on space-variable double perception and adaptive fusion

    CN122118673A