Wind power prediction method

Through multi-stage hierarchical learning and L2T transfer learning framework, combined with wavelet transform and reversible instance normalization, the accuracy and robustness problems of wind power prediction in new wind farm areas are solved, and efficient and accurate wind power prediction is achieved. and stability.

CN118761490APending Publication Date: 2024-10-11GUODIAN NANJING AUTOMATION
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410751003.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing wind power power prediction methods are difficult to accurately predict wind power, especially in new wind farm areas. Model training results are poor and robust, and traditional methods are difficult to handle highly nonlinear wind power power sequences.

Method used

A wind power power prediction method is used to preprocess historical wind power power data to build and train a wind power power prediction model. It uses multi-stage hierarchical learning and time two-dimensional modeling, combined with the L2T transfer learning framework, to transform the model from source data to The domain is migrated to the target data domain, the model is optimized to adapt to the new wind farm area, and the distribution differences and noise of the data are reduced through reversible instance normalization and wavelet transform.

Benefits of technology

It improves the accuracy and robustness of wind power prediction, enhances the generalization ability of the model, can quickly build efficient prediction models in new wind farm areas, reduces computing and memory overhead, adapts to different environmental conditions, and improves prediction accuracy. and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118761490A_ABST
    Figure CN118761490A_ABST
Patent Text Reader

Abstract

The invention discloses a wind power prediction method, and relates to the technical field of wind power prediction, and the wind power prediction method comprises the steps: obtaining historical wind power data of a source region as source data; a wind power prediction model is constructed and trained based on the preprocessed source data, and wind power prediction of the source region is realized by using the trained wind power prediction model; migrating the trained wind power prediction model from a source data domain to a target data domain, and generating an optimized wind power prediction model suitable for the new wind power plant region; and utilizing the trained optimized wind power prediction model to realize wind power prediction of the new wind power plant area. According to the method, migration experience is accumulated through multiple migration learning, and proper migration content is selected for different target data, so that the generalization ability of the model and the prediction ability after migration are improved.
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 a wind power prediction method. Background Art

[0002] As an important renewable energy source that promotes the optimization of energy structure, wind power has become an important part of my country's energy system, with its share of power generation increasing year by year. However, wind power generation is easily affected by environmental factors such as meteorology, and its power has significant randomness, intermittency and volatility, which makes it difficult to accurately predict wind power. The accuracy of power generation reporting plans is low, which poses a huge challenge to the safe and stable operation of the power system during large-scale grid connection. Accurate wind power prediction is an important measure to solve this problem. It can alleviate the peak and frequency regulation pressure brought by large-scale grid connection of wind power, and help the power system to formulate reasonable dispatching plans in advance, so as to ensure the stable operation of the power system, improve the absorption capacity of wind power, and better ensure the stability and economic operation of wind farms.

[0003] Traditional wind power forecasting methods are mainly divided into two categories: physical methods and statistical methods. Physical methods need to combine the meteorological environment of the wind farm, wind turbines and other physical information to build a forecasting model. Therefore, the modeling process is complex, the calculation time is long, the model robustness is poor, and the forecasting accuracy is low. Statistical models mainly predict by studying the statistical laws of historical wind power data, such as Kalman filtering, autoregressive moving average model and autoregressive difference moving average model. Such methods are often simple in structure and easy to train, but have limited processing capabilities for highly nonlinear wind power sequences.

[0004] In recent years, with the rise and development of deep learning, new solutions have been provided for the problem of wind power prediction. The deep learning model has a strong learning ability, can capture the complex nonlinear relationship between data from large-scale historical data, and automatically extract the time features related to the prediction target, so as to better adapt to different data patterns and changes, and achieve accurate prediction of future states. And because the source data contains both meteorological data and wind farm unit SCADA data, it has mutation under the influence of factors such as communication transmission and sensor acquisition, and the deep learning model is more sensitive to the distribution of input data. Therefore, model training on the source data will cause the problem of difficulty in convergence, and the training results are poor.

[0005] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention

[0006] In view of the problems in the related art, the present invention proposes a wind power prediction method to overcome the above technical problems existing in the existing related art.

[0007] To this end, the specific technical solution adopted by the present invention is as follows:

[0008] A wind power prediction method, the wind power prediction method comprising:

[0009] Obtain historical wind power data of the source area as source data, and preprocess the source data;

[0010] Construct and train a wind power prediction model based on the preprocessed source data, and use the trained wind power prediction model to achieve wind power prediction in the source area;

[0011] Migrate the trained wind power prediction model from the source data domain to the target data domain to generate an optimized wind power prediction model suitable for the new wind farm area;

[0012] The optimized wind power prediction model is retrained, and the trained optimized wind power prediction model is used to realize wind power prediction in the new wind farm area.

[0013] Preferably, constructing and training a wind power prediction model based on the preprocessed source data, and using the trained wind power prediction model to implement wind power prediction in the source area includes:

[0014] Performing forward instance normalization processing on the preprocessed source data; building a wind power prediction model based on the data after forward instance normalization processing, and performing multi-stage hierarchical learning tasks in the wind power prediction model;

[0015] The wind power prediction model is trained by using a pre-divided training set and a test set, and the trained wind power prediction model is verified by using a pre-divided validation set to generate evaluation indicators;

[0016] Obtaining the data to be predicted in the source area as the input of the trained wind power prediction model, and outputting the wind power prediction result of the source area through the trained wind power prediction model;

[0017] The output wind power prediction results are subjected to reverse instance normalization processing to eliminate the distribution differences in the wind power prediction results.

[0018] Preferably, building a wind power prediction model based on the data after normalization processing of the forward instance, and performing a multi-stage hierarchical learning task in the wind power prediction model includes:

[0019] The normalized data of the forward instance is input into the wind power prediction model for time two-dimensional modeling to generate time feature representation;

[0020] The temporal feature representation is transferred to the time slicing stage, and the dimension of the input data is changed according to the input dimension restrictions of different stages of the wind power prediction model;

[0021] The time slice results are transferred to the time series encoder network, and each time slice result is linearly transformed through the time series encoder network.

[0022] Preferably, the data after normalization processing of the forward instance is input into the wind power prediction model for time two-dimensional modeling, and the generation of time feature representation includes:

[0023] Analyze the time series of the normalized data of the forward instance in the frequency domain and identify the characteristic information in the time series;

[0024] Distribute the feature information in the time series to different time dimensions according to the frequency and cycle length; Zero-expand the time series in the time dimension and combine it with the deep convolutional block to generate a zero-expanded two-dimensional feature representation, and regress the two-dimensional feature representation into a one-dimensional format in an aggregated form;

[0025] The truncation function is used to change the time series from the expanded length to the original length, and the one-dimensional representation is fused with the normalized exponential function to generate the time feature representation after two-dimensional time modeling.

[0026] Preferably, transmitting the time feature representation to the time slicing stage, and changing the dimension of the input data according to the input dimension restrictions of different stages of the wind power prediction model includes:

[0027] Obtaining the time feature representation after the time two-dimensional modeling, and performing window slicing processing on the time feature representation in combination with a preset window size to form a new time slice;

[0028] The new time slice is fed to the linear projection layer, and the original time features of the time slice are projected into a new dimension through the linear projection layer to adapt to the input dimension restrictions of different stages of the wind power prediction model;

[0029] After the original temporal feature projection is completed, the time slice and its contextual position information are forward instance normalized and the time slice result is generated.

[0030] Preferably, transmitting the time slice results to the time series encoder network, and performing a linear transformation on each time slice result through the time series encoder network comprises:

[0031] Input the time slice results into the time series encoder network, which includes a multi-head attention layer and a feedforward neural network;

[0032] Through the multi-head attention layer, multi-head attention calculation and time reduction calculation are performed on the input time slice results in sequence, so as to achieve the focus on the input time slice results;

[0033] After receiving the time slice results processed by the multi-head attention layer, the feedforward neural network performs a linear transformation on the processed time slice results and outputs the positional hidden representation of the time slice.

[0034] Preferably, after receiving the time slice result processed by the multi-head attention layer, the feedforward neural network performs a linear transformation on the processed time slice result, and outputs the position hidden representation of the time slice, including:

[0035] The time slice results processed by the multi-head attention layer are input into the feedforward neural network in the time series encoder network;

[0036] The linear layer in the feedforward neural network performs the initial linear transformation on the processed time slice results and maps the input vector into a high-dimensional intermediate representation space;

[0037] After the nonlinear capability of the wind power prediction model is introduced in combination with the nonlinear activation function, a quadratic linear transformation is implemented; based on the quadratic linear change result, the input vector of the intermediate representation space is mapped back to the original hidden representation space, and the position hidden representation of the time slice is generated and output.

[0038] Preferably, migrating the trained wind power prediction model from the source data domain to the target data domain to generate an optimized wind power prediction model suitable for the new wind farm area includes:

[0039] Obtain real-time wind power data for the new wind farm area and use the real-time wind power data as the target data for the transfer learning algorithm;

[0040] Define historical transfer learning experience as triple information, and use triple information as input to learn the agent to maximize the reflection function in the L2T framework;

[0041] The migration content and migration mode in the wind power prediction model are optimized by combining the maximization reflection function to generate an optimized wind power prediction model suitable for the new wind farm area.

[0042] Preferably, the calculation formula for multi-head attention calculation is:

[0043]

[0044] Where Attention(·) represents the multi-head attention module;

[0045] Q, K, and V all represent subsampled versions of the input points;

[0046] dheads Represents the dimension of each head in the multi-head attention mechanism.

[0047] Preferably, the calculation formula for time-decreasing calculation is:

[0048] TR(c)=Norm(reshape(c,R)W T ), c∈{K,V};

[0049] In the formula, TR(·) represents time decreasing;

[0050] Norm represents the normalization result;

[0051] R represents the time reduction factor;

[0052] W T Represents a linear projection.

[0053] The beneficial effects of the present invention are:

[0054] 1. The present invention uses reversible instance normalization to optimize and restore data, and sets forward and reverse instance normalization at the start and end positions of the wind power prediction model respectively, thereby effectively alleviating the distribution differences in time series data, and as a universal trainable normalization layer, it is suitable for any deep neural network.

[0055] 2. The feature extraction stage of the wind power prediction model in the present invention is composed of three completely identical stage modules, and the overall design concept of Transformer is adopted. The complex time changes are decomposed into changes within multiple cycles and between cycles through the time two-dimensional modeling module, thereby improving the feature representation capability and facilitating subsequent representation learning; the input data is screened through the time slicing module to achieve data dimension reduction, thereby increasing the processable sequence length and reducing the calculation and memory overhead; the feature extraction function of the encoder module and the parallel working nature can effectively improve the calculation efficiency, and when analyzing long sequences, better capture long-distance dependencies.

[0056] 3. The present invention introduces the L2T transfer learning framework to migrate future data and models to the new target area, and trains them in combination with the target data of the target area to quickly build a wind power prediction model suitable for the new target area. This allows the invention to accumulate migration experience through multiple transfer learnings and select appropriate migration content for different target data, thereby improving the generalization ability of the model and the prediction ability after migration, which is of great significance for wind power prediction tasks in multiple regions.

[0057] 4. The present invention not only optimizes data distribution by normalizing source data, but also suppresses mutation data and realizes data stabilization, which helps the wind power prediction model to better compare and weigh the importance of features, improves model performance and prediction accuracy. At the same time, in response to the power prediction needs of new wind farms, when there is less target data in new wind farms, the knowledge learned in the source data is transferred to the target data through transfer learning technology, so that the model can better adapt to the target data and obtain better performance on limited target data, which helps to speed up the model training time, improve the generalization ability of the model, and improve the robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0059] Figure 1 is a flow chart of a wind power prediction method according to an embodiment of the present invention;

[0060] Figure 2 is a schematic diagram of a specific implementation of a wind power prediction method according to an embodiment of the present invention;

[0061] Figure 3 It is a flow chart of the L2T transfer learning framework in the wind power prediction method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0062] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments. They can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementation methods and advantages of the present invention.

[0063] According to an embodiment of the present invention, a wind power prediction method is provided.

[0064] With the continuous growth of clean energy demand, wind power generation has played an important role in the transformation of my country's energy structure. However, since wind power generation is easily affected by external factors such as weather, its power has significant randomness, intermittency and volatility, which will cause local voltage fluctuations during large-scale grid connection, making it difficult to balance power in real time, and posing a huge challenge to the safe and stable operation of the power system. Accurate wind power forecasting is an important measure to solve this problem. The wind power forecasting method provided by the present invention aims to reduce the prediction error of short-term wind power and improve the safety of large-scale wind power grid connection. Specifically, the present invention solves the following key technical problems:

[0065] (1) Source data optimization: The quality of source data directly determines the prediction results of the T2M-HMFormer algorithm. Since the source data includes meteorological data and wind farm SCADA data, both of which are time series data, they are affected by factors such as communication transmission and sensor acquisition and contain a large amount of abnormal data. The present invention normalizes the source data through reversible instance normalization, thereby effectively suppressing non-stationary information and solving the distribution offset problem in wind power prediction.

[0066] In order to further improve the quality of source data, the present invention adds a step of noise filtering technology based on wavelet transform before data normalization. Specifically, the time series data is decomposed into different frequency bands using wavelet transform. First, a suitable wavelet basis function (such as Daubechies wavelet) is selected to perform multi-layer decomposition on the source data, decomposing the signal into a low-frequency part (approximate coefficient) and a high-frequency part (detail coefficient). Then, a soft threshold or hard threshold processing method is applied to the high-frequency part to remove noise and retain important signal features. Finally, the processed signal is reconstructed by inverse wavelet transform to obtain denoised time series data. This step significantly reduces the high-frequency noise component in the data and further improves the stability of the source data. The processed data is then reversibly instance normalized to ensure the high quality and stability of the input data.

[0067] The expression of wavelet decomposition is:

[0068]

[0069] In the formula, x(t) is the original time series signal, a j0,k is an approximate coefficient used to represent the low-frequency part of the signal, d j,k is the detail coefficient, which is used to represent the high-frequency part of the signal. is the scaling function used to reconstruct the low-frequency signal, ψ j,k (t) is the wavelet function used to reconstruct high-frequency signals, j0 is the initial scale of wavelet decomposition, j is the maximum scale of wavelet decomposition, and k is the different positions in the time series.

[0070] The expression for threshold processing is:

[0071]

[0072] In the formula, is the processed detail coefficient, λ is the threshold parameter used to distinguish noise from signal, sign(d j,k ) is d j,k The symbol function of .

[0073] The expression of wavelet reconstruction is:

[0074]

[0075] In the formula, is the denoised time series signal, is the approximate coefficient after processing, is the detail coefficient after processing.

[0076] (2) Power prediction modeling: How to accurately predict wind power is a key issue. Traditional wind power prediction models based on physics and statistics mainly rely on mathematical methods, which are difficult to capture the highly nonlinear relationship in the wind power sequence. There are problems such as complex modeling, long calculation time, and low prediction accuracy. The present invention introduces a deep learning model and uses a hierarchical multi-scale Transformer algorithm based on temporal two-dimensional modeling (Temporal 2D Modeling-HierarchicalMulti-scale Transformer, T2M-HMFormer) to model the wind power prediction problem, thereby obtaining more accurate wind power.

[0077] (3) Model migration: Since the amount of data in the new wind farm is limited, using only this data for training often leads to poor model results. The present invention migrates the existing source data and model to the new wind farm through the L2T framework, and trains with the target data in the new wind farm, thereby improving the training efficiency and accuracy of the model on the target data.

[0078] In order to enhance the adaptability of the model in the new wind farm, the present invention adds a dynamic weight adjustment mechanism in the process of transfer learning. Specifically, the weight parameters in the transfer learning are adjusted in real time according to different wind farm environments and meteorological conditions. The implementation steps are as follows: First, the Bayesian optimization algorithm is used to dynamically adjust the weight parameters of the source data and the target data during the model migration process. The Bayesian optimization predicts the model performance under different weight parameter settings by establishing a proxy model (such as Gaussian process regression), and selects the optimal parameter combination according to the prediction results; secondly, in each transfer learning iteration, the model performance of the current weight parameters is evaluated, and the weight parameters are adjusted according to the recommendations of the Bayesian optimization; finally, the model is retrained using the adjusted weight parameters to optimize the transfer learning effect. This step can adaptively optimize the model parameters during the migration process and improve the prediction accuracy and robustness of the model in the new environment.

[0079] Among them, the expression of the Bayesian optimization objective function is:

[0080]

[0081] Where θ is the weight parameter, E[f(θ)] is the expected performance predicted by the surrogate model, Var[f(θ)] is the performance variance predicted by the surrogate model, and β is the exploration-exploitation trade-off parameter.

[0082] The expression for dynamic weight adjustment is:

[0083]

[0084] In the formula, θ * is the optimized weight parameter, μ(θ) is the predicted mean of the Bayesian optimization proxy model, σ(θ) is the predicted standard deviation, ε is the smoothing parameter, and the denominator is zero.

[0085] The expression for the retrained model is:

[0086] L to =α*L so +(1-α)*L ta ;

[0087] Where, L to is the total loss function, α is the dynamically adjusted weight parameter, L so is the loss function of the source data, L ta is the loss function of the target data.

[0088] Before model migration, in order to further improve the robustness and adaptability of the model, the present invention introduces a data enhancement technology in the model training stage to generate more diverse training data for the specific environmental conditions of different wind farms to improve the generalization ability of the model. The specific steps are as follows: sliding window slices are performed on the time series data, each slice contains time series data of a fixed length, the data in each sliding window is randomly time-shifted to generate time series data of different phases, random Gaussian noise is added to the time series data to increase the diversity of the data, and the enhanced data is smoothed to reduce the impact of noise.

[0089] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1-Figure 3 As shown, according to the wind power prediction method of an embodiment of the present invention, the wind power prediction method includes:

[0090] S1. Obtain historical wind power data of a source area as source data, and preprocess the source data.

[0091] It should be noted that the historical wind power data in the source area includes historical meteorological data and historical wind farm unit SCADA data. Since the collected source data may have data loss, it is necessary to clean the original data and process outliers and missing values.

[0092] Data cleaning includes the process of screening, organizing, correcting and removing erroneous, incomplete or inaccurate data. The purpose of data cleaning is to ensure the quality and accuracy of the data so that subsequent analysis and application can obtain reliable results. Among them, processing outliers and default values ​​is a common method of data cleaning.

[0093] Missing value processing includes identifying missing values ​​in the data and filling them with the median of the data on both sides of the missing value; outlier processing includes identifying and processing outliers in the data and filling them with the median of the data on both sides of the outlier.

[0094] S2. Build and train a wind power prediction model based on the preprocessed source data, and use the trained wind power prediction model to realize wind power prediction in the source area.

[0095] Among them, building and training a wind power prediction model based on the preprocessed source data, and using the trained wind power prediction model to achieve wind power prediction in the source area include:

[0096] The preprocessed source data is subjected to forward instance normalization processing; a wind power prediction model is constructed based on the data after forward instance normalization processing (the wind power prediction model is the T2M-HMFormer model), and a multi-stage hierarchical learning task is performed in the wind power prediction model.

[0097] It should be noted that the wind power prediction problem is modeled using the hierarchical multi-scale Transformer algorithm based on temporal two-dimensional modeling (Temporal2D Modeling-Hierarchical Multi-scale Transformer, T2M-HMFormer), so as to obtain more accurate wind power.

[0098] It should be noted that reversible instance normalization is used to process the data, which consists of two different steps: forward instance normalization and reverse instance normalization. Forward instance normalization is defined as input processing, which can fix the distribution of the source data according to its mean and variance, while reverse instance normalization is defined as data restoration, which can return the output to the original distribution of the source data.

[0099] If the input and output in the source data are defined as Where N represents the number of source data. Let K, T x and T y Respectively represent the number of variables in the source data, the input sequence length and the model prediction length, which can be calculated for each instance in the source data The mean and variance The calculation formula is as follows:

[0100]

[0101] Therefore, the process of forward instance normalization can be expressed by a mathematical formula:

[0102]

[0103] In the formula, Υ k , β k is a learnable affine parameter vector, X is the input data, y is the output data, i is an index in the input, k is the number of variables in the source data, j is an index in the input sequence length, t is the prediction period, and ε is the smoothing parameter.

[0104] The series after forward instance normalization has a more consistent mean and variance, reducing the non-stationary information in the source data. Therefore, forward instance normalization allows the model to accurately predict local dynamics within the series while receiving inputs that are uniformly distributed in mean and variance.

[0105] It should be noted that if Figure 2As shown in the figure, the data after normalization of the forward instance is input into the three stages of the model, where the contents of the first, second and third stages of the model are completely consistent. Through multi-stage hierarchical learning, the representation and generalization capabilities of the model can be improved. Each stage consists of three parts, namely, time two-dimensional modeling, time slicing, and Transformer encoder network.

[0106] Among them, a wind power prediction model is constructed based on the data after normalization processing of the forward instance, and multi-stage hierarchical learning tasks are performed in the wind power prediction model, including:

[0107] The normalized data of the forward instance is input into the wind power prediction model for time two-dimensional modeling to generate time feature representation.

[0108] Among them, the data after normalization of the forward instance is input into the wind power prediction model for time two-dimensional modeling, and the generated time feature representation includes:

[0109] The time series of the data after normalization of the forward instance is analyzed in the frequency domain to identify the characteristic information in the time series.

[0110] The feature information in the time series is distributed to different time dimensions according to the frequency and cycle length. The time series is zero-extended in the time dimension and combined with deep convolution blocks to generate a zero-extended two-dimensional feature representation. At the same time, the two-dimensional feature representation is regressed into a one-dimensional format in an aggregated form.

[0111] The truncation function is used to change the time series from the expanded length to the original length, and the one-dimensional representation is fused with the normalized exponential function to generate the time feature representation after two-dimensional time modeling.

[0112] It should be noted that the first part of the data processing is the time two-dimensional modeling part. Since each time point in the source data involves two types of time changes with the same phase between its adjacent regions and different cycles, namely, intra-cycle changes and inter-cycle changes. However, this original one-dimensional time series structure can only present changes between adjacent time points. Therefore, by extending the analysis of time changes to two-dimensional space for modeling, the multi-periodic characteristics of the source data can be adaptively captured, and the changes within the cycle and between cycles can be clearly presented. Therefore, it has more advantages in representation ability and is beneficial to subsequent representation learning.

[0113] The two-dimensional modeling process first analyzes the time series in the frequency domain. Considering the sparsity of the frequency domain and to avoid the noise caused by meaningless high frequencies, only In the frequency range, the first k amplitude values ​​are selected and the most significant frequencies {f1,...,f k}, the analysis process is as follows:

[0114] A = Avg(Amp(FFT(X)));

[0115] {f1,...,f k} = argTopk(A);

[0116]

[0117] Where FFT(·), Amp(·), Avg(·), and argTopk(·) represent the fast Fourier transform, amplitude, average, and k-maximum calculation formulas, respectively. A represents the amplitude of each frequency f, k is the period hyperparameter, and p is the period length.

[0118] The process of implementing two-dimensional modeling of sequences is as follows:

[0119]

[0120] Where, X 2D The original one-dimensional data X 1D The reshaped two-dimensional tensor represents the time series at different frequencies and cycle lengths. This reshaping operation distributes the feature information in the time series to different dimensions according to the frequency and cycle length, and padding (·) refers to expanding the time series with zeros in the time dimension to adapt to the dimensional deformation reshape (·) operation; then, the parameter-efficient deep convolution block is used to conveniently obtain the information-rich learnable feature representation of the two-dimensional tensor. The process is formalized as follows:

[0121]

[0122] In the formula, is a two-dimensional tensor processed by the convolution block. Conv(·) represents the deep convolution block processing. The learned two-dimensional feature representation is then returned to a one-dimensional format in an aggregated form, and the truncation function Trunc(·) is used to convert the sequence from the expanded length (p i ×f i ) becomes the original length Tx, the specific process is as follows:

[0123]

[0124] Among them, reshape(·) represents the transformation operation from two dimensions to one dimension. is the one-dimensional representation after aggregation. Finally, k different one-dimensional representations are fused through the normalized exponential function SoftMax(·) To reflect the relative weights of the selected frequencies and periods, corresponding to the weights of each transformed two-dimensional tensor, the process can be expressed as:

[0125]

[0126] Through two-dimensional temporal modeling, the changes within and between cycles can be clearly presented, allowing the model to simultaneously capture multi-scale two-dimensional temporal changes, which is a more effective representation than directly learning from one-dimensional time series.

[0127] The temporal feature representation is transferred to the time slicing stage, and the dimension of the input data is changed according to the input dimension restrictions of different stages of the wind power prediction model.

[0128] Among them, the time feature representation is transmitted to the time slicing stage, and the dimension of the input data is changed according to the input dimension restrictions of different stages of the wind power prediction model, including:

[0129] The time feature representation after the time two-dimensional modeling is obtained, and the time feature representation is subjected to window slicing processing in combination with a preset window size to form a new time slice.

[0130] The new time slice is fed to the linear projection layer, through which the original time features of the time slice are projected into a new dimension to adapt to the input dimension restrictions of different stages of the wind power prediction model.

[0131] After the original temporal feature projection is completed, the time slice and its contextual position information are forward instance normalized and the time slice result is generated.

[0132] It should be noted that the feature representation after time two-dimensional modeling is passed to the time slicing link. Time slicing can change the dimension of the input data to adapt to the input dimension restrictions of different stages of the model. Specifically, continuous adjacent points are aggregated through a window slicing operation with a pre-set window size, and these points are aggregated into a new time slice. Considering the semantic gap problem, these time slices are fed into a trainable linear projection layer to project the original features into a new dimension (feeding the time slices into a linear layer in a neural network), and then the time slices and their contextual position information are passed into the Transformer encoder network through normalization (forward instance normalization in reversible instance normalization).

[0133] The time series data is sliced ​​according to a preset window size, and continuous adjacent data points are aggregated into a new time slice. This operation helps to reduce the dimension of the data, extract features or patterns, and simplify the analysis process of the time series data. The slicing method used in the present invention is the moving window method.

[0134] The time slice results are transmitted to the time series encoder network (the time series encoder network is a Transformer encoder network), and each time slice result is linearly transformed through the time series encoder network.

[0135] The time slice results are transmitted to the time series encoder network, and each time slice result is linearly transformed by the time series encoder network, including:

[0136] The time slicing results are input into the time series encoder network, which includes a multi-head attention layer and a feedforward neural network.

[0137] The multi-head attention layer performs multi-head attention calculation and time reduction calculation on the input time slice results in sequence, so as to focus on the input time slice results.

[0138] It should be noted that as the output result of the previous time slice is used as input into the Transformer encoder network, this part of the network will calculate the sub-sampled version of all input points (i.e., Q, K, V). The entire network consists of two parts, namely the attention layer and the FFN (feedforward neural network), which are combined by residual connections to avoid the gradient disappearance problem. The attention layer can focus on the input information and weigh the importance of different information. The process can be expressed as:

[0139]

[0140] TR(c)=Norm(reshape(c,R)W T ), c∈{K,V};

[0141] In the formula, Attention(·) and TR(·) are the multi-head attention module and time reduction, respectively. heads is the dimension of each head in the multi-head attention mechanism, Norm is the normalization process, R is the time reduction factor, and W T The linear projection of the table. By reducing the sub-sampled versions Q, K, V of the input points to 1 / R of the input data dimension through time reduction, the computation and memory overhead can be greatly reduced.

[0142] After receiving the time slice results processed by the multi-head attention layer, the feedforward neural network performs a linear transformation on the processed time slice results and outputs the positional hidden representation of the time slice.

[0143] Among them, the feedforward neural network receives the time slice results processed by the multi-head attention layer and performs a linear transformation on the processed time slice results. The position hidden representation of the output time slice includes:

[0144] The time slice results processed by the multi-head attention layer are input into the feedforward neural network in the time series encoder network.

[0145] The processed time slice results are first linearly transformed through the linear layer in the feedforward neural network, and the input vector is mapped to a high-dimensional intermediate representation space.

[0146] After the nonlinear capability of the wind power prediction model is introduced in combination with the nonlinear activation function, a quadratic linear transformation is implemented; based on the quadratic linear change result, the input vector of the intermediate representation space is mapped back to the original hidden representation space, and the position hidden representation of the time slice is generated and output.

[0147] It should be noted that FFN (feedforward neural network) mainly plays the role of feature transformation. After the attention layer completes the focus on the input information, FFN performs a linear transformation on its output vector to complete the dimension increase or decrease of the vector, strengthen the representation of position information, and then apply the activation function to introduce nonlinear properties to it, further improving the local feature extraction capability of the model.

[0148] The FFN module is an important component in the Transformer encoder and decoder. It is used to perform nonlinear transformations on the hidden representation of each position. The FFN module usually consists of two linear layers and an activation function. Its structure includes:

[0149] Linear layer: The first part of the FFN module is a linear transformation that maps the input vector to a higher-dimensional intermediate representation space. This linear transformation usually includes a fully connected layer and a weight matrix.

[0150] Activation function: After the linear layer, a nonlinear activation function such as ReLU or GELU is usually applied to introduce nonlinear capabilities of the model.

[0151] The second linear layer: After the activation function, a linear transformation is applied to map the vector of the intermediate representation space back to the original hidden representation space. This linear transformation also includes a fully connected layer and a weight matrix. This structure enables the FFN module to learn complex nonlinear mappings, which helps improve the Transformer model's ability to model sequence data. In the Transformer encoder and decoder, the FFN module is applied to the hidden representation of each position, thereby improving the model's ability to represent sequence data.

[0152] The wind power prediction model is trained through the pre-divided training set and test set, and the trained wind power prediction model is verified through the pre-divided validation set to generate evaluation indicators.

[0153] It should be noted that the collected source data is pre-divided into a training set, a test set, and a validation set in a ratio of 8:1:1.

[0154] The data to be predicted in the source area is obtained as the input of the trained wind power prediction model, and the wind power prediction result of the source area is output through the trained wind power prediction model.

[0155] It should be noted that after the T2M-HMFormer model is built, the training set and test set divided in the data set are sent to the model training, the number of iterations is set to 500 cycles, and the validation set is sent to the trained model for verification to obtain the evaluation index, and the data to be predicted is sent to realize the short-term wind power prediction of the source area.

[0156] Evaluation indicators play a key role in model validation. They can measure the performance and accuracy of the model. According to the prediction results and the true labels of the test set, the values ​​of the selected evaluation indicators, such as MSE, RMSE, MAE, etc., are calculated. The results of the evaluation indicators are analyzed to understand the performance of the model on the test set. If the evaluation indicators perform well, it means that the model has a high prediction accuracy; otherwise, further adjustments to the model or feature engineering are required.

[0157] The output wind power prediction results are subjected to reverse instance normalization processing to eliminate the distribution differences in the wind power prediction results.

[0158] It should be noted that the process of reverse instance normalization can be expressed by a mathematical formula:

[0159]

[0160] In the formula, Υ k , β k is a learnable affine parameter vector, X is the input data, y is the output data, i is an index in the input, k is the number of variables in the source data, j is an index in the input sequence length, t is the prediction period, For each instance in the source data The mean of For each instance in the source data The variance of , ε is the smoothing parameter.

[0161] Inverse instance normalization can explicitly return the non-stationary features removed from the input data to the output of the model, effectively alleviating the distribution differences in time series data.

[0162] S3. Migrate the trained wind power prediction model from the source data domain to the target data domain to generate an optimized wind power prediction model suitable for the new wind farm area.

[0163] Among them, migrating the trained wind power prediction model from the source data domain to the target data domain to generate an optimized wind power prediction model suitable for the new wind farm area includes:

[0164] Obtain real-time wind power data in the new wind farm area and use the real-time wind power data as the target data for the transfer learning algorithm.

[0165] The historical transfer learning experience is defined as triple information, and the triple information is used as input to agent learn the maximized reflection function in the L2T framework.

[0166] The migration content and migration mode in the wind power prediction model are optimized by combining the maximization reflection function to generate an optimized wind power prediction model suitable for the new wind farm area.

[0167] S4. Retrain the optimized wind power prediction model, and use the trained optimized wind power prediction model to realize wind power prediction in the new wind farm area.

[0168] It should be noted that the historical wind power data of other regions is obtained, and the L2T transfer learning framework is used on the target data to quickly build a prediction model suitable for the target region. The process is as follows: Figure 3 shown.

[0169] If the previous transfer learning experience is defined as triple information E e =( e ,T e >,α e ,I e ), where S e ,T e ,α e ,I e They represent the source data information, target data information, migration algorithm and performance improvement respectively. Taking them as input, the agent learns a reflection function f in the L2T framework to make it approximate I e When a new migration task arrives, the knowledge to be migrated is optimized by maximizing the reflection function f, that is, W * , e represents the number of migrations, and its specific implementation is as follows:

[0170]

[0171] It should be noted that the reflection function f is decomposed into three parts, namely the distance D(S,T) between the source data and the target data, the discriminability G(T) of the target data and the bias b. is the maximum mean difference between the source data and the target data, β and λ are learnable kernel function coefficients and distance variance weights, Represents the model parameter matrix, which is calculated by calculating the maximum mean difference distance between the source data and the target data And the distance variance​ To measure the difference between the source data and the target data, μ and b are learnable parameters. By minimizing the maximum mean difference distance and distance variance, the discrimination criterion β in the target data is maximized. T T e , which helps improve the performance of model migration.

[0172] The meteorological data of the current time node of the target area and the SCADA data of the wind farm units are transferred into the model for wind power forecasting, and the migration content and migration method are optimized by maximizing the reflection function in the L2T transfer learning framework to obtain the wind power forecast result of the target area. Since the prediction model structure of the starting target area is consistent with the prediction model structure of the source area, the parameter w of the prediction model of the source area is optimized to w* through the L2T framework, and w* is used as the parameter of the prediction model of the target area, that is, the construction of the prediction model of the target area is completed.

[0173] In summary, with the help of the above technical scheme of the present invention, the present invention optimizes and restores the data by using reversible instance normalization, and sets forward and reverse instance normalization at the start and end positions of the wind power prediction model respectively, thereby effectively alleviating the distribution difference in the time series data, and as a universal trainable normalization layer, it is suitable for any deep neural network; the feature extraction stage of the wind power prediction model in the present invention is composed of three completely identical stage modules, and the overall design concept of Transformer is adopted. The complex time changes are decomposed into multiple intra-cycle and inter-cycle changes through the time two-dimensional modeling module, which improves the representation ability of the features and facilitates subsequent representation learning; the input data is screened through the time slicing module to achieve data dimension reduction, which increases the processable sequence length and reduces the calculation and memory overhead; the parallel working nature of the feature extraction effect of the encoder module can effectively improve the calculation efficiency, and when analyzing long sequences, better capture long-distance dependencies; the present invention introduces L The 2T transfer learning framework migrates future data and models to the new target area, and trains them in combination with the target data of the target area to quickly build a wind power prediction model suitable for the new target area, so that migration experience can be accumulated through multiple transfer learning, and appropriate migration content can be selected for different target data, thereby improving the generalization ability of the model and the prediction ability after migration, which is of great significance for wind power prediction tasks in multiple regions; the present invention normalizes the source data, not only optimizes the data distribution, but also suppresses the mutation data and realizes data stabilization, which helps the wind power prediction model to better compare and weigh the importance of features, improves the model performance and prediction accuracy, and at the same time, in response to the power prediction needs of the new wind farm, when the target data of the new wind farm is small, the knowledge learned in the source data is migrated to the target data through transfer learning technology, so that the model can better adapt to the target data and obtain better performance on limited target data, which helps to accelerate the model training time, improve the generalization ability of the model, and improve the robustness of the model.

[0174] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A wind power prediction method, characterized in that: The wind power prediction method includes: Obtain historical wind power data of the source area as source data, and preprocess the source data; Construct and train a wind power prediction model based on the preprocessed source data, and use the trained wind power prediction model to achieve wind power prediction in the source area; Migrate the trained wind power prediction model from the source data domain to the target data domain to generate an optimized wind power prediction model suitable for the new wind farm area; The optimized wind power prediction model is retrained, and the trained optimized wind power prediction model is used to realize wind power prediction in the new wind farm area.

2. A wind power prediction method according to claim 1, characterized in that: The method of constructing and training a wind power prediction model based on the preprocessed source data and realizing wind power prediction in the source area by using the trained wind power prediction model includes: Performing forward instance normalization processing on the preprocessed source data; building a wind power prediction model based on the data after forward instance normalization processing, and performing multi-stage hierarchical learning tasks in the wind power prediction model; The wind power prediction model is trained by using a pre-divided training set and a test set, and the trained wind power prediction model is verified by using a pre-divided validation set to generate evaluation indicators; Obtaining the data to be predicted in the source area as the input of the trained wind power prediction model, and outputting the wind power prediction result of the source area through the trained wind power prediction model; The output wind power prediction results are subjected to reverse instance normalization processing to eliminate the distribution differences in the wind power prediction results.

3. A wind power prediction method according to claim 2, characterized in that: The wind power prediction model is constructed based on the data after normalization processing of the forward instance, and the multi-stage hierarchical learning task is performed in the wind power prediction model, including: The normalized data of the forward instance is input into the wind power prediction model for time two-dimensional modeling to generate time feature representation; The temporal feature representation is transferred to the time slicing stage, and the dimension of the input data is changed according to the input dimension restrictions of different stages of the wind power prediction model; The time slice results are transferred to the time series encoder network, and each time slice result is linearly transformed through the time series encoder network.

4. A wind power prediction method according to claim 3, characterized in that: The normalized data of the forward instance is input into the wind power prediction model to perform time two-dimensional modeling and generate time feature representation, which includes: Analyze the time series of the normalized data of the forward instance in the frequency domain and identify the characteristic information in the time series; Distribute the feature information in the time series to different time dimensions according to the frequency and cycle length; Zero-expand the time series in the time dimension and combine it with the deep convolutional block to generate a zero-expanded two-dimensional feature representation, and regress the two-dimensional feature representation into a one-dimensional format in an aggregated form; The truncation function is used to change the time series from the expanded length to the original length, and the one-dimensional representation is fused with the normalized exponential function to generate the time feature representation after two-dimensional time modeling.

5. A wind power prediction method according to claim 4, characterized in that: The method of transmitting the time feature representation to the time slicing stage and changing the dimension of the input data according to the input dimension restrictions of different stages of the wind power prediction model includes: Obtaining the time feature representation after the time two-dimensional modeling, and performing window slicing processing on the time feature representation in combination with a preset window size to form a new time slice; The new time slice is fed to the linear projection layer, and the original time features of the time slice are projected into a new dimension through the linear projection layer to adapt to the input dimension restrictions of different stages of the wind power prediction model; After the original temporal feature projection is completed, the time slice and its contextual position information are forward instance normalized and the time slice result is generated.

6. A wind power prediction method according to claim 5, characterized in that: The transmitting the time slice result to the time series encoder network and performing a linear transformation on each time slice result through the time series encoder network includes: Input the time slice result into a time series encoder network, wherein the time series encoder network includes a multi-head attention layer and a feedforward neural network; Through the multi-head attention layer, multi-head attention calculation and time reduction calculation are performed on the input time slice results in sequence, so as to achieve the focus on the input time slice results; After receiving the time slice results processed by the multi-head attention layer, the feedforward neural network performs a linear transformation on the processed time slice results and outputs the positional hidden representation of the time slice.

7. A wind power prediction method according to claim 6, characterized in that: The feedforward neural network receives the time slice result processed by the multi-head attention layer and performs a linear transformation on the processed time slice result, and the position hidden representation of the output time slice includes: The time slice results processed by the multi-head attention layer are input into the feedforward neural network in the time series encoder network; The processed time slice results are first linearly transformed through the linear layer in the feedforward neural network, and the input vector is mapped to a high-dimensional intermediate representation space; After the nonlinear capability of the wind power prediction model is introduced in combination with the nonlinear activation function, a quadratic linear transformation is implemented; based on the quadratic linear change result, the input vector of the intermediate representation space is mapped back to the original hidden representation space, and the position hidden representation of the time slice is generated and output.

8. A wind power prediction method according to claim 7, characterized in that: The step of migrating the trained wind power prediction model from the source data domain to the target data domain to generate an optimized wind power prediction model suitable for the new wind farm area includes: Obtain real-time wind power data for the new wind farm area and use the real-time wind power data as the target data for the transfer learning algorithm; Define historical transfer learning experience as triple information, and use triple information as input to learn the agent to maximize the reflection function in the L2T framework; The migration content and migration mode in the wind power prediction model are optimized by combining the maximization reflection function to generate an optimized wind power prediction model suitable for the new wind farm area.

9. A wind power prediction method according to claim 8, characterized in that: The calculation formula for the multi-head attention calculation is: Where Attention(·) represents the multi-head attention module; Q, K, and V all represent subsampled versions of the input points; dheads represents the dimension of each head in the multi-head attention mechanism.

10. A wind power prediction method according to claim 9, characterized in that: The calculation formula for the time-decreasing calculation is: TR(c)=Norm(reshape(c,R)W T ),c∈{K,V}; In the formula, TR(·) represents time decreasing; Norm represents the normalization result; R represents the time reduction factor; W T Represents a linear projection.

Citation Information

Cited By

  • Training method and device for wind power prediction model oriented to extremely small number of samples

    CN121257634A

  • Training method and device of wind power prediction model for small sample

    CN121257634B

  • Wind power plant power prediction method and system without historical power data

    CN122286206A

  • A wind farm power prediction method and system without historical power data

    CN122286206B