A residual current self-calibration method for an electric energy metering box

CN122613291APending Publication Date: 2026-08-21WUHAN HUAYUAN ELECTRICAL EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611111226.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-08-21

AI Technical Summary

Technical Problem

[0004]然而,传统方法的固定周期校准模式,缺乏解析箱内运行环境参数与剩余电流演化的内在关联,无法实现环境干扰分量的实时剔除与真实剩余电流轨迹的重构,从而无法精准匹配不同工况下剩余电流的变化特征,最终导致剩余电流校准结果失真,难以真实反映设备绝缘性能的实际状态

Benefits of technology

(1)、基于物理边界的工况分类与质心匹配机制,解决了工况判定与预测窗口的逻辑冲突,提升了预测的物理可解释性。现有技术常采用动态调整窗口或硬阈值规则判定工况,易导致先有工况还是先有窗口的循环依赖,或与后续预测逻辑冲突。本发明通过预先构建涵盖高温高负载、中等负载、高湿低绝缘等多种工况的演化特征库,用于后续步骤中区分剩余电流变化是由环境工况引起的适应性波动,还是由绝缘本体劣化引起的危险趋势。并明确界定各工况的物理边界(如时长、温度、负载率),利用质心特征向量对历史数据进行聚类。在实际运行中,通过实时特征向量与工况质心的快速比对,即可判定当前主导工况,无需等待长时间稳态数据。这种基于物理边界的分类机制,避免了规则判定法与特征匹配法的冲突,确保了后续预测始终在同质物理环境下进行,大幅提高了剩余电流变化趋势预测的合理性与准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122613291A_ABST
    Figure CN122613291A_ABST
Patent Text Reader

Abstract

The application discloses a residual current self-calibration method for an electric energy metering box, and relates to the technical field of electric energy metering boxes. The method comprises the following steps: constructing an in-box operation mapping reference, forming a residual current historical evolution track, extracting features of the residual current historical evolution track, and obtaining residual current historical evolution features; collecting a real-time residual current sequence, extracting features of the real-time residual current sequence, and obtaining residual current real-time evolution features; calculating the matching degree of the residual current real-time evolution features and the residual current historical evolution features by using an improved nearest neighbor method, and performing weighted fusion and trend extrapolation to obtain a residual current prediction sequence; collecting a real-time residual current extension sequence, calculating the difference between the residual current prediction sequence and the real-time residual current extension sequence by using an improved dynamic time warping method, obtaining a parameter mismatch error, adjusting the in-box operation mapping reference based on the parameter mismatch error, and obtaining an adjusted in-box operation mapping reference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electricity metering box technology, specifically to a method for self-calibrating the residual current of an electricity metering box. Background Technology

[0002] Electricity metering boxes are core terminal devices for electricity metering and electricity safety monitoring in power distribution networks. Residual current detection is a key technical means to prevent safety hazards such as line leakage, insulation degradation, and electrical fires. In actual operating scenarios, electricity metering boxes are exposed to the outdoors or industrial sites for extended periods, continuously affected by factors such as changes in ambient temperature and humidity, external magnetic field disturbances, and load fluctuations. This can easily lead to detection deviations in residual current transformers, such as zero-point drift, false leakage current, and magnetic field interference, directly reducing the accuracy and reliability of residual current monitoring. Therefore, accurate calibration of residual current has become a core technical requirement to ensure the safe and stable operation of metering boxes.

[0003] In traditional methods, most residual current calibrations are performed manually on-site periodically or with fixed-cycle parameter corrections. Maintenance personnel arrive at the site at preset time intervals and use standard testing equipment to perform single-point parameter corrections on the residual current transformers to complete the residual current calibration work.

[0004] However, the fixed-cycle calibration mode of traditional methods lacks the inherent correlation between the operating environment parameters inside the box and the evolution of residual current. It cannot achieve real-time elimination of environmental interference components and reconstruction of the true residual current trajectory, thus failing to accurately match the changing characteristics of residual current under different operating conditions. Ultimately, this leads to distorted residual current calibration results, making it difficult to truly reflect the actual state of the equipment's insulation performance. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a self-calibration method for residual current in an energy metering box, thereby resolving the problems existing in the background technology.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for self-calibrating the residual current of an electricity metering box, comprising the following steps: Step S1: Construct an internal operation mapping benchmark for the residual current of the power metering box; Step S2: Based on the in-box operation mapping benchmark, form the residual current historical evolution trajectory, extract features from the residual current historical evolution trajectory, and obtain the residual current historical evolution features; Step S3: Collect real-time residual current sequences and extract features from them to obtain real-time residual current evolution features; calculate the matching degree between the real-time residual current evolution features and the historical residual current evolution features using the improved nearest neighbor method, select a preliminary optimal matching set, and perform weighted fusion and trend extrapolation on the preliminary optimal matching set to obtain the residual current prediction sequence. Step S4: Collect the real-time residual current extension sequence, calculate the difference between the residual current prediction sequence and the real-time residual current extension sequence using the improved dynamic time warping method, obtain the parameter mismatch error, adjust the in-box operation mapping benchmark based on the parameter mismatch error, and obtain the adjusted in-box operation mapping benchmark, thereby realizing residual current self-calibration.

[0007] Preferably, the construction of the in-box operation mapping benchmark for the residual current of the power metering box includes the following specific steps: The temperature rise drift effect, moisture leakage effect and magnetic field disturbance effect of the power metering box were calibrated to obtain the internal operation mapping benchmark.

[0008] Preferably, the process of forming the residual current historical evolution trajectory based on the in-box operation mapping benchmark includes the following steps: Based on the in-box operation mapping benchmark, the zero-point drift, spurious leakage current, and magnetic field coupling interference were calculated. Collect the original total residual current value, and subtract the zero-point drift, false leakage current and magnetic field coupling interference from the original total residual current value to obtain the true residual current. By using a sliding observation window, the actual residual current is segmented into segments to obtain the historical evolution trajectory of the residual current.

[0009] Preferably, the step of extracting features from the historical evolution trajectory of the residual current to obtain the historical evolution features of the residual current includes the following steps: The characteristics of residual current historical evolution include: mean, variance, extreme value ratio, linear slope, curvature change, peak factor, and waveform factor of residual current historical evolution trajectory.

[0010] Preferably, the step of calculating the matching degree between the real-time evolution characteristics and the historical evolution characteristics of the residual current using the improved nearest neighbor method, filtering to obtain a preliminary optimal matching set, and then performing weighted fusion and trend extrapolation on the preliminary optimal matching set to obtain the residual current prediction sequence includes the following steps: Calculate the Euclidean distance between the real-time evolution characteristics and the historical evolution characteristics of the residual current; Based on the Euclidean distance, the dominant operating condition label of the real-time evolution characteristics of the residual current is obtained; Extract the subset of historical trajectories corresponding to the dominant operating condition labels; An initial optimal matching set is obtained by using an immune cloning algorithm to screen a subset of historical trajectories. The genetic algorithm is used to perform curve fitting on the preliminary optimal matching set and the real-time evolution characteristics of the residual current to obtain the residual current prediction sequence.

[0011] Preferably, the preliminary screening of the historical trajectory subset using the immune cloning algorithm to obtain a preliminary optimal matching set includes the following steps: Calculate the affinity of each residual current historical evolution trajectory in the real-time residual current sequence and historical trajectory subset; Based on affinity, a subset of historical trajectories is filtered to obtain candidate historical trajectories; Candidate historical trajectories are cloned to obtain a clone population; Perform mutation operations on the cloned population; By calculating the affinity of all individuals in the mutated clone population with the real-time residual current sequence, the mutated clone population is screened to obtain a preliminary optimal matching set.

[0012] Preferably, the step of using a genetic algorithm to perform curve fitting on the preliminary optimal matching set and the real-time evolution characteristics of the residual current to obtain the residual current prediction sequence includes the following specific steps: Construct the initial population for the genetic algorithm; Construct the fitness function for the genetic algorithm; After iterative optimization of the genetic algorithm, the optimal weight vector is obtained; Based on the optimal weight vector, the real-time residual current sequence is extrapolated and predicted to obtain the residual current prediction sequence.

[0013] Preferably, the fitness function for constructing the genetic algorithm is specifically: ; in, For the fitness function value, This represents the number of sampling points for the real-time residual current sequence within the sliding window. This represents the real-time residual current at sampling time t. The weighted residual current of the historical trajectory corresponding to sampling time t. For the weight vector, The sampling start time, This is the end time of sampling.

[0014] Preferably, the step of calculating the difference between the predicted residual current sequence and the real-time extended residual current sequence using the improved dynamic time warping method to obtain the parameter mismatch error includes the following specific steps: The residual current prediction sequence and the real-time residual current extension sequence are reduced in dimension to obtain the dimension-reduced residual current prediction sequence and the dimension-reduced real-time residual current extension sequence. A two-dimensional cumulative distance matrix is ​​constructed based on the dimension-reduced residual current prediction sequence and the dimension-reduced real-time residual current extension sequence. The parameter mismatch error is obtained by calculating the effective distance of the two-dimensional cumulative distance matrix.

[0015] Preferably, the construction of the two-dimensional cumulative distance matrix specifically involves: ; in, This represents the numerical value of the matrix element at coordinates (u, v). This represents the value of the predicted true residual current sequence at the u-th position after dimensionality reduction. Let u and v be the value at the v-th position of the real-time residual current extended sequence after dimensionality reduction, where u and v are the element indices of the matrix. The maximum permissible misalignment is given by _min_, which is a function that takes the minimum value.

[0016] This invention provides a self-calibration method for residual current in an energy metering box, relating to online monitoring and adaptive calibration technology for residual current in energy metering boxes, which has the following beneficial effects: (1) The physical boundary-based operating condition classification and centroid matching mechanism resolves the logical conflict between operating condition determination and prediction window, improving the physical interpretability of the prediction. Existing technologies often use dynamic window adjustment or hard threshold rules to determine operating conditions, which can easily lead to a circular dependency of whether the operating condition or the window comes first, or conflict with subsequent prediction logic. This invention pre-constructs an evolution feature library covering various operating conditions such as high temperature and high load, medium load, and high humidity and low insulation, which is used in subsequent steps to distinguish whether the change in residual current is an adaptive fluctuation caused by environmental operating conditions or a dangerous trend caused by insulation degradation. It also clearly defines the physical boundaries of each operating condition (such as duration, temperature, and load rate) and uses centroid feature vectors to cluster historical data. In actual operation, the current dominant operating condition can be determined by quickly comparing the real-time feature vectors with the centroid of the operating condition, without waiting for long-term steady-state data. This physical boundary-based classification mechanism avoids the conflict between rule-based determination and feature matching methods, ensuring that subsequent predictions are always carried out in a homogeneous physical environment, and greatly improving the rationality and accuracy of residual current change trend prediction.

[0017] (2) The dual-layer heuristic optimization architecture, namely immune clonal selection and genetic algorithm, overcomes the limitations of single matching and significantly enhances the prediction robustness under complex working conditions. The traditional nearest neighbor method relies on a single Euclidean distance to screen historical trajectories, which is easily affected by noise and prone to getting trapped in local optima. The screening-fusion dual-layer optimization architecture designed in this invention effectively solves this problem: the first layer, immune clonal selection, dynamically allocates clonal resources based on affinity, escapes local extreme value traps through high-frequency mutation, and screens out the most representative candidate trajectories from massive historical data, filtering out random noise; the second layer, genetic algorithm, breaks through the limitation of a single trajectory, performs weighted fusion optimization on the candidate set, and finds the best linear combination weight by simulating the biological evolution process. This strategy not only preserves the typical evolutionary pattern of historical trajectories, but also accurately fits the nonlinear trend of insulation degradation through the complementary advantages of multiple trajectories, greatly enhancing the model's generalization ability and prediction confidence under complex and variable working conditions.

[0018] (3) The improved dynamic time warping algorithm accurately decouples physical lag and parameter mismatch, achieving efficient and high-precision self-calibration at the terminal side. The thermal inertia of insulating materials and the lag of magnetic cores often lead to local misalignment between predicted and measured values. Traditional point-to-point comparison is prone to misjudging such physical lag as model inaccuracy, and the storage overhead of the three-dimensional matrix calculation method is huge, which is not suitable for the local processing unit of the metering box. This invention proposes an improved DTW algorithm that combines segmented aggregation approximation with fixed alignment path length. By reducing the dimensionality to compress the sequence length, combined with two-dimensional constrained dynamic programming (replacing the original three-dimensional matrix), the storage overhead is reduced, adapting to the resource constraints of the local terminal of the metering box; the maximum allowable lag threshold is defined, the fixed alignment path length is derived, and a two-dimensional recursive formula with band constraints is constructed. This algorithm can tolerate small time misalignment caused by material thermal capacity, and can also keenly identify the mapping reference parameter mismatch error (originating from differences in on-site heat dissipation conditions, insulation dust accumulation, or device aging), avoiding misjudging normal physical fluctuations as model deviations. Through the above mechanism, the algorithm can accurately extract the parameter error that needs to be calibrated, prevent missed or false alarms caused by miscalibration, and realize the leap from passive detection to active adaptive calibration. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating the steps of a self-calibration method for residual current in an energy metering box proposed in this invention. Figure 2This is a step hierarchy diagram of obtaining the historical evolution characteristics of residual current in a self-calibration method for residual current of an energy metering box proposed in this invention. Figure 3 This is a step hierarchy diagram of obtaining the residual current prediction sequence in the residual current self-calibration method for an energy metering box proposed in this invention. Detailed Implementation

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

[0022] Please see Figures 1-3 The present invention provides a technical solution: a method for self-calibrating the residual current of an energy metering box.

[0023] Step S1: Construct an internal operation mapping benchmark for the residual current of the power metering box.

[0024] In the specific implementation of step S1, the physical parameters of the energy metering box must first be decoupled and calibrated under a controlled experimental environment to determine the quantitative mapping relationship between operating elements and detection offset types. A three-phase energy metering box under rated operating conditions is selected as the test object and placed in a programmable constant temperature and humidity test chamber, equipped with a high-precision standard current source, a multi-channel synchronous data acquisition device, and a distributed temperature acquisition module closely attached to the transformer core and conductor. The experiment uses the controlled variable method, sequentially adjusting the gradient of a single environmental element while maintaining the reference conditions for other elements, i.e., the reference temperature. Reference humidity .

[0025] For calibration of the temperature rise drift effect, the ambient humidity was kept constant at 50% RH, and tests were repeated under four operating conditions: no load, 20% rated load, 50% rated load, and 100% rated load. Under each load condition, the test chamber temperature was gradually increased from -25℃ to 60℃ in 5℃ increments, and each temperature point was held for 30 minutes until thermal equilibrium was reached. In the last 5 minutes before the end of the holding period, the output signal of the residual current transformer was continuously acquired at 1-second intervals. Measured temperature of the transformer core 30 sets of data each, and take the output signals of the residual current transformers for each of the 30 sets. Measured temperature of the transformer core The arithmetic mean is used as the stable measurement value under this gradient, i.e., the average current. and average temperature Then recorded The deviation from the standard zero point yields the zero-point drift caused by the temperature rise. By traversing all temperature gradients and load conditions, a discrete data point set consisting of multiple sets of average temperature and zero-point drift is obtained. A temperature rise drift mapping model is then established by performing least-squares linear fitting on the discrete data points. ,in For this load The temperature drift coefficient, in mA / ℃, is obtained by least squares fitting.

[0026] It should be noted that in actual field operations, the heat dissipation conditions of the current transformer may differ from those in the laboratory due to its installation location (such as proximity to the enclosure wall or ventilation holes). Therefore, before commissioning the metering box in the field, the core temperature must be measured using an infrared thermal imager under the same load conditions as the laboratory calibration (e.g., 50% of the rated load). If the measured temperature is the same as the core temperature under the same load conditions during laboratory calibration... If the deviation exceeds ±2℃, it indicates that the on-site heat dissipation conditions have changed, and the temperature drift coefficient needs to be adjusted. Correction: For every ±1℃ deviation between the measured temperature and the laboratory calibration temperature, [the following will be corrected / corrected]. Adjust by 1% in the same direction (for example, if the measured temperature is 3°C higher, then...). Increase by 3%; if the actual measured temperature is 2℃ lower, then... The adjustment is reduced by 2%, with the correction range limited to ±5% to accommodate differences in on-site heat dissipation. Therefore, the corrected temperature drift coefficient is = ×(1+ ).

[0027] For the calibration of the moisture leakage effect, given that the surface leakage current caused by moisture is a surface conduction effect of the insulating medium, its amplitude is strongly correlated only with the ambient relative humidity and is independent of the circuit load current. Therefore, the load was kept unloaded, and the test chamber temperature was kept constant at 25℃. In the first stage, starting from 40%RH, the humidity was gradually increased to 70%RH in 10%RH increments. In the second stage, within the 70%RH~90%RH range (critical humidity core range), the humidity was gradually increased from 70%RH to 90%RH in 5%RH increments. In the third stage, within the 90%RH~95%RH range (extreme high humidity range), the humidity was gradually increased from 90%RH to 94%RH in 2%RH increments, and finally increased to 95%RH in 1%RH increments. Each humidity point was kept at the temperature for 30 minutes until the humidity stabilized (fluctuation ≤ ±1%RH). During this period, the residual current transformer output signal was continuously collected 30 times at 1-second intervals, and the arithmetic mean was taken as the spurious residual current at that humidity level. Based on practical engineering considerations, when humidity exceeds a critical threshold... At that time, the spurious residual current exhibits an exponential growth trend. Based on this, the nonlinear least squares method is used to analyze the experimental data (H, An exponential model was fitted to obtain a moisture leakage mapping model. ,in and These are the fitting coefficients. The humidity level is the critical humidity. The fitting process must meet the following requirements: The initial value is set to 75%RH (a common industrial threshold), and the initial value of a is set to H= time The measured value, with an initial value of 0.05, is suitable for common insulating materials such as ABS, epoxy resin, and thermosetting insulation components. This is a commonly used empirical initial value for this type of model in the power industry; the coefficient of determination... ≥0.95, ensuring the model's prediction error is ≤5% in the critical region (70%~90% RH); a is H= The spurious leakage current at that time is expressed in mA, and b is the humidity sensitivity coefficient, expressed as 1 / %RH. This represents the inflection point of rapid increase in leakage current, expressed in %RH.

[0028] It should be noted that the critical humidity calibrated in the laboratory... This is based on the standard insulation surface condition. However, in actual field conditions, the hygroscopic conductivity of the insulation surface can change due to dust, oil, or slight condensation inside the metering box. Therefore, before putting the metering box into operation in the field, the ambient humidity must be below ( Under stable operating conditions (-10%RH) and above 40%RH (e.g., when...) When the relative humidity is 75% (select an environment with approximately 65% ​​RH), monitor the output of the residual current detection channel. If a false residual current exceeding the accuracy threshold (e.g., 0.5mA) is observed at this time, it indicates a decrease in the field insulation level, and the critical humidity needs to be adjusted. To reduce the RH level (e.g., lower it by 5%) and prevent false alarms in rainy weather, the corrected critical humidity level is... , =min( 0.1 ),in No more than 10%, such as =75%RH, then ≤7.5%RH.

[0029] For calibration of the magnetic field disturbance effect, the test object was placed in an electromagnetically shielded room, and a Helmholtz coil was used to apply a 50Hz alternating power frequency magnetic field with an intensity range of 0 to 1mT around the metering box. Under each fixed magnetic field strength, the interference offset of the residual current detection channel was recorded under four operating conditions: no load, 20% rated load, 50% rated load, and 100% rated load. Iterate through all test conditions and establish a system with magnetic field strength and load current as inputs. The output is a two-dimensional magnetic field disturbance lookup table: the magnetic field disturbance lookup table uses magnetic field strength B (horizontal axis, 0~1mT, step 0.1mT) and load current as inputs. (Vertical axis, 0~100%) Step by 20% Using ) as the index, data for each grid point was obtained through the following experiment: In an electromagnetically shielded room, a 50Hz sinusoidal magnetic field was applied using a Helmholtz coil, and different (B, Interference offset under) Repeat the test three times and record the average value in the table. For operating points not directly included in the table, use bilinear interpolation to calculate the real-time disturbance, with an interpolation error ≤3%.

[0030] It should be noted that in actual field operations, the metering box may be located near strong magnetic field sources such as transformers or cable trenches, and its magnetic field spectrum (including 3rd and 5th harmonics) differs from the pure 50Hz power frequency in the laboratory. Therefore, before on-site commissioning, the magnetic field spectrum within a 1-meter radius of the metering box must be measured using a portable magnetic field spectrum analyzer, and a harmonic-sensitive amplification factor should be introduced. , Preferably, option 2 is selected to adapt to the typical abnormal losses of permalloy or nanocrystalline ribbon under power frequency and low-harmonic conditions. The lookup table is then spectral corrected: if the measured magnetic field contains a 3rd harmonic and its amplitude accounts for a certain percentage... %(For example =15%), then the total interference is added to the original 50Hz fundamental frequency interference. An additional % offset (resulting in an additional 30% interference, correcting the original 2mA to 2.6mA) is required to adapt to the complex electromagnetic environment in the field. In field applications, if the measured harmonics contain 5th or higher harmonics, it is necessary to... Increase by 0.2 for each harmonic order increase (e.g., for the 5th harmonic). =2.4). If the magnetic field strength B>1mT or the load current... >100% Then, take the maximum magnetic field strength of 1 mT or the maximum load of 100% from the lookup table. The corresponding interference amount is set as the upper limit to avoid overflow.

[0031] Through a series of experiments conducted under ideal conditions with no actual leakage current and no insulation degradation, a series of quantitative mapping benchmarks for environmental parameters and detection offsets were obtained, and an initial operational mapping benchmark was constructed. ,in This represents the temperature rise drift mapping, which is expressed as a linear function model. Used to input the core temperature And output the corresponding zero-point drift amount, This indicates the load. The temperature drift coefficient below needs to be corrected according to the rules mentioned above, taking into account the on-site heat dissipation conditions. This represents a moisture leakage mapping, expressed as a piecewise function model, where the humidity H ≤ the critical threshold. The false residual current output is zero when H > critical threshold. Time output This is used to input the ambient humidity H and output the corresponding false residual current, which needs to be corrected according to the rules mentioned above based on the on-site insulation level. This represents the magnetic field disturbance mapping, which is represented by a two-dimensional linear interpolation lookup table. This table takes the external magnetic field strength (horizontal axis, 0~1mT) and the load current (vertical axis, 0~100%) as joint index inputs and outputs the corresponding detection deviation. For operating conditions not directly included in the table, the real-time interference is calculated using a bilinear interpolation algorithm, which needs to be combined with the on-site harmonic spectrum according to the rules mentioned above. Correction. The final in-box operational mapping baseline is obtained. That is, the mapping benchmark is corrected based on the on-site environment.

[0032] Step S2: Based on the in-box operation mapping benchmark, form the historical evolution trajectory of the residual current, extract features from the historical evolution trajectory of the residual current, and obtain the historical evolution features of the residual current.

[0033] Based on the in-box operation mapping benchmark constructed in step S1 The system performs backtracking processing on the long-term historical operating data stored in the edge computing unit of the power metering box, removes environmental interference components through physical decoupling, and reconstructs the true residual current evolution trajectory reflecting the deterioration of insulation performance.

[0034] First, extract minute-level sampled datasets from the past year from memory, with each data record containing a timestamp. Ambient humidity Core temperature Load current External magnetic field strength and the total value of the original residual current collected by the system. During data acquisition, data validity criteria are established simultaneously to eliminate samples with physical distortions: Sudden change elimination: If the residual current change rate exceeds 50% / s within adjacent sampling periods, or the core temperature jump exceeds 5℃ / s, it is determined to be electromagnetic interference or poor contact and is eliminated; Exceeding limits elimination: If the original total residual current value exceeds the rated residual operating current (e.g., 30mA), it is determined to have entered a fault state and is not within the sub-health monitoring range, and is eliminated; Shutdown elimination: If the load current... If the current is less than 5% below the rated value, the equipment is considered to be in a shutdown state. In this case, the residual current has no physical meaning and is discarded. Steady-state maintenance: Only steady-state operating data with load current fluctuations within ±10% and ambient temperature and humidity change rates less than 0.5℃ / min and 0.5%RH / min are retained, ultimately obtaining the effective data subset. This serves as an analytical benchmark to prevent noise pollution from sudden faults and to address the aging trend of insulation.

[0035] Traverse valid data subsets Each sampling point in The dynamic disturbance is calculated using the mapping reference established in step S1. For the calculation of temperature rise drift, the current core temperature is input. And load current, call temperature rise drift mapping According to the formula Calculate the zero-point drift at time t, where The temperature drift coefficient obtained from fitting in step S1, This is the reference temperature.

[0036] For calculating moisture leakage, input the current ambient humidity. Call the moisture leak mapping ,like Then the false leakage current ,like Then according to the formula Calculate the spurious leakage current, where , These are the fitting coefficients. This is the critical humidity level for humidity.

[0037] For calculating the magnetic field disturbance, input the current magnetic field strength. and load current Call the magnetic field disturbance mapping The magnetic field coupling interference under this operating condition is obtained by using a two-dimensional linear interpolation lookup table. .

[0038] Based on the ideal mapping benchmark M established in step S1, which is free from actual leakage and insulation degradation, this benchmark clarifies that environmental interference components and insulation degradation leakage signals are independent and physically separable. In actual calculations, the on-site corrected mapping benchmark is used. Calculate the interference components and solve for the true residual current. The specific solution formula is as follows: , , , All are based on the corrected mapping benchmark Calculated.

[0039] The calculated By timestamp By sorting and connecting the data, a historical evolution trajectory of the residual current can be constructed. The trajectory Background noise caused by diurnal temperature differences, seasonal humidity changes, and power grid load fluctuations has been eliminated, and only the true electrical quantity gradual change characteristics caused by the propagation, carbonization, or damage of micro-cracks in the insulation material have been retained.

[0040] Based on this, a scanning mechanism based on steady-state preserved frames is used to segment and extract features from the trajectory Γ across complete operating conditions. During the segmentation process, the system synchronously records and stores the original environmental parameter sequence {H(t), T(t), ...} corresponding to each evolution record block. The system uses a threshold value (B(t)) to classify operating conditions. Due to inherent noise and thermal hysteresis in industrial sensors, a minimum steady-state duration threshold is set to avoid misjudgments caused by transient processes or data fluctuations. (e.g., 5 minutes), and set the engineering dead zone thresholds for each physical quantity: core temperature Ambient humidity Load current magnetic field strength , Indicates the rated current.

[0041] By maintaining a length of The sliding observation window traverses the trajectory along the timeline in 1-minute increments. At any given moment Calculate the observation window The range of each physical quantity (the difference between the maximum and minimum values). If the ranges of temperature and humidity respectively satisfy... , And the range between the load current and the magnetic field strength satisfies , If so, it is determined that the equipment is in steady-state operation mode during that time period.

[0042] If the range of any of the above physical quantities exceeds the corresponding engineering dead zone threshold, a substantial transition in operating conditions is determined. At this point, the data from the start point of the steady-state operation mode to the moment the transition occurs is extracted and divided into a complete evolution record block. This range-based segmentation method is not only computationally lightweight and easy to deploy at the edge, but also effectively filters out physical jitter in the critical region, ensuring that each segmented record block represents the stable physical response of the device under specific operating conditions.

[0043] For each evolution record block, the system performs a physical feature value comparison to determine its operating condition label. The determination logic is as follows: High temperature and high load trajectory: If the inner core temperature is in the original environmental parameter sequence corresponding to the recording block... and load current (in The duration of the electricity meter box's rated current (which accounts for more than 10% of the total current) exceeds 100%. And the total duration of the record block If the data segment is within a certain time frame, it is marked as a high-temperature, high-load trajectory, and the actual residual current within that segment is recorded. The mean and maximum rate of change, Derived from the 95th percentile of the core temperature under 50% load in step S1 (the highest core temperature at 50% load is determined in laboratory calibration). ).

[0044] High humidity and low insulation trajectory: If the internal environmental humidity is in the original environmental parameter sequence corresponding to the recording block... (The critical humidity level calibrated in step S1) and the total duration Hours, and during this period the magnetic field strength (i.e., far below the calibration required in step S1) Interference intensity (considered as no strong magnetic field interference), and load current fluctuation range If the load is relatively stable, it is marked as a high-humidity, low-insulation trajectory and extracted. Sensitivity coefficient as a function of humidity (i.e.) ).

[0045] Medium load trajectory: If the load current is in the environmental parameter sequence corresponding to the recording block At 40% ~60% If the duration of a record exceeds 90% and the total duration of a record block is ≥1 hour, it is marked as a medium-load track.

[0046] Low-temperature light-load trajectory: If the core temperature is in the original environmental parameter sequence corresponding to the recording block... and load current And the total duration of the record block If the time is less than 1 hour, it is marked as a low-temperature light-load trajectory.

[0047] Intermittent impact load trajectory: If the load current is in the original environmental parameter sequence corresponding to the recording block... In a unit period Within minutes, from to The full-range transitions, and the transition frequency per unit time. If a change occurs frequently (i.e., the total duration of the recording block covers the entire cycle of the change pattern), it is marked as an intermittent impact load trajectory.

[0048] Long-term stable operation trajectory: If the temperature, humidity, load, and magnetic field parameters within the recording block are all within the reference range defined in step S1 (i.e.) In , In Load fluctuation And magnetic field strength ), and the total duration of the record block If the time is less than 1 hour, it is marked as a long-term stable operating trajectory.

[0049] The complete evolution record block, after being assessed and tagged with the operating condition, is stored in the evolution feature library. This library is used in subsequent steps to distinguish whether the change in residual current is an adaptive fluctuation caused by environmental operating conditions or a dangerous trend caused by insulation degradation. Each record block is associated with and stored along with its time interval, environmental parameter sequence, actual residual current sequence, and global feature vector to support rapid matching and trend extrapolation based on tail feature triggering.

[0050] For each evolution trajectory that has been segmented and labeled with operating conditions, further multi-dimensional morphological feature extraction is required to construct a standardized feature library for subsequent matching. For any data segment identified as the k-th trajectory segment, the set of its actual residual current sequences within the time window is first obtained, i.e. , where n is the total number of sampling points within the trajectory segment.

[0051] For this sequence, we first calculate its statistical distribution characteristics, including the mean. ,variance and extreme value ratio Secondly, calculate the trend evolution characteristics, including the linear slope. and curvature change Linear slope This describes the overall trend of insulation degradation, obtained through univariate linear regression analysis of the sequence. The unit is mA / min. Positive values ​​indicate decreased insulation performance leading to increased leakage current during that period, while negative values ​​indicate insulation recovery or moisture absorption. (Curvature change) To capture changes in the rate of degradation, the trajectory segment is divided into two equal sub-intervals, and the slope of the first half is calculated separately. and the slope of the second half and take the difference. When this value is significantly greater than zero, it indicates that the insulation has entered an accelerated aging stage. Next, the morphological waveform characteristics, including the peak factor, are calculated. and waveform factor Peak factor Defined as the ratio of the maximum value of the sequence to the RMS value, i.e. This feature is sensitive to pulsed leakage current and can be used to identify micro-discharge phenomena under intermittent impact loads; waveform factor Defined as the ratio of the effective value to the absolute mean, i.e. It is used to distinguish between smooth sinusoidal leakage and irregular complex waveform leakage.

[0052] Feature extraction is strictly limited to... The 7-dimensional description itself is fully aligned with the real-time feature dimensions in the subsequent step S3. After completing the above feature calculations, to prevent the influence of different units on the matching results, all feature values ​​are normalized. Robust normalization is used, determining the mapping boundary based on the 5%~95% quantiles of the corresponding feature dimensions in the evolutionary feature library, linearly mapping each feature value to the [0,1] interval. The processed feature combination forms the morphological fingerprint vector of this trajectory segment. , represented as Finally, the morphological fingerprint vector Its corresponding working condition label (in An evolution feature library is constructed from data selected from the sets {high temperature and high load, high humidity and low insulation, low temperature and light load, intermittent impact load, and long-term stable operation}. This library employs a two-level index structure: operating condition label and feature vector. The first-level index consists of operating condition labels (e.g., high temperature and high load, high humidity and low insulation, medium load), with each label corresponding to a feature sub-library. The second-level index arranges evolution record blocks for each feature sub-library in chronological order. Each block contains: a time interval, a sequence of original environmental parameters, and a sequence of actual residual current. morphological fingerprint vector Each feature sub-library is pre-calculated synchronously with the centroid feature vector (i.e., all features in the sub-library) for that specific operating condition during storage. The mean vector of the centroid feature vector is stored in the header of the sub-library. In step S3, the pre-calculated centroid feature vector can be directly called, eliminating the need for real-time computation and reducing edge computation overhead. Each record block in the evolutionary feature library needs to be associated with and stored using the in-situ corrected mapping baseline parameters used in its calculation. This is so that in step S4, the corresponding parameters can be traced based on the working condition label of the record block, and the parameter mismatch error can be calculated.

[0053] Step S3: Collect real-time residual current sequences and extract features from them to obtain real-time residual current evolution features; calculate the matching degree between the real-time residual current evolution features and the historical residual current evolution features using an improved nearest neighbor method, select a preliminary optimal matching set, and perform weighted fusion and trend extrapolation on the preliminary optimal matching set to obtain the residual current prediction sequence.

[0054] First, real-time operating data within a fixed preset time period before the current moment is acquired. This time period covers the minimum recording block duration required for all operating condition tags in step S2; in this embodiment, it is set to 2 hours to ensure the stability of feature extraction. The acquired data includes ambient humidity, core temperature, load current, external magnetic field strength, and the original total residual current. This is based on the mapping benchmark corrected on-site in step S1. The real-time data segment undergoes dynamic interference calculation and removal. Specifically, the temperature rise drift mapping model is used to calculate the thermally induced zero-point drift, the moisture leakage mapping model is used to calculate the spurious residual current, and the magnetic field disturbance mapping model is used to calculate the magnetic field coupling interference. The original total residual current value is then subtracted from the above three environmental interference components to obtain the real-time residual current sequence for the current time period. .

[0055] Subsequently, the obtained real-time residual current sequence Perform the same 7-dimensional feature extraction process as in step S2. Calculate the statistical distribution characteristics (mean, variance, extreme value ratio), trend evolution characteristics (linear slope, curvature change), and morphological waveform characteristics (peak factor, waveform factor) of the sequence. Normalize the above feature values ​​using the same robust normalization method as in step S2, and combine them to form the real-time evolution characteristics of the residual current for the current time period. .

[0056] First, based on the evolution feature library constructed in step S2, the centroid feature vectors pre-calculated in the header of each working condition sub-library are directly called, which are the mean vectors of each working condition stored in step S2. The centroid feature vector represents the average level and typical form of the equipment insulation state evolution under this type of evolution trajectory. It is calculated by taking the arithmetic mean of all vectors in the set in each dimension.

[0057] To obtain the real-time evolution characteristics of the residual current in the current time period. Next, the operating condition attribution is determined. The real-time morphological fingerprint vector is calculated. The Euclidean distance between the centroid of each operating condition and the centroid in the evolutionary feature library is calculated. The label corresponding to the centroid of the operating condition category with the smallest Euclidean distance is selected and determined as the dominant operating condition in the current operation. This step, by comparing the geometric distance between the current characteristics and typical characteristics of various operating conditions, enables a rapid and accurate determination of the category to which the current operating state belongs.

[0058] Based on the identified dominant operating condition labels In the evolutionary feature library, the subset of residual current historical evolution trajectories belonging to this tag, i.e., the dominant operating condition tag, is identified. The historical evolution trajectory of residual current is analyzed. To improve the robustness and prediction accuracy of the nearest neighbor method and avoid the drawback of a single Euclidean distance metric easily getting trapped in local optima under complex operating conditions, this scheme introduces an improved nearest neighbor method, including a two-layer optimization mechanism, to screen and fuse the historical evolution trajectory of residual current.

[0059] The two-layer optimization mechanism transforms the matching degree into a residual current prediction sequence through three steps: screening, fusion, and extrapolation. First, the first layer of optimization is performed, using nearest neighbor selection based on immune clonal selection for preliminary screening. Then, the residual current for the current time period is transformed into a feature vector in real time. As an antigen, the fingerprint vectors of each historical form within the subset of the residual current historical evolution trajectory are used. As antibodies, calculate the affinity between the antigen and each antibody. The affinity is defined as the reciprocal of the Euclidean distance between eigenvectors, i.e. ,in This represents the L2 norm. Based on affinity, the subset of residual current historical evolution trajectories with the highest affinity is selected. The historical evolution trajectory of candidate residual currents constitutes a candidate antibody population. The value was determined through offline experiments: In an offline state, 1000 sets of historical data were used as a validation set to try different values. Using different values ​​such as 10, 20, 30, 40, and 50, the root mean square error (RMSE) between the predicted and actual interference components was calculated for each value. The value with the smallest RMS error, satisfying the condition of RMS error ≤ 0.5mA (measuring accuracy), was selected. As the final value.

[0060] Suppose the candidate antibody population includes One antibody, each antibody Corresponding to an affinity value The specific steps for clonal proliferation are as follows: First, calculate the clonal size of each antibody. The calculation formula is: ,in The preset total number of clones, preferably 100, allows 100 cloned samples to escape local optima without exceeding the upper limit of edge unit computing power. This is a rounding function. This formula ensures that the number of clones for each antibody is proportional to its affinity; antibodies with higher affinity are replicated more frequently. Next, for each antibody... copy First, a clone population is generated. Then, random mutations are introduced into each clone in the clone population. The mutation operation is performed by superimposing a standard normal distribution on each dimension of the original feature vector. It is achieved through tiny random perturbations, where The preset variable length, ranging from 0.01 to 0.05, is used to escape local optima. Finally, the values ​​of all individuals in the mutated clone population are recalculated. Choose the one with the highest affinity. The historical evolution trajectory of the residual current is used as the first-level optimization output, denoted as the preliminary optimal matching set. The The preferred number of samples is 10. In a 7-dimensional feature space, 10 samples can balance diversity and computational load. This order of magnitude, in a matching scenario with a feature vector dimension of 7, can effectively filter out random noise from the historical evolution trajectory of a single residual current through multi-sample fusion, and can also control the search space of the subsequent genetic algorithm within the range that the edge computing unit can process in real time, thus adapting to the dual requirements of power metering boxes for prediction response speed and computational accuracy.

[0061] The second layer of optimization is then performed, namely, optimal weight optimization and interference prediction based on a genetic algorithm. This is done on the initial optimal matching set output from the first layer. Based on this, the aim is to find the optimal linear combination weights for these residual current historical evolution trajectories to most accurately fit the current actual insulation degradation trend. Each residual current historical evolution trajectory in the preliminary optimal matching set is assigned an initial weight. Dimensionless, with values ​​ranging from [0,1], forming the weight vector. ,satisfy =1, and randomly generate 50 different weight vectors to form the initial population of the genetic algorithm.

[0062] Genetic algorithm randomly generates 50 different weight vectors To form the initial population, each group Corresponding to a fitness value Optimize the weight vector using a genetic algorithm. The aim is to make the weighted fusion of historical sequences The shape should approximate the current real-time residual current sequence as closely as possible. The specific form of weighted fusion is a weighted fusion sequence. Use the actual residual current sequence stored in the feature library in step S2 directly to ensure time axis alignment: ; in For the first optimal matching set The actual residual current sequence corresponding to the historical evolution trajectory of residual current. For the first The weighting coefficients corresponding to the historical evolution trajectory of residual current. This is to determine the number of historical evolution trajectories of residual current in the initial optimal matching set.

[0063] Define the fitness function of the genetic algorithm The root mean square error between the current real-time sequence and the weighted fused sequence is: ; in, For the fitness function value, This represents the number of sampling points for the real-time residual current sequence within the sliding window. This represents the real-time residual current at sampling time t. The weighted residual current of the historical trajectory corresponding to sampling time t. For the weight vector, The sampling start time, This represents the end time of sampling. The smaller the fitness function value, the higher the fit between the weighted fused historical sequence and the current sequence.

[0064] Subsequently, the selection, crossover, and mutation operations of the genetic algorithm are performed. The selection operation retains weight vectors with high fitness based on a roulette wheel strategy; the crossover operation simulates gene recombination, with a preset crossover probability. Two parent weight vectors are randomly selected, and their gene segments are swapped to generate a new vector; the mutation operation is performed with a tiny probability. To maintain population diversity, a certain weight value is randomly changed. The preferred value is 0.01; The optimal value is 0.7, which achieves the best balance between the algorithm's global exploration capability (finding new regions) and local development capability (preserving superior genes), and the crossover probability. =0.7, Probability of Mutation =0.01 was determined through offline experiments: in 100 iterations, The convergence speed is fastest when the value is 0.7. The population diversity loss is minimized when the coefficient of variation is 0.01. Through multiple generations of iterative evolution, when the maximum preset number of iterations is reached (ideally 100), the optimal balance between weight optimization accuracy and the computational load of edge computing units is achieved, and the iteration terminates. The final output is the fitness function. Minimize the optimal weight vector .

[0065] Determine the optimal weight vector Then, perform trend extrapolation forecasting. The end time of the current observation window is... For future offset time Take 5-30 minutes and match it with the extended sequence duration in step S4 to predict the target time. The predicted actual residual current value Calculated using the linear extrapolation formula: ; in, Indicates the end time of the current observation window. The actual residual current value, Indicates the end time of the current observation window. The actual residual current value, For the first The linear slope of the historical evolution trajectory of residual current. The optimal weighting coefficients are for the i-th residual current historical evolution trajectory. Indicates the future offset time. This represents the number of historical evolution trajectories of the residual current in the initial optimal matching set.

[0066] Step S4: Collect the real-time residual current extension sequence, calculate the difference between the residual current prediction sequence and the real-time residual current extension sequence using the improved dynamic time warping method, obtain the parameter mismatch error, adjust the in-box operation mapping benchmark based on the parameter mismatch error, and obtain the adjusted in-box operation mapping benchmark, thereby realizing residual current self-calibration.

[0067] In obtaining future offset time Predicted true residual current sequence within 5-30 minutes, exactly the same as step S3 Subsequently, a case-by-case pre-compensation self-calibration based on the predicted residual is performed. Real-time residual current extension sequences spanning the same time span as the predicted sequence are collected. That is, after continuing the real-time residual current sequence The sequence of time points yields the real-time residual current extension sequence. The extended sequence needs to be associated with the current mapping baseline parameters stored in step S2 for subsequent parameter mismatch error tracing.

[0068] Due to the nonlinear characteristics of insulation material degradation and the hysteresis effect of the thermal inertia of the transformer core, the predicted sequence With real-time extended sequence Asynchronous phenomena often exist in the local evolution rhythm. For example, the prediction model determines that insulation degradation accelerates at the 5th minute, but due to the influence of material heat capacity, the actual acceleration may be delayed until the 7th minute. If traditional Euclidean distance is used for point-to-point comparison, it is easy to misjudge the lag in physical response as model inaccuracy, leading to overcalibration. To distinguish between physical lag and mapping reference parameter mismatch, this invention introduces an improved dynamic time warping algorithm. Its core is to define a fixed alignment path length FL. The physical meaning of FL is the maximum allowable time misalignment (determined by material heat capacity), corresponding to a lag of ≤2 minutes (i.e., the allowable range of physical response). The calculation basis of FL is: sampling interval. =1 point / minute, PAA window w=2 (2 minutes / block), dimensionality-reduced sequence length L=[ × The upper limit of allowable hysteresis for material heat capacity. =2 minutes, corresponding to the PAA block misalignment limit =[ ]=1; therefore FL=L+ That is, L+1, ensuring that the algorithm only tolerates physical lag and does not mistake it for model inaccuracy. Traditional Euclidean distance, because it cannot decouple the two, is prone to misjudging physical lag as model inaccuracy, leading to overcalibration.

[0069] To adapt to the computing power constraints of the edge computing unit of the power metering box, a piecewise aggregation approximation algorithm is used to approximate the sequence. and Dimensionality reduction is performed. The sequence is divided into several non-overlapping windows, with the window size denoted as . The optimal value for w is 2, which satisfies the lightweight requirements of edge computing while ensuring the morphological alignment accuracy between the predicted sequence and the real-time sequence, providing a reliable foundation for subsequent parameter mismatch error extraction. When w=2, i.e., the average value is taken every 2 minutes, the overall evolution trend retention rate of the sequence reaches over 95%, so w is preferably 2. Each element in the dimensionality-reduced sequence is taken as the arithmetic mean of the original data within that window; that is, when w=2, the average value of two consecutive data points within the window is taken. Therefore, the dimensionality-reduced predicted sequence is... The dimensionality-reduced real-time sequence is Their lengths are all L, L = , This represents the total number of sampling points in the residual current prediction sequence and the real-time residual current extended sequence before dimensionality reduction. For example, if a window contains the original data [10.0, 10.2], then after dimensionality reduction, the element value at that position is (10.0 + 10.2) / 2 = 10.1. This process reduces the algorithm complexity while preserving the overall evolution trend of the sequence.

[0070] Secondly, based on the aforementioned definition of fixed alignment path length FL=L+ (in =1, corresponding to a heat capacity allowable lag of ≤2 minutes). To maximize the allowable misalignment, the improved DTW distance between the two sequences is calculated, and the parameter mismatch error is extracted. The parameters of the mapping reference M calibrated in step S1 are affected by differences between field conditions and laboratory conditions (such as different heat dissipation conditions of current transformers, and the shift in moisture characteristics due to dust accumulation on the insulation surface) or device aging (such as the temperature drift coefficient changing with the increase of usage time), which causes the model to be unable to accurately describe environmental interference, thus producing differences between prediction and actual measurement.

[0071] Using two-dimensional constrained dynamic programming, the variables in the recursive formula are defined as follows: u represents the predicted sequence after dimensionality reduction. The index, u∈[1,L], v represents the measured sequence after dimensionality reduction. The index of the sequence, v∈[1,L]. D[u,v] is a two-dimensional cumulative distance matrix element, representing the minimum cumulative distance from the start of the sequence to the position (u,v). (u) represents the feature value of the predicted sequence in the u-th PAA window after dimensionality reduction. (v) represents the feature value of the predicted sequence in the v-th PAA window after dimensionality reduction.

[0072] Initialize D[1][1] = The recursive process begins, for cases satisfying the band constraint |uv|≤ The grid points are selected, and the minimum value of the predecessor state is taken: ; in, This represents the numerical value of the matrix element at coordinates (u, v). This represents the value of the predicted true residual current sequence at the u-th position after dimensionality reduction. Let u and v be the value at the v-th position of the real-time residual current extended sequence after dimensionality reduction, where u and v are the element indices of the matrix. The maximum permissible misalignment is defined by `min`, which is a function that takes the minimum value. , , The minimum value among the three elements.

[0073] During matrix calculation, only valid meshes that satisfy the path length constraint are retained, resulting in the final product. This refers to the improved dynamic time-warped distance between the two sequences. If this distance exceeds a preset tolerance threshold... If the static mapping reference has shifted, calibration needs to be initiated; if Within the threshold range, it is determined to be normal physical hysteresis and no calibration is required.

[0074] It should be noted that the tolerance threshold Before the electricity metering box leaves the factory, predictive residual data are collected under all operating conditions defined in step S2 (high temperature and high load, medium load, high humidity and low insulation, etc.) during long-term stable operation. For each operating condition... The threshold is calculated by summing the mean and three standard deviations. This method utilizes the "3σ criterion" to ensure that 99.7% of normal fluctuations are considered acceptable. Calibration is triggered only when model inaccuracy causes the distance to significantly exceed the historical normal range, effectively suppressing erroneous actions caused by environmental noise. After the mapping reference parameters are adjusted, the corresponding operating conditions are recalculated. Ensure that the threshold matches the current parameter.

[0075] Next, a parameter sensitivity matrix is ​​constructed based on the parameter mismatch error to solve for the correction amount. The baseline parameter vector for the in-box operation mapping to be optimized is defined as follows: ,in This is the temperature drift coefficient. This is the critical humidity level for dampness. This is the harmonic sensitivity factor. To quantify the influence weight of the above parameter changes on the residual current calculation results, experimental measurements were conducted: Under the ideal state in step S1, the parameters were finely adjusted... (±1%) (±1%RH) (±0.1), measurement , , The change in the parameter sensitivity matrix is ​​calculated by using the difference numerical method to determine the corresponding partial derivative values ​​for each group. : =[ - ,-a b , ]; in, , , These represent the temperature rise drift, moisture leakage, and magnetic field disturbance calculated in step S1, respectively. This matrix reflects the rate of change of residual current caused by adjusting unit parameters under the current operating conditions.

[0076] Finally, a gradient descent-based mapping baseline self-calibration is performed, based on the parameter mismatch error. The sign and magnitude of the parameter vector are determined by adjusting the parameter vector along the direction of fastest error reduction using gradient descent. The parameter update formula is as follows: ; in, The corrected parameter vector, This is the parameter mismatch error. The learning rate is set to a range of values. This is used to control the step size of a single correction, preventing the parameters from oscillating near extreme values. The convergence speed is fastest and there is no oscillation when the value is 0.05, and the preferred value is 0.05. S is the parameter sensitivity matrix.

[0077] when (deviation less than the tolerance threshold) Stop calibration when the value of the sample decreases by 10% or the number of iterations is ≥5. If the calibration is stopped, the new parameters will take effect immediately and be used for subsequent residual current calculations. If the calibration was stopped because the iterations reached 5 times: even if... It hasn't reached 0.1 yet. It also locks the current parameter; if at this time... Still greater than This indicates that either the parameters have already reached their optimal value under the current operating conditions, and further adjustments will not yield significant improvement, or continued iteration will only waste computing power and may even cause parameters to fluctuate, affecting stability. In such cases, a serious insulation fault is directly identified, triggering a warning. If the error persists after three consecutive iterations... The signal continues to diverge, indicating that the power metering box has a serious insulation fault that cannot be modeled and corrected. All parameters are locked and a fault warning is triggered to the host computer.

[0078] The corrected parameter vector Substitute the in-box operation mapping reference from step S1 into the current table, and it will immediately take effect and calculate the residual current for the next cycle. Simultaneously, update the mapping reference parameter version for the corresponding operating condition in the evolution feature library from step S2 to ensure that the latest parameters are used in subsequent step S3. If the recalculated parameters are... Convergence to threshold If the deviation is within the specified range, the current parameters are locked to complete self-calibration; if the deviation still diverges after multiple iterations, it is determined to be a serious insulation fault that cannot be modeled, and parameter correction is immediately stopped and the system enters an early warning state, thereby avoiding the underreporting of real leakage hazards.

[0079] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, the phrase "comprising an element defined as..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0080] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for self-calibrating the residual current of an electricity metering box, characterized in that: Includes the following steps: Step S1: Construct an internal operation mapping benchmark for the residual current of the power metering box; Step S2: Based on the in-box operation mapping benchmark, form the residual current historical evolution trajectory, extract features from the residual current historical evolution trajectory, and obtain the residual current historical evolution features; Step S3: Collect real-time residual current sequences and extract features from them to obtain real-time residual current evolution features; calculate the matching degree between the real-time residual current evolution features and the historical residual current evolution features using the improved nearest neighbor method, select a preliminary optimal matching set, and perform weighted fusion and trend extrapolation on the preliminary optimal matching set to obtain the residual current prediction sequence. Step S4: Collect the real-time residual current extension sequence, calculate the difference between the residual current prediction sequence and the real-time residual current extension sequence using the improved dynamic time warping method, obtain the parameter mismatch error, adjust the in-box operation mapping benchmark based on the parameter mismatch error, and obtain the adjusted in-box operation mapping benchmark, thereby realizing residual current self-calibration.

2. The self-calibration method for residual current of an energy metering box according to claim 1, characterized in that: The process of constructing an in-box operation mapping benchmark for the residual current of the power metering box includes the following specific steps: The temperature rise drift effect, moisture leakage effect and magnetic field disturbance effect of the power metering box were calibrated to obtain the internal operation mapping benchmark.

3. The self-calibration method for residual current of an energy metering box according to claim 2, characterized in that: The process of forming the residual current historical evolution trajectory based on the in-box operation mapping benchmark includes the following steps: Based on the in-box operation mapping benchmark, the zero-point drift, spurious leakage current, and magnetic field coupling interference were calculated. Collect the original total residual current value, and subtract the zero-point drift, false leakage current and magnetic field coupling interference from the original total residual current value to obtain the true residual current. By using a sliding observation window, the actual residual current is segmented into segments to obtain the historical evolution trajectory of the residual current.

4. The method for self-calibrating residual current of an energy metering box according to claim 3, characterized in that: The process of extracting features from the historical evolution trajectory of the residual current to obtain the historical evolution features of the residual current includes the following steps: The characteristics of residual current historical evolution include: mean, variance, extreme value ratio, linear slope, curvature change, peak factor, and waveform factor of residual current historical evolution trajectory.

5. The self-calibration method for residual current of an energy metering box according to claim 4, characterized in that: The process involves calculating the matching degree between the real-time evolution characteristics and historical evolution characteristics of the residual current using an improved nearest neighbor method, filtering to obtain a preliminary optimal matching set, and then performing weighted fusion and trend extrapolation on the preliminary optimal matching set to obtain the residual current prediction sequence. This includes the following steps: Calculate the Euclidean distance between the real-time evolution characteristics and the historical evolution characteristics of the residual current; Based on the Euclidean distance, the dominant operating condition label of the real-time evolution characteristics of the residual current is obtained; Extract the subset of historical trajectories corresponding to the dominant operating condition labels; An initial optimal matching set is obtained by using an immune cloning algorithm to screen a subset of historical trajectories. The genetic algorithm is used to perform curve fitting on the preliminary optimal matching set and the real-time evolution characteristics of the residual current to obtain the residual current prediction sequence.

6. The self-calibration method for residual current of an energy metering box according to claim 5, characterized in that: The preliminary screening of a subset of historical trajectories using an immune cloning algorithm to obtain a preliminary optimal matching set includes the following steps: Calculate the affinity of each residual current historical evolution trajectory in the real-time residual current sequence and historical trajectory subset; Based on affinity, a subset of historical trajectories is filtered to obtain candidate historical trajectories; Candidate historical trajectories are cloned to obtain a clone population; Perform mutation operations on the cloned population; By calculating the affinity of all individuals in the mutated clone population with the real-time residual current sequence, the mutated clone population is screened to obtain a preliminary optimal matching set.

7. The self-calibration method for residual current of an energy metering box according to claim 6, characterized in that: The process of using a genetic algorithm to perform curve fitting on the preliminary optimal matching set and the real-time evolution characteristics of the residual current to obtain the residual current prediction sequence includes the following specific steps: Construct the initial population for the genetic algorithm; Construct the fitness function for the genetic algorithm; After iterative optimization of the genetic algorithm, the optimal weight vector is obtained; Based on the optimal weight vector, the real-time residual current sequence is extrapolated and predicted to obtain the residual current prediction sequence.

8. The self-calibration method for residual current of an energy metering box according to claim 7, characterized in that: The construction of the fitness function for the genetic algorithm includes the following specific steps: ; in, For the fitness function value, This represents the number of sampling points for the real-time residual current sequence within the sliding window. This represents the real-time residual current at sampling time t. The weighted residual current of the historical trajectory corresponding to sampling time t. For the weight vector, The sampling start time, This is the end time of sampling.

9. A method for self-calibrating residual current of an energy metering box according to claim 8, characterized in that: The method of calculating the difference between the predicted residual current sequence and the real-time extended residual current sequence using the improved dynamic time warping method to obtain the parameter mismatch error includes the following specific steps: The residual current prediction sequence and the real-time residual current extension sequence are reduced in dimension to obtain the dimension-reduced residual current prediction sequence and the dimension-reduced real-time residual current extension sequence. A two-dimensional cumulative distance matrix is ​​constructed based on the dimension-reduced residual current prediction sequence and the dimension-reduced real-time residual current extension sequence. The parameter mismatch error is obtained by calculating the effective distance of the two-dimensional cumulative distance matrix.

10. A method for self-calibrating residual current of an energy metering box according to claim 9, characterized in that: The construction of the two-dimensional cumulative distance matrix includes the following specific steps: ; in, This represents the numerical value of the matrix element at coordinates (u, v). This represents the value of the predicted true residual current sequence at the u-th position after dimensionality reduction. Let u and v be the value at the v-th position of the real-time residual current extended sequence after dimensionality reduction, where u and v are the element indices of the matrix. The maximum permissible misalignment is given by _min_, which is a function that takes the minimum value.