An on-line leakage detection and early warning module for outdoor line pole

By using an adaptive threshold calculation and dynamic sampling scheduling submodule, the threshold and sampling rate of the leakage current monitoring device are dynamically adjusted, which solves the problem of false alarms and missed alarms of outdoor pole leakage current monitoring devices under different environmental conditions, improves fault detection capability and extends battery life.

CN122386188BActive Publication Date: 2026-08-25国网内蒙古东部电力有限公司呼伦贝尔供电公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610841950.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-11
Publication Date
2026-08-25
Estimated Expiration
2046-06-11

AI Technical Summary

Technical Problem

Existing outdoor pole leakage current monitoring devices use fixed parameters for alarm criteria and sampling cycle, resulting in both false alarms and missed alarms under different environmental conditions, making it impossible to simultaneously meet the requirements of transient fault capture and long battery life.

Method used

An adaptive threshold calculation submodule and a dynamic sampling scheduling submodule are adopted. Based on the temperature and humidity values ​​obtained by the environmental sensing unit, two-dimensional bins are divided to construct dynamic early warning and alarm thresholds. The sampling rate is adjusted through a multi-level state machine to achieve closed-loop coordination between dynamic thresholds and sampling data, thereby reducing power consumption and improving transient fault capture capabilities.

Benefits of technology

It reduces the probability of false alarms in environments such as high humidity and rainy weather, improves the response capability to transient faults, extends battery life, and avoids baseline contamination and invalid high-frequency sampling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122386188B_ABST
    Figure CN122386188B_ABST
Patent Text Reader

Abstract

The application discloses an online electric leakage detection and early warning module for outdoor line poles and relates to the technical field of power line monitoring. The module comprises a current collection unit, a signal conditioning unit, an environment sensing unit and a main control processing unit. An adaptive threshold calculation submodule and a dynamic sampling scheduling submodule are arranged in the main control processing unit. The adaptive threshold calculation submodule divides the environment into bins according to temperature and humidity, constructs a robust baseline with a median and an absolute deviation of the median, and generates a dynamic alarm threshold. The dynamic sampling scheduling submodule divides the operation into five states, i.e., deep sleep, fast scanning, monitoring, intensive capture and alarm confirmation, and the transition is driven by the dynamic threshold and the signal trend. The two submodules are coordinated through a sample bucket permission flag, the data during the fault period is prohibited from being backfilled into the baseline, and closed-loop purification is realized. The application takes into account low false alarm, high sensitivity and transient fault capture capability, and does not significantly increase power consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power line monitoring technology, and in particular to an online leakage current detection and early warning module for outdoor power poles. Background Technology

[0002] Outdoor power distribution poles are exposed to wind, rain, fog, salt spray, dust, and other natural environments for extended periods. Increased leakage current and even flashover discharge due to dirt accumulation, moisture, or glaze damage on the insulator surface pose a significant threat to the safe operation of power distribution networks. These leakage faults are often characterized by weak fault currents, dispersed locations, and difficulty in rapid localization, placing high demands on the detection sensitivity and reliability of pole-level leakage monitoring devices.

[0003] Existing pole-mounted leakage current monitoring devices are typically installed in the middle of the pole using a clamp method and are battery-powered. Their basic operating framework involves sampling the leakage current at fixed intervals and comparing the sampling results with a factory-preset fixed current threshold. If the threshold is exceeded, a local alarm is triggered. However, the normal baseline level of leakage current at outdoor poles is not constant but varies significantly with environmental factors such as temperature, relative humidity, surface contamination levels, and rainfall intensity. In high humidity or continuous rainy conditions, the normal baseline of leakage current may approach or even exceed the fixed threshold, leading to numerous false alarms. In dry seasons, even if insulators show early defects, they may be missed because the absolute value of the leakage current is still below the fixed threshold. Meanwhile, typical faults such as early insulator breakdown and wind-induced discharge often occur as transient pulses ranging from milliseconds to hundreds of milliseconds, and the fixed sampling interval of existing devices, occurring every few seconds or even tens of seconds, easily misses these rapid events. Simply increasing the sampling frequency to capture transient signals would drastically increase battery consumption, making it difficult to meet the lifespan requirements for years of continuous operation under outdoor maintenance-free conditions. The two shortcomings mentioned above are interrelated in the engineering field. The fixed threshold that does not drift with the environment causes the detection criteria to deviate from the actual baseline under different weather conditions. This not only directly generates false alarms and missed alarms, but also repeatedly triggers unnecessary high-frequency sampling processes on rainy days, further accelerating battery depletion. Summary of the Invention

[0004] To address the technical problems of existing outdoor pole leakage current monitoring devices, which use fixed parameters for alarm criteria and sampling cycle, resulting in both false alarms and missed alarms under different environmental conditions, and which cannot simultaneously meet the requirements of transient fault capture and long battery life, this invention provides an online leakage current detection and early warning module for outdoor poles.

[0005] An online leakage current detection and early warning module for outdoor utility poles includes a current acquisition unit, a signal conditioning unit, an environmental sensing unit, a main control processing unit, a data storage unit, an early warning output unit, and a communication unit. The main control processing unit includes an adaptive threshold calculation submodule and a dynamic sampling scheduling submodule. The adaptive threshold calculation submodule divides the environmental conditions into a two-dimensional sub-bin array based on the temperature and humidity values ​​obtained by the environmental sensing unit. Each sub-bin maintains an independent rolling sample buffer. The leakage current normal baseline of the sub-bin is constructed by using a robust statistical method based on the median and median absolute deviation for the samples in the buffer. The dynamic early warning threshold and dynamic alarm threshold that change with the environmental conditions are synthesized in real time based on the median and median absolute deviation. The dynamic sampling scheduling submodule divides the module's operation into five states: deep sleep state, fast scan state, monitoring state, dense capture state, and alarm confirmation state. The transition conditions between each state are determined by the position of the current sampled value relative to the dynamic alarm threshold, the corrected Z-score of the current sampled value, and the amplitude of signal change. This ensures that the module is in a low-power deep sleep state most of the time, and only enters a higher sampling rate state to capture transient faults when a suspicious signal appears. The adaptive threshold calculation submodule and the dynamic sampling scheduling submodule share a sample bucket permission flag. The sample bucket permission flag is only valid when the dynamic sampling scheduling submodule is in deep sleep, fast scan, or monitoring state. Sampling data acquired in dense capture state and alarm confirmation state is prohibited from being written to the rolling sample buffer, thereby realizing closed-loop coordination between dynamic threshold output and sampling data purification.

[0006] As a preferred embodiment of the present invention, the two-dimensional binning array uses temperature as the first dimension and relative humidity as the second dimension. The temperature dimension is divided into multiple levels with a preset step size, and the humidity dimension is also divided into multiple levels with a preset step size. The rolling sample buffer adopts a fixed-length circular buffer structure, where new samples overwrite the oldest samples when they are written. The median absolute deviation is calculated by subtracting the median from all valid samples in the buffer and taking the absolute value, then taking the median of the resulting sequence. This binning and statistical structure ensures that each temperature and humidity operating unit maintains independent baseline characteristics, avoiding mutual interference between samples under different environmental conditions.

[0007] As a preferred embodiment of the present invention, the formula for calculating the corrected Z-score is as follows: ,in This is the current sampled value. This is the median of the current bins. This represents the absolute deviation of the median of the current binning. For fixed-point proportionality constants, The minimum denominator clamping value is used; when the absolute value of the modified Z-score falls into different preset intervals, it corresponds to four judgment results: normal, slightly abnormal, significantly abnormal, and strongly abnormal. The adaptive threshold calculation submodule determines whether the current sampled value is allowed to be written into the rolling sample buffer based on the judgment result, and the dynamic sampling scheduling submodule determines the state transition direction based on the judgment result. The modified Z-score uses robust statistics as a benchmark to measure the degree of deviation of the sampled value from the baseline, providing a unified quantitative criterion for sample selection and state transition.

[0008] As a preferred embodiment of the present invention, the dynamic early warning threshold is synthesized in the following way: The method for synthesizing the dynamic alarm threshold is as follows: ,in , For remotely configurable coefficients and The synthesized threshold is then subjected to engineering clamping to ensure it is neither lower than the preset minimum clamping value nor higher than the preset maximum clamping value. This dual-level threshold structure, combined with engineering clamping, can maintain sensitivity while preventing threshold runaway under extreme conditions.

[0009] As a preferred embodiment of the present invention, the adaptive threshold calculation submodule applies a time-varying exponential decay weighting to the samples in the rolling sample buffer before calculating the statistics. The weight value of each sample is obtained through a discrete lookup table on a daily basis, and samples with weights lower than a preset expiration threshold are removed before participating in the calculation of the statistics. This mechanism enables the baseline to follow seasonal drift trends without being over-anchored by long-standing historical samples.

[0010] As a preferred embodiment of the present invention, the module enters a cold start period within a preset time frame after initial deployment. During the cold start period, all sampled values ​​that do not constitute an overload are unconditionally written into the rolling sample buffer of the corresponding bin, and only a preset maximum clamping value is used as the fallback alarm threshold. After the cold start period ends, when the number of stored samples in any bin is lower than a preset proportion of the length of the rolling sample buffer, the adaptive threshold calculation submodule retrieves the neighboring valid bins of that bin and generates a virtual baseline using a distance-based weighted average method. If none of the neighboring bins have valid data, the bin continues to use the preset maximum clamping value as the fallback threshold. This strategy ensures that the module still has basic overload protection capabilities during initial deployment and data sparsity phases, while accelerating the establishment process of each bin's baseline.

[0011] As a preferred embodiment of the present invention, the signal conditioning unit includes a precision full-wave rectifier stage and an analog switch connected in parallel with the precision full-wave rectifier stage. The analog switch is controlled and switched by the main control processing unit. In deep sleep mode, fast scan mode, and monitoring mode, the analog switch is in the rectification path position. The signal is rectified into a unipolar signal by the precision full-wave rectifier stage. After integration, the average rectified value is obtained as a unified scale for baseline learning and threshold comparison. In dense acquisition mode, the analog switch is switched to the bypass position. The signal bypasses the precision full-wave rectifier stage and outputs the original positive and negative alternating signal to retain the complete spectral structure for subsequent harmonic analysis.

[0012] As a preferred embodiment of the present invention, the dynamic sampling scheduling submodule employs an asymmetric hysteresis mechanism in the state escalation / degradation criteria. The escalation from monitoring state to dense capture state is based on the dynamic alarm threshold, and the degradation from dense capture state or alarm confirmation state to a lower state is based on the dynamic early warning threshold. Degradation requires the moving average to be continuously lower than the dynamic early warning threshold for a preset duration. After the alarm confirmation state ends, the adaptive threshold calculation submodule places the corresponding bin in a cooling state, rejecting any new samples from being written to the rolling sample buffer of that bin during a preset cooling period. The asymmetric hysteresis and cooling protection together suppress state jitter near the threshold boundary and baseline contamination during the alarm fading transition.

[0013] As a preferred technical solution of the present invention, in the dense acquisition state, the dynamic sampling scheduling submodule calculates the arithmetic mean of the absolute values ​​of the acquired original positive and negative alternating signals in the software to obtain the average rectified value. The average rectified value is compared with the dynamic alarm threshold to determine the over-limit, thereby ensuring that the over-limit judgment in the dense acquisition state is strictly consistent with the measurement benchmark in the baseline learning stage. When the amplitude difference between adjacent sampling points exceeds the preset lightning threshold and the duration width of the corresponding pulse is lower than the preset time threshold, the sampling points are marked as lightning induced pulses and excluded from the over-limit statistics to avoid false alarms caused by lightning induction.

[0014] As a preferred technical solution of the present invention, after the intensive acquisition state is completed, the dynamic sampling scheduling submodule performs a fast Fourier transform on the stored waveform data of the original positive and negative alternating signals to extract the fundamental amplitude and the distortion rate of each harmonic. It then performs soft classification of fault types according to a preset rule tree based on the number of pulses, pulse interval, and maximum adjacent sampling difference. The soft classification result is reported as an attached label along with the alarm event through the communication unit, providing remote maintenance personnel with a preliminary reference for the nature of the fault.

[0015] Compared with the prior art, the present invention has the following beneficial effects: This invention maintains an independent rolling sample baseline for each set of temperature and humidity environmental conditions and synthesizes dynamic alarm thresholds in real time using robust statistics. This allows alarm criteria to automatically adapt to weather and seasonal changes, reducing the probability of false alarms caused by baseline drift in high humidity and rainy environments. Simultaneously, it enables the identification of early weak fault signals in dry seasons where the absolute current is small but the relative baseline is significantly raised. By dividing the module's operation into five states—deep sleep, fast scan, monitoring, intensive capture, and alarm confirmation—and driving each state transition with dynamic thresholds and signal change amplitude, the module maintains a deep sleep state with extremely low power consumption for most of the time. Only when a suspicious signal appears does it briefly enter a millisecond-level high-speed sampling state to capture transient fault pulses. This improves the response capability to transient and intermittent faults without significantly shortening battery life. The aforementioned dynamic threshold mechanism and multi-level sampling state machine form a closed loop through a sample entry permission flag. Sampling data during the intensive capture and alarm phases do not participate in baseline learning, avoiding baseline contamination by fault samples. Simultaneously, the dynamic threshold provides a trigger criterion for state transitions that does not drift with weather, suppressing invalid high-frequency sampling caused by environmental changes. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the system structure of a preferred embodiment of the present invention; Figure 2 This is a schematic diagram of the overall architecture of a preferred embodiment of the present invention.

[0017] The module includes: 100, Online Leakage Detection and Early Warning Module; 101, Current Acquisition Unit; 102, Signal Conditioning Unit; 103, Environmental Sensing Unit; 104, Main Control Processing Unit; 105, Adaptive Threshold Calculation Submodule; 106, Dynamic Sampling Scheduling Submodule; 107, Data Storage Unit; 108, Display Unit; 109, Early Warning Output Unit; 110, Communication Unit; 111, Power Management Unit; and 112, Clock Unit. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention.

[0019] like Figure 2As shown, the online leakage current detection and early warning module 100 for outdoor utility poles provided by this invention has a flat box-like structure with shell dimensions of approximately 320mm × 260mm × 115mm. It employs a sealing protection design with a rating of at least IP67 and is fixedly installed in the middle of the outdoor utility pole using a clamp assembly. The shell material of the online leakage current detection and early warning module 100 should preferably be weather-resistant engineering plastic or die-cast aluminum alloy, with anodized or spray-coated surfaces to withstand long-term outdoor ultraviolet radiation and salt spray corrosion. The clamp assembly uses a stainless steel clip combined with a rubber pad structure to ensure reliable fixation within a pole diameter range of 150mm to 300mm without damaging the pole surface coating. A labeling area is located at the front for attaching equipment markings.

[0020] See Figure 1 The system architecture shown comprises an online leakage current detection and early warning module 100, which consists of a current acquisition unit 101, a signal conditioning unit 102, an environmental sensing unit 103, a main control processing unit 104, a data storage unit 107, a display unit 108, an early warning output unit 109, a communication unit 110, a power management unit 111, and a clock unit 112. The main control processing unit 104 is further divided into two functional sub-modules at the software level: an adaptive threshold calculation sub-module 105 and a dynamic sampling scheduling sub-module 106. These two sub-modules work together to form the core control logic of this invention. The technical details of each unit will be elaborated below according to the signal flow from signal input to early warning output.

[0021] The current acquisition unit 101 is responsible for sensing the leakage current flowing through the down conductor or grounding down conductor of the pole. The current acquisition unit 101 can be configured with either a through-core flexible Rogowski coil or a switchable precision current transformer. When using the Rogowski coil, the coil sensitivity is selected to be 100mV / A, the inner diameter is not less than φ50mm to accommodate down conductors of different diameters, and the frequency response range covers 10Hz to 10kHz. Since the Rogowski coil output signal is a differential of the current, the current acquisition unit 101 is also equipped with a single-stage operational amplifier integrating circuit, with a feedback resistor of 100kΩ and an integrating capacitor of 10nF, to restore the differential signal to an alternating voltage signal proportional to the leakage current. When using the iron-core current transformer, a device with a transformation ratio of 100 / 0.1A and an accuracy class not lower than 0.5 is selected, and a magnetic shield is added to the transformer to suppress electromagnetic coupling interference from adjacent phase buses. The output of the current acquisition unit 101 is connected to the signal conditioning unit 102 via an isolation terminal block, thereby achieving electrical isolation. It should be noted that, regardless of whether a Rogowski coil scheme or an iron-core current transformer scheme is used, the output of the current acquisition unit 101 is an alternating voltage signal proportional to the measured leakage current, and its fundamental frequency is consistent with the power grid frequency, typically 50Hz.

[0022] The signal conditioning unit 102 undertakes all conditioning tasks from the alternating analog signal output from the current acquisition unit 101 to a clean signal suitable for digital processing. Internally, it contains six functional stages arranged sequentially according to the signal flow, and through switchable signal paths, it meets the needs of two operating modes: average rectified value measurement and raw AC waveform analysis. The first stage is a common-mode and differential-mode suppression network, consisting of a 1MΩ differential-to-ground discharge resistor, a 100pF common-mode capacitor, a 4.7nF differential-mode capacitor, a bidirectional transient suppression diode, and a resettable fuse. This network clamps common-mode interference and surge overvoltage, protecting subsequent precision components. The second stage is an instrumentation amplifier stage, employing a low-drift, low-noise instrumentation amplifier with a fixed gain of 10, performing preliminary signal amplification. The third stage is a precision full-wave rectifier stage and signal path switching component. The precision full-wave rectifier circuit uses a classic topology based on operational amplifiers and diode bridges to convert the alternating voltage signal into a unipolar pulsating DC signal, eliminating only the negative half-cycle polarity of the signal. A low-on-resistance single-pole double-throw analog switch is connected in parallel between the input and output terminals of a precision full-wave rectifier circuit. The control terminal of this analog switch is driven by a general-purpose input / output port of the main control processing unit 104. When the analog switch is in its default position, the signal is rectified into a unipolar signal by the precision full-wave rectifier circuit. This path is used in deep sleep, fast scan, and monitoring states, ensuring that the analog-to-digital converter always acquires a non-negative value. A single-cycle integration yields the average rectified value, which is proportional to the effective value of the leakage current. When the analog switch is switched to the bypass position by the main control processing unit 104, the signal bypasses the precision full-wave rectifier circuit and directly outputs the original positive and negative alternating signal. This path is used in dense capture state to preserve the complete AC waveform information and original spectral structure of the leakage current, providing raw data without nonlinear distortion for subsequent fast Fourier transform harmonic analysis. The switching time of the analog switch is on the order of microseconds, which does not affect the sampling continuity in dense capture state. The fourth stage is an anti-aliasing low-pass filter, employing a fourth-order Sallen-Key topology with a cutoff frequency set at 1kHz. Its passband flatness is better than 0.5dB, and this cutoff frequency provides at least twice the Nyquist margin relative to the subsequent highest sampling rate of 4kHz. The fifth stage is a programmable gain amplifier, offering six selectable gain levels: 1x, 2x, 4x, 8x, 16x, and 32x. The main control unit 104 switches the gain level in real-time via a serial peripheral interface to adapt to leakage current measurement requirements within different ranges. The sixth stage is an analog-to-digital converter, using Σ-Δ devices with 16-bit to 24-bit resolution, supporting single-ended or differential input. The reference voltage is set to 2.048V, and the conversion rate can be switched as needed between 8 times per second and 4000 times per second.The power supply of the entire signal chain of the signal conditioning unit 102 is controlled by the turn-off low-dropout linear regulator and load switch in the power management unit 111. When the main control processing unit 104 issues a power-off command, the static leakage current of the signal conditioning unit 102 is less than 100nA, so it consumes almost no battery energy in deep sleep mode.

[0023] The environmental sensing unit 103 is used to acquire real-time temperature and relative humidity data of the environment in which the online leakage current detection and early warning module 100 is located, providing environmental classification basis for the adaptive threshold calculation submodule 105. The main sensing element of the environmental sensing unit 103 is a digital temperature and humidity sensor, which is connected to the main control processing unit 104 via a two-wire serial bus. The temperature measurement range covers -40℃ to +125℃ with an accuracy better than ±0.2℃, and the relative humidity measurement range covers 0 to 100%RH with an accuracy better than ±1.8%RH. In addition, the environmental sensing unit 103 also includes a negative temperature coefficient thermistor with a nominal resistance of 10kΩ, which is installed close to the coil body of the current acquisition unit 101 to monitor the coil winding temperature for temperature drift compensation correction. The power supply of the environmental sensing unit 103 is also controlled by the general-purpose input / output port of the main control processing unit 104. The typical current during operation is about 5μA, and the current during sleep is less than 0.5μA. It is only awakened and powered when the dynamic sampling scheduling submodule 106 is in fast scan state, monitoring state or dense capture state.

[0024] The main control processing unit 104 is the core of the online leakage current detection and early warning module 100 for computation and scheduling. It uses a low-power microcontroller with a 32-bit processor architecture featuring a floating-point unit, and its clock frequency supports dynamic switching between 1MHz, 8MHz, and 48MHz. The on-chip resources of the main control processing unit 104 include at least 256kB of flash memory, 64kB of random access memory, a real-time clock module, a direct memory access controller, low-power timers, general-purpose timers, a 12-bit auxiliary analog-to-digital converter, and at least one serial peripheral interface, one two-wire serial bus interface, and one universal asynchronous transceiver. In the lowest power shutdown mode, the main control processing unit 104 consumes less than 2μA of current; in 8MHz operating mode, the typical operating current is approximately 1.2mA. At the software level, the main control processing unit 104 is divided into an adaptive threshold calculation submodule 105 and a dynamic sampling scheduling submodule 106. The adaptive threshold calculation submodule 105 implements all the computational logic for the environmental adaptive leakage current baseline learning and dynamic threshold generation algorithm. It uses fixed-point number representation for encoding to reduce computational power consumption, and all constants involved in multiplication are pre-converted to fixed-point integers or shifted approximations and stored in a configuration table. The dynamic sampling scheduling submodule 106 implements a multi-level dynamic sampling state machine based on signal trends. It operates using a structured state machine framework with foreground, background, and time slices, requiring no real-time operating system support.

[0025] The data storage unit 107 provides non-volatile data persistence for the online leakage current detection and early warning module 100, and consists of an external serial flash memory chip and an on-chip electrically erasable read-only memory. The serial flash memory chip has a capacity of 16 megabits and is connected to the main control processing unit 104 via a serial peripheral interface. The storage space of the data storage unit 107 is divided into four logical partitions: a configuration table area, a baseline table area, an event waveform area, and a log area. The configuration table area is allocated approximately 512KB of space for storing configuration data such as sensitivity coefficients, threshold clamping parameters, state machine parameters, and fixed-point constant lookup tables, which are not lost after power failure. The baseline table area is allocated approximately 2MB of space for storing the rolling sample buffers and statistics corresponding to approximately 220 environmental bins, and this area adopts a wear-leveling write strategy. The event waveform area is allocated approximately 10MB of space for storing high-resolution waveform data segments captured by the dynamic sampling scheduling submodule 106 in intensive capture and alarm confirmation states in a circular overlay manner. The log area uses the remaining space to store operation logs and self-test records. All write operations of the data storage unit 107 are managed through a lightweight file system or a self-developed dual backup plus cyclic redundancy check mechanism to ensure power failure safety and extend the life of the flash memory to more than ten years.

[0026] Display unit 108 provides on-site inspection personnel with intuitive local information reading capabilities. Display unit 108 uses a segment-type low-power LCD display, controlled by a dedicated LCD driver chip. The main display area of ​​display unit 108 displays the current leakage current value in milliamperes (mA) using a four-digit code. The secondary display area displays the current dynamic threshold, battery level symbol, and current operating status code. The readable viewing distance of display unit 108 is no less than 8 meters, suitable for scenarios where inspection personnel can visually read the values ​​from below the pole. The power supply of display unit 108 is also controlled by the main control processing unit 104, and it only lights up when activated by a button or in alarm confirmation mode, automatically turning off after approximately 60 seconds to conserve battery power.

[0027] The early warning output unit 109 is the physical actuator of the online leakage current detection and early warning module 100, which releases alarm information to the outside world. It includes two channels: optical signal output and switch output. The optical signal output uses a high-brightness red light-emitting diode with an operating current of approximately 10mA. During the transition from deep sleep mode to monitoring mode, it flashes in a heartbeat mode for approximately 200 milliseconds every 60 seconds to indicate that the device is online. In alarm confirmation mode, it switches to a high-frequency flashing mode with a frequency of 4Hz and a duty cycle of 50% for 24 hours. The switch output uses an optocoupler-isolated metal-oxide-semiconductor relay with a contact capacity of 30V / 100mA. It can be cascaded to a wireless alarm terminal or inspection receiver on the pole via a wired interface to achieve remote linkage.

[0028] The communication unit 110 provides remote wireless communication capability for the online leakage current detection and early warning module 100. It can be a long-range low-power wide-area network RF module or a narrowband IoT cellular module. The communication unit 110 is connected to the main control processing unit 104 via a universal asynchronous transceiver interface. Its power supply is connected in series with an independent load switch, and it is normally in a completely de-energized state. The main control processing unit 104 only connects the power supply to the communication unit 110 when the dynamic sampling scheduling submodule 106 enters the alarm confirmation state and needs to report event data, or when the timed heartbeat reporting cycle is reached (recommended once every 24 hours). After framing, transmission, and waiting for confirmation, the power is de-energized again, with each online session lasting less than 10 seconds. The data frames use a compact binary object encoding format to minimize the number of bytes transmitted over the air and reduce energy consumption per transmission.

[0029] The power management unit 111 provides power supply and power consumption management for all units within the online leakage detection and early warning module 100. The main power supply for the power management unit 111 is a 5000mAh lithium thionyl chloride battery with a nominal voltage of 3.6V and an annual self-discharge rate of less than 1%. A high-frequency pulse capacitor with a capacity of not less than 100μF is connected in parallel to the positive terminal of the battery to provide a peak current support of up to 50mA during the transmission of the communication unit 110, preventing voltage drops caused by battery internal resistance. The power management unit 111 is equipped with three independent low-dropout linear regulators: one for the core power supply of the main control processing unit 104, one for the analog signal chain power supply of the signal conditioning unit 102, and one for the RF link power supply of the communication unit 110. Each regulator has an independent load switch at its front end, controlled by the general-purpose input / output ports of the main control processing unit 104. The power management unit 111 also integrates a battery fuel gauge chip, which tracks the remaining battery power in real time and reports it to the main control processing unit 104 via a two-wire serial bus. Regarding watchdog protection, the independent watchdog built into the main control processing unit 104 operates based on a low-speed internal oscillator and continues timing even in low-power shutdown mode. Its overflow period is set to be no less than twice the deep sleep interval, ensuring timely feeding of the watchdog within the normal deep sleep wake-up cycle without triggering a false reset. The window watchdog built into the main control processing unit 104 relies on the system bus clock and is only enabled during active working phases such as fast scan, monitoring, dense capture, and alarm confirmation. It is actively disabled by the dynamic sampling scheduling submodule 106 before entering deep sleep mode, thus avoiding invalid resets caused by the bus clock stopping in shutdown mode. Through the division of labor between the independent watchdog covering the entire lifecycle and the window watchdog covering active working phases, complete monitoring of the operating status of the main control processing unit 104 is achieved. The input terminals of the power management unit 111 are also equipped with anti-reverse insertion transient suppression diodes and fuses to prevent damage to the internal circuitry from reverse battery polarity connection or external abnormal overvoltage.

[0030] Clock unit 112 provides a precise low-frequency time base for main control processing unit 104. Clock unit 112 consists of an external quartz crystal oscillator with a frequency of 32.768kHz and a low-speed external clock interface inside main control processing unit 104, driving the on-chip real-time clock module of main control processing unit 104. In deep sleep mode, the real-time clock module is the only timing resource that remains operational, and the alarm interrupt it generates is the sole trigger source for the online leakage current detection and early warning module 100 to exit deep sleep mode.

[0031] The above describes the complete hardware architecture of the online leakage current detection and early warning module 100. The following section elaborates on the software-level data structure design and algorithm implementation, focusing on the two core inventive points of this invention: the environmental adaptive leakage current baseline learning and dynamic threshold generation algorithm, and the multi-level dynamic sampling state machine based on signal trends.

[0032] To enable those skilled in the art to directly reproduce the software solution of this invention, the definitions of key data structures are provided here. The adaptive threshold calculation submodule 105 uses two-dimensional environmental bins as the basic unit for baseline management. Each bin corresponds to a specific combination of temperature and humidity ranges. Its data structure includes a fixed-point circular sample buffer of length N and its corresponding timestamp array, write pointer, stored sample count, cache median, cache median absolute deviation, last baseline refresh time, and freshness flag fields. The temperature dimension is divided into 22 levels starting at -40℃ and with a step size of 5℃, and the humidity dimension is divided into 10 levels starting at 0%RH and with a step size of 10%RH, thus forming a global baseline table with a total of 220 bins. The length N of the circular buffer for each bin is between 128 and 256, and the sample values ​​are represented in Q15 fixed-point format, with the unit conversion being approximately 0.03125 mA for one minimum quantization step. It is important to emphasize that, in deep sleep, fast scan, and monitoring states, the analog switch in signal conditioning unit 102 is in the default rectification path position. The baseline learning sample values ​​written to each sub-bin buffer are all non-negative values ​​after rectification. Their physical meaning is the average rectified amplitude of the leakage current within the corresponding sampling integration period, which has a fixed proportional relationship with the effective current value. However, in dense capture state, the analog switch switches to the bypass position, and the analog-to-digital converter acquires the original positive and negative alternating signals. This data is stored in the event waveform area of ​​data storage unit 107, not the baseline table area. The entire baseline table, along with metadata, occupies approximately 300KB to 600KB of storage space and resides in the baseline table area of ​​data storage unit 107. During operation, the data of the currently hit sub-bin and its neighboring sub-bins is cached in the on-chip random access memory of main control processing unit 104 to accelerate access. Writing to the baseline table area employs a double-buffer plus cyclic redundancy check strategy. Each update first writes to the backup buffer and appends a check value. Only after successful writing is the valid pointer switched, ensuring that data will not be corrupted even if an unexpected power failure occurs during the writing process. The dynamic sampling scheduling submodule 106 maintains a state machine context structure, which includes fields such as the current state identifier, the timestamp of entering the current state, the cumulative count of over-limit sampling points, the previous sampling value, the difference between adjacent samples, and the number of consecutive over-limits in the monitoring state.

[0033] The algorithm flow of the adaptive threshold calculation submodule 105 is as follows.

[0034] When the dynamic sampling scheduling submodule 106 enters the fast scan state each time, the adaptive threshold calculation submodule 105 first calculates the index of the current environmental bin based on the latest temperature value T and relative humidity value H provided by the environmental sensing unit 103. The calculation method for the temperature index is as follows: The humidity index is calculated as follows: Two indexes combined into bin number The calculation process involves only integer division and clamping operations, which can be completed in just a few clock cycles on the main control processing unit 104.

[0035] After obtaining the current bin number, the adaptive threshold calculation submodule 105 determines whether the current sampled value is allowed to be added to the bin to update the baseline. A sampled value is allowed to be written to the circular buffer of the corresponding bin if three preconditions are met simultaneously: the state machine of the current dynamic sampling scheduling submodule 106 is not in a dense capture state or an alarm confirmation state; the absolute value of the corrected Z-score corresponding to the current sampled value does not exceed the bin entry threshold (default 3.5); and the current bin is not in the cooling-off list. The cooling-off list means that within 30 minutes after the end of an alarm confirmation state, bins with the same bin number as the bin to which the alarm event belongs are marked as cooling-off, and no new samples are allowed to be added during this period to prevent overshoot samples during the alarm transition period from contaminating the baseline. Only samples that meet the above three conditions are written to the current write pointer position of the circular buffer, and the corresponding timestamp is recorded. The write pointer increments modulo-based, and the count of stored samples increments synchronously until the upper limit is reached.

[0036] The adaptive threshold calculation submodule 105 employs a two-level precision design for robust statistics calculation of samples within bins, aiming to balance computational accuracy and computational complexity. The first level is full reordering calculation: after accumulating K new samples (K defaults to 8), all valid samples in the current bin buffer are sorted in-situ (when N is 128, insertion sort or quick selection algorithm can be used, with a single operation time of less than 1 millisecond). The median is taken as the value at the middle position after sorting. Then, the absolute difference between all samples and this median is calculated, and the median is taken again from the resulting sequence to obtain the absolute deviation of the median. The second level is approximate incremental maintenance: between two full reorderings, whenever a new sample is added to the bin, the adaptive threshold calculation submodule 105 uses a streaming approximate estimation method to fine-tune the median—if the new sample value is greater than the current cached median, the cached median is increased by a step δ; otherwise, δ is decreased. , among which mad q15 This is the Q15 fixed-point representation of the absolute deviation of the current bin cache median. This shift operation is equivalent to using one-thirty-second of the current absolute deviation of the median as the adjustment step. The approximate maintenance of the absolute deviation of the median is done in the same way. This two-stage design allows the statistics update in each fast scan state to take only tens of microseconds of processor time.

[0037] The corrected Z-score is used to measure the degree to which the current sampled value deviates from the baseline of this bin. Its calculation formula is as follows: Where I is the Q15 fixed-point representation of the current sample value, median is the current bin's cache median, and MAD is the absolute deviation of the cache median. FLOORTo minimize the denominator clamping value, the Q15 fixed-point value corresponding to 2mA is chosen to avoid numerical instability caused by the denominator approaching zero when samples within the bin are highly concentrated. Coefficients The theoretical value is 0.6745, which is approximated in the fixed-point implementation as an integer constant of 22098 in Q15 format (i.e., This constant is pre-stored in the configuration table area of ​​data storage unit 107. The calculation is performed using fixed-point multiplication and shift operations, without involving floating-point instructions. The absolute value of the corrected Z-score corresponds to different signal meanings and processing actions in different intervals. When the absolute value does not exceed 2, the sample is considered normal, allowed to be included in the bucket, and the state machine tends to return to a deep sleep state. When the absolute value is greater than 2 but not more than 3.5, the sample is considered slightly abnormal, still allowed to be included in the bucket, but the state machine transitions from the fast scan state to the monitoring state. When the absolute value is greater than 3.5 but not more than 8, the sample is considered significantly abnormal, prohibited from being included in the bucket, and the state machine transitions to the monitoring state or the dense capture state depending on the current state. When the absolute value is greater than 8, the sample is considered a strong abnormal signal, prohibited from being included in the bucket, and the state machine directly transitions to the dense capture state.

[0038] After completing the statistical update and corrected Z-score calculation, the adaptive threshold calculation submodule 105 synthesizes the dynamic alarm threshold for the current bin based on these parameters. The formula for calculating the warning threshold is as follows: The formula for calculating the alarm threshold is: ,in The default value is 7. The default value is 12. Both can be updated by the remote backend master station via communication unit 110 and written to the configuration table area of ​​data storage unit 107. To prevent the dynamic threshold from outputting unreasonable values ​​that are too low or too high under extreme environmental conditions, the adaptive threshold calculation submodule 105 applies an engineering clamp to the synthesized result, i.e. The minimum clamping value Th min The default value is 50mA, and the maximum clamping value is Th. max The default value is 500mA. Warning threshold Th warn The same clamping treatment is also applied.

[0039] To ensure the baseline follows a slow, seasonal drift without being over-anchored by distant historical samples, the adaptive threshold calculation submodule 105 applies a time-varying, exponentially decaying weight to the samples in the buffer before each full reordering. Specifically, a discrete weight lookup table indexed by days is pre-stored in the configuration table area of ​​the data storage unit 107, where the value of the Δd-th item in the table is... Where τ is the decay time constant, which is 5 days by default. Before each full reordering, the adaptive threshold calculation submodule 105 traverses all valid samples in the current binning buffer, converts the difference between the current time and the timestamp of each sample into days, and then looks up the weight in a table. Samples with a weight lower than 0.05 are marked as naturally expired and actively removed before reordering, and no longer participate in the calculation of the median and median absolute deviation. This mechanism ensures that the entire weight calculation process does not involve floating-point exponentiation, and is completed entirely in the fixed-point domain through table lookup, making it suitable for low-overhead execution on the main control processing unit 104.

[0040] For the initial deployment of the online leakage current detection and early warning module 100 and the special scenario of sparse environmental binning data, the adaptive threshold calculation submodule 105 sets up a cold start and sparse binning inheritance strategy. The online leakage current detection and early warning module 100 is defined as having a cold start period of 24 to 72 hours after its initial power-on deployment, during which a global cold start flag is set. When the cold start flag is valid, all sampled values ​​that do not constitute an overload are unconditionally entered into the bins to accelerate the filling of each bin's buffer, while only the maximum clamping value Th is used. max As a fallback alarm threshold, the adaptive threshold calculation submodule 105 does not perform dynamic threshold output based on statistics for any bin, thereby avoiding statistical distortion due to insufficient buffer data. After the cold start period ends, the global cold start flag is cleared, and the adaptive threshold calculation submodule 105 switches to normal dynamic threshold output mode. In normal operation mode, when the stored sample count of any bin is less than one-quarter of the buffer length, that bin does not yet have the ability to independently generate a reliable baseline. At this time, the adaptive threshold calculation submodule 105 searches for valid bins among its neighboring bins whose stored sample count reaches more than one-quarter of the buffer length. The neighboring bins referred to here are those with temperature index deviation. Humidity index deviation All bins whose absolute value does not exceed 2, among which and This provides the temperature and humidity indexes for the current sparse binning. and The temperature and humidity indices are used for the candidate neighbor bins. If at least one valid neighbor bin exists, a weighted average method is used to generate a virtual baseline for the current sparse bins, with the virtual median estimated as follows: The summation is performed only on the effective nearest neighbor bins, and the weighting function is... , An empirical value of 1.5 is used. The aforementioned weight values ​​are also pre-stored in the configuration table area of ​​data storage unit 107 in the form of a lookup table to avoid real-time floating-point calculations. If none of the adjacent sub-compartments have valid data (e.g., the online leakage detection and early warning module 100 has just completed its cold start period and is in a transitional phase where the current environmental conditions are not yet fully covered), then the current sub-compartment continues to use the maximum clamping value Th. max As a fallback threshold, it continues until it or its neighboring bins accumulate enough valid samples. When the last baseline update time of a bin is more than 7 days from the current time, the bin is marked as stale. When it is hit again, it will be warmed up first by the nearest neighbor inheritance method before it will be formally accepted into the bin.

[0041] The adaptive threshold calculation submodule 105 provides three core interfaces to the dynamic sampling scheduling submodule 106 and the upper-level alarm logic in the form of function calls: the baseline update interface accepts the current sampled value, bin number and timestamp as input and performs bin entry and statistics refresh; the threshold query interface returns the numerical pair of the current warning threshold and alarm threshold based on the bin number; and the Z-score query interface returns the corrected Z-score based on the current sampled value and bin number.

[0042] The following details the state machine design and implementation details of each state in the dynamic sampling scheduling submodule 106.

[0043] The dynamic sampling scheduling submodule 106 divides the operation of the online leakage current detection and early warning module 100 into five discrete states: deep sleep state, fast scan state, monitoring state, dense capture state, and alarm confirmation state. The transition conditions between each state are determined by multiple dimensions, such as the position of the current sampled value relative to the dynamic threshold, the amplitude of signal change, and the continuous over-limit count, rather than relying on a single criterion. Each state uses different hardware timing resources: the deep sleep state is woken up by a real-time clock alarm; the fast scan state uses a low-power timer to complete all processing within a single processing cycle; the monitoring and dense capture states use general-purpose timers to drive sampling at 1Hz and 1kHz to 4kHz beats, respectively; and the alarm confirmation state uses a second-level timer for periodic verification. All states are equipped with hard upper limit dwell time protection to prevent software malfunctions from causing the online leakage current detection and early warning module 100 to freeze in any single state.

[0044] Deep sleep mode is the state in which the online leakage current detection and early warning module 100 is for most of the time. Before entering deep sleep mode, the dynamic sampling scheduling submodule 106 sequentially shuts down the power supply to the Rogowski integrator or current transformer bias of the current acquisition unit 101, the power supply to the programmable gain amplifier and analog-to-digital converter in the signal conditioning unit 102, the power supply to the environmental sensing unit 103, the power supply to the display unit 108, and the power supply to the communication unit 110, and shuts down the window watchdog inside the main control processing unit 104. Then the main control processing unit 104 switches the main clock to a low-speed internal oscillator of 32kHz and enters a low-power shutdown mode. At this time, the total current consumption of the online leakage current detection and early warning module 100 is less than 3μA, and only the independent watchdog keeps running to monitor system activity. The real-time clock module of the clock unit 112 sets the alarm time to the current time plus the deep sleep interval Δt0 (default 60 seconds), and generates a wake-up interrupt when the alarm is triggered. After the main control processing unit 104 is woken up, it maintains the field state before entering the shutdown state and directly jumps to the fast scan state processing logic after re-enabling the window watchdog.

[0045] The fast scan state is the first operating state that must be entered after waking up from the deep sleep state. Its design goal is to complete a leakage current sampling and environmental condition assessment in the shortest possible time, and to determine whether the online leakage detection and early warning module 100 should return to the deep sleep state or upgrade to a higher alert level. After entering the fast scan state, the dynamic sampling scheduling submodule 106 first turns on the power supply of the signal conditioning unit 102 and waits for the analog front-end circuit to enter a steady state (the stabilization time does not exceed 2 milliseconds). Then, it triggers the environmental sensing unit 103 to read the temperature and relative humidity values ​​once. Since the Σ-Δ device used in the analog-to-digital converter in the signal conditioning unit 102 requires its internal digital decimation filter to undergo a setup process before outputting valid data after each power-on, the dynamic sampling scheduling submodule 106 first triggers an empty conversion (integration time 20 milliseconds) after the analog front-end stabilizes, discards the conversion result to complete the filter setup, and then triggers the second formal conversion to obtain valid sample values. The integration time for the formal conversion is also set to 20 milliseconds, which exactly covers one complete cycle of the 50Hz power frequency signal. Since the precision full-wave rectifier stage in the signal conditioning unit 102 has converted the alternating signal into a unipolar pulsating DC signal, the result of integrating the rectified signal for exactly one power frequency cycle is the average rectified value of the leakage current within that cycle. This value has a definite proportional relationship with the effective value of the current (for a pure sine wave, this proportionality coefficient is...). The adaptive threshold calculation submodule 105 uses the average rectified value as the benchmark when establishing the baseline and output threshold, without requiring additional conversion. For a 60Hz power grid environment, the integration time for the formal conversion is adjusted to 16.67 milliseconds to cover a complete 60Hz cycle. This parameter is stored in the configuration table area of ​​the data storage unit 107 and can be configured according to the deployment region. After obtaining a valid sample value, the dynamic sampling scheduling submodule 106 calls the baseline update interface and Z-score query interface of the adaptive threshold calculation submodule 105 to obtain the corrected Z-score of the current sub-bin, as well as the warning threshold and alarm threshold. If the absolute value of the corrected Z-score does not exceed 2 and the sample value is lower than the warning threshold, the environment is judged to be normal, and the continuous over-limit count in the monitoring state is reset to zero before returning to the deep sleep state. If the absolute value of the corrected Z-score is greater than 2 but not more than 3.5 and the sample value is lower than the alarm threshold, it is judged to be slightly suspicious and transitions to the monitoring state. If the absolute value of the corrected Z-score exceeds 3.5 or the sample value is not lower than the alarm threshold, it is judged to be significantly abnormal and directly transitions to the dense capture state. The total time for a single fast scan is approximately 50 to 70 milliseconds, with the integration of the two conversions of the analog-to-digital converter accounting for the majority of the time. The current during the signal chain operation is approximately 3 to 5 mA, so the battery energy consumed in each fast scan is extremely small.

[0046] The monitoring state is a transitional observation state between the fast scan state and the dense capture state, and its purpose is to distinguish between transient interference and the actual increase in leakage current trend. After entering the monitoring state, the dynamic sampling scheduling submodule 106 continuously samples at a fixed frequency of 1Hz. Each sampling uses the same 20-millisecond single-cycle integration method as in the fast scan state to obtain the average rectified value, and the longest observation window is 30 seconds. The monitoring state maintains a sliding window of length 8, and calculates the moving average, moving variance, and adjacent sampling difference ΔI in real time for the sampled values ​​within the window. Here, ΔI is defined as the difference between two adjacent sampled values. Since the sampling interval is fixed at 1 second, the value of ΔI is equivalent to the change per second of the average rectified value of leakage current, and its dimension is the same as the absolute deviation of the median, which is milliamperes. The transition criteria for the monitoring state are as follows: if the moving average falls below the warning threshold and the moving variance is lower than the preset low variance threshold and lasts for no less than 5 seconds, it is determined that the transient interference has subsided, and the online leakage current detection and warning module 100 returns to the deep sleep state. If the moving average reaches or exceeds the alarm threshold, it will directly transition to dense capture state. If the difference between adjacent samples ΔI exceeds... (in The default value is 10, meaning that if the increase in the average rectified leakage current value between two consecutive 1-second interval samplings reaches 10 times the absolute deviation of the current sub-box median, the over-limit count will increment. When this count reaches 3 consecutive times, it will transition to dense capture mode. If the total observation time in monitoring mode reaches the 30-second limit without triggering any upgrade conditions, the Z-score of the last sample will determine whether to return to deep sleep mode or extend the observation. Monitoring mode uses an early exit mechanism to control power consumption, that is, it will immediately exit when the sampled value falls back to the normal range after 5 consecutive seconds, avoiding unnecessary battery consumption after transient interference disappears.

[0047] The dense acquisition state is a crucial state for the online leakage current detection and early warning module 100 to perform high-resolution confirmation of suspicious signals. Upon entering the dense acquisition state, the dynamic sampling scheduling submodule 106 first automatically selects the gain level of the programmable gain amplifier in the signal conditioning unit 102 (typically between 4 and 16 times, to ensure the signal amplitude fully utilizes the analog-to-digital converter's range without saturation) based on the most recent sampled value obtained in the monitoring or fast scan state. Then, through the general-purpose input / output port of the main control processing unit 104, it switches the analog switch of the precision full-wave rectifier stage bypass in the signal conditioning unit 102 to the bypass position, allowing the analog-to-digital converter to directly acquire the unrectified raw positive and negative alternating signals. The conversion rate of the analog-to-digital converter is switched to 4000 times per second, while the main frequency of the main control processing unit 104 is increased to 48MHz to meet the high-speed data transfer requirements. The sampled data is continuously transferred to a dual buffer in the on-chip random access memory of the main control processing unit 104 via the direct memory access controller. Each buffer holds 256 sampling points, corresponding to a time window of approximately 64 milliseconds. Whenever a buffer is full, the direct memory access controller generates an interrupt. The dynamic sampling scheduling submodule 106 performs the following processing on the buffer in the interrupt service routine: Since the raw positive and negative alternating signals are being acquired at this time, the dynamic sampling scheduling submodule 106 first calculates the arithmetic mean of the absolute values ​​of all sampling points in the buffer in the software. The result is the average rectified value of the leakage current within that time window. Its physical meaning and dimensions are completely consistent with the average rectified value obtained through hardware rectification and single-cycle integration in fast scan and monitoring states. This ensures that the baseline and threshold system established by the over-limit judgment and adaptive threshold calculation submodule 105 based on the average rectified value in the dense capture state are strictly unified in terms of measurement benchmark. The dynamic sampling scheduling submodule 106 compares the average rectified value calculated by the software with the alarm threshold to count the number of over-limit buffers. Simultaneously, it extracts time-domain features such as peak value, zero-crossing count, and maximum adjacent sampling difference from the raw bipolar waveform data in the buffer point by point. The default total capture window for the dense capture state is 1 second (i.e., 16 buffer cycles), which can be extended to a maximum of 3 seconds through a configuration table. When the cumulative number of over-limit buffers reaches or exceeds the confirmation threshold Ncfm (default value is 3, which physically means that the average rectified value of at least three 64-millisecond time periods exceeds the alarm threshold within the entire capture window), the dynamic sampling scheduling submodule 106 asynchronously writes the original bipolar waveform data to the event waveform area of ​​the data storage unit 107 and transitions to the alarm confirmation state. If the cumulative number of over-limits is still lower than the confirmation threshold after the entire capture window ends, it is determined to be a short-term disturbance, and the analog switch is switched back to the rectifier path before returning to the monitoring state for further observation. Before exiting the dense capture state, the dynamic sampling scheduling submodule 106 restores the analog switch to the default rectifier path position.During the intensive capture state, due to the high speed of the analog-to-digital converter, the high gain of the programmable gain amplifier, and the maximum frequency of the main control processing unit 104, the instantaneous current is about 15mA. However, since the total duration is strictly limited to a maximum of 3 seconds, the consumption of total battery energy is still limited.

[0048] To suppress false triggers that may be caused by lightning induction, impulse suppression logic is activated internally in the dense acquisition state. Since the dense acquisition state acquires the original alternating positive and negative signals, the maximum amplitude variation of a normal power frequency sine wave between adjacent sampling points is constrained by the signal amplitude and sampling rate. For a 50Hz sine wave with amplitude A at a sampling rate of 4000 times per second, the theoretical maximum value of the difference between adjacent sampling points is approximately... This is much smaller than the signal amplitude itself. When scanning the buffer data point by point, when the amplitude difference ΔI_sample between a certain sampling point and its previous sampling point exceeds... ( The lightning-induced interference discrimination coefficient is based on the MAD adaptive statistical benchmark and is set to 1000 by default. The dimensions of ΔI_sample and the median absolute deviation MAD are both milliamperes, so the comparison is consistent in terms of dimensions. This threshold is much higher than the difference between adjacent sampling points of normal power frequency signals and can only be reached by extreme transient events such as lightning induction. If the duration of the pulse is less than 2 milliseconds (i.e., no more than 8 consecutive sampling points), then the sampling points are marked as lightning-induced pulses. The buffer in which they are located is not included in the out-of-limit statistics, but the corresponding waveform data is still retained and written into the event waveform area of ​​the data storage unit 107 for post-event analysis reference.

[0049] The alarm confirmation state is the continuous alarm and reporting state after the online leakage current detection and early warning module 100 confirms a real fault. Upon entering the alarm confirmation state, the dynamic sampling scheduling submodule 106 immediately switches the LED of the early warning output unit 109 to a high-frequency flashing mode and connects the passive switch output contact. Subsequently, it connects the power supply to the communication unit 110 and assembles an event reporting data frame. The frame content includes the Coordinated Universal Time (UTC) timestamp of the event, the environmental sub-box number, the current temperature and relative humidity values, the current early warning threshold and alarm threshold, the cumulative over-limit count, the storage index of the waveform segment in the data storage unit 107, the current battery voltage and remaining power, and the self-test status code of the online leakage current detection and early warning module 100. After transmitting the data frame, the communication unit 110 waits for confirmation from the master station. If no response is received, it retransmits up to three times. After reporting is completed, the main control processing unit 104 does not immediately return to deep sleep mode but enters the dwell cycle review mode in the alarm confirmation state: performing a single sampling and trend judgment similar to the monitoring state every 60 seconds. When all verified sample values ​​fall below the warning threshold within 5 consecutive minutes, the dynamic sampling scheduling submodule 106 sets the alarm end flag, writes the complete event record to the log area of ​​the data storage unit 107, and adds the sub-bin number to which the event belongs to the cooling list. The cooling period is 30 minutes. During the cooling period, the sub-bin refuses to accept any new samples to avoid residual overshoot signals from contaminating the baseline during the alarm fading process. After the cooling period, the online leakage current detection and early warning module 100 returns to deep sleep mode and resumes the normal baseline learning cycle.

[0050] To prevent the online leakage current detection and early warning module 100 from repeatedly switching between monitoring and intensive capture states due to slight fluctuations in sampled values ​​near the alarm threshold, the dynamic sampling scheduling submodule 106 introduces a hysteresis mechanism in the state upgrade / downgrade criterion: the upgrade from monitoring state to intensive capture state is based on the alarm threshold Th. high The criterion is used to determine whether a state is downgraded from a dense capture state or an alarm confirmation state back to a lower state, based on the warning threshold Th. warn The criteria for downgrading the warning are based on the fact that the moving average must remain below the warning threshold for at least 5 seconds before it takes effect. This asymmetric threshold design effectively suppresses boundary jitter.

[0051] The collaborative relationship between the adaptive threshold calculation submodule 105 and the dynamic sampling scheduling submodule 106 constitutes the closed-loop purification mechanism of this invention. They share a sample entry permission flag, which is only valid when all of the following conditions are met simultaneously: the current state machine is in deep sleep, fast scan, or monitoring state; the absolute value of the corrected Z-score of the current sampled value does not exceed the entry threshold; the current bin is not on the cooling list; and no alarm events have occurred recently. Sampled values ​​are only allowed to be written to the corresponding bin's circular buffer by calling the baseline update interface when the sample entry permission flag is valid. All high-resolution sampled data acquired in the intensive capture state and alarm confirmation state, even if subsequently determined not to be a true insulation fault (e.g., marked as a lightning induced pulse), are prohibited from being fed back into the baseline buffer, thereby ensuring that the baseline of each bin maintained by the adaptive threshold calculation submodule 105 always reflects the normal leakage current level under the environmental conditions and is not contaminated by faulty samples or transitional samples. On the other hand, the dynamic threshold output by the adaptive threshold calculation submodule 105 serves as the trigger line for state transitions at each stage of the dynamic sampling scheduling submodule 106, ensuring that the upgrade criteria of the state machine no longer drift with weather and seasons, thus avoiding the ineffective power consumption caused by frequent triggering of the dense acquisition state in rainy or high-humidity environments. During the dense acquisition state, the raw bipolar waveform data intercepted by the analog switch bypass precision full-wave rectifier stage in the signal conditioning unit 102 can also be used by the adaptive threshold calculation submodule 105 for offline spectrum analysis and pulse feature extraction, assisting the remote backend in automatically optimizing the sensitivity coefficient of the sub-packet.

[0052] After each successful dense acquisition, the dynamic sampling scheduling submodule 106 extracts fault type soft classification features from the original positive and negative alternating waveform data stored in the event waveform area of ​​the data storage unit 107. Because the analog switch bypasses the precision full-wave rectifier stage during dense acquisition, the analog-to-digital converter directly acquires the original AC signal without nonlinear distortion. Its spectral structure is consistent with the actual spectrum of the measured leakage current, and can be directly used for fast Fourier transform analysis. The dynamic sampling scheduling submodule 106 extracts a continuous sampling segment of 64 points (corresponding to 16 milliseconds, covering approximately 0.8 power frequency cycles) from the waveform data, applies a Hanning window, and performs a 64-point fast Fourier transform. From the frequency domain results, it extracts the 50Hz fundamental amplitude, the 150Hz third harmonic amplitude, the 250Hz fifth harmonic amplitude, and the 350Hz seventh harmonic amplitude, and calculates the distortion rates of the third, fifth, and seventh harmonics relative to the fundamental. Furthermore, it statistically analyzes parameters such as the number of pulses, the average pulse interval, and the maximum adjacent sampling difference from the time domain waveform. Based on the preset rule tree logic, the dynamic sampling scheduling submodule 106 performs soft classification judgment on the current event: Under high humidity conditions, continuous pulses with increasing third and fifth harmonic content are likely to be classified as the initial stage of insulator flashover; monotonically increasing fundamental amplitude with a pulse count close to zero and stable harmonic distribution are likely to be classified as single-phase grounding steady-state leakage; intermittent periodic pulses accompanied by fluctuations in fundamental amplitude are likely to be classified as intermittent instantaneous grounding; and extremely large maximum adjacent sampling differences with a duration of less than 2 milliseconds are classified as lightning induced pulses. The soft classification result, as an attached label for the alarm event, is sent to the remote master station along with the reported data frame, providing maintenance personnel with preliminary reference information on the nature of the fault. However, the soft classification result itself does not change the judgment logic and threshold parameters of the adaptive threshold calculation submodule 105 and the dynamic sampling scheduling submodule 106.

[0053] The online leakage current detection and early warning module 100 also has complete calibration, self-test, and remote upgrade capabilities. During the factory delivery stage, the current acquisition unit 101 is connected in series in the circuit of the precision current source. The gain coefficient of the Rogowski coil or current transformer, as well as the zero bias and slope of the precision full-wave rectifier stage and each programmable gain amplifier in the signal conditioning unit 102, are calibrated one by one at three calibration ranges: 10mA, 100mA, and 500mA. At the same time, calibration is performed in both the rectifier path and bypass path analog switching states to ensure the consistency of the two signal paths. The calibration results are written to the configuration table area of ​​the data storage unit 107. The online leakage current detection and early warning module 100 performs a complete self-test process every time it is powered on, sequentially checking the accuracy of the internal reference voltage of the analog-to-digital converter, the switching response of each level of the programmable gain amplifier, the output consistency of the precision full-wave rectifier stage bypass analog switch in two path positions, the integrity of the cyclic redundancy check of each partition of the data storage unit 107, the reading consistency of the battery fuel gauge in the power management unit 111, and the cross-comparison between the temperature reading of the environmental sensing unit 103 and the reading of the temperature sensor built into the main control processing unit 104. During normal operation, the online leakage current detection and early warning module 100 performs a periodic self-test every 24 hours, and the self-test results are reported to the remote master station via the communication unit 110. Regarding firmware upgrades, the flash memory space of the main control processing unit 104 is divided into two equal firmware partitions, using a classic dual-partition alternating upgrade strategy. If the new firmware verification fails or the first run is abnormal during the upgrade process, it automatically rolls back to the previous firmware version. The adjustable parameters (including sensitivity coefficients) used by the adaptive threshold calculation submodule 105 and the dynamic sampling scheduling submodule 106 are... , The minimum clamping value, maximum clamping value, deep sleep interval, acknowledgment threshold, buffer length, and decay time constant, etc., all support separate hot updates independent of the firmware. The parameters take effect immediately after being issued, without the need to restart the online leakage current detection and early warning module 100.

[0054] The complete business process of the online leakage current detection and early warning module 100 from power-on to steady-state operation can be summarized as follows: The installer fixes the online leakage current detection and early warning module 100 to the middle of the pole using a clamp assembly, connects the current acquisition unit 101 to the target down conductor, and then turns on the power. The main control processing unit 104 loads the historical baseline table and configuration parameters from the data storage unit 107. If it detects that this is the first deployment, a blank baseline table is created and the cold start flag is enabled. The environmental sensing unit 103 reads the initial temperature and humidity. After the current acquisition unit 101 and the signal conditioning unit 102 complete zero-point calibration, the online leakage current detection and early warning module 100 enters the cold start baseline learning period. During the 24-72 hour cold start period, the online leakage current detection and early warning module 100 continuously samples at slow intervals of approximately 10 seconds. All sampled values ​​that do not constitute an overload are written to the corresponding ring buffer after being calculated according to the current temperature and humidity to determine their respective bins. This gradually establishes the initial median and median absolute deviation for each environmental condition. During this period, only the maximum clamping value of 500mA is used as the fallback alarm threshold. After the cold start period ends, the online leakage current detection and early warning module 100 enters a normal operation mode primarily characterized by deep sleep. In normal operation mode, the online leakage current detection and early warning module 100 remains in deep sleep for the vast majority of the time, with the total current consumption below 3μA. It is awakened by the clock unit 112 every 60 seconds to enter a fast scan state. Within 50-70 milliseconds, it completes a round of sampling, baseline update, and trend judgment before deciding whether to return to deep sleep or escalate to a higher alert level. If the sampled value triggers the transition conditions for monitoring or intensive capture states, the online leakage current detection and early warning module 100 will respond step by step according to the aforementioned state machine logic. After confirming a real fault, it will simultaneously issue alarms to the field and remote locations via the early warning output unit 109 and the communication unit 110. After the alarm conditions subside, the relevant sub-packets will resume normal baseline learning after a cooling protection period. Throughout the entire operating cycle, the deep sleep state occupies more than 90% of the year, while the intensive capture state and alarm confirmation state are only activated briefly when a real abnormal signal occurs. The power management unit 111 can maintain the online leakage current detection and early warning module 100 for approximately 3 years of maintenance-free continuous operation with a 5000mAh battery capacity. The dynamic threshold output by the adaptive threshold calculation submodule 105 significantly reduces the probability of invalid dense capture triggering during rainy days and high humidity seasons. The multi-level state machine of the dynamic sampling scheduling submodule 106 achieves effective capture of millisecond-level transient and intermittent leakage fault pulses without significantly increasing average power consumption. The two core inventions work together through a closed-loop purification mechanism, enabling the online leakage detection and early warning module 100 to achieve comprehensive improvement in four dimensions: power consumption, sensitivity, false alarm rate, and transient response capability.

Claims

1. An online leakage current detection and early warning module for outdoor utility poles, comprising a current acquisition unit, a signal conditioning unit, an environmental sensing unit, a main control processing unit, a data storage unit, an early warning output unit, and a communication unit, wherein the main control processing unit includes an adaptive threshold calculation submodule and a dynamic sampling scheduling submodule, characterized in that: The adaptive threshold calculation submodule divides the environmental conditions into a two-dimensional array of sub-bins based on the temperature and humidity values ​​obtained by the environmental sensing unit. Each sub-bin maintains an independent rolling sample buffer. For the samples within the buffer, a robust statistical method based on the median and median absolute deviation is used to construct the normal baseline for the leakage current of that sub-bin. Based on the median and median absolute deviation, dynamic warning thresholds and dynamic alarm thresholds that change with environmental conditions are synthesized in real time. The synthesis method of the dynamic warning threshold is as follows: The method for synthesizing the dynamic alarm threshold is as follows: ,in , For remotely configurable coefficients and The synthesized threshold is then subjected to engineering clamping to ensure that it is not lower than the preset minimum clamping value and not higher than the preset maximum clamping value. The dynamic sampling scheduling submodule divides the module's operation into five states: deep sleep state, fast scan state, monitoring state, dense capture state, and alarm confirmation state. The transition conditions between each state are determined by the position of the current sampled value relative to the dynamic alarm threshold, the corrected Z-score of the current sampled value, and the amplitude of signal change. This ensures that the module is in a low-power deep sleep state most of the time, and only enters a higher sampling rate state to capture transient faults when a suspicious signal appears. The formula for calculating the corrected Z-score is as follows: ,in This is the current sampled value. This is the median of the current bins. This represents the absolute deviation of the median of the current binning. For fixed-point proportionality constants, The minimum denominator clamp value; when the absolute value of the corrected Z-score falls into different preset intervals, it corresponds to four judgment results: normal, slightly abnormal, significantly abnormal, and strongly abnormal, respectively. The adaptive threshold calculation submodule determines whether the current sampled value is allowed to be written into the rolling sample buffer according to the judgment result. The dynamic sampling scheduling submodule determines the state transition direction according to the judgment result. The adaptive threshold calculation submodule and the dynamic sampling scheduling submodule share a sample bucket permission flag. The sample bucket permission flag is only valid when the dynamic sampling scheduling submodule is in deep sleep, fast scan, or monitoring state. Sampling data acquired in dense capture state and alarm confirmation state is prohibited from being written to the rolling sample buffer.

2. The online leakage current detection and early warning module for outdoor utility poles according to claim 1, characterized in that: The two-dimensional bin array uses temperature as the first dimension and relative humidity as the second dimension. The temperature dimension is divided into multiple levels with a preset step size, and the humidity dimension is divided into multiple levels with a preset step size. The rolling sample buffer adopts a fixed-length circular buffer structure, and the oldest sample is overwritten when a new sample is written. The absolute deviation of the median is calculated by taking the absolute value of the difference between all valid samples in the buffer and the median, and then taking the median of the resulting sequence.

3. The online leakage current detection and early warning module for outdoor utility poles according to claim 1, characterized in that: Before calculating the statistics, the adaptive threshold calculation submodule applies time-varying exponential decay weighting to the samples in the rolling sample buffer. The weight value of each sample is obtained through a discrete lookup table in days. Samples with weights lower than the preset expiration threshold are removed before participating in the calculation of statistics.

4. The online leakage current detection and early warning module for outdoor utility poles according to claim 1, characterized in that: The module enters a cold start period within a preset time frame after initial deployment. During the cold start period, all sampled values ​​that do not constitute an overload are unconditionally written into the rolling sample buffer of the corresponding bin, and only the preset maximum clamping value is used as the fallback alarm threshold. After the cold start period ends, when the number of stored samples in any bin is lower than a preset proportion of the length of the rolling sample buffer, the adaptive threshold calculation submodule retrieves the neighboring valid bins of that bin and generates a virtual baseline using a distance-based weighted average method. If none of the neighboring bins have valid data, the bin continues to use the preset maximum clamping value as the fallback threshold.

5. The online leakage current detection and early warning module for outdoor utility poles according to claim 1, characterized in that: The signal conditioning unit includes a precision full-wave rectifier stage and an analog switch connected in parallel with the precision full-wave rectifier stage. The analog switch is controlled and switched by the main control processing unit. In deep sleep mode, fast scan mode, and monitoring mode, the analog switch is in the rectification path position, and the signal is rectified into a unipolar signal after passing through the precision full-wave rectifier stage. In dense acquisition mode, the analog switch is switched to the bypass position, and the signal bypasses the precision full-wave rectifier stage to output the original positive and negative alternating signal.

6. The online leakage current detection and early warning module for outdoor utility poles according to claim 1, characterized in that: The dynamic sampling scheduling submodule employs an asymmetric hysteresis mechanism in the state upgrade / downgrade criteria. Upgrading from the monitoring state to the dense capture state is based on the dynamic alarm threshold, and downgrading from the dense capture state or alarm confirmation state to a lower state is based on the dynamic early warning threshold. Downgrading requires that the moving average value be continuously lower than the dynamic early warning threshold for a preset duration. After the alarm confirmation state ends, the adaptive threshold calculation submodule places the corresponding bin in a cooling state and refuses to write any new samples into the rolling sample buffer of that bin during a preset cooling period.

7. The online leakage current detection and early warning module for outdoor utility poles according to claim 5, characterized in that: In the dense capture state, the dynamic sampling scheduling submodule calculates the arithmetic mean of the absolute values ​​of the acquired original positive and negative alternating signals in the software to obtain the average rectified value. The average rectified value is compared with the dynamic alarm threshold to determine the over-limit. When the amplitude difference between adjacent sampling points exceeds the preset lightning threshold and the duration of the corresponding pulse is lower than the preset time threshold, the continuous sampling points constituting the pulse are marked as lightning induced pulses and excluded from the over-limit statistics.

8. The online leakage current detection and early warning module for outdoor utility poles according to claim 5, characterized in that: After the intensive capture state is completed, the dynamic sampling scheduling submodule performs a fast Fourier transform on the stored waveform data of the original positive and negative alternating signals, extracts the fundamental amplitude and the distortion rate of each harmonic, and performs soft classification of fault type according to a preset rule tree based on the number of pulses, pulse interval and maximum adjacent sampling difference. The soft classification result is reported as an attached tag along with the alarm event via the communication unit.

Citation Information

Patent Citations

  • Fault diagnosis system of electrical variable measurement insulator detection device

    CN121347952A

  • Low-power-consumption vibration monitoring system and method based on multi-stage triggering and frequency conversion sampling

    CN121720573A