A hybrid short-term wind power prediction method considering large amount of data loss
By combining a data repair model using GAN and BiLSTM with a variational mode decomposition algorithm, and a CNN-BiGRU hybrid prediction model with an attention mechanism, the problem of inaccurate prediction caused by wind power data loss is solved, and high-precision wind power prediction in the power system is achieved.
Patent Information
- Application Number
- CN202310657081.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-05
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2043-06-05
AI Technical Summary
In the event of wind power data loss, existing technologies struggle to establish accurate prediction models, resulting in insufficient stability and prediction accuracy for wind power grid connection. Single deep learning models are prone to gradient explosion and low generalization ability when processing large amounts of data.
A data restoration model based on GAN and BiLSTM is used to enhance wind power data, variational mode decomposition algorithm is used to reduce data volatility, and an improved CNN-BiGRU hybrid prediction model based on attention mechanism is established for wind power prediction.
It improves the accuracy and stability of data prediction, ensuring that the prediction model meets the requirements of the power system even when the data quality is poor, and enhances prediction accuracy through data repair and decomposition techniques.
Smart Images

Figure CN116702831B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence algorithm application technology in power systems, specifically a hybrid short-term wind power prediction method that takes into account a large amount of data loss. Background Technology
[0002] To reduce carbon emissions, the development of renewable energy has garnered global attention due to its green and pollution-free characteristics. However, large-scale, random, and fluctuating wind power grid connection can impact the stability of the power system. Furthermore, during the operation of monitoring systems, instability in communication networks or malfunctions in data acquisition equipment can lead to a significant proportion of data loss. This substantial data loss reduces the predictive accuracy of data-driven models, further hindering wind power grid connection. Therefore, providing effective data repair and prediction models for wind farms with missing data is crucial.
[0003] In data repair, scholars both domestically and internationally typically employ interpolation imputation methods (mean imputation and median imputation) and AI-based imputation methods (KNN) to repair missing data. These AI methods impute missing data based on the static probability distribution of the complete data, which improves the accuracy of subsequent prediction models to some extent. However, when faced with complex time series, the data generated by these data-improved models may fail to reflect the hidden relationships between variables, limiting further improvements in the accuracy of subsequent prediction models. Even after resolving the missing data issue, directly using the generated data to train the prediction model will introduce some errors. Therefore, VMD (Virtual Dynamics Dependency) is needed to process wind power series data and reduce the impact of its randomness and volatility. Developing accurate prediction models using datasets containing generated data has also become an urgent need.
[0004] In terms of algorithmic forecasting, deep learning techniques, especially variants of recurrent neural networks (RNNs), have made significant progress in both power generation and load forecasting due to their powerful time-series feature extraction capabilities, compared to forecasting models based on physical and statistical methods. However, when dealing with large datasets, RNNs are prone to gradient explosion, ultimately leading to training failures. Furthermore, single deep learning forecasting models, due to their low generalization ability, are no longer sufficient to meet the requirements of modern power systems. Summary of the Invention
[0005] The purpose of this invention is to provide a hybrid short-term wind power forecasting method that takes into account significant data loss, comprising the following steps:
[0006] 1) Establish a data repair model based on GAN and BiLSTM;
[0007] 2) Obtain wind power data sequences and input them into a data restoration model based on GAN and BiLSTM to perform data augmentation on the wind power data sequences, thereby obtaining wind power data augmentation sequences;
[0008] 3) The wind power data augmentation sequence is decomposed using the variational mode decomposition algorithm to obtain a low-fluctuation wind power subsequence;
[0009] 4) Establish an improved CNN-BiGRU hybrid prediction model based on the attention mechanism;
[0010] 5) Input the low-fluctuation wind power subsequence into the improved CNN-BiGRU hybrid prediction model based on the attention mechanism to obtain the wind power prediction result for the next time step.
[0011] Furthermore, the data repair model based on GAN and BiLSTM includes a generator and a discriminator;
[0012] The generator is used to generate wind power samples;
[0013] The discriminator is used to calculate the probability that the wind power sample conforms to the true distribution of wind power.
[0014] Furthermore, at time point t, the generator generates the sample y. t As shown below:
[0015] y t =g(W4h t +W6h t ′) (1)
[0016] h t =f(W1x t +W2h t-1 (2)
[0017] h t ′=f(W3x t +W5h t+1 (3)
[0018] In the formula, W1, W2, W3, W4, W5, and W6 are weights; x t It is the input at time t; h t-1 The output hidden at time t-1; h t+1 The output hidden at time t+1; h t h t ′ represents the outputs of the forward and backward propagation layers of the BiLSTM; f() is the propagation function; g() is the sample generation function.
[0019] Furthermore, the parameters of the generator and discriminator are updated using the cross-entropy loss function;
[0020] The cross-entropy loss function is shown below:
[0021]
[0022] In the formula, L temporal GAN Represents cross-entropy loss; G(y) is the expected distribution; t ) represents the data generated by the generator; D(x) is the output of the discriminator; p data p z The true distribution and Gaussian distribution of the wind power data sequence.
[0023] Furthermore, the input to the generator includes noise sampled from a Gaussian distribution.
[0024] Furthermore, the steps for decomposing the wind power data augmentation sequence using the variational mode decomposition algorithm include:
[0025] 3.1) Construct the variational mode decomposition objective function and constraints, namely:
[0026]
[0027] In the formula, u k For the set of intrinsic modulus components; ω k It is the set of center frequencies; δ(t) represents the pulse signal; K represents the mode number; f(t) is the wind power data enhancement sequence; * represents the convolution operator; The partial derivative is represented by t; time is represented by j; the imaginary number is represented by j.
[0028] 3.2) Introduce the Lagrange multiplication operator and establish the augmented Lagrange L({u k},{ω k The expression for},λ), that is:
[0029]
[0030] In the formula, α is the penalty factor; λ is the Lagrange multiplier;
[0031] 3.3) Combining the alternating direction multiplier method and Fourier transform, the formulas (5)-(6) are iteratively solved to obtain the modal components and center frequencies;
[0032] The iterative update formulas for modal components and center frequencies are as follows:
[0033]
[0034]
[0035] In the formula, They represent Fourier transform; ω k It is the set of center frequencies at the (n+1)th iteration; It is the intrinsic modulus component at the (n+1)th iteration; It represents the eigenmode components at time t; the superscript ∧ indicates iteration. ω is the frequency.
[0036] Furthermore, the modality number K and the penalty factor α are obtained through optimization using a genetic algorithm;
[0037] The steps for optimizing the number of modes K and the penalty factor α using a genetic algorithm include encoding, population initialization, fitness evaluation, selection, and crossover.
[0038] Among them, fitness evaluation uses envelope entropy to determine the distance between an individual and the optimal value;
[0039] Envelope entropy E P As shown below:
[0040]
[0041] In the formula, N is the number of sampling points; P j It is the normalized form of a(j); a(j) is the envelope signal.
[0042] Furthermore, the improved CNN-BiGRU hybrid prediction model based on the attention mechanism includes an input layer, a CNN layer, a BiGRU layer, an attention mechanism layer, and an output layer.
[0043] Furthermore, the input layer of the improved CNN-BiGRU hybrid prediction model based on the attention mechanism constructs an input matrix X based on the low-fluctuation wind power subsequence and inputs it into the CNN layer;
[0044] The CNN layer includes convolutional layers, pooling layers, and fully connected layers;
[0045] The feature vector H output by the CNN layer C As shown below:
[0046]
[0047] P = max(C) + b² (11)
[0048] H C =σ(P×W8+b3) (12)
[0049] In the formula, C is the output of the convolutional layer; P is the output of the pooling layer; W7 and W8 are weight matrices; b1, b2, and b3 are biases; σ is the sigmoid function; and Max() is the maximum value function. It is the convolution operator; X is the input to the convolutional layer;
[0050] The BiGRU layer learns the feature vector output by the CNN layer, extracts the dynamic features of the time series, and obtains the output y. t ,Right now:
[0051]
[0052] In the formula, These represent the outputs of the forward propagation layer and the backward propagation layer, respectively.
[0053] The output of the attention mechanism layer is shown below:
[0054] e t =vtanh(wh) t +b) (14)
[0055]
[0056]
[0057] In the formula, e t Let h be the output vector of the BiGRU layer at time t. t The calculated attention probability distribution values; v and w are weights; b is the bias; s t It is the output of the attention layer at time t; α t The weight values assigned to the attention mechanism;
[0058] Output Y of the output layer t As shown below:
[0059] Y t =σ(w o s t +b o (17)
[0060] In the formula, Y t The predicted value at time t; w o and b o These are the weights and the biases, respectively.
[0061] Furthermore, the wind power data includes wind speed, wind direction, temperature, and wind power output.
[0062] The technical effects of this invention are undeniable, and its beneficial effects are as follows:
[0063] 1) This invention proposes a data repair iteration based on bidirectional long short-term memory network and generative adversarial network. Even with poor data quality, this invention can ensure that the prediction accuracy meets the requirements of power system operation.
[0064] This invention captures the temporal dynamics of existing data by embedding a bidirectional long short-term memory network into the original generative adversarial network structure. Adversarial game-like training generates samples that more closely approximate the real data distribution to impute missing values, thus providing high-quality data for subsequent prediction models. After dataset repair, variational mode decomposition optimized by a genetic algorithm can more efficiently decompose wind power sequences, thereby avoiding the randomness of empirical settings.
[0065] 2) In the prediction stage, this invention proposes a CNN-BiGRU hybrid prediction model based on an attention mechanism. CNN is used to extract features from historical information, while BiGRU utilizes an attention mechanism to enhance the representation of important information when learning temporal dynamic characteristics to achieve the final prediction. The prediction results of this hybrid model are more accurate than those of traditional prediction models and have a wider range of applications. Attached Figure Description
[0066] Figure 1 A framework for wind farm power prediction that takes into account significant data loss;
[0067] Figure 2 This is a framework diagram of a temporal GAN;
[0068] Figure 3 Structure diagram of the CNN-BiGRU model based on attention mechanism;
[0069] Figure 4 For a dataset (wind speed, wind direction, temperature, wind power) with 40% data loss;
[0070] Figure 5 A heatmap for correlation analysis of wind farm information;
[0071] Figure 6 Repairing the CDF curves of the dataset using different imputation methods;
[0072] Figure 7 Wind power curves under different prediction models;
[0073] Figure 8 Visualize the prediction results of different models. Detailed Implementation
[0074] The present invention will be further described below with reference to embodiments, but it should not be construed that the scope of the present invention is limited to the following embodiments. Various substitutions and modifications made based on ordinary technical knowledge and common practices in the art without departing from the above-described technical concept of the present invention should be included within the scope of protection of the present invention.
[0075] Example 1:
[0076] See Figures 1 to 8A hybrid short-term wind power forecasting method that considers significant data loss includes the following steps:
[0077] 1) Establish a data repair model based on GAN and BiLSTM;
[0078] 2) Obtain wind power data sequences and input them into a data restoration model based on GAN and BiLSTM to perform data augmentation on the wind power data sequences, thereby obtaining wind power data augmentation sequences;
[0079] 3) The wind power data augmentation sequence is decomposed using the variational mode decomposition algorithm to obtain a low-fluctuation wind power subsequence;
[0080] 4) Establish an improved CNN-BiGRU hybrid prediction model based on the attention mechanism;
[0081] 5) Input the low-fluctuation wind power subsequence into the improved CNN-BiGRU hybrid prediction model based on the attention mechanism to obtain the wind power prediction result for the next time step.
[0082] Example 2:
[0083] A hybrid short-term wind power prediction method considering a large amount of data loss, with the same technical content as in Embodiment 1, further wherein the data repair model based on GAN and BiLSTM includes a generator and a discriminator;
[0084] Example 3:
[0085] A hybrid short-term wind power prediction method considering a large amount of data loss, with the same technical content as any one of Embodiments 1-2, further wherein the generator is used to generate wind power samples.
[0086] Example 4:
[0087] A hybrid short-term wind power prediction method considering a large amount of data loss, with the same technical content as any one of Embodiments 1-3, further wherein the discriminator is used to calculate the probability that the wind power sample conforms to the true distribution of wind power.
[0088] Example 5:
[0089] A hybrid short-term wind power forecasting method considering significant data loss, with technical content identical to any one of embodiments 1-4, further wherein the generator generates a sample y at time point t. t As shown below:
[0090] y t =g(W4h t +W6h t ′) (1)
[0091] ht =f(W1x t +W2h t-1 (2)
[0092] h t ′=f(W3x t +W5h t+1 (3)
[0093] In the formula, W1, W2, W3, W4, W5, and W6 are weights; x t It is the input at time t; h t-1 The output hidden at time t-1; h t+1 The output hidden at time t+1; h t h t ′ represents the outputs of the forward and backward propagation layers of the BiLSTM; f() is the propagation function; g() is the sample generation function.
[0094] Example 6:
[0095] A hybrid short-term wind power prediction method considering a large amount of data loss, with the same technical content as any one of embodiments 1-5, further wherein the parameters of the generator and discriminator are updated through the cross-entropy loss function;
[0096] Example 7:
[0097] A hybrid short-term wind power forecasting method considering significant data loss, with technical content identical to any one of Examples 1-6, further wherein the cross-entropy loss function is as follows:
[0098]
[0099] In the formula, L temporal GAN Represents cross-entropy loss; G(y) is the expected distribution; t ) represents the data generated by the generator; D(x) is the output of the discriminator; p data p z The true distribution and Gaussian distribution of the wind power data sequence.
[0100] Example 8:
[0101] A hybrid short-term wind power prediction method considering a large amount of data loss, with the same technical content as any one of Embodiments 1-7, further wherein the input of the generator includes noise sampled from a Gaussian distribution.
[0102] Example 9:
[0103] A hybrid short-term wind power forecasting method considering significant data loss, with technical content identical to any one of embodiments 1-8, further comprising the step of decomposing the wind power data augmentation sequence using a variational mode decomposition algorithm, including:
[0104] 3.1) Construct the variational mode decomposition objective function and constraints, namely:
[0105]
[0106] In the formula, u k For the set of intrinsic modulus components; ω k It is the set of center frequencies; δ(t) represents the pulse signal; K represents the mode number; f(t) is the wind power data enhancement sequence; * represents the convolution operator; The partial derivative is represented by t; time is represented by j; the imaginary number is represented by j.
[0107] 3.2) Introduce the Lagrange multiplication operator and establish the augmented Lagrange L({u k},{ω k The expression for},λ), that is:
[0108]
[0109] In the formula, α is the penalty factor; λ is the Lagrange multiplier;
[0110] 3.3) Combining the alternating direction multiplier method and Fourier transform, the formulas (5)-(6) are iteratively solved to obtain the modal components and center frequencies;
[0111] The iterative update formulas for modal components and center frequencies are as follows:
[0112]
[0113]
[0114] In the formula, They represent Fourier transform; ω k It is the set of center frequencies at the (n+1)th iteration; It is the intrinsic modulus component at the (n+1)th iteration; ω represents the intrinsic mode components at time t; the superscript ∧ indicates iteration, and parameters containing the superscript ∧ are calculated iteratively during the process of solving for the modal components and center frequency. ω is the frequency.
[0115] Example 10:
[0116] A hybrid short-term wind power prediction method considering a large amount of data loss, with the same technical content as any one of embodiments 1-9, further wherein the mode number K and the penalty factor α are obtained by optimization through a genetic algorithm;
[0117] Example 11:
[0118] A hybrid short-term wind power prediction method considering a large amount of data loss, with the same technical content as any one of Examples 1-10, further comprising the steps of optimizing the number of modes K and the penalty factor α using a genetic algorithm, including encoding, initializing the population, fitness evaluation, selection, and crossover;
[0119] Example 12:
[0120] A hybrid short-term wind power prediction method considering a large amount of data loss, with the same technical content as any one of Examples 1-11, further wherein the fitness evaluation uses envelope entropy to determine the distance between an individual and the optimal value;
[0121] Example 13:
[0122] A hybrid short-term wind power forecasting method considering significant data loss, with technical content identical to any one of Examples 1-12, further comprising: envelope entropy E P As shown below:
[0123]
[0124] In the formula, N is the number of sampling points; P j It is the normalized form of a(j); a(j) is the envelope signal.
[0125] Example 14:
[0126] A hybrid short-term wind power prediction method considering a large amount of data loss, with the same technical content as any one of embodiments 1-13. Further, the improved CNN-BiGRU hybrid prediction model based on the attention mechanism includes an input layer, a CNN layer, a BiGRU layer, an attention mechanism layer, and an output layer.
[0127] Example 15:
[0128] A hybrid short-term wind power prediction method considering a large amount of data loss, with the same technical content as any one of embodiments 1-14. Further, the input layer of the improved CNN-BiGRU hybrid prediction model based on the attention mechanism constructs an input matrix X according to the low-volatility wind power subsequence and inputs it into the CNN layer.
[0129] Example 16:
[0130] A hybrid short-term wind power prediction method considering a large amount of data loss, with the same technical content as any one of embodiments 1-5, further wherein the CNN layer includes a convolutional layer, a pooling layer and a fully connected layer;
[0131] Example 17:
[0132] A hybrid short-term wind power prediction method considering significant data loss, with technical content identical to any one of embodiments 1-16, further wherein the feature vector H output by the CNN layer... C As shown below:
[0133]
[0134] P = max(C) + b² (11)
[0135] H C =f(P×W8+b3)=σ(P×W8+b3) (12)
[0136] In the formula, C is the output of the convolutional layer; P is the output of the pooling layer; W7 and W8 are weight matrices; b1, b2, and b3 are biases; σ is the sigmoid function; and Max() is the maximum value function. It is the convolution operator; X is the input to the convolutional layer;
[0137] Example 18:
[0138] A hybrid short-term wind power forecasting method considering significant data loss, with technical content identical to any one of embodiments 1-17, further comprising: the BiGRU layer learning the feature vector output by the CNN layer, extracting dynamic features of the time series, and obtaining the output y. t ,Right now:
[0139]
[0140] In the formula, These represent the outputs of the forward propagation layer and the backward propagation layer, respectively.
[0141] Example 19:
[0142] A hybrid short-term wind power forecasting method considering significant data loss, with technical content identical to any one of embodiments 1-8, further wherein the output of the attention mechanism layer is as follows:
[0143] e t =vtanh(wh) t +b) (14)
[0144]
[0145]
[0146] In the formula, e t Let h be the output vector of the BiGRU layer at time t. t The calculated attention probability distribution values; v and w are weights; b is the bias; s t It is the output of the attention layer at time t; α t The weight values assigned to the attention mechanism;
[0147] Example 20:
[0148] A hybrid short-term wind power forecasting method considering significant data loss, with technical content identical to any one of embodiments 1-19, further wherein the output Y of the output layer... t As shown below:
[0149] Y t =σ(w o s t +b o (17)
[0150] In the formula, Y t The predicted value at time t; w o and b o These are the weights and the biases, respectively.
[0151] The wind power data includes wind speed, wind direction, temperature, and wind power output.
[0152] Example 21:
[0153] See Figures 1 to 3 A hybrid short-term wind power forecasting method that considers significant data loss includes the following:
[0154] This method effectively augments the data, overcoming the problem of low prediction accuracy even when data is missing.
[0155] In the data preprocessing stage, this embodiment proposes a data repair method based on Bidirectional Long Short-Term Memory (BiLSTM) and Generative Adversarial Network (GAN). By optimizing Variational Mode Decomposition (VMD) using a Genetic Algorithm (GA), the high-volatility wind power sequence is decomposed into a set of regular subsequences, eliminating the randomness of setting parameters based on experience.
[0156] In the prediction phase, this embodiment proposes a hybrid prediction model based on an attention mechanism, namely a convolutional neural network-bidirectional gated recurrent unit (CNN-BiGRU). This hybrid prediction model improves prediction accuracy by simplifying high-dimensional features and focusing on features that have a greater impact on wind power.
[0157] The specific steps are summarized as follows:
[0158] 1) Repair the data after importing the target dataset.
[0159] In a data inpainting model based on GAN and BiLSTM, a partial dataset is loaded. Then, adversarial training between the generator (G) and discriminator (D) of the GAN is used to generate new samples with temporal diversity. Specifically, the generator generates the data, and the discriminator judges whether it is real or fake based on real data from a time period before and after the missing part.
[0160] 2) Decompose the dataset containing the generated data
[0161] Before decomposing wind power, a genetic algorithm is used to optimize the parameters (K, α) in the VMD (Mode Dynamics Decomposition). The optimal combination of (K, α) can reduce reconstruction error and prevent mode aliasing. Then, the optimized VMD is used to decompose the original wind power sequence.
[0162] 3) Construct a hybrid prediction model for wind power forecasting
[0163] By combining data restoration strategies and decomposition techniques, CNNs are used to extract weather information and wind power features from the restored dataset. Then, a BiGRU based on an attention mechanism is used to predict future wind power.
[0164] Example 22:
[0165] See Figures 1 to 3 A hybrid short-term wind power forecasting method that considers significant data loss includes the following:
[0166] In the data preprocessing stage, firstly, a data augmentation method based on bidirectional long short-term memory networks and generative adversarial networks is proposed. This method can capture the temporal features in the complete data to generate high-quality data. Secondly, a genetic algorithm is used to optimize the parameters in the variational mode decomposition algorithm, eliminating the randomness of empirically set parameters and decomposing high-volatility wind power sequences into low-volatility subsequences. In the prediction stage, an improved CNN-BiGRU hybrid prediction model based on an attention mechanism is proposed. Firstly, high-dimensional features are simplified using CNN. Secondly, an attention mechanism is used to focus on strengthening the representation of features that have a greater impact on wind power to improve the prediction accuracy of BiGRU.
[0167] Specifically, the following steps are included:
[0168] 1) Data repair model based on temporal GAN
[0169] GANs, composed of a generator and a discriminator, excel in image synthesis and inpainting. The image generation and inpainting processes are analogous to matrix generation and repair, and the information in a wind farm, as time-series data, can be viewed as a matrix. Therefore, GANs have the ability to repair missing data in wind farms. Specifically, the data samples generated by the generator should approximate the distribution of historical training data as closely as possible, while the discriminator distinguishes the generated data samples from the actual data samples. Through iterative training of the generator and discriminator, a Nash equilibrium is eventually achieved where the discriminator cannot distinguish between the generated samples and the historical samples, indicating that the distributions of the generated and historical data samples are extremely similar.
[0170] 1-1) Generator
[0171] The generator is trained to learn the distribution p of complete data from the wind farm. r (x). The input for generating the data is noise z~p sampled from a Gaussian distribution. g (z). To make the new samples generated by the generator infinitely close to p. r (x), the present invention uses the loss function L of the generator during the training process. G1 and L G2 They are respectively set as equation (1) and equation (2). L G The smaller the value, the closer the data generated by the generator is to the real sample.
[0172]
[0173]
[0174] 1-2) Discriminator
[0175] The discriminator takes real data samples and generated data samples as input. Its output is a scalar p. real This indicates that the input sample conforms to the true distribution p. r The probability of (x). The loss function during the discriminator training process is shown in equation (3). L D The smaller the value, the stronger the discriminator's ability to distinguish the authenticity of data. To establish a game between the generator and the discriminator so that they can be trained simultaneously, this invention uses the function V(G,D) to establish a max-min game between the generator and the discriminator, as shown in equation (4). During the training process, the parameters in the generator and the discriminator are continuously adjusted to reach the final Nash equilibrium.
[0176]
[0177]
[0178] Where E is the expected distribution; G(z) is the data generated by the generator; and D(.) is the output of the discriminator.
[0179] 1-3) Generative Resistance Networks Based on BiLSTM
[0180] Considering the strong time-series characteristics of wind farm data, typical deletion and interpolation methods can lead to low-quality data restoration. Furthermore, the original generative adversarial network (GAN) generates data based on the static distribution characteristics of the entire dataset, indicating its limited time-series generation capability. To address these issues, this invention employs BiLSTM as the generator and discriminator of the GAN. The state units of the forward and backward propagation layers of the BiLSTM are simultaneously connected to the output layer to capture the bidirectional propagation characteristics in the wind power sequence before outputting, as shown in equations (5)-(7). The forward propagation layer can consider the influence of historical data on the output at that moment and calculate the output h at that moment. t And store the results. Conversely, the backpropagation layer considers the impact of future moments on the current moment, and its output h... t The result is obtained through reverse computation. In summary, the output of the forward layer and the output of the reverse layer jointly determine the output of the BiLSTM. At time point t, the generated sample y... t From forward propagation state h 1:t = (h1, ..., h) t-1 ) and backpropagation state h t+1 Decision, such as Figure 2 As shown.
[0181] h t =f(W1x t +W2h t-1 (5)
[0182] h t ′=f(W3x t +W5h t+1 (6)
[0183] O t =g(W4h t +W6h t ′) (7)
[0184] Where W1-W6 are the weights; x t It is the input at time t; h t-1 The output hidden at time t-1; h t+1 The output hidden at time t+1; O t This is the output of the BiGRU.
[0185] To further enhance the generative adversarial network's ability to generate time series data, this patent improves the training process of the original generative adversarial network and proposes a loss function as shown in Equation (8). Specifically, the output of the sigmoid activation function is used to evaluate the authenticity of the generated data, and the parameters of the generator and discriminator are updated through the cross-entropy loss function. Ultimately, the improved generative adversarial network overcomes the inflexibility of traditional generative adversarial networks and recurrent neural networks for longer time series, collects past and future state information, and effectively fills in the missing values in the original wind power sequence.
[0186]
[0187] 2) Variational Mode Decomposition Model Based on Parameter Optimization
[0188] 2-1) Variational Mode Decomposition Algorithm
[0189] Variational mode decomposition (VMD) algorithms can decompose the original high-fluctuation signal into simple and generally regular sub-mode components. The specific calculation process can be divided into the following three steps:
[0190] a) Construct a variational problem, the goal of which is to minimize the sum of the estimated bandwidths of the intrinsic mode components; the constraint is that the sum of the original signal and the intrinsic mode components is equal.
[0191]
[0192] Among them, u k For the set of intrinsic modulus components; ω k It is the set of center frequencies; δ(t) represents the pulse signal; K represents the mode number; f(t) is the original signal; * represents the convolution operator.
[0193] b) In order to solve equation (9), the Lagrange multiplication operator is introduced to transform the variational problem into an unconstrained problem, resulting in the augmented Lagrange expression (10).
[0194]
[0195] Where α is the penalty factor.
[0196] c) The modal components and center frequency are solved iteratively using the alternating direction multiplier method (ADMM) combined with Fourier transform. The iterative update formulas for the modal components and center frequency are expressed by equations (11) and (12), respectively.
[0197]
[0198]
[0199] in, They are Fourier transform.
[0200] 2-2) Genetic Algorithm Optimization Process
[0201] Genetic algorithms originated from computer simulations of biological systems. They are stochastic global search and optimization methods developed by mimicking the mechanisms of biological evolution in nature, drawing inspiration from Darwin's theory of evolution and Mendel's genetics. Essentially, they are efficient, parallel, and globally search-based nonlinear optimization methods that automatically acquire and accumulate knowledge about the search space during the search process and adaptively control the search to find the optimal solution. This method outperforms ant colony optimization and particle swarm optimization algorithms in terms of versatility and global optimization. In genetic algorithms, solutions to the problem to be optimized are represented by "chromosomes" and encoded in binary. During algorithm execution, a new generation of the population is generated through steps such as selection, crossover, and mutation of the initial population. With iterative computation, the population is optimized to a state containing the optimal solution. This patent uses a genetic algorithm to determine the ideal combination of K and α in a variational mode decomposition algorithm. The genetic algorithm includes six steps: encoding, population initialization, fitness evaluation, selection, and crossover. Fitness evaluation is the most important step. Entropy is often used to represent the disorder and randomness of a sequence. The smaller the entropy value, the less uncertainty and the stronger the periodicity of the sequence. However, a higher entropy value indicates greater disorder and uncertainty in the sequence. This patent uses envelope entropy to accurately describe the sparsity and unpredictability of wind power sequences when calculating fitness values to determine the distance between an individual and the optimal value. The envelope entropy of a wind power sequence reflects not only its randomness but also the degree to which the subsequences contain features of the original sequence. Envelope entropy measures the characteristics of a wind power sequence through sparsity. The sparser the subsequence, the lower its entropy value, indicating a larger proportion of the original wind power sequence it contains. Conversely, the weaker the sparsity of the subsequence, the higher its entropy value, indicating a large amount of noise in the subsequence, thus masking the original information in the wind power sequence. Therefore, envelope entropy is chosen as the fitness function of the genetic algorithm. Furthermore, the higher the fitness of a solution, the greater its likelihood of being passed on to the next generation. The envelope entropy E of the wind power sequence x(j) (j=1,2,…,N) is... p The calculation formula is (13).
[0202]
[0203] Where N is the number of sampling points; P j It is the normalized form of a(j); a(j) is the envelope signal.
[0204] 3) CNN-BiGRU prediction model based on attention mechanism
[0205] The prediction model consists of an input layer, a CNN layer, a BiGRU layer, an attention mechanism layer, and an output layer, such as... Figure 3As shown, the repaired wind power data (WS, WD, WP, T) is used as input, and features are extracted through convolution and pooling operations of a CNN. Then, a fully connected layer is used to transform the extracted features into a one-dimensional structure. To achieve high-precision prediction, a BiGRU layer and an attention mechanism layer learn from the extracted features to uncover the changing patterns of the input information. Finally, the prediction result is obtained through the output layer. The specific steps are described below:
[0206] a) Input layer. An input matrix X is constructed, consisting of wind power and features highly correlated with it.
[0207] b) 1D CNN layer. It mainly consists of convolutional layers, pooling layers, and fully connected layers to extract features from the input matrix. The feature vector H output by the CNN layer is... C It is calculated from equations (14)-(16).
[0208]
[0209] P = max(C) + b² (15)
[0210] H C =f(P×W2+b3)=σ(P×W2+b3) (16)
[0211] Where C is the output of the convolutional layer; P is the output of the pooling layer; W1 and W2 are weight matrices; b1, b2, and b3 are biases; σ is the sigmoid function; and Max() is the maximum value function. It is a convolution operator.
[0212] c) BiGRU layer. This layer primarily learns the features extracted by the CNN layer and further extracts dynamic features from the time series. The output y of BiGRU at time t is... t As shown in equation (17).
[0213]
[0214] d) Attention Mechanism Layer. The input vector of the attention layer is the output of the BiGRU layer. It primarily calculates the probability distribution of the importance of each feature to wind power based on the weight distribution, reflecting the relative importance of the information. The formula for calculating the weights of the attention layer is as follows:
[0215] e t =vtanh(wh) t +b) (18)
[0216]
[0217]
[0218] Among them, e t Let h be the output vector of the BiGRU layer at time t. t The calculated attention probability distribution values; v and w are weights; b is the bias; s t It is the output of the attention layer at time t.
[0219] e) Output Layer. The output layer is a fully connected layer that integrates the output of the attention layer to obtain the final predicted output Y. t As shown in equation (21).
[0220] Y t =σ(w o s t +b o ) (twenty one)
[0221] In the formula, Y t The predicted value at time t; w o and b o These are the weights and the biases, respectively.
[0222] Example 23:
[0223] A verification experiment of a hybrid short-term wind power prediction method considering significant data loss is presented below:
[0224] The technical approach of this invention can be divided into two stages. In the data processing stage, a BiLSTM-based generative adversarial network is proposed to generate data to repair missing data and extract dynamic and static features from real data, providing a high-quality dataset for subsequent prediction models. Subsequently, a genetic algorithm is used to optimize the parameters of VMD, decomposing wind power into nine relatively stable subsequences, overcoming the randomness introduced by empirical settings. In the prediction algorithm innovation stage, the serial combined prediction model is simplified after extracting features from the input information using a CNN. Subsequently, an attention mechanism is embedded in the BiGRU prediction process to enhance the expression of important information to achieve the final prediction. Experimental simulations demonstrate that the prediction accuracy of the hybrid prediction model is significantly improved compared to the traditional model. Further explanation is provided below with reference to specific implementation schemes.
[0225] 1) Basic data preparation
[0226] The data used in the implementation of this invention comes from a wind farm in Guangxi Zhuang Autonomous Region. The data collection period was from January 1st to December 31st, 2021, with a data loss rate of 40%. Figure 4 As shown. Data acquisition frequency was 15 minutes / time, covering wind power and meteorological information. However, different meteorological characteristics have varying degrees of impact on wind power output. Therefore, during the simulation, the Pearson coefficient was used to calculate the correlation between wind power and other characteristics. The formula is as follows:
[0227]
[0228] Select Figure 5 Features with a Pearson coefficient greater than 0.5 were used as input data. Finally, wind speed (WS), wind direction (WD), temperature (T), and wind power (WP) were selected as inputs. The ratio of training set to test set was set to 8:2.
[0229] To eliminate the influence of variable dimensions and prevent the models from being affected by singular values during training, this paper adopts the min-max normalization method of Equation (23) to map the above data to the interval [-1, 1]. The mean absolute percentage error (MAPE) and root mean square error (RMSE), as shown in Equation (25), are used as evaluation metrics to measure the difference between the true and predicted values. However, since the data used in this patent includes cases where wind power output is 0, the mean absolute error (MAE) is used instead, as shown in Equation (24). Furthermore, the coefficient of determination R, as shown in Equation (26), is added. 2 This reflects the linear correlation between predicted and actual values.
[0230]
[0231]
[0232]
[0233]
[0234] 2) Establish a data repair model based on BiLSTM and GAN
[0235] To verify the quality of the dataset after missing data repair, mean imputation (M1), KNN imputation (M2), and original GAN imputation (M3) were compared. Cumulative Distribution Function (CDF) and Euclidean Distance (EDD) were used to measure the distribution difference (statistical similarity) between the real dataset and the dataset containing the generated data. CDF describes the probability distribution (p) between wind farm information (WS, WD, WP, T), as shown in Equation (27). EDD calculates the true distance between two points in space to distinguish the differences between the two datasets, as shown in Equation (28). Table 1 shows that temporal GAN imputation has the lowest EDD value compared to mean imputation, KNN imputation, and the original GAN imputation method. For WP, WS, WD, and T, the EDD value of GAN is reduced by 91.2%, 73.5%, 63.8%, and 64.8% respectively compared to the original GAN. Compared to mean imputation, KNN imputation, and the original GAN imputation method, the CDF curve of the time-series GAN-repaired dataset fits the CDF curve of the real dataset best, such as... Figure 6 As shown.
[0236]
[0237]
[0238] Table 1. EDD values of datasets repaired by different imputation methods
[0239]
[0240] To further verify the effect of the proposed data imputation model on the performance of the prediction model, BP, CNN, LSTM, GRU, and BiGRU were applied to the unimpeded data and the data imputed by the four methods mentioned above. The prediction results are shown in Table 2. It can be seen that the MAE and RMSE of the simple BP neural network are 2.756 and 2.127, respectively, and it is less affected by missing data than the deep learning model. However, the improvement in BP prediction performance after data imputation is also limited. For the dataset imputed by temporal GAN, the RMSE and MAE of BP decreased by 27.01% and 23.86%, respectively. As shown in Table 2, the error reduction of deep neural networks is greater after missing data imputation. In particular, when using temporal GAN for missing value imputation, the MAE and RMSE of CNN are only 1.981 and 1.532. Compared with the other three imputation methods (M1, M2, M3), the MAE and RMSE of CNN are reduced by 33.14%, 21.61%, 20.85% and 35.82%, 22.35%, 22.19%, respectively. Table 2 also shows that advanced deep learning algorithms achieve higher prediction accuracy using datasets repaired by time-series GANs. For example, in the prediction results of the BiGRU model, the RMSE and MAE of M4 are reduced by 53.16%, 46.74%, and 39.27%, and by 58.18%, 53.30%, and 53.18%, respectively, compared to M1, M2, and M3. Clearly, the quality and quantity of data have a significant impact on the performance of the final prediction model. M4 accurately captures the internal regularity and time-series distribution of the data, achieving effective data repair.
[0241] Table 2 Comparison of prediction results using different filling methods
[0242]
[0243] 3) Data decomposition model based on GA and VMD
[0244] While the data restoration model addresses the data loss issue, the dataset containing generated data exhibits the same high volatility as the real dataset. Therefore, VMD is used to decompose the wind power sequence into nine distinct modes to overcome the challenges posed by this volatility to the prediction model. Based on the simulations described above, the effectiveness of the decomposition algorithm is validated using five prediction models: VMD-BP, VMD-CNN, VMD-LSTM-VMD-GRU, and VMD-BiGRU. The prediction results for each mode are then superimposed to obtain the predicted values. The RMSE, MAE, and R-values of each model are analyzed. 2The comparison results are shown in Table 3. The application of data decomposition technology significantly reduced the prediction errors of BP, CNN, LSTM, GRU, and BiGRU. Specifically, the RMSE and MAE of VMD-LSTM were 0.264 and 0.452 lower than those of LSTM, respectively, indicating that the VMD algorithm can reduce the instability of wind power and improve prediction accuracy. Furthermore, compared with the case without data decomposition, the RMSE and MAE predicted by the data-decomposed BiGRU neural network were reduced by 13.6% and 5.48%, respectively. Moreover, R... 2 This represents an improvement of 4.25%. In summary, the decomposition method enables the prediction model to capture the dynamic characteristics of each subsequence in the wind power sequence, thereby improving the accuracy of wind power prediction.
[0245] Table 3 Comparison of different evaluation indicators
[0246]
[0247] Different numbers of decompositions can significantly interfere with the accuracy of subsequent prediction models. Therefore, to verify the advantages of VMD optimization using a genetic algorithm, this invention compares the prediction performance under different numbers of decompositions. Table 4 shows the prediction results of temporal GAN-VMD-BiGRU under different decomposition numbers. Generally, the application of decomposition techniques can improve prediction accuracy. However, when the number of decompositions is set to 2 or 3, the prediction model results worsen. The results in Table x also show that the highest prediction accuracy can be obtained by optimizing the number of decompositions to 9 using a genetic algorithm. Compared with a decomposition number of 8, RMSE is reduced by 1.17%, MAE is reduced by 3.90%, and R... 2 This represents an increase of 3.54%. This further demonstrates that genetic algorithms can avoid the randomness of empirically setting VMD parameters and select the optimal decomposition parameters.
[0248] Table 4. Prediction results of the time-series GAN-VMD-BiGRU model under different numbers of decompositions.
[0249]
[0250] Based on attention mechanism and CNN-BiGRU prediction model
[0251] To demonstrate the effectiveness of the prediction model proposed in this patent, CNN, LSTM, GRU, BiGRU, CNN-LSTM, and CNN-BiGRU were used as comparison models. Simulation experiments on wind power prediction were conducted on a dataset that had been repaired using the temporal GAN method and decomposed using VMD. The prediction curves of the selected models on the test set are shown below. Figure 7 As shown. To more intuitively demonstrate the superiority of the prediction method presented in this paper, Figure 8The prediction metrics of the CNN-BiGRU-Attention model (the model proposed in this patent) are presented in comparison with different prediction models.
[0252] from Figure 7 and Figure 8 It can be seen that LSTM and GRU outperform CNN in prediction, indicating that recurrent neural networks have a greater advantage in time series modeling. Because BiGRU can capture state information from neurons in both the forward and backward directions, it outperforms LSTM and GRU in prediction accuracy. Simulation results show that CNN-BiGRU and attention-based CNN-BiGRU have higher prediction accuracy compared to traditional deep learning models. Specifically, compared to BiGRU, CNN-BiGRU reduces RMSE by 28.9%, MAE by 34.8%, and R... 2 The accuracy improved by 3.7%. This is because the CNN-BiGRU model uses a CNN to extract input features and then combines them with a BiGRU to predict wind force. The improved prediction accuracy validates the necessity of feature extraction. The CNN-BiGRU model with an attention mechanism reduced RMSE and MAE by 48.8% and 46.1% respectively compared to BiGRU. 2 It is also much larger than BiGRU. This is because the attention mechanism assigns weights to each time step based on the importance of the final prediction result, reducing prediction error by preventing information loss and strengthening the expression of key information. Therefore, as... Figure 7 As shown, the model proposed in this patent is superior to existing models during the peak and valley phases when wind power changes significantly.
Claims
1. A hybrid short-term wind power forecasting method considering significant data loss, characterized in that, Includes the following steps: 1) Establish a data repair model based on GAN and BiLSTM; 2) Obtain wind power data sequences and input them into a data restoration model based on GAN and BiLSTM to perform data augmentation on the wind power data sequences, thereby obtaining wind power data augmentation sequences; 3) The wind power data augmentation sequence is decomposed using the variational mode decomposition algorithm to obtain a low-fluctuation wind power subsequence; 4) Establish an improved CNN-BiGRU hybrid prediction model based on the attention mechanism; 5) Input the low-fluctuation wind power subsequence into the improved CNN-BiGRU hybrid prediction model based on the attention mechanism to obtain the wind power prediction result for the next time step; The steps for decomposing wind power data augmentation sequences using variational mode decomposition algorithms include: 3.1) Construct the variational mode decomposition objective function and constraints, namely: In the formula, u k For the set of intrinsic modulus components; ω k It is the set of center frequencies; δ(t) represents the pulse signal; K represents the mode number; f(t) is the wind power data enhancement sequence; * represents the convolution operator; The partial derivative is represented by t; time is represented by j; the imaginary number is represented by j. 3.2) Introduce the Lagrange multiplication operator and establish the augmented Lagrange L({u k },{ω k The expression for},λ), that is: In the formula, α is the penalty factor; λ is the Lagrange multiplier; 3.3) Combining the alternating direction multiplier method and Fourier transform, the formulas (5)-(6) are iteratively solved to obtain the modal components and center frequencies; The iterative update formulas for modal components and center frequencies are as follows: In the formula, They represent Fourier transform; ω k It is the set of center frequencies at the (n+1)th iteration; It is the intrinsic modulus component at the (n+1)th iteration; It represents the intrinsic modulus component at time t; the superscript ∧ indicates iteration; ω is the frequency; The modality number K and the penalty factor α are obtained through optimization using a genetic algorithm; The steps for optimizing the number of modes K and the penalty factor α using a genetic algorithm include encoding, population initialization, fitness evaluation, selection, and crossover. Among them, fitness evaluation uses envelope entropy to determine the distance between an individual and the optimal value; Envelope entropy E P As shown below: In the formula, N is the number of sampling points; P j It is the normalized form of a(j); a(j) is the envelope signal.
2. The hybrid short-term wind power forecasting method considering significant data loss according to claim 1, characterized in that, The data insulation model based on GAN and BiLSTM includes a generator and a discriminator; The generator is used to generate wind power samples; The discriminator is used to calculate the probability that the wind power sample conforms to the true distribution of wind power.
3. The hybrid short-term wind power forecasting method considering significant data loss according to claim 2, characterized in that, The generator produces sample y at time point t. t As shown below: y t =g(W4h t +W6h t ′) (1) h t =f(W1x t +W2h t-1 ) (2) h t ′=f(W3x t +W5h t+1 ) (3) In the formula, W1, W2, W3, W4, W5, and W6 are weights; x t It is the input at time t; h t-1 The output hidden at time t-1; h t+1 The output hidden at time t+1; h t h t ′ represents the outputs of the forward and backward propagation layers of the BiLSTM; f() is the propagation function; g() is the sample generation function.
4. The hybrid short-term wind power forecasting method considering significant data loss according to claim 2, characterized in that, The parameters of the generator and discriminator are updated using the cross-entropy loss function; The cross-entropy loss function is shown below: In the formula, L temporalGAN Represents cross-entropy loss; G(y) is the expected distribution; t ) represents the data generated by the generator; D(x) is the output of the discriminator; p data p z The true distribution and Gaussian distribution of the wind power data sequence.
5. The hybrid short-term wind power forecasting method considering significant data loss according to claim 2, characterized in that, The generator's input includes noise sampled from a Gaussian distribution.
6. The hybrid short-term wind power forecasting method considering significant data loss according to claim 1, characterized in that, The improved CNN-BiGRU hybrid prediction model based on the attention mechanism includes an input layer, a CNN layer, a BiGRU layer, an attention mechanism layer, and an output layer.
7. The hybrid short-term wind power forecasting method considering significant data loss according to claim 6, characterized in that, The input layer of the improved CNN-BiGRU hybrid prediction model based on the attention mechanism constructs the input matrix X according to the low-fluctuation wind power subsequence and inputs it into the CNN layer; The CNN layer includes convolutional layers, pooling layers, and fully connected layers; The feature vector H output by the CNN layer C As shown below: P = max(C) + b² (11) H C =σ(P×W8+b3) (12) In the formula, C is the output of the convolutional layer; P is the output of the pooling layer; W7 and W8 are weight matrices; b1, b2, and b3 are biases; σ is the sigmoid function; and Max() is the maximum value function. It is the convolution operator; X is the input to the convolutional layer; The BiGRU layer learns the feature vector output by the CNN layer, extracts the dynamic features of the time series, and obtains the output y. t ,Right now: In the formula, These represent the outputs of the forward propagation layer and the backward propagation layer, respectively. The output of the attention mechanism layer is shown below: e t =vtanh(wh t +b) (14) In the formula, e t Let h be the output vector of the BiGRU layer at time t. t The calculated attention probability distribution values; v and w are weights; b is the bias; s t It is the output of the attention layer at time t; α t The weight values assigned to the attention mechanism; Output Y of the output layer t As shown below: Y t =σ(w o s t +b o ) (17) In the formula, Y t The predicted value at time t; w o and b o These are the weights and the biases, respectively.
8. The hybrid short-term wind power forecasting method considering significant data loss according to claim 1, characterized in that, The wind power data includes wind speed, wind direction, temperature, and wind power output.