Method and system for detecting harmonic current of mutual inductor

By combining Fast Fourier Transform, Variational Mode Decomposition, and Deep Learning Models, the real-time performance and accuracy issues of harmonic current detection in instrument transformers are solved, enabling fast and accurate harmonic current measurement under complex operating conditions, and supporting power quality management and smart grid management.

CN122063333APending Publication Date: 2026-05-19STATE GRID SHANDONG ELECTRIC POWER CO MARKETING SERVICE CENT (MEASURING CENT)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID SHANDONG ELECTRIC POWER CO MARKETING SERVICE CENT (MEASURING CENT)
Filing Date
2026-02-03
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies for detecting harmonic currents in instrument transformers suffer from insufficient real-time performance, low synchronization accuracy, and weak anti-interference capability under large-scale nonlinear loads, making it difficult to meet the high-frequency harmonic measurement requirements of power systems. Furthermore, traditional methods lack adaptive capability under complex operating conditions.

Method used

By combining Fast Fourier Transform, Variational Mode Decomposition, and Gray-Level Correlation Algorithm with a Deep Learning Model, the features of harmonic current signals are extracted. Local features are captured through single-peak spectral line interpolation and BiLSTM, and error correction is performed to achieve fast and accurate harmonic current detection.

Benefits of technology

It enables rapid and accurate harmonic current measurement under complex operating conditions, meets the real-time monitoring requirements, provides a basis for power quality management and smart grid management, and reduces the impact of noise interference on detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122063333A_ABST
    Figure CN122063333A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of mutual inductor harmonic current detection, and provides a mutual inductor harmonic current detection method and system. The mutual inductor harmonic current detection method comprises the following steps: carrying out fast Fourier transform on a preprocessed mutual inductor current signal, and extracting a harmonic current signal; extracting harmonic current signal local features of a short time scale from the harmonic current signal, and then capturing long-term time dependence of the harmonic current signal local features of the short time scale to obtain harmonic current signal features; variational mode decomposition is carried out on the harmonic current signal characteristics to obtain the amplitude of each harmonic, the proportion of the amplitude of each harmonic to the current amplitude of the rated current of the transformer is calculated, and error correction is carried out on each harmonic in combination with the pre-constructed mathematical relationship among the harmonic number, the current amplitude proportion and a correction coefficient to obtain the harmonic current. The total harmonic distortion rate is calculated according to the harmonic after error correction, harmonic current detection can be rapidly and accurately achieved, and the influence of noise interference on detection precision is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of instrument transformer harmonic current detection technology, and in particular to an instrument transformer harmonic current detection method and system. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] The large-scale connection of nonlinear loads (such as frequency converters and photovoltaic inverters) can lead to a current waveform distortion rate (THD) of 15% to 30%, which seriously threatens the accuracy of relay protection and the life of equipment. Traditional harmonic detection methods face three major bottlenecks: (1) Insufficient real-time performance: The DSP-based FFT algorithm is limited by the serial architecture, and the 256-point harmonic analysis delay exceeds 10ms, which is difficult to meet the requirements of the IEC61000-4-7 standard for dynamic harmonic tracking; (2) Low synchronization accuracy: The spectrum leakage (error > 2%) and picket fence effect caused by non-integer sampling result in significant deviations in the amplitude measurement of high-order harmonics (such as the 31st order and above); (3) Weak anti-interference capability: The accuracy of harmonic phase separation is low under the conditions of voltage flicker, frequency fluctuation (±2Hz) and background noise (SNR < 40dB); The harmonic error characteristics of the transformer are not considered. The cutoff frequency of the current transformer used in the power system is usually around 5kHz, while the harmonic frequency can reach 3kHz in the dual high-frequency system. The higher the frequency, the lower the measurement accuracy and the larger the error of the transformer. The measurement error near the cutoff frequency reaches 30%.

[0004] To address the aforementioned issues, existing technologies employ FPGA combined with FFT for transformer harmonic current detection. While this improves speed (delay <5ms), it lacks adaptability under complex operating conditions. Furthermore, traditional window functions (such as the Hanning window) suffer from sidelobe attenuation, making it difficult to suppress high-frequency noise interference. Additionally, the scheme of using neural networks to extract harmonic features and directly utilizing the mapping between harmonic features and transformer harmonic currents for detection suffers from insufficient inference speed in embedded devices when the neural network model has a large number of parameters, failing to meet real-time monitoring requirements. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a method and system for detecting harmonic current in a current transformer, which can quickly and accurately detect harmonic current and reduce the impact of noise interference on detection accuracy.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: The first aspect of the present invention provides a method for detecting harmonic current in a current transformer.

[0007] In one or more embodiments, a method for detecting harmonic current in a current transformer is provided, comprising: Acquire the current signal from the current transformer and perform preprocessing; Perform a fast Fourier transform on the preprocessed transformer current signal to extract the harmonic current signal; The local features of the harmonic current signal with a short time scale are extracted from the harmonic current signal, and then the long-term time dependence of the local features of the short time scale is captured to obtain the harmonic current signal features. The characteristics of the harmonic current signal are subjected to variational mode decomposition to obtain the amplitude of each harmonic; the number of modes in the variational mode decomposition is determined by solving the pre-constructed variational model by introducing a quadratic penalty factor and a Lagrange operator. Based on the amplitude of each harmonic, the ratio of the amplitude of each harmonic to the rated current amplitude of the transformer is calculated. Then, combined with the pre-established mathematical relationship between the harmonic order, the current amplitude ratio, and the correction coefficient, the error of each harmonic is corrected, and the total harmonic distortion rate is calculated based on the harmonics after error correction.

[0008] As one implementation method, based on the harmonic calibration test data of the current transformer, the error characteristics of the current signal of the current transformer under standard harmonics are obtained, and the mathematical relationship between the harmonic order, the current amplitude ratio and the correction coefficient is constructed by using the gray-scale correlation algorithm.

[0009] As one implementation method, the mathematical relationship between the harmonic order, the current amplitude ratio, and the correction factor is expressed as follows: ; in, This is the ratio of the harmonic amplitude to the rated current amplitude of the transformer; For harmonic order; This is a correction factor; and These represent the correlation degree of current amplitude and the correlation degree of harmonic order, respectively. , , , , , Represents the regression coefficient; This indicates regression bias.

[0010] As one implementation method, the formula for calculating the correlation degree of current amplitude and the correlation degree of harmonic order is: ; ; ; ; ; ; In the formula, and The grey relational degree represents the harmonic order and the grey relational degree represents the current amplitude ratio, respectively. and These represent the harmonic order and the current amplitude proportional deviation factor, respectively. The resolution coefficient is denoted by n; n is the number of harmonic calibration test data samples. , and The normalized current amplitude ratio, harmonic order, and correction coefficient are represented; the subscript k indicates the kth harmonic calibration test data sample; the subscript i indicates the ith harmonic; the subscript min indicates the corresponding minimum value, and the subscript max indicates the corresponding maximum value. As one implementation method, during the extraction of harmonic current signals, the frequency values ​​are corrected by interpolating using a single-peak spectral line interpolation algorithm based on the results of the fast Fourier transform of the preprocessed transformer current signals.

[0011] As one implementation method, after performing variational mode decomposition on the characteristics of the harmonic current signal, several intrinsic mode function components are obtained. The analytical signals and one-sided spectra of the corresponding components are transformed and demodulated to the corresponding estimated center frequency, so that the one-sided spectrum corresponding to each component is converted to the fundamental frequency band.

[0012] As one implementation method, the pre-constructed variational model is : ; In the formula, This represents the k-th eigenmode function component; This represents the center frequency of the k-th eigenmode function component; The original input signal, i.e., the characteristics of the harmonic current signal, is represented by δ(t); the instantaneous pulse function is represented by δ(t). It is a secondary penalty factor; For Lagrange operators.

[0013] A second aspect of the present invention provides a harmonic current detection system for a current transformer.

[0014] In one or more embodiments, a transformer harmonic current detection system includes: The signal preprocessing module is used to acquire and preprocess the current signal of the current transformer. The harmonic current extraction module is used to perform a fast Fourier transform on the preprocessed transformer current signal to extract the harmonic current signal. The feature extraction module is used to extract local features of the harmonic current signal at a short time scale from the harmonic current signal, and then capture the long-term time dependence of the local features of the harmonic current signal at a short time scale to obtain the harmonic current signal features. The variational mode decomposition module is used to perform variational mode decomposition on the characteristics of the harmonic current signal to obtain the amplitude of each harmonic; wherein, the mode number of the variational mode decomposition is determined by introducing a quadratic penalty factor and a Lagrange operator to solve the pre-constructed variational model. The harmonic error correction module is used to calculate the ratio of the amplitude of each harmonic to the rated current amplitude of the transformer based on the amplitude of each harmonic. Then, it combines the pre-built mathematical relationship between the harmonic order, the current amplitude ratio and the correction coefficient to correct the error of each harmonic, and calculate the total harmonic distortion rate based on the harmonics after error correction.

[0015] A third aspect of the present invention provides a computer-readable storage medium.

[0016] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the current transformer harmonic current detection method described above.

[0017] A fourth aspect of the present invention provides an electronic device.

[0018] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the current transformer harmonic current detection method described above.

[0019] Compared with the prior art, the beneficial effects of the present invention are: This invention obtains harmonic current signals by performing Fast Fourier Transform (FFT) on the current signals of current transformers. It acquires harmonic current signal features by extracting local features of the harmonic current signals at short time scales and capturing these features. Then, it performs variational mode decomposition (VMD) on the harmonic current signal features to obtain the amplitude of each harmonic. Combining this with a pre-constructed mathematical relationship between the harmonic order, current amplitude ratio, and correction coefficient, it corrects errors in each harmonic. This avoids the problem of pure hardware detection of harmonic current lacking adaptive capabilities under complex operating conditions. By employing a combination of FFT and feature extraction, it can quickly and accurately measure fault current, meeting real-time monitoring requirements, providing a basis for power quality management, and contributing to the intelligent monitoring and management of the power grid. Attached Figure Description

[0020] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0021] Figure 1 This is a flowchart of the current transformer harmonic current detection method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the current transformer harmonic current detection system according to an embodiment of the present invention; Figure 3 This is a schematic diagram of an electronic device according to an embodiment of the present invention; Figure 4 This is the waveform of signal 1 in an embodiment of the present invention; Figure 5 This is the waveform of signal 2 in this embodiment of the invention; Figure 6 This is the waveform of signal 3 in this embodiment of the invention; Figure 7 This is the measured waveform of the output current of the photovoltaic inverter according to an embodiment of the present invention; Figure 8 These are amplitude tracking curves of different methods in embodiments of the present invention under dynamic harmonics; Figure 9 These are the THD measurement error curves under different SNR values ​​according to embodiments of the present invention. Detailed Implementation

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

[0023] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0024] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0025] The technical problem this invention aims to solve is to provide a method and system for detecting harmonic current in instrument transformers, enabling rapid and accurate measurement of fault current. Harmonic current is a crucial indicator of power quality. Rapid and accurate harmonic current measurement allows for real-time monitoring of harmonic pollution levels, providing a basis for power quality management. Harmonic current increases losses in power equipment and reduces its lifespan. Accurate measurement of harmonic current allows for appropriate filtering measures to reduce the impact of harmonics on equipment and extend its lifespan. Furthermore, with the large-scale integration of new energy sources (such as wind and solar power), their nonlinear characteristics introduce a significant amount of harmonic current. Rapid and accurate harmonic current measurement helps assess the impact of new energy sources on the system, guiding their integration and control. Smart grids require real-time and accurate grid information. Rapid measurement of harmonic current provides crucial data support for smart grids, facilitating intelligent monitoring and management of the grid.

[0026] The cutoff frequency of current transformers used in power systems is typically around 5kHz, while in high-frequency systems, the harmonic frequency can reach 3kHz. The higher the frequency, the lower the measurement accuracy and the larger the error of the transformer. The measurement error near the cutoff frequency can reach 30%. Therefore, when using common current transformers for harmonic detection, harmonic current error correction must first be performed.

[0027] Figure 1 A schematic diagram of the harmonic current detection method for current transformers according to an embodiment of the present invention is provided. Figure 1 The transformer harmonic current detection method of this embodiment may include the following steps S101 to S105.

[0028] The specific implementation process of steps S101 to S105 is as follows: Step S101: Obtain the current signal of the current transformer and perform preprocessing.

[0029] For example, the XADC (Xilinx Analog-to-Digital Converter) is used to acquire the three-phase current signal of the current transformer at a sampling rate of ≥10kHz.

[0030] The Hann window is applied to reduce spectral leakage, and a second-order Butterworth filter with a cutoff frequency of 100 Hz is used for initial filtering.

[0031] Step S102: Perform a fast Fourier transform on the preprocessed transformer current signal to extract the harmonic current signal.

[0032] In power systems, the fundamental frequency is usually assumed to be the power frequency (e.g., 50Hz or 60Hz), but in practice, there may be slight deviations (e.g., ±2Hz) due to grid fluctuations. The Fourier transform (FT) definition in Equation 1 applies to continuous signals... Frequency domain analysis theoretically covers all possible frequency components (including fundamental and harmonic frequencies), therefore the initial frequency... It is a frequency domain variable and does not require a preset value. In dynamic harmonic scenarios (such as the fundamental frequency fluctuation of ±1Hz in signal 2), the actual frequency needs to be determined through the following steps: S301: Implements a 256-point Fast Fourier Transform on an FPGA for continuous signals in a single time dimension. The definition of the FFT transform is (1): (1) In the above formula, and These represent the frequency and time of the initial signal, respectively.

[0033] Based on this, one-dimensional discrete sampling signal The definition of the FFT transform is (2): (2) In the above formula, and These represent the window function and time shift factor of the FFT, respectively. The window function type used in this invention is the Hann window. This represents the FFT transformation result of the sampled signal.

[0034] In the process of extracting harmonic current signals, the frequency values ​​are corrected by interpolating based on the results of the fast Fourier transform of the preprocessed transformer current signals using a single-peak spectral line interpolation algorithm.

[0035] The single-peak spectral line interpolation algorithm is used, and the relevant formulas are shown in equations (3)-(5). It is mainly used to correct sampling errors and facilitate subsequent processing. The frequency value is corrected by interpolation based on the FFT result to eliminate non-integer period sampling errors. For example, if the FFT detects that the maximum spectral line near the fundamental frequency corresponds to 49.8Hz, the interpolation algorithm can further correct it to the actual frequency of 50.02Hz.

[0036] (3) (4) (5) In the above formula, It is a point The amplitude of the spectral line, It is the sampling frequency. N It is the FFT length. This indicates the frequency index (i.e., peak position) corresponding to the largest amplitude value in the FFT spectrum. Indicates peak spectral line The offset is used to correct the actual frequency position. This represents the frequency estimation function. A k Indicates the actual frequency; This indicates the corrected actual angle, eliminating the effects of spectral leakage. Indicates setting the order; This represents the phase angle estimation function.

[0037] Step S103: Extract local features of the harmonic current signal with a short time scale from the harmonic current signal, and then capture the long-term time dependence of the local features of the harmonic current signal with a short time scale to obtain the harmonic current signal features.

[0038] For the harmonic current signal decomposed by FFT, CNN is used to extract the local features of the harmonic current signal at a short time scale. The relevant CNN model is shown in Equation (6): (6) In the above formula, Input data for the current harmonic signal after transformation by the single-peak spectral line interpolation algorithm; The result of identifying the harmonics of the output current; The computation for convolutional layers specifically includes convolution operations and nonlinear activations; To utilize the pooling layer computation using the downsampling function; Calculations are performed for fully connected layers; This is the recognition result calculated by the Softmax function.

[0039] BiLSTM (Bidirectional Long Short-Term Memory) is used to capture the local features of harmonic current signals with long-term time dependence and short-term time scale. The relevant models are shown in equations (7)-(11).

[0040] (7) (8) (9) (10) (11) In the above formula, W represents the weight matrix. In the BiLSTM neural network model, each gate shares weights, and different gates correspond to different values ​​in the weight matrix. Specifically, W... f W is the weight matrix of the forget gate. i W is the weight matrix of the input gate. c W is the weight matrix of the unit states. oThis is the weight matrix of the output gate. tanh is the activation function. h and c are the input data. It is the forgetting gate scaling factor that controls the amount of forgotten information; it is the input gate scaling factor that controls the amount of information input. t It is the update status information of the cell state; O t It is the output gate scaling factor that controls the amount of output information. This represents the Sigmoid activation function. This indicates the hidden state of the previous time step; This represents the input data at the current time step. This represents the bias term for the forget gate. The output of the input gate indicates how much new information needs to be updated to the cell state. This represents the bias term of the input gate. b0 represents the bias term for cell state updates; b0 represents the bias term for the output gate. t It represents the hidden state at the current time step, which is determined by both the output gate and the cell state; This represents the element-wise dot product operation.

[0041] It should be noted that, in addition to using CNN models, other deep learning models can also be used to extract local features of harmonic current signals with short time scales from harmonic current signals; in addition to BiLSTM neural network models, other deep learning models can also be used to capture the long-term time dependence of local features of harmonic current signals with short time scales; these will not be elaborated here.

[0042] Step S104: Perform variational mode decomposition on the characteristics of the harmonic current signal to obtain the amplitude of each harmonic; wherein, the number of modes in the variational mode decomposition is determined by introducing a quadratic penalty factor and a Lagrange operator to solve the pre-constructed variational model.

[0043] After performing variational mode decomposition on the characteristics of the harmonic current signal, several intrinsic mode function components are obtained. The analytic signals and one-sided spectra of the corresponding components are transformed and demodulated to the corresponding estimated center frequency, so that the one-sided spectrum corresponding to each component is converted to the fundamental frequency band.

[0044] The analytic signal and one-sided spectrum of each IMF (Intrinsic Mode Function) component obtained by Hilbert transform are as follows: This represents the time-domain expression of the k-th intrinsic mode component: (12) The Hilbert transform processes the intrinsic mode function (IMF) components after VMD decomposition, i.e. The Hilbert transform yields the analytic signal for each IMF component, which can be used to calculate the instantaneous frequency and amplitude.

[0045] use Each IMF component is demodulated to its corresponding estimated center frequency, thus converting the single-sided spectrum corresponding to each IMF component to the fundamental frequency band. Here, δ(t) represents the instantaneous impulse function. (13) The defined variational model is constructed as follows: (14) The variational model constructed in equation (14) is solved by introducing a quadratic penalty factor α and a Lagrange operator λ. The introduction of the penalty factor α improves the robustness of non-stationary signals in the variational mode decomposition process, while the Lagrange multiplier ensures the stiffness of the model constraints. The augmented Lagrange function is the theoretical basis of variational mode decomposition, and its expression is as follows: The pre-constructed variational model is... : (15) In the formula, This represents the k-th eigenmode function component; This represents the center frequency of the k-th eigenmode function component; The original input signal, i.e., the characteristics of the harmonic current signal, is represented by δ(t); the instantaneous pulse function is represented by δ(t). It is a secondary penalty factor; For Lagrange operators.

[0046] The VMD (Variational Mode Decomposition) algorithm optimized by IGWO (Improved Grey Wolf Optimizer) adaptively determines the total number of modes K and the penalty factor α.

[0047] Step S105: Based on the amplitude of each harmonic, calculate the ratio of the amplitude of each harmonic to the rated current amplitude of the transformer. Then, combine the pre-constructed mathematical relationship between the harmonic order, the current amplitude ratio, and the correction coefficient to correct the error of each harmonic. Finally, calculate the total harmonic distortion rate based on the harmonics after error correction.

[0048] Based on the harmonic calibration test data of the current transformer, the error characteristics of the current signal of the current transformer under standard harmonics are obtained, and the mathematical relationship between the harmonic order, the current amplitude ratio and the correction coefficient is constructed by using the gray-scale correlation algorithm.

[0049] As one implementation method, the mathematical relationship between the harmonic order, the current amplitude ratio, and the correction factor is expressed as follows: ; Where p is the ratio of the harmonic amplitude to the rated current amplitude of the transformer; q is the harmonic order; and γ(p,q) is the correction factor. and These represent the correlation degree of current amplitude and the correlation degree of harmonic order, respectively. , , , , , Represents the regression coefficient; This indicates regression bias.

[0050] As one implementation method, the formula for calculating the correlation degree of current amplitude and the correlation degree of harmonic order is:

[0051]

[0052]

[0053]

[0054]

[0055]

[0056] In the formula, and The grey relational degree represents the harmonic order and the grey relational degree represents the current amplitude ratio, respectively. and These represent the harmonic order and the current amplitude proportional deviation factor, respectively. The resolution coefficient is denoted by n; n is the number of harmonic calibration test data samples. , and The normalized current amplitude ratio, harmonic order, and correction coefficient are represented; the subscript k indicates the k-th harmonic calibration test data sample; the subscript i indicates the i-th harmonic; the subscript min indicates the corresponding minimum value, and the subscript max indicates the corresponding maximum value; where p∈[0.01,1], q∈[1,60], γ∈[γ min , γ max ].

[0057] Generated using a standard current source q Harmonic current signals of the order, qChoose values ​​1, 2, 4, 8, 10, 20, 30, 40, 50, 60; source amplitude I s Take p times I0, where I0 is the rated current of the current transformer, and p is 0.01, 0.1, 0.2, or 1. By obtaining the ratio of the measured current amplitude to the actual current source value under different harmonic orders and amplitudes, a dataset of transformer measurement error correction coefficients under that harmonic input is obtained. γ ( p , q ).

[0058] Suppose the measured q T The current amplitude of the subharmonic is I qT Calculate the current amplitude I qT With rated current I The ratio of 0 to 0 is obtained p T ; obtain the correction coefficient γ T , and the measured current amplitude I qT Multiplying them together yields the corrected amplitude; the harmonic characteristic correction in this invention only considers amplitude correction, which is superior to the limitations of existing technologies.

[0059] The total harmonic distortion (THD) is calculated using the current amplitude of each harmonic and then transmitted to the host system via AXIDMA (an AXI bus-based DMA controller that leverages the efficient data transfer capabilities of the AXI bus to enable fast data transfer between peripherals and memory, reducing the CPU load and improving overall system performance).

[0060] To verify the effectiveness of this method, the following complex harmonic test signals were designed, covering steady-state harmonics, dynamic harmonics, and noise interference: like Figure 4 Signal 1 (steady-state harmonics) shown: fundamental frequency is 50Hz, amplitude is 10A, containing 5th (amplitude 2A), 7th (1.5A), 11th (1A), and 13th (0.8A) harmonics, superimposed with Gaussian white noise (SNR=45dB).

[0061] like Figure 5 Signal 2 shown (dynamic harmonics): The fundamental frequency fluctuates between 49.5 Hz and 50.5 Hz (±1 Hz), and the harmonic amplitude changes over time: the amplitude of the 5th harmonic increases linearly from 1A to 3A, the amplitude of the 7th harmonic fluctuates periodically (1A±0.2A), and there is superimposed interharmonic (75 Hz, amplitude 0.5A) and impulse noise (SNR=35dB).

[0062] like Figure 6 Signal 3 (higher harmonics and noise) shown: contains higher harmonics such as the 31st (amplitude 0.5A) and the 37th (0.3A), and the background noise is power frequency flicker (frequency fluctuation ±2Hz) and non-stationary noise (SNR=30dB).

[0063] Simulation environment: Test signals are generated using MATLAB / Simulink, real-time processing is achieved using an FPGA hardware platform (Xilinx Zynq-7020), and the deep learning model is trained in PyTorch and then deployed to the embedded system.

[0064] First, we compare the accuracy of harmonic detection by comparing our method with traditional DSP-FFT, FPGA-FFT+window function method, and pure CNN-BiLSTM method. The results are shown in Table 1 below: Table 1 Comparison of Indicators for Different Methods method Harmonic number Amplitude error (%) Frequency error (Hz) THD error (%) Delay (ms) Traditional DSP-FFT 5 times 2.8 0.15 1.5 12.3 FPGA-FFT+Hanning Window 5 times 1.2 0.08 0.9 4.7 Pure CNN-BiLSTM 5 times 3.5 0.20 2.1 18.5 The method proposed in this invention 5 times 0.4 0.02 0.3 3.2 Observing Table 1, it can be seen that the traditional method has an amplitude error of 5.2% for the 31st harmonic, while the proposed method, through IGWO-VMD optimization of mode decomposition, reduces the error to 1.1%. In the dynamic harmonic tracking signal 2, the traditional FFT results in a frequency error of 0.12Hz due to non-integer period sampling, while the proposed method compresses the error to 0.03Hz through a single-peak spectral line interpolation algorithm. At SNR=30dB, the proposed method has a THD error of 0.8%, which is significantly better than the 2.5% of FPGA-FFT+Hanning window.

[0065] To analyze the optimization effect of mode decomposition, Table 2 compares the decomposition effect of VMD with fixed parameters (K=5, α=2000) with that of VMD optimized by IGWO.

[0066] Table 2 Comparison of Modal Decomposition Optimization Effects of Different Methods index Fixed Parameter VMD IGWO-VMD Modal number K 5 (Preset) 7 (Adaptive) Center frequency deviation (Hz) 1.8 0.3 Reconstruction signal RMSE 0.15 0.04 Observation of Table 2 reveals that the IGWO algorithm exhibits good adaptability and noise suppression capabilities. The IGWO algorithm dynamically adjusts K and α through a gray wolf optimization strategy, avoiding over- or under-decomposition problems. In signal 3, IGWO-VMD improves the correlation coefficient between the higher harmonics (31st) and noise separation to 0.92 (with VMD fixed at 0.75).

[0067] This invention improves real-time detection while reducing hardware computing resource consumption. Table 3 compares resource consumption and latency on the FPGA platform.

[0068] Table 3. Comparison of resource consumption and latency on the FPGA platform. Module Logic unit ( LUT ) Delay ( ms ) FFT acceleration module 12,345 1.2 CNN-BiLSTM Inference 8,210 1.5 IGWO-VMD optimization 5,678 0.5 total 26,233 3.2 In terms of hardware platform implementation, the traditional DSP solution has a latency of 12.3ms, and the FPGA+FFT solution has a latency of 4.7ms. This method further reduces the latency to 3.2ms through pipeline optimization, meeting the IEC 61000-4-7 standard (latency ≤5ms). The resource consumption is only 68% of that of a similar FPGA solution, demonstrating the high efficiency of hardware co-design.

[0069] To further verify the effectiveness and feasibility of the proposed method under complex waveform environments, a TMR current transformer (0.2 accuracy), an oscilloscope (100MHz bandwidth), and an FPGA development board were used. The measured waveform is the output current of the photovoltaic inverter (including 5th, 7th, and 11th harmonics and random pulse interference), as shown below. Figure 7 As shown in Table 4 below, the test results are as follows.

[0070] Table 4. Validation under complex environments Harmonic number Nominal amplitude (A) Measured amplitude (A) Relative error (%) 5 times 2.0 1.98 1.0 7 times 1.5 1.47 2.0 11 times 1.0 0.99 1.0 THD 15.2% 14.9% 0.3% The measured data are consistent with the simulation results, verifying the applicability of this method in industrial scenarios.

[0071] Figure 8 The amplitude tracking curves of different methods under dynamic harmonics are further demonstrated. Figure 8 The tracking effect of the 5th harmonic amplitude in the dynamic harmonic (signal 2) increases linearly with time is shown. The traditional DSP-FFT method has a fixed sampling window and does not compensate for non-integer period error, so the amplitude measurement value is always lower than the actual value (maximum error of 6%). The FPGA-FFT+Hanning window method shortens the calculation delay through hardware acceleration, but due to insufficient suppression of spectrum leakage, there is still an amplitude deviation of 2%~3% under dynamic frequency fluctuation. The pure CNN-BiLSTM method has a high model inference delay (18.5ms), which leads to tracking lag, and the amplitude error increases significantly with the increase of the signal change rate (peak error of 11%). In comparison, the advantages of this method are more obvious. (1) Single peak spectral line interpolation compensation: The interpolation algorithm of formula (3)-(5) is introduced into the FPGA-FFT module to dynamically correct the picket fence effect caused by non-integer period sampling, improve the frequency resolution to 0.01Hz, and compress the amplitude error to less than 1%. (2) CNN-BiLSTM time series prediction: The hybrid model extracts local harmonic features (such as abrupt change points) through CNN, and captures the amplitude change trend through BiLSTM to achieve advanced prediction (such as the predicted value of 1.79A at 0.8s is close to the actual value of 1.8A). (3) Hardware co-optimization: This invention can use FPGA pipeline processing and lightweight deployment of deep learning models (reducing the number of parameters by 30%), with a total latency of only 3.2ms, avoiding the lag problem of traditional software solutions.

[0072] Table 5 analyzes and compares the mode decomposition spectra of IGWO-VMD and fixed VMD.

[0073] Table 5 Modal decomposition spectra of IGWO-VMD and fixed VMD Frequency component (Hz) Actual amplitude (A) Fixed VMD (K=5) amplitude (A) IGWO-VMD (K=7) Amplitude (A) Center frequency deviation (Hz) 50 10.0 9.8 9.95 Fixed VMD: 0.2 / IGWO-VMD: 0.05 250 (5th harmonic) 2.0 1.85 1.98 Fixed VMD: 0.3 / IGWO-VMD: 0.02 350 (7th harmonic) 1.5 1.35 1.47 Fixed VMD: 0.4 / IGWO-VMD: 0.03 550 (11th harmonic) 1.0 0.90 0.97 Fixed VMD: 0.5 / IGWO-VMD: 0.03 1550 (31st harmonic) 0.5 0.42 (not completely separated) 0.49 Fixed VMD: 1.8 / IGWO-VMD: 0.1 Table 5 compares the decomposition effects of IGWO-VMD and fixed-parameter VMD on signal 3 (containing the 31st harmonic). Due to insufficient mode number, the 31st harmonic (1550Hz) could not be independently separated and was mixed with noise (amplitude measurement error 16%). IGWO-VMD dynamically adjusted the parameters through the Grey Wolf optimization algorithm (finally K=7, α=1800) to achieve the following improvements: (1) Mode number adaptation: The K value is automatically expanded according to the signal complexity to ensure that the higher harmonics (such as the 31st and 37th) are completely separated from the fundamental frequency and noise. (2) Penalty factor optimization: The augmented Lagrange model of Equation (15) is used to balance the modal bandwidth and reconstruction error, so that the center frequency deviation is reduced from 1.8Hz in the fixed VMD to 0.1Hz. (3) Noise suppression: In the 1550Hz band, the correlation coefficient between the IMF component separated by IGWO-VMD and the noise increased from 0.75 to 0.92, significantly improving the signal-to-noise ratio.

[0074] Figure 9 THD measurement error curves under different SNRs are presented. Traditional DSP-FFT achieves an error of 2.5% at SNR=30dB, mainly due to insufficient sidelobe attenuation of the window function (Hanning window sidelobe -31dB), resulting in severe high-frequency noise interference. FPGA-FFT+Hanning window reduces the error to 1.8% by increasing the sampling rate (≥10kHz) and hardware filtering (Butterworth filter), but still cannot solve the influence of non-stationary noise (such as impulse interference). This method employs a hybrid filtering strategy for noise immunity. In the preprocessing stage, a second-order Butterworth filter (cutoff frequency 100Hz) is used to suppress power frequency noise, and the CNN-BiLSTM model further extracts harmonic features from the noise. At low SNR (20dB), the IGWO algorithm dynamically optimizes the α value through the fitness function, enhancing the robustness of variational mode decomposition to noise, reducing THD error by 55% compared to fixed VMD. High-speed data transmission channels reduce intermediate buffer interference, ensuring data integrity in noisy environments (measured THD error fluctuation range ±0.1%).

[0075] Verification using multiple sets of simulation and experimental data shows that the method of this invention significantly outperforms existing technologies in terms of harmonic detection accuracy, real-time performance, and anti-interference capability. It is particularly outstanding under complex operating conditions (such as high-order harmonics, frequency fluctuations, and strong noise), providing reliable technical support for harmonic mitigation in smart grids. Subsequent work will involve long-term stability testing in actual power systems.

[0076] This invention obtains harmonic current signals by performing Fast Fourier Transform (FFT) on the current signals of current transformers. It acquires harmonic current signal features by extracting local features of the harmonic current signals at short time scales and capturing these features. Then, it performs variational mode decomposition (VMD) on the harmonic current signal features to obtain the amplitude of each harmonic. Combining this with a pre-constructed mathematical relationship between the harmonic order, current amplitude ratio, and correction coefficient, it corrects errors in each harmonic. This avoids the problem of pure hardware detection of harmonic current lacking adaptive capabilities under complex operating conditions. By employing a combination of FFT and feature extraction, it can quickly and accurately measure fault current, meeting real-time monitoring requirements, providing a basis for power quality management, and contributing to the intelligent monitoring and management of the power grid.

[0077] like Figure 2 As shown, the transformer harmonic current detection system provided in this embodiment of the invention can be implemented in software. The transformer harmonic current detection system includes the following software modules: signal preprocessing module 201, harmonic current extraction module 202, feature extraction module 203, variational mode decomposition module 204, and harmonic error correction module 205.

[0078] The functions of each software module in the current transformer harmonic current detection system are described below: Signal preprocessing module 201 is used to acquire the current signal of the current transformer and perform preprocessing. The harmonic current extraction module 202 is used to perform a fast Fourier transform on the preprocessed transformer current signal to extract the harmonic current signal. The feature extraction module 203 is used to extract local features of the harmonic current signal with a short time scale from the harmonic current signal, and then capture the long-term time dependence of the local features of the harmonic current signal with a short time scale to obtain the harmonic current signal features. Variational mode decomposition module 204 is used to perform variational mode decomposition on the characteristics of harmonic current signal to obtain the amplitude of each harmonic; wherein, the number of modes of variational mode decomposition is determined by introducing a quadratic penalty factor and a Lagrange operator to solve a pre-constructed variational model. The harmonic error correction module 205 is used to calculate the ratio of the amplitude of each harmonic to the rated current amplitude of the transformer based on the amplitude of each harmonic. Then, it combines the pre-constructed mathematical relationship between the harmonic order, the current amplitude ratio and the correction coefficient to correct the error of each harmonic, and calculate the total harmonic distortion rate based on the harmonics after error correction.

[0079] It should be noted that each module in the current transformer harmonic current detection system of this embodiment corresponds one-to-one with each step in the current transformer harmonic current detection method in the above embodiment, and their specific implementation process is the same, so it will not be repeated here.

[0080] The structure of the electronic device according to an embodiment of the present invention will be described in detail below. Figure 3 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of the present invention. It can be understood that... Figure 3 The diagram shows only an exemplary structure of the electronic device, not the entire structure. Some or all of the structures shown may be implemented as needed.

[0081] The electronic device provided in this embodiment of the invention includes: at least one processor 301, a memory 302, a user interface 303, and at least one network interface 304. The various components in the current transformer harmonic current detection system are coupled together via a bus system 305. It can be understood that the bus system 305 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 305 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 3 The general designated all buses as Bus System 305.

[0082] The user interface 303 may include a monitor, keyboard, mouse, trackball, click wheel, buttons, touchpad, or touch screen.

[0083] It is understood that memory 302 can be volatile memory or non-volatile memory, or both. In this embodiment of the invention, memory 302 is capable of storing data to support the operation of the terminal. Examples of this data include any computer programs used to operate on the terminal, such as operating systems and applications. The operating system includes various system programs, such as framework layers, core library layers, driver layers, etc., used to implement various basic services and handle hardware-based tasks. Applications can include various applications.

[0084] In some embodiments, the transformer harmonic current detection system provided in this invention can be implemented using a combination of hardware and software. For example, the transformer harmonic current detection system provided in this invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the transformer harmonic current detection method provided in this invention. For instance, the hardware decoding processor can employ one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0085] As an example, processor 301 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0086] As an example of the hardware implementation of the transformer harmonic current detection system provided in this embodiment of the invention, the device provided in this embodiment of the invention can be directly executed by a processor 301 in the form of a hardware decoding processor. For example, it can be executed by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components to implement the transformer harmonic current detection method provided in this embodiment of the invention.

[0087] The memory 302 in this embodiment of the invention is used to store various types of data to support the operation of the transformer harmonic current detection system, or to store data for execution. Figure 1The program code for the method shown. Examples of this data include: any executable instructions for operation on a current transformer harmonic current detection system, such as executable instructions that can be included in the executable instructions to implement the current transformer harmonic current detection method of the embodiments of the present invention.

[0088] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including functions for executing... Figure 1 The program code for the method shown. In such an embodiment, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by the central processing unit, it performs the various functions defined in the apparatus of this application.

[0089] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0090] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for detecting harmonic current in a current transformer, characterized in that, include: Acquire the current signal from the current transformer and perform preprocessing; Perform a fast Fourier transform on the preprocessed transformer current signal to extract the harmonic current signal; The local features of the harmonic current signal with a short time scale are extracted from the harmonic current signal, and then the long-term time dependence of the local features of the short time scale is captured to obtain the harmonic current signal features. The characteristics of the harmonic current signal are subjected to variational mode decomposition to obtain the amplitude of each harmonic; the number of modes in the variational mode decomposition is determined by solving the pre-constructed variational model by introducing a quadratic penalty factor and a Lagrange operator. Based on the amplitude of each harmonic, the ratio of the amplitude of each harmonic to the rated current amplitude of the transformer is calculated. Then, combined with the pre-established mathematical relationship between the harmonic order, the current amplitude ratio, and the correction coefficient, the error of each harmonic is corrected, and the total harmonic distortion rate is calculated based on the harmonics after error correction.

2. The method for detecting harmonic current in a current transformer as described in claim 1, characterized in that, Based on the harmonic calibration test data of the current transformer, the error characteristics of the current signal of the current transformer under standard harmonics are obtained, and the mathematical relationship between the harmonic order, the current amplitude ratio and the correction coefficient is constructed by using the gray-scale correlation algorithm.

3. The method for detecting harmonic current in a current transformer as described in claim 1 or 2, characterized in that, The mathematical relationship between the harmonic order, the current amplitude ratio, and the correction factor is expressed as follows: ; in, This is the ratio of the harmonic amplitude to the rated current amplitude of the transformer; For harmonic order; This is a correction factor; and These represent the correlation degree of current amplitude and the correlation degree of harmonic order, respectively. , , , , , Represents the regression coefficient; This indicates regression bias.

4. The method for detecting harmonic current in a current transformer as described in claim 3, characterized in that, The formulas for calculating the correlation between current amplitude and harmonic order are as follows: ; ; ; ; ; ; In the formula, and The grey relational degree represents the harmonic order and the grey relational degree represents the current amplitude ratio, respectively. and These represent the harmonic order and the current amplitude proportional deviation factor, respectively. The resolution coefficient is denoted by n; n is the number of harmonic calibration test data samples. , and The normalized current amplitude ratio, harmonic order, and correction coefficient are represented; the subscript k indicates the k-th harmonic calibration test data sample; the subscript i indicates the i-th harmonic; the subscript min indicates the corresponding minimum value, and the subscript max indicates the corresponding maximum value.

5. The method for detecting harmonic current in a current transformer as described in claim 1, characterized in that, In the process of extracting harmonic current signals, the frequency values ​​are corrected by interpolating based on the results of the fast Fourier transform of the preprocessed transformer current signals using a single-peak spectral line interpolation algorithm.

6. The method for detecting harmonic current in a current transformer as described in claim 1, characterized in that, After performing variational mode decomposition on the characteristics of the harmonic current signal, several intrinsic mode function components are obtained. The analytic signals and one-sided spectra of the corresponding components are transformed and demodulated to the corresponding estimated center frequency, so that the one-sided spectrum corresponding to each component is converted to the fundamental frequency band.

7. The method for detecting harmonic current in a current transformer as described in claim 1, characterized in that, The pre-constructed variational model is : ; In the formula, This represents the k-th eigenmode function component; This represents the center frequency of the k-th eigenmode function component; The original input signal, i.e., the characteristics of the harmonic current signal, is represented by δ(t); the instantaneous pulse function is represented by δ(t). It is a secondary penalty factor; For Lagrange operators.

8. A harmonic current detection system for a current transformer, characterized in that, The transformer harmonic current detection method based on any one of claims 1-7 includes: The signal preprocessing module is used to acquire and preprocess the current signal of the current transformer. The harmonic current extraction module is used to perform a fast Fourier transform on the preprocessed transformer current signal to extract the harmonic current signal. The feature extraction module is used to extract local features of the harmonic current signal at a short time scale from the harmonic current signal, and then capture the long-term time dependence of the local features of the harmonic current signal at a short time scale to obtain the harmonic current signal features. The variational mode decomposition module is used to perform variational mode decomposition on the characteristics of the harmonic current signal to obtain the amplitude of each harmonic; wherein, the mode number of the variational mode decomposition is determined by introducing a quadratic penalty factor and a Lagrange operator to solve the pre-constructed variational model. The harmonic error correction module is used to calculate the ratio of the amplitude of each harmonic to the rated current amplitude of the transformer based on the amplitude of each harmonic. Then, it combines the pre-built mathematical relationship between the harmonic order, the current amplitude ratio and the correction coefficient to correct the error of each harmonic, and calculate the total harmonic distortion rate based on the harmonics after error correction.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the transformer harmonic current detection method as described in any one of claims 1-7.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the transformer harmonic current detection method as described in any one of claims 1-7.