Single-phase electric energy meter with magnetic ring compensation structure

Through the closed-loop control of notched magnetic ring modeling and compensation coil current setting, combined with real-time generation of driving voltage and pulse output, the measurement accuracy and stability of a single-phase energy meter in complex power grid environments is solved, and high-precision, low power consumption and strong robust current measurement is achieved.

CN120334604AActive Publication Date: 2025-07-18SHENZHEN FRIENDCOM TECH DEV +1

Patent Information

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

AI Technical Summary

Technical Problem

When existing single-phase electric energy meters face increased harmonic content of the power grid, increased ambient temperature span, and strong external magnetic field interference, the metering accuracy and stability are difficult to guarantee. Especially in complex scenarios such as photovoltaic grid connection, variable frequency air conditioning, charging piles, traditional current transformers and open-loop Hall sensors have problems such as large size, high cost, susceptibility to interference, and large metrological errors.

Method used

The modules that use 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 by the notched magnetic ring modeling unit, and the magnetic flux is calculated based on the temperature-corrected permeability. The reverse current injected by the compensation coil maintains the near-zero state. The real-time generation unit of the driving voltage performs closed-loop current detection and proportional-integration adjustment, and the pulse output unit performs instantaneous current measurement and metering pulse output.

Benefits of technology

Maintain high-precision metering under strong harmonics, wide temperature difference and sudden load environments, and has adaptive limiting, fault redundancy and self-diagnosis functions, achieving high accuracy, high stability, low power consumption and strong robustness, reducing the impact of magnetic saturation, temperature drift and interference on metering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120334604A_ABST
    Figure CN120334604A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of electric energy meters, and particularly relates to a single-phase electric energy meter with a magnetic ring compensation structure. The device comprises a gap magnetic ring modeling unit, a compensation coil current setting unit, a driving voltage real-time generation unit and a pulse output unit, the notched magnetic ring modeling unit is used for calculating corresponding uncompensated magnetic flux based on the magnetic conductivity after temperature correction; the compensation coil current setting unit is used for forming a compensation coil current setting value; the driving voltage real-time generation unit is used for injecting bidirectional current matched with a compensation coil current set value into the compensation coil; the pulse output unit is used for triggering metering pulse output; the method has the beneficial effects of high precision, high stability, low power consumption and high 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 particularly 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 electric energy meters not only need to measure steady-state power frequency currents, but also maintain high accuracy and long life in strong harmonic scenarios such as photovoltaic grid connection, variable-frequency air conditioners, and charging piles. For a long time, the mainstream industry solutions can be roughly divided into three categories: one is to use a traditional current transformer with a closed magnetic ring of silicon steel or iron-nickel alloy in combination with a shunt resistor to measure the main conductor current through the secondary current; the second is to use an open-loop Hall sensor to directly convert the magnetic flux into voltage and then sample it by an analog front-end; the third is to use a high-speed sampling ADC plus a shunt resistor in a fully electronic metering chip. The above solutions have been widely popularized in their respective application ranges, but still expose several unavoidable technical shortcomings when facing the increasing grid harmonic content, the increasing environmental temperature span, and external strong magnetic field interference.

[0003] Firstly, traditional current transformers rely on the characteristics of high magnetic permeability and low remanence of the iron core, and have the advantages of low cost and good linearity in the pure power frequency and pure sine wave power transmission scenarios decades ago. However, in actual operation, as long as the load contains harmonics or the current amplitude fluctuates greatly, the iron core is prone to enter the non-linear region or even the saturation region, resulting in the distortion of the metering curve. To prevent saturation, manufacturers usually make the iron core cross-sectional area and air gap larger, which brings problems such as large volume, increased copper loss and iron loss. Moreover, the iron core is extremely sensitive to temperature. In summer, the temperature of the box transformer can easily exceed 80 degrees Celsius, and in winter, the outdoor instrument box may drop to minus 30 degrees Celsius. The magnetic permeability fluctuates violently with temperature, and it is difficult to keep the ratio of the secondary current to the primary current of the transformer stable. Regular manual calibration is required, and the maintenance cost is high.

[0004] Secondly, the open-loop Hall sensor samples the magnetic field through an air gap and directly converts the magnetic induction intensity into voltage. To improve the sensitivity, the air gap is often designed to be relatively wide, resulting in a large magnetic resistance of the magnetic circuit and a large amount of main magnetic flux leaking to the outside. It is very easy to be affected by adjacent wires or external permanent magnets, and the measurement result jitters with the fluctuation of the environmental magnetic field. Even if magnetic shielding sheets are added, it is difficult to achieve a balance among volume, cost, and performance. More troublesome is that the Hall element itself has an input offset voltage, which drifts non-linearly with temperature, and it is difficult to cover the full working conditions with single-point temperature compensation. For example, in the North American outdoor metering scenario, the daily temperature difference can exceed 30 degrees Celsius, and the metering error of the open-loop Hall scheme will appear in a step-like manner with the temperature drift, affecting the settlement accuracy of power supply enterprises. Summary of the Invention

[0005] The main object of the present invention is to provide a single-phase watt-hour meter with a magnetic ring compensation structure. By the collaborative work of modules such as notch magnetic ring modeling, compensation coil current setting, real-time driving voltage generation, and pulse output, it realizes the real-time closed-loop suppression of the magnetic flux caused by the current in the main conductor, maintains the magnetic flux of the magnetic ring in a nearly zero state, and significantly improves the linearity and anti-interference ability of current measurement. The invention can maintain high-precision metering in complex power grid environments such as strong harmonics, wide temperature differences, and sudden loads, and at the same time has functions of adaptive amplitude limiting, fault redundancy, and self-diagnosis, and has the beneficial effects of high precision, high stability, low power consumption, and strong robustness.

[0006] To solve the above technical problems, the present invention provides a single-phase watt-hour meter with a magnetic ring compensation structure, which includes: A notch magnetic ring modeling unit, a compensation coil current setting unit, a driving voltage real-time generation unit, and a pulse output unit; the notch magnetic ring modeling unit is used to detect the instantaneous current of the single-phase line, and regard the equivalent number of turns of the main conductor through which it passes as the magnetomotive force of excitation and input it to the magnetic ring with a notch; then, combined with the magnetic ring parameters of the magnetic ring with a notch, calculate the corresponding uncompensated magnetic flux based on the permeability after temperature correction; the compensation coil current setting unit is used to determine the compensation current target for offsetting the load magnetomotive force according to the uncompensated magnetic flux, in accordance with the principle of equivalent ampere-turn conservation, and comprehensively consider the ratio of the equivalent number of turns of the main conductor to the number of turns of the compensation coil, and add the temperature-related residual magnetic offset to form a compensation coil current setting value to maintain the magnetic flux in a nearly zero working state; the driving voltage real-time generation unit is used to calculate the required driving voltage in real time in each sampling period based on the DC resistance and self-inductance of the compensation coil, and inject a bidirectional current matching the compensation coil current setting value into the compensation coil by means of closed-loop current detection and proportional-integral regulation, so as to maintain 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 arranged at the notch; after removing the zero-point bias voltage, combined with the geometric parameters of the magnetic ring and the temperature-corrected permeability, invert the residual magnetic field into an instantaneous current measurement value; according to the differential voltage signal and the instantaneous current measurement value, obtain the instantaneous active power and accumulate it within a fixed integration window to obtain the accumulated energy; when the accumulated energy reaches the threshold corresponding to the meter constant, trigger the output of the metering pulse.

[0007] Further, the magnetic ring parameters include: effective cross-sectional area, equivalent length of the closed magnetic circuit, and preset notch length.

[0008] Further, 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 magnetomotive force value exerted by the load current on the magnetic ring at this moment; to cancel this magnetomotive force, generating a compensation magnetomotive force of the same magnitude but opposite in direction as a negative ampere-turn target value; reading the number of turns of the compensation coil from the non-volatile memory, dividing the negative ampere-turn target value by the number of turns of the compensation coil to obtain the dynamic current component for canceling the load current; synchronously reading the latest temperature value of the core temperature sensor, and interpolating the remanent magnetic density of the core at this latest temperature value according to the factory calibration curve; multiplying the remanent magnetic density by the effective cross-sectional area of the magnetic ring to obtain the inherent remanent magnetic flux; then dividing the inherent remanent magnetic flux by the total magnetic resistance to obtain the additional magnetomotive force required to cancel the inherent remanent magnetism; dividing the additional magnetomotive force by the number of turns of the compensation coil again to obtain the constant current component; directly adding the dynamic current component and the constant current component according to their signs to form the compensation coil current setting value.

[0009] Further, the specific execution process of the drive voltage real-time generation unit includes: at the beginning of each sampling period, successively reading the nominal values of the DC resistance and self-inductance of the compensation coil and their temperature drift coefficients, and dynamically correcting the nominal values of the DC resistance and self-inductance in combination with the instantaneous temperature provided by the core temperature sensor to form an equivalent resistance and an equivalent inductance consistent with the environmental state; subsequently, starting a feedforward prediction process within the same sampling period, taking the difference between the compensation coil current setting value and the actual current detection value at the end of the previous sampling period to obtain the current increment target to be completed within the current sampling period; then making a parameter-free quantization estimation of the inertia of the equivalent inductance's response to current changes to generate a preliminary voltage prediction value for quickly canceling the influence of large-step or spike disturbances on the linearization of the magnetic ring magnetic flux; immediately after the preliminary voltage prediction value is generated, writing it into the pulse width modulation control register to drive the full-bridge power switch tube to turn on a pilot voltage pulse in the same direction as the trend of the compensation coil current setting value.

[0010] Further, after completing the feedforward prediction process, the driving 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 an analog-to-digital converter, and the sampling results are sent to the digital proportional-integral regulator at fixed time intervals within the same sampling period; the proportional-integral regulator first linearly amplifies the instantaneous deviation between the current sampling value and the compensation coil current set value using the proportional link to generate a fast correction component to suppress the small current swings caused by high-frequency noise and harmonic conditions; then, the continuous deviation is accumulated through the integral link to generate a slow-varying steady-state component to eliminate the steady-state error caused by the nonlinearity of the magnetic core material and the dead zone of the power switch; the output of the proportional link and the output of the integral link are added by weight in the digital domain to obtain the closed-loop correction voltage command, and the closed-loop correction voltage command and the preliminary voltage prediction generated by the feedforward prediction process are vector synthesized to form the target driving voltage waveform covering the remaining period of the entire sampling period; the target driving 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 linearization of the magnetic core magnetic flux under current transient and harmonic conditions.

[0011] Further, the driving voltage real-time generation unit further includes an adaptive limiting and fault redundancy processing process, including: when it is monitored that the compensation coil current has a transient overshoot exceeding the designed safety upper limit in any sampling period, the soft limiting logic is immediately triggered to compress the target driving voltage waveform proportionally to the safe range to prevent the compensation coil from overheating or the power switch tube from overcurrent; if it is detected that the compensation coil current cannot effectively track the compensation coil current set value in several consecutive sampling periods, it is determined that there may be a risk of hardware failure or magnetic core saturation. The driving voltage real-time generation unit immediately enters the fault redundancy processing process, maintains the minimum amplitude bidirectional current by turning off the full-bridge power switch tube and starting the standby half-bridge path; at the same time, the driving voltage real-time generation unit sends a status word to the pulse output unit through an internal interrupt, indicating that the metering channel enters the derating mode, and writes the relevant fault information into the non-volatile memory for subsequent maintenance retrieval; when the fault is eliminated and the compensation coil current set value and the actual detected value are consistent again, the driving voltage real-time generation unit automatically exits the fault redundancy processing process and resumes the normal driving of the full-bridge power switch tube.

[0012] Further, the specific execution process of the pulse output unit includes: at the beginning of each sampling period, detecting the zero-point bias voltage of the differential voltage signal output by the closed-loop Hall sensor; the zero-point bias voltage detection obtains the current static unbalance amount by sampling multiple times within the reference window when the external load is disconnected and calculating the average value; subsequently, the pulse output unit writes the static unbalance amount into the compensation register within the same sampling period as the reference for real-time elimination of the zero-point bias voltage; when the external load is reconnected, the closed-loop Hall sensor continuously outputs a new differential voltage signal, and the compensation register immediately performs a one-to-one cancellation process on it to ensure that there is no DC drift in the subsequent signal chain; the differential voltage signal after eliminating the zero-point bias voltage is sent to a dynamic digital phase-locked filter, and the dynamic digital phase-locked filter suppresses the radio frequency interference and power frequency spurious components while maintaining phase synchronization, thereby outputting the representative amount of the residual magnetic field; the pulse output unit obtains the temperature-corrected magnetic permeability that matches by looking up a table according to the magnetic ring geometric parameters stored in the non-volatile memory and in combination with the real-time temperature fed back by the core temperature sensor, and inversely calculates the above residual magnetic field point by point into the instantaneous current measurement value.

[0013] Further, after obtaining the instantaneous current measurement value, the pulse output unit performs a vector multiplication with the external instantaneous voltage detection value synchronously fed by the voltage sampling channel to generate the instantaneous active power in the digital domain; the instantaneous active power is accumulated in a fixed integration window 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 double-threshold suppression strategy during the integration process: firstly, when the instantaneous active power suddenly rises above the upper limit of the normal operating range, the upper limit threshold suppression logic is activated to cut the excess part to the upper limit boundary value; secondly, when the instantaneous active power briefly drops to near zero, the lower limit threshold suppression logic is activated to merge the noise near zero to the zero axis; the power value after double-threshold suppression continues to accumulate in the fixed integration window, and the pulse output unit simultaneously monitors the ratio of this accumulated energy to the pre-stored meter constant. When the ratio exceeds the preset decimal resolution threshold, an impulse mark is recorded through the internal high-precision timer for full pulse synthesis.

[0014] Further, when the accumulated energy reaches the integral threshold corresponding to the meter constant, the pulse output unit triggers the metering pulse output process: First, it calls the anti-shake delay logic to lock the metering channel within the minimum time resolution interval to prevent repeated triggering caused by sensor jitter or electromagnetic interference; Second, it clears the recorded sub-pulse marks and resets the fixed integration window to zero to prepare for the next cycle; Subsequently, the pulse output unit drives the external metering interface to send standard-width pulses through an isolation optocoupler; within the guard window after the pulse is sent, the pulse output unit continuously monitors the output of the closed-loop Hall sensor and the instantaneous current measurement value. If it detects residual magnetic field drift or a significant deviation between the instantaneous current measurement value and the compensation coil current set value, it triggers the adaptive gain adjustment process, and maintains the long-term stability of the differential voltage signal by dynamically modifying the digital phase-locked filter bandwidth and the zero-bias compensation register threshold; If it continues to detect that the accumulated energy cannot return to the normal rhythm after several fixed integration windows, it is determined that the magnetic ring or sensor may fail. The pulse output unit immediately writes the fault code into the non-volatile memory and outputs a warning pulse through the status pin to prompt the 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 metering pulse output according to the meter constant.

[0015] A single-phase energy meter with a magnetic ring compensation structure according to the present invention has the following beneficial effects: By opening a controllable notch on the magnetic ring and constructing a closed-loop compensation path, the present invention realizes the full-link real-time self-consistency of main conductor current - magnetic field - magnetic flux - compensation current - driving voltage - metering pulse, enabling the single-phase energy meter to maintain high precision under working conditions with high harmonic content, large load mutations, and wide environmental temperature differences. The magnetic permeability of the notched magnetic ring modeling unit is dynamically corrected with temperature, and the compensation coil current setting unit projects the uncompensated magnetic flux and the remanent magnetic density onto the ampere-turn space at the same time to generate a set value containing both fast components and constant components; The driving voltage real-time generation unit superimposes feed-forward prediction and proportional-integral closed-loop, and cooperates with adaptive amplitude limiting and fault redundancy processing to suppress overshoot and phase shift within microseconds, preventing magnetic core saturation and damage to power devices; The pulse output unit uses zero-bias dynamic cancellation, phase-locked filtering, and dual-threshold integration to completely isolate radio frequency and power frequency interference, and uses two-level quantization of sub-pulses and full-pulses to ensure no missing measurement in the low-power section and no double counting in the high-power section. The whole machine can track the magnetic permeability drift and the increase of the compensation coil resistance online without manual inspection, and automatically derates and records the fault code when encountering hardware abnormalities. Compared with traditional current transformers or open-loop Hall solutions, the present invention shows significant beneficial effects such as high precision, high robustness, low energy consumption, and easy maintenance in intelligent power distribution and consumption terminals. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to the provided drawings.

[0017] Figure 1 Schematic diagram of the structure of a single-phase energy meter with a magnetic ring compensation structure provided by an embodiment of the present invention; Figure 2 Graph of the experimental results of the magnetic flux comparison before and after compensation; Figure 3 Experiment on the influence of temperature compensation on measurement accuracy; Figure 4 Graph of the experimental results of the current response characteristics of the compensation coil. Specific implementation manners

[0018] The following further elaborates on the method of the present invention in conjunction with the drawings and the embodiments of the present invention.

[0019] Embodiment 1, refer to Figure 1 : A single-phase energy meter with a magnetic ring compensation structure, which includes: A notched magnetic ring modeling unit, a compensation coil current setting unit, a driving voltage real-time generation unit, and a pulse output unit; the notched magnetic ring modeling unit is used to detect the instantaneous current of the single-phase line and regard the equivalent number of turns of the main conductor passing through it as the magnetomotive force of excitation and input it to the notched magnetic ring; then, in combination with the magnetic ring parameters of the notched magnetic ring, calculate the corresponding uncompensated magnetic flux based on the temperature-corrected magnetic permeability; the compensation coil current setting unit is used to determine the target compensation current for offsetting the load magnetomotive force according to the uncompensated magnetic flux, in accordance with the principle of equivalent ampere-turn conservation, and comprehensively consider the ratio of the equivalent number of turns of the main conductor to the number of turns of the compensation coil, and form a compensation coil current setting value by superimposing the temperature-related residual magnetism cancellation amount to maintain the near-zero magnetic flux working state; the driving voltage real-time generation unit is used to calculate the required driving voltage in real time in each sampling period based on the DC resistance and self-inductance of the compensation coil, and inject a bidirectional current matching the compensation coil current setting value into the compensation coil by means of closed-loop current detection and proportional-integral regulation, so as to keep the magnetic ring magnetic flux linear 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 arranged at the notch; after removing the zero-point bias voltage, in combination with the magnetic ring geometric parameters and temperature-corrected magnetic permeability, invert the residual magnetic field into the instantaneous current measurement value; obtain the instantaneous active power based on the differential voltage signal and the instantaneous current measurement value and accumulate it within a fixed integration window to obtain the accumulated energy; when the accumulated energy reaches the threshold corresponding to the meter constant, trigger the output of the metering pulse.

[0020] The notched magnetic ring modeling unit plays the role of digital twin of the magnetic circuit. The notched magnetic ring artificially introduces a narrow air gap in its structure, forming an asymmetric distribution of the magnetic circuit. The leakage magnetic field at the notch is strong and the direction is fixed, which enables a small-sized closed-loop Hall sensor to be placed outside the notch to directly read the leakage magnetic field without passing through the core, greatly simplifying the structure and reducing the thermal-mechanical coupling error. However, the notch also introduces hysteresis, remanence, and temperature sensitivity, resulting in non-linear drift of the leakage magnetic field-current relationship at different operating points. Therefore, this unit pre-calibrates the permeability-temperature curve and remanence-temperature curve of the magnetic ring in multiple sections and stores them in the on-chip non-volatile memory. After detecting the loop current in real time, the unit first converts the current into equivalent magnetizing ampere-turns according to the equivalent number of turns of the main conductor; then, combined with the current temperature reading, it looks up and interpolates in the permeability-temperature curve to map the magnetizing ampere-turns to the uncompensated magnetic flux, fully reproducing the magnetic energy distribution state of the notched magnetic ring at this moment. The purpose of this is to enable the control system to have an observable, predictable, and controllable "second perspective" on the invisible magnetic flux inside the magnetic circuit through digital modeling.

[0021] The compensation coil current setting unit "reconciles accounts" with the notched magnetic ring modeling unit in the sense of magnetic energy conservation. When the uncompensated magnetic flux exceeds the near-zero magnetic flux operating band, in essence, the magnetizing ampere-turns corresponding to the main conductor current are not cancelled and accumulate in the magnetic ring. According to the principle of equivalent ampere-turn conservation, only by injecting a compensation current with the opposite direction and appropriate amplitude into the compensation coil can an equivalent reverse magnetizing ampere-turn be generated in the closed magnetic circuit to pull the magnetic flux back to the near-zero region. Therefore, this unit multiplies the uncompensated magnetic flux by the ratio of the equivalent number of turns of the main conductor to the number of turns of the compensation coil to obtain the theoretical compensation current target, and then superimposes the remanence cancellation amount related to temperature to form the compensation coil current setting value. This setting value is continuously refreshed dynamically with the changes in grid current and temperature and is the direct control target of the drive voltage real-time generation unit.

[0022] The drive voltage real-time generation unit closes the loop at the current control level. On the one hand, it is necessary to accurately overcome the voltage drop across the DC resistance of the compensation coil and the hindrance of the coil self-inductance to the current change. On the other hand, it is also necessary to consider that the phase of the compensation coil current must closely follow the high-frequency harmonic components of the primary current. Otherwise, there will be a time delay in the flux compensation and it will deviate from zero. For this reason, the drive voltage real-time generation unit constructs a two-layer control: the bottom layer hardware uses a full-bridge power stage, allowing the output of four-quadrant voltages; the upper layer algorithm drives the current sampling-prediction-correction loop with a high-speed timer. In each sampling period, the initial voltage value is given in the "prediction loop" according to the error of the previous period and the coil parameters, and then the proportional-integral regulation is refined by the "correction loop"; if a zero-crossing rapid jump or a sudden increase in high-order harmonics is detected, the feedforward compensation is additionally activated to raise or lower the initial voltage value in advance. This can ensure that on the millisecond or even shorter time scale, the actual waveform of the compensation current always fits the compensation coil current set value. 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, and the interval where the leakage magnetic field changes linearly with the current amplitude is maximized, and the back-end metering link obtains a stable input.

[0023] The pulse output unit is responsible for the energy-pulse conversion and output interface. After the drive voltage real-time generation unit works stably, the residual magnetic field read by the closed-loop Hall sensor arranged at the notch of the magnetic ring mainly comes from the slight lag of the compensation control loop or the quantization error between the model and the physical object. The differential amplifier circuit cancels the zero bias voltage at the analog front end first, and then the analog-to-digital converter sends it into the digital processing process. In the digital domain, the pulse output unit uses the same temperature-corrected magnetic permeability as the notch magnetic ring modeling unit to invert the residual magnetic field into an instantaneous current measurement value; at the same time, a differential voltage signal is introduced to construct a multiply-accumulate calculation logic to obtain the instantaneous active power. The power flows through a fixed integration window and accumulates into the accumulated energy. When the accumulated energy aligns with the threshold coupled with the meter constant, a single pulse is triggered. The pulse is connected to the metering main board or the external acquisition system through an optocoupler or a drive isolator, which is equivalent to converting the analog energy into discrete countable quantities. Since the comparison of the accumulated energy and the threshold is completed in the digital domain, its resolution is only limited by the ADC bit depth and the window clock accuracy, so the same metering level can be maintained in a wide dynamic range.

[0024] The above four units form a progressive control closed-loop around the common goal of the near-zero magnetic flux working area: the notched magnetic ring modeling unit provides the basis for magnetic flux estimation; the compensation coil current setting unit gives the compensation amount; the drive voltage real-time generation unit forces the compensation current to quickly follow; the pulse output unit relies on the residual magnetic field to complete the measurement and verify the closed-loop effect in reverse. If the near-zero magnetic flux area is regarded as a "soft magnetic energy equipotential surface", then any main conductor current, temperature fluctuation or material aging is regarded as a disturbance source. Once the disturbance pushes the magnetic potential of the magnetic ring away from this equipotential surface, the compensation control will act in the opposite direction within dozens of microseconds and pull the system back to the equipotential surface, thus ensuring that the leakage magnetic flux-current mapping curve is not distorted. Compared with the traditional open-loop magnetic ring watt-hour meter, this design significantly suppresses error sources such as magnetic saturation, remanence, temperature drift, and material dispersion, and replaces the passive design idea of simply relying on the "linear region point selection" of materials by actively managing the magnetic flux.

[0025] Theoretically, the entire system follows the principles of magnetic energy conservation and electromagnetic field superposition. The main conductor wire can be regarded as a concentrated excitation source, and the magnetic field generated by it forms magnetic flux along the closed path of the magnetic ring; the magnetic field generated by the compensation coil is opposite to that of the main conductor. After the two are superimposed inside the magnetic ring core, they exactly cancel each other out under ideal conditions, making the magnetic potential gradient inside the magnetic ring extremely small, and only a very weak leakage magnetic field is retained at the notch for the Hall sensor to sample. Since the compensation coil and the main conductor are coupled on the same magnetic circuit, any change in the current waveform will be immediately reflected in the magnetic flux drive demand. Therefore, as long as the bandwidth of the drive voltage real-time generation unit is high enough, the closed-loop stability can be maintained. When the ambient temperature or the magnetic ring material changes slowly, the notched magnetic ring modeling unit will automatically correct through the temperature-permeability curve and gradually align the model parameters with the actual state, thus avoiding the accumulation of temperature drift errors. At the same time, the pulse output unit continuously monitors the residual magnetic field during the measurement process. If it is found that the closed-loop deviates to one side for a long time, it will trigger the compensation coil current setting unit to fine-tune the remanence cancellation amount through the system self-check flag, so that the system is symmetrically distributed around zero magnetic flux again, forming a secondary steady-state self-adjustment.

[0026] From the implementation point of view, in order to meet the high-precision requirements, the system has made special designs in the clock, noise suppression, digital filtering and other links. The real-time drive voltage generation unit and the compensation coil current setting unit share the same high-speed clock to avoid sampling-output misalignment; the closed-loop Hall sensor adopts a low-noise modulation-demodulation structure to isolate the power frequency and its higher harmonics from the switching noise of the sensor itself, and then cooperates with digital bandpass filtering to filter out the electromagnetic interference generated by the driver stage; ADC sampling and digital calculation are all completed in the core of the single-chip system, avoiding the common-mode coupling of external wiring. Distortion analysis shows that under typical single-phase lighting loads and third harmonic distortion exceeding 20%, this structure can still control the peak value of magnetic flux within ±1% of the zero sideband, and the pulse output measurement error is less than one thousandth, which can meet the high-level certification of electric energy meters. From the perspective of long-term operation, the gap magnetic ring modeling unit also undertakes the task of aging compensation. The magnetic ring material may demagnetize or relax due to stress with age, resulting in a decrease in magnetic permeability; the system periodically injects a small scanning wave at low load, reads the leakage magnetic field and inversely obtains the magnetic permeability, which is equivalent to recalibrating the magnetic ring parameter library online. If the parameter deviation exceeds the threshold, the maintenance flag will be automatically reported to prompt the operation and maintenance personnel to conduct inspection. This can extend the life of the energy meter and maintain the metering level without disassembling the machine.

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

[0028] 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 the excitation ampere-turns to the magnetic flux; the preset gap length plays a dominant role in the air gap magnetic resistance and the degree of leakage of the 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, and then corrects the air gap magnetic resistance according to the preset gap length, so as to obtain an uncompensated magnetic flux that is more in line with the actual characteristics; on this basis, the compensation coil current setting unit performs ampere-turn conservation conversion, 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 drive voltage real-time 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.

[0029] Uncompensated flux : ; in, is the vacuum permeability; is the relative permeability of the magnetic ring material at a temperature of ; is the equivalent number of turns of the main conductor; time is the instantaneous current at is the effective cross-sectional area; is the equivalent length of the closed magnetic circuit; is the preset notch length.

[0030] Further, 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 magnetomotive force value exerted by the load current on the magnetic ring at this moment; generating a compensation magnetomotive force of the same magnitude but opposite in direction to cancel this magnetomotive force as the negative ampere-turn target value; reading the number of turns of the compensation coil from the non-volatile memory, dividing the negative ampere-turn target value by the number of turns of the compensation coil to obtain the dynamic current component for canceling the load current; synchronously reading the latest temperature value of the core temperature sensor, and interpolating at this latest temperature value according to the factory calibration curve to obtain the remanent magnetic density of the core; multiplying the remanent magnetic density by the effective cross-sectional area of the magnetic ring to obtain the inherent remanent magnetic flux; then dividing the inherent remanent magnetic flux by the total magnetic resistance to obtain the additional magnetomotive force required to cancel the inherent remanent magnetism; dividing the additional magnetomotive force by the number of turns of the compensation coil again to obtain the constant current component; directly adding the dynamic current component and the constant current component according to their signs to form the compensation coil current setting value.

[0031] The reason why the compensation coil current setting unit can convert the rapidly changing uncompensated magnetic flux into a current-dimensioned and real-time controllable instruction is essentially that the entire magnetic ring magnetic circuit is regarded as a magnetic energy transmission channel, and the influences of the load current, remanent magnetism, and temperature on the magnetomotive force are uniformly projected into this channel, and then the cancellation of positive and negative magnetomotive forces is completed at the same node using the principle of ampere-turn conservation. There is a high analogy between the magnetic circuit and the circuit in terms of topology. In the circuit, voltage drives current to be distributed in wires and resistors, and in the magnetic circuit, magnetomotive force drives magnetic flux to be distributed in the iron core and air gap; as long as the magnetic flux and magnetic resistance at a certain moment are known, the magnetomotive force can be deduced inversely, which is isomorphic to the voltage equal to current multiplied by resistance in Ohm's law.

[0032] The compensating coil current setting unit first multiplies the uncompensated magnetic flux by the instantaneous total magnetic resistance to obtain the actual magnetomotive force value, which is equivalent to informing the system of the magnetic potential difference "pressed out" by the load current in the current magnetic circuit. If this magnetomotive force continues to exist in the magnetic circuit, the magnetic flux will accumulate along the closed path of the magnetic ring, causing the output of the Hall sensor to deviate from the linear region. Therefore, a compensating magnetomotive force with the opposite direction and equal amplitude must be applied immediately to cancel it. To convert the compensating magnetomotive force into a directly drivable current form, the unit uses the geometric constant of the number of turns of the compensating coil as the proportionality coefficient, divides the negative ampere-turn target value by the number of turns of the compensating coil, and converts the magnetomotive force space into the current space. This process is equivalent to feeding back the magnetic flux closed-loop to the circuit with the coil, enabling the system to complete control in the electrical quantity domain. The dynamic current component is thus born and 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 remanent magnetic density left in the magnetic core due to crystal orientation and stress locking will still cause a zero-point shift in the magnetic flux when there is no external magnetomotive force. If this is not compensated additionally, it is like a DC drift in the integration loop of an operational amplifier, which will cause the closed-loop output to be biased for a long time. Therefore, the unit introduces the reading of the magnetic core temperature sensor, obtains the current remanent magnetic density through the factory calibration curve, multiplies it by the effective cross-sectional area of the magnetic ring to calculate the inherent remanent magnetic flux, maps the inherent remanent magnetic flux into an additional magnetomotive force using the same instantaneous total magnetic resistance, and finally divides it by the number of turns of the compensating coil to convert it into a constant current component.

[0033] The constancy here is relative to the load change. It drifts slowly with temperature but remains approximately unchanged during load steps, which is equivalent to adding a DC bias level to the magnetic circuit, enabling the bidirectional dynamic compensation to always swing symmetrically around the magnetomotive force zero point, thus enhancing the linear dynamic range. When the dynamic current component and the constant current component are directly added according to their signs, the compensating coil current setting value is formed in a very short time and sent to the driving voltage real-time generation unit. This setting value is actually an energy balance instruction that unifies magnetic energy, thermal energy, and electrical energy into the ampere-turn dimension. Since the uncompensated magnetic flux, total magnetic resistance, and remanent magnetic density all originate from real-time measurement or interpolation, and the number of turns of the compensating coil is an inherent hardware constant, this instruction is naturally traceable and testable. Any measurement distortion of a quantity will be reflected at the Hall sensor end through the residual magnetic flux feedback, and the system can then iterate and correct again accordingly to form a closed-loop self-consistency. The entire process relies on two basic laws: the conservation of magnetic energy and the 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 magnetomotive force inside the magnetic ring approaches zero after the magnetomotive force counteracts, so that the magnetic ring always operates in the low magnetic flux density region, the Hall differential voltage maintains high linearity, and the pulse output unit thus obtains an instantaneous current measurement value with a high signal-to-noise ratio.

[0034] Compensating coil current setting value is: ; Wherein, is the number of turns of the compensation coil; Interpolate at the latest temperature value to obtain the remanent magnetic density of the magnetic core.

[0035] Further, the specific execution process of the driving voltage real-time generation unit includes: at the beginning of each sampling period, sequentially read the nominal values of the DC resistance and self-inductance of the compensation coil and their temperature drift coefficients, and combine the instant temperature provided by the magnetic core temperature sensor to dynamically correct the nominal values of the DC resistance and self-inductance, forming an equivalent resistance and an equivalent inductance consistent with the environmental state; subsequently, start a feed-forward prediction process within the same sampling period, take the difference between the compensation coil current set value and the actual current detection value at the end of the previous sampling period to obtain the current increment target to be completed within the current sampling period; then, perform a parameter-free quantization estimation on the inertia of the equivalent inductance's response to current changes to generate a preliminary voltage prediction value, which is used to quickly cancel the influence of large step or spike disturbances on the linearization of the magnetic ring magnetic flux; the preliminary voltage prediction value is immediately written into the pulse width modulation control register after being generated to drive the full-bridge power switch tube to turn on a pilot voltage pulse in the same direction as the trend of the compensation coil current set value.

[0036] The driving voltage real-time generation unit undertakes the responsibility of electric energy injection in the magnetic ring compensation closed-loop. Its core is to timely and accurately convert the compensation coil current set value into the driving pulse of the full-bridge power stage, so that the compensation coil current can fit the set curve in each sampling period without obvious phase shift or overshoot. To achieve this, at the beginning of each sampling period, the unit sequentially reads the nominal values of the DC resistance and self-inductance of the compensation coil and their temperature drift coefficients, and combines the instant temperature provided by the magnetic core temperature sensor to dynamically correct the nominal values of the DC resistance and self-inductance, forming an equivalent resistance and an equivalent inductance consistent with the environmental state. This can map the influence of temperature factors on resistance thermal drift and inductance hysteresis into the electrical model online, making the subsequent voltage prediction closer to physical reality. Subsequently, start a feed-forward prediction process within the same sampling period, take the difference between the compensation coil current set value and the actual current detection value at the end of the previous sampling period to obtain the current increment target to be completed within the current sampling period. This difference result not only quantifies the closed-loop error but also indicates the dynamic demand of the inductor current at the next moment. Then, perform a parameter-free quantization estimation on the inertia of the equivalent inductance's response to current changes to generate a preliminary voltage prediction value, which is used to quickly cancel the influence of large step or spike disturbances on the linearization of the magnetic ring magnetic flux; this process is equivalent to injecting a pre-compensation amount in advance outside the traditional proportional-integral loop, pulling the equivalent phase margin of the system forward and shortening the follow-up time of the compensation coil current.

[0037] The preliminary voltage prediction value is written into the pulse width modulation control register immediately after generation, so as to drive the full-bridge power switch tube to turn on a pilot voltage pulse in the same direction as the trend of the compensation coil current set value. Since the pulse width modulation control register directly determines the conduction duty ratio of the power tube, the pilot voltage pulse can take effect within the sub-microsecond level, ensuring that the magnetic potential energy of the compensation coil and the magnetic potential of the main conductor rise and fall synchronously. After the pilot pulse acts on the compensation coil, the system will still continue to perform current sampling within the current sampling period and enter the proportional-integral correction link, and superimpose and correct the preliminary voltage prediction value and the current deviation measured in real time; this double-layer strategy of "feed-forward pilot plus feedback fine-tuning" enables the drive current to respond quickly to sudden disturbances and finely eliminate the static error in the steady state area. The full-bridge power switch tube adopts a synchronous rectification layout, which can instantaneously switch the conduction direction during current commutation, reduce the energy loss caused by the dead zone voltage jump, and at the same time compress the pulse width modulation granularity to the microsecond level with the help of a high-resolution timer, further improving the drive link bandwidth. The equivalent resistance and the equivalent inductance are recalculated in each sampling period. Therefore, even if the core temperature fluctuates greatly within dozens of milliseconds, or the compensation coil has a temperature rise due to voltage stress, the controller can feedback these changes into the preliminary voltage prediction value in the first time, avoiding the model-physical mismatch. As the sampling frequency increases and the ADC bit depth increases, the proportion of the contribution of the preliminary voltage prediction value to the system rapidity will gradually increase, while the proportional-integral correction more assumes the role of suppressing noise and correcting quantization errors. This functional stratification enables the drive voltage real-time generation unit to maintain the characteristics of small overshoot and zero static error in high-dynamic scenarios, provides a strong voltage injection guarantee for the magnetic ring magnetic flux closed loop, and finally enables the single-phase electric energy meter to still maintain the linearity and stability of the metering link in the distribution environment with high harmonic content and frequent current mutations.

[0038] Preliminary voltage prediction value is: ; Wherein, is the DC resistance of the compensation coil; is the self-inductance of the compensation coil.

[0039] Furthermore, after completing the feedforward prediction process, the driving 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 an analog-to-digital converter, and the sampling results are sent to the digital proportional-integral regulator at fixed time intervals within the same sampling period; the proportional-integral regulator first linearly amplifies the instantaneous deviation between the current sampling value and the compensation coil current set value using the proportional link to generate a fast correction component to suppress the small current swings caused by high-frequency noise and harmonic conditions; then, the integral link accumulates the continuous deviation to generate a slow-varying steady-state component to eliminate 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 together by weight in the digital domain to obtain a closed-loop correction voltage command, and the closed-loop correction voltage command and the preliminary voltage prediction generated by the feedforward prediction process are vector synthesized to form a target driving voltage waveform covering the remaining time period of the entire sampling period; the target driving voltage waveform is mapped into a bipolar pulse width modulation signal in real time and acts on the full-bridge power switch tubes to achieve high-precision current injection into the compensation coil, thereby maintaining the linearization of the magnetic ring magnetic flux under current transient and harmonic conditions.

[0040] In this single-phase energy meter with a magnetic ring compensation structure, after the driving voltage real-time generation unit completes the feedforward prediction process, it immediately switches to the closed-loop current detection and proportional-integral regulation stage. Its physical essence is to regard the compensation coil as a first-order controlled object, map the ampere-turn error to the voltage space, and then gradually converge the error within one sampling period through a discrete-time control strategy. The system first uses an analog-to-digital converter to sample the bidirectional current in the compensation coil at fixed time intervals, and the sampling frequency is much higher than the highest harmonic frequency of the main conductor current, so as to ensure capturing the fast mutation components. Each group of sampling results is fed into the digital proportional-integral regulator in a rolling manner within the same sampling period to form a discrete error sequence. The proportional link linearly amplifies the instantaneous deviation between the current sampling value and the compensation coil current set value, and this amplification coefficient is comprehensively set 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 and quickly suppress the small current swings caused by spikes or high-frequency noise to a negligible level; at the same time, the integral link continuously accumulates the continuous deviation, 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 error caused by the power switch dead zone and magnetic core hysteresis in the form of a slow-varying steady-state component.

[0041] The output of the proportional link and the output of the integral link are normalized and added in per-unit according to a preset weight in the digital domain to obtain a closed-loop correction voltage command. This command is vectorially combined with the preliminary voltage prediction generated by the feedforward prediction process. The two are equivalent to component superposition in the same voltage space: the feedforward component dominates the large-amplitude response, and the proportional-integral component refines the residual error. The result of the vector synthesis is resolved into a target drive voltage waveform covering the remaining time period of the entire sampling period and is mapped in real time to a bipolar pulse-width modulation signal. Since the full-bridge power switch tubes adopt a synchronous drive structure, the duty cycle and polarity of the pulse-width modulation signal can be switched at the microsecond level, so that the target drive voltage waveform can be reconstructed without distortion at the hardware level. After the compensation coil receives this voltage, the current climbs or decays along the set trajectory, and its magnetic potential is instantaneously superimposed with the magnetic potential of the main conductor in the magnetic ring, and then leaks through the notch to form a residual magnetic field signal. After the closed-loop Hall sensor captures this signal, it is fed back to the proportional-integral regulator through an analog-to-digital converter. This cycle repeats to achieve a four-quantity closed-loop of voltage-current-magnetic potential-magnetic flux. Since the proportional link suppresses high-frequency deviations in real time, the linear region of the magnetic flux will not be squeezed out due to harmonic disturbances; and the integral link continuously corrects the static error caused by the magnetic core nonlinearity and the dead zone of the power tube, so that the residual magnetic flux in 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 feedforward rapidity and feedback accuracy into the same control time sequence, and ensures that the set value of the compensation coil current can be accurately implemented before the end of each sampling period. The final effect is that under current transient and harmonic conditions, the magnetic flux in the magnetic ring is always in the linearized region, and the leakage magnetic field maintains a strict proportional relationship with the instantaneous current of the main conductor. Furthermore, it provides a measurement basis with high signal-to-noise ratio for the pulse output unit, enabling the single-phase electric energy meter to stably output pulse signals that meet the metering level requirements even in the face of severe harmonics, wide temperature differences, and rapid load fluctuations.

[0042] Furthermore, the driving voltage real-time generating unit further includes an adaptive limiting and fault redundancy processing procedure, including: when it is detected that the compensated coil current has a transient overshoot exceeding the designed safety upper limit within any sampling period, the soft limiting logic is immediately triggered to proportionally compress the target driving voltage waveform to the safe range to prevent the compensated coil from overheating or the power switching transistor from overcurrent; if it is detected that the compensated coil current fails to effectively track the compensated coil current set value within several consecutive sampling periods, it is determined that there may be a risk of hardware failure or core saturation. The driving voltage real-time generating unit immediately enters the fault redundancy processing procedure, maintains a minimum amplitude bidirectional current by turning off the full-bridge power switching transistors and starting the standby half-bridge path; meanwhile, the driving voltage real-time generating unit sends a status word to the pulse output unit through an internal interrupt, indicating that the metering channel enters the derating mode, and writes the relevant fault information into the non-volatile memory for subsequent maintenance retrieval; when the fault is eliminated and the compensated coil current set value and the actual detected value are consistent again, the driving voltage real-time generating unit automatically exits the fault redundancy processing procedure and resumes the normal driving of the full-bridge power switching transistors.

[0043] The adaptive limiting and fault redundancy processing procedure is embedded in the main control loop of the driving voltage real-time generating unit. Its core idea is to unify the two seemingly contradictory goals of current safety and flux linearization into the same closed-loop energy management framework, enabling the system to maintain high-bandwidth compensation under normal operating conditions and self-derate in extreme situations and leave sufficient redundancy to avoid hardware failure or core saturation. Specifically, when the compensated coil current detection value returned by the analog-to-digital converter within any sampling period has a transient overshoot exceeding the designed safety upper limit, the monitoring logic of the driving voltage real-time generating unit first triggers the soft limiting logic, calculates a proportional compression coefficient through a look-up table method, and proportionally compresses the entire target driving voltage waveform that has been synthesized in the digital domain, so that the pulse width modulation duty cycle is synchronously reduced to the safe range; this limiting method is not a simple truncation, but maintains proportional consistency at all sample points of the voltage waveform, thereby ensuring that the phase and harmonic distribution of the compensated coil current waveform are not distorted, only reducing the amplitude, and avoiding secondary distortion caused by the abrupt clipping leading to the redistribution of magnetic potential.

[0044] If the detected overshoot is an occasional event, the soft-limiting logic will be automatically released as the current returns to the safe region; if it is still detected that the compensation coil current cannot effectively track the compensation coil current set value within several consecutive sampling periods, the drive voltage real-time generation unit determines that there may be a risk of hardware failure or core saturation according to the set robustness criterion, and immediately switches to the fault redundancy processing flow at this time. The first step of the fault redundancy processing flow is to block the main drive path by turning off the full-bridge power switch transistors to prevent high energy from continuing to be injected into the compensation coil; then the standby half-bridge path is turned on, and a minimum-amplitude bidirectional current channel is provided by alternately turning on the adjacent arms of the two arms of the half-bridge at a low duty cycle, so that the compensation coil can still maintain the basic magnetic potential balance and avoid the violent destruction of the magnetic ring flux linearization. At the same time, the drive voltage real-time generation unit sends a status word to the pulse output unit through an internal interrupt, indicating that the metering channel enters the derating mode, and the pulse output unit adjusts the integration window and threshold accordingly to ensure that the metering link still maintains traceability after the dynamic accuracy decreases; all relevant fault information (overshoot peak value, duration period, temperature snapshot, soft-limiting coefficient, fault type judgment result) is written into the non-volatile memory to provide a complete event diagnosis basis for subsequent maintenance personnel.

[0045] After the system enters the fault redundancy processing flow, it will check the closed-loop error between the compensation coil current set value and the actual detected value in each sampling period. When the error converges back to the allowable bandwidth and the core temperature is lower than the recoverable threshold, the drive voltage real-time generation unit automatically exits the fault redundancy processing flow, resumes the normal drive of the full-bridge power switch transistors, and sends a recovery status word to the pulse output unit to terminate the derating mode. The entire adaptive limiting and fault redundancy processing flow is equivalent to adding an event-driven safety supervision closed-loop outside the original feedforward plus proportional-integral closed-loop at the cybernetics level. It triggers soft limiting with hard limit detection and redundant derating with continuous error, and establishes a safety constraint boundary in the energy and temperature space; this boundary allows the system to give full play to its high-frequency compensation advantage under normal conditions and can also protect the hardware and magnetic ring by derating operation in extreme cases, so as to maintain the availability and metering credibility of the single-phase electric energy meter on the macroscopic time scale, realize the dynamic compromise of "performance first but safety as a fallback", and provide a robust safety management paradigm for later adopters to transplant this magnetic-electric closed-loop control structure in multi-phase metering, bidirectional power measurement and even distributed energy storage scenarios.

[0046] Furthermore, the specific execution process of the pulse output unit includes: at the beginning of each sampling period, detecting the zero bias voltage of the differential voltage signal output by the closed-loop Hall sensor; the zero bias voltage detection obtains the current static unbalance amount by sampling multiple times within the reference window with the external load disconnected and calculating the average value; subsequently, the pulse output unit writes the static unbalance amount into the compensation register within the same sampling period as the benchmark for real-time elimination of the zero bias voltage; when the external load is reconnected, the closed-loop Hall sensor continuously outputs a new differential voltage signal, and the compensation register immediately performs a one-to-one cancellation process on it to ensure that there is no DC drift in the subsequent signal chain; the differential voltage signal after eliminating the zero bias voltage is sent to the dynamic digital phase-locked filter, and the dynamic digital phase-locked filter suppresses the radio frequency interference and power frequency spurious components while maintaining phase synchronization, thereby outputting the representative amount of the residual magnetic field; the pulse output unit obtains the temperature-corrected magnetic permeability that matches by looking up a table according to the magnetic ring geometric parameters stored in the non-volatile memory and combining the real-time temperature fed back by the core temperature sensor, and inversely calculates the above residual magnetic field point by point into the instantaneous current measurement value.

[0047] The pulse output unit takes the differential voltage signal as the only input and completely maps the residual magnetic field inside the magnetic ring into the instantaneous current measurement value. The core links are zero bias voltage detection, real-time cancellation by the compensation register, synchronous extraction by the dynamic digital phase-locked filter, and inverse calculation by looking up the table of the temperature-corrected magnetic permeability. At the beginning of each sampling period, the control logic first switches the ammeter to the reference window with the external load disconnected. In this window, the closed-loop Hall sensor should theoretically output a pure zero differential voltage signal. However, due to the device mismatch, the bias of the amplification link, and the slight asymmetry introduced by the residual stress, there will be a static unbalance amount. The pulse output unit is driven by a high-speed timer to sample multiple times, and uses the method of shift accumulation and averaging to capture the static unbalance amount within hundreds of microseconds, and then immediately writes the result into the compensation register to form the "zero bias voltage detection" benchmark for this period. After the external load is reconnected, the closed-loop Hall sensor starts to output a new differential voltage signal containing real magnetic field information, and the compensation register performs a one-to-one cancellation process on it within a single clock cycle to ensure that the DC drift has been completely eliminated at the entrance of the subsequent signal chain, and the slow-varying errors related to temperature and device aging are dynamically suppressed.

[0048] The differential voltage signal after removing the zero bias voltage is sent into a dynamic digital phase-locked filter within the same sampling period. This filter locks in real time with the internal reference phase and the differential voltage signal, and through synchronous demodulation, it completely retains the components with the same frequency and phase as the main conductor current, while suppressing broadband radio frequency interference, power frequency spurs, and high-order noise. The output of the phase-locked filter is a representative quantity of the residual magnetic field that is precisely aligned in phase and has its amplitude smoothed. It compresses the small non-linearities, drive lags, and electromagnetic interference in the magnetic ring compensation closed-loop to the quantization noise level. The pulse output unit then calls the geometric parameters of the magnetic ring stored in the non-volatile memory, and combines with the real-time temperature fed back by the core temperature sensor, searches for the nearest node in the temperature-permeability curve table and performs linear interpolation to obtain the temperature-corrected permeability matching the current working condition. This temperature-corrected permeability and the geometric parameters of the magnetic ring together form the proportionality coefficient, which is multiplied point by point with the representative quantity of the residual magnetic field, thereby accurately inverting the magnetic field magnitude into the instantaneous current measurement value. Since the temperature-corrected permeability is re-interpolated based on the latest temperature in each sampling period, the inversion process can track the temperature drift of the core permeability in real time; while the geometric parameters of the magnetic ring, as fixed constants, do not change after factory calibration, ensuring the absolute consistency of the proportionality coefficient. The instantaneous current measurement value then enters the power calculation and energy integration module, continuing to participate in the cumulative energy judgment and metering pulse triggering, but at this stage, it is completely free from the influence of zero drift, radio frequency interference, and temperature drift, achieving a high-fidelity conversion from the analog magnetic field to the digital current, laying a solid foundation for the single-phase energy meter to maintain accuracy in a complex electromagnetic environment.

[0049] Instantaneous current measurement value is: ; Wherein, is the differential voltage signal; is the zero magnetic bias voltage; is the Hall sensitivity.

[0050] Further, after obtaining the instantaneous current measurement value, the pulse output unit performs a vector multiplication with the externally detected instantaneous voltage value synchronously fed by the voltage sampling channel to generate instantaneous active power in the digital domain. The instantaneous active power is fed into a fixed integration window and accumulated in chronological order to form a rolling accumulated energy. To avoid false metering caused by large current shocks or harmonic spikes, the pulse output unit introduces a double-threshold suppression strategy during the integration process: First, when the instantaneous active power suddenly rises above the upper limit of the normal operating range, the upper limit threshold suppression logic is activated to cut the over-limit part to the upper limit boundary value. Second, when the instantaneous active power briefly drops near zero, the lower limit threshold suppression logic is activated to merge the noise near zero to the zero axis. The power value after double-threshold suppression continues to accumulate in the 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, an sub-pulse mark is recorded through the internal high-precision timer for full-pulse synthesis.

[0051] After completing the magnetic field-current inversion, the pulse output unit immediately calls the externally detected instantaneous voltage value fed by the voltage sampling channel and performs a vector multiplication with the instantaneous current measurement value obtained just now with strict time-base alignment, thereby generating 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 locates the voltage sampling sequence and the current sampling sequence to the same sampling point index with a unified clock, ensuring that the two sequences are highly synchronized in the phase and frequency dimensions, thus avoiding the power phase error caused by sampling jitter. The generated instantaneous active power is then written into a fixed integration window. The window length usually covers several complete power frequency cycles and is implemented with a circular buffer structure, making the power data show a rolling accumulation trend 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 to keep the total number of sampling points in the integration window constant.

[0052] A dedicated accumulation register is set inside the window. At each clock edge, it adds the current power value to the accumulated energy already in the register, gradually forming a rolling accumulated energy. Since large current surges or harmonic spikes are likely to occur in the on-site power grid, if not suppressed, the integration window will increase the total energy due to short-term high-power samples, and then trigger mismeasurement. Also, because the Hall sensor and ADC noise may cause the power to briefly drop to near zero, if directly accumulated, small "grooves" will be dug in the energy curve, which also affects the accuracy. Therefore, the pulse output unit introduces a dual-threshold suppression strategy in the power accumulation link. First is the upper-threshold suppression logic: when the instantaneous active power suddenly rises above the upper limit of the normal operating range, that is, the power detection value exceeds the predefined upper threshold, the controller immediately truncates and compresses the excess part to the upper boundary value, so that only the upper boundary value is recorded in the accumulation register, avoiding writing too much energy into the window at one time. This logic does not modify the sorting of the sampling sequence, but flexibly reduces the power amplitude to retain the phase information of the power waveform and does not damage the subsequent power quality diagnosis. 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 a complete power frequency cycle, indicating that this is more quantization noise or residual fluctuation of magnetic ring compensation. So it merges it to the zero axis, and the accumulation register does not record such noise samples that have no actual energy contribution.

[0053] The dual-threshold suppression strategy takes effect point by point inside the integration window. The thresholds of the upper and lower thresholds are calibrated by experiments and can also be adjusted according to the working grade of the electricity meter to achieve the best error-dynamic range balance among different load scenarios. The power samples corrected by the dual-threshold suppression are continuously accumulated in the fixed integration window, forming a smooth and anti-mutation rolling accumulated energy curve. The pulse output unit simultaneously monitors the ratio of the accumulated energy to the electricity meter constant pre-stored in the non-volatile memory. The electricity meter constant is defined as the energy reference corresponding to each output of a complete metering pulse. To balance high resolution and real-time performance, the system sets a preset decimal resolution threshold. When the ratio of the accumulated energy to the electricity meter constant first exceeds this decimal resolution threshold, the pulse output unit immediately records a sub-pulse mark through the internal high-precision timer. The sub-pulse mark represents a part of the energy share of the metering pulse, and its timestamp strictly corresponds to the instant when the accumulated energy crosses the threshold; multiple sub-pulse marks will be automatically combined into a complete metering pulse according to the integer multiple relationship of the electricity meter constant and drive the output channel to update. This design not only maintains the linearity of the energy-pulse conversion but also uses the high-precision timer to quantify small energy increments in a timely manner to prevent the phenomenon of pulse "missing count" during low-power periods. Through vector power calculation, rolling integration, dual-threshold suppression, and two-stage synthesis of sub-pulse and full-pulse, the pulse output unit realizes a high-fidelity mapping from energy to metering pulse without being interfered by inrush current and noise, ensuring that the single-phase electricity meter still maintains the metering grade accuracy in an environment with complex harmonics and large current dynamic span.

[0054] Furthermore, when the accumulated energy reaches the integral 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 caused by sensor jitter or electromagnetic interference. Second, the recorded sub-pulse marks 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 an isolation optocoupler to send standard-width pulses. Within the guard window after the pulse is sent, the pulse output unit continuously monitors the output of the closed-loop Hall sensor and the instantaneous current measurement value. If a residual magnetic field drift or a significant deviation between the instantaneous current measurement value and the compensation coil current set value is detected, the adaptive gain adjustment process is triggered by dynamically modifying the digital phase-locked filter bandwidth and the zero-bias compensation register threshold to maintain the long-term stability of the differential voltage signal. If it is still detected that the accumulated energy cannot return to the normal rhythm after several fixed integration windows, it is determined that the magnetic ring or sensor may be faulty. The pulse output unit immediately writes the fault code into the non-volatile memory and outputs a warning pulse through the status pin to prompt the 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 metering pulse output according to the meter constant.

[0055] When the rolling accumulated energy reaches the integral threshold corresponding to the meter constant, the pulse output unit immediately enters the metering pulse output process, the goal of which is to maintain the integrity and anti-interference ability of the measurement link at the energy conversion critical point. First, the anti-shake delay logic is called 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 edge jitter, ensuring that one energy threshold corresponds to only one pulse event. During the locking period, the internal high-precision timer pauses the sub-pulse statistics to ensure the stability of the metering reference. Subsequently, the recorded sub-pulse marks are cleared, and the fixed integration window and the accumulation register are reset to zero, completely emptying the energy data of the previous cycle and providing a clean starting point for the next cycle. This measure avoids the secondary accumulation and amplification of errors caused by residual energy during the window cycle.

[0056] Next, the pulse output unit drives the external metering interface through an isolated optocoupler to send a standard width pulse. The pulse edge adopts a double-edge recognition format and is completely isolated from the subsequent metering system or remote communication module at the physical layer, which not only blocks the common mode interference feedback, but also avoids the loop current caused by different ground potentials. After the pulse is sent, the system enters the guard window, and continuously monitors the closed-loop Hall sensor output and the instantaneous current measurement value in this short window. If the residual magnetic field drift is detected or the instantaneous current measurement value deviates from the compensation coil current setting value beyond the gain tolerance, the adaptive gain adjustment process is triggered: dynamically narrow or widen the digital phase-locked filter bandwidth, and fine-tune the zero bias compensation register threshold to ensure that the differential voltage signal remains stable in the subsequent integration cycle. Center.

[0057] If the accumulated energy is still observed to be unable to recover to the normal beat 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 into the non-volatile memory, and outputs a set of warning pulses with a specific duty cycle through an independent status pin to remind the maintenance personnel; at the same time, the derating mark is broadcast to the real-time drive voltage generation unit and the compensation coil current setting unit, so that the whole machine enters the degraded metering strategy to prevent the erroneous energy from being further accumulated. If the subsequent self-test confirms that the residual magnetic field and instantaneous current measurement values have been consistent with the compensation coil current setting value again, it means that the fault has been eliminated, and 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 the metering pulse output according to the meter constant, realizing seamless switching from abnormal to normal, and the continuity of the pulse count is completely retained through the internal timestamp chain table, providing an accurate basis for background data auditing.

[0058] 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 magnetic permeability of the core is 3000 at 25°C. The number of turns of the compensation coil is 200, the DC resistance is 1.2Ω, and the self-inductance is 4mH. The core temperature sensor reads 25°C at this moment. Vacuum magnetic 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.

[0059] The factory calibration curve gives the remanence density Br = 0.01 T at 25 °C. The inherent remanent magnetic flux . The additional magnetomotive force required to cancel this magnetic flux . The constant compensation current component Ir = –Fr / 200 ≈ –0.033 A.

[0060] The compensation coil current set value I_set = I_dyn + Ir ≈ –0.073 A.

[0061] The sampling period Δt = 100 μs, and the actual compensation current I_prev = –0.050 A was detected at the end of the previous period. The current increment target ΔI = I_set – I_prev ≈ –0.023 A. The feed-forward 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 into the pulse-width modulation register to trigger a pilot pulse with the full-bridge conduction direction the same as that of I_set.

[0062] During this period, the ADC continues to sample the compensation current and compare it with –0.073 A. Suppose the instantaneous deviation is –3 mA, which is amplified by the proportional link to form a –60 mV correction component; the integral link accumulates the small residuals of the previous several periods and then outputs –20 mV. The closed-loop correction voltage command V_pi = –0.060 – 0.020 = –0.080 V. The synthesized target drive voltage V_target = V_ff + V_pi ≈ –1.10 V, which is converted into a bipolar PWM output in real time to keep the coil current close to the set value.

[0063] The parallel voltage channel detects the external instantaneous voltage u = 230 V at this moment. The instantaneous active power p = u × = 230 × 8 = 1840 W. The integration window width Δt is also 100 μs; the power sample increment ε = p × Δt = 0.184 J. Suppose the meter constant is selected , corresponding to the energy per pulse Ep = . The pulse output unit accumulates ε into a rolling window; when the accumulated energy Σε first reaches 1.125 kJ, it triggers the sub-pulse mark. When the sub-pulse counts are combined into a complete pulse, it enters the next process.

[0064] After exactly reaching 1125J, the anti-shake logic locks for 5ms; then the sub-pulse count and the integration window are cleared. The isolation optocoupler outputs a standard metering pulse with a width of 20ms and a drive of 2mA. Enter the 10ms guard period. If the residual magnetic field drifts beyond ±2mV, immediately tighten the bandwidth of the digital phase-locked filter to 0.7 of the original setting and adjust the zero bias compensation threshold by 50µV. If the normal beat cannot be restored after 1000 consecutive integration windows, write the fault code 0x0B and alarm at 5Hz on the status pin; otherwise, automatically exit the guard and continue the next cycle of rolling integration.

[0065] Through the real-time calculation of this series of specific values, this example demonstrates the collaborative working mode of magnetic ring compensation, drive voltage prediction, proportional-integral correction, power double-threshold suppression, sub-pulse accumulation, and fault redundancy management in an actual single-phase energy meter, verifying the feasibility of the high-precision closed-loop control implemented by the proposed solution of the present invention under the condition of taking into account active power metering and hardware security.

[0066] Figure 2 Shows the experimental verification results of the magnetic flux control effect of the magnetic ring compensation structure of the present invention during operation. The abscissa in the figure represents the time axis, and the ordinate represents the magnetic flux value. The dotted curve represents the change of the uncompensated magnetic flux. It can be observed that this curve shows obvious fluctuation characteristics, and the magnetic flux value swings significantly within the positive and negative ranges, indicating that under the uncompensated state, the magnetomotive force generated by the load current will cause significant non-linear changes in the magnetic flux inside the magnetic ring. The solid curve represents the compensated magnetic flux after the action of the compensation coil current setting unit and the drive voltage real-time generation unit. This curve basically fluctuates within a small range near zero, fully proving that the reverse magnetomotive force generated by the compensation coil can effectively offset the influence of the load current, enabling the magnetic ring to always operate in a linear state close to zero magnetic flux. This experimental result verifies the effectiveness of the magnetic ring magnetic flux linearization control in the technical solution of the present invention.

[0067] Figure 3Shows the comparative experimental data on the influence of the temperature compensation mechanism on the measurement accuracy of the electricity meter. In the figure, the abscissa represents the ambient temperature in degrees Celsius, and the test temperature range is from 20°C to 80°C, covering the typical temperature change range of the actual working environment of the electricity meter. The ordinate represents the magnitude of the measurement error. The dashed curve shows the variation trend of the measurement error with temperature without temperature compensation. It can be seen that as the temperature increases, the measurement error shows a non-linear variation law of first increasing and then decreasing, which is due to the significant changes in the magnetic permeability and remanence characteristics of the magnetic core material with temperature. The solid curve represents the variation of the measurement error after temperature compensation. This curve remains within a very small value range near zero throughout the temperature range, and the fluctuation amplitude is much smaller than that in the uncompensated state. The experimental results show that by using the temperature sensor integrated in the compensation coil current setting unit to detect the magnetic core temperature in real time and dynamically correct the magnetic permeability and remanence density according to the factory calibration curve, the measurement accuracy stability of the electricity meter in a wide temperature range can be significantly improved.

[0068] Figure 4 Reflects the dynamic response characteristics of the drive voltage real-time generation unit for controlling the compensation coil current. In the figure, the abscissa represents the time series, and the ordinate represents the current value in the compensation coil. The dashed curve is the compensation coil current setting value calculated by the compensation coil current setting unit according to the uncompensated magnetic flux. This curve shows a step change characteristic, reflecting the rapid adjustment of the system's demand for compensation current when the load current changes. The solid curve represents the waveform of the compensation coil current actually output by the drive voltage real-time generation unit. It can be observed that the actual current can quickly track the change trend of the setting value. There is a short transient adjustment process during the step response, and then it stably converges to the set target value. This response characteristic reflects the effectiveness of the control strategy combining the feed-forward prediction process and the closed-loop proportional-integral regulation in the drive voltage real-time generation unit. The feed-forward link can quickly respond to large current change demands, while the closed-loop regulation eliminates the steady-state error to ensure that the compensation coil current precisely matches the setting value, thereby maintaining the linear working state of the magnetic ring magnetic flux.

[0069] Although the specific implementation manners of the present invention are described above, those skilled in the art should understand that these specific implementation manners are only examples. Without departing from the principles and essence of the present invention, those skilled in the art can make various omissions, substitutions, and changes to the details of the above methods and systems. For example, combining the above method steps so as to perform substantially the same function in a substantially same way to achieve substantially the same result belongs to the scope of the present invention. Therefore, the scope of the present invention is only defined by the appended claims.

Claims

1. A single-phase energy meter with a magnetic ring compensation structure, characterized in that, It includes: a notched magnetic ring modeling unit, a compensation coil current setting unit, a driving voltage real-time generating unit, and a pulse output unit; The notched magnetic ring modeling unit is configured to detect the instantaneous current of a single-phase line and regard the equivalent number of turns of the main conductor through which it passes as the magnetomotive force for excitation and input it to the notched magnetic ring; Subsequently, in combination with the magnetic ring parameters of the notched magnetic ring, calculate the corresponding uncompensated magnetic flux based on the permeability corrected by temperature. The compensation coil current setting unit is configured to determine the target compensation current for canceling the load magnetomotive force according to the uncompensated magnetic flux, in accordance with the principle of equivalent magnetomotive force conservation, and comprehensively considering the ratio of the equivalent number of turns of the main conductor to the number of turns of the compensation coil, and superimpose the temperature-related remanent magnetic flux cancellation amount to form a compensation coil current setting value for maintaining the near-zero magnetic flux working state. The driving voltage real-time generating unit is configured to calculate the required driving voltage in real time in each sampling period based on the DC resistance and self-inductance of the compensation coil, and inject a bidirectional current matching the compensation coil current setting value into the compensation coil by means of closed-loop current detection and proportional-integral regulation, so as to keep the magnetic ring magnetic flux linear under current transient and harmonic conditions. The pulse output unit is configured to obtain a differential voltage signal in real time through a closed-loop Hall sensor arranged at the notch; after removing the zero-point bias voltage, in combination with the magnetic ring geometric parameters and temperature-corrected permeability, invert the residual magnetic field into an instantaneous current measurement value; obtain the instantaneous active power based on the differential voltage signal and the instantaneous current measurement value and accumulate it within a fixed integration window to obtain the accumulated energy; when the accumulated energy reaches the threshold corresponding to the meter constant, trigger the output of a metering pulse.

2. The single-phase watt-hour 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 the closed magnetic circuit, and preset notch length.

3. The single-phase energy meter with a magnetic ring compensation structure according to claim 2, wherein 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 magnetomotive force value exerted by the load current on the magnetic ring at this moment; to cancel this magnetomotive force, generate a compensation magnetomotive force of the same magnitude but opposite in direction as a negative ampere-turn target value; read the number of turns of the compensation coil from the non-volatile memory, divide the negative ampere-turn target value by the number of turns of the compensation coil to obtain the dynamic current component for canceling the load current; synchronously read the latest temperature value of the magnetic core temperature sensor, and interpolate the remanent magnetic density of the magnetic core at this latest temperature value according to the factory calibration curve; multiply the remanent magnetic density by the effective cross-sectional area of the magnetic ring to obtain the inherent remanent magnetic flux; then divide the inherent remanent magnetic flux by the total magnetic resistance to obtain the additional magnetomotive force required to cancel the inherent remanent magnetism; divide the additional magnetomotive force by the number of turns of the compensation coil again to obtain the constant current component; directly add the dynamic current component and the constant current component according to their signs to form the compensation coil current setting value.

4. The single-phase electric energy meter with a magnetic ring compensation structure according to claim 3, characterized in that, The specific execution process of the driving voltage real-time generation unit includes: at the beginning of each sampling period, sequentially read the nominal values of the DC resistance and self-inductance of the compensation coil and their temperature drift coefficients, and combine the instantaneous temperature provided by the core temperature sensor to dynamically correct the nominal values of the DC resistance and self-inductance to form an equivalent resistance and equivalent inductance consistent with the environmental state; subsequently, start the feed-forward prediction process within the same sampling period, take the difference between the compensation coil current set value and the actual current detection value at the end of the previous sampling period to obtain the current increment target to be completed within the current sampling period; then, perform a parameter-free quantization estimation based on the inertia of the current change response of the equivalent inductance to generate a preliminary voltage prediction value, which is used to quickly cancel the influence of large-step or spike disturbances on the linearization of the magnetic ring magnetic flux; the preliminary voltage prediction value is immediately written into the pulse width modulation control register after being generated to drive the full-bridge power switch to turn on a pilot voltage pulse in the same direction as the trend of the compensation coil current set value.

5. The single-phase electric energy meter with a magnetic ring compensation structure as described in claim 4, characterized in that, After the driving voltage real-time generation unit completes the feed-forward prediction process, it 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 an analog-to-digital converter, and the sampling results are sent to the digital proportional-integral regulator at fixed time intervals within the same sampling period; the proportional-integral regulator first linearly amplifies the instantaneous deviation between the current sampling value and the compensation coil current set value using the proportional link to generate a fast correction component to suppress the small current swings caused by high-frequency noise and harmonic conditions; then, the continuous deviation is accumulated through the integral link to generate a slow-changing steady-state component, which is used to eliminate 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 by weight in the digital domain to obtain the closed-loop correction voltage command, and the closed-loop correction voltage command and the preliminary voltage prediction value generated by the feed-forward prediction process are vector synthesized to form the target driving voltage waveform covering the remaining time period of the entire sampling period. The target driving voltage waveform is real-time mapped into a bipolar pulse width modulation signal, which acts on the full-bridge power switch to achieve high-precision current injection into the compensation coil, thereby maintaining the linearization of the magnetic ring magnetic flux under current transient and harmonic conditions.

6. The single-phase energy meter with a magnetic ring compensation structure according to claim 5, characterized in that, The driving voltage real-time generation unit further includes an adaptive limiting and fault redundancy processing procedure, which includes: when it is detected that the compensated coil current has a transient overshoot exceeding the designed safety upper limit within any sampling period, the soft limiting logic is immediately triggered to proportionally compress the target driving voltage waveform to the safe range to prevent the compensated coil from overheating or the power switch tube from overcurrent; if it is detected that the compensated coil current cannot effectively track the compensated coil current set value within several consecutive sampling periods, it is determined that there may be a risk of hardware failure or magnetic core saturation. The driving voltage real-time generation unit immediately enters the fault redundancy processing procedure, maintains a minimum amplitude bidirectional current by turning off the full-bridge power switch tubes and starting the standby half-bridge path; at the same time, the driving voltage real-time generation unit sends a status word to the pulse output unit through an internal interrupt, indicating that the metering channel enters the derating mode, and writes the relevant fault information into the non-volatile memory for subsequent maintenance retrieval; when the fault is eliminated and the compensated coil current set value and the actual detected value are consistent again, the driving voltage real-time generation unit automatically exits the fault redundancy processing procedure and resumes the normal driving of the full-bridge power switch tubes.

7. The single-phase watt-hour meter with a magnetic ring compensation structure according to claim 6, characterized in that, The specific execution process of the pulse output unit includes: at the beginning of each sampling period, the zero bias voltage detection is performed on the differential voltage signal output by the closed-loop Hall sensor; the zero bias voltage detection obtains the current static unbalance amount by sampling multiple times within the reference window with the external load disconnected and calculating the average value; subsequently, the pulse output unit writes the static unbalance amount into the compensation register within the same sampling period as the reference for real-time elimination of the zero bias voltage; when the external load is reconnected, the closed-loop Hall sensor continuously outputs a new differential voltage signal, and the compensation register immediately performs a one-to-one cancellation process on it to ensure that there is no DC drift in the subsequent signal chain; the differential voltage signal after eliminating the zero bias voltage is sent to the dynamic digital phase-locked filter, and the dynamic digital phase-locked filter suppresses the radio frequency interference and power frequency stray components while maintaining phase synchronization, thereby outputting the representative amount of the residual magnetic field; the pulse output unit obtains the temperature-corrected magnetic permeability that matches according to the magnetic ring geometric parameters stored in the non-volatile memory and in combination with the real-time temperature fed back by the magnetic core temperature sensor, and inversely calculates the above residual magnetic field point by point into the instantaneous current measurement value.

8. The single-phase energy meter with a magnetic ring compensation structure according to claim 7, wherein, After the pulse output unit obtains the instantaneous current measurement value, it performs a vector multiplication with the external instantaneous voltage detection value synchronously sent by the voltage sampling channel to generate the instantaneous active power in the digital domain; the instantaneous active power is sent into 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 double-threshold suppression strategy during the integration process: firstly, when the instantaneous active power suddenly rises above the upper limit of the normal operating range, the upper limit threshold suppression logic is started to cut the excessive part to the upper limit boundary value; secondly, when the instantaneous active power short-time drops to near zero, the lower limit threshold suppression logic is started to merge the noise near zero to the zero axis. The power values after double-threshold suppression are continuously accumulated within a fixed integration window. The pulse output unit simultaneously monitors the ratio of this accumulated energy to the pre-stored meter constant. When the ratio exceeds the preset decimal resolution threshold, an internal high-precision timer records a sub-pulse mark for full pulse synthesis.

9. The single-phase watt-hour meter with a magnetic ring compensation structure as claimed in claim 8, 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, it calls the anti-shake delay logic to lock the metering channel within the minimum time resolution interval to prevent repeated triggering caused by sensor jitter or electromagnetic interference. Second, it clears the recorded sub-pulse marks and resets the fixed integration window to prepare for the next cycle. Subsequently, the pulse output unit drives the external metering interface through an isolation optocoupler to send standard-width pulses. Within the guard window after the pulse is sent, the pulse output unit continuously monitors the output of the closed-loop Hall sensor and the instantaneous current measurement value. If it detects residual magnetic field drift or a significant deviation between the instantaneous current measurement value and the compensation coil current set value, it triggers the adaptive gain adjustment process by dynamically modifying the digital phase-locked filter bandwidth and the zero-bias compensation register threshold to maintain the long-term stability of the differential voltage signal. If it still detects that the accumulated energy cannot return to the normal rhythm after several fixed integration windows, it is determined that the magnetic ring or sensor may be faulty. The pulse output unit immediately writes the fault code into the non-volatile memory and outputs a warning pulse through the status pin to alert the 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 metering pulse output according to the meter constant.

Citation Information

Patent Citations

  • Clamp-on ammeter

    CA1166698A

  • Closed loop current sensor

    CN105629047A

  • Dual-wire magnetic field cancellation-based zero-flux high-current detection method

    CN106443125A

  • Electric energy meter based on hall sensor

    CN205450108U

  • Closed Loop Current Transformer

    US20220334146A1

Cited By

  • Zero-flux-control iron core magnetic conductivity data analysis method and system

    CN121094344A

  • A zero-flux controlled core permeability data analysis method and system

    CN121094344B

  • Intelligent electric meter range calibration and error compensation method for nonlinear load

    CN121559424A