A method for completing missing data of a mutual inductor based on hybrid filtering and a generative adversarial network

CN122903762APending Publication Date: 2026-10-13CHINA THREE GORGES UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611157958.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

第一类,单一滤波方案,仅能实现降噪功能,无法还原空白缺失片段,无法解决数据缺失问题;

Benefits of technology

1.本发明采用固定顺序的两级串行混合滤波架构,通过卡尔曼滤波先剥离高斯白噪声与低频漂移,再通过小波阈值滤波抑制脉冲高频干扰,相比单级滤波或调换滤波顺序,能够更全面地消除噪声与数据缺失的耦合影响,为后续补全模型提供高质量的输入信号。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903762A_ABST
    Figure CN122903762A_ABST
Patent Text Reader

Abstract

The application discloses a kind of mutual inductor missing data completion method and system based on hybrid filtering and adversarial generation network, belong to electric power system sensing data processing field.The present application is aimed at the problem that the completion accuracy of mutual inductor time series data is low under strong electromagnetic interference, and there is lack of credibility control, first, collect mutual inductor original time series signal, identify three typical missing and generate binary mask;Two-stage serial hybrid filtering composed of Kalman filtering and wavelet threshold filtering is used to complete denoising, and the real-time interference intensity index is calculated;The denoised signal and the mask are input into the improved WGAN-GP model, the loss function weight is dynamically adjusted by combining the interference intensity, and the missing point interference is weakened through the mask attention mechanism;Finally, the original effective data and the completed data are fused, and the credibility classification output is executed according to the continuous missing length.The present application can significantly improve the completion accuracy under strong electromagnetic environment, and the grading control mechanism adapts to the safety requirements of electric power metering, and can be widely applied to substation mutual inductor data processing scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system automation and intelligent sensing technology, and in particular to a method and system for completing missing data of instrument transformers based on hybrid filtering and adversarial generative networks, which is applicable to noise reduction and missing data repair of substation instrument transformer time sequence data under strong electromagnetic interference environment. Background Technology

[0002] In substation operation scenarios, current transformers (CT), voltage transformers (PT), capacitive voltage transformers (CVT), and various electronic transformers are the basic data sources for core businesses such as power metering, relay protection, and condition monitoring. The completeness and accuracy of their time-series data directly determine the safety of power grid operation and the fairness of electricity billing.

[0003] Instrument transformers, deployed long-term around high-voltage equipment, are constantly subjected to strong electromagnetic interference such as lightning overvoltages, switch opening and closing operations, and electromagnetic coupling in the busbar space. This makes them highly susceptible to two types of data anomalies: one is signal noise pollution, where waveforms are superimposed with high-frequency pulse spikes and low-frequency temperature drift noise, leading to decreased data accuracy; the other is missing timing data, caused by communication link disturbances, core saturation clipping, and analog-to-digital sampling failures, manifesting as continuous or discrete blank data segments. If the missing data is not accurately replenished, it will directly cause serious consequences such as protection malfunctions, metering deviations, and distorted condition assessments.

[0004] Currently, there are three types of solutions for handling abnormal timing of current transformers, but they have the following shortcomings: The first type, a single filtering scheme, can only achieve noise reduction, but cannot restore blank or missing segments, and cannot solve the problem of missing data; The second category includes traditional completion methods such as linear interpolation and spline interpolation, which rely solely on fitting adjacent points. In scenarios with continuous missing data over long periods, the completion error increases sharply, making it difficult to meet accuracy requirements. The third category is completion algorithms based on general generative adversarial networks. These algorithms directly input noisy original waveforms for training, fail to distinguish the coupled effects of noise and missing data, lack an adaptive mechanism to perceive the intensity of electromagnetic interference in real time and dynamically adjust the completion strategy, and also lack data credibility classification and control logic adapted to power metering standards, resulting in significant limitations in engineering implementation. Summary of the Invention

[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing a method and system for completing missing data of current transformers based on hybrid filtering and adversarial generative networks. This method maintains high completion accuracy even under strong electromagnetic interference scenarios, while also possessing data reliability hierarchical control capabilities and adapting to power metering safety standards.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: To achieve the above-mentioned technical features, the objective of this invention is as follows: The first aspect of this invention provides a method for completing missing data in instrument transformers based on hybrid filtering and generative adversarial networks, comprising the following steps: S1. Acquire the raw timing signal output by the current transformer; S2. Perform anomaly detection on the original time series signal, identify all missing points, and generate a binary missing mask matrix; S3. Perform two-stage serial hybrid filtering preprocessing on the original time-series signal. First, smooth the signal by using Kalman filtering, and then perform fine noise reduction by wavelet threshold filtering to obtain the denoised time-series signal. S4. The interference intensity index is calculated based on the original time sequence signal and the denoised time sequence signal. The interference intensity index is used to quantify the strength of real-time electromagnetic interference in the current transformer operation scenario. S5. After concatenating the denoised temporal signal and the missing mask matrix along the channel dimension, input the concatenated signal into the trained improved WGAN-GP model. At the same time, the interference intensity index is used as an adaptive constraint parameter to input the loss function of the model, and the output is a temporal completion sequence of the same length as the input signal. The improved WGAN-GP model has a built-in mask attention mechanism to weaken the interference of missing points on the effective temporal feature extraction. S6. Replace the missing points marked by the missing mask matrix in the original time series signal with the time series completion sequence, completely retain all the original valid sampled data, and generate a temporary complete time series signal; count the length of each consecutive missing segment, determine the credibility of the completion data according to the preset missing length threshold, and output the graded complete time series signal.

[0007] Preferably, in step S2, the anomaly detection identifies three typical missing conditions: communication interruption, saturation limit violation, and sampling defect. Zero-value placeholder processing is performed on the identified missing points. The zero-value placeholder is only used in the calculation process of the interference intensity index and does not participate in the construction of the input features of the improved WGAN-GP model.

[0008] Preferably, in step S3, the Kalman filter is used to filter out Gaussian white noise and small random fluctuations in the transformer measurement link; the wavelet threshold filter uses the db4 wavelet basis or the sym8 wavelet basis, the number of signal decomposition layers is fixed at 5, the soft thresholding algorithm is used to shrink the detail coefficients of each layer, and the threshold is selected as the unbiased risk estimation threshold or the heuristic threshold.

[0009] Preferably, in step S5, the generator of the improved WGAN-GP model adopts a Bi-LSTM bidirectional temporal coding structure to extract temporal dependency features from both forward and backward directions; the mask attention mechanism applies a very large negative bias to the attention logit corresponding to the missing point during the self-attention calculation process, so that the attention weight of the missing point after normalization approaches zero.

[0010] Preferably, in step S5, the generator loss function of the improved WGAN-GP model includes an adversarial loss term and a mean squared error loss term. The interference intensity index is applied to the mean squared error loss term as a multiplicative adaptive weight. The higher the electromagnetic interference intensity, the greater the penalty weight of the mean squared error loss term.

[0011] Preferably, in step S6, the preset missing length threshold is positively correlated with the sampling frequency, and its value is the number of sampling points corresponding to a single cycle of the power frequency. If the length of consecutive missing segments is less than or equal to the preset missing length threshold, the completed data is determined to be reliable, and the final complete time sequence signal that can be connected to the electricity metering and settlement system is output. If the length of consecutive missing segments is greater than the preset missing length threshold, the completed data is determined to be unreliable, the temporary complete time sequence signal is marked as low confidence and a system alarm is triggered. This set of data is only used for background monitoring and manual fault review.

[0012] Preferably, in step S1, the current transformer includes a current transformer, a voltage transformer, a capacitive voltage transformer, and an electronic current transformer, and the signal sampling frequency range is 1kHz to 10kHz.

[0013] Another aspect of the present invention provides a system for completing missing data of mutual inductors based on hybrid filtering and adversarial generative networks, including a hardware layer and an algorithm processing layer deployed on the hardware layer; The hardware layer includes a data acquisition unit, a processor, and a memory. The data acquisition unit is wired to the secondary measurement circuit of the current transformer and is used to acquire the raw time-series signal output by the current transformer. The processor is electrically connected to the data acquisition unit and the memory respectively and is used to execute the entire process logic of signal preprocessing, model inference, data reconstruction, and reliability determination. The memory is used to store the historical time-series data of the current transformer, the weights of the trained improved WGAN-GP network, and the missing length determination threshold parameters. The algorithm processing layer includes: The data acquisition and mask generation module is used to perform raw time-series signal acquisition and anomaly detection, identify missing points and generate a missing mask matrix; The hybrid filtering preprocessing module is used to perform two-stage serial hybrid filtering processing and output a denoised timing signal; The interference intensity assessment module is used to calculate and quantify the interference intensity index of real-time electromagnetic interference. An adaptive completion module with a built-in improved WGAN-GP model is used to generate time-series completion sequences by combining interference intensity indices. The temporal reconstruction and hierarchical output module is used to merge the completed data and the original valid data, and perform confidence-level output based on the length of consecutive missing data.

[0014] Preferably, the improved WGAN-GP model includes a Bi-LSTM bidirectional coding unit and a masked attention unit. The masked attention unit is used to reduce the feature weights of missing points during feature extraction and weaken the interference of invalid placeholder values.

[0015] Preferably, the acquisition unit supports a configurable sampling frequency of 1kHz to 10kHz and is compatible with the secondary circuit output of current transformers, voltage transformers, capacitive voltage transformers, and electronic transformers; the processor adopts an embedded architecture and supports sliding window real-time signal processing and model inference.

[0016] The present invention has the following beneficial effects: 1. This invention adopts a fixed-order two-stage serial hybrid filtering architecture. It first removes Gaussian white noise and low-frequency drift through Kalman filtering, and then suppresses pulse high-frequency interference through wavelet threshold filtering. Compared with single-stage filtering or changing the filtering order, it can more comprehensively eliminate the coupling effect of noise and data missing, and provide high-quality input signals for subsequent model completion.

[0017] 2. This invention constructs an interference intensity index that can be calculated in real time and introduces it as an adaptive weight into the loss function of the WGAN-GP model. The completion strategy can be dynamically adjusted according to the electromagnetic interference intensity on site: under weak interference, the data distribution fitting is the main method to ensure the statistical consistency of the completion results; under strong interference, the fidelity constraint weight is increased to avoid the model overfitting the noise mode, which significantly improves the completion accuracy and robustness under strong electromagnetic environment.

[0018] 3. The improved WGAN-GP model of this invention combines Bi-LSTM bidirectional temporal coding and masked attention mechanism, which can simultaneously utilize the contextual information before and after the missing segment, and effectively weaken the interference of zero-value occupancy at missing points on feature extraction, and can still maintain high restoration accuracy in long-term continuous missing scenarios.

[0019] 4. This invention adds a reliability classification and control mechanism based on the length of continuous missing data. Using the single cycle of power frequency as the judgment threshold, the use scenarios of supplementary data with excessively long missing data are restricted. It is prohibited from being connected to the power metering and settlement circuit and can only be used for fault analysis and manual review. This fully complies with the power metering safety management specifications and can effectively avoid metering disputes and operational risks. Attached Figure Description

[0020] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0021] Figure 1 This is a schematic diagram of the overall process of the completion method of the present invention.

[0022] Figure 2 This is a detailed schematic diagram of the internal structure of the improved WGAN-GP model in step S5 of the present invention. Detailed Implementation

[0023] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] Example 1: See Figure 1 This embodiment provides a method for completing missing data of mutual inductors based on hybrid filtering and generative adversarial networks. The completion method specifically includes the following steps: Step S1: Collect the timing signals output by the current transformer, voltage transformer, capacitive voltage transformer and electronic transformer, with a sampling frequency of 1kHz~10kHz, and obtain the original timing signal Xraw.

[0025] Step S2: Perform anomaly detection on the original time-series signal Xraw, identify three typical missing conditions: communication interruption, saturation limit exceeding, and sampling bad points. Mark all missing points when the signal amplitude or rate of change deviates from the rated measurement threshold, and generate a binary missing mask matrix M. In the missing mask matrix M, M[i]=1 indicates that the i-th sampling point is valid data, and M[i]=0 indicates that the i-th sampling point is missing data. Perform zero-value occupancy processing on the missing points. This zero-value occupancy is only used for the vector L2 calculation of the interference intensity index in step S4 and is not used as the input feature of the improved WGAN-GP model. Introduce a minimal constant epsilon to construct a zero-removal protection mechanism for the pre-calculation of the L2.

[0026] Step S3: Perform a two-stage serial hybrid filtering preprocessing on the original time-series signal Xraw in a fixed order. First, use Kalman filtering to perform preliminary smoothing and noise reduction, filtering out Gaussian white noise and small random fluctuations generated by the current transformer measurement link, and outputting an intermediate smoothed signal Xkalman. Then, use wavelet threshold filtering to achieve fine noise reduction, suppressing pulse interference and high-frequency noise caused by short circuits and equipment switching operations, and outputting the final denoised signal Xdenoised. The execution order of the two-stage filtering cannot be changed. First, use Kalman filtering to remove low-frequency random fluctuations, which can optimize the distribution of the wavelet input signal. Compared with single-stage filtering or processing methods that change the filtering order, it can simultaneously suppress Gaussian white noise and pulse high-frequency interference.

[0027] The wavelet threshold filtering uses the db4 wavelet basis or the sym8 wavelet basis, the number of signal decomposition layers is fixed at 5, the soft thresholding algorithm is used to shrink the detail coefficients of each layer, and the threshold is selected as the unbiased risk estimation threshold or the heuristic threshold.

[0028] Step S4: Calculate the interference intensity index Inoise based on the original time-series signal Xraw and the denoised signal Xdenoised. The Inoise value range is [0,1), which is used to quantify the strength of real-time electromagnetic interference in the current transformer measurement link.

[0029] The formula for calculating the interference intensity index Inoise is: ; in This is a vector 2-norm operation, where epsilon is a minimal constant used to avoid computational anomalies when the denominator is zero.

[0030] Step S5: The denoised signal Xdenoised and the missing mask matrix M are concatenated along the channel dimension and used as the input features of the generator. The interference intensity index Inoise is used as the adaptive constraint parameter of the loss function layer and input into the trained improved WGAN-GP model. The model extracts effective temporal features through Bi-LSTM bidirectional temporal coding combined with mask attention mechanism. It dynamically adjusts the penalty weight of the mean square error term in the loss function based on Inoise and outputs a temporal completion sequence Xpred of the same length as the input.

[0031] The generator loss function expression of the improved WGAN-GP model is as follows: ; in, This represents the total loss value of the generator. For WGAN-GP gradient penalty adversarial loss, The effective sampling point mean square error loss, To maintain a fixed balance coefficient, Inoise is used only as... The multiplicative adaptive weights of the loss term result in a greater penalty weight for the mean square error loss term as the electromagnetic interference intensity increases.

[0032] The mask attention mechanism performs attention weight reduction processing on the zero values ​​pre-filled for missing points based on the missing mask matrix M: during the self-attention calculation process, a maximum negative bias is applied to the attention logit corresponding to the missing point, so that the attention weight of the missing point after normalization approaches zero, weakening the interference of invalid placeholder values ​​on feature extraction, and accurately extracting effective temporal sampling features.

[0033] Step S6: Perform time-series signal fusion and reconstruction. Only the missing points marked by the missing mask matrix M in the original time-series signal Xraw are replaced with the time-series completion sequence Xpred, while completely preserving the original valid sampled data, generating a temporary complete time-series signal Xtemp. The length of consecutive missing segments within the missing mask matrix M is calculated and reliability is determined. The credibility of the completed data is differentiated based on a preset missing length threshold T_thr. The preset missing length threshold is positively correlated with the sampling frequency and is set to the number of sampling points corresponding to a single power frequency cycle, i.e., ... ,in Sampling frequency, in Hz.

[0034] If the length of consecutive missing segments is less than or equal to a preset threshold, the completed data is deemed reliable, and the final complete time series signal Xfinal is output, which can be connected to the power metering and settlement and equipment monitoring system. If the length of consecutive missing segments is greater than the preset threshold, the completed data is deemed unreliable, and the temporary complete time series signal Xtemp is marked as low confidence and a system alarm is triggered. This set of completed data is only used for background monitoring and manual fault verification and does not participate in power metering and settlement.

[0035] Example 2: The specific implementation process of the method of the present invention will be described in detail below with reference to the accompanying drawings and the actual operating conditions of the substation.

[0036] I. Specific Implementation of Anomaly Detection and Missing Mask Generation This section corresponds to the implementation process of steps S1 and S2.

[0037] 1. Detection criteria for three typical missing operating conditions In actual substation operation environments, the causes of missing timing data from instrument transformers are diverse. This invention uses multiple criteria to differentiate and detect three typical operating conditions: communication interruption-related missing data, saturation exceeding limit-related missing data, and sampling defect-related missing data. (1) Missing communication interruption category When the digital output interface of the current transformer (such as IEC61850-9-2 sampled value messages) experiences continuous packet loss or a physical link disconnection, the data received by the acquisition unit will show continuous zero values ​​or a fixed value. The criterion is as follows: if the absolute value of the amplitude of the continuous sampling point signal is less than 0.5% of the rated secondary output value and the duration exceeds [a certain value], the data will be considered as follows: millisecond( The value is related to the retransmission timeout of the communication protocol, usually ranging from 5ms to 20ms. If the segment is identified as a communication interruption, all sampling points within that segment are marked as missing.

[0038] (2) Saturation-overlimit missing classes Iron-core current transformers are prone to core saturation under transient high current or ferroresonant conditions, resulting in the secondary output waveform being clipped at the top and losing true primary waveform information. The criteria are as follows: Saturation detection is initiated when the instantaneous amplitude of the signal exceeds 110% of the rated full scale; further, it is determined whether the first-order differential value of the waveform undergoes a sudden change near the zero-crossing point. If the first-order differential value of three consecutive sampling points is less than 20% of the normal differential average, it is determined to have entered the saturation region; the saturation start point is the point where the amplitude first exceeds 110% of the rated value and the differential value drops sharply; the saturation termination point is the point where the amplitude falls back to below 90% of the rated value and the rate of change returns to normal for five consecutive points; all sampling points between these two points are marked as missing.

[0039] (3) Missing samples of defective pixels Isolated outliers caused by ADC (Analog-to-Digital Converter) errors, clock jitter, or electromagnetic pulse coupling manifest as a single point or a sharp jump of 2-3 consecutive points. The criteria are as follows: for each sampling point... Take the median of the three points before and after it. ;like ( If the historical noise standard deviation is used to estimate the noise level, then the point is determined to be a missing point of the sampling bad point type; sampling bad points are only marked as single-point missing points, and adjacent points are not extended to be marked.

[0040] 2. Generation of missing mask matrix Based on the above three detection criteria, a binary missing mask matrix M of the same length as the original time-series signal is generated after point-by-point judgment. This indicates that the i-th sampling point is valid data. This indicates that the i-th sampling point is missing data. For consecutive missing segments, the corresponding interval of the mask matrix is ​​continuously set to 0 to ensure that the subsequent completion module can identify the continuity of the missing data.

[0041] 3. Zero-value placeholder handling and zero-removal protection To avoid the denominator being zero when calculating the interference intensity index in step S4, this invention performs zero-value placeholder processing on missing points before calculating the L2 norm, i.e. Missing points are set to zero, while valid points retain their original sampled values. A minimal constant is also introduced. Ensure the denominator It is always greater than zero.

[0042] It should be noted that: (1) This zero-value placeholder processing is only used for the calculation of the interference intensity index in step S4, and only for the relative energy difference of the signal before and after quantization filtering; (2) The zero-value placeholder results are not used as input features of the improved WGAN-GP model in step S5. The input of the model generator is the denoised time series signal. The tensor obtained by concatenating the missing mask matrix M along the channel dimension; (3) Zero-value placeholders do not participate in model inference and will not introduce additional calculation errors or affect the accuracy of completion.

[0043] II. Engineering Implementation Details of Two-Stage Serial Hybrid Filtering This section corresponds to the implementation process of step S3 in the method. The two-stage filtering is fixed in the order of Kalman filtering → wavelet threshold filtering and cannot be changed.

[0044] 1. First-stage Kalman filter Kalman filtering is used to suppress Gaussian white noise and low-frequency random drift in the current transformer measurement link, and adopts the following state-space model: State vector: ,in To estimate the signal amplitude at the current moment, The rate of change of amplitude; State transition matrix: , The sampling interval is determined by the sampling frequency; Observation matrix: , directly observe the signal amplitude.

[0045] The values ​​of process noise covariance Q and measurement noise covariance R: Q is set based on the variance of the random fluctuation of the amplitude when the current transformer is working normally, and is generally taken as... , , The specific values ​​need to be calibrated after normalizing the dynamic range of the secondary output of the current transformer; R is taken as the estimated value of the quantization noise variance of the acquisition unit's AD converter, and is usually taken as the normalized amplitude. .

[0046] Kalman filter recursive execution process: Prediction phase: , ; Update phase: , , ; After recursive processing, the intermediate smoothed signal is output. At this point, Gaussian white noise has been significantly suppressed, but pulse high-frequency interference may still remain.

[0047] 2. Second-stage wavelet threshold filtering Wavelet threshold filtering is used to suppress pulse interference and high-frequency noise generated by short circuits and switching operations, and is configured as follows: Wavelet basis functions: DB4 wavelet or sym8 wavelet are preferred. DB4 wavelet has good regularity and tight support, and is suitable for locating steep pulses in power frequency signals; sym8 wavelet is approximately symmetrical, which can reduce phase distortion. The two can be selected according to the transformer model and the waveform characteristics on site. Number of decomposition layers: fixed at 5 layers. For sampling rates from 1kHz to 10kHz, the highest scale of the 5-layer decomposition covers the main energy frequency band of the power frequency 50Hz and its odd harmonics (to about 1.6kHz), which can effectively distinguish the main signal from high-frequency interference; Threshold shrinkage: A soft thresholding algorithm is used to process the detail coefficients of each layer. The shrinkage function is: ; in For detail coefficients, The threshold for this layer is `sign()`, where `sign()` is the sign function. These are the detail coefficients output after threshold shrinkage; Threshold selection: The preferred options are the unbiased risk estimation threshold (SURE threshold) or the heuristic threshold. The former is well adapted to stationary noise, while the latter combines the advantages of a fixed threshold and the unbiased risk estimation threshold, and is suitable for scenarios with a large range of signal-to-noise ratio variations.

[0048] After wavelet reconstruction, the final denoised time series signal is obtained. .

[0049] 3. Explanation of the principle that the filtering order cannot be changed. If the two-stage filtering order is reversed, and the original signal is processed by wavelet first, a large amount of noise energy will be mixed into the detail coefficients after wavelet decomposition because the original signal contains large random fluctuations. In order to suppress noise, the detail coefficients will be excessively shrunk during soft thresholding, resulting in the incorrect elimination of the high-frequency components of the useful signal. This manifests as an overly smooth waveform and loss of steep edge information, which in turn prevents the subsequent WGAN-GP completion model from learning the correct waveform abrupt change features. The completion error increases by about 30% to 50% compared to the correct order scheme.

[0050] If only a single-stage Kalman filter is used, it cannot effectively filter out pulse interference. Pulse spikes in the input signal will force the generator to learn the noise distribution rather than the true signal distribution. If only a single-stage wavelet filter is used, it cannot suppress low-frequency temperature drift. Baseline fluctuations in the input signal will cause the mask attention mechanism to deviate in extracting effective features. Therefore, the two-stage serial hybrid filter of this invention is a dedicated denoising scheme adapted to the power frequency timing signal of the current transformer, and the order cannot be changed.

[0051] III. Calculation and Application of Interference Intensity Index This section corresponds to the implementation process of method step S4.

[0052] 1. Physical meaning of interference intensity index Interference intensity index The essence is the relative energy difference rate of the signals before and after filtering, and the calculation formula is: ; This indicator can comprehensively reflect two types of interference: broadband noise interference (Gaussian white noise, quantization noise, etc.) will increase the difference before and after filtering, and increase Inoise; impulse interference (switching operation, lightning induction, etc.) is effectively suppressed by wavelet filtering, which will also significantly increase Inoise.

[0053] When Inoise approaches 0, it indicates that the electromagnetic environment at the site is good and the original signal and the denoised signal are almost identical; when Inoise approaches 1 (it will not actually reach 1, the extremely small constant epsilon avoids the denominator being zero), it indicates that the interference intensity is extremely high and the difference between the signal before and after filtering is huge.

[0054] It should be noted that, because the original signal in the denominator has zero values ​​placed as placeholders for missing points, The actual signal energy represented is at the effective sampling points, not the total energy over the entire time axis. Missing points do not contain true measurement information, and excluding them from the denominator avoids underestimating or overestimating the interference intensity, allowing the index to more accurately reflect the degree of impact of electromagnetic interference on the effective measurement signal.

[0055] 2. The role of interference intensity index in the loss function Traditional WGAN-GP generator loss only includes adversarial loss and lacks data fidelity constraints, which can easily lead to generated results deviating from the trend of the true signal. This invention introduces effective sampling point mean square error loss. The generator loss function is: ; in Calculations are performed only for valid sample points marked in the mask: ; In the formula This represents the total number of valid sampling points.

[0056] Inoise's weighted action mechanism: Under weak interference conditions, the Inoise value is small. With low penalty weights, the generator mainly relies on adversarial loss to learn the data distribution, ensuring the statistical consistency of the completion results; Under strong interference conditions, the Inoise value is large. The increased penalty weight forces the generator to closely match the denoised real waveform at effective sampling points, avoiding model overfitting to noise patterns and improving completion accuracy.

[0057] Balance coefficient Through experimental optimization, the incomplete accuracy is optimal when the value range is 2.0~5.0: if the value is too small, the adjustment effect of Inoise is not obvious; if the value is too large, the mean squared error term dominates the loss function, and the generator will lose its distribution fitting ability during adversarial training. A typical value is... .

[0058] IV. Network Structure and Training of the Improved WGAN-GP Model This section corresponds to the implementation process of method step S5, as per the attached instruction manual. Figure 2 .

[0059] 1. Generator Network Structure The generator receives the denoised timing signal. With the missing mask matrix M as the forward input, the internal structure is as follows: (1) Input embedding layer: The denoised signal and the mask matrix are concatenated along the channel dimension to form a two-channel input tensor with size [N,T,2], where N is the batch size and T is the length of the time window (256~1024 sampling points).

[0060] (2) Masked Attention Layer: In the self-attention calculation, zero-value padding for missing points is weighted. The attention weight matrix is ​​calculated. ,in As a mask bias matrix, a very large negative value (e.g., -1e9) is applied to the attention logit corresponding to the missing points, so that the weights approach zero after softmax, avoiding the interference of zero values ​​at the missing points with effective feature aggregation. Q For querying the matrix, K The key matrix, d The dimension of the key vector.

[0061] (3) Bi-LSTM bidirectional timing encoder: It adopts a two-layer bidirectional LSTM structure with 128~256 hidden units in each layer. The bidirectional structure can encode timing dependencies in both forward and backward directions. At the same time, it can utilize the context information before and after the missing segment to more accurately restore the waveform trend in long-term continuous missing scenarios.

[0062] (4) Decoding and output layer: The features output by Bi-LSTM are mapped back to the single-channel timing signal through a fully connected layer, and the output is a timing completion sequence of the same length as the input. .

[0063] 2. Discriminator Network Structure The discriminator employs a multi-layer one-dimensional convolutional neural network (1D-CNN) with kernel sizes of 5, 5, and 3, and the number of channels increases layer by layer (32→64→128). Finally, it outputs a single discriminant score after global average pooling and fully connected layers to distinguish between generated sequences and real complete sequences.

[0064] 3. Model Training Scheme Training dataset construction: Continuous, unmissing time-series segments of current transformers under normal operating conditions and in a clean electromagnetic environment in substations were collected as "real, complete data"; missing masks were randomly generated according to three missing modes: communication interruption type with 10-200 consecutive missing sampling points, saturation exceeding limit type with 5-50 consecutive missing sampling points, and sampling bad point type with a single point or 2-3 consecutive missing points; the ratio of the three missing modes was approximately 5:3:2, simulating the distribution under actual operating conditions.

[0065] Table 1 Training Hyperparameters

[0066] Training process: The discriminator and generator are updated alternately, with the discriminator updated 5 times after each generator update; the gradient penalty term adopts the standard form of WGAN-GP to apply soft constraints to the gradient norm of the discriminator output to ensure training stability.

[0067] Convergence criterion: When the losses of both the generator and discriminator tend to stabilize (fluctuation amplitude less than 5% for 20 consecutive epochs) and the completion error of the validation set no longer decreases, training is stopped and the model weights are saved.

[0068] V. Specific Implementation Plan for Timing Restructuring and Reliability Grading This section details the implementation of step S6 in the corresponding method.

[0069] 1. Timing signal fusion and reconstruction Model outputs time-completed sequence Then, the following fusion operation is performed to generate a temporary complete timing signal. : Effective points ( ): The original sampled values ​​are completely preserved. Missing points ( ): Replace with the completed value.

[0070] in i This is the sampling point number.

[0071] This strategy ensures that the original valid data is not tampered with by filtering or model inference results, and only fills in the missing parts to avoid error propagation.

[0072] 2. Threshold and grading strategy for determining consecutive missing lengths This invention sets a judgment threshold based on the power frequency characteristics of the power system. The value is taken as the number of sampling points corresponding to a single power frequency cycle (20ms), that is: ; in This refers to the sampling frequency, measured in Hz. For example, at a sampling frequency of 4kHz, One sampling point.

[0073] Basis for setting: The power frequency single cycle is the shortest integration period of the power metering algorithm. If more than one cycle is missing, the effective context that the completion algorithm can refer to is less than half a cycle, and it is impossible to reliably recover the amplitude and phase information of the power frequency signal. If the missing is less than one cycle, the effective data before and after are sufficient to support the model inference, and the completion result has high credibility.

[0074] in The length of the consecutive missing segments.

[0075] Table 2 Hierarchical Output Strategy

[0076] VI. System Deployment and Implementation The completion system of this invention can be embedded in substation monitoring and control devices, merging units, and other equipment. The hardware layer and algorithm processing layer are configured as follows: Hardware layer configuration Acquisition Unit: Employs a 16-bit synchronous sampling ADC chip with a configurable sampling rate of 1kHz~10kHz. It communicates with the processor via an SPI interface and supports access to the secondary measurement circuits of current transformers, voltage transformers, capacitive voltage transformers, and electronic transformers.

[0077] Processor: Employs an ARM Cortex-A series or RISC-V architecture embedded processor with a main frequency of no less than 800MHz, built-in vector extended instruction set to accelerate matrix operations, and supports sliding window real-time signal processing and model inference.

[0078] Memory: Equipped with no less than 2GB of RAM for model inference and no less than 32GB of non-volatile storage for storing historical time series samples, improved WGAN-GP network weights, and missing length determination threshold parameters.

[0079] Real-time performance metrics: For a 512-point time window, the model inference time on a 1GHz processor is less than 10ms; accumulating 512 points of data at a 4kHz sampling rate takes about 128ms. The inference time is much shorter than the data accumulation time, which can meet the real-time processing requirements.

[0080] Algorithm processing layer operation flow The algorithm processing layer includes a data acquisition and mask generation module, a hybrid filtering preprocessing module, an interference intensity assessment module, an adaptive completion module, and a time series reconstruction and hierarchical output module. Each time the data of a time series window is accumulated, a complete S1~S6 processing flow is triggered. The sliding window step size is set to 1 / 4 of the window length, that is, adjacent windows overlap by 75%, to ensure the continuity of window boundary data.

[0081] VII. Implementation Examples of Operating Condition Verification Example 3: This embodiment provides a complete verification of weak electromagnetic interference conditions.

[0082] Test conditions: 220kV substation current transformer, transformation ratio 1200:1; sampling frequency 4kHz; background superimposed with a small amount of Gaussian white noise, signal-to-noise ratio of about 35dB; artificially constructed continuous missing segments of 60 sampling points.

[0083] Comparison of solutions: traditional linear interpolation, conventional WGAN-GP with no interference perception, and the solution of this invention.

[0084] Test results: The calculated Inoise=0.18 indicates a weak interference condition. The model automatically reduces the penalty weight of the mean squared error term to generate the complete sequence primarily to counteract the loss.

[0085] Table 3 Comparison of completion errors (Normalized Root Mean Square Error NRMSE)

[0086] If the length of consecutive missing data points is less than 60 points (less than the threshold of 80 points), the completed data is deemed reliable and can be directly connected to the metering system.

[0087] Example 4: This embodiment provides a complete verification of the strong electromagnetic interference operating condition.

[0088] Test conditions: Same model 220kV current transformer; sampling frequency 4kHz; superimposed large-amplitude switching pulse and broadband high-frequency noise, signal-to-noise ratio of about 18dB; also constructed 60 sampling points of continuous missing segments.

[0089] Test results: The calculated Inoise=0.62 indicates a strong interference condition. The model automatically increases the penalty weight of the mean square error term, forcing the generator to fit the denoised real waveform.

[0090] Table 4 Comparison of Completion Errors

[0091] The results show that the traditional scheme suffers severe performance degradation under strong interference. The present invention relies on the interference adaptive mechanism, and the completion error only increases slightly under strong interference, demonstrating excellent anti-interference robustness.

[0092] Example 5: This embodiment provides verification for hierarchical control of extremely long missing data.

[0093] Test conditions: Same model 220kV current transformer; sampling frequency 4kHz; simulated communication link interruption, constructing a continuous missing segment of 200 sampling points, exceeding the threshold of 80 points.

[0094] Test results: After the system counts the length of consecutive missing data, it determines the state to be low confidence and performs the following actions: Mark the temporary complete signal with a low confidence tag; send an alarm message and missing timestamp to the upper-level monitoring platform; store the completed data in the fault review log only and prohibit access to the metering and settlement database; freeze the data in this period at the metering master station, and re-enter it according to the procedure after verification by the operation and maintenance personnel.

[0095] This grading mechanism can effectively avoid measurement errors caused by inaccurate data completion due to excessive missing data, and complies with the power metering safety management regulations.

[0096] Example 6: The corresponding instrument transformer missing data completion system based on hybrid filtering and generative adversarial networks, which implements the above method, includes a hardware layer and an algorithm processing layer deployed on the hardware layer: The hardware layer includes a data acquisition unit, a processor, and a memory. The data acquisition unit is wired to the secondary measurement circuits of current transformers, voltage transformers, capacitive voltage transformers, and electronic transformers, and is used to acquire the original time-series analog signals of the transformers in the 1kHz~10kHz frequency band. The processor is electrically connected to the data acquisition unit and the memory, and is used to execute the entire process logic of signal preprocessing, model inference, data reconstruction, and reliability determination. The memory is used to store historical time-series data of the transformers, the weights of the trained improved WGAN-GP network, and the missing length determination threshold parameters.

[0097] The algorithm processing layer is deployed inside the processor and includes: The data acquisition and mask generation module is used to perform raw time-series signal acquisition and anomaly detection, identify missing points and generate a missing mask matrix; The hybrid filtering preprocessing module is used to perform a fixed-order Kalman-wavelet two-stage serial filtering process and output a denoised timing signal. The interference strength assessment module is used to perform the calculation of the interference strength index Inoise; An adaptive completion module with a built-in improved WGAN-GP model is used to generate time-series completion sequences by combining interference intensity indices. The temporal reconstruction and hierarchical output module is used to perform temporal data fusion reconstruction, as well as continuous missing length determination and hierarchical output functions.

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

Claims

1. A method for completing missing data in instrument transformers based on hybrid filtering and generative adversarial networks, characterized in that, Includes the following steps: S1. Acquire the raw timing signal output by the current transformer; S2. Perform anomaly detection on the original time series signal, identify all missing points, and generate a binary missing mask matrix; S3. Perform two-stage serial hybrid filtering preprocessing on the original time-series signal. First, smooth the signal by using Kalman filtering, and then perform fine noise reduction by wavelet threshold filtering to obtain the denoised time-series signal. S4. The interference intensity index is calculated based on the original time sequence signal and the denoised time sequence signal. The interference intensity index is used to quantify the strength of real-time electromagnetic interference in the current transformer operation scenario. S5. After concatenating the denoised temporal signal and the missing mask matrix along the channel dimension, input the concatenated signal into the trained improved WGAN-GP model. At the same time, the interference intensity index is used as an adaptive constraint parameter to input the loss function of the model, and the output is a temporal completion sequence of the same length as the input signal. The improved WGAN-GP model has a built-in mask attention mechanism to weaken the interference of missing points on the effective temporal feature extraction. S6. Replace the missing points marked by the missing mask matrix in the original time series signal with the time series completion sequence, completely retain all the original valid sampled data, and generate a temporary complete time series signal; count the length of each consecutive missing segment, determine the credibility of the completion data according to the preset missing length threshold, and output the graded complete time series signal.

2. The method for completing missing data of current transformers based on hybrid filtering and generative adversarial networks according to claim 1, characterized in that, In step S2, the anomaly detection identifies three typical missing conditions: communication interruption, saturation limit violation, and sampling defect. Zero-value placeholder processing is performed on the identified missing points. The zero-value placeholder is only used in the calculation of the interference intensity index and does not participate in the construction of the input features of the improved WGAN-GP model.

3. The method for completing missing data of mutual inductors based on hybrid filtering and generative adversarial networks according to claim 1, characterized in that, In step S3, the Kalman filter is used to filter out Gaussian white noise and small random fluctuations in the transformer measurement link; the wavelet threshold filter uses the db4 wavelet basis or the sym8 wavelet basis, the number of signal decomposition layers is fixed at 5, the soft thresholding algorithm is used to shrink the detail coefficients of each layer, and the threshold is selected as the unbiased risk estimation threshold or the heuristic threshold.

4. The method for completing missing data of mutual inductors based on hybrid filtering and generative adversarial networks according to claim 1, characterized in that, In step S5, the generator of the improved WGAN-GP model adopts a Bi-LSTM bidirectional temporal coding structure to extract temporal dependency features from both forward and backward directions. In the self-attention calculation process, the masked attention mechanism applies a very large negative bias to the attention logit corresponding to the missing point, so that the attention weight of the missing point after normalization approaches zero.

5. The method for completing missing data of current transformers based on hybrid filtering and generative adversarial networks according to claim 1, characterized in that, In step S5, the generator loss function of the improved WGAN-GP model includes an adversarial loss term and a mean squared error loss term. The interference intensity index is applied to the mean squared error loss term as a multiplicative adaptive weight. The higher the electromagnetic interference intensity, the greater the penalty weight of the mean squared error loss term.

6. The method for completing missing data of mutual inductors based on hybrid filtering and generative adversarial networks according to claim 1, characterized in that, In step S6, the preset missing length threshold is positively correlated with the sampling frequency, and its value is the number of sampling points corresponding to a single power frequency cycle; if the length of the continuous missing segment is less than or equal to the preset missing length threshold, the completed data is determined to be reliable, and the final complete time sequence signal that can be connected to the power metering and settlement system is output. If the length of consecutive missing segments exceeds the preset missing length threshold, the reliability of the completed data is deemed insufficient. The temporary complete time-series signal is marked as low confidence and a system alarm is triggered. This set of data is only used for background monitoring and manual fault review.

7. The method for completing missing data of mutual inductors based on hybrid filtering and generative adversarial networks according to claim 1, characterized in that, In step S1, the current transformer includes a current transformer, a voltage transformer, a capacitive voltage transformer, and an electronic current transformer, and the signal sampling frequency range is 1kHz to 10kHz.

8. A data completion system for missing transformer data based on hybrid filtering and generative adversarial networks, used to execute the completion method as described in any one of claims 1 to 7, characterized in that, This includes the hardware layer and the algorithm processing layer deployed on the hardware layer; The hardware layer includes a data acquisition unit, a processor, and a memory. The data acquisition unit is wired to the secondary measurement circuit of the current transformer and is used to acquire the raw time-series signal output by the current transformer. The processor is electrically connected to the data acquisition unit and the memory respectively and is used to execute the entire process logic of signal preprocessing, model inference, data reconstruction, and reliability determination. The memory is used to store the historical time-series data of the current transformer, the weights of the trained improved WGAN-GP network, and the missing length determination threshold parameters. The algorithm processing layer includes: The data acquisition and mask generation module is used to perform raw time-series signal acquisition and anomaly detection, identify missing points and generate a missing mask matrix; The hybrid filtering preprocessing module is used to perform two-stage serial hybrid filtering processing and output a denoised timing signal; The interference intensity assessment module is used to calculate and quantify the interference intensity index of real-time electromagnetic interference. An adaptive completion module with a built-in improved WGAN-GP model is used to generate time-series completion sequences by combining interference intensity indices. The temporal reconstruction and hierarchical output module is used to merge the completed data and the original valid data, and perform confidence-level output based on the length of consecutive missing data.

9. The instrument transformer missing data completion system based on hybrid filtering and generative adversarial networks according to claim 8, characterized in that, The improved WGAN-GP model includes a Bi-LSTM bidirectional coding unit and a masked attention unit. The masked attention unit is used to reduce the feature weights of missing points during feature extraction and weaken the interference of invalid placeholder values.

10. The instrument transformer missing data completion system based on hybrid filtering and generative adversarial networks according to claim 8, characterized in that, The acquisition unit supports a configurable sampling frequency of 1kHz to 10kHz and is compatible with the secondary circuit outputs of current transformers, voltage transformers, capacitive voltage transformers, and electronic transformers. The processor adopts an embedded architecture and supports sliding window real-time signal processing and model inference.