Wind farm power quality data modwt decoupling double-layer adversarial repair method
By employing the MODWT decoupled two-layer adversarial repair method, which utilizes adaptive feature distribution modulation and orthogonal decoupled fusion generator, the problems of time-frequency feature fragmentation and high-frequency detail loss in wind farm power quality data repair are solved, achieving accurate reconstruction of high-frequency details and improvement of data quality.
Patent Information
- Application Number
- CN202611322764.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-11-20
AI Technical Summary
Existing methods for repairing power quality monitoring data in wind farms suffer from problems such as fragmentation of time-frequency features, loss of high-frequency details, and lack of noise spatial optimization.
The MODWT decoupled two-layer adversarial repair method is adopted. The signal is decomposed into low-frequency trend skeleton and high-frequency detail components by maximum overlap discrete wavelet transform. Combined with adaptive feature distribution modulation and orthogonal decoupled fusion generator, the generator input distribution is dynamically adjusted to ensure independent optimization of low-frequency trend and high-frequency detail.
It effectively solves the problems of input noise and data characteristics being disconnected and low-frequency fundamental wave energy suppressing high-frequency harmonics in traditional restoration methods, and achieves accurate reconstruction of high-frequency details, thereby improving the quality and accuracy of the generated data.
Smart Images

Figure CN123138577A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wind farm power generation technology, specifically involving a decoupling two-layer adversarial repair method for wind farm power quality data MODWT (maximum overlap discrete wavelet transform). Background Technology
[0002] In recent years, with the introduction of the national "dual carbon" target, the installed capacity of wind power generation has been continuously expanding, and its proportion in the power system has been increasing. Due to the intermittent, fluctuating, and random nature of wind power generation, monitoring and recording the power quality data of wind turbines and wind farms is crucial to ensuring the safe and stable grid connection of wind power. The completeness and accuracy of this data directly affect the reliability of grid operation management, planning and scheduling, and related analysis and decision-making in the power market. Whether the loss of wind farm power quality monitoring data is due to communication issues or automatic removal of data after anomaly detection, time series data will be incomplete, compromising data integrity to some extent. Therefore, research is needed on the restoration of missing wind farm power quality monitoring data to provide complete and accurate data support for the realization of intelligent grid operation and maintenance.
[0003] Existing research methods for repairing missing data in wind farm power quality monitoring mainly fall into three categories: statistical methods, physical modeling methods, and machine learning methods. Statistical methods use mathematical methods such as interpolation functions and regression interpolation for data repair. While simple and easy to implement, they exhibit significant limitations when dealing with the substantial non-stationarity and high-frequency disturbances in wind farm power quality data. Physical modeling methods rely on the electrical connections between units and expert knowledge, and have high requirements for the spatiotemporal correlation of data from adjacent units, thus limiting their applicability. While shallow machine learning models can compensate for the shortcomings of traditional methods to some extent, their limited model depth makes it difficult to fully explore the deep time-frequency coupling features in complex time-series data. Compared to shallow learning, deep learning models can more deeply explore the multi-dimensional information in the time-frequency domain of data and effectively handle complex nonlinear data with multiple features and high dimensions. In recent years, generative adversarial networks (GANs) and their derivative models have been increasingly applied to the repair of missing wind power quality monitoring data due to their unsupervised learning characteristics. In terms of model structure, researchers have introduced techniques such as residual networks and graph convolutional networks to enhance the generator's ability to model complex data features.
[0004] However, existing methods generally suffer from a disconnect between learning global features in the temporal domain and learning local details in the frequency domain, and the increased network complexity leads to difficulties in training convergence. In terms of loss function design, researchers have introduced least-squares loss, Wasserstein distance, and other loss functions to alleviate the mode collapse problem to some extent, but these lack dynamic adjustment of the frequency domain reconstruction accuracy, resulting in insufficient high-frequency detail reconstruction quality in the generated data. The research of Xu Zhiqin et al. points out that generators tend to prioritize learning low-frequency features during training, while high-frequency perturbation details are often ignored, directly leading to unrealistic generated data. Regarding input noise, the research of Amodio et al. demonstrates that the noise space also needs attention; different noise space settings significantly affect the quality of generated data. How to improve the quality of generated data by optimizing the noise space remains a gap that urgently needs to be filled. Summary of the Invention
[0005] The purpose of this invention is to solve the problems of fragmented time-frequency features, loss of high-frequency details, and lack of noise space optimization in existing wind farm power quality monitoring data repair methods. A decoupled two-layer adversarial repair method, MODWT, for wind farm power quality data is proposed.
[0006] The technical solution of this invention is as follows: This invention provides a decoupled two-layer adversarial repair method for MODWT power quality data of wind farms, including: Step 1: Obtain the original wind power quality data and its corresponding missing mask. The original wind power quality data is the wind farm power quality data containing missing values. Step 2: Perform maximum overlap discrete wavelet transform decomposition on the original wind power quality data to obtain the low-frequency trend skeleton; Step 3: Input the missing mask, the low-frequency trend skeleton and the original wind power quality data into the pre-trained adversarial repair model to obtain the repaired wind farm power quality data; The adversarial repair model includes a modulator and an adversarial generative network. The modulator performs adaptive spectral sensing feature distribution modulation on preset basic random features based on the missing mask and the low-frequency trend skeleton to generate a modulated conditional feature vector. The adversarial generative network generates the repaired wind farm power quality data based on the modulated conditional feature vector and the original wind power power quality data.
[0007] Preferably, step 2 includes: Step 2.1: For lengths of N The original wind power quality data is used for J Maximum overlap discrete wavelet transform decomposition of the first layer, the first layer j Layer decomposition calculates wavelet coefficients using the following formula. and scaling factor : ; ; In the formula, For the first j Layer at time t wavelet coefficients, For the first j Layer at time t The scaling factor, j To decompose the hierarchy, j =1, 2,..., J , J This represents the maximum number of decomposition levels, ranging from 5 to 8. L j For the first j Layer equivalent filter length, For the first j Layered MODWT wavelet filter coefficients, For the first j Layer MODWT scale filter coefficients, This is the raw wind power quality data. Modulus N Circular extended index, N The length representing the raw wind power quality data; Step 2.2: Extract the coarsest scale coefficients as the low-frequency trend skeleton.
[0008] Preferably, the modulator includes a cascaded lightweight encoder, a mean-shift network, and a multilayer perceptron; the modulator performs adaptive spectral sensing feature distribution modulation on preset basic random features based on the missing mask and the low-frequency trend skeleton to generate a modulated conditional feature vector, including: The lightweight encoder extracts features from the low-frequency trend skeleton to obtain a compact trend feature representation; The missing mask and the compact trend feature representation are concatenated as vectors to obtain a joint conditional vector. The mean offset network performs regression processing on the missing mask to obtain the mean offset vector; The multilayer perceptron performs nonlinear feature extraction on the joint conditional vector and maps it to the (0,1) interval through the Sigmoid activation function to obtain variance modulation gating; Based on the mean offset vector and the variance modulation gating, the basic random features are dynamically adjusted dimension by dimension to obtain the modulated conditional feature vector.
[0009] Preferably, the adversarial generative network includes: a low-frequency trend component generation subnetwork, a high-frequency detail component generation subnetwork, a time-domain discriminator, a frequency-domain discriminator, and an orthogonal decoupling fusion module; The input of the low-frequency trend component generation subnetwork is connected to the output of the modulator, and simultaneously receives the raw wind power quality data; the output is connected to the input of the time-domain discriminator and the first input of the orthogonal decoupling fusion module, respectively. The input of the high-frequency detail component generation subnetwork is connected to the output of the modulator, and simultaneously receives the raw wind power quality data; the output is connected to the input of the frequency domain discriminator and the second input of the orthogonal decoupling fusion module, respectively. The output of the orthogonal decoupling fusion module serves as the output of the adversarial repair model.
[0010] Preferably, the adversarial generative network generates the repaired wind farm power quality data based on the modulated conditional feature vector and the original wind power quality data, including: The low-frequency trend component generation subnetwork generates a low-frequency trend repair component based on the modulated conditional feature vector and the original wind power quality data. The high-frequency detail component generation subnetwork generates high-frequency detail repair components based on the modulated conditional feature vector and the original wind power quality data. The orthogonal decoupling fusion module performs orthogonal decoupling double-layer fusion processing on the low-frequency trend repair component and the high-frequency detail repair component to generate the repaired wind farm power quality data. The power quality data of the repaired wind farm was calculated in the following way: ; in, To counteract the damage to wind farm power quality data generated by the network output, For low-frequency trend repair components, For high-frequency detail restoration components, For adaptive fusion weights, These are learnable orthogonal residual coupling coefficients. This represents the orthogonal residual term.
[0011] Preferably, the training process of the adversarial repair model includes: S1: Obtain complete time-series data of historical power quality monitoring of wind farms and artificially synthesized missing masks, construct a training dataset, and divide the training dataset into a training set and a validation set; S2: Perform maximum overlap discrete wavelet transform decomposition on the complete time series data in the training set, extract the corresponding low-frequency trend skeleton as the low-frequency supervision target, and use the sum of wavelet coefficients of each layer as the high-frequency detail supervision target. S3: Construct the adversarial repair model, and perform phased adversarial training on the adversarial repair model using the training set; the phased adversarial training includes: The first stage of trend alignment training involves freezing the network parameters of the modulator and the high-frequency detail component generation subnetwork, frequency domain discriminator, and orthogonal decoupling fusion module of the adversarial generative network, while enabling the network parameters of the low-frequency trend component generation subnetwork and time domain discriminator of the adversarial generative network. Training is then performed with the time domain Wasserstein adversarial loss and the basic L1 reconstruction loss as optimization objectives. Second stage high-frequency injection training: After completing the first stage trend alignment training, the network parameters of the high-frequency detail component generation subnetwork and the frequency domain discriminator are unfrozen, and spectral energy weighted reconstruction loss is introduced to force the high-frequency detail component generation subnetwork to fill high-frequency details. The third stage of joint fine-tuning training: After completing the second stage of high-frequency injection training, the network parameters of the modulator and the orthogonal decoupling fusion module are unfrozen, and orthogonal regularization loss and perceptual loss are added for joint fine-tuning until the total loss objective function converges, and the adversarial repair model that has been initially trained is obtained. S4: Use the pre-trained adversarial repair model to repair the samples in the validation set, and perform physical index consistency verification on the repair output. If the verification passes, the pre-trained adversarial repair model is used as the trained adversarial repair model. If the verification fails, adjust the loss balance hyperparameter and repeat the third stage joint fine-tuning training until the verification passes or the preset maximum number of training rounds is reached.
[0012] Preferably, the spectral energy-weighted reconstruction loss is calculated in the following manner: ; This represents the Fourier transform operator. This is the output of the current Generative Adversarial Network. For true reference signals, Represents the weighting coefficient for each frequency band, where the th k The individual frequency band weighting coefficients are calculated in the following way: ; in, For the first k Each frequency band weighting coefficient f k It is the first k A frequency point or the center frequency of a frequency band Indicates the true reference data at the 1st k Average power spectral density of the frequency band Indicates the maximum energy value across the entire frequency band. It is a very small positive number.
[0013] Preferably, the orthogonal regularization loss is calculated using the following formula: ; in, It is the Frobenius norm. The inner product of the feature matrix is output for the low-frequency trend repair component and the high-frequency detail repair component.
[0014] Preferably, the total loss objective function is expressed as: ; In the formula, This indicates that the time-domain Wasserstein adversarial loss includes a gradient penalty. Power quality data for wind farms to be repaired. This indicates that the frequency domain Wasserstein adversarial loss includes a gradient penalty. and These represent the various loss balance hyperparameters. This indicates perceived loss.
[0015] As a preferred option, it also includes: The physical index consistency of the repaired wind farm power quality data is checked. If the check passes, the repaired wind farm power quality data is used as the final repair data. If the check fails, the modulated conditional feature vector is iteratively corrected and the repaired wind farm power quality data is regenerated until the check passes or the maximum number of iterations is reached.
[0016] The beneficial effects of this invention are: This invention presents a decoupled two-layer adversarial repair method for wind farm power quality data using MODWT. It proposes an adaptive feature distribution modulation mechanism that dynamically adjusts the mean and variance of the generator input distribution based on the missing mask and MODWT low-frequency skeleton information. This solves the problems of input noise being completely disconnected from data features and the lack of targeted repair in traditional repair methods. MODWT is used to losslessly decompose the signal into trend and detail components, which are then used to supervise the two-layer fusion generator. Orthogonal constraints ensure that the two feature paths do not interfere with each other, addressing the problem in traditional end-to-end repair methods where low-frequency fundamental energy suppresses high-frequency harmonics, leading to the smoothing loss of high-frequency components. Attached Figure Description
[0017] Figure 1The diagram shows a flowchart of a MODWT decoupling two-layer countermeasure repair method for wind farm power quality data. Figure 2 The diagram shows the training process of the adversarial repair model. Figure 3 The figure shown is a comparative experimental result of the ability to repair power quality anomaly data. Detailed Implementation
[0018] Exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be understood that the embodiments shown and described in the drawings are merely exemplary and are intended to illustrate the principles and spirit of the invention, and are not intended to limit the scope of the invention.
[0019] This invention provides a decoupled two-layer adversarial repair method for wind farm power quality data using MODWT. Its core lies in constructing an adaptive feature distribution modulation mechanism based on a missing mask and the MODWT low-frequency skeleton as joint conditions, enabling dynamic reshaping of the generator input distribution according to the missing mode. Furthermore, it designs an orthogonal decoupled trend-perturbation two-layer fusion generator and a spectral energy weighted loss function based on MODWT physical decomposition, ensuring independent optimization of low-frequency trends and high-frequency details at the architectural level. Simultaneously, it provides sufficient gradient driving force to the high-frequency weak-energy bands through an inverse energy weighting strategy, effectively solving the problem of high-frequency components being submerged by the low-frequency dominant gradient in frequency domain repair.
[0020] Please see Figure 1 , Figure 1 The diagram shows a flowchart of a MODWT decoupling two-layer countermeasure repair method for wind farm power quality data. like Figure 1 As shown in this embodiment, the MODWT decoupling two-layer adversarial repair method for wind farm power quality data includes the following steps: Step 1: Obtain the original wind power quality data and its corresponding missing mask. The original wind power quality data is the wind farm power quality data containing missing values.
[0021] In this embodiment, the original wind farm power quality data can be denoted as: , length is It may contain randomly missing or consecutively missing segments.
[0022] Step 2: Perform maximum overlap discrete wavelet transform decomposition on the original wind power quality data to obtain the low-frequency trend skeleton.
[0023] In this embodiment, the original wind power quality data is first decomposed into trend components and detail components with clear physical meaning using the maximum overlap discrete wavelet transform (MODWT), which provides data support for the subsequent two-layer fusion generator of GAN and extracts the high and low frequency feature components required for feature distribution modulation.
[0024] Specifically, step 2 includes: Step 2.1: For lengths of N Raw wind power quality data J Maximum overlap discrete wavelet transform decomposition of the first layer, the first layer j Layer decomposition calculates wavelet coefficients using the following formula. and scaling factor : (1); (2); In the formula, For the first j Layer at time t The wavelet coefficients represent the signal at different scales. High-frequency detail components; For the first j Layer at time t The scaling factor represents the frequency below The accumulation of all low-frequency components (residual trend); j To decompose the hierarchy, j =1, 2,..., J , J This represents the maximum number of decomposition levels, ranging from 5 to 8. L j For the first j Layer equivalent filter length, , L The length of the mother wavelet prototype filter; For the first j Layered MODWT wavelet filter coefficients, For the first j The coefficients of the MODWT scale filter are obtained by upsampling and normalizing the mother filter (j-1 times): , Normalization ensures that the energy of each layer is comparable. This is the raw wind power quality data. Modulus N The circular extension index ensures that the length of the convolution result is always equal to... N No downsampling is used to ensure strict time alignment and translation invariance. N The length of the original wind power quality data can be any positive integer.
[0025] In this embodiment, formula (1) is essentially a bandpass filter, extracting the oscillation component of a specific frequency band, while formula (2) is a low-pass filter, preserving the accumulation trend. Because circular convolution is used without downsampling, each coefficient precisely corresponds to the original time step. t There is no phase shift, which is crucial for the timing of power quality events.
[0026] Step 2.2: Extract the coarsest scale coefficients as the low-frequency trend skeleton.
[0027] Specifically, the coarsest scale V J,t This is the low-frequency trend framework. x low , representing the fundamental frequency and the slowly varying envelope. All wavelet coefficients. W j,t The sum of these components forms the auxiliary monitoring target for the high-frequency detail components, i.e., the reference to true details.
[0028] MODWT is an additive decomposition that can be proven by formula (3). The signal is precisely decomposed into the sum of trend and multiple frequency band details, with no cross terms or residuals, providing a natural supervisory target for the two-layer fusion generator. Formula (4) proves the energy orthogonal decomposition, where the total variance is distributed to each scale without overlap, and the coefficients of each layer are uncorrelated. This directly supports the physical rationality of the subsequent orthogonal decoupling constraints.
[0029] (3); (4); in, This represents the average value of the original wind power quality data.
[0030] Step 3: Input the missing mask, low-frequency trend skeleton and original wind power quality data into the pre-trained adversarial repair model to obtain the repaired wind farm power quality data.
[0031] The adversarial repair model includes a modulator and an adversarial generative network. The modulator performs adaptive spectral sensing feature distribution modulation on the preset basic random features based on the missing mask and low-frequency trend skeleton to generate a modulated conditional feature vector. The adversarial generative network generates repaired wind farm power quality data based on the modulated conditional feature vector and the original wind power power quality data.
[0032] In this embodiment, the modulator includes a cascaded lightweight encoder, a mean-off network, and a multilayer perceptron.
[0033] The modulator performs adaptive spectral-aware feature distribution modulation on preset basic random features based on the missing mask and low-frequency trend skeleton, generating a modulated conditional feature vector, specifically including: Step a: The lightweight encoder extracts features from the low-frequency trend skeleton to obtain a compact trend feature representation.
[0034] Step b: Concatenate the missing mask with the compact trend feature representation to obtain the joint condition vector.
[0035] Step c: The mean offset network performs regression processing on the missing mask to obtain the mean offset vector.
[0036] Step d: The multilayer perceptron performs nonlinear feature extraction on the joint conditional vector and maps it to the (0,1) interval through the Sigmoid activation function to obtain the variance modulation gating.
[0037] Step e: Based on the mean offset vector and variance modulation gating, the basic random features are dynamically adjusted dimension by dimension to obtain the modulated conditional feature vector.
[0038] Specifically, in this embodiment, a learnable feature distribution modulator is constructed. Using missing mask m Low-frequency trend framework of raw wind power quality data x low As a condition, for basic random features z base The distribution parameters are dynamically adjusted dimension by dimension to transform them into a conditional feature distribution that adapts to the current repair task. The calculation formula is as follows: (5); in, z mod The modulated conditional feature vector serves as the actual input to the anti-generative network. Its mean and variance are dynamically adjusted by the data conditions and no longer follow a standard normal distribution. z base Based on random feature vectors, sampled from the standard normal distribution It provides an initial randomness and diversity basis. To achieve element-wise multiplication and dimension-wise scaling of variance, the distribution in this dimension widens when the modulation factor is greater than 1 and narrows when it is less than 1. This represents the Sigmoid activation function, whose output is mapped to (0,1). It serves as a smooth variance modulation gate to prevent the feature distribution from being overstretched or compressed to zero. It is a multilayer perceptron that can learn nonlinear feature extractors and learn modulation strategies from splicing conditions. m It is a binary missing mask, where 1 indicates a missing element and 0 indicates an observation. It is used to represent the missing position and length structure information of the encoding. This represents a vector concatenation operation that fuses missing mask and low-frequency encoded features. This indicates a lightweight encoder.
[0039] In this embodiment, the lightweight encoder employs a 1D-CNN to analyze low-frequency trend skeletons. x low Extract compact trend features from the data. The mean offset vector is derived from the missing mask by a small MLP. m The regression yields an adjusted feature distribution center position. The physical essence of adaptive spectral sensing feature distribution modulation is the conditional reshaping of the input feature distribution. When a missing feature occurs in a region of dense high-frequency perturbations, the MLP output modulation index automatically increases. z base The corresponding dimensional variance is expanded, and stronger high-frequency excitation is injected. When the low-frequency band is missing, the modulation factor is reduced and the distribution is compressed to ensure smoothness. Ensure that different missing patterns correspond to different distribution centers to avoid confusion between short / long missing strategies.
[0040] It should be noted that, through a learnable feature distribution modulator This approach directly injects physical semantics into the input feature distribution, resolving the mismatch between fixed distributions and variable data. During training, a learnable feature distribution modulator is trained using the feature statistics of real data (such as variance and autocorrelation across dimensions) as the target. Modulated conditional eigenvectors z mod The distribution characteristics approximate the conditional distribution of real data under the corresponding missing patterns.
[0041] In this embodiment, the adversarial generative network includes: a low-frequency trend component generation subnetwork, a high-frequency detail component generation subnetwork, a time-domain discriminator, a frequency-domain discriminator, and an orthogonal decoupling fusion module. The input of the low-frequency trend component generation subnetwork is connected to the output of the modulator, and simultaneously receives raw wind power quality data; its output is connected to the input of the time-domain discriminator and the first input of the orthogonal decoupling fusion module. The input of the high-frequency detail component generation subnetwork is connected to the output of the modulator, and simultaneously receives raw wind power quality data; its output is connected to the input of the frequency-domain discriminator and the second input of the orthogonal decoupling fusion module. The output of the orthogonal decoupling fusion module serves as the output of the adversarial repair model.
[0042] Specifically, the adversarial generative network generates repaired wind farm power quality data based on the modulated conditional feature vector and the original wind power quality data, including: Step i: The low-frequency trend component generation subnetwork generates a low-frequency trend repair component based on the modulated conditional feature vector and the original wind power quality data; Step ii: The high-frequency detail component generation subnetwork generates high-frequency detail restoration components based on the modulated conditional feature vector and the original wind power quality data; Step iii: The orthogonal decoupling fusion module performs orthogonal decoupling double-layer fusion processing on the low-frequency trend repair component and the high-frequency detail repair component to generate repaired wind farm power quality data; The power quality data of the repaired wind farms were calculated using the following method: ; in, To counteract the damage to wind farm power quality data generated by the network output, For low-frequency trend repair components, For high-frequency detail restoration components, For adaptive fusion weights, These are learnable orthogonal residual coupling coefficients. This represents the orthogonal residual term.
[0043] In this embodiment, the low-frequency trend component generation subnetwork reconstructs the fundamental frequency, slowly varying envelope, and long-term time dependencies through causal dilated convolution. The high-frequency detail component generation subnetwork captures transient pulses, harmonic distortions, and rapid fluctuations through wavelet scattering transform front-end and high-frequency transposed convolution. The modulated conditional feature vector is simultaneously input into both the low-frequency trend component generation subnetwork and the high-frequency detail component generation subnetwork, ensuring that the trend and details are based on the same adaptive feature distribution. Adaptive fusion weights are then used. It dynamically predicts based on local signal characteristics using a small attention network, and selects regions dominated by trends. Take in areas of dense disturbance Learnable orthogonal residual coupling coefficients Achieve learnable small positive numbers and control the intensity of cross-compensation. Orthogonal residual terms. That is, the element-wise product minus the projection of the high-frequency detail repair component onto the low-frequency trend repair component represents the two paths of coupled interactive information that are ignored by each other.
[0044] The calculation formula for the restored wind farm power quality data above embodies the principles of divide and conquer and collaborative compensation. The first two terms are adaptively weighted superpositions, and the third term is a coupling compensation mechanism. In actual wind power data, trends and disturbances are not completely independent (e.g., voltage sags may be accompanied by harmonics or voltage deviations), and pure orthogonal separation loses the physical correlation. The orthogonal residual term captures the interactive components and reinjects them with a controllable intensity, ensuring decoupling clarity without sacrificing physical authenticity.
[0045] Furthermore, the training process of the adversarial repair model in this embodiment will be described in detail. Please refer to [link / reference]. Figure 2 , Figure 2 The diagram shows the training process of the adversarial repair model.
[0046] like Figure 2As shown, the training process of the adversarial repair model in this embodiment includes the following steps: S1: Obtain complete time-series data of historical power quality monitoring of wind farms and artificially synthesized missing masks, construct a training dataset, and divide the training dataset into a training set and a validation set.
[0047] S2: Perform maximum overlap discrete wavelet transform decomposition on the complete time series data in the training set, extract the corresponding low-frequency trend skeleton as the low-frequency supervision target, and use the sum of wavelet coefficients of each layer as the high-frequency detail supervision target.
[0048] S3: Construct an adversarial repair model and perform phased adversarial training on the model using the training set; the phased adversarial training includes: The first stage of trend alignment training involves freezing the network parameters of the modulator, the high-frequency detail component generation subnetwork of the adversarial generative network, the frequency domain discriminator, and the orthogonal decoupling fusion module, while enabling the network parameters of the low-frequency trend component generation subnetwork and the time domain discriminator of the adversarial generative network. Training is then performed with the time domain Wasserstein adversarial loss and the basic L1 reconstruction loss as optimization objectives.
[0049] In this embodiment, only the low-frequency trend component generation subnetwork is enabled during the first stage of training. G T With time-domain discriminator D t This quickly restores global continuity. The loss at this stage is only in the time domain. Wasserstein Combat Losses and Foundations L 1. Reconstruction loss, which does not involve high-frequency constraints.
[0050] The second stage of high-frequency injection training: After completing the first stage of trend alignment training, the network parameters of the high-frequency detail component generation subnetwork and the frequency domain discriminator are unfrozen, and spectral energy weighted reconstruction loss is introduced to force the high-frequency detail component generation subnetwork to fill in high-frequency details.
[0051] In this embodiment, the high-frequency detail components are unfrozen during the second stage of training. G P frequency domain discriminator D f To address this, a spectral energy weighted loss is introduced to force the filling of high-frequency details. The calculation formula for the spectral energy weighting mechanism is as follows: (6); in, For the first k Each frequency band weight coefficient, the larger the value, the more it is emphasized during training; f k It is the first k A frequency point or the center frequency of a frequency band Indicates the true reference data at the 1st k Average power spectral density of the frequency band This represents the maximum energy value across the entire frequency band. In this embodiment, it is set to the 50Hz fundamental frequency, which can be used as a normalization reference. It is a very small positive number, and in this embodiment, it is taken as 1*10. -8 This is used to prevent the denominator from being zero. This represents a logarithmic compression transformation, which avoids extreme weighting and ensures a smooth and reasonable gradient distribution.
[0052] The physical meaning of formula (6) is that since wind power data is dominated by low-frequency energy, while high-frequency data is weak but crucial. If the weights are allocated according to the energy ratio, the high-frequency error will be overwhelmed. However, in this embodiment, the opposite is true: the lower the energy, the higher the weight of the frequency. The logarithmic transformation simulates the logarithmic perception characteristics, making the weights conform to physical intuition and forcing the generator to focus on the reconstruction of weak but crucial high-frequency details.
[0053] In this embodiment, the constructed spectral energy-weighted reconstruction loss is defined as follows: (7); In the formula, This represents the Fourier transform operator. This is the output of the current Generative Adversarial Network. For true reference signals, This represents the weighting coefficient for each frequency band.
[0054] Formula (7) significantly increases the importance of high-frequency errors in the total loss by implementing the inverse energy attention of Formula (6) at the gradient level.
[0055] The third stage of joint fine-tuning training: After completing the second stage of high-frequency injection training, the network parameters of the modulator and the orthogonal decoupling fusion module are unfrozen, and orthogonal regularization loss and perceptual loss are added for joint fine-tuning until the total loss objective function converges, thus obtaining the preliminarily trained adversarial repair model.
[0056] In this embodiment, full parameter fine-tuning is performed during the third stage of training, incorporating orthogonal decoupling constraints and perceptual consistency loss to balance time-frequency quality. The orthogonal regularization loss is defined as follows: ; in, It is the Frobenius norm. The inner product of the feature matrices of the low-frequency trend repair component and the high-frequency detail repair component reflects the linear correlation. The physical meaning of this formula is that it forces the two feature representations to be as orthogonal as possible (the inner product approaches zero). From a signal processing perspective, this means that the two learned basis function sets are mutually perpendicular, each occupying an independent frequency band and time scale hypothesis space, fundamentally preventing high-frequency details from being smoothly absorbed by the low-frequency trend component, or low-frequency trends from being contaminated by the high-frequency detail component.
[0057] In this embodiment, the total loss objective function is expressed as: ; In the formula, Power quality data for wind farms to be repaired. This indicates that the time-domain Wasserstein adversarial loss includes a gradient penalty. This indicates that the frequency domain Wasserstein adversarial loss includes a gradient penalty. and These represent the various loss balance hyperparameters. This indicates perceived loss.
[0058] In this embodiment, and Ensure the statistical accuracy and training stability of both time and frequency domains. and It can be determined through experimentation or an adaptive weighting strategy. By calculating the key physical indices of the model's repair output and the actual power quality disturbance signal after each training round, explicit constraints are imposed on the repair results at the physical characteristics level, such as voltage amplitude, frequency deviation, and harmonic distortion rate, thereby ensuring that the repaired data and the actual data are consistent in terms of power quality physical characteristics. The physical meaning of this total loss objective function is to construct a generative optimization framework under multi-dimensional physical constraints, namely, ensuring statistical authenticity through dual-domain adversarial methods, providing gradient guidance accurate to the frequency point through spectral weighted reconstruction, and strengthening the repair of high-frequency components.
[0059] S4: Use the pre-trained adversarial repair model to repair the samples in the validation set, and verify the consistency of the physical indicators of the repair output. If the verification passes, the pre-trained adversarial repair model is used as the trained adversarial repair model. If the verification fails, adjust the loss balance hyperparameter and repeat the third stage of joint fine-tuning training until the verification passes or the preset maximum number of training rounds is reached.
[0060] In this embodiment, the physical indicators being verified include: effective voltage deviation, frequency deviation, and total harmonic distortion (THD). Specifically, as shown below: ; ; ; ; in, U h For the first h RMS value of subharmonic voltage U 1 represents the effective value of the fundamental voltage. This is the actual measured power grid frequency value. H The highest harmonic order, The total harmonic distortion of voltage. This is the measured effective value of the voltage. This is the system's nominal voltage. This is a short-time flicker value.
[0061] When the output of each training round fails to pass the validation against the real data, a violation metric is added as an additional penalty. L perceptual In the process, a new round of training is triggered until all indicators meet the above requirements.
[0062] In an optional embodiment, the MODWT decoupled two-layer adversarial repair method for wind farm power quality data in this embodiment further includes: performing physical index consistency verification on the repaired wind farm power quality data; if the verification passes, the repaired wind farm power quality data is used as the final repair data; if the verification fails, the modulated conditional feature vector is iteratively corrected and the repaired wind farm power quality data is regenerated until the verification passes or the maximum number of iterations is reached.
[0063] The MODWT decoupled two-layer adversarial repair method for wind farm power quality data in this invention no longer treats the GAN generator input as a fixed probability distribution sampling point, but rather as a feature distribution that can be dynamically modulated by data conditions. By changing the statistical properties (mean, variance, correlation) of this input feature distribution, it carries the pattern features of missing modes and low-frequency trends, thereby guiding the GAN generator to accurately repair the power quality data of the wind farm. This solves the problems of traditional GAN repair methods where input noise is completely disconnected from data features and the repair lacks specificity.
[0064] Furthermore, the effectiveness of the MODWT decoupled two-layer countermeasure repair method for wind farm power quality data in this invention was verified through simulation experiments.
[0065] The adversarial repair model proposed in this invention was compared with various models proposed by existing methods. The experimental results are shown in [link to experimental results]. Figure 3 , Figure 3The figure shows the comparative experimental results of the power quality anomaly data repair capability. In the figure, ★ represents the adversarial repair model proposed in this invention,
[19] represents the fusion of two-dimensional discrete wavelet transform and generative adversarial network proposed in CN202010052722.7,
[20] represents the GRUI-GAN network proposed in "Research on Short-term Prediction of Photovoltaic Power Based on Similar Day Clustering and Automatic Integration Learning",
[21] represents the GAIN network proposed in "Research on Wind Power Ultra-short-term Power Prediction Method Considering Anomaly Data Repair and Feature Optimization", and
[22] represents the GAN network of "Government Network Missing Data Repair Method Based on Gradient Penalty Generative Adversarial Network".
[0066] like Figure 3 As shown, 1000 measured samples were used for testing. The evaluation metric for this comparative experiment was the root mean square error (RMSE), which is used to assess the difference between the true value and the predicted output value of the model. The experimental results show that the method proposed in this invention has better wind farm power quality anomaly data repair capability and robustness.
[0067] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations are intended to cover non-exclusive inclusion, such that an article or device comprising a list of elements includes not only those elements but also other elements not expressly listed. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or device comprising said element. Terms such as "connected" or "linked" are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect. The orientations or positional relationships indicated by terms such as "upper," "lower," "left," and "right" are based on the orientations or positional relationships shown in the accompanying drawings and are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as limiting the invention.
[0068] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features or characteristics described may be combined in any suitable manner in one or more embodiments or examples. In addition, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.
[0069] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.
Claims
1. A decoupled two-layer adversarial repair method for MODWT power quality data of wind farms, characterized in that, include: Step 1: Obtain the original wind power quality data and its corresponding missing mask. The original wind power quality data is the wind farm power quality data containing missing values. Step 2: Perform maximum overlap discrete wavelet transform decomposition on the original wind power quality data to obtain the low-frequency trend skeleton; Step 3: Input the missing mask, the low-frequency trend skeleton and the original wind power quality data into the pre-trained adversarial repair model to obtain the repaired wind farm power quality data; The adversarial repair model includes a modulator and an adversarial generative network. The modulator performs adaptive spectral sensing feature distribution modulation on preset basic random features based on the missing mask and the low-frequency trend skeleton to generate a modulated conditional feature vector. The adversarial generative network generates the repaired wind farm power quality data based on the modulated conditional feature vector and the original wind power power quality data.
2. The MODWT decoupling two-layer countermeasure repair method for wind farm power quality data according to claim 1, characterized in that, Step 2 includes: Step 2.1: For lengths of N The original wind power quality data is used for J Maximum overlap discrete wavelet transform decomposition of the first layer, the first layer j Layer decomposition calculates wavelet coefficients using the following formula. and scaling factor : ; ; In the formula, For the first j Layer at time t wavelet coefficients, For the first j Layer at time t The scaling factor, j To decompose the hierarchy, j =1, 2,..., J , J This represents the maximum number of decomposition levels, ranging from 5 to 8. L j For the first j Layer equivalent filter length, For the first j Layered MODWT wavelet filter coefficients, For the first j Layer MODWT scale filter coefficients, This is the raw wind power quality data. Modulus N Circular extended index, N The length representing the raw wind power quality data; Step 2.2: Extract the coarsest scale coefficients as the low-frequency trend skeleton.
3. The MODWT decoupling two-layer countermeasure repair method for wind farm power quality data according to claim 1, characterized in that, The modulator includes a cascaded lightweight encoder, a mean-shift network, and a multilayer perceptron; the modulator performs adaptive spectral sensing feature distribution modulation on preset basic random features based on the missing mask and the low-frequency trend skeleton to generate a modulated conditional feature vector, including: The lightweight encoder extracts features from the low-frequency trend skeleton to obtain a compact trend feature representation; The missing mask and the compact trend feature representation are concatenated as vectors to obtain a joint conditional vector. The mean offset network performs regression processing on the missing mask to obtain the mean offset vector; The multilayer perceptron performs nonlinear feature extraction on the joint conditional vector and maps it to the (0,1) interval through the Sigmoid activation function to obtain variance modulation gating; Based on the mean offset vector and the variance modulation gating, the basic random features are dynamically adjusted dimension by dimension to obtain the modulated conditional feature vector.
4. The MODWT decoupling two-layer countermeasure repair method for wind farm power quality data according to claim 1, characterized in that, The adversarial generative network includes: a low-frequency trend component generation subnetwork, a high-frequency detail component generation subnetwork, a time-domain discriminator, a frequency-domain discriminator, and an orthogonal decoupling fusion module; The input of the low-frequency trend component generation subnetwork is connected to the output of the modulator, and simultaneously receives the raw wind power quality data; the output is connected to the input of the time-domain discriminator and the first input of the orthogonal decoupling fusion module, respectively. The input of the high-frequency detail component generation subnetwork is connected to the output of the modulator, and simultaneously receives the raw wind power quality data; the output is connected to the input of the frequency domain discriminator and the second input of the orthogonal decoupling fusion module, respectively. The output of the orthogonal decoupling fusion module serves as the output of the adversarial repair model.
5. The MODWT decoupling two-layer countermeasure repair method for wind farm power quality data according to claim 4, characterized in that, The adversarial generative network generates the repaired wind farm power quality data based on the modulated conditional feature vector and the original wind power quality data, including: The low-frequency trend component generation subnetwork generates a low-frequency trend repair component based on the modulated conditional feature vector and the original wind power quality data. The high-frequency detail component generation subnetwork generates high-frequency detail repair components based on the modulated conditional feature vector and the original wind power quality data. The orthogonal decoupling fusion module performs orthogonal decoupling double-layer fusion processing on the low-frequency trend repair component and the high-frequency detail repair component to generate the repaired wind farm power quality data. The power quality data of the repaired wind farm was calculated in the following way: ; in, To counteract the damage to wind farm power quality data generated by the network output, For low-frequency trend repair components, For high-frequency detail restoration components, For adaptive fusion weights, These are learnable orthogonal residual coupling coefficients. This represents the orthogonal residual term.
6. The MODWT decoupling two-layer countermeasure repair method for wind farm power quality data according to claim 4, characterized in that, The training process of the adversarial repair model includes: S1: Obtain complete time-series data of historical power quality monitoring of wind farms and artificially synthesized missing masks, construct a training dataset, and divide the training dataset into a training set and a validation set; S2: Perform maximum overlap discrete wavelet transform decomposition on the complete time series data in the training set, extract the corresponding low-frequency trend skeleton as the low-frequency supervision target, and use the sum of wavelet coefficients of each layer as the high-frequency detail supervision target. S3: Construct the adversarial repair model, and perform phased adversarial training on the adversarial repair model using the training set; the phased adversarial training includes: The first stage of trend alignment training involves freezing the network parameters of the modulator and the high-frequency detail component generation subnetwork, frequency domain discriminator, and orthogonal decoupling fusion module of the adversarial generative network, while enabling the network parameters of the low-frequency trend component generation subnetwork and time domain discriminator of the adversarial generative network. Training is then performed with the time domain Wasserstein adversarial loss and the basic L1 reconstruction loss as optimization objectives. Second stage high-frequency injection training: After completing the first stage trend alignment training, the network parameters of the high-frequency detail component generation subnetwork and the frequency domain discriminator are unfrozen, and spectral energy weighted reconstruction loss is introduced to force the high-frequency detail component generation subnetwork to fill high-frequency details. The third stage of joint fine-tuning training: After completing the second stage of high-frequency injection training, the network parameters of the modulator and the orthogonal decoupling fusion module are unfrozen, and orthogonal regularization loss and perceptual loss are added for joint fine-tuning until the total loss objective function converges, and the adversarial repair model that has been initially trained is obtained. S4: Use the pre-trained adversarial repair model to repair the samples in the validation set, and perform physical index consistency verification on the repair output. If the verification passes, the pre-trained adversarial repair model is used as the trained adversarial repair model. If the verification fails, adjust the loss balance hyperparameter and repeat the third stage joint fine-tuning training until the verification passes or the preset maximum number of training rounds is reached.
7. The MODWT decoupling two-layer countermeasure repair method for wind farm power quality data according to claim 6, characterized in that, The spectral energy-weighted reconstruction loss is calculated in the following way: ; This represents the Fourier transform operator. This is the output of the current Generative Adversarial Network. For true reference signals, Represents the weighting coefficient for each frequency band, where the th k The individual frequency band weighting coefficients are calculated in the following way: ; in, For the first k Each frequency band weighting coefficient f k It is the first k A frequency point or the center frequency of a frequency band Indicates the true reference data at the 1st k Average power spectral density of the frequency band Indicates the maximum energy value across the entire frequency band. It is a very small positive number.
8. The MODWT decoupling two-layer countermeasure repair method for wind farm power quality data according to claim 7, characterized in that, The orthogonal regularization loss is calculated using the following formula: ; in, It is the Frobenius norm. The inner product of the feature matrix is output for the low-frequency trend repair component and the high-frequency detail repair component.
9. The MODWT decoupling two-layer countermeasure repair method for wind farm power quality data according to claim 8, characterized in that, The objective function for the total loss is expressed as: ; In the formula, This indicates that the time-domain Wasserstein adversarial loss includes a gradient penalty. Power quality data for wind farms to be repaired. This indicates that the frequency domain Wasserstein adversarial loss includes a gradient penalty. and These represent the various loss balance hyperparameters. This indicates perceived loss.
10. The MODWT decoupling two-layer countermeasure repair method for wind farm power quality data according to claim 1, characterized in that, Also includes: The physical index consistency of the repaired wind farm power quality data is checked. If the check passes, the repaired wind farm power quality data is used as the final repair data. If the check fails, the modulated conditional feature vector is iteratively corrected and the repaired wind farm power quality data is regenerated until the check passes or the maximum number of iterations is reached.
Citation Information
Patent Citations
Image enhancement method fusing two-dimensional discrete wavelet transform and generative adversarial network
CN111275640A
