An intelligent zero sequence current transformer and a leakage current detection and fault diagnosis method thereof
This invention, employing a multi-scale time-frequency attention fusion network with a toroidal magnetic core, leakage current detection circuit, and multi-scale time-frequency network, presents an intelligent zero-sequence current transformer and its leakage current detection and fault diagnosis method. This addresses the shortcomings of traditional methods in existing technologies, integrating high-sensitivity detection and fault recording functions. It achieves intelligent fault recording for milliampere-level weak leakage currents, specifically involving an intelligent zero-sequence current transformer and its leakage current detection and fault diagnosis method. This method overcomes the deficiencies of traditional methods and fulfills the comprehensive requirements of high sensitivity, strong anti-interference, intelligent diagnosis, and fault recording.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 国网内蒙古东部电力有限公司呼伦贝尔供电公司
- Filing Date
- 2026-06-02
- Publication Date
- 2026-06-30
AI Technical Summary
Existing zero-sequence current transformers in low-voltage power distribution systems suffer from insufficient sensitivity, poor anti-interference capability, limited functionality, lack of intelligent analysis capabilities and fault recording functions, making it difficult to meet the comprehensive requirements of smart grids for high sensitivity, strong anti-interference, intelligent diagnosis and fault recording.
Employing a toroidal magnetic core, a high-sensitivity leakage current detection circuit, and a microprocessor chip, combined with a three-stage cascaded adaptive filter and a multi-scale time-frequency attention fusion network, it achieves high-sensitivity detection and intelligent fault diagnosis, and integrates fault recording functionality.
It enables accurate identification of milliampere-level weak leakage currents, can automatically identify multiple fault types, provide complete waveform data, improve the sensitivity and diagnostic accuracy of ground fault detection, and ensure the safe operation of the power system.
Smart Images

Figure CN122307175A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of current transformer technology, specifically to an intelligent zero-sequence current transformer and its leakage current detection and fault diagnosis method. Background Technology
[0002] In low-voltage power distribution systems, ground faults are a common type of fault, potentially causing electric shock and electrical fires. Zero-sequence current transformers are core devices for detecting ground faults and monitoring leakage current. However, existing zero-sequence current transformers have the following technical shortcomings in practical applications: 1. Insufficient sensitivity: Traditional current transformers use silicon steel sheet cores with low initial permeability, resulting in weak response to milliampere-level leakage currents and making early warning difficult. Sampling circuits often employ simple resistor voltage dividers, lacking low-noise amplification design, causing weak signals to be submerged in system noise.
[0003] 2. Poor anti-interference capability: Power systems contain various interference components such as the fundamental frequency, integer harmonics, and interharmonics. Traditional fixed-parameter filters cannot dynamically adapt to frequency fluctuations and harmonic changes, making it difficult to effectively separate the actual leakage current signal. Especially in the context of a large number of nonlinear loads connected, harmonic pollution is severe, rendering traditional methods ineffective.
[0004] 3. Limited functionality: Existing products can only provide a fixed-value alarm, that is, an alarm signal is issued when the leakage current exceeds a preset threshold. They cannot distinguish between different fault types such as insulation aging, metallic grounding, and arc grounding. Maintenance personnel only know that there is a fault but not "what kind of fault" and it is difficult to take targeted measures.
[0005] 4. Lack of intelligent analysis capabilities: Traditional equipment lacks waveform analysis and fault diagnosis functions, and cannot provide data support for fault cause analysis. Even some high-end products with simple spectrum analysis are limited to fundamental and harmonic amplitude measurement, and have limited ability to identify complex fault modes.
[0006] 5. Scarcity of labeled samples: The field of power fault diagnosis faces a typical problem of scarce labeled samples. The actual probability of fault occurrence is low, and the cost of collecting a large amount of labeled data is high, which limits the application of advanced methods such as deep learning.
[0007] 6. Fault waveform cannot be recorded: Traditional equipment lacks fault waveform recording function, and cannot provide original waveform data after alarm, so there is no basis for accident analysis and protection setting verification.
[0008] In summary, existing technologies are insufficient to meet the comprehensive requirements of smart grids for high sensitivity, strong anti-interference capabilities, intelligent diagnosis, and fault recording.
[0009] To address the aforementioned issues, there is an urgent need for an intelligent zero-sequence current transformer and its leakage current detection and fault diagnosis method to solve the problems existing in traditional methods. Summary of the Invention
[0010] The purpose of this invention is to provide an intelligent zero-sequence current transformer and its leakage current detection and fault diagnosis method. Through high-sensitivity detection and three-level cascaded adaptive filtering, it accurately extracts weak leakage current; it adopts a multi-scale time-frequency attention fusion network to intelligently identify various fault types and achieve early warning; it integrates fault recording function to provide complete waveform data for accident analysis, significantly improving the sensitivity and accuracy of ground fault detection and diagnosis, and ensuring the safe operation of the power system.
[0011] To achieve the above objectives, the technical solution adopted by the present invention is as follows: An intelligent zero-sequence current transformer includes: a toroidal magnetic core, a high-sensitivity leakage current detection circuit, and a microprocessor chip. The toroidal magnetic core is installed on the monitored three-phase four-wire cable. The toroidal magnetic core is connected to the high-sensitivity leakage current detection circuit, which is connected to the microprocessor chip. The microprocessor chip is provided with a communication interface, through which alarm signals and waveform recording files are sent to the outside. The toroidal magnetic core is used to sense zero-sequence current signals; The high-sensitivity leakage current detection circuit is used to convert the sensed zero-sequence current signal into a voltage signal and perform primary amplification and anti-aliasing filtering to output an analog voltage signal. The microprocessor chip is used to perform the following steps: Convert analog voltage signals into a digital raw zero-sequence current sequence; The original zero-sequence current sequence is subjected to multi-stage adaptive filtering to gradually remove the power frequency fundamental wave, harmonics and noise interference, and output a pure leakage current residual sequence. Time-domain and frequency-domain features are extracted from the leakage current residual sequence to form a feature vector; Fault diagnosis is performed on feature vectors based on deep learning models, and the probability distribution of fault types is output. The system performs a fusion judgment based on the probability distribution of fault types and the effective value of leakage current, and generates an alarm signal when preset conditions are met. In response to an alarm signal, the original zero-sequence current sequence before and after the alarm trigger moment is read and stored as waveform data.
[0012] Furthermore, the microprocessor chip includes: an analog-to-digital conversion module, a three-level cascaded adaptive filter calibration unit, a multi-scale time-frequency feature extraction unit, a multi-scale time-frequency attention fusion network, a logic control and alarm unit, and a fault recording unit. The high-sensitivity leakage current detection circuit is connected to the analog-to-digital conversion module, the analog-to-digital conversion module is connected to the three-level cascaded adaptive filter calibration unit, the three-level cascaded adaptive filter calibration unit is connected to the multi-scale time-frequency feature extraction unit, the multi-scale time-frequency feature extraction unit is connected to the multi-scale time-frequency attention fusion network, the multi-scale time-frequency attention fusion network is connected to the logic control and alarm unit, and the logic control and alarm unit is connected to the fault recording unit. The analog-to-digital converter module is used to convert analog voltage signals into a digital raw zero-sequence current sequence; The three-stage cascaded adaptive filter calibration unit is used to employ a three-stage processing architecture of adaptive Kalman filtering, which uses fuzzy logic adaptive LMS power frequency fundamental suppression, adaptive notch filter group harmonic and interharmonic separation, and particle swarm-genetic algorithm optimization. It gradually removes the power frequency fundamental, integer harmonics, interharmonics and white noise interference from the original zero-sequence current sequence and outputs a pure leakage current residual sequence. The multi-scale time-frequency feature extraction unit is used to extract a multi-dimensional feature vector, including time-domain statistical features and frequency-domain distribution features, from the leakage current residual sequence in a sliding time window manner. The multi-scale time-frequency attention fusion network is used to output the probability distribution of fault types based on multi-dimensional feature vectors through multi-scale parallel convolution, channel attention, time-frequency attention fusion and hybrid expert classification architecture; The logic control and alarm unit is used to perform a fusion judgment based on the probability distribution of fault type and the effective value of leakage current in the current time window. When the preset confidence threshold and graded current threshold conditions are met, an alarm signal including fault type, effective value of leakage current and alarm level is generated. The fault recording unit is used to maintain the original zero-sequence current sequence stored in the circular buffer in real time, and in response to the alarm signal, read the original data of a specified length before and after the alarm trigger time from the circular buffer, add a time stamp, and store it as a recording file.
[0013] Furthermore, the high-sensitivity leakage current detection circuit includes: a precision sampling resistor, a low-noise precision instrumentation amplifier, and a second-order Butterworth active low-pass filter. The precision sampling resistor is connected in parallel across the secondary winding of the toroidal core. The precision sampling resistor is connected to the low-noise precision instrumentation amplifier, and the low-noise precision instrumentation amplifier is connected to the second-order Butterworth active low-pass filter. The precision sampling resistor is used to convert the secondary-side induced current into a voltage signal; The low-noise precision instrumentation amplifier has a differential input structure; The second-order Butterworth active low-pass filter is used for anti-aliasing filtering.
[0014] Furthermore, the three-stage cascaded adaptive filtering calibration unit includes a first-stage fuzzy adaptive LMS power frequency fundamental frequency suppression module, a second-stage adaptive notch filter group harmonic and interharmonic separation module, and a third-stage particle swarm-genetic algorithm optimized adaptive Kalman filter module.
[0015] Furthermore, the time-domain statistical features include root mean square value, peak value, waveform factor, impulse factor, margin factor, skewness, and kurtosis.
[0016] Furthermore, the frequency domain distribution characteristics include fundamental frequency amplitude, the proportion of each harmonic amplitude, total harmonic distortion rate, spectral centroid, spectral bandwidth, and high-frequency energy proportion.
[0017] Furthermore, the multi-scale time-frequency attention fusion network includes: an input feature reconstruction module, a multi-scale feature map extraction module, a time-frequency attention fusion module, and a hybrid expert classification output module; The input feature reconstruction module projects multidimensional feature vectors to a high-dimensional space and reshapes them into a two-dimensional feature map through a fully connected layer. The multi-scale feature map extraction module includes three parallel convolutional branches, which are used to extract local detail features, mesoscale waveform features and global periodic features, respectively. The outputs of each branch are concatenated and fused after residual connection, and channel weighting is performed through the squeezing excitation module to output a multi-scale feature map. The time-frequency attention fusion module is used to flatten the multi-scale feature map into a sequence and add learnable positional encoding. It performs global context modeling through a multi-head self-attention mechanism and converges the global feature vector through a feedforward network and layer normalization by global average pooling. The hybrid expert classification output module includes multiple parallel expert networks and a gated network. The gated network dynamically calculates the weights of each expert network based on the global feature vector. The expert outputs are weighted and fused together, and then passed through the output layer and the softmax function to obtain the fault type probability distribution.
[0018] This invention also provides a method for leakage current detection and fault diagnosis of an intelligent zero-sequence current transformer, applied to the aforementioned intelligent zero-sequence current transformer, comprising: Step 1: Zero-sequence current is induced by a toroidal magnetic core, and after signal conditioning by a high-sensitivity leakage current detection circuit, the original zero-sequence current sequence is generated by the analog-to-digital conversion module. Step 2: Input the original zero-sequence current sequence into the three-stage cascaded adaptive filter calibration unit. The three-stage processing architecture of adaptive Kalman filter with fuzzy logic adaptive LMS power frequency fundamental frequency suppression, adaptive notch filter group harmonic and interharmonic separation, and particle swarm-genetic algorithm optimization is adopted to remove power frequency fundamental frequency, integer harmonics, interharmonics and white noise interference step by step, and output a pure leakage current residual sequence. Step 3: In the multi-scale time-frequency feature extraction unit, a multi-dimensional feature vector containing time-domain statistical features and frequency-domain distribution features is extracted from the leakage current residual sequence using a sliding time window method; Step 4: Input the multi-dimensional feature vector into the multi-scale time-frequency attention fusion network, extract local details, mesoscale and global periodic features through multi-scale parallel convolution, perform global context modeling through multi-head self-attention after channel attention weighting, and output the fault type probability distribution through a hybrid expert classifier. Step 5: In the logic control and alarm unit, a fusion judgment is made based on the probability distribution of fault types and the effective value of leakage current in the current time window. When the preset confidence threshold and graded current threshold conditions are met, an alarm signal is generated. Step 6: In response to the alarm signal, the fault recording unit reads the original zero-sequence current sequence data of a specified length before and after the alarm trigger time from the circular buffer, adds a time stamp, stores it as a recording file, and sends it out through the communication interface.
[0019] Furthermore, in step 5, within the logic control and alarm unit, a fusion judgment is made based on the fault type probability distribution and the effective value of the leakage current within the current time window. When the preset confidence threshold and graded current threshold conditions are met, an alarm signal is generated, specifically as follows: Extracting the maximum probability from the probability distribution of fault types and its corresponding category index ; like and If so, a fault is determined to exist, and the fault type is: The corresponding category, in the formula, The preset confidence threshold; The current effective value of leakage current The third-level threshold with graded current threshold conditions , , Compare and determine the alarm level; If continuous If all sliding windows meet the fault existence conditions and corresponding alarm level conditions, an alarm is triggered, generating an alarm signal that includes a timestamp, fault type, effective value of leakage current, alarm level, confidence level, and device ID.
[0020] In summary, the present invention has at least one of the following beneficial technical effects: 1. High sensitivity and strong anti-interference: It captures weak signals through a toroidal magnetic core and a high-sensitivity detection circuit, and uses a three-level cascaded adaptive filtering algorithm to dynamically filter out power frequency fundamental wave, integer harmonics, interharmonics and white noise. It can accurately identify weak leakage currents in the milliampere level or even the microampere level in complex electromagnetic environments.
[0021] 2. Enables intelligent fault type identification: By introducing a multi-scale time-frequency attention fusion network, it can not only realize set value alarms, but also automatically identify various fault types such as insulation aging, metallic grounding, arc grounding, intermittent grounding, and high resistance grounding. The classification accuracy is high, providing accurate decision-making basis for operation and maintenance personnel.
[0022] 3. Fault recording and analysis capabilities: When an alarm is triggered, it can automatically record the original waveform data for 0.2 seconds before and after the alarm is triggered, and supports export in the Comtrade standard format, which facilitates in-depth fault analysis and inversion afterward, and provides original evidence for protection setting verification and fault cause analysis.
[0023] 4. Automatic calibration and adaptive capability: The adaptive filter based on fuzzy logic and PSO-GA optimization has dynamic tracking capability and can automatically adjust parameters according to power grid frequency fluctuations and environmental changes, realizing online automatic calibration without manual intervention and high long-term operational stability.
[0024] 5. It features graded early warning and high reliability: It adopts a three-level threshold strategy and a continuous confirmation mechanism, which can respond in a graded manner according to the severity of the fault, while effectively avoiding false alarms caused by transient interference, thus significantly improving the reliability of alarms.
[0025] 6. Enables hardware and software co-optimization: Deeply integrates high-sensitivity hardware detection with complex intelligent algorithms to achieve a complete closed loop from signal perception to intelligent diagnosis, with overall performance superior to existing discrete solutions.
[0026] 7. Adaptable to small sample scenarios: Through simulation data generation and multi-source data augmentation, the problem of scarce fault samples in practical applications is solved, enabling the model to maintain good performance in different application scenarios. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the intelligent zero-sequence current transformer structure of the present invention; Figure 2 This is a schematic diagram of the method flow of the present invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0029] like Figure 1 As shown, the present invention provides an intelligent zero-sequence current transformer, comprising: a toroidal magnetic core, a high-sensitivity leakage current detection circuit, and a microprocessor chip. The toroidal magnetic core is disposed on the monitored three-phase four-wire cable, the toroidal magnetic core is connected to the high-sensitivity leakage current detection circuit, the high-sensitivity leakage current detection circuit is connected to the microprocessor chip, and the microprocessor chip is provided with a communication interface for sending alarm signals and waveform recording files to the outside through the communication interface. The toroidal magnetic core is made of a high permeability material and is used to sense zero-sequence current signals; The high-sensitivity leakage current detection circuit is used to convert the sensed zero-sequence current signal into a voltage signal and perform primary amplification and anti-aliasing filtering to output an analog voltage signal. The microprocessor chip includes: an analog-to-digital conversion module, a three-stage cascaded adaptive filter calibration unit, a multi-scale time-frequency feature extraction unit, a multi-scale time-frequency attention fusion network, a logic control and alarm unit, and a fault recording unit. The high-sensitivity leakage current detection circuit is connected to the analog-to-digital conversion module. The analog-to-digital conversion module is connected to the three-stage cascaded adaptive filter calibration unit. The three-stage cascaded adaptive filter calibration unit is connected to the multi-scale time-frequency feature extraction unit. The multi-scale time-frequency feature extraction unit is connected to the multi-scale time-frequency attention fusion network. The multi-scale time-frequency attention fusion network is connected to the logic control and alarm unit. The logic control and alarm unit is connected to the fault recording unit. The analog-to-digital converter module is used to convert analog voltage signals into a digital raw zero-sequence current sequence; The three-stage cascaded adaptive filter calibration unit is used to employ a three-stage processing architecture of adaptive Kalman filtering, which uses fuzzy logic adaptive LMS power frequency fundamental suppression, adaptive notch filter group harmonic and interharmonic separation, and particle swarm-genetic algorithm optimization. It gradually removes the power frequency fundamental, integer harmonics, interharmonics and white noise interference from the original zero-sequence current sequence and outputs a pure leakage current residual sequence. The multi-scale time-frequency feature extraction unit is used to extract a multi-dimensional feature vector, including time-domain statistical features and frequency-domain distribution features, from the leakage current residual sequence in a sliding time window manner. The multi-scale time-frequency attention fusion network is used to output the probability distribution of fault types based on multi-dimensional feature vectors through multi-scale parallel convolution, channel attention, time-frequency attention fusion and hybrid expert classification architecture; The logic control and alarm unit is used to perform a fusion judgment based on the probability distribution of fault type and the effective value of leakage current in the current time window. When the preset confidence threshold and graded current threshold conditions are met, an alarm signal including fault type, effective value of leakage current and alarm level is generated. The fault recording unit is used to maintain the original zero-sequence current sequence stored in the circular buffer in real time, and in response to the alarm signal, read the original data of a specified length before and after the alarm trigger time from the circular buffer, add a time stamp, and store it as a recording file.
[0030] This invention provides an embodiment in which the toroidal magnetic core is made of a high-permeability microcrystalline material or permalloy, and its initial permeability is... It features high sensitivity and low remanence. The inner diameter of the toroidal core is designed according to the outer diameter of the monitored cable to ensure a tight fit on a three-phase four-wire cable. A secondary winding is wound on the core, with the number of turns... Based on the required ratio and sensitivity, the present invention takes... The secondary winding is made of high-strength enameled wire, evenly wound, with interlayer insulation treatment to ensure long-term operational reliability.
[0031] The working principle of a toroidal magnetic core is based on the law of electromagnetic induction: when a ground fault occurs in the monitored line, the sum of the instantaneous values of the three-phase currents is not zero, generating a zero-sequence current. It generates alternating magnetic flux in the magnetic core. An electromotive force is induced in the secondary winding. This converts the zero-sequence current signal on the primary side into a voltage signal on the secondary side, achieving electrical isolation and signal conversion.
[0032] The high-sensitivity leakage current detection circuit includes: a precision sampling resistor, a low-noise precision instrumentation amplifier, and a second-order Butterworth active low-pass filter. The precision sampling resistor is connected in parallel across the secondary winding of the toroidal magnetic core. The precision sampling resistor is connected to the low-noise precision instrumentation amplifier, and the low-noise precision instrumentation amplifier is connected to the second-order Butterworth active low-pass filter. Each component is described in detail below: 1. Precision sampling resistor A precision sampling resistor is connected in parallel across the two ends of the secondary winding. induced current on the secondary side Converted to voltage signal The sampling resistor is a low-temperature drift, high-precision metal foil resistor with a resistance value of... precision Temperature coefficient Based on the turns ratio The sampling voltage is: ; for The weak leakage current, Therefore, further magnification is required. 2. Low-noise precision instrument amplifier The preamplifier employs a low-noise, low-offset voltage precision instrumentation amplifier, such as the Analog Devices AD8429 or the Texas Instruments INA118. The amplifier is configured with differential inputs to suppress common-mode interference. Its gain is determined by external resistors. set up: ; For the closed-loop voltage gain of the preamplifier, in this embodiment, we take... (60dB), corresponding The amplifier output is: ; in The amplifier input offset voltage, typical value After magnification, it may reach This requires subsequent digital calibration or hardware zeroing circuitry for compensation. The preamplifier's bandwidth is designed to be... This ensures that the signal is not distorted.
[0033] 3. Second-order Butterworth active low-pass filter The pre-amplified signal enters a second-order active low-pass filter for anti-aliasing filtering. The filter employs a Butterworth response to achieve the flattest passband characteristics. General-purpose operational amplifiers such as the LM358 or OPA2170 are selected. The filter cutoff frequency... Based on sampling rate Confirmed, satisfied In this embodiment ,Pick The filter transfer function is: ; in Damping coefficient , This is the cutoff angular frequency of the filter. This is the Laplace operator, i.e., a complex frequency variable. The filter output signal. High-frequency noise has been filtered out, satisfying the Nyquist sampling theorem requirements.
[0034] The microprocessor chip is a 32-bit microcontroller with an ARM Cortex-M4 core, such as ST's STM32F407 or NXP's LPC4370. This chip integrates an analog-to-digital converter, large-capacity Flash and SRAM, and features a DSP instruction set and floating-point unit, enabling it to efficiently perform complex digital signal processing and deep learning inference. The following sections will provide a detailed description of each module of the microprocessor chip: The analog-to-digital conversion module uses a built-in 12-bit or 16-bit successive approximation ADC. This embodiment uses a 16-bit resolution to detect weak leakage current. The ADC is configured in continuous conversion mode with a sampling rate of... Triggered by a timer. Reference voltage. Taken from a high-precision reference source inside the chip, typical value The quantization interval is: ; ADC at each sampling time Output digital quantity , with input voltage The relationship is: ; It is stored in a DMA buffer as a 16-bit signed integer for subsequent processing units to read. This sequence is the original zero-sequence current sequence, which includes the fundamental frequency, harmonics, leakage current, and noise.
[0035] The three-stage cascaded adaptive filtering calibration unit includes a first-stage fuzzy adaptive LMS power frequency fundamental wave suppression module, a second-stage adaptive notch filter group harmonic and interharmonic separation module, and a third-stage particle swarm-genetic algorithm optimized adaptive Kalman filter module.
[0036] The time-domain statistical features include root mean square value, peak value, waveform factor, impulse factor, margin factor, skewness, and kurtosis.
[0037] The frequency domain distribution characteristics include fundamental frequency amplitude, the proportion of each harmonic amplitude, total harmonic distortion rate, spectral centroid, spectral bandwidth, and high-frequency energy proportion.
[0038] The multi-scale time-frequency attention fusion network includes: an input feature reconstruction module, a multi-scale feature map extraction module, a time-frequency attention fusion module, and a hybrid expert classification output module; The input feature reconstruction module projects multidimensional feature vectors to a high-dimensional space and reshapes them into a two-dimensional feature map through a fully connected layer. The multi-scale feature map extraction module includes three parallel convolutional branches, which are used to extract local detail features, mesoscale waveform features and global periodic features, respectively. The outputs of each branch are concatenated and fused after residual connection, and channel weighting is performed through the squeezing excitation module to output a multi-scale feature map. The time-frequency attention fusion module is used to flatten the multi-scale feature map into a sequence and add learnable positional encoding. It performs global context modeling through a multi-head self-attention mechanism and converges the global feature vector through a feedforward network and layer normalization by global average pooling. The hybrid expert classification output module includes multiple parallel expert networks and a gated network. The gated network dynamically calculates the weights of each expert network based on the global feature vector. The expert outputs are weighted and fused together, and then passed through the output layer and the softmax function to obtain the fault type probability distribution.
[0039] The specific application processes of the multi-scale time-frequency feature extraction unit, the multi-scale time-frequency attention fusion network, the logic control and alarm unit, and the fault recording unit will be described in detail in the subsequent methods section, and will not be described here.
[0040] This invention uses an RS-485 bus for communication and supports the Modbus RTU protocol. Main functions: Real-time upload Monitoring data such as failure probability; Actively report alarm incidents; Responding to the host computer's query command, upload the waveform recording file; Receive remote configuration parameters (such as alarm thresholds and filter parameters).
[0041] This invention also includes a power supply module to power the entire device, with an input voltage range of AC / DC 85-265V and stable outputs of DC 3.3V and 5V, respectively supplying the microprocessor chip and analog circuitry. The power supply module includes EMI filtering, an isolation transformer, and a linear regulator to ensure stable operation in harsh electromagnetic environments.
[0042] like Figure 2 As shown, the present invention also provides a method for leakage current detection and fault diagnosis of an intelligent zero-sequence current transformer, applied to the aforementioned intelligent zero-sequence current transformer, comprising: Step 1: Zero-sequence current is induced by a toroidal magnetic core, and after signal conditioning by a high-sensitivity leakage current detection circuit, the original zero-sequence current sequence is generated by the analog-to-digital conversion module. Step 2: Input the original zero-sequence current sequence into the three-stage cascaded adaptive filter calibration unit. The three-stage processing architecture of adaptive Kalman filter with fuzzy logic adaptive LMS power frequency fundamental frequency suppression, adaptive notch filter group harmonic and interharmonic separation, and particle swarm-genetic algorithm optimization is adopted to remove power frequency fundamental frequency, integer harmonics, interharmonics and white noise interference step by step, and output a pure leakage current residual sequence. Step 3: In the multi-scale time-frequency feature extraction unit, a multi-dimensional feature vector containing time-domain statistical features and frequency-domain distribution features is extracted from the leakage current residual sequence using a sliding time window method; Step 4: Input the multi-dimensional feature vector into the multi-scale time-frequency attention fusion network, extract local details, mesoscale and global periodic features through multi-scale parallel convolution, perform global context modeling through multi-head self-attention after channel attention weighting, and output the fault type probability distribution through a hybrid expert classifier. Step 5: In the logic control and alarm unit, a fusion judgment is made based on the probability distribution of fault types and the effective value of leakage current in the current time window. When the preset confidence threshold and graded current threshold conditions are met, an alarm signal is generated. Step 6: In response to the alarm signal, the fault recording unit reads the original zero-sequence current sequence data of a specified length before and after the alarm trigger time from the circular buffer, adds a time stamp, stores it as a recording file, and sends it out through the communication interface.
[0043] The details of step 1 have been fully explained above and will not be repeated here.
[0044] In step 2, the original zero-sequence current sequence is input into a three-stage cascaded adaptive filter calibration unit. A three-stage processing architecture—fuzzy logic adaptive LMS power frequency fundamental suppression, adaptive notch filter group harmonic and interharmonic separation, and particle swarm optimization-genetic algorithm-optimized adaptive Kalman filter—is employed to progressively remove power frequency fundamental, integer harmonics, interharmonics, and white noise interference, outputting a clean leakage current residual sequence. Specifically: This step addresses the technical shortcomings of traditional LMS algorithms in non-stationary power signal processing, such as the contradiction between convergence speed and steady-state error, weak tracking ability for time-varying harmonics, and inability to effectively separate interharmonic components. It proposes a leakage current extraction method based on multi-layer fusion adaptive filtering. This method organically integrates fuzzy logic control, an adaptive notch filter group, and a Kalman filter optimized by a particle swarm optimization-genetic algorithm. Through a three-stage cascaded processing architecture, it achieves the extraction of leakage current from the original zero-sequence current sequence. The process involves progressively stripping away the fundamental frequency, integer harmonics, interharmonics, and white noise to ultimately output a high-purity leakage current residual sequence. The following is a detailed explanation of Level 3: Level 1: Fuzzy Adaptive LMS Power Frequency Fundamental Wave Suppression Its purpose is to The system rapidly suppresses the strongest power frequency fundamental wave component to prevent it from drowning out subsequent weak leakage current signals, while providing a stable phase reference for subsequent processing. Specifically: 1. Signal Modeling Let the original zero-sequence current sequence be... It can be represented as: ; in , , These represent the amplitude, angular frequency, and initial phase angle of the fundamental power frequency wave. , For the first The amplitude and initial phase angle of the second harmonic. The highest harmonic order, The actual leakage current component to be extracted. The system is white noise. This is a discrete-time index, which is an integer.
[0045] 2. Adaptive Notch Filter Structure A second-order IIR adaptive notch filter is used to notch the power frequency fundamental wave. Its transfer function is: ; in For the estimated fundamental angular frequency, Let be the pole radius factor of the notch filter, satisfying Used to control notch bandwidth and convergence speed. For complex variables in the Z-transform, in a discrete-time system, and The unit of measurement is the delay operator.
[0046] 3. Fuzzy logic adaptive step size control To solve the problem of fixed step size in traditional LMS algorithm The contradiction between fast convergence and low steady-state error cannot be simultaneously satisfied, so a fuzzy logic controller is introduced to dynamically adjust the step size factor. Let the energy of the error signal be... and error change rate For the input of the fuzzy controller: ; ; in This is the output error of the filter at this stage. This is the length of the smoothing window. The output of the fuzzy controller is the step size adjustment factor. The actual step size is: ; in and These are the preset minimum and maximum step sizes, respectively.
[0047] The fuzzy control rule is designed as follows: when Larger and When the value is positive, it indicates that the error is large and still increasing, and the step size should be increased to accelerate convergence; when Smaller and When the value approaches zero, it indicates that the system is nearing steady state, and the step size should be reduced to decrease the steady-state error. Through this mechanism, the filter can automatically match the optimal step size at different stages.
[0048] 4. Frequency tracking and updating The center frequency of the notch filter needs to track grid frequency fluctuations in real time. A simplified phase-locked loop structure is used to track the fundamental frequency. ; in This is the frequency tracking step size factor. After the frequency is updated, the notch filter coefficients are adjusted accordingly to achieve dynamic frequency tracking.
[0049] 5. Output of this level After processing by the fuzzy adaptive notch filter, the output signal for: ; in This refers to the fundamental frequency component extracted by the notch filter. The fundamental frequency of the medium power frequency is significantly suppressed, mainly including harmonic components, interharmonic components and real leakage current components.
[0050] Second stage: Adaptive notch filter for group harmonic and interharmonic separation It employs a parallel structure of adaptive notch filter group, for Each harmonic and interharmonic is identified and separated one by one, providing accurate frequency prior information for subsequent Kalman filtering.
[0051] 1. Spectrum sensing and component detection Using sliding window short-time Fourier transform Perform spectral analysis to detect the presence of each frequency component. Let the spectrum of the signal within the current window be... The detection criterion for frequency components is: ; in To detect the threshold coefficient, The number of FFT points. Frequency points that satisfy the criterion. It was identified as an effective frequency component.
[0052] 2. Parallel notch filter group structure For the detected Frequency components Construct a parallel adaptive notch filter array. The transfer function of the notch filter is: ; in For normalized angular frequency, For the first The pole radius of the notch filter.
[0053] 3. Cascaded notch filtering Will Sequential suppression of multiple frequency components is achieved by sequentially passing the components through notch filters in a cascaded manner. ; ; Final output .Should All detected integer harmonics and strong interharmonic components have been suppressed, mainly including the true leakage current component. And residual noise.
[0054] 4. Parameter adaptive adjustment The pole radius of each notch filter Dynamic adjustment based on the energy of this frequency component: ; in For the first Instantaneous energy estimation of each frequency component, As the attenuation factor, and This is a preset range of pole radii. This mechanism allows strong components to have a deeper notch depth, while weak components have a faster dynamic response.
[0055] Third-level processing: PSO-GA optimized adaptive Kalman filter The previous two-stage processing Using the Kalman filter framework as input, the optimal estimation of the true leakage current component is achieved. Furthermore, a particle swarm optimization-genetic hybrid algorithm is used to optimize the key parameters of the Kalman filter offline, ensuring optimal performance under various operating conditions. Specifically: 1. State-space modeling The actual leakage current component is modeled as a state variable, and a discrete-time state-space model is established: Equations of state: ; Observation equation: ; in for The state vector is 3D, and the appropriate order can be selected according to the time-varying characteristics of the leakage current; This is the state transition matrix; The observation matrix; For process noise, the covariance matrix is: ; To observe the noise, the covariance is... .
[0056] 2. Kalman Filtering Recursive Process Kalman filtering achieves optimal state estimation through a two-stage recursive process of prediction and correction. Prediction phase: State prediction in one step: ; Prediction error covariance matrix: ; Correction phase: Kalman gain matrix: ; New interest calculation: ; Status Update: ; Error covariance update: ; 3. Parameter optimization of PSO-GA hybrid algorithm The performance of Kalman filtering is highly dependent on the process noise covariance matrix. Observation noise covariance and initial state covariance The selection of parameters is crucial. A particle swarm optimization-genetic hybrid algorithm is used for offline global optimization of these parameters to obtain optimal filtering performance.
[0057] Optimize variable definitions: Optimize variable vectors ,in This indicates matrix vectorization operations.
[0058] Fitness function: The optimization objective is to minimize the root mean square value of the filtering error. ; in To optimize the length of the data used, For parameters The estimated value of the lower Kalman filter.
[0059] PSO-GA Hybrid Optimization Process: Initialize particle swarm: randomly generated There are 10 particles, each representing a set of candidate parameters. Initialize particle velocity .
[0060] Fitness evaluation: Run a Kalman filter on each particle and calculate the fitness. Record individual optimal and global optimal .
[0061] Particle velocity and position update (PSO part): ; ; in For inertial weights, , As a learning factor, , It is a random number between [0, 1].
[0062] Genetic manipulation (GA part): per interval Execute once: Selection: A roulette wheel is used to select particles with higher fitness to enter the next generation.
[0063] Crossover: based on crossover probability Arithmetic crossover is performed on the selected particle pairs: ; ; in This is the crossover factor.
[0064] Mutation: based on the probability of mutation Apply Gaussian perturbation to the particles: ; in It is Gaussian white noise.
[0065] Termination condition: Termination occurs when the maximum number of iterations is reached or the fitness converges to a threshold, and the optimal parameters are output. .
[0066] 4. Leakage current residual output Use the optimized optimal parameters Perform online Kalman filtering and state estimation This represents the optimal estimate of the true leakage current component. The final output pure leakage current residual sequence is: ; Should It has suppressed power frequency fundamental wave, integer harmonics, interharmonics and various noises to the greatest extent, and only retains the real leakage current information related to grounding faults, which can be directly used for subsequent feature extraction and fault diagnosis.
[0067] After the above three-stage cascaded processing, the adaptive filter calibration unit outputs a clean leakage current residual sequence. The sequence is sent to two paths simultaneously: Input to the multi-scale time-frequency feature extraction unit for time-domain and frequency-domain feature extraction; It is temporarily stored in the circular buffer of the microprocessor chip as a backup data source for the fault recording unit.
[0068] In step 3, within the multi-scale time-frequency feature extraction unit, a multi-dimensional feature vector containing both time-domain statistical features and frequency-domain distribution features is extracted from the leakage current residual sequence using a sliding time window approach. Specifically: This step receives the pure leakage current residual sequence output from step 2, and calculates a set of statistics reflecting the time-domain waveform characteristics and frequency-domain distribution characteristics of the leakage current within each window using a sliding time window method, thus forming a multi-dimensional feature vector. This provides input for subsequent deep learning fault diagnosis models. The specific process is as follows: 1. Data preparation and windowing The feature extraction unit maintains a length of A circular buffer is used to store the latest leakage current residual sequence. Window length The selection needs to balance real-time performance and frequency resolution; in this embodiment, we choose... Point, corresponding Ten power frequency cycles at the sampling rate (50Hz system, 256 points per cycle). Each new sample is acquired... The window slides forward one point to achieve point-by-point updates or fixed-step updates. To reduce computational load, a per-step update can also be used. A window stacking method where you tap and slide once.
[0069] 2. Temporal Feature Extraction Temporal features are extracted directly from the amplitude changes of the data within the window, including but not limited to the following statistics: (1) Root mean square value: The root mean square (RMS) value reflects the effective level of the leakage current and is defined as: ; in Index for the current time, This is the offset within the window. The unit is ampere (A), which is used to characterize the total energy of leakage current.
[0070] (2) Peak value The peak value reflects the maximum instantaneous amplitude of the leakage current and is defined as: ; Also measured in amperes, it is used to detect the presence of sudden surge leakage current.
[0071] (3) Peak factor The crazing factor is defined as the ratio of the peak value to the root mean square value. ; This ratio is dimensionless and is used to describe the sharpness of a waveform. For a pure sine wave, If the waveform contains spikes, then Significantly increased.
[0072] (4) Waveform factor The waveform factor is defined as the ratio of the root mean square value to the rectified average value: ; The rectified average value is less sensitive to fluctuations, while the waveform factor can be used to distinguish different waveform shapes.
[0073] (5) Pulse factor The pulse factor is defined as the ratio of the peak value to the rectified average value. ; This indicator is more sensitive to impulsive pulses and is often used to detect intermittent arc faults.
[0074] (6) Margin factor The margin factor is defined as the ratio of the peak value to the root square magnitude, where the root square magnitude is 1 / 2. ,Right now: ; The margin factor is sensitive to changes in early, weak fault signals, which helps to provide early warning.
[0075] (7) Skewness and kurtosis Skewness measures the asymmetry of waveform distribution, while kurtosis measures the steepness of waveform distribution. Skewness: ; Kuroshi: ; in The mean value is the value within the window. Skewness reflects the symmetry of the positive and negative half-cycles of the waveform, while kurtosis reflects the sharpness or gentleness of the waveform. The combination of the two can distinguish different types of fault waveforms.
[0076] 3. Frequency Domain Feature Extraction Frequency domain characteristics are obtained by performing a Fast Fourier Transform on the data within the window, and are used to analyze the frequency component distribution of the leakage current, specifically including: (1) Spectrum calculation For in-window sequence conduct Point Fast Fourier Transform yields the discrete spectrum. Corresponding frequency Since the signal is a real sequence, its spectrum exhibits conjugate symmetry; typically, only one value is taken. to The non-negative frequency part.
[0077] (2) Fundamental frequency amplitude For a 50Hz power frequency system, the spectral line index corresponding to the fundamental frequency is: Interpolation is performed on this point and several points to its left and right to obtain the accurate fundamental frequency amplitude. ; The fundamental frequency amplitude reflects the periodic leakage current component that is synchronized with the power frequency.
[0078] (3) Harmonic amplitude ratio Extracting each harmonic (2nd to 3rd harmonic) The amplitude of the (second) frequency is calculated, and its proportion relative to the fundamental frequency amplitude is determined. ; in Harmonic proportions can be used to identify characteristic harmonics generated by nonlinear loads or arcing faults.
[0079] (4) Total Harmonic Distortion Total harmonic distortion (THD) is defined as the ratio of the effective value of each harmonic to the effective value of the fundamental frequency. ; THD is a commonly used indicator for measuring the degree of waveform distortion.
[0080] (5) Spectral centroid The centroid of the spectrum describes the concentration of frequency components in a signal. ; The unit is Hertz. Different fault types may produce different frequency distribution centroids.
[0081] (6) Spectrum bandwidth Spectral bandwidth reflects the width of a signal's frequency band and is defined as: ; The larger the bandwidth, the richer the frequency components contained in the signal.
[0082] (7) High-frequency energy ratio Above a certain cutoff frequency The ratio of spectral energy to total energy is defined as the high-frequency energy percentage: ; Waveforms with a high proportion of high-frequency energy often correspond to rapid transient processes, such as electric arc faults.
[0083] 4. Feature Vector Construction All the extracted time-domain and frequency-domain feature scalars are combined in a fixed order to form 3D feature vector :
[0084]
[0085] ; in (Basic characteristics of the time domain) + (baseband) + (2 to) (proportion of subharmonics) + (THD, spectral centroid, bandwidth, high-frequency proportion), etc. In this embodiment, we take... ,but .
[0086] 5. Feature Normalization To eliminate the impact of differences in the dimensions and orders of magnitude of features on deep learning models, feature vectors are... Normalization is performed. The maximum-minimum normalization method is used: ; in and For the first The minimum and maximum values of the dimensional features on the training set are fixed in the model as known parameters. The normalized feature vectors. This data is then fed into the deep learning fault diagnosis model as the final input.
[0087] The feature extraction unit outputs a normalized feature vector at each sliding window position. This vector comprehensively reflects the time-domain waveform shape and frequency-domain distribution characteristics of the leakage current in the current period.
[0088] In step 4, the multi-dimensional feature vector is input into the multi-scale time-frequency attention fusion network. Local details, mesoscale, and global periodic features are extracted through multi-scale parallel convolution. After channel attention weighting, global context modeling is performed through multi-head self-attention. Finally, a hybrid expert classifier outputs the fault type probability distribution, specifically: This step addresses the shortcomings of traditional shallow neural networks, such as insufficient feature extraction of complex leakage current signals, difficulty in capturing multi-scale time-frequency characteristics, and low sensitivity to weak faults. It proposes a deep learning fault diagnosis model based on a multi-scale time-frequency attention fusion network. This model uses residual convolution modules for deep feature extraction, multi-scale convolution kernels to capture waveform features at different time scales, a time-frequency attention mechanism to enhance the response of key frequency components, and a hybrid expert network to achieve accurate fault type classification. This fundamentally improves the ability to identify various grounding faults. The following sections will introduce this method from various aspects: The multi-scale time-frequency attention fusion network adopts an end-to-end deep neural network structure, consisting of four cascaded core modules: an input feature reconstruction module, a multi-scale feature map extraction module, a time-frequency attention fusion module, and a hybrid expert classification output module. The model input is the normalized feature vector output from step 3. The output is a probability distribution of fault types. ,in The total number of predefined fault types includes normal operation and various grounding faults. The following sections will explain each module in detail: 1. Input Feature Reconstruction Module Due to the feature vector extracted in step 3 It includes time-domain statistical features and frequency-domain distribution features, whose physical meanings and numerical ranges differ. Directly inputting these features into a neural network may lead to an imbalance of information across different feature dimensions. Therefore, this module first... Feature reconstruction is performed, mapping the feature map to a two-dimensional feature map structure suitable for convolutional neural network processing, specifically: (1) Feature Dimension Expansion Let the input feature vector Projecting it into a higher-dimensional space through a fully connected layer: ; in Let be the projection weight matrix. For bias vectors, It is the ReLU activation function. The feature dimension after projection is taken in this embodiment. .
[0089] (2) Two-dimensional feature map reconstruction The projected feature vector Reconstructed into a two-dimensional feature map ,in In this embodiment, we take... , ,form The feature maps are reconstructed. This reconstruction process preserves the spatial adjacency relationships between features, providing structured input for subsequent convolutional operations.
[0090] 2. Multi-scale feature map extraction module This module adopts a multi-branch convolutional neural network structure, which extracts multi-scale time-frequency representations of leakage current features in parallel through convolutional kernels of different sizes, solving the problem that single-scale convolutional kernels cannot simultaneously capture local transient features and global periodic features.
[0091] (1) Multi-branch convolutional structure Design three parallel convolution branches, using small-scale, medium-scale, and large-scale convolution kernels respectively: Branch 1 (Local Detail Branch): Using The convolution kernel has a stride of 1 and padding of 1, resulting in 32 output channels. This branch focuses on extracting local details from the feature map, corresponding to high-frequency components such as transient spikes and abrupt changes in the leakage current waveform.
[0092] ; Branch 2 (Mesoscale Feature Branch): Using The convolution kernel has a stride of 1, padding of 2, and 32 output channels. This branch captures waveform features at a medium time scale, corresponding to waveform morphology changes within a power frequency cycle.
[0093] ; Branch 3 (Global Feature Branch): Adopts The convolution kernel has a stride of 1, padding of 3, and 32 output channels. This branch extracts periodic and trend features globally, corresponding to the overall distribution pattern of leakage current.
[0094] ; (2) Residual connectivity and feature fusion Within each branch, residual connections are introduced to alleviate the vanishing gradient problem and accelerate convergence. Take branch one as an example: ; in Used to adjust the dimension to match match.
[0095] The outputs of the three branches are concatenated and fused along the channel dimension to form a multi-scale feature representation: ; (3) Channel attention mechanism To further enhance the response of the effective feature channels, a squeeze excitation module is introduced. Perform channel weighting: Compression operation: Compress the feature map of each channel into a scalar using global average pooling. ; Activation operation: Learning the non-linear dependencies between channels through two fully connected layers: ; in For ReLU function, For the Sigmoid function, , , To reduce the proportion, this embodiment takes .
[0096] Recalibration operation: The learned channel weights are then... Multiply by the original feature map channel by channel: ; in This indicates channel-by-channel multiplication.
[0097] 3. Time-frequency attention fusion module This module introduces a multi-head self-attention mechanism to perform global context modeling on multi-scale feature maps, capturing long-range dependencies between different frequency components. This addresses the problem of limited receptive fields and difficulty in associating distant features in convolutional neural networks. Specifically: (1) Feature map flattening and position encoding Will Flattened into a sequence ,in For sequence length. To preserve the spatial location information of the original feature map, learnable positional encoding is added: ; in It is a learnable encoding matrix.
[0098] (2) Calculation of multi-head self-attention A multi-head self-attention mechanism is used to globally model the sequence. For the first... Each attention point is first obtained through a linear transformation to obtain the query matrix. Key matrix Sum matrix : ; in For each head dimension, To determine the number of attention heads, this embodiment takes... .
[0099] Attention weight calculation: ; No. Output per head: ; Multi-head output splicing: ; in This is for outputting the projection matrix.
[0100] (3) Feedforward network and layer normalization Each self-attention layer is followed by a two-layer feedforward network: ; in , .
[0101] Residual connectivity and layer normalization are employed: ; ; (4) Sequence convergence Will The features are aggregated into a fixed-length global feature vector using global average pooling. ; 4. Hybrid Expert Classification Output Module To further improve classification accuracy, especially the ability to distinguish similar fault types, this module adopts a hybrid expert network structure, integrating multiple parallel classifiers and dynamically fusing their outputs. A detailed introduction follows: (1) Expert network structure design There are three parallel expert networks, each of which is a two-layer fully connected network: ; ; in , In this embodiment, the number of experts is taken .
[0102] (2) Gated network Design a gated network to dynamically learn the weight coefficients of each expert: ; in , satisfy .
[0103] (3) Weighted fusion of expert output The outputs of each expert are weighted and summed according to the gating weights: ; (4) Classification output layer Finally, the probability distribution of fault types is obtained through the output layer and the softmax function: ; ; in , This represents the total number of fault categories. Defined in this embodiment... These include: normal operation, insulation aging fault, metallic grounding fault, arc grounding fault, intermittent grounding fault, and high-resistance grounding fault.
[0104] 5. Model Training Process Specifically, the steps include the following: (1) Construction of training dataset To train the deep learning fault diagnosis model, a large-scale labeled dataset was constructed, containing data from the following sources: Actual data acquisition: Under various actual power distribution environments, the residual leakage current sequences before and after various grounding faults were acquired using the instrument transformer described in this invention. The fault types are labeled by domain experts. The measured data covers scenarios with different load conditions, different ambient temperatures, and different grounding resistances.
[0105] Simulation data generation: A typical power distribution network model is built based on electromagnetic transient simulation software to simulate various grounding faults and generate massive amounts of simulated leakage current data to supplement the insufficient sample of rare fault types in the measured data.
[0106] Data augmentation: Performing data augmentation on existing samples, including: Add Gaussian white noise with different signal-to-noise ratios to enhance model robustness; Time axis stretching / compression to simulate power grid frequency fluctuations; Amplitude scaling is used to simulate different leakage current intensities; Generative augmentation based on variational autoencoders generates new samples that conform to the original data distribution.
[0107] Sample balancing: To address the imbalance in the number of fault samples, a focus loss function and oversampling techniques are employed to ensure sufficient training samples for each type of fault. For extremely rare fault types, an auxiliary classifier and a generative adversarial network are used to generate synthetic samples.
[0108] (2) Loss function design A weighted cross-entropy loss function is used to assign higher weights to rare fault categories: ; in For batch size, For the sample True label one-hot encoding, To predict probabilities for the model, For category The weights are normalized based on the reciprocal of the number of samples in each category.
[0109] (3) Optimizer and hyperparameter settings The Adam optimizer is used, with an initial learning rate set to The value decreases to 0.1 times its original value every 20 epochs. Batch size Training rounds An early stopping mechanism is employed, terminating training when the validation set loss no longer decreases for 10 consecutive epochs.
[0110] (4) Training and verification process The dataset was divided into training, validation, and test sets in a 7:2:1 ratio. During training, the model performance was evaluated on the validation set after each epoch, and the parameters of the model with the highest accuracy on the validation set were saved. Finally, the model's generalization ability was evaluated on the test set.
[0111] 6. Model Deployment and Inference Specifically, the steps include the following: (1) Model solidification and compression After training is complete, set the model parameters All learnable parameters are then permanently saved. To address the storage and computational resource limitations of microprocessor chips, model quantization and compression are performed, converting 32-bit floating-point parameters into 16-bit or 8-bit fixed-point numbers, thus reducing model size while maintaining accuracy.
[0112] (2) Forward reasoning process During online runtime, the feature vector extracted for each sliding window The model performs the following forward computation: The input feature reconstruction module will Mapped to ; The multi-scale feature map extraction module obtains the result through parallel computation and fusion of three branches. ; The time-frequency attention fusion module performs global context modeling to obtain ; The hybrid expert classification module calculates the outputs of each expert and then performs gated weighted fusion. Output layer calculates probability distribution .
[0113] In step 5, within the logic control and alarm unit, a fusion judgment is made based on the fault type probability distribution and the effective value of leakage current within the current time window. When the preset confidence threshold and graded current threshold conditions are met, an alarm signal is generated, specifically: This step receives the probability distribution of fault types. and the effective value of leakage current The system determines whether a fault has occurred through fusion judgment logic and generates an alarm signal when the alarm conditions are met. The specific steps include the following: 1. Input data preparation (1) Fault type probability distribution input The probability distribution of fault types output in step 4 ,in The total number of predefined fault types. Defined in this embodiment. The fault types corresponding to each index are: Normal operating status; Insulation aging fault; Metallic grounding fault; Arc grounding fault; Intermittent grounding fault; High-resistance grounding fault; satisfy This distribution reflects the model's confidence level in the category to which the current leakage current waveform belongs.
[0114] (2) Input of effective value of leakage current Leakage current RMS value As given in step 3: ; in This is a pure leakage current residual sequence. This is the length of the sliding window. The current is measured in amperes, representing the overall energy level of leakage current during the current period.
[0115] 2. Fault type determination (1) Extraction of the highest probability category From probability distribution Extract the maximum value and its corresponding category index: ; ; (2) Confidence threshold judgment To ensure the reliability of diagnostic results, a confidence threshold is set. Only when Only when the model's fault type is determined is the fault type accepted; otherwise, the model's diagnostic result is considered to have insufficient confidence, and the current state is marked as pending confirmation. In this embodiment, we take... .
[0116] like If the output is pending confirmation, the system will jump to the output confirmation state and will not trigger an alarm.
[0117] (3) Validity judgment of fault type like Then further judgment Is it a fault type? For Normal operating condition, even Even if the reading is very high, it should not trigger a fault alarm.
[0118] when When a fault is detected, the fault type is determined to be: The corresponding category.
[0119] 3. Alarm threshold determination (1) Setting dynamic alarm threshold To adapt to the sensitivity requirements of different application scenarios, configurable alarm thresholds can be set. This threshold can be adjusted on-site based on factors such as the rated current of the monitored line, environmental conditions, and user requirements. In this embodiment, the default value is [value missing]. This corresponds to the upper limit of the safe current for human body to be electrocuted.
[0120] (2) Hierarchical threshold strategy To improve the flexibility and reliability of alarms, a tiered threshold strategy is adopted: Level 1 warning threshold Used for early warning, reminding maintenance personnel to pay attention; Level 2 alarm threshold Used for general fault alarms; Level 3 Emergency Threshold Used for emergency tripping in case of severe faults; Each threshold level can be configured independently.
[0121] (3) Threshold comparison The current effective value of leakage current Compare with thresholds at various levels: like The system is identified as a serious malfunction, triggering an emergency alarm. like The fault is identified as a general fault, triggering a regular alarm. like This is determined to be an early warning, triggering a warning signal; like Even if the model determines that it is a fault, it will not trigger an alarm, but it can be recorded as an abnormal event.
[0122] 4. Integrating judgment logic (1) Comprehensive judgment conditions The logic control and alarm unit combines the fault type determination result and the threshold comparison result to generate an alarm signal according to the following logic: Condition 1: The fault type exists and the confidence level is sufficient. ; Condition 2: Leakage current RMS value exceeds limit That is, at least the warning level must be reached; When both conditions 1 and 2 are met, the corresponding alarm level is triggered.
[0123] (2) Anti-shake processing To avoid false alarms caused by momentary interference, a continuous confirmation mechanism is adopted. Continuous confirmation is required. An alarm is only triggered after all sliding windows meet the alarm conditions. In this embodiment, we take... , corresponding to The confirmation time is 0.6 seconds, which is one power frequency cycle.
[0124] Let the current time be The alarm sign is When the alarm conditions are met ,otherwise The final alarm trigger signal is: ; 5. Alarm signal generation (1) Alarm signal content when When an alarm signal is generated, it contains the following information fields: Timestamp: The timestamp of the alarm trigger moment, in the format YYYY-MM-DD HH:MM:SS.mmm, provided by the real-time clock of the microprocessor chip; Fault type: The corresponding fault category name; Effective value of leakage current: The unit is mA; Alarm level: based on The level determined by the threshold range can be either early warning, general alarm, or emergency alarm. Confidence level: This reflects the reliability of the diagnostic results; Device Identifier: The unique device ID of the current transformer.
[0125] (2) Pending confirmation status signal when but When this happens, a pending confirmation signal is generated, prompting maintenance personnel to manually verify the information. The pending confirmation signal contains similar information fields, but is marked as pending confirmation.
[0126] (3) Alarm record storage After an alarm signal is generated, it is synchronously stored in the non-volatile memory of the microprocessor chip, forming an alarm log. Each record occupies a fixed length of storage space and supports historical alarm queries.
[0127] In step 6, the fault recording unit responds to the alarm signal by reading the original zero-sequence current sequence data of a specified length before and after the alarm trigger time from the circular buffer, adding a time stamp, storing it as a recording file, and sending it out through the communication interface. Specifically: This step responds to the alarm signal generated by the logic control and alarm unit by reading the original zero-sequence current sequence before and after the alarm trigger moment from the buffer of the analog-to-digital conversion module. The data, after being time-stamped, is stored and sent out via a communication interface to provide raw waveform data for post-fault analysis and inversion. The relevant content in step 6 will be introduced next: 1. Circular Buffer Management (1) Buffer structure design The microprocessor chip internally maintains a dedicated circular buffer for fault recording, which stores the latest raw zero-sequence current sequence using a first-in, first-out (FIFO) principle. The total length of the buffer is Each sampling point is divided into two halves: front and back. Front half Stores historical data prior to alarm triggering; The second half Stores real-time data after an alarm is triggered; In this embodiment, take Point, corresponding The duration is 0.4 seconds. Let's assume... The point refers to storing 0.2 seconds of historical data before the alarm is triggered, and continuing to store 0.2 seconds of real-time data after the alarm is triggered.
[0128] (2) Buffer write operation At each sampling time The analog-to-digital conversion module outputs a new sample. Then, write it to the current position of the circular buffer. Write pointer Update as follows: ; The buffer always keeps the most recent For each sample, the old data is automatically overwritten by the new data.
[0129] (3) Buffer read pointer management Read pointer This is used to locate the position in the buffer at the moment the alarm is triggered. When an alarm is triggered, the current write pointer position is recorded as... The starting position of the historical data is: ; 2. Alarm Triggering and Data Capture (1) Trigger signal detection The alarm trigger signal output by the logic control and alarm unit The interrupt input is connected to the fault recording unit. When When the waveform changes from 0 to 1, a rising edge interrupt is generated, triggering the waveform recording operation.
[0130] (2) Triggering time capture The interrupt service routine immediately performs the following actions: Read the current real-time clock to obtain the precise time stamp of the trigger moment. ; Read the current write pointer position As ; Calculate the starting position of the waveform data ; (3) Reading waveform data From the starting position Begin reading sequentially. Each sample constitutes a complete waveform data block. During the reading process, buffer wrapping needs to be handled: for to : ; in Corresponding time The original zero-sequence current sample.
[0131] 3. Waveform data storage (1) Storage format definition The waveform recording data is stored in a structured format in the non-volatile memory of the microprocessor chip, and each waveform recording file contains the following parts: File header: Fixed length, contains: File identifier: 4 bytes, fixed as WAVE; Version number: 2 bytes, identifies the version of the waveform data format; Device ID: 8 bytes, a unique identifier for the current transformer; Triggering timestamp: 8 bytes, UNIX timestamp format; Sampling rate 4 bytes, unit: Hz; Wavelength : 4 bytes, unit sample number; Pre-trigger length : 4 bytes, unit sample number; Fault type at trigger: 2 bytes, corresponding to the fault type code; Effective value of leakage current at trigger 4 bytes, unit mA; Checksum: 4 bytes, used for file integrity verification; Data body: Variable length portion, containing One raw zero-sequence current sample. Each sample is stored in a 16-bit signed integer format, consistent with the ADC output format.
[0132] (2) Storage space management The microprocessor chip is equipped with a dedicated Flash memory area for waveform recording data storage, with a capacity of [missing information]. Bytes. A circular overwrite strategy is used, automatically overwriting the oldest waveform file when there is insufficient remaining space.
[0133] In this embodiment, the size of each waveform recording file is approximately: ; If configured It can store approximately 100 waveform files.
[0134] (3) Storage protection mechanism For waveform recordings at the emergency alarm level, a write-protection mechanism is employed to prevent automatic overwriting. When the maximum number of emergency waveform recordings is reached, new emergency waveform recordings will be stopped, or the user will be notified to manually clean them up.
[0135] 4. Output of waveform recording data (1) Report proactively After waveform recording is completed, a waveform recording completion notification is actively sent to the host monitoring system via the communication interface, including the waveform recording file index and trigger timestamp. The host computer can then issue a read command to obtain the complete waveform recording data as needed.
[0136] (2) Passive query It supports passively querying the list of waveform recording files and reading data from a specified waveform recording file via the communication interface. The query command format conforms to the Modbus protocol specification, and the read command returns the complete content of the waveform recording file.
[0137] (3) Data export format To facilitate processing by third-party analysis software, the waveform data can be exported as standard Comtrade format CFG and DAT files. The CFG file contains configuration information such as channel information, sampling rate, and time scale, while the DAT file contains the raw sample data.
[0138] (4) Post-processing of waveform recording Continuous waveform recording to prevent re-triggering: To prevent the same fault event from triggering waveform recording multiple times and thus wasting storage resources, a waveform recording suppression time is set. After one waveform recording was completed, No new waveform recording triggers will be responded to within the specified time. In this embodiment, the following is taken: Second.
[0139] Brief Analysis of Waveform Recording Data: After recording is completed, the recorded data can be briefly analyzed to extract key features such as peak value, RMS value, and main frequency components, which can then be stored together with the recorded data file for easy browsing and retrieval.
[0140] The fault recording unit outputs a complete recording data file, including the original zero-sequence current waveforms before and after the alarm trigger moment, as well as relevant configuration information and trigger parameters. This data provides the original basis for fault inversion, cause analysis, and protection setting verification.
[0141] Embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0142] 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, and 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 illustrations and / or block diagrams. Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0143] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0144] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0145] Contents not described in detail in this specification are prior art known to those skilled in the art. It is hereby indicated that the above description is intended to help those skilled in the art understand this invention, but does not limit the scope of protection of this invention. Any equivalent substitutions, modifications, improvements, or simplifications of the above descriptions that do not depart from the essential content of this invention fall within the scope of protection of this invention.
Claims
1. An intelligent zero sequence current transformer, characterized by include: The system comprises a toroidal magnetic core, a high-sensitivity leakage current detection circuit, and a microprocessor chip. The toroidal magnetic core is installed on the monitored three-phase four-wire cable. The toroidal magnetic core is connected to the high-sensitivity leakage current detection circuit, which is connected to the microprocessor chip. The microprocessor chip is equipped with a communication interface, through which alarm signals and waveform recording files are sent to the outside. The toroidal magnetic core is used to sense zero-sequence current signals; The high-sensitivity leakage current detection circuit is used to convert the sensed zero-sequence current signal into a voltage signal and perform primary amplification and anti-aliasing filtering to output an analog voltage signal. The microprocessor chip is used to perform the following steps: Convert analog voltage signals into a digital raw zero-sequence current sequence; The original zero-sequence current sequence is subjected to multi-stage adaptive filtering to gradually remove the power frequency fundamental wave, harmonics and noise interference, and output a pure leakage current residual sequence. Time-domain and frequency-domain features are extracted from the leakage current residual sequence to form a feature vector; Fault diagnosis is performed on feature vectors based on deep learning models, and the probability distribution of fault types is output. The system performs a fusion judgment based on the probability distribution of fault types and the effective value of leakage current, and generates an alarm signal when the preset conditions are met. In response to an alarm signal, the original zero-sequence current sequence before and after the alarm trigger moment is read and stored as waveform data.
2. The smart zero sequence current transformer of claim 1, wherein, The microprocessor chip includes: an analog-to-digital conversion module, a three-stage cascaded adaptive filter calibration unit, a multi-scale time-frequency feature extraction unit, a multi-scale time-frequency attention fusion network, a logic control and alarm unit, and a fault recording unit. The high-sensitivity leakage current detection circuit is connected to the analog-to-digital conversion module. The analog-to-digital conversion module is connected to the three-stage cascaded adaptive filter calibration unit. The three-stage cascaded adaptive filter calibration unit is connected to the multi-scale time-frequency feature extraction unit. The multi-scale time-frequency feature extraction unit is connected to the multi-scale time-frequency attention fusion network. The multi-scale time-frequency attention fusion network is connected to the logic control and alarm unit. The logic control and alarm unit is connected to the fault recording unit. The analog-to-digital converter module is used to convert analog voltage signals into a digital raw zero-sequence current sequence; The three-stage cascaded adaptive filter calibration unit is used to employ a three-stage processing architecture of adaptive Kalman filtering, which uses fuzzy logic adaptive LMS power frequency fundamental suppression, adaptive notch filter group harmonic and interharmonic separation, and particle swarm-genetic algorithm optimization. It gradually removes the power frequency fundamental, integer harmonics, interharmonics and white noise interference from the original zero-sequence current sequence and outputs a pure leakage current residual sequence. The multi-scale time-frequency feature extraction unit is used to extract a multi-dimensional feature vector, including time-domain statistical features and frequency-domain distribution features, from the leakage current residual sequence in a sliding time window manner. The multi-scale time-frequency attention fusion network is used to output the probability distribution of fault types based on multi-dimensional feature vectors through multi-scale parallel convolution, channel attention, time-frequency attention fusion and hybrid expert classification architecture; The logic control and alarm unit is used to perform a fusion judgment based on the probability distribution of fault type and the effective value of leakage current in the current time window. When the preset confidence threshold and graded current threshold conditions are met, an alarm signal including fault type, effective value of leakage current and alarm level is generated. The fault recording unit is used to maintain the original zero-sequence current sequence stored in the circular buffer in real time, and in response to the alarm signal, read the original data of a specified length before and after the alarm trigger time from the circular buffer, add a time stamp, and store it as a recording file.
3. The smart zero sequence current transformer of claim 1, wherein, The high-sensitivity leakage current detection circuit includes: a precision sampling resistor, a low-noise precision instrumentation amplifier, and a second-order Butterworth active low-pass filter. The precision sampling resistor is connected in parallel across the two ends of the secondary winding of the toroidal magnetic core. The precision sampling resistor is connected to the low-noise precision instrumentation amplifier, and the low-noise precision instrumentation amplifier is connected to the second-order Butterworth active low-pass filter. The precision sampling resistor is used to convert the secondary-side induced current into a voltage signal; The low-noise precision instrumentation amplifier has a differential input structure; The second-order Butterworth active low-pass filter is used for anti-aliasing filtering.
4. The smart zero sequence current transformer of claim 2, wherein, The three-stage cascaded adaptive filtering calibration unit includes a first-stage fuzzy adaptive LMS power frequency fundamental wave suppression module, a second-stage adaptive notch filter group harmonic and interharmonic separation module, and a third-stage particle swarm-genetic algorithm optimized adaptive Kalman filter module.
5. The smart zero sequence current transformer of claim 2, wherein, The time-domain statistical features include root mean square value, peak value, waveform factor, impulse factor, margin factor, skewness, and kurtosis.
6. The smart zero sequence current transformer of claim 2, wherein, The frequency domain distribution characteristics include fundamental frequency amplitude, the proportion of each harmonic amplitude, total harmonic distortion rate, spectral centroid, spectral bandwidth, and high-frequency energy proportion.
7. The smart zero sequence current transformer of claim 2, wherein, The multi-scale time-frequency attention fusion network includes: an input feature reconstruction module, a multi-scale feature map extraction module, a time-frequency attention fusion module, and a hybrid expert classification output module; The input feature reconstruction module projects multidimensional feature vectors to a high-dimensional space and reshapes them into a two-dimensional feature map through a fully connected layer. The multi-scale feature map extraction module includes three parallel convolutional branches, which are used to extract local detail features, mesoscale waveform features and global periodic features, respectively. The outputs of each branch are concatenated and fused after residual connection, and channel weighting is performed through the squeezing excitation module to output a multi-scale feature map. The time-frequency attention fusion module is used to flatten the multi-scale feature map into a sequence and add learnable positional encoding. It performs global context modeling through a multi-head self-attention mechanism and converges the global feature vector through a feedforward network and layer normalization by global average pooling. The hybrid expert classification output module includes multiple parallel expert networks and a gated network. The gated network dynamically calculates the weights of each expert network based on the global feature vector. The expert outputs are weighted and fused together, and then passed through the output layer and the softmax function to obtain the fault type probability distribution.
8. A leakage current detection and fault diagnosis method of an intelligent zero sequence current transformer, applied to the intelligent zero sequence current transformer of any one of claims 1-7, characterized in that, include: Step 1: Zero-sequence current is induced by a toroidal magnetic core, and after signal conditioning by a high-sensitivity leakage current detection circuit, the original zero-sequence current sequence is generated by the analog-to-digital conversion module. Step 2: Input the original zero-sequence current sequence into the three-stage cascaded adaptive filter calibration unit. The three-stage processing architecture of adaptive Kalman filter with fuzzy logic adaptive LMS power frequency fundamental frequency suppression, adaptive notch filter group harmonic and interharmonic separation, and particle swarm-genetic algorithm optimization is adopted to remove power frequency fundamental frequency, integer harmonics, interharmonics and white noise interference step by step, and output a pure leakage current residual sequence. Step 3: In the multi-scale time-frequency feature extraction unit, a multi-dimensional feature vector containing time-domain statistical features and frequency-domain distribution features is extracted from the leakage current residual sequence using a sliding time window method; Step 4: Input the multi-dimensional feature vector into the multi-scale time-frequency attention fusion network, extract local details, mesoscale and global periodic features through multi-scale parallel convolution, perform global context modeling through channel attention weighting and multi-head self-attention, and then output the fault type probability distribution through a hybrid expert classifier. Step 5: In the logic control and alarm unit, a fusion judgment is made based on the probability distribution of fault types and the effective value of leakage current in the current time window. When the preset confidence threshold and graded current threshold conditions are met, an alarm signal is generated. Step 6: In response to the alarm signal, the fault recording unit reads the original zero-sequence current sequence data of a specified length before and after the alarm trigger time from the circular buffer, adds a time stamp, stores it as a recording file, and sends it out through the communication interface.
9. The method of leakage current detection and fault diagnosis of the smart zero sequence current transformer according to claim 8, characterized in that, In step 5, within the logic control and alarm unit, a fusion judgment is made based on the fault type probability distribution and the effective value of leakage current within the current time window. When the preset confidence threshold and graded current threshold conditions are met, an alarm signal is generated, specifically: extracting the maximum probability from the failure type probability distribution and its corresponding class index ; If and then it is determined that there is a fault, and the fault type is corresponding to the category, wherein is a preset confidence threshold; determining a current leakage current effective value three-level threshold with hierarchical current threshold conditions , , determining an alarm level; If the consecutive If the consecutive sliding windows all satisfy the fault existence condition and the corresponding alarm level condition, an alarm is triggered, and an alarm signal including the time stamp, the fault type, the leakage current effective value, the alarm level, the confidence, and the device ID is generated.