A wind power missing data completion method based on improved WGAIN
By improving the WGAIN model and combining CNN, LSTM and self-attention mechanism, the problem of missing wind power data was solved, the accuracy and effect of data completion were improved, and higher accuracy of wind power prediction was achieved.
Patent Information
- Application Number
- CN202510064628.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-01-15
AI Technical Summary
Existing technologies struggle to effectively capture the time dependence and potential correlations between multivariate time series features in wind power data, resulting in poor completion of missing wind power data. This is especially true in cases of high-dimensional data and high missing rates, where the reconstruction results contain errors.
An improved WGAIN model is adopted, which combines convolutional neural network (CNN), long short-term memory network (LSTM) and self-attention mechanism to design a generator network. The self-attention mechanism reveals the potential correlation between multivariate time series features, and the Wasserstein distance is introduced to optimize the discriminator loss function to improve the authenticity of the generated data.
It significantly improves the accuracy and overall performance of completing missing wind power data, and the generated data is closer to the distribution of real data, reducing the root mean square error.
Smart Images

Figure CN119990233B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of wind power data processing, and particularly relates to a wind power missing data completion method based on an improved WGAIN of a convolutional neural network, a long short-term memory network and a self-attention mechanism. BACKGROUND
[0002] With the increasing energy crisis and environmental problems, the global energy structure is accelerating the transformation from fossil fuels to clean energy such as wind energy. Although wind power generation has significant potential, its intermittency and volatility pose a serious challenge to the planning, operation and control of wind farms. In addition, the large-scale grid connection of wind power further increases the difficulty of stable operation of the power system. Therefore, accurate prediction of wind power is of great significance for reasonable allocation of system reserve capacity, ensuring safe operation of the power grid and improving economic benefits. However, due to the uncertainty of the natural environment where the wind farm is located, adverse natural conditions may cause abnormal operation of system equipment, communication errors and sensor failures, thereby causing data loss problems in the supervisory control and data acquisition (SCADA) system. Data loss not only significantly reduces the performance of the SCADA system, but also makes it difficult to obtain complete wind farm data, resulting in a decrease in the number of effective data in the data set and a decrease in data accuracy, affecting the effect of model training, and even causing overfitting risk. The above problems pose a great challenge to wind power prediction, therefore, effective completion of missing data has become a key problem to be solved.
[0003] At present, data completion methods are mainly divided into two categories: classical statistical methods and data-driven methods. In the statistical method, the autoregressive integrated moving average model (ARIMA) is widely used to establish a linear relationship to complete the missing values of power, voltage or current in a specific time data set. However, a single fixed mathematical model cannot effectively describe high-dimensional wind turbine data, and the effectiveness of statistical completion methods decreases significantly as the data loss rate increases. In recent years, with the rapid development of deep learning technology, data-driven completion methods based on deep learning have attracted widespread attention, among which the generative adversarial network (GAN) has shown excellent performance in data generation. However, the traditional GAN framework does not fully consider the time dependence of time series data and ignores the potential correlation between different features of multivariate time series. In addition, due to the significant nonlinearity and non-stationarity of wind power sequences, these methods are often inefficient in handling wind power data loss, and cannot accurately capture the distribution characteristics of the data, resulting in potential errors in the reconstruction results. Therefore, future research should focus on developing more targeted structured neural network models to further improve the effect of wind power missing data completion. SUMMARY
[0004] In view of the problems in the prior art, the application provides a wind power missing data completion method based on an improved WGAIN, which introduces a convolutional neural network (CNN), a long short-term memory network (LSTM) and a self-attention mechanism (Self-Attention), combines an improved generative adversarial network (GAN) architecture, and realizes high-precision completion of missing data.
[0005] To achieve the above object, the application adopts the following technical solutions:
[0006] A wind power missing data completion method based on an improved WGAIN, which comprises the following steps:
[0007] Step 1: defining the wind power missing data completion problem.
[0008] Step 2: designing an improved WGAIN model, including optimization of the generator network and the discriminator network structure and design of the loss function.
[0009] Step 3: model optimization based on the game training strategy of the generator and the discriminator.
[0010] Step 4: evaluating the error of the wind power missing data completion result.
[0011] The present technology mainly considers that wind power data has strong volatility and randomness, and wind power is easily affected by weather. Therefore, the difficulty lies in how to capture the time dependence of time series data and the potential correlation between different characteristics of multivariate time series, and realize high-precision completion of missing data.
[0012] The present technology further optimizes, and the step 1 specifically comprises the following contents:
[0013] In actual engineering, the multivariate time series sample X=(x ij )∈R T×D of the SCADA data collected in the wind turbine, wherein T is the time step number, and D represents the number of characteristics. In view of the possible missing values, a missing matrix M=(m ij )∈R T×D with the same size as X is introduced to represent the missing situation of the data. In the matrix, m ij =1 indicates that x ij has been observed, and m ij =0 indicates a missing value.
[0014] The step 2 is as follows:
[0015] Step 2.1: generator network design:
[0016] The goal of the generator is to generate missing data from the observed values. In the generator module, the input includes three matrices: the data matrix with 0 representing missing samples; the noise matrix Z, which randomly generates noise in the missing places; and the mask matrix M, which distinguishes missing data and real data with 0 and 1. The noise Z is a random matrix with the same dimension as the data matrix , and its elements are sampled from the interval [0, 0.1]. The generator consists of CNN layers, LSTM layers, self-attention mechanism layers, and regression layers. The CNN layers are used to extract time series features, the LSTM layers capture the temporal dependencies of sequence data, the self-attention mechanism layers reveal the potential correlation between multivariate features, and the fully connected layers output the results. The generator network structure diagram is shown in Figure 1 .
[0017] Step 2.2: Generator loss function design:
[0018] The goal of the generator G is to generate realistic data to deceive the discriminator D. The improved WGAIN generator loss function consists of a reconstruction loss Loss R and a generation loss Loss G . The generation loss ensures that the generator continuously improves the quality of the generated samples, making the distribution of the generated data closer to the real data distribution. The reconstruction loss is the mean square error loss between the generated samples and the real samples, which is used to constrain the performance of the generator G on known data.
[0019] Step 2.3: Discriminator network design:
[0020] The discriminator uses the Wasserestein distance to distinguish between generated values and real values. Its network structure includes two convolutional layers and one fully connected layer. The activation function of the two convolutional layers is LeakyReLU, and the activation function of the fully connected layer is Sigmoid. The discriminator network structure diagram is shown in Figure 2 .
[0021] Step 2.4: Design of the hint mechanism:
[0022] To improve the ability of the discriminator D to distinguish between original data and generated data, a hint matrix H is designed to provide partial data authenticity information to the discriminator, further improving the completion accuracy.
[0023] Step 2.5: Discriminator loss function design:
[0024] The task of the discriminator D is to determine which values in the completed data are original observed values and which are generated values. The discriminator determines the authenticity of the data based on the completed data and the hint matrix, and the loss function uses the Wasserstein distance to optimize the adversarial training of the generator and the discriminator.
[0025] A wind power missing data completion method based on improved WGAIN is shown in Figure 3
[0026] The step 3 is shown as follows:
[0027] An alternating optimization strategy of a generative adversarial network is adopted, the generator is optimized by fixing the parameters of the discriminator, and the discriminator is optimized by fixing the parameters of the generator, so as to realize effective updating of model parameters.
[0028] The step 4 is shown as follows:
[0029] Root mean square error (RMSE) is used as an index to evaluate the error of the completed wind power data.
[0030] Compared with the prior art, the beneficial effects of the present application mainly include:
[0031] The present application considers the volatility and randomness of wind power data, and designs a generator network structure with a convolutional neural network (CNN), a long short-term memory network (LSTM) and a self-attention mechanism (Self-Attention) to fully exploit the long-term dependence of time series data and the potential correlation between multiple features. The discriminator introduces the Wasserstein distance to optimize the difference measure between the generated data distribution and the real data distribution, significantly improving the completion accuracy of the model for missing data and the overall performance. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 The generator network structure diagram is shown in Fig. 1;
[0033] Figure 2 The discriminator network structure diagram is shown in Fig. 2;
[0034] Figure 3 The wind power missing data completion method based on improved WGAIN is shown in Fig. 3. DETAILED DESCRIPTION
[0035] To explain the technical content, structural features, purposes and effects of the technical scheme in detail, the following specific embodiments are described in detail.
[0036] Taking into account the significant temporal characteristics of wind power data, the present invention combines the advantages of Long Short-Term Memory (LSTM), Convolutional Neural Networks (CNN), and Self-Attention to design an improved generator network structure. LSTM can effectively capture the temporal dependency characteristics in time series, CNN can extract multi-scale and multi-directional feature information, and the self-attention mechanism can reveal the potential correlation between multivariate time series features. In addition, the Wasserstein distance is introduced into the discriminator loss function to optimize the similarity between the generated data distribution and the real data distribution, thus proposing a wind power missing data completion model based on the improved WGAIN.
[0037] The method specifically comprises the following steps:
[0038] Step 1: Define the problem of completing missing wind power data.
[0039] In actual engineering, the SCADA data collected from wind turbines form a multivariate time series sample X = (x ij )∈R T×D , where T is the number of time steps and D is the number of features. In order to deal with the possibility of missing data, a missing matrix M=(m ij )∈R T×D To indicate the missing data. In this matrix, m ij =1 indicates the corresponding data x ij has been observed, and m ij =0 indicates the corresponding data x ij Missing.
[0040]
[0041] Observational data It can be represented by input X and M as shown below:
[0042]
[0043] Where ⊙ is the Hadamard product operation of the matrix.
[0044] Let the output of the generator be While generating missing data, the generator also generates and replaces the original non-missing data, so It is not the final completed data. Assume that the final output completed data is The original data is retained in the non-missing parts, and the missing parts are filled with data generated by the model. The calculation method is as follows:
[0045]
[0046] Where E is a matrix with the same dimension as M and all elements are 1.
[0047] Step 2: Design an improved WGAIN model, including optimizing the generator and discriminator network structures and designing the loss function.
[0048] The step 2 specifically includes the following steps:
[0049] Step 2.1: Generator Network Design
[0050] The goal of the generator is to generate missing data based on the observed values. In the generator module, the input includes three matrices: the data matrix Use 0 to represent missing samples; the noise matrix Z randomly generates noise in the missing places; the mask matrix M uses 0 and 1 to distinguish missing data from real data. A random matrix of uniform dimension, whose elements are sampled from the interval [0, 0.1]. The generator consists of a CNN layer, an LSTM layer, a self-attention mechanism layer, and a fully connected layer. The CNN layer extracts features, the LSTM layer captures temporal dependencies in the time series, and the self-attention mechanism layer reveals potential correlations between multivariate features.
[0051] In multivariate time series data, there are different variables. By analyzing the correlation between different variables, the final completion accuracy can be improved. Therefore, in order to utilize the potential correlation between different variables, a self-attention mechanism is designed to capture the potential correlation between different variables. The self-attention mechanism automatically assigns different weights to each element in the sequence to better capture the relationship between different elements. Although irrelevant features have been deleted, the input data still contains multiple different features or indicators. In order to model the interaction between these features, a self-attention mechanism is designed to capture the potential relationship between data and features. The calculation of its self-attention can be described by the following formula:
[0052] Q=XW q
[0053] K=XW k
[0054] V=XW v
[0055]
[0056] where Q and K are query vector and key vector for calculating similarity respectively, V is value vector, d k is the dimension of key. X is data belonging to R n×m , and are training parameters.
[0057] Step 2.2: Generator loss function design:
[0058] The goal of the generator G is to generate realistic data to deceive the discriminator D. The improved WGAIN generator loss function is composed of reconstruction loss Loss R and generation loss Loss G . The generation loss ensures that the generator continuously improves the quality of the generated samples, so that the distribution of the generated data is closer to the distribution of the real data. The reconstruction loss is the mean square error loss between the generated sample and the real sample, which is used to constrain the performance of the generator G on known data. Let C = (c ij ) ∈ R T×D be the output of the discriminator. The generator loss function L G is calculated as follows:
[0059]
[0060] Loss G = -E[c ij |m ij = 0]
[0061] L G = Loss G + λLoss R
[0062] where E is the expectation, and λ is a hyperparameter that controls the proportion between the generation loss and the reconstruction loss.
[0063] Step 2.3: Discriminator network design
[0064] The discriminator network structure includes two convolutional layers and one fully connected layer. The activation function of the two convolutional layers is LeakyReLU, and the activation function of the fully connected layer is Sigmoid, so that the output value ranges between 0 and 1. The structure of the discriminator is shown in Figure 2 .
[0065] Step 2.4: Design of the hint mechanism:
[0066] To improve the ability of the discriminator D to distinguish between original data and generated data, a hint matrix H is designed. The calculation formula of the hint matrix H is as follows:
[0067] H = W ⊙ M + 0.5 (1-W)
[0068] where W is a random binary matrix with the same dimension as the mask matrix M, and its elements are sampled from {0, 1}.
[0069] When W is a full 1 matrix, H = M; when W is a full 0 matrix, the elements of H are all 0.5. Thus, the sampling space of the hint matrix H is {0, 0.5, 1}. When the elements of H are 0 or 1, the matrix explicitly identifies the input data as a generated sample or a real sample; when the element is 0.5, the matrix does not provide additional information and needs to be judged by the discriminator. By adjusting W, the amount of reference information relied on by the discriminator can be flexibly controlled.
[0070] Step 2.5: Design the loss function of the discriminator:
[0071] The task of the discriminator D is to determine which values in the completed data are original observations and which are generated values. Its input is the completed data and the hint matrix H, and its output is a matrix with the same size as the original data, where each value in the matrix represents the probability that the corresponding position in the input data is an original observation. When the output value is P = 1, the discriminator judges that the position is an original observation; when the output value is p = 0, it is judged to be generated data. In this case, the discriminator is equivalent to predicting the mask matrix M, where the values corresponding to the original observation data are 1 and the missing values are 0. In order to further improve the stability and performance of the generative adversarial network, the Wasserstein distance is introduced instead of the traditional cross-entropy loss. The Wasserstein distance can better measure the difference between the distribution of generated data and the distribution of real data, while alleviating the problem of gradient vanishing. Specifically, the goal of the discriminator is to minimize the Wasserstein distance to make the distribution of generated data and real data more similar. It is important to note that the mask matrix M is predefined, so the training of the discriminator can be considered as supervised learning, thus effectively improving its performance. The loss function of the discriminator is:
[0072] D loss = E[c ij |m ij = 0] - E[c ij |m ij = 1]
[0073] Step 3: Model optimization based on the game training strategy of the generator and the discriminator.
[0074] The step 3 specifically includes the following steps:
[0075] Generative adversarial networks use an alternating optimization strategy, optimizing the generator G once and then the discriminator D k times. While optimizing the generator, the discriminator parameters are kept fixed, allowing the generator to produce samples as realistic as possible to deceive the discriminator. While optimizing the discriminator, the generator parameters are fixed, allowing the discriminator to distinguish between real and generated samples as accurately as possible.
[0076] Step 4: Evaluate the error of the wind power missing data completion results.
[0077] The step 4 specifically includes the following steps:
[0078] The wind power data containing missing values is fed into the improved WGAIN model from step 2. Game training in step 3 gradually leads to convergence of the generative adversarial network model. Finally, the generator generates completed data, and the experimental results are evaluated using the root mean square error (RMSE). A smaller RMSE value indicates a closer match between the generated data and the true value. The following is the mathematical definition of RMSE.
[0079]
[0080] Where: Y i and are the true value and generated value of the i-th sample respectively; N is the total number of samples.
[0081] Compared with the prior art, the present invention has the following beneficial effects:
[0082] To address the problem of missing wind power data, the present invention proposes a data completion method based on an improved generative adversarial interpolation network (WGAIN) with CNN-LSTM-Self-Attention. To address the volatility and strong randomness of wind power, the invention integrates a convolutional neural network (CNN), a long short-term memory network (LSTM), and a self-attention mechanism (Self-Attention) into the generator to fully exploit the long-term dependencies of time series data and the potential correlations between multiple features. The discriminator optimizes the difference measure between the generated data distribution and the real data distribution by introducing the Wasserstein distance, significantly improving the model's accuracy in completing missing data and overall performance.
[0083] It should be noted that, in the present text, terms such as "comprise", "comprising", or any other variant thereof do not preclude the presence of the other elements than those mentioned in a process, method, article, or terminal device comprising the elements in question. The elements defined by the expression "comprising" or "containing" are not excluded from a process, method, article, or terminal device comprising said elements, even if more limitations are added. Furthermore, in the present text, "greater than", "less than", "exceeding", and the like are understood as not including the number itself; "and above", "and below", "and within", and the like are understood as including the number itself.
[0084] Although the above-mentioned embodiments have been described, those skilled in the art, once aware of the basic inventive concept, can make additional changes and modifications to these embodiments, so the above description is only an embodiment of the present application, and does not limit the patent protection scope of the present application. Any equivalent structure or equivalent process transformation using the content of the present application specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A wind power missing data completion method based on improved WGAIN, characterized in that, The method comprises the following steps: Step 1: defining the wind power missing data completion problem; Step 2: designing an improved WGAIN model, including optimization of the generator network and the discriminator network structure and design of a loss function; Step 2.1: generator network design The generator receives a data matrix , a noise matrix and a mask matrix , which are composed of a CNN layer, an LSTM layer, a self-attention mechanism layer and a fully connected layer, the CNN layer is used for feature extraction, the LSTM layer captures the time dependence of the time series, and the self-attention mechanism layer reveals the potential correlation between multiple variables by giving different weights to the sequence, and the specific calculation formula is as follows: wherein and are a query vector and a key vector for computing similarity, respectively, is a value vector, is a dimension of the key, is data belonging to and are training parameters; Step 2.2: generator loss function design The improved WGAIN generator loss function consists of reconstruction loss and generation loss where it is ensured that the generated data is close to the real distribution, the performance of the generator on known observations is limited, given the output of the discriminator, the generator loss function is calculated as follows: In the formula is desired, is a hyperparameter that controls the ratio between the generation loss and the reconstruction loss; wherein is a hyperparameter controlling the ratio between the control generation loss and the reconstruction loss; Step 2.3: discriminator network design The discriminator network structure comprises two convolutional layers and one fully connected layer, the activation function of the two convolutional layers is LeakyReLU, and the activation function of the fully connected layer is Sigmoid, which is used to generate the final probability value, ensuring that the output is in the range of [0, 1]; Step 2.4: design of the hint mechanism In order to improve the ability of the discriminator D to distinguish between original data and generated data, a hint matrix H is designed, and the calculation formula of the hint matrix H is as follows: In the formula, W is a random binary matrix, the dimension of which is the same as that of the mask matrix M, and the elements are sampled from {0, 1}; Step 2.5: design of the discriminator loss function The task of the discriminator D is to determine which values in the completed data are original observations and which are generated values, with its input being the completed data and the hint matrix H, and its output being a matrix of the same size as the original data, each value in the matrix representing the probability that the corresponding position in the input data is an original observation. The discriminator uses the Wasserestein distance to distinguish between generated values and real values, which improves the stability of learning and solves the mode collapse problem, making the model easier to train than other GANs. Its loss function is: Step 3: model optimization based on the game training strategy of the generator and the discriminator; Step 4: evaluation of the error of the wind power missing data completion result.
2. The improved WGAIN-based wind power missing data completion method of claim 1, wherein, The step 1 specifically comprises: define a matrix of the same size as the wind power data of the same size to indicate the missing condition of the data; in the matrix, indicates has been observed, while indicates missing values; observed data may be represented by the input and as shown in the following formula: In the formula is the Hadamard product operation of matrices; The completed data after defining the final output is defined as Then there is where is a matrix of the same dimension as and with all elements being 1, is the output of the generator.
3. The improved WGAIN-based wind power missing data completion method of claim 1, wherein, The step 3 adopts an alternating optimization strategy of the generator and the discriminator: Optimize the generator to generate as realistic data as possible while fixing the discriminator parameters; Optimize the discriminator to accurately distinguish between real data and generated data while fixing the generator parameters.
4. The improved WGAIN-based wind power missing data completion method of claim 1, wherein, The step 4 adopts the root mean square error to evaluate the error of the wind power missing data completion result.
5. The improved WGAIN-based wind power missing data imputation method of claim 4, wherein, The smaller the value of the root mean square error, the closer the generated value is to the true value. The following is the mathematical definition of the evaluation index: In the formula: and are the true values and generated values of the first sample, respectively. N is the total number of samples.
Citation Information
Patent Citations
Method and device for improving GAIN to repair random missing of multiple sensing data
CN119004002A
Building photovoltaic data interpolation method based on WGAN and whale optimization algorithm
US20240135138A1