Self-adaptive calibration method, device and system applied to intelligent electric meter

By using an adaptive calibration method for smart meters, a three-dimensional magnetic field sensor is used to determine the level of magnetic field interference and switch calibration modes. This solves the problem of metering accuracy and efficiency in variable magnetic field environments, and achieves stable and efficient electricity metering.

CN121995299APending Publication Date: 2026-05-08MARKETING SERVICE CENT OF STATE GRID HEILONGJIANG ELECTRIC POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
MARKETING SERVICE CENT OF STATE GRID HEILONGJIANG ELECTRIC POWER CO LTD
Filing Date
2026-02-12
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing electricity meters cannot adaptively adjust their calibration modes when faced with varying magnetic field environments, resulting in an imbalance between metering accuracy and efficiency. This is especially true in environments with high magnetic field interference where metering deviations are large, or in environments with low magnetic field interference where the computational load increases.

Method used

A three-dimensional magnetic field sensor collects environmental magnetic field data, determines the level of magnetic field interference, and switches to the corresponding calibration mode, including no interference, low interference, and high interference calibration modes. The least squares fitting method and waveform correction method are used for calibration respectively to ensure measurement accuracy and efficiency.

Benefits of technology

It achieves metering stability and accuracy in complex magnetic field environments, reduces the impact of external magnetic fields on metering, and balances metering accuracy and operating efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121995299A_ABST
    Figure CN121995299A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive calibration method applied to an intelligent electric meter, and the method comprises the steps: collecting environment magnetic field data of the electric meter, and determining a magnetic field interference level based on the environment magnetic field data; and the calibration mode of the corresponding magnetic field grade is switched based on the magnetic field interference grade so as to adapt to a variable application environment, reduce the influence of the external magnetic field on the metering of the electricity meter, consider the metering precision and the operation efficiency, and avoid adopting a complex algorithm to calibrate under the condition that the influence of the external magnetic field is relatively small. The method comprises the following steps: S1, initializing an intelligent electric meter, acquiring metering data, and storing a standard waveform sequence, an initial metering parameter, standard power and a preset fitting coefficient; s2, acquiring and storing magnetic field data through a three-dimensional magnetic field sensor, and determining a magnetic field interference level based on the magnetic field data; s3, switching to a corresponding calibration mode according to the determined magnetic field interference level; and S4, collecting data and calculating electric energy according to the switched calibration mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart meter technology, and in particular to an adaptive calibration method, apparatus and system for smart meters. Background Technology

[0002] As the core device for measuring electricity consumption, the accuracy of electricity meters directly affects the interests of both electricity suppliers and consumers; therefore, meter calibration is crucial. Current meter calibration methods mostly focus on the factory stage, using a standard signal source to perform static calibration, determining fixed calibration parameters, and completing initialization. After installation, no further dynamic calibration or adjustment is performed.

[0003] However, electricity meter installation scenarios are complex and diverse. The installation location may be near or have newly added strong magnetic devices such as transformers, motors, and induction cookers. The ambient magnetic fields generated by these devices can interfere with the current sampling process of the electricity meter, leading to increased energy measurement errors. Furthermore, the degree of interference from different intensities of ambient magnetic fields varies, and a single calibration mode cannot adapt to different magnetic field interference scenarios: if only a calibration method for low-intensity magnetic field interference is used, insufficient calibration accuracy will lead to excessive measurement deviations in high-intensity magnetic field interference environments; if a complex calibration method for high-intensity magnetic field interference is used long-term, it will increase the meter's computational load in environments with no or low magnetic field interference, reduce the metering response speed, and waste hardware resources.

[0004] Therefore, there is an urgent need for a meter calibration method that can adaptively switch calibration modes based on the real-time ambient magnetic field strength, so as to balance the metering accuracy and equipment operating efficiency under different interference scenarios. Summary of the Invention

[0005] This invention provides an adaptive calibration method, device, and system for smart meters, which solves the technical problem in the prior art that the meter cannot adjust the calibration mode to match the ambient magnetic field in order to accurately measure electrical energy.

[0006] This invention provides an adaptive calibration method for smart meters, the method comprising:

[0007] Step S1: Initialize the smart meter, collect metering data, and store the standard waveform sequence, initial metering parameters, standard power, and preset fitting coefficients;

[0008] Step S2: Collect and store magnetic field data using a three-dimensional magnetic field sensor, and determine the magnetic field interference level based on the magnetic field data;

[0009] Step S3: Based on the determined magnetic field interference level, switch to the corresponding calibration mode;

[0010] Step S4: Collect data and calculate electrical energy according to the switched calibration mode.

[0011] Optionally, step S1 includes:

[0012] Step S1.1: Connect the smart meter to the calibration system, which provides a non-magnetic environment and applies an external standard magnetic field environment;

[0013] Step S1.2: In a non-magnetic environment, collect the standard voltage U0, standard current I0 of the standard signal source output signal in the calibration system, as well as the voltage sampling value U_samp and current sampling value I_samp of the smart meter;

[0014] Step S1.3: Store the standard waveform corresponding to the acquired standard signal source output signal;

[0015] Step S1.4: Using the standard voltage U0 and standard current I0 of the standard signal source output signal as a reference, and the voltage sampling value U_samp and current sampling value I_samp of the smart meter as the measured values, the voltage sampling coefficient K1 and current sampling coefficient K2 are fitted using the least squares method and stored in the smart meter;

[0016] Step S1.5: Calculate and store the initial power error ΔP0 and the standard power P2;

[0017] Step S1.6: Under the applied external standard magnetic field environment, the smart meter is tested. The actual power error ΔP1 is recorded by a high-precision error tester. The collected data is fitted with a third-order polynomial using the least squares method to obtain the preset fitting coefficients a0, a1, a2, and a3 and store them.

[0018] Optionally, step S2 includes:

[0019] Step S2.1: Collect magnetic field data using a three-dimensional magnetic field sensor at preset intervals. The magnetic field data includes the magnetic field strengths Bx, By, and Bz of the X, Y, and Z axes.

[0020] Step S2.2: Preprocess the collected magnetic field data, remove abnormal data, and calculate the average magnetic field strengths Bx1, By1, and Bz1 of the three-axis components;

[0021] Step S2.3: Calculate the resultant magnetic field strength B, magnetic field azimuth θ, and magnetic field elevation φ; calculate and store the weighted resultant magnetic field strength Bw, using the following formulas respectively:

[0022] ;

[0023] ;

[0024] ;

[0025] ;

[0026] Wherein, Bx1 is the effective average magnetic field strength of the X-axis component, By1 is the effective average magnetic field strength of the Y-axis component, Bz1 is the effective average magnetic field strength of the Z-axis component, B is the resultant magnetic field strength, θ is the magnetic field azimuth angle, φ is the magnetic field pitch angle, and w1, w2, and w3 are weighting parameters.

[0027] Step S2.4: Compare the weighted magnetic field resultant intensity Bw with the interference threshold to determine the magnetic field interference level as no magnetic field interference level, low magnetic field interference level, or high magnetic field interference level.

[0028] Optionally, step S1.4 includes:

[0029] Using the standard voltage U0 and standard current I0 of the standard signal as references, and the voltage sampling value U_samp and current sampling value I_samp of the meter to be calibrated as measured values, the least squares method is used to fit the voltage sampling coefficient K1 and the current sampling coefficient K2. The fitting objective is to make the voltage sampling coefficient K1 and the current sampling coefficient K2 fit to the standard voltage sampling coefficient K0 and the current sampling coefficient K2. Minimum The minimum fitting formula is as follows:

[0030]

[0031]

[0032] Where n is the number of sampling points, i is the sampling point number, U_samp(i) and I_samp(i) are the voltage and current sampling values ​​at the i-th point of the meter, and U0(i) and I0(i) are the standard voltage and standard current values ​​at the i-th point of the standard signal.

[0033] Optionally, step S1.5 includes:

[0034] The formula for calculating the initial power error ΔP0 is as follows:

[0035] ;

[0036] Where P1 is the power measured by the electricity meter, and P2 is the standard power; the calculation formulas for P1 and P2 are as follows:

[0037] P1= ;

[0038] ;

[0039] Where cosφ0 is the standard signal power factor, cosφ is the reference power factor, and cosφ is calculated as follows:

[0040] Collect voltage sample value sequences U_samp(k) and current sample value sequences I_samp(k) within one frequency cycle. Calculate the average values ​​U_samp_avg of the voltage sample sequence and I_samp_avg of the current sample sequence. Calculate their covariance Cov(U_samp,I_samp), the standard deviation σU_samp of the voltage sample sequence, and the standard deviation σI_samp of the current sample sequence. The calculation formulas are as follows:

[0041] ;

[0042] ;

[0043] ;

[0044] Where n is the number of sampling points in one frequency period, and k is the sampling point number;

[0045] The phase difference Δφ is calculated using the following formula:

[0046] ;

[0047] The reference power factor cosφ is calculated using the following formula:

[0048]

[0049] Specifically, step S3 is as follows:

[0050] The calibration modes include interference-free calibration mode, low-interference calibration mode, and high-interference calibration mode.

[0051] When the magnetic field interference level is the no magnetic field interference level, the calibration mode is switched to the no-magnetic-field interference calibration mode;

[0052] When the magnetic field interference level is low, the calibration mode is switched to the low interference calibration mode.

[0053] When the magnetic field interference level is high, the calibration mode will be switched to the high interference calibration mode.

[0054] Optionally, step S4 includes:

[0055] When the calibration mode is the interference-free calibration mode, the sampling module collects real-time voltage and real-time current, calculates real-time power, and calculates electrical energy based on real-time power.

[0056] When the calibration mode is the low-interference calibration mode, real-time voltage Ua and real-time current Ia are collected, and the uncalibrated power P0 is calculated. The formula for calculating the uncalibrated power P0 is as follows:

[0057]

[0058] Where K1 is the voltage sampling coefficient, K2 is the current sampling coefficient, and cosφ1 is the real-time power factor;

[0059] Extract the initial power error ΔP0; acquire the real-time power grid frequency f, and calculate the real-time angular frequency ω. The formula for calculating the real-time angular frequency ω is as follows:

[0060]

[0061] The fitting power error ΔP1 is calculated based on a third-order fitting model, using the following formula:

[0062]

[0063] in, , , , These are the preset fitting coefficients;

[0064] The total power error ΔP is calculated using the following formula:

[0065]

[0066] The real-time power P1 after calibration is calculated using the following formula:

[0067]

[0068] The formula for calculating electrical energy E1 is as follows:

[0069]

[0070] When the calibration mode is the high-interference calibration mode, the current sampling module acquires the real-time current signal at a frequency of 10kHz, obtains the sampling sequence Is(k) within one frequency period, and extracts the waveform sequence of the standard waveform stored in step S1.3; determines whether the waveform is distorted; if the waveform is distorted, it performs correction and calculates the electrical energy; if the waveform is not distorted, it calculates the electrical energy in the non-interference calibration mode.

[0071] Optionally, the step of performing correction and calculating electrical energy if the waveform is distorted specifically involves:

[0072] Using one frequency cycle as a window, Is(k) is divided into continuous windows, each containing m points. The effective value of the current I_rms and the effective value of the standard waveform I_st_rms in the current window are calculated using the following formula:

[0073]

[0074]

[0075] Where m is the number of sampling points and k is the sampling point number. The sampled current value at point k;

[0076] The adjusted reference waveform Iref(k) is obtained by adjusting the reference waveform, and the calculation formula is as follows:

[0077]

[0078] Calculate the difference ΔI(k) between each sampling point and the reference waveform. The calculation formula is as follows:

[0079]

[0080] If ΔI(k) > ε×In, then linear interpolation of adjacent undistorted points is used for correction to obtain the corrected data Is'(k). The correction calculation formula is as follows:

[0081]

[0082] If ΔI(k) ≤ ε×In, then no linear interpolation correction is performed between adjacent non-distortion points, and the corrected data is Is'(k) = Is(k); synthesize the corrected waveform to obtain the corrected sequence Is'(k), and calculate the corrected effective current value Ical using the following formula:

[0083]

[0084] Obtain the voltage sampling sequence and calculate the effective voltage value Ucal using the following formula:

[0085]

[0086] Calculate the real-time power factor cosφ2; calculate the calibrated power P2 using the following formula:

[0087]

[0088] Where cosφ2 is the real-time power factor;

[0089] The formula for calculating electrical energy E2 is as follows:

[0090]

[0091] The present invention also provides a smart meter device, comprising:

[0092] The initialization module is used to initialize the smart meter, collect metering data, and store standard waveform sequences, initial metering parameters, standard power, and preset fitting coefficients.

[0093] The interference level assessment module is used to collect and store magnetic field data through a three-dimensional magnetic field sensor, and determine the magnetic field interference level based on the magnetic field data.

[0094] The calibration mode switching module is used to switch to the corresponding calibration mode according to the determined magnetic field interference level.

[0095] The power calculation module is used to collect data and calculate power according to the switched calibration mode.

[0096] The present invention also provides a smart meter system, comprising:

[0097] Memory, used to store computer programs;

[0098] A processor for implementing the adaptive calibration method as described above when executing the computer program.

[0099] This invention provides an adaptive calibration method for smart meters. The method collects environmental magnetic field data from the meter, determines the magnetic field interference level based on this data, and switches the calibration mode corresponding to the interference level. This adapts to varying application environments, reduces the impact of external magnetic fields on meter readings, and balances measurement accuracy and operational efficiency, avoiding the use of complex algorithms for calibration when the external magnetic field influence is minimal. Furthermore, when determining the magnetic field interference level, this invention considers the influence of the magnetic field direction on the meter; for low interference levels, a power error fitting method with higher computational speed is used for calibration, while for high interference levels, a waveform correction method with higher accuracy is used, significantly improving the metering stability and accuracy in complex magnetic field environments. Attached Figure Description

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

[0101] Figure 1 This is a flowchart illustrating the steps of an adaptive calibration method for smart meters. Detailed Implementation

[0102] This invention provides an adaptive calibration method, apparatus, and system for smart meters, which solves or partially solves the technical problem of the imbalance between metering accuracy and metering efficiency caused by the single calibration mode in current smart meters.

[0103] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0104] As an example, with the widespread application of smart meters, more and more smart meters are being used in various fields to intelligently collect electricity data, greatly improving the accuracy of data collection. However, with the continuous improvement of infrastructure, the complexity of the electricity environment has also increased significantly. Strong magnetic devices, such as transformers and motors, may be present in the vicinity of common locations. On the other hand, with the rapid development of the community economy, the number of high-power electrical appliances in the community has also increased dramatically, such as induction cookers. Therefore, traditional smart meters can no longer meet the needs of the changing electricity environment.

[0105] In a typical scenario, smart meters installed in residential communities do not consider the impact of magnetic field environment on electricity metering, and are only calibrated for factors such as temperature drift and equipment aging. However, as the community's electricity consumption increases, a small substation is built not far from the smart meter, causing changes in the ambient magnetic field of the smart meter. Although the smart meter is equipped with a shielding shell, when the magnetic field strength exceeds a certain level, it will still affect electricity metering.

[0106] Therefore, there is an urgent need for a calibration method that can analyze the magnetic field environment and switch appropriate calibration modes based on the magnetic field data, so as to balance metrological accuracy and metrological efficiency.

[0107] The following is a detailed description of one embodiment of the present invention. (Refer to...) Figure 1 The diagram illustrates a flowchart of an adaptive calibration method for smart meters provided by an embodiment of the present invention, specifically including the following steps:

[0108] Step S1: Initialize the smart meter, collect metering data, and store the standard waveform sequence, initial metering parameters, standard power, and preset fitting coefficients;

[0109] For example, smart meters need to be initialized after leaving the factory or before formal installation. On the one hand, this allows for qualification testing of the smart meter; on the other hand, since smart meters typically have built-in memory and microprocessors, and are equipped with calibration systems, their calibration algorithms need to be stored, and some fixed parameters in the algorithms need to be set so that they can be directly called in subsequent use.

[0110] Step S2: Collect and store magnetic field data using a three-dimensional magnetic field sensor, and determine the magnetic field interference level based on the magnetic field data;

[0111] Because the smart meter of this invention needs to adaptively switch calibration modes based on the monitored ambient magnetic field strength, it integrates a three-dimensional magnetic field sensor. This sensor can collect ambient magnetic field data, including but not limited to magnetic field strength and direction. Based on the magnetic field data collected by the three-dimensional magnetic field sensor, the level of magnetic field interference in the surrounding environment can be determined. Data collection can be performed at fixed time intervals, at fixed time intervals, or continuously. When the collected magnetic field changes exceed a certain threshold, the level of magnetic field interference is analyzed.

[0112] In one embodiment, the magnetic field interference level can be classified into a no-magnetic-field interference level, a low-magnetic-field interference level, or a high-magnetic-field interference level based on the calculated weighted magnetic field strength. Of course, those skilled in the art will understand that the magnetic field interference level is not limited to this; the interference level and the required magnetic field conditions for each level can be further subdivided according to actual needs.

[0113] Step S3: Based on the determined magnetic field interference level, switch to the corresponding calibration mode;

[0114] This invention integrates multiple calibration modes into the smart meter to cope with complex magnetic field environments. Different calibration modes are activated for different magnetic field environments, balancing the meter's measurement accuracy and efficiency. In the absence of magnetic field interference, the meter switches to an interference-free calibration mode, calculating energy based on real-time power. In the presence of low magnetic field interference, the meter switches to a low-interference calibration mode, specifically employing a power error fitting method for calibration. This method offers high calculation speed and sufficient measurement accuracy even in weak magnetic fields. In the presence of high magnetic field interference, the meter switches to a high-interference calibration mode, specifically employing a waveform correction method for calibration. This method offers high measurement accuracy and strong resistance to magnetic fields, maintaining high measurement accuracy and precision even under strong magnetic field interference.

[0115] Step S4: Collect data and calculate electrical energy according to the switched calibration mode.

[0116] After switching calibration modes, smart meters call the corresponding calibration mode, collect the necessary data, and accurately measure the consumed electricity.

[0117] Further, in one embodiment, step S1 includes:

[0118] Step S1.1: Connect the smart meter to the calibration system, which provides a non-magnetic environment and applies an external standard magnetic field environment;

[0119] It is understandable that the initialization of smart meters needs to be carried out in an experimental or ideal environment. In this invention, the smart meter is connected to a calibration system, which has a magnetic field shielding box and an external standard magnetic field environment simulation system, which can ensure that the smart meter is initialized in the required environment.

[0120] Step S1.2: In a non-magnetic environment, collect the standard voltage U0, standard current I0 of the standard signal source output signal in the calibration system, as well as the voltage sampling value U_samp and current sampling value I_samp of the smart meter;

[0121] Specifically, the smart meter is connected to the calibration system and then to a standard signal source. The standard signal source can input the required standard voltage U0 and standard current I0 to the smart meter as needed. For example, when the smart meter is mainly installed in an industrial environment, the standard signal source can output the following electrical signals: U0 amplitude range of 380V±10%, I0 is the meter's rated current In, frequency of 50Hz±0.5Hz, signal is a sine wave, and harmonic content ≤0.1%. After the standard signal source outputs the electrical signal, the standard voltage U0 and standard current I0 at the output terminal of the standard signal source are collected by the acquisition device, and the voltage sampling value U_samp and current sampling value I_samp at the output interface of the smart meter are also collected.

[0122] Step S1.3: Store the standard waveform corresponding to the acquired standard signal source output signal;

[0123] When the magnetic field interference level is high, the smart meter of the present invention switches to the waveform correction method for calibration. This calibration method requires comparing the waveform of the sampled signal with that of the standard signal. Therefore, the smart meter needs to collect the output signal of the standard signal source and store the corresponding standard waveform for later use.

[0124] Step S1.4: Using the standard voltage U0 and standard current I0 of the standard signal source output signal as a reference, and the voltage sampling value U_samp and current sampling value I_samp of the smart meter as the measured values, the voltage sampling coefficient K1 and current sampling coefficient K2 are fitted using the least squares method and stored in the smart meter;

[0125] Due to the complex internal structure of smart meters, inherent hardware deviations in various modules and circuits can lead to inaccurate metering. Therefore, smart meters must undergo initial calibration under standard conditions before use to ensure that the initial metering error meets requirements. This invention connects the smart meter to a calibration system, providing it with a standard signal input. Based on this, multiple measurements are performed, collecting the voltage sample value U_samp and current sample value I_samp from the smart meter during the measurement process. The least squares method is used to fit the voltage sampling coefficient K1 and the current sampling coefficient K2, thereby compensating for the inherent hardware deviations of the smart meter and ensuring the accuracy of the basic metering data.

[0126] Step S1.5: Calculate and store the initial power error ΔP0 and the standard power P2;

[0127] The smart meter of this invention integrates multiple calibration modes. Therefore, during the initialization phase, the initial power error ΔP0 and standard power P2 need to be calculated in advance so that the corresponding calibration mode can be directly obtained when invoked, thereby improving calibration efficiency. The initial power error ΔP0 is the inherent power error under a non-magnetic environment and serves as the basis for error correction in the low-interference calibration mode; the standard power P2 is calculated from the standard voltage U0 and the standard current I0 and serves as the benchmark for judging calibration accuracy.

[0128] Step S1.6: Under the applied external standard magnetic field environment, the smart meter is tested. The actual power error ΔP1 is recorded by a high-precision error tester. The collected data is fitted with a third-order polynomial using the least squares method to obtain the preset fitting coefficients a0, a1, a2, and a3 and store them.

[0129] In one embodiment, the low-interference calibration mode of the present invention employs a power error fitting method for calibration. This calibration mode requires algorithm fitting. Under an external standard magnetic field environment, the smart meter is tested, multiple sets of data are collected, and the least squares method is used to fit a third-order polynomial to obtain fitting coefficients a0, a1, a2, and a3. It is understood that the third-order polynomial is the fitting model adopted in this embodiment, but it is not limited to this.

[0130] Specifically, the fitting process is as follows: data is collected and preprocessed to remove extreme outliers, and a fitting model is constructed. Where ΔP1 is the actual power error, ω is the angular frequency, and a0, a1, a2, and a3 are preset fitting coefficients. The method of "group averaging + substitution" is used, where multiple sets of data are grouped according to ω. The average value of ω and the average value of ΔP1 are calculated for each group, and these are substituted into the fitting model to obtain a0, a1, a2, and a3. In this embodiment, it is preferable to divide the data into 4 groups to improve the efficiency of solving for the fitting coefficients.

[0131] When the smart meter of the present invention detects a significant change in the magnetic field or meets preset conditions, it adaptively switches to the corresponding calibration mode. Therefore, in order to ensure the metering accuracy of the smart meter, a calibration algorithm and some fixed parameters are stored in the smart meter so that the electrical energy can be quickly metered when switching to the corresponding calibration mode.

[0132] As described above, in this embodiment, the smart meter initialization phase requires storing at least a standard waveform sequence, initial metering parameters, standard power, and preset fitting coefficients. Specifically, the standard waveform sequence refers to the standard waveform corresponding to the output signal of the standard signal source and its corresponding waveform sequence; the initial metering parameters include the voltage sampling coefficient K1, the current sampling coefficient K2, and the initial power error ΔP0; the standard power includes the standard power P2 calculated from the standard voltage U0 and the standard current I0; the preset fitting coefficients include preset fitting coefficients a0, a1, a2, and a3 obtained by fitting a third-order polynomial using the least squares method. Of course, the stored data is not limited to this, and also includes parameters such as the interference threshold and the standard signal power factor cosφ0 used for subsequent magnetic field interference level judgment.

[0133] Further, in one embodiment, step S2 includes:

[0134] Step S2.1: Collect magnetic field data using a three-dimensional magnetic field sensor at preset intervals. The magnetic field data includes the magnetic field strengths Bx, By, and Bz of the X, Y, and Z axes.

[0135] Step S2.2: Preprocess the collected magnetic field data, remove abnormal data, and calculate the average magnetic field strengths Bx1, By1, and Bz1 of the three-axis components;

[0136] Step S2.3: Calculate the resultant magnetic field strength B, magnetic field azimuth θ, and magnetic field elevation φ; calculate and store the weighted resultant magnetic field strength Bw, using the following formulas respectively:

[0137] ;

[0138] ;

[0139] ;

[0140] ;

[0141] Wherein, Bx1 is the effective average magnetic field strength of the X-axis component, By1 is the effective average magnetic field strength of the Y-axis component, Bz1 is the effective average magnetic field strength of the Z-axis component, B is the resultant magnetic field strength, θ is the magnetic field azimuth angle, φ is the magnetic field pitch angle, and w1, w2, and w3 are weighting parameters.

[0142] Step S2.4: Compare the weighted magnetic field resultant intensity Bw with the interference threshold to determine the magnetic field interference level as no magnetic field interference level, low magnetic field interference level, or high magnetic field interference level.

[0143] Because magnetic fields are directional, and directionality is crucial for magnetic fields, this embodiment considers not only the magnetic field strength but also its directionality when assessing the impact of magnetic fields on smart meters. This improves the accuracy of judging the impact of magnetic fields on smart meters. In this embodiment, a three-dimensional magnetic field sensor collects the three-axis components of the magnetic field strength Bx, By, and Bz. The collected magnetic field strengths are preprocessed to remove outlier data, and the average values ​​Bx1, By1, and Bz1 of the three-axis components are calculated. The average values ​​can be calculated using the following formula: Similarly, By1 and Bz1 are calculated based on the average values ​​of the three-axis components. The resultant magnetic field strength B, magnetic field azimuth θ, and magnetic field pitch angle φ are calculated. Since the three axes of the magnetic field are heavily influenced by each other, the X-axis magnetic field (axial direction of the current sampling coil) has the most significant impact on sampling accuracy, followed by the Y-axis, and the Z-axis has the least. Therefore, when calculating the weighted resultant magnetic field strength Bw, directional weighting coefficients w1, w2, and w3 are introduced. These weighting coefficients can be determined through statistical analysis during factory testing or by analyzing historical data from multiple smart meters, and can be adjusted according to the meter structure. The smart meter stores interference thresholds. In one embodiment, these interference thresholds include a first interference threshold and a second interference threshold. When the weighted resultant magnetic field strength Bw is less than the first interference threshold, the magnetic field interference level is determined to be no magnetic field interference. When the weighted resultant magnetic field strength Bw is greater than the first interference threshold but less than the second interference threshold, the magnetic field interference level is determined to be low magnetic field interference. When the weighted resultant magnetic field strength Bw is greater than the second interference threshold, the magnetic field interference level is determined to be high magnetic field interference. This invention significantly improves the accuracy of calibration mode switching by calculating the weighted magnetic field resultant intensity Bw and considering both magnetic field strength and direction.

[0144] As an example, in one embodiment, the preferred X-axis weight w1=0.6, Y-axis weight w2=0.3, Z-axis weight w3=0.1, the first interference threshold is 50μT, and the second interference threshold is 200μT. By setting these weights and thresholds, the calculated weighted magnetic field strength Bw, combined with the interference level divided by the interference threshold, can more accurately and efficiently switch the calibration mode of the smart meter.

[0145] Further, in one embodiment, step S1.4 includes:

[0146] Using the standard voltage U0 and standard current I0 of the standard signal as references, and the voltage sampling value U_samp and current sampling value I_samp of the meter to be calibrated as measured values, the least squares method is used to fit the voltage sampling coefficient K1 and the current sampling coefficient K2. The fitting objective is to make the voltage sampling coefficient K1 and the current sampling coefficient K2 fit to the standard voltage sampling coefficient K0 and the current sampling coefficient K2. Minimum The minimum fitting formula is as follows:

[0147]

[0148]

[0149] Where n is the number of sampling points, i is the sampling point number, U_samp(i) and I_samp(i) are the voltage and current sampling values ​​at the i-th point of the meter, and U0(i) and I0(i) are the standard voltage and standard current values ​​at the i-th point of the standard signal. By sampling multiple sets of data, the voltage sampling coefficient K1 and the current sampling coefficient K2 are fitted to obtain the optimal voltage sampling coefficient K1 and current sampling coefficient K2.

[0150] Further, in one embodiment, step S1.5 includes:

[0151] The formula for calculating the initial power error ΔP0 is as follows:

[0152] ;

[0153] Where P1 is the power measured by the electricity meter, and P2 is the standard power; the calculation formulas for P1 and P2 are as follows:

[0154] P1= ;

[0155] ;

[0156] Wherein, cosφ0 is the standard signal power factor, determined by the parameters of the standard signal source, with a default value of 0.95, which can be adjusted as needed; cosφ is the reference power factor, calculated as follows:

[0157] Collect voltage sample value sequences U_samp(k) and current sample value sequences I_samp(k) within one frequency cycle. Calculate the average values ​​U_samp_avg of the voltage sample sequence and I_samp_avg of the current sample sequence. Calculate their covariance Cov(U_samp,I_samp), the standard deviation σU_samp of the voltage sample sequence, and the standard deviation σI_samp of the current sample sequence. The calculation formulas are as follows:

[0158] ;

[0159] ;

[0160] ;

[0161] Where n is the number of sampling points in one frequency period, and k is the sampling point number;

[0162] The phase difference Δφ is calculated using the following formula:

[0163] ;

[0164] The reference power factor cosφ is calculated using the following formula:

[0165]

[0166] In this embodiment, the metering power P1 is calculated by calculating the reference power factor cosφ, so as to accurately obtain the initial power error ΔP0, which can improve the efficiency of subsequent calculations.

[0167] Furthermore, in one embodiment, step S3 specifically includes:

[0168] The calibration modes include interference-free calibration mode, low-interference calibration mode, and high-interference calibration mode.

[0169] When the magnetic field interference level is the no magnetic field interference level, the calibration mode is switched to the no-magnetic-field interference calibration mode;

[0170] When the magnetic field interference level is low, the calibration mode is switched to the low interference calibration mode.

[0171] When the magnetic field interference level is high, the calibration mode will be switched to the high interference calibration mode.

[0172] In this embodiment, the magnetic field interference levels are categorized so that the smart meter can adaptively switch calibration modes. The categorization of magnetic field interference levels, as well as the number and types of calibration modes, can be adjusted as needed and are not limited to this.

[0173] Further, in one embodiment, step S4 includes:

[0174] When the calibration mode is the interference-free calibration mode, the sampling module collects real-time voltage and real-time current, calculates real-time power, and calculates electrical energy based on the real-time power. Specifically, the real-time voltage U and real-time current I are collected, and combined with K1 and K2 mentioned above, the real-time power P = U × K1 × I × K2 × cosφ is calculated. Integrating the real-time power yields the metered electrical energy. In the above formula, cosφ is the real-time power factor, and its calculation method is the same as that of the reference power factor calculation method in step S1.5, and will not be repeated here.

[0175] When the calibration mode is the low-interference calibration mode, real-time voltage Ua and real-time current Ia are collected, and the uncalibrated power P0 is calculated. The formula for calculating the uncalibrated power P0 is as follows:

[0176]

[0177] Where K1 is the voltage sampling coefficient, K2 is the current sampling coefficient, and cosφ1 is the real-time power factor. Its calculation method is the same as that of the reference power factor in step S1.5, and will not be repeated here.

[0178] Extract the initial power error ΔP0; acquire the real-time power grid frequency f, and calculate the real-time angular frequency ω. The formula for calculating the real-time angular frequency ω is as follows:

[0179]

[0180] The fitting power error ΔP1 is calculated based on a third-order fitting model, using the following formula:

[0181]

[0182] in, , , , These are the preset fitting coefficients;

[0183] The total power error ΔP is calculated using the following formula:

[0184]

[0185] The real-time power P1 after calibration is calculated using the following formula:

[0186]

[0187] The formula for calculating electrical energy E1 is as follows:

[0188]

[0189] Where t is the measurement duration.

[0190] When the calibration mode is the high-interference calibration mode, the current sampling module acquires the real-time current signal at a frequency of 10kHz, obtains the sampling sequence Is(k) within one frequency period, and extracts the waveform sequence of the standard waveform stored in step S1.3; determines whether the waveform is distorted; if the waveform is distorted, it performs correction and calculates the electrical energy; if the waveform is not distorted, it calculates the electrical energy in the non-interference calibration mode.

[0191] Furthermore, in one embodiment, the above-mentioned correction if the waveform is distorted, and the calculation of electrical energy, specifically involves:

[0192] Using one frequency cycle as a window, Is(k) is divided into continuous windows, each containing m points. The effective value of the current I_rms and the effective value of the standard waveform I_st_rms in the current window are calculated using the following formula:

[0193]

[0194]

[0195] Where m is the number of sampling points and k is the sampling point number. The sampled current value at point k;

[0196] The adjusted reference waveform Iref(k) is obtained by adjusting the reference waveform, and the calculation formula is as follows:

[0197]

[0198] Calculate the difference ΔI(k) between each sampling point and the reference waveform. The calculation formula is as follows:

[0199]

[0200] If ΔI(k) > ε×In, then linear interpolation of adjacent undistorted points is used for correction to obtain the corrected data Is'(k). The correction calculation formula is as follows:

[0201]

[0202] Wherein, if k=1 is distorted, take k=k+1 as the adjacent point, Is'(k)=Is(k+1); if k=m is distorted, take k=m-1 as the adjacent point, Is'(k)=Is(k-1)).

[0203] If ΔI(k) ≤ ε×In, then no linear interpolation correction is performed between adjacent non-distortion points, and the corrected data is Is'(k) = Is(k); synthesize the corrected waveform to obtain the corrected sequence Is'(k), and calculate the corrected effective current value Ical using the following formula:

[0204]

[0205] Obtain the voltage sampling sequence and calculate the effective voltage value Ucal using the following formula:

[0206]

[0207] Calculate the real-time power factor cosφ2; calculate the calibrated power P2 using the following formula:

[0208]

[0209] Where cosφ2 is the real-time power factor;

[0210] The formula for calculating electrical energy E2 is as follows:

[0211]

[0212] By setting three calibration modes, the smart meter can adaptively switch to the corresponding calibration mode after calibrating the magnetic field strength, enabling more accurate and efficient electricity metering.

[0213] The present invention also provides a smart meter device, comprising:

[0214] The initialization module is used to initialize the smart meter, collect metering data, and store standard waveform sequences, initial metering parameters, standard power, and preset fitting coefficients.

[0215] The interference level assessment module is used to collect and store magnetic field data through a three-dimensional magnetic field sensor, and determine the magnetic field interference level based on the magnetic field data.

[0216] The calibration mode switching module is used to switch to the corresponding calibration mode according to the determined magnetic field interference level.

[0217] The power calculation module is used to collect data and calculate power according to the switched calibration mode.

[0218] The present invention also provides a smart meter system, comprising:

[0219] Memory, used to store computer programs;

[0220] A processor for implementing the adaptive calibration method as described above when executing the computer program.

[0221] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working principles and workflows of the devices and systems described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0222] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and system can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0223] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0224] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0225] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An adaptive calibration method for smart meters, characterized in that, include: Step S1: Initialize the smart meter, collect metering data, and store the standard waveform sequence, initial metering parameters, standard power, and preset fitting coefficients; Step S2: Collect and store magnetic field data using a three-dimensional magnetic field sensor, and determine the magnetic field interference level based on the magnetic field data; Step S3: Based on the determined magnetic field interference level, switch to the corresponding calibration mode; Step S4: Collect data and calculate electrical energy according to the switched calibration mode.

2. The adaptive calibration method according to claim 1, characterized in that, Step S1 includes: Step S1.1: Connect the smart meter to the calibration system, which provides a non-magnetic environment and applies an external standard magnetic field environment; Step S1.2: In a non-magnetic environment, collect the standard voltage U0, standard current I0 of the standard signal source output signal in the calibration system, as well as the voltage sampling value U_samp and current sampling value I_samp of the smart meter; Step S1.3: Store the standard waveform corresponding to the acquired standard signal source output signal; Step S1.4: Using the standard voltage U0 and standard current I0 of the standard signal source output signal as a reference, and the voltage sampling value U_samp and current sampling value I_samp of the smart meter as the measured values, the voltage sampling coefficient K1 and current sampling coefficient K2 are fitted using the least squares method and stored in the smart meter; Step S1.5: Calculate and store the initial power error ΔP0 and the standard power P2; Step S1.6: Under the applied external standard magnetic field environment, the smart meter is tested. The actual power error ΔP1 is recorded by a high-precision error tester. The collected data is fitted with a third-order polynomial using the least squares method to obtain the preset fitting coefficients a0, a1, a2, and a3 and store them.

3. The adaptive calibration method according to claim 2, characterized in that, Step S2 includes: Step S2.1: Collect magnetic field data using a three-dimensional magnetic field sensor at preset intervals. The magnetic field data includes the magnetic field strengths Bx, By, and Bz of the X, Y, and Z axes. Step S2.2: Preprocess the collected magnetic field data, remove abnormal data, and calculate the average magnetic field strengths Bx1, By1, and Bz1 of the three-axis components; Step S2.3: Calculate the resultant magnetic field strength B, magnetic field azimuth θ, and magnetic field elevation φ; calculate and store the weighted resultant magnetic field strength Bw, using the following formulas respectively: ; ; ; ; Wherein, Bx1 is the effective average magnetic field strength of the X-axis component, By1 is the effective average magnetic field strength of the Y-axis component, Bz1 is the effective average magnetic field strength of the Z-axis component, B is the resultant magnetic field strength, θ is the magnetic field azimuth angle, φ is the magnetic field pitch angle, and w1, w2, and w3 are weighting parameters. Step S2.4: Compare the weighted magnetic field resultant intensity Bw with the interference threshold to determine the magnetic field interference level as no magnetic field interference level, low magnetic field interference level, or high magnetic field interference level.

4. The adaptive calibration method according to claim 2, characterized in that, Step S1.4 includes: Using the standard voltage U0 and standard current I0 of the standard signal as references, and the voltage sampling value U_samp and current sampling value I_samp of the meter to be calibrated as measured values, the least squares method is used to fit the voltage sampling coefficient K1 and the current sampling coefficient K2. The fitting objective is to make the voltage sampling coefficient K1 and the current sampling coefficient K2 fit to the standard voltage sampling coefficient K0 and the current sampling coefficient K2. Minimum The minimum fitting formula is as follows: Where n is the number of sampling points within the test duration, i is the sampling point number, U_samp(i) and I_samp(i) are the voltage and current sampling values ​​at the i-th point of the meter, and U0(i) and I0(i) are the standard voltage and standard current values ​​at the i-th point of the standard signal.

5. The adaptive calibration method according to claim 2, characterized in that, Step S1.5 includes: The formula for calculating the initial power error ΔP0 is as follows: ; Where P1 is the power measured by the electricity meter, and P2 is the standard power; the calculation formulas for P1 and P2 are as follows: P1= ; ; Where cosφ0 is the standard signal power factor, cosφ is the reference power factor, and cosφ is calculated as follows: Collect voltage sample value sequences U_samp(k) and current sample value sequences I_samp(k) within one frequency cycle. Calculate the average values ​​U_samp_avg of the voltage sample sequence and I_samp_avg of the current sample sequence. Calculate their covariance Cov(U_samp,I_samp), the standard deviation σU_samp of the voltage sample sequence, and the standard deviation σI_samp of the current sample sequence. The calculation formulas are as follows: ; ; ; Where n is the number of sampling points in one frequency period, and k is the sampling point number; The phase difference Δφ is calculated using the following formula: ; The reference power factor cosφ is calculated using the following formula:

6. The adaptive calibration method according to claim 3, characterized in that, Step S3 specifically involves: The calibration modes include interference-free calibration mode, low-interference calibration mode, and high-interference calibration mode. When the magnetic field interference level is the no magnetic field interference level, the calibration mode is switched to the no-magnetic-field interference calibration mode; When the magnetic field interference level is low, the calibration mode is switched to the low interference calibration mode. When the magnetic field interference level is high, the calibration mode will be switched to the high interference calibration mode.

7. The adaptive calibration method according to claim 6, characterized in that, Step S4 includes: When the calibration mode is the interference-free calibration mode, the sampling module collects real-time voltage and real-time current, calculates real-time power, and calculates electrical energy based on real-time power. When the calibration mode is the low-interference calibration mode, real-time voltage Ua and real-time current Ia are collected, and the uncalibrated power P0 is calculated. The formula for calculating the uncalibrated power P0 is as follows: Where K1 is the voltage sampling coefficient, K2 is the current sampling coefficient, and cosφ1 is the real-time power factor; Extract the initial power error ΔP0; acquire the real-time power grid frequency f, and calculate the real-time angular frequency ω. The formula for calculating the real-time angular frequency ω is as follows: The fitting power error ΔP1 is calculated based on a third-order fitting model, using the following formula: in, , , , These are the preset fitting coefficients; The total power error ΔP is calculated using the following formula: The real-time power P1 after calibration is calculated using the following formula: The formula for calculating electrical energy E1 is as follows: When the calibration mode is the high-interference calibration mode, the current sampling module acquires the real-time current signal at a frequency of 10kHz, obtains the sampling sequence Is(k) within one frequency period, and extracts the waveform sequence of the standard waveform stored in step S1.3; determines whether the waveform is distorted; if the waveform is distorted, it performs correction and calculates the electrical energy; if the waveform is not distorted, it calculates the electrical energy in the non-interference calibration mode.

8. The adaptive calibration method according to claim 7, characterized in that, The process of correcting waveform distortion and calculating electrical energy is as follows: Using one frequency cycle as a window, Is(k) is divided into continuous windows, each containing m points. The effective value of the current I_rms and the effective value of the standard waveform I_st_rms in the current window are calculated using the following formula: Where m is the number of sampling points and k is the sampling point number. The sampled current value at point k; The adjusted reference waveform Iref(k) is obtained by adjusting the reference waveform, and the calculation formula is as follows: Calculate the difference ΔI(k) between each sampling point and the reference waveform. The calculation formula is as follows: If ΔI(k) > ε×In, then linear interpolation of adjacent undistorted points is used for correction to obtain the corrected data Is'(k). The correction calculation formula is as follows: If ΔI(k) ≤ ε×In, then no linear interpolation correction is performed between adjacent non-distortion points, and the corrected data is Is'(k) = Is(k); synthesize the corrected waveform to obtain the corrected sequence Is'(k), and calculate the corrected effective current value Ical using the following formula: Obtain the voltage sampling sequence and calculate the effective voltage value Ucal using the following formula: Calculate the real-time power factor cosφ2; calculate the calibrated power P2 using the following formula: Where cosφ2 is the real-time power factor; The formula for calculating electrical energy E2 is as follows:

9. A smart meter device, characterized in that, have: The initialization module is used to initialize the smart meter, collect metering data, and store standard waveform sequences, initial metering parameters, standard power, and preset fitting coefficients. The interference level assessment module is used to collect and store magnetic field data through a three-dimensional magnetic field sensor, and determine the magnetic field interference level based on the magnetic field data. The calibration mode switching module is used to switch to the corresponding calibration mode according to the determined magnetic field interference level. The power calculation module is used to collect data and calculate power according to the switched calibration mode.

10. A smart meter system, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the adaptive calibration method as described in any one of claims 1-8.