A single-phase electric energy meter with magnetic ring compensation structure

Through the coordinated work of notched magnetic ring modeling, compensation coil current setting and real-time generation of driving voltage, the high-precision metering of single-phase electricity meter in complex environments is realized, the problem of unstable metering accuracy is solved, and the adaptive limiting and fault redundancy functions are equipped, which significantly improves the robustness and reliability of the electricity meter.

CN120334604BActive Publication Date: 2025-08-26SHENZHEN FRIENDCOM TECH DEV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510811518.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-08-26
Estimated Expiration
2045-06-18

AI Technical Summary

Technical Problem

When existing single-phase electricity meters face the increase in harmonic content of the power grid, the increase in ambient temperature span, and the interference of strong external magnetic field, the measurement accuracy is unstable and the maintenance cost is high, making it difficult to maintain high-precision measurement in complex environments such as strong harmonics, wide temperature difference, and sudden loads.

Method used

The modules such as notched magnetic ring modeling, compensation coil current setting, real-time generation of driving voltage and pulse output work together to achieve real-time closed-loop suppression of magnetic flux caused by the main conductor current. The current is detected through the notched magnetic ring modeling unit, combined with the compensation coil current setting unit and the real-time generation unit to maintain the near-zero flux state, and the pulse output unit is used for real-time measurement.

Benefits of technology

Maintain high-precision measurement in complex environments such as strong harmonics, wide temperature difference, and sudden loads. It has adaptive limiting, fault redundancy and self-diagnosis functions, and has high accuracy, high stability, low power consumption and strong robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120334604B_ABST
    Figure CN120334604B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of electric energy meters, and specifically relates to a single-phase electric energy meter with a magnetic ring compensation structure; the meter comprises: a gap magnetic ring modeling unit, a compensation coil current setting unit, a drive voltage real-time generation unit and a pulse output unit; the gap magnetic ring modeling unit is used to calculate the corresponding uncompensated magnetic flux based on the temperature-corrected magnetic permeability; the compensation coil current setting unit is used to form a compensation coil current setting value; the drive voltage real-time generation unit is used to inject a bidirectional current matching the compensation coil current setting value into the compensation coil; the pulse output unit is used to trigger the metering pulse output; the present invention has the beneficial effects of high precision, high stability, low power consumption and strong robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electric energy meters, and in particular relates to a single-phase electric energy meter with a magnetic ring compensation structure. Background Art

[0002] With the penetration of smart grids and distributed energy, single-phase electricity meters must not only measure steady-state industrial frequency current but also maintain high accuracy and long life in high-harmonic scenarios such as photovoltaic grid-connected systems, variable-frequency air conditioners, and charging stations. For a long time, mainstream solutions in the industry can be roughly divided into three categories: the first is to use a traditional current transformer with a closed magnetic ring made of silicon steel or iron-nickel alloy in combination with a shunt resistor to measure the primary conductor current through the secondary current; the second is to use an open-loop Hall effect sensor to directly convert magnetic flux into voltage, which is then sampled by the analog front end; and the third is to use a fully electronic metering chip with a high-speed sampling ADC and a shunt resistor. These solutions have achieved widespread popularity within their respective application areas, but they still expose several unavoidable technical shortcomings when faced with increasing grid harmonic content, wider ambient temperature ranges, and external strong magnetic field interference.

[0003] First, traditional current transformers rely on the high magnetic permeability and low remanence of the iron core, which offered the advantages of low cost and good linearity in pure industrial frequency, pure sinusoidal power transmission scenarios decades ago. However, in actual operation, as long as the load contains harmonics or the current amplitude fluctuates significantly, the iron core easily enters the nonlinear region or even the saturation region, resulting in metering curve distortion. To prevent saturation, manufacturers typically make the iron core cross-sectional area and air gap larger, which in turn leads to problems such as bulky size and increased copper and iron losses. Moreover, the iron core is extremely sensitive to temperature. In summer, the temperature of the transformer can easily exceed 80 degrees Celsius, while in winter, the temperature of the outdoor instrument box may drop to minus 30 degrees Celsius. The magnetic permeability fluctuates violently with temperature, making it difficult to maintain a stable ratio of the transformer's secondary current to the primary current. Regular manual calibration is required, resulting in high maintenance costs.

[0004] Secondly, the open-loop Hall sensor samples the magnetic field through the air gap and directly converts the magnetic induction intensity into voltage. In order to improve sensitivity, the air gap is often designed to be wider, resulting in a large magnetic resistance of the magnetic circuit and a large amount of main magnetic flux leaking to the outside world. It is very easily affected by adjacent wires or external permanent magnets, and the measurement results fluctuate with the fluctuation of the ambient magnetic field. Even if a magnetic shielding plate is added, it is difficult to strike a balance between volume, cost and performance. To make matters worse, the Hall element itself has an input offset voltage, which drifts nonlinearly with temperature changes, and it is difficult to cover all operating conditions with single-point temperature compensation. For example, in outdoor metering scenarios in North America, the daily temperature difference can exceed 30 degrees Celsius. The metering error of the open-loop Hall solution will appear in a step-like manner with temperature drift, affecting the settlement accuracy of the power supply company. Summary of the Invention

[0005] The primary purpose of this invention is to provide a single-phase electricity meter with a magnetic ring compensation structure. By integrating modules such as gap magnetic ring modeling, compensation coil current setting, and real-time drive voltage generation and pulse output, this meter achieves real-time closed-loop suppression of the magnetic flux caused by the main conductor current, maintaining the magnetic ring flux near zero, and significantly improving the linearity and anti-interference capability of current measurement. This invention can maintain high-precision metering in complex power grid environments such as those with strong harmonics, wide temperature differences, and sudden load fluctuations. It also features adaptive limiting, fault redundancy, and self-diagnosis, resulting in high precision, high stability, low power consumption, and strong robustness.

[0006] In order to solve the above technical problems, the present invention provides a single-phase electric energy meter with a magnetic ring compensation structure, which comprises:

[0007] A gap magnetic ring modeling unit, a compensation coil current setting unit, a drive voltage real-time generation unit and a pulse output unit; the gap magnetic ring modeling unit is used to detect the instantaneous current of the single-phase line, and regard the equivalent turns of the main conductor passing through it as the excitation ampere-turns and input it into the gapped magnetic ring; then, combined with the magnetic ring parameters of the gapped magnetic ring, the corresponding uncompensated magnetic flux is calculated based on the temperature-corrected magnetic permeability; the compensation coil current setting unit is used to determine the compensation current target for offsetting the load magnetic potential based on the uncompensated magnetic flux, in accordance with the principle of conservation of equivalent ampere-turns, and the ratio of the equivalent turns of the main conductor to the turns of the compensation coil, and superimpose the temperature-related residual magnetism offset to form a compensation coil current setting value to maintain a near-zero working state of magnetic flux; the drive voltage real-time generation unit is used to Based on the DC resistance and self-inductance of the compensation coil, the required driving voltage is calculated in real time within each sampling period. With the help of closed-loop current detection and proportional-integral regulation, a bidirectional current matching the compensation coil current set value is injected into the compensation coil, thereby maintaining the linearization of the magnetic flux of the magnetic ring under current transient and harmonic conditions. The pulse output unit is used to obtain the differential voltage signal in real time through the closed-loop Hall sensor set at the gap. After removing the zero-point bias, the residual magnetic field is inverted into an instantaneous current measurement value by combining the geometric parameters of the magnetic ring and the temperature-corrected magnetic permeability. Based on the differential voltage signal and the instantaneous current measurement value, the instantaneous active power is obtained and accumulated within a fixed integration window to obtain the accumulated energy. When the accumulated energy reaches a threshold corresponding to the meter constant, the metering pulse output is triggered.

[0008] Furthermore, the magnetic ring parameters include: effective cross-sectional area, equivalent length of closed magnetic circuit and preset gap length.

[0009] Furthermore, the specific execution process of the compensation coil current setting unit includes: multiplying the uncompensated magnetic flux by the instantaneous total magnetic resistance of the entire magnetic ring magnetic circuit to obtain the actual magnetic potential value applied to the magnetic ring by the load current at this moment; in order to offset this magnetic potential, a compensation magnetic potential of equal magnitude and opposite direction is generated as a negative ampere-turn target value; reading the number of compensation coil turns from the non-volatile memory, dividing the negative ampere-turn target value by the number of compensation coil turns, and obtaining a dynamic current component that offsets the load current; synchronously reading the latest temperature value of the core temperature sensor, and interpolating the residual magnetic density of the core at the latest temperature value according to the factory calibration curve; multiplying the residual magnetic density by the effective cross-sectional area of ​​the magnetic ring to obtain the inherent residual magnetic flux; then dividing the inherent residual magnetic flux by the total magnetic resistance to obtain the additional magnetic potential required to offset the inherent residual magnetism; dividing the additional magnetic potential by the number of compensation coil turns again to obtain a constant current component; directly adding the dynamic current component and the constant current component according to the sign to form the compensation coil current setting value.

[0010] Furthermore, the specific execution process of the real-time driving voltage generation unit includes: at the beginning of each sampling cycle, reading the nominal values ​​of the DC resistance and self-inductance of the compensation coil and their temperature drift coefficients in turn, and combining the real-time temperature provided by the core temperature sensor to dynamically correct the nominal values ​​of the DC resistance and self-inductance to form equivalent resistance and equivalent inductance consistent with the environmental conditions; then, starting the feedforward prediction process within the same sampling cycle, differentiating the compensation coil current set value from the actual current detection value at the end of the previous sampling cycle, and obtaining the current increment target to be completed within the current sampling cycle; then, based on the inertia of the current change response, a non-parametric estimation is performed to generate a preliminary voltage prediction quantity for quickly offsetting the influence of large step or spike disturbance on the linearization of the magnetic flux of the magnetic ring; the preliminary voltage prediction quantity is immediately written to the pulse width modulation control register after generation to drive the full-bridge power switch tube to turn on a leading voltage pulse with the same direction as the trend of the compensation coil current set value.

[0011] Furthermore, after completing the feedforward estimation process, the drive voltage real-time generation unit immediately enters the closed-loop current detection and proportional-integral regulation stage: the bidirectional current in the compensation coil is sampled in real time through the analog-to-digital converter, and the sampling results are sent to the digital proportional-integral regulator at fixed time intervals within the same sampling cycle; the proportional-integral regulator first uses the proportional link to linearly amplify the instantaneous deviation between the current sampling value and the compensation coil current set value, and generates a fast correction component to suppress the small current swing caused by high-frequency noise and harmonic working conditions; then the continuous deviation is accumulated through the integral link, A slow-varying steady-state component is generated to eliminate steady-state errors caused by the nonlinearity of the magnetic ring material and the dead zone of the power switch. The output of the proportional link and the output of the integral link are added according to the weights in the digital domain to obtain a closed-loop correction voltage command. The closed-loop correction voltage command is vector-synthesized with the preliminary voltage prediction generated by the feedforward estimation process to form a target drive voltage waveform covering the remainder of the entire sampling period. The target drive voltage waveform is mapped into a bipolar pulse-width modulation signal in real time and acts on the full-bridge power switch tube to achieve high-precision current injection into the compensation coil, thereby maintaining the magnetic flux linearization of the magnetic ring under current transient and harmonic conditions.

[0012] Furthermore, the real-time drive voltage generation unit also includes an adaptive limiting and fault redundancy processing process, including: when the compensation coil current is detected to have a transient overshoot exceeding the designed safety upper limit in any sampling cycle, the soft limiting logic is immediately triggered to proportionally compress the target drive voltage waveform to a safe range to prevent overheating of the compensation coil or overcurrent of the power switch tube; if it is detected that the compensation coil current cannot effectively track the compensation coil current set value for several consecutive sampling cycles, it is determined that there may be a risk of hardware failure or core saturation, and the real-time drive voltage generation unit immediately enters the fault redundancy processing process, by shutting down the full-bridge power switch tube and activating the backup half-bridge path to maintain the minimum amplitude bidirectional current; at the same time, the real-time drive voltage generation unit sends a status word to the pulse output unit through an internal interrupt, prompting the metering channel to enter the derating mode, and writes the relevant fault information to the non-volatile memory for subsequent maintenance and retrieval; when the fault is eliminated and the compensation coil current set value is consistent with the actual detected value again, the real-time drive voltage generation unit automatically exits the fault redundancy processing process and resumes normal driving of the full-bridge power switch tube.

[0013] Furthermore, the specific execution process of the pulse output unit includes: at the beginning of each sampling cycle, performing zero-point bias detection on the differential voltage signal output by the closed-loop Hall sensor; the zero-point bias detection obtains a current static offset by sampling multiple times within a reference window with the external load disconnected and averaging the samples; then, within the same sampling cycle, the pulse output unit writes the static offset into a compensation register as a reference for real-time zero-point bias elimination; when the external load is reconnected, the closed-loop Hall sensor continuously outputs a new differential voltage signal, which the compensation register immediately performs a one-to-one offset on to ensure that no DC drift is present in the subsequent signal chain; the differential voltage signal after zero-point bias elimination is fed into a dynamic digital phase-locked filter, which suppresses radio frequency interference and power frequency spurious components while maintaining phase synchronization, thereby outputting a representative residual magnetic field; the pulse output unit obtains a matching temperature-corrected permeability through a table lookup based on the magnetic ring geometric parameters stored in a non-volatile memory and the real-time temperature fed by the magnetic core temperature sensor, and inverts the residual magnetic field point by point into an instantaneous current measurement value.

[0014] Furthermore, after obtaining the instantaneous current measurement value, the pulse output unit performs vector multiplication with the external instantaneous voltage detection value synchronously sent in by the voltage sampling channel to generate instantaneous active power in the digital domain; the instantaneous active power is sent into a fixed integration window and accumulated in time sequence to form a rolling accumulated energy; to avoid mismeasurement caused by large current shocks or harmonic spikes, the pulse output unit introduces a dual threshold suppression strategy in the integration process: first, when the instantaneous active power suddenly rises beyond the upper limit of the normal operating range, the upper threshold suppression logic is activated to reduce the excess part to the upper limit boundary value; second, when the instantaneous active power drops to near zero for a short time, the lower threshold suppression logic is activated to merge the noise near zero to the zero axis; the power value after dual threshold suppression is continuously accumulated in the fixed integration window, and the pulse output unit simultaneously monitors the ratio of the accumulated energy to the pre-stored meter constant. When the ratio exceeds the preset decimal resolution threshold, a sub-pulse mark is recorded by the internal high-precision timer for full pulse synthesis.

[0015] Furthermore, when the accumulated energy reaches the integer threshold value corresponding to the meter constant, the pulse output unit triggers the metering pulse output process: first, the anti-shake delay logic is called to lock the metering channel within the minimum time resolution interval to prevent repeated triggering due to sensor jitter or electromagnetic interference; secondly, the recorded sub-pulse mark is cleared and the fixed integration window is reset to zero to prepare for the next cycle; then, the pulse output unit drives the external metering interface through the isolation optocoupler to send a standard width pulse; within the guard window after the pulse is sent, the pulse output unit continuously monitors the closed-loop Hall sensor output and the instantaneous current measurement value, and if residual magnetic field drift or If there is a significant deviation between the instantaneous current measurement value and the compensation coil current set value, the adaptive gain adjustment process is triggered, and the long-term stability of the differential voltage signal is maintained by dynamically modifying the digital phase-locked filter bandwidth and the zero-point bias compensation register threshold. If the accumulated energy is still detected to be unable to recover to the normal beat for several consecutive fixed integration windows, it is determined that the magnetic ring or sensor may have failed. The pulse output unit immediately writes the fault code to the non-volatile memory and outputs a warning pulse through the status pin to alert maintenance personnel. Once the fault is eliminated, the pulse output unit automatically exits the warning state and resumes the working sequence of accumulating energy according to the fixed integration window and triggering the metering pulse output according to the meter constant.

[0016] A single-phase electric energy meter with a magnetic ring compensation structure according to the present invention has the following beneficial effects: By creating a controllable gap in the magnetic ring and constructing a closed-loop compensation path, the present invention achieves real-time self-consistency in the entire link of main conductor current, magnetic field, magnetic flux, compensation current, drive voltage, and metering pulse, enabling the single-phase electric energy meter to maintain high accuracy under conditions of high harmonic content, large load changes, and wide ambient temperature differences. The gap magnetic ring modeling unit dynamically corrects the magnetic permeability with temperature, while the compensation coil current setting unit simultaneously projects the uncompensated magnetic flux and residual magnetic density into the ampere-turn space to generate a set value containing both fast and constant components. The real-time drive voltage generation unit superimposes feedforward prediction and a proportional-integral closed loop, coupled with adaptive limiting and fault redundancy processing, to suppress overshoot and phase shift within microseconds, preventing core saturation and power device damage. The pulse output unit uses dynamic zero-point bias cancellation, phase-locked filtering, and dual-threshold integration to completely isolate radio frequency and power frequency interference. Sub-pulse to full-pulse two-level quantization ensures that low-power segments are not missed and high-power segments are not over-counted. The entire system can track permeability drift and compensation coil resistance increases online without manual inspection. Hardware anomalies are automatically derated and fault codes are recorded. Compared to traditional transformers or open-loop Hall effect solutions, this invention offers significant advantages in intelligent power distribution terminals, including high precision, high robustness, low energy consumption, and ease of maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0018] Figure 1 A schematic structural diagram of a single-phase electric energy meter with a magnetic ring compensation structure provided by an embodiment of the present invention;

[0019] Figure 2 This is the experimental result diagram of magnetic flux comparison before and after compensation;

[0020] Figure 3 To conduct an experiment on the effect of temperature compensation on measurement accuracy;

[0021] Figure 4 This is the experimental result diagram of the compensation coil current response characteristics. DETAILED DESCRIPTION

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

[0023] Example 1, reference Figure 1 : A single-phase electric energy meter with a magnetic ring compensation structure, comprising:

[0024] A gap magnetic ring modeling unit, a compensation coil current setting unit, a drive voltage real-time generation unit and a pulse output unit; the gap magnetic ring modeling unit is used to detect the instantaneous current of the single-phase line, and regard the equivalent turns of the main conductor passing through it as the excitation ampere-turns and input it into the gapped magnetic ring; then, combined with the magnetic ring parameters of the gapped magnetic ring, the corresponding uncompensated magnetic flux is calculated based on the temperature-corrected magnetic permeability; the compensation coil current setting unit is used to determine the compensation current target for offsetting the load magnetic potential based on the uncompensated magnetic flux, in accordance with the principle of conservation of equivalent ampere-turns, and the ratio of the equivalent turns of the main conductor to the turns of the compensation coil, and superimpose the temperature-related residual magnetism offset to form a compensation coil current setting value to maintain a near-zero working state of magnetic flux; the drive voltage real-time generation unit is used to Based on the DC resistance and self-inductance of the compensation coil, the required driving voltage is calculated in real time within each sampling period. With the help of closed-loop current detection and proportional-integral regulation, a bidirectional current matching the compensation coil current set value is injected into the compensation coil, thereby maintaining the linearization of the magnetic flux of the magnetic ring under current transient and harmonic conditions. The pulse output unit is used to obtain the differential voltage signal in real time through the closed-loop Hall sensor set at the gap. After removing the zero-point bias, the residual magnetic field is inverted into an instantaneous current measurement value by combining the geometric parameters of the magnetic ring and the temperature-corrected magnetic permeability. Based on the differential voltage signal and the instantaneous current measurement value, the instantaneous active power is obtained and accumulated within a fixed integration window to obtain the accumulated energy. When the accumulated energy reaches a threshold corresponding to the meter constant, the metering pulse output is triggered.

[0025] The gapped magnetic ring modeling unit acts as a digital twin of the magnetic circuit. The gapped magnetic ring's structure artificially introduces a narrow air gap, resulting in an asymmetric magnetic circuit distribution. The leakage field at the gap is strong and fixed in direction. This allows small closed-loop Hall sensors to be placed outside the gap to directly read the leakage field without penetrating the core, significantly simplifying the structure and reducing thermal-mechanical coupling errors. However, the gap also introduces hysteresis, remanence, and temperature sensitivity, causing nonlinear drift in the leakage flux-current relationship at different operating points. To address this, the unit pre-calibrates the magnetic ring's permeability-temperature and remanence-temperature curves in multiple sections and stores them in on-chip non-volatile memory. After real-time loop current detection, the unit first converts the current into equivalent excitation ampere-turns based on the equivalent turns of the main conductor. Then, combined with the current temperature reading, the unit interpolates the permeability-temperature curve using a table lookup to map the excitation ampere-turns to uncompensated magnetic flux, fully reproducing the magnetic energy distribution of the gapped magnetic ring at that moment. The goal of this digital modeling is to provide the control system with a "second perspective" on the invisible magnetic flux within the magnetic circuit, enabling it to observe, predict, and control.

[0026] The compensation coil current setting unit "checks accounts" with the gap magnetic ring modeling unit in the sense of conservation of magnetic energy. When the uncompensated magnetic flux exceeds the near-zero flux working band, the essence is that the excitation ampere-turns corresponding to the main conductor current are not offset and accumulate in the magnetic ring. According to the principle of conservation of equivalent ampere-turns, it is only necessary to inject a compensation current of the opposite direction and appropriate amplitude into the compensation coil to generate equivalent reverse excitation ampere-turns in the closed magnetic circuit, pulling the magnetic flux back to the near-zero zone. Therefore, the unit multiplies the uncompensated magnetic flux by the ratio of the equivalent turns of the main conductor to the turns of the compensation coil to obtain the theoretical compensation current target, and then superimposes it with the temperature-related residual magnetism cancellation to form the compensation coil current setting value. This setting value is dynamically refreshed as the grid current and temperature change, and is the direct control target of the drive voltage real-time generation unit.

[0027] The real-time drive voltage generation unit closes the loop at the current control level. On the one hand, it must precisely overcome the voltage drop across the compensation coil's DC resistance and the resistance to current change caused by the coil's self-inductance. On the other hand, the phase of the compensation coil current must closely track the high-frequency harmonic components of the primary current. Otherwise, the flux compensation will experience a time delay and deviate from zero. To this end, the real-time drive voltage generation unit employs a two-layer control system. The underlying hardware utilizes a full-bridge power stage, enabling four-quadrant voltage output. The upper-layer algorithm uses a high-speed timer to drive the current sampling-prediction-correction loop. Each sampling cycle, the "prediction loop" generates an initial voltage value based on the previous cycle's error and coil parameters. The "correction loop" then refines the voltage using proportional-integral control. If a rapid zero-crossing transition or a sudden increase in high-order harmonics is detected, additional feedforward compensation is activated, preemptively increasing or decreasing the initial voltage value. This ensures that the actual compensation current waveform consistently matches the setpoint compensation coil current on a timescale of milliseconds or even faster. When the compensation current cancels the magnetic potential generated by the main conductor in real time, the magnetic flux of the magnetic ring is almost locked near zero, the range of linear change of the leakage magnetic field with the current amplitude is maximized, and the back-end metering link obtains stable input.

[0028] The pulse output unit is responsible for energy-to-pulse conversion and output interface. After the real-time drive voltage generation unit stabilizes, the closed-loop Hall effect sensor placed at the gap in the magnetic ring reads residual magnetic fields, primarily due to slight lags in the compensation control loop or quantization errors between the model and the actual device. A differential amplifier circuit offsets the zero-point bias in the analog front end before the analog-to-digital converter feeds the signal into the digital processing flow. In the digital domain, the pulse output unit uses the same temperature-corrected permeability as the gap magnetic ring modeling unit to invert the residual magnetic field into an instantaneous current measurement. Simultaneously, the differential voltage signal is introduced to construct a multiplication-accumulation logic to obtain instantaneous active power. Power flows through a fixed integration window and accumulates as accumulated energy. When the accumulated energy aligns with the threshold coupled to the meter constant, a single pulse is triggered. This pulse is connected to the metering mainboard or external data acquisition system via an optocoupler or driver isolator, effectively converting analog energy into a discrete, countable quantity. Because the accumulated energy-to-threshold comparison is performed in the digital domain, its resolution is limited only by the ADC bit depth and window clock accuracy, maintaining consistent metering performance over a wide dynamic range.

[0029] The four units described above form a progressive control closed loop centered around the common goal of operating in the near-zero magnetic flux zone: the gapped magnetic ring modeling unit provides the basis for flux estimation; the compensation coil current setting unit determines the compensation amount; the real-time drive voltage generation unit forces the compensation current to follow quickly; and the pulse output unit relies on the residual magnetic field to complete metering and reversely verify the closed-loop effect. If the near-zero magnetic flux zone is viewed as a "soft magnetic energy contour," then any main conductor current, temperature fluctuation, or material aging is considered a disturbance source. If a disturbance pushes the magnetic ring's magnetic potential away from this contour, the compensation control acts in the opposite direction within tens of microseconds, pulling the system back to the contour, thereby ensuring that the leakage flux-current mapping curve is not distorted. Compared with traditional open-loop magnetic ring electricity meters, this design significantly suppresses error sources such as magnetic saturation, residual magnetism, temperature drift, and material dispersion. It also replaces the passive design approach of simply relying on "linear region point selection" of the material by actively managing the magnetic flux.

[0030] Theoretically, the entire system adheres to the principles of conservation of magnetic energy and electromagnetic field superposition. The main conductor can be considered a concentrated excitation source, generating a magnetic field that forms magnetic flux along the closed path of the magnetic loop. The compensating coil generates a magnetic field in the opposite direction of the main conductor. When superimposed within the magnetic core, the two fields ideally cancel each other out, minimizing the magnetic potential gradient within the loop and leaving only a weak leakage field at the gap for sampling by the Hall effect sensor. Because the compensating coil and the main conductor are coupled within the same magnetic circuit, any changes in the current waveform are immediately reflected in the flux drive demand. Therefore, as long as the bandwidth of the real-time drive voltage generation unit is sufficiently high, closed-loop stability can be maintained. When the ambient temperature or the magnetic ring material undergoes slow changes, the gap magnetic ring modeling unit automatically calibrates the model parameters using the temperature-permeability curve, gradually aligning the model parameters with the actual state, thereby avoiding temperature drift and accumulated errors. Simultaneously, the pulse output unit continuously monitors the residual magnetic field during the measurement process. If the closed loop detects a persistent bias to one side, a system self-check flag triggers the compensating coil current setting unit to fine-tune the residual magnetic field compensation, restoring the system to a symmetrical distribution around zero flux, thus achieving secondary steady-state self-regulation.

[0031] From an implementation perspective, to achieve high-precision requirements, the system incorporates specialized design elements in clocking, noise suppression, and digital filtering. The real-time drive voltage generation unit and the compensation coil current setting unit share a high-speed clock to avoid sampling-output misalignment. The closed-loop Hall effect sensor utilizes a low-noise modulation-demodulation architecture to isolate the power frequency and its higher harmonics from the sensor's switching noise. Digital bandpass filtering then filters out electromagnetic interference generated by the driver stage. ADC sampling and digital computation are all performed within the system-on-a-chip core, eliminating common-mode coupling from external wiring. Distortion analysis shows that, even with a typical single-phase lighting load and third-harmonic distortion exceeding 20%, this architecture can still control the peak magnetic flux within ±1% of the zero sideband, with a pulse output measurement error of less than 1 / 1000, meeting high-level certification requirements for electric energy meters. For long-term operation, the notched magnetic ring modeling unit also performs aging compensation. Magnetic ring materials can demagnetize or experience stress relaxation over time, leading to a decrease in magnetic permeability. Under low load, the system periodically injects a small sweep wave to read the leakage field and inversely calculate the magnetic permeability, effectively recalibrating the magnetic ring parameter library online. If a parameter deviation exceeds a threshold, a maintenance flag is automatically reported, prompting maintenance personnel to conduct an inspection. This can extend the life of the energy meter and maintain the metering level without disassembling the device.

[0032] Furthermore, the magnetic ring parameters include: effective cross-sectional area, equivalent length of closed magnetic circuit and preset gap length.

[0033] Among them, the effective cross-sectional area determines the distribution density of the magnetic field energy within the cross section of the iron core, and is the primary measure for calculating the magnetic flux under unit magnetic potential; the equivalent length of the closed magnetic circuit is used to characterize the average stroke of the magnetic lines of force in the closed path inside the iron core, and its value directly affects the proportional conversion of excitation ampere-turns to magnetic flux; the preset gap length plays a dominant role in the air gap magnetic resistance and the degree of leakage magnetic field, and becomes the key geometric quantity for establishing a linear mapping between the closed-loop Hall sensor reading and the actual magnetic flux inside the magnetic ring. When the gap magnetic ring modeling unit calls the temperature-corrected magnetic permeability library to perform real-time calculation of the uncompensated magnetic flux, the system first converts the main conductor current into excitation ampere-turns according to the equivalent turns of the main conductor, and then calculates the theoretical magnetic field distribution based on the effective cross-sectional area and the equivalent length of the closed magnetic circuit. The air gap magnetic resistance is then corrected according to the preset gap length to obtain an uncompensated magnetic flux that is more in line with the actual characteristics; the compensation coil current setting unit performs ampere-turn conservation conversion on this basis, and converts the precisely mapped magnetic flux into a compensation current target according to the ratio of the equivalent turns of the main conductor to the turns of the compensation coil. The real-time driving voltage generation unit completes closed-loop control based on this target, so that the magnetic flux is re-locked in the near-zero zone, ensuring that the residual magnetic field and the instantaneous current measurement value always maintain a linear correspondence.

[0034] Uncompensated flux :

[0035] ;

[0036] in, is the vacuum permeability; For the temperature The relative magnetic permeability of the magnetic ring material at ; is the equivalent turns of the main conductor; time The instantaneous current at is the effective cross-sectional area; is the equivalent length of the closed magnetic circuit; is the preset notch length.

[0037] Furthermore, the specific execution process of the compensation coil current setting unit includes: multiplying the uncompensated magnetic flux by the instantaneous total magnetic resistance of the entire magnetic ring magnetic circuit to obtain the actual magnetic potential value applied to the magnetic ring by the load current at this moment; in order to offset this magnetic potential, a compensation magnetic potential of equal magnitude and opposite direction is generated as a negative ampere-turn target value; reading the number of compensation coil turns from the non-volatile memory, dividing the negative ampere-turn target value by the number of compensation coil turns, and obtaining a dynamic current component that offsets the load current; synchronously reading the latest temperature value of the core temperature sensor, and interpolating the residual magnetic density of the core at the latest temperature value according to the factory calibration curve; multiplying the residual magnetic density by the effective cross-sectional area of ​​the magnetic ring to obtain the inherent residual magnetic flux; then dividing the inherent residual magnetic flux by the total magnetic resistance to obtain the additional magnetic potential required to offset the inherent residual magnetism; dividing the additional magnetic potential by the number of compensation coil turns again to obtain a constant current component; directly adding the dynamic current component and the constant current component according to the sign to form the compensation coil current setting value.

[0038] The compensation coil current setting unit is able to convert the ever-changing uncompensated magnetic flux into a real-time controllable instruction, measured in current. Essentially, it treats the entire magnetic circuit as a magnetic energy transmission channel, uniformly projecting the effects of load current, remanence, and temperature on the magnetic potential into this channel, and then using the principle of conservation of ampere-turns to cancel out positive and negative magnetic potentials at the same node. Magnetic circuits and electrical circuits are topologically highly analogous. In an electrical circuit, voltage drives current distribution among conductors and resistors, while in a magnetic circuit, magnetic potential drives magnetic flux distribution among the core and air gap. Knowing the magnetic flux and reluctance at a given moment allows one to infer the magnetic potential. This is isomorphic to Ohm's law, which states that voltage equals current multiplied by resistance.

[0039] The compensation coil current setting unit first multiplies the uncompensated magnetic flux by the instantaneous total magnetic resistance to obtain the actual magnetic potential value. This effectively tells the system how much magnetic potential difference the load current has "compressed" the magnetic circuit. If this magnetic potential is allowed to remain in the magnetic circuit, the magnetic flux will accumulate along the closed path of the magnetic loop, causing the Hall sensor output to deviate from the linear region. Therefore, a compensating magnetic potential of equal magnitude and opposite direction must be immediately applied to offset it. To convert the compensating magnetic potential into a directly drivable current, the unit uses the geometric constant of the compensation coil turns as a proportional coefficient. The target negative ampere-turns value is divided by the number of compensation coil turns, converting the magnetic potential space into the current space. This process is equivalent to using the coil to feedback the magnetic flux closed loop back to the circuit, enabling the system to be controlled within the electrical domain. This generates a dynamic current component that changes synchronously with the phase and harmonics of the load current, reflecting the transient coupling between the magnetic circuit and the circuit. At the same time, the residual magnetic density left inside the core due to crystal orientation and stress locking will still cause a zero-point offset in the magnetic flux even when there is no external magnetic potential. If this is not compensated for, it will be like a DC drift in the integration loop of an operational amplifier, causing the closed-loop output to be biased for a long time. Therefore, the unit introduces the core temperature sensor reading, obtains the current residual magnetic density through the factory calibration curve, and multiplies it by the effective cross-sectional area of ​​the magnetic ring to calculate the inherent residual magnetic flux; then, using the same instantaneous total magnetic resistance, the inherent residual magnetic flux is mapped into an additional magnetic potential, and finally divided by the number of turns of the compensation coil to convert it into a constant current component.

[0040] The term "constant" here refers to changes in load. It drifts slowly with temperature but remains approximately constant during load steps. This is equivalent to adding a DC bias level to the magnetic circuit, allowing the bidirectional dynamic compensation to always swing symmetrically around the zero point of the magnetic potential, thereby improving the linear dynamic range. When the dynamic current component and the constant current component are directly added according to their signs, the compensation coil current set value is formed in a very short time and sent to the real-time drive voltage generation unit. This set value is actually an energy balance instruction that unifies magnetic energy, thermal energy, and electrical energy into ampere-turn dimensions. Because the uncompensated magnetic flux, total reluctance, and residual magnetic density are all derived from real-time measurements or interpolation, and the number of compensation coil turns is a hardware-inherent constant, this instruction is inherently traceable and verifiable. Any measurement distortion will be reflected at the Hall sensor end through residual magnetic flux feedback, and the system can then iteratively correct it accordingly, forming a closed-loop self-consistent. The entire process relies on two basic laws: conservation of magnetic energy and conservation of ampere-turns. The former ensures that the magnetic flux will not increase or decrease without reason, and the latter ensures that the net magnetic potential inside the magnetic ring approaches zero after the magnetic potential offset, so that the magnetic ring always operates in the low magnetic flux density area, the Hall differential voltage maintains high linearity, and the pulse output unit obtains instantaneous current measurement values ​​with a high signal-to-noise ratio.

[0041] Compensation coil current setting value for:

[0042] ;

[0043] in, To compensate for the number of coil turns; The remanent magnetic density of the core is interpolated at the latest temperature value.

[0044] Furthermore, the specific execution process of the real-time driving voltage generation unit includes: at the beginning of each sampling cycle, reading the nominal values ​​of the DC resistance and self-inductance of the compensation coil and their temperature drift coefficients in turn, and combining the real-time temperature provided by the core temperature sensor to dynamically correct the nominal values ​​of the DC resistance and self-inductance to form equivalent resistance and equivalent inductance consistent with the environmental conditions; then, starting the feedforward prediction process within the same sampling cycle, differentiating the compensation coil current set value from the actual current detection value at the end of the previous sampling cycle, and obtaining the current increment target to be completed within the current sampling cycle; then, based on the inertia of the current change response, a non-parametric estimation is performed to generate a preliminary voltage prediction quantity for quickly offsetting the influence of large step or spike disturbance on the linearization of the magnetic flux of the magnetic ring; the preliminary voltage prediction quantity is immediately written to the pulse width modulation control register after generation to drive the full-bridge power switch tube to turn on a leading voltage pulse with the same direction as the trend of the compensation coil current set value.

[0045] The real-time drive voltage generation unit is responsible for injecting energy into the magnetic ring compensation closed loop. Its core task is to promptly and accurately convert the compensation coil current setpoint into drive pulses for the full-bridge power stage, ensuring that the compensation coil current adheres to the set curve without significant phase shift or overshoot within each sampling cycle. To achieve this, the unit sequentially reads the nominal values ​​of the compensation coil's DC resistance and self-inductance, along with their temperature drift coefficients, at the beginning of each sampling cycle. Combined with the instantaneous temperature provided by the core temperature sensor, it dynamically corrects the nominal values ​​of the DC resistance and self-inductance to produce equivalent resistance and inductance consistent with the ambient conditions. This allows the impact of temperature on resistance thermal drift and inductor hysteresis to be mapped online into the electrical model, making subsequent voltage predictions more realistic. Subsequently, within the same sampling cycle, a feedforward estimation process is initiated, subtracting the compensation coil current setpoint from the actual current measured at the end of the previous sampling cycle to determine the target current increment required within the current sampling cycle. This differential result not only quantifies the closed-loop error but also predicts the dynamic inductor current demand at the next instant. Then, a parameter-free estimation is performed based on the inertia of the equivalent inductance's response to current changes to generate a preliminary voltage prediction, which is used to quickly offset the impact of large step or spike disturbances on the magnetic flux linearization of the magnetic ring. This process is equivalent to injecting a pre-compensation amount outside the traditional proportional-integral loop in advance, pulling the system's equivalent phase margin forward and shortening the current following time of the compensation coil.

[0046] After being generated, the preliminary voltage prediction is immediately written into the pulse-width modulation control register to drive the full-bridge power switches to initiate a pilot voltage pulse in the same direction as the compensation coil current setpoint. Because the pulse-width modulation control register directly determines the power switch's on-duty cycle, the pilot voltage pulse takes effect within sub-microseconds, ensuring that the compensation coil's magnetic potential energy rises and falls synchronously with that of the main conductor. After the pilot pulse acts on the compensation coil, the system continues current sampling within the current sampling cycle and enters the proportional-integral correction phase, superimposing the preliminary voltage prediction with the real-time measured current deviation for correction. This dual-layer strategy of "feedforward pilot plus feedback fine-tuning" enables the drive current to both quickly respond to sudden disturbances and precisely eliminate static errors in the steady-state region. The full-bridge power switches utilize a synchronous rectification layout, enabling instantaneous switching of conduction direction during current commutation, reducing energy losses caused by voltage jumps in the dead zone. A high-resolution timer also compresses the pulse-width modulation granularity to the microsecond level, further increasing the drive link bandwidth. The equivalent resistance and equivalent inductance are recalculated for each sampling cycle. Therefore, even if the core temperature fluctuates significantly within tens of milliseconds, or the compensation coil experiences a temperature rise due to voltage stress, the controller can immediately feed these changes into the preliminary voltage prediction, avoiding model-to-physical mismatch. As the sampling frequency increases and the ADC bit depth increases, the contribution of the preliminary voltage prediction to system speed gradually increases, while the proportional-integral correction plays a greater role in suppressing noise and correcting quantization errors. This functional layering allows the real-time drive voltage generation unit to maintain low overshoot and zero static error in high-dynamic scenarios, providing a strong voltage injection guarantee for the magnetic flux closed loop. Ultimately, this allows single-phase electricity meters to maintain the linearity and stability of the metering link even in distribution environments with high harmonic content and frequent current mutations.

[0047] Preliminary voltage prediction for:

[0048] ;

[0049] in, To compensate for the DC resistance of the coil; To compensate for the self-inductance of the coil.

[0050] Furthermore, after completing the feedforward estimation process, the drive voltage real-time generation unit immediately enters the closed-loop current detection and proportional-integral regulation stage: the bidirectional current in the compensation coil is sampled in real time through the analog-to-digital converter, and the sampling results are sent to the digital proportional-integral regulator at fixed time intervals within the same sampling cycle; the proportional-integral regulator first uses the proportional link to linearly amplify the instantaneous deviation between the current sampling value and the compensation coil current set value, and generates a fast correction component to suppress the small current swing caused by high-frequency noise and harmonic working conditions; then the continuous deviation is accumulated through the integral link, A slow-varying steady-state component is generated to eliminate steady-state errors caused by the nonlinearity of the magnetic ring material and the dead zone of the power switch. The output of the proportional link and the output of the integral link are added according to the weights in the digital domain to obtain a closed-loop correction voltage command. The closed-loop correction voltage command is vector-synthesized with the preliminary voltage prediction generated by the feedforward estimation process to form a target drive voltage waveform covering the remainder of the entire sampling period. The target drive voltage waveform is mapped into a bipolar pulse-width modulation signal in real time and acts on the full-bridge power switch tube to achieve high-precision current injection into the compensation coil, thereby maintaining the magnetic flux linearization of the magnetic ring under current transient and harmonic conditions.

[0051] In this single-phase energy meter with a magnetic ring compensation structure, the real-time drive voltage generation unit immediately switches to the closed-loop current detection and proportional-integral regulation stage after completing the feedforward estimation process. Its physical essence is to treat the compensation coil as a first-order controlled object, map the ampere-turn error into voltage space, and then use a discrete-time control strategy to converge this error sequentially within a sampling cycle. The system first uses an analog-to-digital converter to sample the bidirectional current in the compensation coil in real time at fixed time intervals. The sampling frequency is much higher than the highest harmonic frequency of the main conductor current, ensuring that fast mutation components are captured. Each set of sampling results is fed into the digital proportional-integral regulator in a rolling manner within the same sampling cycle, forming a discrete error sequence. The proportional link linearly amplifies the instantaneous deviation between the current sampling value and the compensation coil current set value. The amplification factor is comprehensively adjusted according to the system phase margin and gain margin during controller initialization, so that the proportional output can generate a fast correction component within the sub-millisecond level, quickly suppressing the small current swings caused by spikes or high-frequency noise to a negligible level; at the same time, the integral link continuously accumulates continuous deviations, and the integral time constant is set according to the slow drift characteristics of the compensation coil current and the nonlinear characteristics of the magnetic ring material, so that the integral output compensates for the long-term errors caused by the dead zone of the power switch and the hysteresis of the magnetic core in the form of a slow-varying steady-state component.

[0052] The outputs of the proportional and integral components are normalized to unity in the digital domain according to preset weights and then added together to produce a closed-loop correction voltage command. This command is then synthesized in vector form with the preliminary voltage prediction generated by the feedforward estimation process. The two components effectively form a component superposition in the same voltage space: the feedforward component dominates the large-amplitude response, while the proportional-integral component refines the residual error. The resulting vector synthesis is interpreted as a target drive voltage waveform covering the remainder of the sampling period and mapped in real time to a bipolar pulse-width modulated signal. Because the full-bridge power switches utilize a synchronous drive structure, the duty cycle and polarity of the pulse-width modulated signal can be switched in microseconds, enabling distortion-free reconstruction of the target drive voltage waveform at the hardware level. After the compensation coil receives this voltage, the current ramps or decays along a set trajectory. Its magnetic potential instantly superimposes with that of the primary conductor within the magnetic ring, leaking through the gap to form a residual magnetic field signal. This signal is captured by a closed-loop Hall effect sensor and fed back to the proportional-integral controller via an analog-to-digital converter. This cycle repeats, completing a four-quantity closed loop: voltage, current, magnetic potential, and magnetic flux. Since the proportional link suppresses high-frequency deviations in real time, the linear region of magnetic flux will not be squeezed out due to harmonic disturbances; and the integral link continuously corrects the static error caused by the nonlinearity of the magnetic core and the dead zone of the power tube, so that the residual magnetic flux of the magnetic ring is maintained near zero for a long time. The vector synthesis strategy avoids the phase loss caused by simple cascade compensation, unifies the rapidity of feedforward and the accuracy of feedback into the same control sequence, and ensures that the set value of the compensation coil current can be implemented with high precision before the end of each sampling cycle. The final effect is that under current transient and harmonic conditions, the magnetic flux of the magnetic ring is always in the linear region, and the leakage magnetic field remains in strict proportional relationship with the instantaneous current of the main conductor, thereby providing a high signal-to-noise ratio measurement basis for the pulse output unit, so that the single-phase electricity meter can stably output the pulse signal required by the metering level even in the face of heavy harmonics, wide temperature differences and rapid load fluctuations.

[0053] Furthermore, the real-time drive voltage generation unit also includes an adaptive limiting and fault redundancy processing process, including: when the compensation coil current is detected to have a transient overshoot exceeding the designed safety upper limit in any sampling cycle, the soft limiting logic is immediately triggered to proportionally compress the target drive voltage waveform to a safe range to prevent overheating of the compensation coil or overcurrent of the power switch tube; if it is detected that the compensation coil current cannot effectively track the compensation coil current set value for several consecutive sampling cycles, it is determined that there may be a risk of hardware failure or core saturation, and the real-time drive voltage generation unit immediately enters the fault redundancy processing process, by shutting down the full-bridge power switch tube and activating the backup half-bridge path to maintain the minimum amplitude bidirectional current; at the same time, the real-time drive voltage generation unit sends a status word to the pulse output unit through an internal interrupt, prompting the metering channel to enter the derating mode, and writes the relevant fault information to the non-volatile memory for subsequent maintenance and retrieval; when the fault is eliminated and the compensation coil current set value is consistent with the actual detected value again, the real-time drive voltage generation unit automatically exits the fault redundancy processing process and resumes normal driving of the full-bridge power switch tube.

[0054] The adaptive limiting and fault redundancy process is embedded in the main control loop of the real-time drive voltage generation unit. Its core concept is to unify the seemingly conflicting goals of current safety and flux linearization within a closed-loop energy management framework. This allows the system to maintain high-bandwidth compensation under normal operating conditions while also self-derating in extreme situations and providing sufficient redundancy to avoid hardware failure or core saturation. Specifically, when the compensation coil current detection value returned by the analog-to-digital converter within any sampling cycle experiences a transient overshoot exceeding the designed safety upper limit, the monitoring logic of the real-time drive voltage generation unit first triggers the soft limiting logic. Using a table lookup, it calculates a proportional compression coefficient and proportionally compresses the entire target drive voltage waveform, already synthesized in the digital domain, to simultaneously reduce the pulse width modulation duty cycle to a safe range. This limiting method does not simply truncate the voltage waveform, but rather maintains proportional consistency across all samples of the voltage waveform. This ensures that the phase and harmonic distribution of the compensation coil current waveform are not distorted. Only the amplitude is reduced, avoiding secondary distortion caused by abrupt clipping and magnetic potential redistribution.

[0055] If the detected overshoot is an isolated event, the soft limiting logic automatically releases the current as it returns to a safe range. If the compensation coil current fails to effectively track the set value for several consecutive sampling cycles, the real-time drive voltage generation unit determines, based on the established robustness criteria, that hardware failure or core saturation risk may exist and immediately switches to the fault redundancy process. The fault redundancy process begins by shutting down the full-bridge power switches to block the main drive path, preventing further high energy injection into the compensation coil. The backup half-bridge path is then activated, alternating the adjacent arms of the half-bridge at a low duty cycle to provide a minimum-amplitude bidirectional current path. This allows the compensation coil to maintain basic magnetic potential balance and prevents significant disruption of the magnetic flux linearization. At the same time, the real-time drive voltage generation unit sends a status word to the pulse output unit through an internal interrupt, prompting the metering channel to enter derating mode. The pulse output unit adjusts the integration window and threshold accordingly to ensure that the metering link remains traceable after the dynamic accuracy is reduced; all relevant fault information (overshoot peak value, duration period, temperature snapshot, soft limit coefficient, fault type judgment result) is written to the non-volatile memory, providing subsequent maintenance personnel with a complete event diagnosis basis.

[0056] After the system enters the fault redundancy process, it checks the closed-loop error between the compensation coil current setpoint and the actual measured value at each sampling cycle. When the error converges to the allowed bandwidth and the core temperature falls below the recoverable threshold, the real-time drive voltage generation unit automatically exits the fault redundancy process, resuming normal operation of the full-bridge power switches and sending a recovery status word to the pulse output unit to terminate the derating mode. From a control theory perspective, the entire adaptive limiting and fault redundancy process is equivalent to adding an event-driven safety monitoring closed loop to the existing feedforward plus proportional-integral closed loop. It triggers soft limiting based on hard limit detection and redundancy derating based on persistent error, establishing a safety constraint boundary within the energy and temperature space. This boundary allows the system to leverage its high-frequency compensation advantages under normal conditions while protecting the hardware and core through derating in extreme situations. This maintains the availability and metering reliability of single-phase electricity meters on a macroscopic timescale, achieving a dynamic compromise of "performance first, safety as a safety guarantee." This provides a robust safety management paradigm for future applications of this magnetic-electric closed-loop control structure in multiphase metering, bidirectional power measurement, and even distributed energy storage scenarios.

[0057] Furthermore, the specific execution process of the pulse output unit includes: at the beginning of each sampling cycle, performing zero-point bias detection on the differential voltage signal output by the closed-loop Hall sensor; the zero-point bias detection obtains a current static offset by sampling multiple times within a reference window with the external load disconnected and averaging the samples; then, within the same sampling cycle, the pulse output unit writes the static offset into a compensation register as a reference for real-time zero-point bias elimination; when the external load is reconnected, the closed-loop Hall sensor continuously outputs a new differential voltage signal, which the compensation register immediately performs a one-to-one offset on to ensure that no DC drift is present in the subsequent signal chain; the differential voltage signal after zero-point bias elimination is fed into a dynamic digital phase-locked filter, which suppresses radio frequency interference and power frequency spurious components while maintaining phase synchronization, thereby outputting a representative residual magnetic field; the pulse output unit obtains a matching temperature-corrected permeability through a table lookup based on the magnetic ring geometric parameters stored in a non-volatile memory and the real-time temperature fed by the magnetic core temperature sensor, and inverts the residual magnetic field point by point into an instantaneous current measurement value.

[0058] The pulse output unit, using a differential voltage signal as its sole input, fully maps the residual magnetic field within the magnetic ring into an instantaneous current measurement. Its core components include zero-bias detection, real-time offsetting in the compensation register, synchronous extraction using a dynamic digital phase-locked filter, and temperature-corrected permeability lookup table inversion. At the beginning of each sampling cycle, the control logic switches the meter to a reference window where the external load is disconnected. Within this window, the closed-loop Hall sensor should theoretically output a pure zero differential voltage signal. However, due to minor asymmetries introduced by device mismatch, amplifier chain bias, and residual stress, a static offset may occur. The pulse output unit uses a high-speed timer to drive multiple sampling cycles, capturing this static offset within hundreds of microseconds using a shift-accumulate averaging method. The result is then immediately written to the compensation register, forming the "zero-bias detection" benchmark for the current cycle. When the external load is reconnected, the closed-loop Hall sensor begins outputting a new differential voltage signal containing the true magnetic field information. The compensation register performs a one-to-one offset within a single clock cycle, ensuring that DC drift is completely eliminated at the entry point of the subsequent signal chain and that slow-varying errors related to temperature and device aging are dynamically suppressed.

[0059] The differential voltage signal, after zero-point bias removal, is fed into a dynamic digital phase-locked filter (DPLF) within the same sampling cycle. This filter locks to the differential voltage signal in real time using an internal reference phase. Through synchronous demodulation, it preserves the components co-frequency and co-phase with the primary conductor current while providing broadband suppression of radio frequency interference, power-frequency spurious signals, and higher-order noise. The DPLF outputs a precisely phase-aligned and amplitude-smoothed residual magnetic field representative. This suppresses subtle nonlinearities, drive lags, and electromagnetic interference within the magnetic ring compensation loop to the level of quantization noise. The pulse output unit then retrieves the magnetic ring geometric parameters stored in non-volatile memory and, combined with the real-time temperature input from the core temperature sensor, finds the nearest node in the temperature-permeability curve table and performs linear interpolation to obtain a temperature-corrected permeability that matches the current operating conditions. This temperature-corrected permeability, combined with the magnetic ring geometric parameters, forms a scaling factor that is point-by-point multiplied by the residual magnetic field representative to accurately invert the magnetic field magnitude into the instantaneous current measurement. Because the temperature-corrected permeability is re-interpolated based on the latest temperature during each sampling cycle, the inversion process can track the temperature drift of the core permeability in real time. The ring's geometric parameters, as fixed constants, do not change after factory calibration, ensuring absolute consistency in the proportional coefficient. The instantaneous current measurement then enters the power calculation and energy integration module, continuing to participate in accumulated energy determination and metering pulse triggering. However, at this stage, it is completely free from the influence of zero-point drift, radio frequency interference, and temperature drift, achieving high-fidelity conversion from analog magnetic field to digital current, laying a solid foundation for single-phase electricity meters to maintain accuracy in complex electromagnetic environments.

[0060] Instantaneous current measurement value for:

[0061] ;

[0062] in, is a differential voltage signal; is zero magnetic bias voltage; is the Hall sensitivity.

[0063] Furthermore, after obtaining the instantaneous current measurement value, the pulse output unit performs vector multiplication with the external instantaneous voltage detection value synchronously sent in by the voltage sampling channel to generate instantaneous active power in the digital domain; the instantaneous active power is sent into a fixed integration window and accumulated in time sequence to form a rolling accumulated energy; to avoid mismeasurement caused by large current shocks or harmonic spikes, the pulse output unit introduces a dual threshold suppression strategy in the integration process: first, when the instantaneous active power suddenly rises beyond the upper limit of the normal operating range, the upper threshold suppression logic is activated to reduce the excess part to the upper limit boundary value; second, when the instantaneous active power drops to near zero for a short time, the lower threshold suppression logic is activated to merge the noise near zero to the zero axis; the power value after dual threshold suppression is continuously accumulated in the fixed integration window, and the pulse output unit simultaneously monitors the ratio of the accumulated energy to the pre-stored meter constant. When the ratio exceeds the preset decimal resolution threshold, a sub-pulse mark is recorded by the internal high-precision timer for full pulse synthesis.

[0064] After completing the magnetic field-current inversion, the pulse output unit immediately calls the external instantaneous voltage detection value sent by the voltage sampling channel and performs a vector multiplication with the instantaneous current measurement value just obtained, with strict time base alignment, to generate instantaneous active power in real time in the digital domain. The vector multiplication here is not a simple scalar multiplication. At the algorithm level, the system uses a unified clock to locate the voltage sampling sequence and the current sampling sequence to the same sampling point index, ensuring that the two sequences are highly synchronized in the phase and frequency dimensions, thereby avoiding power phase errors caused by sampling jitter. The generated instantaneous active power is then written into a fixed integration window. The window length usually covers several full power frequency cycles and is implemented in a ring buffer structure, so that the power data is rolled over on the time axis: the latest power value enters the head of the window, and the oldest power value is pushed out of the tail of the window, thereby keeping the total number of sampling points in the integration window constant.

[0065] A dedicated accumulation register within the window adds the current power value to the existing accumulated energy at each clock edge, gradually forming a rolling accumulated energy. Since the on-site power grid is prone to high current surges or harmonic spikes, if left unchecked, the integration window will inflate the total energy due to brief, high-power samples, potentially triggering mismeasurement. Furthermore, Hall effect sensor and ADC noise can cause power to briefly drop to near zero. Direct accumulation would create small "notches" in the energy curve, also affecting accuracy. To address this, the pulse output unit incorporates a dual-threshold suppression strategy within the power accumulation process. First, upper threshold suppression logic: When the instantaneous active power suddenly rises beyond the upper limit of the normal operating range—that is, the power detection value exceeds a predefined upper threshold—the controller immediately truncates and compresses the excess value to the upper limit. This ensures that only the upper limit value is recorded in the accumulation register, preventing excessive energy from being written to the window all at once. This logic does not modify the sampling sequence, but rather flexibly reduces the power amplitude to preserve the phase information of the power waveform and prevent subsequent power quality diagnosis. The second is the lower threshold suppression logic: When the instantaneous active power briefly drops to near zero, the system determines that the amplitude is lower than the lower threshold and the duration is less than one complete power frequency cycle, indicating that this is more quantization noise or residual fluctuations of the magnetic ring compensation. Therefore, it is merged to the zero axis, so that the accumulation register does not record such noise samples with no actual energy contribution.

[0066] The dual-threshold suppression strategy is applied point by point within the integration window. The upper and lower thresholds are experimentally calibrated and can be adjusted with the meter's operating level to achieve the optimal error-dynamic range balance across different load scenarios. Power samples corrected by dual-threshold suppression are continuously accumulated within the fixed integration window, forming a smooth and robust rolling cumulative energy curve. The pulse output unit simultaneously monitors the ratio of this accumulated energy to the meter constant stored in non-volatile memory. The meter constant defines the energy benchmark corresponding to each complete metering pulse output. To achieve a balance between high resolution and real-time performance, the system sets a preset decimal resolution threshold. When the ratio of the accumulated energy to the meter constant first exceeds this decimal resolution threshold, the pulse output unit immediately records a subpulse marker using an internal high-precision timer. The subpulse marker represents a fraction of the metering pulse's energy, and its timestamp corresponds precisely to the moment the accumulated energy crosses the threshold. Multiple subpulse markers are automatically combined into a complete metering pulse based on integer multiples of the meter constant, driving the output channel update. This design maintains the linearity of energy-to-pulse conversion while utilizing a high-precision timer to quantify small energy increments in a timely manner, preventing pulse "dropouts" during low-power periods. Through vector power calculation, rolling integration, dual-threshold suppression, and sub-pulse-to-full-pulse synthesis, the pulse output unit achieves high-fidelity mapping of energy to metering pulses without interference from inrush currents and noise. This ensures that single-phase energy meters maintain metering-grade accuracy even in environments with complex harmonics and large current dynamic spans.

[0067] Furthermore, when the accumulated energy reaches the integer threshold value corresponding to the meter constant, the pulse output unit triggers the metering pulse output process: first, the anti-shake delay logic is called to lock the metering channel within the minimum time resolution interval to prevent repeated triggering due to sensor jitter or electromagnetic interference; secondly, the recorded sub-pulse mark is cleared and the fixed integration window is reset to zero to prepare for the next cycle; then, the pulse output unit drives the external metering interface through the isolation optocoupler to send a standard width pulse; within the guard window after the pulse is sent, the pulse output unit continuously monitors the closed-loop Hall sensor output and the instantaneous current measurement value, and if residual magnetic field drift or If there is a significant deviation between the instantaneous current measurement value and the compensation coil current set value, the adaptive gain adjustment process is triggered, and the long-term stability of the differential voltage signal is maintained by dynamically modifying the digital phase-locked filter bandwidth and the zero-point bias compensation register threshold. If the accumulated energy is still detected to be unable to recover to the normal beat for several consecutive fixed integration windows, it is determined that the magnetic ring or sensor may have failed. The pulse output unit immediately writes the fault code to the non-volatile memory and outputs a warning pulse through the status pin to alert maintenance personnel. Once the fault is eliminated, the pulse output unit automatically exits the warning state and resumes the working sequence of accumulating energy according to the fixed integration window and triggering the metering pulse output according to the meter constant.

[0068] When the rolling accumulated energy reaches the integer threshold corresponding to the meter constant, the pulse output unit immediately enters the metering pulse output process, with the goal of maintaining the integrity and anti-interference capability of the measurement link at the critical point of energy conversion. First, the anti-jitter delay logic is invoked to lock the metering channel within the minimum time resolution interval, prohibiting any repeated triggering caused by sensor instantaneous jitter, electromagnetic radiation coupling, or digital jitter, ensuring that one energy threshold corresponds to only one pulse event. During the lock period, the internal high-precision timer suspends sub-pulse statistics to ensure a stable metering baseline. The recorded sub-pulse markers are then cleared, and the fixed integration window and accumulation registers are reset to zero, completely clearing the energy data of the previous cycle and providing a clean starting point for the next cycle. This prevents residual energy from being accumulated again during the window cycle, which can amplify errors.

[0069] Next, the pulse output unit drives the external metering interface via an isolated optocoupler to send a standard-width pulse. This pulse uses a dual-edge recognition format, completely isolating it from the downstream metering system or remote communication module at the physical layer. This not only blocks common-mode interference feedback but also prevents loop currents caused by different ground potentials. After the pulse is transmitted, the system enters a short guard window, during which it continuously monitors the closed-loop Hall sensor output and the instantaneous current measurement. If residual magnetic field drift is detected or the instantaneous current measurement deviates from the compensation coil current setting by exceeding the gain tolerance, the adaptive gain adjustment process is triggered: the digital phase-locked filter bandwidth is dynamically narrowed or widened, and the zero-bias compensation register threshold is fine-tuned to ensure that the differential voltage signal remains stable and centered during subsequent integration cycles.

[0070] If the accumulated energy is still unable to return to a normal rhythm after several consecutive fixed integration windows, the system further determines that there is a risk of failure of the magnetic ring or Hall sensor. At this time, the pulse output unit immediately writes the fault code and diagnostic data to the non-volatile memory, and outputs a set of warning pulses with a specific duty cycle through an independent status pin to alert maintenance personnel. At the same time, the derating flag is broadcast to the real-time drive voltage generation unit and the compensation coil current setting unit, causing the entire machine to enter a degraded metering strategy to prevent further accumulation of erroneous energy. If the subsequent self-test confirms that the residual magnetic field and instantaneous current measurement values ​​have become consistent with the compensation coil current setting value, it means that the fault has been eliminated. The pulse output unit automatically exits the warning state, unlocks the metering channel, and resumes the normal working sequence of rolling accumulated energy according to the fixed integration window and triggering metering pulse output according to the meter constant, achieving seamless switching from abnormal to normal. The continuity of the pulse count is fully preserved through the internal timestamp linked table, providing an accurate basis for background data auditing.

[0071] The following example demonstrates the complete calculation process of a single-phase electric energy meter with a magnetic ring compensation structure for real-time compensation and measurement of a 10A apparent load current on a rated 230V, 50Hz line. The equivalent length of the closed magnetic circuit is 0.12m, and the preset gap length is 0.8mm. The relative permeability of the core is 3000 at 25°C. The compensation coil has 200 turns, a DC resistance of 1.2Ω, and a self-inductance of 4mH. The core temperature sensor currently reads 25°C. Vacuum permeability . Core segment reluctance = ; Air gap reluctance ; Instant total magnetic resistance ≈ 2.67× Assuming the main conductor is a single turn, the instantaneous current passing through =8A. Uncompensated magnetic potential =1×8=8A·turn, uncompensated flux Dynamic compensation current component I_dyn=– / 200=–0.04A.

[0072] The factory calibration curve gives the residual magnetic density B_r=0.01T at 25°C. The additional magnetic potential required to offset this magnetic flux The constant compensation current component I_r=–F_r / 200≈–0.033A.

[0073] The compensation coil current setting value I_set=I_dyn+I_r≈–0.073A.

[0074] The sampling period Δt = 100µs. At the end of the previous period, the actual compensation current I_prev = –0.050A is detected. The current increment target ΔI = I_set – I_prev ≈ –0.023A. The feedforward voltage prediction V_ff = R × I_set + L × (ΔI / Δt) = 1.2 × (–0.073) + 0.004 × (–0.023 / 1× )≈–1.02 V. This value is immediately written to the PWM register, triggering a pilot pulse in the same direction as I_set for the full-bridge conduction direction.

[0075] During this cycle, the ADC continues to sample the compensation current and compares it with –0.073A. Assuming an instantaneous deviation of –3mA, this is amplified by the proportional circuit to form a –60mV correction component. The integral circuit accumulates small residuals from previous cycles and outputs –20mV. The closed-loop correction voltage command V_pi = –0.060 – 0.020 = –0.080V. The resulting target drive voltage V_target = V_ff + V_pi ≈ –1.10V is converted to a bipolar PWM output in real time to keep the coil current consistent with the set value.

[0076] The parallel voltage channel now detects the external instantaneous voltage u=230V. Instantaneous active power p=u× =230×8=1840W. The integration window width Δt is also 100µs; the power sample increment ε=p×Δt=0.184J. Assume that the meter constant is , corresponding to each pulse energy E_p= The pulse output unit accumulates ε into a rolling window; when the accumulated energy Σε reaches 1.125 kJ for the first time, a sub-pulse marker is triggered. When the sub-pulse counts are combined into a full pulse, the next step is entered.

[0077] After Σε reaches exactly 1125J, the anti-shake logic locks for 5ms; the sub-pulse count and integration window are then cleared. The isolated optocoupler outputs a standard metering pulse with a 20ms width and a 2mA drive. During the 10ms guard period, if the residual magnetic field drifts beyond ±2mV, the digital phase-locked filter bandwidth is immediately tightened to 0.7 of its original setting, and the zero-point bias compensation threshold is adjusted to 50µV. If the normal beat cannot be restored after 1000 consecutive integration windows, fault code 0x0B is written and a 5Hz alarm is output on the status pin. Otherwise, the guard period is automatically exited and the next rolling integration cycle continues.

[0078] Through the real-time calculation of the above series of specific numerical values, this example demonstrates the collaborative working mode of magnetic ring compensation, drive voltage prediction, proportional-integral correction, power dual-threshold suppression, sub-pulse accumulation, and fault redundancy management in an actual single-phase electricity meter, verifying the feasibility of the scheme of the present invention to achieve high-precision closed-loop control while taking into account both active power metering and hardware safety.

[0079] Figure 2 The experimental verification results of the magnetic flux control effect of the magnetic ring compensation structure of the present invention during operation are shown. In the figure, the horizontal axis represents the time axis, and the vertical axis represents the magnetic flux value. The dotted curve represents the change of the uncompensated magnetic flux. It can be observed that the curve shows obvious fluctuation characteristics, and the magnetic flux value swings greatly within the positive and negative ranges, indicating that in the uncompensated state, the magnetic potential generated by the load current will cause the magnetic flux inside the magnetic ring to have significant nonlinear changes. The solid line curve represents the compensated magnetic flux after the compensation coil current setting unit and the drive voltage real-time generation unit act. The curve basically fluctuates within a small range near the zero point, which fully proves that the reverse magnetic potential generated by the compensation coil can effectively offset the influence of the load current, so that the magnetic ring always works in a linear state close to zero flux. This experimental result verifies the effectiveness of the magnetic flux linearization control of the magnetic ring in the technical solution of the present invention.

[0080] Figure 3Comparative experimental data demonstrating the impact of temperature compensation on the measurement accuracy of electric energy meters is presented. The horizontal axis represents the ambient temperature in degrees Celsius. The test temperature range is from 20°C to 80°C, covering the typical temperature range of an electric energy meter's actual operating environment. The vertical axis represents the magnitude of the measurement error. The dashed curve shows the variation of the measurement error with temperature without temperature compensation. As the temperature increases, the measurement error exhibits a nonlinear pattern, first increasing and then decreasing. This is due to the significant temperature variations in the magnetic permeability and remanent magnetic properties of the core material. The solid curve shows the variation in measurement error with temperature compensation. This curve remains within a very small range near zero throughout the entire temperature range, with fluctuations far less than in the uncompensated state. The experimental results demonstrate that by using a temperature sensor integrated in the compensation coil current setting unit to monitor the core temperature in real time and dynamically correcting the magnetic permeability and remanent magnetic density according to the factory calibration curve, the measurement accuracy and stability of the electric energy meter can be significantly improved over a wide temperature range.

[0081] Figure 4 This figure reflects the dynamic response characteristics of the real-time drive voltage generation unit to the compensation coil current control. The horizontal axis in the figure represents the time series, and the vertical axis represents the current value in the compensation coil. The dashed curve is the compensation coil current set value calculated by the compensation coil current setting unit based on the uncompensated magnetic flux. This curve exhibits a step change characteristic, reflecting the system's rapid adjustment to the compensation current demand when the load current changes. The solid line curve represents the actual compensation coil current waveform output by the real-time drive voltage generation unit. It can be observed that the actual current quickly tracks the changing trend of the set value, with a brief transition adjustment process during the step response, followed by stable convergence to the set target value. This response characteristic demonstrates the effectiveness of the control strategy combining the feedforward prediction process and closed-loop proportional-integral regulation in the real-time drive voltage generation unit. The feedforward link can quickly respond to large current changes, while the closed-loop regulation eliminates steady-state errors, ensuring that the compensation coil current accurately matches the set value, thereby maintaining the linear operating state of the magnetic flux of the magnetic ring.

[0082] Although specific embodiments of the present invention have been described above, those skilled in the art will appreciate that these specific embodiments are merely illustrative, and that those skilled in the art may omit, substitute, and modify the details of the methods and systems described above without departing from the principles and spirit of the present invention. For example, combining the above method steps to perform substantially the same functions in substantially the same manner to achieve substantially the same results falls within the scope of the present invention. Accordingly, the scope of the present invention is limited solely by the appended claims.

Claims

1. A single-phase electric energy meter with a magnetic ring compensation structure, characterized in that: It includes: Gap magnetic ring modeling unit, compensation coil current setting unit, drive voltage real-time generation unit and pulse output unit; The gap magnetic ring modeling unit is used to detect the instantaneous current of the single-phase line and regard the equivalent turns of the main conductor passing through it as excitation ampere-turns and input it into the gap magnetic ring; Then, the corresponding uncompensated magnetic flux is calculated based on the temperature-corrected magnetic permeability in combination with the magnetic ring parameters of the gapped magnetic ring; the compensation coil current setting unit is used to determine the compensation current target for offsetting the load magnetic potential based on the uncompensated magnetic flux and the principle of conservation of equivalent ampere-turns, and to combine the ratio of the equivalent turns of the main conductor to the turns of the compensation coil, and to superimpose the temperature-related residual magnetism offset to form a compensation coil current setting value to maintain a near-zero working state of the magnetic flux; the drive voltage real-time generation unit is used to calculate the required drive voltage in real time within each sampling period based on the DC resistance and self-inductance of the compensation coil. The dynamic voltage is generated by injecting a bidirectional current matching the compensation coil current set value into the compensation coil by means of closed-loop current detection and proportional-integral regulation, thereby maintaining the linearization of the magnetic flux of the magnetic ring under current transient and harmonic conditions; the pulse output unit is used to obtain the differential voltage signal in real time through the closed-loop Hall sensor set at the gap; after removing the zero-point bias, the residual magnetic field is inverted into the instantaneous current measurement value by combining the geometric parameters of the magnetic ring and the temperature-corrected magnetic permeability; based on the differential voltage signal and the instantaneous current measurement value, the instantaneous active power is obtained and accumulated within a fixed integration window to obtain the accumulated energy; When the accumulated energy reaches the threshold value corresponding to the meter constant, the metering pulse output is triggered; The specific execution process of the compensation coil current setting unit includes: multiplying the uncompensated magnetic flux by the instantaneous total magnetic resistance of the entire magnetic ring magnetic circuit to obtain the actual magnetic potential value applied to the magnetic ring by the load current at this moment; in order to offset this magnetic potential, a compensation magnetic potential of equal magnitude and opposite direction is generated as the negative ampere-turn target value; reading the number of compensation coil turns from the non-volatile memory, dividing the negative ampere-turn target value by the number of compensation coil turns, and obtaining the dynamic current component that offsets the load current; synchronously reading the latest temperature value of the core temperature sensor, and interpolating the residual magnetic density of the core at the latest temperature value according to the factory calibration curve; multiplying the residual magnetic density by the effective cross-sectional area of ​​the magnetic ring to obtain the inherent residual magnetic flux; then dividing the inherent residual magnetic flux by the total magnetic resistance to obtain the additional magnetic potential required to offset the inherent residual magnetism; dividing the additional magnetic potential by the number of compensation coil turns again to obtain the constant current component; directly adding the dynamic current component and the constant current component according to the sign to form the compensation coil current setting value.

2. The single-phase electric energy meter with a magnetic ring compensation structure according to claim 1, characterized in that: The magnetic ring parameters include: effective cross-sectional area, equivalent length of closed magnetic circuit and preset gap length.

3. The single-phase electric energy meter with a magnetic ring compensation structure according to claim 2, characterized in that: The specific execution process of the real-time driving voltage generation unit includes: at the beginning of each sampling cycle, reading the nominal values ​​of the DC resistance and self-inductance of the compensation coil and their temperature drift coefficients in turn, and combining the real-time temperature provided by the core temperature sensor to dynamically correct the nominal values ​​of the DC resistance and self-inductance to form equivalent resistance and equivalent inductance consistent with the environmental conditions; then, starting the feedforward estimation process within the same sampling cycle, differentiating the compensation coil current set value from the actual current detection value at the end of the previous sampling cycle, and obtaining the current increment target to be completed within the current sampling cycle; then, based on the inertia of the current change response, a parameter-free estimation is performed to generate a preliminary voltage prediction quantity for quickly offsetting the influence of large step or spike disturbance on the linearization of the magnetic flux of the magnetic ring; the preliminary voltage prediction quantity is immediately written into the pulse width modulation control register after generation to drive the full-bridge power switch tube to turn on a pilot voltage pulse with the same direction as the trend of the compensation coil current set value.

4. The single-phase electric energy meter with a magnetic ring compensation structure according to claim 3, characterized in that: After completing the feedforward prediction process, the real-time driving voltage generation unit immediately enters the closed-loop current detection and proportional-integral regulation stage: the bidirectional current in the compensation coil is sampled in real time through the analog-to-digital converter, and the sampling results are sent to the digital proportional-integral regulator at fixed time intervals within the same sampling cycle; the proportional-integral regulator first uses the proportional link to linearly amplify the instantaneous deviation between the current sampling value and the compensation coil current setting value to generate a fast correction component to suppress the small current swing caused by high-frequency noise and harmonic working conditions; then the continuous deviation is accumulated through the integral link to generate a slow-changing steady-state component for eliminating the steady-state error caused by the nonlinearity of the magnetic ring material and the dead zone of the power switch; the output of the proportional link and the output of the integral link are added according to the weight in the digital domain to obtain a closed-loop correction voltage instruction, and the closed-loop correction voltage instruction is vector-synthesized with the preliminary voltage prediction amount generated by the feedforward prediction process to form a target driving voltage waveform covering the remaining period of the entire sampling cycle; The target drive voltage waveform is mapped into a bipolar pulse width modulation signal in real time, acting on the full-bridge power switch tube to achieve high-precision current injection into the compensation coil, thereby maintaining the magnetic flux linearization of the magnetic ring under current transient and harmonic conditions.

5. The single-phase electric energy meter with a magnetic ring compensation structure according to claim 4, characterized in that: The real-time drive voltage generation unit also includes an adaptive limiting and fault redundancy processing process, including: when the compensation coil current is detected to have a transient overshoot exceeding the designed safety upper limit within any sampling cycle, the soft limiting logic is immediately triggered to proportionally compress the target drive voltage waveform to a safe range to prevent overheating of the compensation coil or overcurrent of the power switch tube; if the compensation coil current is detected to be unable to effectively track the compensation coil current set value for several consecutive sampling cycles, it is determined that there may be a hardware failure or core saturation risk, and the real-time drive voltage generation unit immediately enters the fault redundancy processing process, shutting down the full-bridge power switch tube and activating the backup half-bridge path to maintain the minimum amplitude bidirectional current; at the same time, the real-time drive voltage generation unit sends a status word to the pulse output unit via an internal interrupt, prompting the metering channel to enter a derating mode, and writes relevant fault information to non-volatile memory for subsequent maintenance and retrieval; when the fault is eliminated and the compensation coil current set value is consistent with the actual detected value, the real-time drive voltage generation unit automatically exits the fault redundancy processing process and resumes normal driving of the full-bridge power switch tube.

6. The single-phase electric energy meter with a magnetic ring compensation structure according to claim 5, characterized in that: The pulse output unit performs a specific process including: performing zero-point bias detection on the differential voltage signal output by the closed-loop Hall sensor at the beginning of each sampling cycle. The zero-point bias detection obtains the current static offset by sampling multiple times within a reference window with the external load disconnected and averaging the samples. Subsequently, the pulse output unit writes the static offset into a compensation register within the same sampling cycle as a reference for real-time zero-point bias elimination. When the external load is reconnected, the closed-loop Hall sensor continuously outputs a new differential voltage signal, which the compensation register immediately performs a one-to-one offset on to ensure that the subsequent signal chain is free of DC drift. The differential voltage signal after zero-point bias elimination is fed into a dynamic digital phase-locked filter (DPLF). The DPLF suppresses radio frequency interference and power frequency spurious components while maintaining phase synchronization, thereby outputting a representative residual magnetic field. The pulse output unit obtains the matching temperature-corrected permeability through a table lookup based on the magnetic ring geometric parameters stored in non-volatile memory and the real-time temperature fed by the core temperature sensor, and then inverts the residual magnetic field into an instantaneous current measurement point by point.

7. The single-phase electric energy meter with a magnetic ring compensation structure according to claim 6, characterized in that: After obtaining the instantaneous current measurement value, the pulse output unit performs vector multiplication with the external instantaneous voltage detection value synchronously input by the voltage sampling channel to generate the instantaneous active power in the digital domain. The instantaneous active power is sent to a fixed integration window and accumulated in chronological order to form a rolling accumulated energy. To avoid mismeasurement caused by large current shocks or harmonic spikes, the pulse output unit introduces a dual threshold suppression strategy during the integration process: first, when the instantaneous active power suddenly rises beyond the upper limit of the normal operating range, the upper threshold suppression logic is activated to reduce the excess portion to the upper boundary value; second, when the instantaneous active power briefly drops to near zero, the lower threshold suppression logic is activated to merge the noise near zero to the zero axis. The power value after double threshold suppression is continuously accumulated within a fixed integration window. The pulse output unit simultaneously monitors the ratio of the accumulated energy to the pre-stored meter constant. When the ratio exceeds the preset decimal resolution threshold, a sub-pulse mark is recorded by the internal high-precision timer for full pulse synthesis.

8. The single-phase electric energy meter with a magnetic ring compensation structure according to claim 7, characterized in that: When the accumulated energy reaches the integer threshold corresponding to the meter constant, the pulse output unit triggers the metering pulse output process: first, the anti-shake delay logic is called to lock the metering channel within the minimum time resolution interval to prevent repeated triggering due to sensor jitter or electromagnetic interference; second, the recorded sub-pulse markers are cleared and the fixed integration window is reset to zero to prepare for the next cycle; Subsequently, the pulse output unit drives the external metering interface through the isolation optocoupler to send a standard width pulse; within the guard window after the pulse is sent, the pulse output unit continuously monitors the closed-loop Hall sensor output and the instantaneous current measurement value. If residual magnetic field drift is found or the instantaneous current measurement value deviates significantly from the compensation coil current setting value, the adaptive gain adjustment process is triggered, and the long-term stability of the differential voltage signal is maintained by dynamically modifying the digital phase-locked filter bandwidth and the zero-point bias compensation register threshold; if the accumulated energy is still detected to be unable to recover to the normal beat after several fixed integration windows, it is determined that the magnetic ring or sensor may have failed, and the pulse output unit immediately writes the fault code to the non-volatile memory and outputs a warning pulse through the status pin to alert maintenance personnel; once the fault is eliminated, the pulse output unit automatically exits the warning state, and resumes the working sequence of accumulating energy according to the fixed integration window and triggering the metering pulse output according to the meter constant.

Citation Information

Patent Citations

  • Clamp-on ammeter

    CA1166698A

  • Closed loop current sensor

    CN105629047A