Method for calibrating smart meter and smart meter

By acquiring real-time measurement data from the built-in temperature sensor of the smart meter and the temperature drift characteristics of the crystal oscillator, the daily timing error is calculated and the crystal oscillator frequency is corrected, thus solving the problem of insufficient timing accuracy of smart meters in a wide temperature range and achieving accurate timing.

CN122238982APending Publication Date: 2026-06-19QINGDAO ITECHENE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGDAO ITECHENE TECH CO LTD
Filing Date
2026-04-29
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

The daily timing function of existing smart meters suffers from large temperature drift errors, limited calibration coverage, and low timing calibration accuracy, making it difficult to meet the requirements for long-term accurate timing over a wide temperature range.

Method used

By acquiring real-time measurement data from the built-in temperature sensor of the smart meter, the actual ambient temperature is calculated using a pre-determined first preset function. Combining the temperature drift characteristics of the built-in crystal oscillator of the smart meter, a second preset function is used to calculate the daily timing error. The crystal oscillator frequency is then corrected through a calibration register to achieve accurate timing.

Benefits of technology

Maintaining low timing error over a wide temperature range meets the long-term accurate timing requirements of smart meters, solving the problems of large error and insufficient accuracy in existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122238982A_ABST
    Figure CN122238982A_ABST
Patent Text Reader

Abstract

This invention relates to the field of power metering instruments and meters, specifically providing a calibration method for a smart meter and a smart meter itself, aiming to solve the problem of low timing accuracy in the calibration schemes for the daily timing function of smart meters. To this end, the calibration method for the smart meter of this invention includes: acquiring real-time measurement data collected by the built-in temperature sensor of the smart meter; determining the actual ambient temperature of the smart meter based on the real-time measurement data and a first preset function; determining the daily timing error of the smart meter at the current ambient temperature based on the actual ambient temperature and a second preset function; and correcting the crystal oscillator frequency of the smart meter at the current ambient temperature based on the daily timing error. This invention meets the long-term accurate timing requirements of smart meters in a wide-temperature environment and solves the technical pain points of large errors and insufficient accuracy in existing calibration schemes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power metering instruments and meters, specifically providing a calibration method for a smart meter and a smart meter. Background Technology

[0002] The daily timing function of existing smart meters usually adopts fixed temperature compensation or single-point temperature calibration schemes. These compensation and calibration schemes are not only complex in operation logic and expensive in algorithm implementation, but also have defects such as large temperature drift error, limited calibration coverage and low timing calibration accuracy, making it difficult to meet the requirements of long-term accurate timing of smart meters in a wide temperature range. Summary of the Invention

[0003] The present invention aims to solve the above-mentioned technical problems, namely, to solve the defects of existing smart meter calibration schemes for daily timing function, such as large temperature drift error, limited calibration coverage, and low timing calibration accuracy, which make it difficult to meet the long-term accurate timing requirements of smart meters in a wide temperature range.

[0004] In a first aspect, the present invention provides a method for calibrating a smart meter, comprising:

[0005] Acquire real-time measurement data collected by the built-in temperature sensor of the smart meter;

[0006] Based on the real-time measurement data and the first preset function, the actual ambient temperature of the smart meter is determined, wherein the first preset function is a pre-determined formula based on the characteristics of the temperature sensor to characterize the relationship between the actual ambient temperature and the real-time measurement data;

[0007] Based on the actual ambient temperature and the second preset function, the daily timing error of the smart meter at the current actual ambient temperature is determined. The second preset function is a formula pre-determined based on the temperature drift characteristics of the built-in crystal oscillator of the smart meter to characterize the relationship between the daily timing error and the actual ambient temperature.

[0008] Based on the daily timing error, the crystal oscillator frequency of the smart meter is corrected at the current actual ambient temperature.

[0009] In a preferred embodiment of the above calibration method, the method further includes:

[0010] When the smart meter reaches a stable temperature at the first preset temperature, it acquires the first measurement value collected by the built-in temperature sensor of the smart meter at the first preset temperature.

[0011] When the smart meter reaches a stable temperature at the second preset temperature, it acquires the second measurement value collected by the built-in temperature sensor of the smart meter at the second preset temperature.

[0012] The first preset function is determined based on the first measured value and the first preset temperature, and the second measured value and the second preset temperature.

[0013] In the preferred embodiment of the above calibration method, the first preset temperature and the second preset temperature are any temperatures within the range of [-40℃, 85℃]. When the first preset temperature is T1, the first measurement value collected by the built-in temperature sensor of the smart meter when the temperature stabilizes at T1 is A. When the second preset temperature is T2, the second measurement value collected by the built-in temperature sensor of the smart meter when the temperature stabilizes at T2 is B.

[0014] Based on (T1, A) and (T2, B), the first preset function is determined as follows:

[0015] ;

[0016] in, , T represents the actual ambient temperature of the smart meter; ADCCUR represents the real-time measurement data collected by the built-in temperature sensor of the smart meter.

[0017] In the preferred embodiment of the above calibration method, when T1 is 25°C, A is 2000; when T2 is 0°C, B is 1545.

[0018] Based on (25℃, 2000) and (0℃, 1545), the first preset function is determined as follows:

[0019] =18.2T+1545.

[0020] In a preferred embodiment of the above calibration method, the method further includes:

[0021] When the smart meter reaches temperature stability at at least three different preset temperatures, the daily timing error of the smart meter at each different preset temperature is obtained respectively.

[0022] The second preset function is determined based on the different preset temperatures and the corresponding daily timing errors.

[0023] In the preferred embodiment of the above calibration method, the three different preset temperatures are T3, T4, and T5, the daily timing error of the smart meter at T3 is D, the daily timing error of the smart meter at T4 is E, and the daily timing error of the smart meter at T5 is F. A system of equations is obtained based on (T3, D), (T4, E), and (T5, F).

[0024]

[0025] Solve the system of equations to determine a, b, and c, and obtain the second preset function.

[0026] In the preferred embodiment of the above calibration method, T3 is -40℃, D is -143.76ppm; T4 is 25℃, E is -0.31ppm; T5 is 85℃, F is -0.31ppm;

[0027] Based on (-40℃, -143.76ppm), (25℃, -0.31ppm), and (85℃, -149.25ppm), the second preset function is determined as follows:

[0028] Y = -0.037582(T - 21.93℃) 2 + 0.25ppm

[0029] Where Y represents the daily timing error of the smart meter when the actual ambient temperature is T.

[0030] In the preferred embodiment of the above calibration method, the step of correcting the crystal oscillator frequency of the smart meter at the current actual ambient temperature based on the daily timing error includes:

[0031] Obtain the calibration step size of the built-in calibration circuit of the smart meter;

[0032] Calculate the ratio of the daily timing error to the adjustment step size;

[0033] Configure the calibration register parameters of the smart meter according to the ratio, and correct the crystal oscillator frequency of the smart meter at the current actual ambient temperature.

[0034] In a second aspect, the present invention provides a smart meter, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the smart meter calibration method as described in any of the first aspects above.

[0035] In the preferred embodiment of the above-mentioned smart meter, the smart meter further includes:

[0036] A temperature sensor is used to collect real-time measurement data of the actual ambient temperature of the smart meter.

[0037] The clock accuracy measurement module is used to collect the daily timing error of the smart meter based on the current actual ambient temperature.

[0038] The crystal oscillator module is used to provide the timing reference frequency for the smart meter;

[0039] The calibration register is used to correct the timing reference frequency of the smart meter at the current actual ambient temperature based on the ratio of the daily timing error to the calibration step size.

[0040] In a third aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the smart meter calibration method as described in any of the first aspects above.

[0041] In a fourth aspect, the present invention provides a computer program product that, when run on a smart meter, causes the smart meter to implement the smart meter calibration method as described in any of the first aspects above.

[0042] By adopting the above technical solution, the present invention firstly acquires real-time measurement data collected by the built-in temperature sensor of the smart meter, and combines it with a pre-determined relationship formula (i.e., a first preset function) based on the characteristics of the temperature sensor to accurately determine the current ambient temperature of the smart meter. Next, based on the temperature drift characteristics of the built-in crystal oscillator of the smart meter, a pre-determined relationship formula (i.e., a second preset function) representing the correspondence between daily timing error and actual ambient temperature is used to quickly and accurately calculate the daily timing error of the smart meter under the current ambient temperature. Finally, based on this daily timing error, the crystal oscillator frequency under the current ambient temperature of the smart meter is corrected in real time, effectively offsetting the large timing deviation caused by temperature drift of the crystal oscillator frequency. Ultimately, this enables the smart meter to maintain a low timing error over a wide temperature range, meeting the long-term accurate timing requirements of smart meters in wide-temperature environments, and solving the technical pain points of large errors and insufficient accuracy in existing fixed temperature compensation and single-point calibration schemes. Attached Figure Description

[0043] The preferred embodiments of the present invention are described below with reference to the accompanying drawings, in which:

[0044] Figure 1 This is a flowchart illustrating the calibration method of a smart meter in an embodiment of this application.

[0045] Figure 2 This is a schematic diagram illustrating the linear relationship between the actual temperature of the temperature sensor and the measured value in an embodiment of this application;

[0046] Figure 3 This is a schematic diagram of the parabolic relationship between the daily timing error caused by crystal oscillator frequency drift and the actual ambient temperature characteristics in the embodiments of this application;

[0047] Figure 4 This is a flowchart illustrating another smart meter calibration method according to an embodiment of this application.

[0048] Figure 5 This is a flowchart illustrating another smart meter calibration method in an embodiment of this application.

[0049] Figure 6 This is a flowchart illustrating one implementation of step S140 in an embodiment of this application.

[0050] Figure 7 This is a schematic diagram of the structure of a smart meter provided in an embodiment of this application;

[0051] Figure 8 This is a schematic diagram of the structure of the FM3308 MCU control chip provided in one embodiment of this application. Detailed Implementation

[0052] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0053] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0054] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0055] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0056] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0057] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.

[0058] Based on the technical problems mentioned in the background art, this invention provides a calibration method for smart meters. First, by acquiring real-time measurement data collected by the smart meter's built-in temperature sensor, and combining this with a pre-determined relationship between the actual ambient temperature and the real-time measurement data (i.e., a first preset function) based on the characteristics of the temperature sensor, the actual ambient temperature of the smart meter is accurately determined. Next, based on the temperature drift characteristics of the smart meter's built-in crystal oscillator, a pre-determined relationship between daily timing error and actual ambient temperature (i.e., a second preset function) is used, and the determined actual ambient temperature is substituted to quickly and accurately calculate the daily timing error of the smart meter under the current actual ambient temperature. Finally, based on this daily timing error, the crystal oscillator frequency under the current actual ambient temperature of the smart meter is corrected in real time, effectively offsetting the large timing deviation caused by temperature drift of the crystal oscillator frequency. Ultimately, this achieves low timing error for the smart meter across a wide temperature range, meeting the long-term accurate timing requirements of smart meters in wide-temperature environments, and solving the technical pain points of existing fixed temperature compensation and single-point calibration schemes, such as large errors, narrow coverage, and insufficient accuracy.

[0059] See Figure 1 This is a flowchart illustrating the calibration method for a smart meter provided in an embodiment of this application. It is intended as an example and not a limitation. Figure 1 As shown, the method may include the following steps:

[0060] Step S110: Obtain real-time measurement data collected by the built-in temperature sensor of the smart meter.

[0061] In this embodiment, when the smart meter is powered on, the built-in temperature sensor of the smart meter starts working and collects real-time measurement data corresponding to the temperature around the smart meter circuit. The real-time measurement data is the temperature signal detected by the temperature sensor converted into electrical signal data that can be recognized by the processor, ensuring that the collected real-time measurement data can accurately reflect the actual ambient temperature of the smart meter.

[0062] Step S120: Determine the actual ambient temperature of the smart meter based on real-time measurement data and the first preset function.

[0063] The first preset function is a formula, determined in advance based on the characteristics of the temperature sensor, used to characterize the relationship between the actual ambient temperature and the real-time measurement data.

[0064] In a specific example, the smart meter uses the FM3308 MCU control chip. This control chip has high integration and low power consumption, meeting the low-power operation requirements of smart meters. Its built-in temperature sensor is a PTAT (Proportional to Absolute Temperature) type temperature sensor. A typical curve of temperature (T) versus ADC (measured value) for a PTAT type temperature sensor is shown below. Figure 2 As shown, the curve exhibits excellent linearity, indicating a strict linear relationship between the actual temperature and the measured value of the PTAT-type temperature sensor built into the FM3308 MCU. The PTAT-type temperature sensor of the FM3308 MCU is based on the characteristics of a semiconductor pn junction. It acquires temperature signals through matched transistor pairs, and its output signal is proportional to the absolute temperature. It possesses high output impedance and anti-magnetic interference capabilities, and its sensitivity is independent of the bias power supply. It can stably acquire temperature signals around the smart meter circuit and convert them into recognizable electrical signal data.

[0065] Therefore, in this embodiment, a correspondence between real-time measurement data and actual ambient temperature can be established through a preset linear function (i.e., the first preset function). By substituting the real-time measurement data (ADCCUR) of the temperature sensor obtained in step S100 into the first preset function, the actual ambient temperature of the smart meter can be quickly calculated.

[0066] Step S130: Determine the daily timing error of the smart meter at the current ambient temperature based on the actual ambient temperature and the second preset function.

[0067] The second preset function is a formula that is predetermined based on the temperature drift characteristics of the built-in crystal oscillator of the smart meter, used to characterize the relationship between daily timing error and actual ambient temperature.

[0068] In this embodiment, smart meters widely use 32.768kHz crystal oscillator modules to implement the real-time clock (RTC) daily timing function. Due to the physical characteristics of the crystal cutting of 32.768kHz crystal oscillator modules (which often adopt tuning fork structure and X-cut cutting method), the crystal oscillator frequency drift and temperature characteristics exhibit a downward-opening quadratic parabolic distribution. Figure 3 As shown, the frequency drift and temperature characteristics of this type of crystal oscillator exhibit very uniform consistency across batches. Based on this characteristic, daily timing error data at different preset temperatures can be fitted into a quadratic function through pre-test calibration to obtain a second preset function that accurately characterizes the relationship between daily timing error and actual ambient temperature. By substituting the actual ambient temperature calculated in step S200 into this second preset function, the daily timing error of the smart meter under the current actual ambient temperature can be quickly and accurately determined.

[0069] Step S140: Based on the daily timing error, correct the crystal oscillator frequency of the smart meter at the current actual ambient temperature.

[0070] In this embodiment, the FM3308 MCU control chip incorporates a calibration circuit and a clock calibration register. This calibration circuit works in conjunction with the smart meter's built-in 32.768kHz crystal oscillator module to adjust the timing reference frequency output by the crystal oscillator. When a daily timing error is determined in the smart meter under the current ambient temperature, the FM3308 MCU processor writes corresponding compensation configuration parameters to the built-in calibration register based on this error. The calibration register precisely adjusts the frequency division parameters of the built-in calibration circuit, compensating for the frequency deviation caused by temperature drift of the crystal oscillator by changing the division ratio. This corrects the crystal oscillator frequency, ensuring that the smart meter's daily timing accuracy meets preset standards and adapts to the long-term accurate timing requirements across a wide temperature range.

[0071] In the preferred technical solution of the above calibration method, such as Figure 4 As shown, the calibration method further includes:

[0072] Step S210: When the smart meter reaches a stable temperature at the first preset temperature, acquire the first measurement value collected by the built-in temperature sensor of the smart meter at the first preset temperature.

[0073] In this embodiment, the smart meter is placed in a first preset temperature environment. After the overall temperature of the smart meter reaches a stable state and the data collected by the temperature sensor shows no significant fluctuation, the first measured value collected by the temperature sensor at this time is recorded. The first preset temperature is any temperature within the range of [-40℃, 85℃]. When the first preset temperature is T1, the first measured value collected by the built-in temperature sensor of the smart meter when T1 reaches a stable temperature is A. For example, T1 = 25℃, the smart meter is placed in a 25℃ temperature chamber, and the temperature of the temperature chamber is kept constant. After the smart meter reaches temperature equilibrium in the 25℃ temperature chamber (i.e., the internal circuit temperature of the meter is consistent with the temperature of the temperature chamber; for example, the ADC value collected by the temperature sensor shows no fluctuation or the fluctuation range does not exceed ±1 for 5 consecutive minutes), the ADC value of the internal temperature sensor of the FM3308 MCU control chip is read as 2000. This ADC value is the first measured value A, corresponding to the first preset temperature T1 of 25℃.

[0074] Step S220: When the smart meter reaches a stable temperature at the second preset temperature, acquire the second measurement value collected by the built-in temperature sensor of the smart meter at the second preset temperature.

[0075] In this embodiment, the smart meter is placed in a second preset temperature environment. After the overall temperature of the smart meter reaches a stable state and the data collected by the temperature sensor shows no significant fluctuation, the second measurement value collected by the temperature sensor at this time is recorded. The second preset temperature is any temperature within the range of [-40℃, 85℃]. When the second preset temperature is T2, the second measurement value collected by the built-in temperature sensor of the smart meter when T2 reaches temperature stability is B. For example, T2=0℃, the smart meter is taken out from the 25℃ temperature chamber and placed in the 0℃ temperature chamber, and the temperature of the temperature chamber is kept constant. After the smart meter reaches temperature equilibrium in the 0℃ temperature chamber (also satisfying that the ADC value has no fluctuation for 5 consecutive minutes or the fluctuation range does not exceed ±1), the ADC value of the internal temperature sensor of the FM3308 MCU control chip is read as 1545. This ADC value is the second measurement value B, corresponding to the second preset temperature T2 being 0℃.

[0076] Step S230: Determine the first preset function based on the first measured value and the first preset temperature, as well as the second measured value and the second preset temperature.

[0077] In this embodiment, based on the characteristics of the PTAT type temperature sensor, the output (measured value) of the temperature sensor has a linear relationship with the actual ambient temperature. Therefore, the first preset function adopts a linear function model, and its expression is: Determine based on (T1, A) and (T2, B) , T is the actual ambient temperature of the smart meter (unit: °C), ADCCUR is the real-time measurement value collected by the temperature sensor, k is the slope of the function, and b is a constant term.

[0078] Continuing with the example above, substituting the first preset temperature of 25℃ (T1=25℃) and the corresponding first measured value of 2000 (A=2000), and the second preset temperature of 0℃ (T2=0℃) and the corresponding second measured value of 1545 (B=1545) into the linear function model, we obtain two sets of equations: ① ; ②1545= Then, the system of two linear equations in two variables is solved, yielding k = 18.2 and b = 1545. Finally, substituting the calculated results of k and b into the general expression for a linear function, the first preset function can be determined as follows: This function can quickly calculate the corresponding actual ambient temperature T using the real-time measurement value ADCCUR from the temperature sensor.

[0079] In the preferred technical solution of the above calibration method, such as Figure 5 As shown, the calibration method further includes:

[0080] Step S310: When the smart meter reaches temperature stability at at least three different preset temperatures, obtain the daily timing error of the smart meter at each different preset temperature.

[0081] For example, the three different preset temperatures are T3, T4, and T5, the daily timing error of the smart meter at T3 is D, the daily timing error of the smart meter at T4 is E, and the daily timing error of the smart meter at T5 is F. Based on (T3, D), (T4, E), and (T5, F), a system of equations is obtained.

[0082]

[0083] Solve the system of equations to determine a, b, and c, and obtain the second preset function.

[0084] In this embodiment, considering the actual wide operating temperature range requirements of smart meters, multiple preset temperatures covering low, medium, and high temperature ranges are selected, specifically -40℃, -25℃, 0℃, 25℃, 55℃, and 85℃. This temperature range can fully cover the normal operating environment temperature range of smart meters, ensuring the applicability of the second preset function. During the test, the smart meter is placed in a temperature-controlled chamber with precise temperature control in sequence. Only one preset temperature is set each time, and the temperature of the chamber is kept constant. Once the overall temperature of the smart meter reaches a stable state (i.e., the temperature of the internal crystal oscillator and circuit is consistent with the temperature of the chamber, and remains stable for more than 60 minutes without significant temperature fluctuations), the daily timing error of the smart meter at that preset temperature is accurately measured using the ITP02 clock accuracy measurement module. The measurement is repeated three times at each preset temperature, and the average of the three measurements is taken as the daily timing error corresponding to that temperature, ensuring the accuracy and reliability of the measurement data. The daily timing errors corresponding to each preset temperature are as follows: -143.76ppm at -40℃, -82.71ppm at -25℃, -17.40ppm at 0℃, -0.31ppm at 25℃, -40.90ppm at 55℃, and -149.25ppm at 85℃. The above temperatures and their corresponding daily timing errors are recorded one by one and used as the basic experimental data for fitting the second preset function.

[0085] Step S320: Determine the second preset function based on the different preset temperatures and the corresponding daily timing errors.

[0086] In this embodiment, the smart meter has a built-in 32.768kHz crystal oscillator module. Due to its tuning fork structure and X-cut cutting method, the crystal oscillator frequency drift and temperature characteristics exhibit a downward-opening quadratic parabolic distribution. Figure 3 As shown, the second preset function therefore adopts a quadratic function model, and its general expression is: Y = aT 2 +bT+c, where Y represents the daily timing error of the smart meter when the actual ambient temperature is T (unit: ppm), T is the actual ambient temperature (unit: ℃), a is the coefficient of the quadratic term, b is the coefficient of the linear term, and c is the constant term.

[0087] For example, selecting at least three sets of data from the above six sets, such as (-40℃, -143.76ppm), (25℃, -0.31ppm), and (85℃, -149.25ppm), can determine the second preset function. Alternatively, to determine the second preset function more quickly, a quadratic function Y=aT can be used as the model. 2 +bT+c, select the above six sets of data, and solve the fitting coefficients by minimizing the sum of squared errors using the least squares method; where the objective is to minimize the sum of squared residuals.

[0088]

[0089] in, Ti is The corresponding temperature value is given below, in °C.

[0090] Taking the partial derivatives with respect to a, b, and c respectively and setting them to 0, we obtain the normal equation system:

[0091]

[0092] Substituting the above six sets of preset temperatures and corresponding daily timing error data into the above normal equations, we obtain a = -0.037582, b = 1.647420, c = -17.791657, and thus the second preset function is: Y = -0.037582T 2 +1.647420T-17.791657. The second preset function can be determined by obtaining the parabolic function form from the fitting coefficients: Y=-0.037582(T-21.93℃)²+0.25ppm. This second preset function can accurately characterize the correspondence between the actual ambient temperature T and the daily timing error Y. Substituting the actual ambient temperature calculated in step S200 into this function, the daily timing error at the current temperature can be quickly and accurately obtained.

[0093] In the preferred technical solution of the above calibration method, such as Figure 6 As shown, step S140 further includes the following steps:

[0094] Step S1401: Obtain the calibration step size of the built-in calibration circuit of the smart meter.

[0095] In this embodiment, the smart meter's built-in calibration circuit works in conjunction with the FM3308 MCU control chip and calibration register. The calibration step size is a pre-set fixed parameter, the value of which is determined by the hardware characteristics of the calibration circuit and the frequency accuracy requirements of the crystal oscillator. Specifically, for each calibration step size adjustment of the crystal oscillator frequency, the corresponding change in daily timing error is a fixed value (for example, the calibration step size is set to 1.525 ppm / step, meaning that for each adjustment step, the daily timing error corresponding to the crystal oscillator can be corrected by 1.525 ppm). The FM3308 MCU processor reads the configuration calibration register of the calibration circuit through the I2C communication bus to quickly obtain the preset calibration step size parameter.

[0096] Step S1402: Calculate the ratio of daily timing error to adjustment step size.

[0097] In this embodiment, the FM3308 MCU processor divides the daily timing error (Y) at the current actual ambient temperature determined in step S300 with the calibration step size (K) obtained in step S1401 to calculate the required step size ratio (N=Y / K) for correction. During the calculation, the processor rounds the result to ensure that the ratio is an integer (because the parameter configuration of the calibration register only supports integer step size adjustment), avoiding correction errors caused by non-integer step sizes.

[0098] For example, if the current ambient temperature of the smart meter is -10℃, Y = -28.6ppm is calculated using Y = -0.037582(T - 21.93℃)² + 0.25ppm. Then, the value adjusted by the calibration register and calibration circuit of the FM3308 MCU is -28.6 / 1.525 = -18.754, which is -19. That is, -19 steps need to be adjusted (the negative sign indicates that the correction direction is to reduce the crystal oscillator frequency deviation, and the positive sign indicates that the crystal oscillator frequency deviation is increased).

[0099] Step S1403: Configure the calibration register parameters of the smart meter according to the ratio, and correct the crystal oscillator frequency of the smart meter at the current actual ambient temperature.

[0100] In this embodiment, the calibration register is a dedicated configuration register built into the smart meter. Its parameters are directly related to the frequency output of the crystal oscillator module. By adjusting the value of the calibration register, the division ratio of the calibration circuit can be changed, thereby achieving accurate calibration of the crystal oscillator frequency. The FM3308 MCU processor converts the step ratio (N) calculated in step S1402 into the configuration parameters of the calibration register and writes these parameters into the calibration register through a write instruction. After receiving the parameters, the calibration register synchronously sends a control signal to the calibration circuit. The calibration circuit adjusts its own division ratio according to the signal to compensate for the frequency deviation of the crystal oscillator caused by temperature drift.

[0101] Figure 7 This is a schematic diagram of the structure of the smart meter provided in an embodiment of this application. Figure 7As shown, the smart meter in this embodiment mainly includes an FM3308 MCU control chip 71, a 32.768kHz crystal oscillator module 72, an EEPROM and FLASH storage module 73, an RS485 circuit module 74, a clock accuracy measurement module 75, an AC-to-DC converter module 76, and a calibration register 77. The FM3308 MCU control chip 71 has a built-in temperature sensor used to collect real-time measurement data of the smart meter's current ambient temperature. The clock accuracy measurement module 75 is used to collect the daily timing error of the smart meter due to the current ambient temperature. The 32.768kHz crystal oscillator module 72 provides the timing reference frequency for the smart meter. The EEPROM and FLASH storage module 73... The SH storage module 73 stores key information such as the smart meter's operating parameters, temperature acquisition data, daily timing error data, and calibration parameters. The RS485 circuit module 74 serves as the smart meter's communication interface module, enabling signal transmission and data interaction between the smart meter and external devices (such as host computers and concentrators). It can upload data such as the meter's operating status and timing accuracy, and can also receive control commands issued from external sources. The calibration register 77 is used to correct the smart meter's timing reference frequency based on the ratio of the daily timing error to the calibration step size at the current ambient temperature. The AC-to-DC converter 76 serves as the smart meter's power supply conversion unit, converting externally connected AC power into DC power required for the normal operation of the smart meter's components.

[0102] like Figure 8 As shown, the FM3308MCU control chip 71 includes at least one processor 710, a memory 711, and a computer program 712 stored in the memory 711 and executable on the at least one processor 710. When the processor 710 executes the computer program 712, it implements the steps in any of the above-described smart meter calibration method embodiments.

[0103] The smart meter may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that... Figure 7 This is merely an example of a smart meter and does not constitute a limitation on smart meters. It may include more or fewer components than shown in the illustration, or a combination of certain components, or different components, such as input / output devices, network access devices, etc.

[0104] The processor 710 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0105] In some embodiments, the memory 711 may be an internal storage unit of the smart meter, such as the hard drive or memory of the smart meter. In other embodiments, the memory 711 may be an external storage device of the smart meter, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the smart meter. Furthermore, the memory 711 may include both internal and external storage units of the smart meter. The memory 711 is used to store operating systems, applications, boot loaders, data, and other programs, such as the program code of computer programs. The memory 711 can also be used to temporarily store data that has been output or will be output.

[0106] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps in the above-described method embodiments.

[0107] This application provides a computer program product that, when run on a smart meter, enables the smart meter to implement the steps described in the above-described method embodiments.

[0108] 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, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a device / terminal equipment, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0109] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0110] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0111] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or 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. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0112] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0113] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will all fall within the scope of protection of the present invention.

Claims

1. A method for calibrating a smart meter, characterized in that, include: Acquire real-time measurement data collected by the built-in temperature sensor of the smart meter; Based on the real-time measurement data and the first preset function, the actual ambient temperature of the smart meter is determined, wherein the first preset function is a pre-determined formula based on the characteristics of the temperature sensor to characterize the relationship between the actual ambient temperature and the real-time measurement data; Based on the actual ambient temperature and the second preset function, the daily timing error of the smart meter at the current actual ambient temperature is determined. The second preset function is a formula pre-determined based on the temperature drift characteristics of the built-in crystal oscillator of the smart meter to characterize the relationship between the daily timing error and the actual ambient temperature. Based on the daily timing error, the crystal oscillator frequency of the smart meter is corrected at the current actual ambient temperature.

2. The calibration method for a smart meter according to claim 1, characterized in that, The method further includes: When the smart meter reaches a stable temperature at the first preset temperature, it acquires the first measurement value collected by the built-in temperature sensor of the smart meter at the first preset temperature. When the smart meter reaches a stable temperature at the second preset temperature, it acquires the second measurement value collected by the built-in temperature sensor of the smart meter at the second preset temperature. The first preset function is determined based on the first measured value and the first preset temperature, and the second measured value and the second preset temperature.

3. The calibration method for a smart meter according to claim 2, characterized in that, The first preset temperature and the second preset temperature are any temperatures within the range of [-40℃, 85℃]. When the first preset temperature is T1, the first measurement value collected by the built-in temperature sensor of the smart meter when the temperature stabilizes at T1 is A; when the second preset temperature is T2, the second measurement value collected by the built-in temperature sensor of the smart meter when the temperature stabilizes at T2 is B. Based on (T1, A) and (T2, B), the first preset function is determined as follows: ; in, , T represents the actual ambient temperature of the smart meter; ADCCUR represents the real-time measurement data collected by the built-in temperature sensor of the smart meter.

4. The calibration method for a smart meter according to claim 3, characterized in that, When T1 is 25°C, A is 2000; when T2 is 0°C, B is 1545. Based on (25℃, 2000) and (0℃, 1545), the first preset function is determined as follows: =18.2T+1545。 5. The calibration method for a smart meter according to claim 1, characterized in that, The method further includes: When the smart meter reaches temperature stability at at least three different preset temperatures, the daily timing error of the smart meter at each different preset temperature is obtained respectively. The second preset function is determined based on the different preset temperatures and the corresponding daily timing errors.

6. The calibration method for a smart meter according to claim 5, characterized in that, The three different preset temperatures are T3, T4, and T5. The daily timing error of the smart meter at T3 is D, the daily timing error at T4 is E, and the daily timing error at T5 is F. Based on (T3, D), (T4, E), and (T5, F), a system of equations is obtained. Solve the system of equations to determine a, b, and c, and obtain the second preset function.

7. The calibration method for a smart meter according to claim 6, characterized in that, The T3 is -40℃, and the D is -143.76ppm; the T4 is 25℃, and the E is -0.31ppm; the T5 is 85℃, and the F is -0.31ppm; Based on (-40℃, -143.76ppm), (25℃, -0.31ppm), and (85℃, -149.25ppm), the second preset function is determined as follows: Y=-0.037582(T-21.93℃) 2 + 0.25ppm Where Y represents the daily timing error of the smart meter when the actual ambient temperature is T.

8. The calibration method for a smart meter according to claim 1, characterized in that, The step of correcting the crystal oscillator frequency of the smart meter based on the daily timing error at the current actual ambient temperature includes: Obtain the calibration step size of the built-in calibration circuit of the smart meter; Calculate the ratio of the daily timing error to the adjustment step size; Configure the calibration register parameters of the smart meter according to the ratio, and correct the crystal oscillator frequency of the smart meter at the current actual ambient temperature.

9. A smart meter, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the calibration method for a smart meter as described in any one of claims 1 to 8.

10. The smart meter according to claim 9, characterized in that, The smart meter also includes: A temperature sensor is used to collect real-time measurement data of the actual ambient temperature of the smart meter. The clock accuracy measurement module is used to collect the daily timing error of the smart meter based on the current actual ambient temperature. The crystal oscillator module is used to provide the timing reference frequency for the smart meter; The calibration register is used to correct the timing reference frequency of the smart meter at the current actual ambient temperature based on the ratio of the daily timing error to the calibration step size.