Clock calibration method, electronic device, and readable storage medium
By generating coarse and fine calibration curves in the electricity meter and combining the baseline temperature calibration point with the real-time temperature, the problem of low clock calibration accuracy in the electricity meter is solved, and high-precision clock calibration is achieved over a wider temperature range.
Patent Information
- Application Number
- CN202210356861.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-06
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-04-06
AI Technical Summary
The clock calibration accuracy of existing electricity meters is low and cannot meet users' demand for higher accuracy, especially with a large error in the temperature range of -25℃ to 55℃.
By obtaining the coarse and fine calibration coefficients of the electricity meter at the basic temperature calibration point, and combining them with the real-time temperature, coarse and fine calibration curves are generated, and multi-point calibration is performed to improve clock accuracy.
This enables improved clock calibration accuracy of electricity meters over a wider temperature range, meeting users' demands for higher precision.
Smart Images

Figure CN114859285B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of clock calibration technology, and more particularly to a clock calibration method, an electronic device, and a readable storage medium. Background Technology
[0002] With the comprehensive advancement of smart grid construction, time-of-use billing and peak-shifting methods for electricity are being applied more and more widely. Simultaneously, users are demanding higher accuracy from electricity meter clocks. Currently, the standard practice is to calibrate the initial frequency deviation at a reference temperature of 23℃, and then set the low-temperature and high-temperature quadratic coefficients as empirical values to calibrate the electricity meter clock. However, this calibration method only has one temperature calibration point at 23℃, and the setting of the low-temperature and high-temperature quadratic coefficients relies on empirical values. This results in low clock calibration accuracy for the electricity meter. Although the calibrated clock error meets national standards, there is still a significant deviation within the temperature range of -25℃ to 55℃, failing to meet users' demands for higher clock accuracy than the national standards. Summary of the Invention
[0003] The main objective of this application is to provide a clock calibration method, electronic device, and readable storage medium, aiming to solve the technical problem of low clock calibration accuracy in existing energy meters.
[0004] To achieve the above objectives, this application provides a clock calibration method applied to an electricity meter, the clock calibration method comprising:
[0005] Obtain the coarse adjustment calibration coefficient of the target to be calibrated at the base temperature calibration point, wherein the base temperature calibration point includes the base room temperature calibration point and the base non-temperature calibration point;
[0006] Based on the correspondence between the real-time temperature of the target to be calibrated and the coarse adjustment calibration coefficient, a coarse adjustment calibration curve for the target to be calibrated is determined, wherein the coarse adjustment calibration curve is used to perform coarse adjustment compensation on the target to be calibrated.
[0007] Obtain the fine-tuning calibration coefficient of the target to be calibrated at the fine-tuning temperature calibration point, wherein the fine-tuning temperature calibration point is within the preset fine-tuning calibration temperature range of the target to be calibrated;
[0008] Based on the real-time temperature of the target to be calibrated, the fine-tuning calibration coefficient and the coarse-tuning calibration curve are fused to obtain the fine-tuning calibration curve of the target to be calibrated, wherein the fine-tuning calibration curve is used to fine-tune the compensation of the target to be calibrated.
[0009] The target to be calibrated is calibrated according to the fine-tuning calibration curve.
[0010] Optionally, the coarse adjustment calibration coefficients include the initial frequency offset and the coarse adjustment very-temperature calibration coefficients.
[0011] The step of obtaining the coarse calibration coefficient of the target to be calibrated at the basic temperature calibration point includes:
[0012] Obtain the first clock error value of the target to be calibrated at the basic room temperature calibration point, and input the first clock error value into the preset frequency offset calculation model to obtain the initial frequency offset;
[0013] Obtain the second clock error value of the target to be calibrated at the basic extreme temperature calibration point, and determine the coarse adjustment extreme temperature calibration coefficient based on the second clock error value.
[0014] Optionally, the second clock error value includes a second low-temperature clock error value and a second high-temperature clock error value, and the coarse adjustment non-temperature calibration coefficient includes a coarse adjustment low-temperature calibration coefficient and a coarse adjustment high-temperature calibration coefficient.
[0015] The step of determining the coarse adjustment non-temperature calibration coefficient based on the second clock error value includes:
[0016] The second low-temperature clock error value is input into the preset frequency offset calculation model to obtain the low-temperature frequency offset;
[0017] The basic low temperature calibration point corresponding to the basic very low temperature calibration point, the initial frequency offset, and the low temperature frequency offset are fused to obtain the coarse low temperature calibration coefficient.
[0018] The second high-temperature clock error value is input into the preset frequency offset calculation model to obtain the high-temperature frequency offset;
[0019] The basic high-temperature calibration point corresponding to the basic very low-temperature calibration point, the initial frequency offset, and the high-temperature frequency offset are fused to obtain the coarse-tuned high-temperature calibration coefficient.
[0020] Optionally, the coarse adjustment calibration coefficient includes a first coarse adjustment calibration coefficient and a second coarse adjustment calibration coefficient.
[0021] The step of determining the coarse calibration curve of the target to be calibrated based on the correspondence between the real-time temperature of the target and the coarse calibration coefficient includes:
[0022] Determine whether the real-time temperature is lower than the baseline room temperature calibration point;
[0023] If it is less than, then the first coarse adjustment calibration coefficient is input into the preset coarse adjustment calibration curve model to obtain the first coarse adjustment calibration curve;
[0024] If it is not less than, then the second coarse adjustment calibration coefficient is input into the preset coarse adjustment calibration curve model to obtain the second coarse adjustment calibration curve.
[0025] Optionally, the step of obtaining the fine-tuning calibration coefficient of the target to be calibrated at the fine-tuning temperature calibration point includes:
[0026] Obtain the third clock error value of the target to be calibrated at a preset number of fine-tuning temperature calibration points;
[0027] Each of the aforementioned third clock error values is input into a preset frequency offset calculation model to obtain each of the aforementioned fine-tuning calibration coefficients.
[0028] Optionally, the step of fusing the fine-tuning calibration coefficient and the coarse-tuning calibration curve based on the real-time temperature of the target to be calibrated to obtain the fine-tuning calibration curve of the target to be calibrated includes:
[0029] Based on the real-time temperature, the temperature range to which the target to be calibrated belongs is determined, and the correlation between the real-time temperature and a preset number of fine-tuning temperature calibration points within the temperature range is determined.
[0030] If the correlation is determined to be the first correlation, then based on the real-time temperature of the target to be calibrated, the first and second fine-tuning temperature calibration points for fine-tuning the target to be calibrated are determined.
[0031] Based on the first fine-tuning calibration coefficient corresponding to the first fine-tuning temperature calibration point and the second fine-tuning calibration coefficient corresponding to the second fine-tuning temperature calibration point, calculate the fine-tuning calibration target coefficient of the target to be calibrated.
[0032] Based on the fine-tuning calibration target coefficient and the coarse-tuning calibration curve, the fine-tuning calibration curve of the target to be calibrated is determined;
[0033] If the correlation is determined to be a second correlation, then the fine-tuning calibration curve of the target to be calibrated is determined based on the third fine-tuning calibration coefficient corresponding to the third fine-tuning temperature calibration point within the subordinate temperature range and the coarse-tuning calibration curve.
[0034] If the correlation is determined to be a third correlation, then the fine-tuning calibration curve of the target to be calibrated is determined based on the fourth fine-tuning calibration coefficient corresponding to the fourth fine-tuning temperature calibration point within the subordinate temperature range and the coarse-tuning calibration curve.
[0035] Optionally, the fine-tuning calibration curves include fine-tuning calibration curves for a preset low-temperature range, fine-tuning calibration curves for a preset room-temperature range, and fine-tuning calibration curves for a preset high-temperature range.
[0036] The step of calibrating the target to be calibrated based on the fine-tuning calibration curve includes:
[0037] When the real-time temperature of the target to be calibrated is detected to be within a preset low temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset low temperature range.
[0038] When the real-time temperature of the target to be calibrated is detected to be within the preset room temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset room temperature range.
[0039] When the real-time temperature of the target to be calibrated is detected to be within a preset high temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset high temperature range.
[0040] Optionally, before the step of obtaining the coarse calibration coefficient of the target to be calibrated at the base temperature calibration point, the clock calibration method further includes:
[0041] Obtain the real-time temperature of the target to be calibrated, and calculate the temperature change value of the real-time temperature within a preset time period;
[0042] Based on the temperature change value, determine whether the real-time temperature is stable at the basic temperature calibration point.
[0043] To achieve the above objectives, this application also provides a clock calibration device for use in an electricity meter, the clock calibration device comprising:
[0044] The coarse adjustment coefficient acquisition module is used to acquire the coarse adjustment calibration coefficient of the target to be calibrated at the base temperature calibration point, wherein the base temperature calibration point includes the base room temperature calibration point and the base non-temperature calibration point.
[0045] The coarse adjustment curve acquisition module is used to determine the coarse adjustment calibration curve of the target to be calibrated based on the correspondence between the real-time temperature of the target to be calibrated and the coarse adjustment calibration coefficient, wherein the coarse adjustment calibration curve is used to perform coarse adjustment compensation on the target to be calibrated.
[0046] The fine-tuning coefficient acquisition module is used to acquire the fine-tuning calibration coefficient of the target to be calibrated at the fine-tuning temperature calibration point, wherein the fine-tuning temperature calibration point is within the preset fine-tuning calibration temperature range of the target to be calibrated.
[0047] The fine-tuning curve acquisition module is used to fuse the fine-tuning calibration coefficient and the coarse-tuning calibration curve based on the real-time temperature of the target to be calibrated, so as to obtain the fine-tuning calibration curve of the target to be calibrated, wherein the fine-tuning calibration curve is used to perform fine-tuning compensation on the target to be calibrated.
[0048] The calibration module is used to calibrate the target to be calibrated based on the fine-tuning calibration curve.
[0049] Optionally, the coarse adjustment calibration coefficient includes an initial frequency offset and a coarse adjustment very-temperature calibration coefficient, and the coarse adjustment coefficient acquisition module is further used for:
[0050] Obtain the first clock error value of the target to be calibrated at the basic room temperature calibration point, and input the first clock error value into the preset frequency offset calculation model to obtain the initial frequency offset;
[0051] Obtain the second clock error value of the target to be calibrated at the basic extreme temperature calibration point, and determine the coarse adjustment extreme temperature calibration coefficient based on the second clock error value.
[0052] Optionally, the second clock error value includes a second low-temperature clock error value and a second high-temperature clock error value, the coarse adjustment non-temperature calibration coefficient includes a coarse adjustment low-temperature calibration coefficient and a coarse adjustment high-temperature calibration coefficient, and the coarse adjustment coefficient acquisition module is further used for:
[0053] The second low-temperature clock error value is input into the preset frequency offset calculation model to obtain the low-temperature frequency offset;
[0054] The basic low temperature calibration point corresponding to the basic very low temperature calibration point, the initial frequency offset, and the low temperature frequency offset are fused to obtain the coarse low temperature calibration coefficient.
[0055] The second high-temperature clock error value is input into the preset frequency offset calculation model to obtain the high-temperature frequency offset;
[0056] The basic high-temperature calibration point corresponding to the basic very low-temperature calibration point, the initial frequency offset, and the high-temperature frequency offset are fused to obtain the coarse-tuned high-temperature calibration coefficient.
[0057] Optionally, the coarse adjustment calibration coefficient includes a first coarse adjustment calibration coefficient and a second coarse adjustment calibration coefficient, and the coarse adjustment curve acquisition module is further used for:
[0058] Determine whether the real-time temperature is lower than the baseline room temperature calibration point;
[0059] If it is less than, then the first coarse adjustment calibration coefficient is input into the preset coarse adjustment calibration curve model to obtain the first coarse adjustment calibration curve;
[0060] If it is not less than, then the second coarse adjustment calibration coefficient is input into the preset coarse adjustment calibration curve model to obtain the second coarse adjustment calibration curve.
[0061] Optionally, the fine-tuning coefficient acquisition module is further configured to:
[0062] Obtain the third clock error value of the target to be calibrated at a preset number of fine-tuning temperature calibration points;
[0063] Each of the aforementioned third clock error values is input into a preset frequency offset calculation model to obtain each of the aforementioned fine-tuning calibration coefficients.
[0064] Optionally, the fine-tuning curve acquisition module is further configured to:
[0065] Based on the real-time temperature, the temperature range to which the target to be calibrated belongs is determined, and the correlation between the real-time temperature and a preset number of fine-tuning temperature calibration points within the temperature range is determined.
[0066] If the correlation is determined to be the first correlation, then based on the real-time temperature of the target to be calibrated, the first and second fine-tuning temperature calibration points for fine-tuning the target to be calibrated are determined.
[0067] Based on the first fine-tuning calibration coefficient corresponding to the first fine-tuning temperature calibration point and the second fine-tuning calibration coefficient corresponding to the second fine-tuning temperature calibration point, calculate the fine-tuning calibration target coefficient of the target to be calibrated.
[0068] Based on the fine-tuning calibration target coefficient and the coarse-tuning calibration curve, the fine-tuning calibration curve of the target to be calibrated is determined;
[0069] If the correlation is determined to be a second correlation, then the fine-tuning calibration curve of the target to be calibrated is determined based on the third fine-tuning calibration coefficient corresponding to the third fine-tuning temperature calibration point within the subordinate temperature range and the coarse-tuning calibration curve.
[0070] If the correlation is determined to be a third correlation, then the fine-tuning calibration curve of the target to be calibrated is determined based on the fourth fine-tuning calibration coefficient corresponding to the fourth fine-tuning temperature calibration point within the subordinate temperature range and the coarse-tuning calibration curve.
[0071] Optionally, the calibration module is further configured to:
[0072] When the real-time temperature of the target to be calibrated is detected to be within a preset low temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset low temperature range.
[0073] When the real-time temperature of the target to be calibrated is detected to be within the preset room temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset room temperature range.
[0074] When the real-time temperature of the target to be calibrated is detected to be within a preset high temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset high temperature range.
[0075] Optionally, the clock calibration device is also used for:
[0076] Obtain the real-time temperature of the target to be calibrated, and calculate the temperature change value of the real-time temperature within a preset time period;
[0077] Based on the temperature change value, determine whether the real-time temperature is stable at the basic temperature calibration point.
[0078] This application also provides an electronic device, the electronic device comprising: a memory, a processor, and a program of the clock calibration method stored in the memory and executable on the processor, wherein when the program of the clock calibration method is executed by the processor, it can implement the steps of the clock calibration method as described above.
[0079] This application also provides a computer-readable storage medium storing a program for implementing a clock calibration method, wherein when the program for the clock calibration method is executed by a processor, it implements the steps of the clock calibration method as described above.
[0080] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the clock calibration method described above.
[0081] This application provides a clock calibration method, electronic device, and readable storage medium, applied to an electricity meter. Specifically, it involves: obtaining a coarse calibration coefficient for a target to be calibrated at a base temperature calibration point, wherein the base temperature calibration point includes a base room temperature calibration point and a base non-base temperature calibration point; determining a coarse calibration curve for the target based on the correspondence between the real-time temperature of the target and the coarse calibration coefficient, wherein the coarse calibration curve is used for coarse adjustment compensation of the target; obtaining a fine calibration coefficient for the target at a fine adjustment temperature calibration point, wherein the fine adjustment temperature calibration point is within a preset fine adjustment calibration temperature range of the target; fusing the fine adjustment calibration coefficient and the coarse calibration curve based on the real-time temperature of the target to obtain a fine adjustment calibration curve for the target, wherein the fine adjustment calibration curve is used for fine adjustment compensation of the target; and calibrating the target based on the fine adjustment calibration curve. Since the basic temperature calibration points include both basic ambient temperature calibration points and basic non-ambient temperature calibration points, it is possible not only to calibrate the initial frequency deviation at a reference temperature of 23℃, but also to calibrate the low-temperature quadratic coefficient and high-temperature quadratic coefficient through the basic non-ambient temperature calibration points. This avoids the technical problem of low clock calibration accuracy of the energy meter caused by setting the low-temperature quadratic coefficient and high-temperature quadratic coefficient as empirical values. Furthermore, by using fine-tuning temperature points, the fine-tuning calibration coefficient of the energy meter within the preset fine-tuning calibration temperature range is calibrated. This achieves the goal of matching the energy meter with the corresponding fine-tuning calibration curve for temperature calibration within the preset fine-tuning calibration temperature range, thereby overcoming the technical defects of existing technologies that rely solely on a reference temperature of 23℃ to calibrate the energy meter's clock, and greatly improving the clock calibration accuracy of the energy meter. Attached Figure Description
[0082] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0083] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0084] Figure 1 This is a flowchart illustrating the first embodiment of the clock calibration method of this application;
[0085] Figure 2 This is a flowchart illustrating the second embodiment of the clock calibration method of this application;
[0086] Figure 3This is a schematic diagram of the device structure of the hardware operating environment involved in the clock calibration method in the embodiments of this application.
[0087] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0088] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0089] Example 1
[0090] First, it should be understood that due to insufficient power supply during special periods and the characteristics of electricity consumption time intervals, time-of-use electricity billing strategies have emerged. Simultaneously, this type of electricity consumption strategy necessitates accurate electricity meter clocks to ensure billing accuracy. Currently, electricity meter clock calibration typically only calibrates the initial frequency deviation at a reference temperature of 23℃, then sets the low-temperature quadratic coefficient and high-temperature quadratic coefficient as empirical values. The clock error calibrated using this method meets national standards (no more than ±0.5s / 24h at a reference temperature of 23℃, and no more than ±1s / 24h within the operating temperature range of -25℃ to 55℃). However, this calibration method has significant limitations in both calibration accuracy and handling complex climatic environments. Therefore, this application proposes a clock calibration method for electricity meters to overcome the limitations of current electricity meter clock calibration methods.
[0091] This application provides a clock calibration method applied to an electricity meter. In the first embodiment of the clock calibration method of this application, refer to... Figure 1 The clock calibration method includes:
[0092] Step S10: Obtain the coarse adjustment calibration coefficient of the target to be calibrated at the basic temperature calibration point, wherein the basic temperature calibration point includes the basic room temperature calibration point and the basic non-temperature calibration point.
[0093] In this embodiment, it should be noted that the target to be calibrated is the clock corresponding to the energy meter that needs to be calibrated. The energy meter has a built-in RTC (Real Time Clock). The coarse adjustment calibration coefficient includes an initial frequency deviation and a coarse adjustment non-temperature calibration coefficient. The initial frequency deviation is the frequency deviation of the target to be calibrated under a specific temperature environment, and the coarse adjustment non-temperature calibration coefficient is the secondary compensation coefficient of the target to be calibrated under low temperature or high temperature environment.
[0094] Additionally, it should be noted that the basic temperature calibration point is used to characterize the calibration temperature corresponding to the coarse adjustment of the target to be calibrated. The coarse adjustment can be done by calibrating the coarse adjustment calibration coefficient. The basic temperature calibration point includes a basic room temperature calibration point and a basic non-temperature calibration point. The basic room temperature calibration point corresponds to the initial frequency deviation, and the basic non-temperature calibration point corresponds to the coarse adjustment non-temperature calibration coefficient.
[0095] As an example, step S10 includes: obtaining the initial frequency deviation of the target to be calibrated at a basic room temperature calibration point and the coarse-tuned extreme-temperature calibration coefficient of the target to be calibrated at a basic extreme-temperature calibration point. The basic temperature calibration point includes a basic room temperature calibration point and a basic extreme-temperature calibration point. Specifically, the basic room temperature calibration point is 23℃, and the basic extreme-temperature calibration point is -25℃ or 55℃. The basic room temperature calibration point enables precise calibration of the initial frequency deviation of the target to be calibrated, and the basic extreme-temperature calibration point enables precise calibration of the coarse-tuned extreme-temperature calibration coefficient of the target to be calibrated. Compared to the existing technology that sets the secondary compensation coefficient under low or high temperature environments as an empirical value, this improves the calibration accuracy of the target to be calibrated at operating temperatures such as low or high temperatures.
[0096] The coarse calibration coefficients include the initial frequency offset and the coarse non-temperature calibration coefficients. The step of obtaining the coarse calibration coefficients of the target to be calibrated at the base temperature calibration point includes:
[0097] Step A10: Obtain the first clock error value of the target to be calibrated at the basic room temperature calibration point, and input the first clock error value into the preset frequency offset calculation model to obtain the initial frequency offset;
[0098] Step A20: Obtain the second clock error value of the target to be calibrated at the basic extreme temperature calibration point, and determine the coarse adjustment extreme temperature calibration coefficient based on the second clock error value.
[0099] In this embodiment, it should be noted that due to differences in device materials and manufacturing processes, the target to be calibrated will have clock errors at different operating temperatures. Therefore, the clock error value is used to characterize the clock error of the target to be calibrated at different operating temperatures. The clock error value includes a first clock error value and a second clock error value. The first clock error value is used to characterize the clock error of the target to be calibrated at a basic room temperature calibration point, and the second clock error value is used to characterize the clock error of the target to be calibrated at a basic non-room temperature calibration point.
[0100] Additionally, it should be noted that the preset frequency offset calculation model is used to calculate the temperature frequency offset of the target to be calibrated. The basic non-temperature calibration point includes a basic low temperature calibration point and a basic high temperature calibration point. The temperature frequency offset includes a normal temperature frequency offset, a low temperature frequency offset, and a high temperature frequency offset. The normal temperature frequency offset is the initial frequency offset, used to characterize the frequency deviation of the target to be calibrated at the basic normal temperature calibration point. The low temperature frequency offset is used to characterize the frequency deviation of the target to be calibrated at the basic low temperature calibration point. The high temperature frequency offset is used to characterize the frequency deviation of the target to be calibrated at the basic high temperature calibration point. There is a corresponding relationship between the low temperature frequency offset and the high temperature frequency offset and the coarse adjustment non-temperature calibration coefficient. Specifically, the low temperature frequency offset can be used to calculate the coarse adjustment low temperature calibration coefficient in the coarse adjustment non-temperature calibration coefficient, and the high temperature frequency offset can be used to calculate the coarse adjustment high temperature calibration coefficient in the coarse adjustment non-temperature calibration coefficient. The basic normal temperature calibration point can be 23℃, the basic low temperature calibration point can be -25℃, and the basic high temperature calibration point can be 55℃.
[0101] As an example, steps A10 to A20 include: obtaining the first clock error value of the target to be calibrated at a basic room temperature calibration point, and calculating the initial frequency offset using the first clock error value and a frequency offset calculation formula calculated by a preset frequency offset calculation model, wherein the frequency offset calculation formula is as follows:
[0102] F1 = E1 / 0.0864 * 100
[0103] Wherein, F1 is the initial frequency offset, and E1 is the first clock error value;
[0104] Obtain the second clock error value of the target to be calibrated at the basic extreme temperature calibration point, and determine the coarse adjustment extreme temperature calibration coefficient based on the second clock error value, wherein the basic extreme temperature calibration point includes the basic low temperature calibration point and the basic high temperature calibration point.
[0105] Wherein, the second clock error value includes a second low-temperature clock error value and a second high-temperature clock error value, the coarse adjustment non-temperature calibration coefficient includes a coarse low-temperature calibration coefficient and a coarse high-temperature calibration coefficient, and the step of determining the coarse adjustment non-temperature calibration coefficient based on the second clock error value includes:
[0106] Step B10: Input the second low-temperature clock error value into the preset frequency offset calculation model to obtain the low-temperature frequency offset;
[0107] Step B20: The basic low temperature calibration point corresponding to the basic very low temperature calibration point, the initial frequency offset, and the low temperature frequency offset are fused to obtain the coarse low temperature calibration coefficient.
[0108] Step B30: Input the second high-temperature clock error value into the preset frequency offset calculation model to obtain the high-temperature frequency offset;
[0109] Step B40: The basic high-temperature calibration point corresponding to the basic very low-temperature calibration point, the initial frequency offset, and the high-temperature frequency offset are fused to obtain the coarse-tuned high-temperature calibration coefficient.
[0110] In this embodiment, it should be noted that the second clock error value includes a second low-temperature clock error value and a second high-temperature clock error value. The second low-temperature clock error value is used to characterize the clock error of the target to be calibrated at the basic low-temperature calibration point, and the second high-temperature clock error value is used to characterize the clock error of the target to be calibrated at the basic high-temperature calibration point.
[0111] Additionally, it should be noted that the coarse-adjustment non-temperature calibration coefficient includes a coarse-adjustment low-temperature calibration coefficient and a coarse-adjustment high-temperature calibration coefficient. The coarse-adjustment low-temperature calibration coefficient is used to characterize the secondary compensation coefficient of the target to be calibrated in a low-temperature environment, that is, the coarse-adjustment low-temperature calibration coefficient is a low-temperature secondary compensation coefficient. The coarse-adjustment high-temperature calibration coefficient is used to characterize the secondary compensation coefficient of the target to be calibrated in a high-temperature environment, that is, the coarse-adjustment high-temperature calibration coefficient is a high-temperature secondary compensation coefficient. The basic low-temperature calibration point is used to characterize the low-temperature calibration temperature corresponding to the coarse-adjustment of the target to be calibrated, specifically -25℃. The basic high-temperature calibration point is used to characterize the high-temperature calibration temperature corresponding to the coarse-adjustment of the target to be calibrated, specifically 55℃.
[0112] As an example, steps B10 to B40 include: calculating the low-temperature frequency offset using the second low-temperature clock error value and a frequency offset calculation formula calculated by a preset frequency offset calculation model, wherein the frequency offset calculation formula is:
[0113] F2 = E2 / 0.0864 * 100
[0114] Wherein, F2 is the low-temperature frequency offset, and E2 is the second low-temperature clock error value; the basic low-temperature calibration point, the initial frequency offset, and the low-temperature frequency offset are input into a preset coarse-tuning low-temperature calibration coefficient calculation model to obtain the coarse-tuning low-temperature calibration coefficient. The preset coarse-tuning low-temperature calibration coefficient calculation model is used to calculate the coarse-tuning low-temperature calibration coefficient of the target to be calibrated. The preset coarse-tuning low-temperature calibration coefficient calculation model is equipped with a coarse-tuning low-temperature calibration coefficient calculation formula, which is:
[0115] B1=(F2-F1) / (T1-25)2
[0116] Wherein, F1 is the initial frequency offset, F2 is the low temperature frequency offset, T1 is the basic low temperature calibration point, and B1 is the coarse adjustment low temperature calibration coefficient;
[0117] The high-temperature frequency offset is calculated using the second high-temperature clock error value and the frequency offset calculation formula calculated by the preset frequency offset calculation model, wherein the frequency offset calculation formula is:
[0118] F3 = E3 / 0.0864 * 100
[0119] Wherein, F3 is the high-temperature frequency offset, and E3 is the second high-temperature clock error value; the basic high-temperature calibration point, the initial frequency offset, and the high-temperature frequency offset are input into a preset coarse-tuning high-temperature calibration coefficient calculation model to obtain the coarse-tuning high-temperature calibration coefficient. The preset coarse-tuning high-temperature calibration coefficient calculation model is used to calculate the coarse-tuning high-temperature calibration coefficient of the target to be calibrated. The preset coarse-tuning high-temperature calibration coefficient calculation model is equipped with a coarse-tuning high-temperature calibration coefficient calculation formula, which is:
[0120] B2=(F3-F1) / (T2-25)2
[0121] Wherein, F3 is the high-temperature frequency deviation, F1 is the initial frequency deviation, T2 is the basic high-temperature calibration point, and B2 is the coarse-tuning high-temperature calibration coefficient.
[0122] Step S20: Based on the correspondence between the real-time temperature of the target to be calibrated and the coarse calibration coefficient, determine the coarse calibration curve of the target to be calibrated, wherein the coarse calibration curve is used to perform coarse compensation on the target to be calibrated.
[0123] In this embodiment, it should be noted that due to differences in device materials and manufacturing processes, clock errors will vary with changes in ambient temperature. The curve of this variation approximates a parabola with a vertex at 25°C. Therefore, the target to be calibrated corresponds to different clock error temperature curves at different operating temperatures. That is, the coarse adjustment calibration curve is used to characterize the clock error temperature coarse adjustment curve of the target to be calibrated at different temperatures. The coarse adjustment calibration curve is automatically generated in the target to be calibrated based on the coarse adjustment calibration coefficient.
[0124] Additionally, it should be noted that the coarse adjustment calibration coefficients corresponding to the coarse adjustment calibration curves are different at different operating temperatures. The coarse adjustment calibration curves specifically include coarse low-temperature calibration curves and coarse high-temperature calibration curves. The operating temperature ranges for low and high temperatures are determined with 23℃ as the dividing point. For example, assuming the operating temperature range of the target to be calibrated is -25℃ to 55℃, when the real-time temperature of the target to be calibrated is less than 23℃, the target to be calibrated is coarsely compensated using the coarse low-temperature calibration curve. When the real-time temperature of the target to be calibrated is not less than 23℃, the target to be calibrated is coarsely compensated using the coarse high-temperature calibration curve.
[0125] Additionally, it should be noted that the real-time temperature is the temperature of the target to be calibrated measured in real time by an internal temperature sensor. The correspondence is determined by the real-time temperature of the target to be calibrated and the basic room temperature calibration point. For example, assuming the basic room temperature calibration point is 23°C, when the real-time temperature of the target to be calibrated is not 23°C, the coarse adjustment non-temperature calibration curve is determined by the initial frequency deviation and coarse adjustment non-temperature calibration coefficient corresponding to the target to be calibrated.
[0126] As an example, step S20 includes: determining whether the real-time temperature of the target to be calibrated is the basic room temperature calibration point; if the real-time temperature is not the basic room temperature calibration point, then determining the coarse-adjustment non-temperature calibration curve of the target to be calibrated based on the coarse-adjustment non-temperature calibration coefficient, wherein the coarse-adjustment non-temperature calibration curve includes a coarse-adjustment low-temperature calibration curve and a coarse-adjustment high-temperature calibration curve. Since the real-time temperature is the temperature measured by the internal temperature sensor of the target to be calibrated, the operating environment temperature range of the target to be calibrated can be determined by detecting the real-time temperature of the target, thereby achieving the purpose of targeted coarse-adjustment calibration of the target based on the coarse-adjustment calibration curve under different temperature ranges, improving the accuracy of coarse-adjustment compensation for the target to be calibrated.
[0127] The coarse calibration coefficients include a first coarse calibration coefficient and a second coarse calibration coefficient. The step of determining the coarse calibration curve of the target to be calibrated based on the correspondence between the real-time temperature of the target and the coarse calibration coefficients includes:
[0128] Step C10: Determine whether the real-time temperature is lower than the baseline room temperature calibration point;
[0129] Step C20: If it is less than, then input the first coarse adjustment calibration coefficient into the preset coarse adjustment calibration curve model to obtain the first coarse adjustment calibration curve;
[0130] Step C30: If it is not less than, then input the second coarse adjustment calibration coefficient into the preset coarse adjustment calibration curve model to obtain the second coarse adjustment calibration curve.
[0131] In this embodiment, it should be noted that the coarse adjustment calibration coefficient includes a first coarse adjustment calibration coefficient and a second coarse adjustment calibration coefficient. The first coarse adjustment calibration coefficient is used to characterize the compensation coefficient of the target to be calibrated at a working temperature lower than the basic room temperature calibration point. The first coarse adjustment calibration coefficient includes a coarse low temperature calibration coefficient and an initial frequency deviation. The second coarse adjustment calibration coefficient is used to characterize the compensation coefficient of the target to be calibrated at a working temperature not lower than the basic room temperature calibration point. The second coarse adjustment calibration coefficient includes a coarse high temperature calibration coefficient and an initial frequency deviation. The basic room temperature calibration point is used to distinguish the coarse adjustment calibration coefficients input to the preset coarse adjustment calibration curve model.
[0132] Additionally, it should be noted that the preset coarse calibration curve model is used to obtain the coarse calibration curve, wherein the coarse calibration curve includes a first coarse calibration curve and a second coarse calibration curve. The first coarse calibration curve corresponds to a first coarse calibration coefficient and is used to characterize the clock error temperature coarse calibration curve of the target to be calibrated at a real-time temperature lower than the basic room temperature calibration point, i.e., the coarse low temperature calibration curve. The second coarse calibration curve corresponds to a second coarse calibration coefficient and is used to characterize the clock error temperature coarse calibration curve of the target to be calibrated at a real-time temperature not lower than the basic room temperature calibration point, i.e., the coarse high temperature calibration curve.
[0133] As an example, steps C10 to C30 include: determining whether the real-time temperature is lower than the baseline room temperature calibration point; if the real-time temperature is lower than the baseline room temperature calibration point, then calculating the coarse-tuned low-temperature calibration curve using the coarse-tuned low-temperature calibration coefficient, the initial frequency deviation, and the coarse-tuned low-temperature calibration curve formula of the preset coarse-tuned calibration curve model, wherein the coarse-tuned low-temperature calibration curve formula is:
[0134] F n =B1*(T-25) 2 +F1
[0135] Among them, F nB1 is the coarse-tuned low-temperature calibration curve, T is the real-time temperature, and F1 is the initial frequency deviation.
[0136] If the real-time temperature is not less than the baseline room temperature calibration point, then the coarse-adjusted high-temperature calibration curve is calculated using the coarse-adjusted high-temperature calibration coefficient and the coarse-adjusted high-temperature calibration curve formula of the preset coarse-adjusted calibration curve model, wherein the coarse-adjusted high-temperature calibration curve formula is:
[0137] F m =B2*(T-25) 2 +F1
[0138] Among them, F m B2 is the coarse-tuning high-temperature calibration curve, T is the real-time temperature, and F1 is the initial frequency deviation.
[0139] Step S30: Obtain the fine-tuning calibration coefficient of the target to be calibrated at the fine-tuning temperature calibration point, wherein the fine-tuning temperature calibration point is within the preset fine-tuning calibration temperature range of the target to be calibrated;
[0140] In this embodiment, it should be noted that the fine-tuning temperature calibration point is used to characterize the calibration temperature corresponding to the fine-tuning target to be calibrated. The fine-tuning method can be the method of calibrating the fine-tuning calibration coefficient. The fine-tuning calibration coefficient is used to characterize the fine-tuning compensation coefficient of the target to be calibrated. That is, the fine-tuning calibration coefficient is the fine-tuning compensation coefficient. The fine-tuning temperature calibration point includes a fine-tuning low temperature calibration point, a fine-tuning room temperature calibration point, and a fine-tuning high temperature calibration point.
[0141] Additionally, it should be noted that the preset fine-tuning calibration temperature range is set by the user based on the operating temperature range of the target to be calibrated. For example, assuming the operating temperature range of the target to be calibrated is -25℃ to 55℃, the user can set the preset fine-tuning calibration temperature range to -40℃ to 80℃ to ensure that the target to be calibrated can be finely compensated using the fine-tuning calibration curve within the operating temperature range.
[0142] As an example, step S30 includes: obtaining the fine-tuning calibration coefficient of the target to be calibrated at the fine-tuning low temperature calibration point, the fine-tuning calibration coefficient at the fine-tuning room temperature calibration point, and the fine-tuning calibration coefficient at the fine-tuning high temperature calibration point, wherein the fine-tuning temperature calibration point is within the preset fine-tuning calibration temperature range of the target to be calibrated.
[0143] The step of obtaining the fine-tuning calibration coefficient of the target to be calibrated at the fine-tuning temperature calibration point includes:
[0144] Step D10: Obtain the third clock error value of the target to be calibrated at a preset number of fine-tuning temperature calibration points;
[0145] Step D20: Input each of the third clock error values into the preset frequency offset calculation model to obtain each of the fine-tuning calibration coefficients;
[0146] In this embodiment, it should be noted that the third clock error value is used to characterize the clock error of the target to be calibrated at the fine-tuning temperature calibration points. The preset number of fine-tuning temperature calibration points are selected by the user within the preset fine-tuning calibration temperature range of the target to be calibrated. For example, in one feasible approach, 17℃, 20℃, 23℃, 26℃ and 29℃ can be selected as 5 fine-tuning room temperature calibration points, -31℃, -28℃, -25℃, -22℃ and -19℃ can be selected as 5 fine-tuning low temperature calibration points, and 49℃, 52℃, 55℃, 58℃ and 61℃ can be selected as 5 fine-tuning high temperature calibration points.
[0147] As an example, steps D10 to D20 include: obtaining the third clock error value of the target to be calibrated under a preset number of fine-tuning low-temperature calibration points, a preset number of fine-tuning room-temperature calibration points, and a preset number of fine-tuning high-temperature calibration points, wherein the preset number of fine-tuning low-temperature calibration points, fine-tuning room-temperature calibration points, and fine-tuning high-temperature calibration points may be the same or different; calculating each of the fine-tuning calibration coefficients using each of the third error values and the frequency offset calculation formula of the preset frequency offset calculation model, wherein the frequency offset calculation formula is:
[0148] F x =E x / 0.0864*100
[0149] Among them, F x E represents the fine-tuning calibration coefficients described above. x This can be the third clock error value mentioned above.
[0150] In one feasible approach, assuming the user selects 20℃, 23℃, and 26℃ as three fine-tuning room temperature calibration points, -28℃, -25℃, and -22℃ as three fine-tuning low temperature calibration points, and 52℃, 55℃, and 58℃ as three fine-tuning high temperature calibration points, then each fine-tuning compensation coefficient includes the fine-tuning room temperature compensation coefficient corresponding to 20℃, the fine-tuning room temperature compensation coefficient corresponding to 23℃, the fine-tuning room temperature compensation coefficient corresponding to 26℃, the fine-tuning low temperature compensation coefficient corresponding to -28℃, the fine-tuning low temperature compensation coefficient corresponding to -25℃, the fine-tuning low temperature compensation coefficient corresponding to -22℃, the fine-tuning high temperature compensation coefficient corresponding to 52℃, the fine-tuning high temperature compensation coefficient corresponding to 55℃, and the fine-tuning high temperature compensation coefficient corresponding to 58℃, and each of these fine-tuning compensation coefficients is written into the electricity meter.
[0151] Step S40: Based on the real-time temperature of the target to be calibrated, the fine-tuning calibration coefficient and the coarse-tuning calibration curve are fused to obtain the fine-tuning calibration curve of the target to be calibrated, wherein the fine-tuning calibration curve is used to fine-tune the compensation of the target to be calibrated.
[0152] In this embodiment, it should be noted that the fine-tuning calibration curve is used to characterize the clock error temperature fine-tuning curve of the target to be calibrated at different temperatures. The fine-tuning calibration curve includes a fine-tuning calibration curve for a preset low temperature range, a fine-tuning calibration curve for a preset normal temperature range, and a fine-tuning calibration curve for a preset high temperature range. The fine-tuning calibration curve is automatically generated in the target to be calibrated based on the fusion result of the fine-tuning calibration coefficient and the coarse-tuning calibration curve. The fine-tuning calibration curve for the preset low temperature range is used to characterize the clock error temperature fine-tuning curve of the target to be calibrated at low temperatures, the fine-tuning calibration curve for the preset normal temperature range is used to characterize the clock error temperature fine-tuning curve of the target to be calibrated at normal temperatures, and the fine-tuning calibration curve for the preset high temperature range is used to characterize the clock error temperature fine-tuning curve of the target to be calibrated at high temperatures.
[0153] As an example, step S40 includes: determining the preset temperature range to which the target to be calibrated belongs based on the real-time temperature of the target to be calibrated, and fusing the fine-tuning calibration coefficients corresponding to the preset temperature range with the coarse-tuning calibration curve to obtain the fine-tuning calibration curve of the target to be calibrated, wherein the fine-tuning calibration curve is used to fine-tun and compensate the target to be calibrated.
[0154] The step of fusing the fine-tuning calibration coefficient and the coarse-tuning calibration curve based on the real-time temperature of the target to be calibrated to obtain the fine-tuning calibration curve of the target to be calibrated includes:
[0155] Step E10: Based on the real-time temperature, determine the temperature range to which the target to be calibrated belongs, and determine the correlation between the real-time temperature and a preset number of fine-tuning temperature calibration points within the temperature range.
[0156] Step E20: If the correlation is determined to be the first correlation, then based on the real-time temperature of the target to be calibrated, determine the first and second fine-tuning temperature calibration points for fine-tuning the target to be calibrated.
[0157] Step E30: Calculate the fine-tuning calibration target coefficient of the target to be calibrated based on the first fine-tuning calibration coefficient corresponding to the first fine-tuning temperature calibration point and the second fine-tuning calibration coefficient corresponding to the second fine-tuning temperature calibration point.
[0158] Step E40: Determine the fine-tuning calibration curve of the target to be calibrated based on the fine-tuning calibration target coefficient and the coarse-tuning calibration curve.
[0159] Step E50: If the correlation is determined to be a second correlation, then the fine-tuning calibration curve of the target to be calibrated is determined based on the third fine-tuning calibration coefficient corresponding to the third fine-tuning temperature calibration point within the subordinate temperature range and the coarse-tuning calibration curve.
[0160] Step E60: If the correlation is determined to be a third correlation, then the fine-tuning calibration curve of the target to be calibrated is determined based on the fourth fine-tuning calibration coefficient corresponding to the fourth fine-tuning temperature calibration point within the subordinate temperature range and the coarse-tuning calibration curve.
[0161] In this embodiment, it should be noted that the subordinate temperature range is used to characterize the preset temperature range to which the real-time temperature belongs. The preset temperature range includes a preset low temperature range, a preset normal temperature range, and a preset high temperature range. For example, assuming that the user sets the preset low temperature range to below 0°C, the preset normal temperature range to 0°C to 40°C, and the preset high temperature range to above 40°C, then when the real-time temperature of the target to be calibrated is 55°C, the target to be calibrated is located in the preset high temperature range, and when the real-time temperature of the target to be calibrated is 22°C, the target to be calibrated is located in the preset normal temperature range.
[0162] Additionally, it should be noted that the fine-tuning calibration target coefficient is used to characterize the fine-tuning compensation coefficient of the target to be calibrated at the real-time temperature. The first fine-tuning temperature calibration point and the second fine-tuning temperature calibration point are determined by the real-time temperature, wherein the second fine-tuning temperature calibration point is greater than the first fine-tuning temperature calibration point. The first fine-tuning calibration coefficient is used to characterize the fine-tuning compensation coefficient of the target to be calibrated at the first fine-tuning temperature calibration point, and the second fine-tuning calibration coefficient is used to characterize the fine-tuning compensation coefficient of the target to be calibrated at the second fine-tuning temperature calibration point. The calibration point is used to characterize the fine-tuning temperature calibration point selected from the preset number of fine-tuning temperature calibration points that is not greater than the real-time temperature and has the smallest absolute temperature difference. The second fine-tuning temperature calibration point is used to characterize the fine-tuning temperature calibration point selected from the preset number of fine-tuning temperature calibration points that is greater than the real-time temperature and has the smallest absolute temperature difference. For example, assuming the real-time temperature is 21°C and the preset number of fine-tuning room temperature calibration points are 17°C, 20°C, 23°C, 26°C, and 29°C, then the first fine-tuning temperature calibration point is 20°C and the second fine-tuning temperature calibration point is 23°C.
[0163] Additionally, it should be noted that the correlation is used to characterize the membership relationship between the real-time temperature and a preset number of fine-tuning temperature calibration points within the subordinate temperature range. Specifically, the first correlation characterizes the real-time temperature as being in the middle of the preset number of fine-tuning calibration temperatures within the subordinate temperature range; the second correlation characterizes the real-time temperature as being less than the lowest fine-tuning temperature calibration point within the subordinate temperature range; the third fine-tuning temperature calibration point is the lowest fine-tuning temperature calibration point within the subordinate temperature range; the fourth correlation characterizes the real-time temperature as being greater than the highest fine-tuning temperature calibration point within the subordinate temperature range; and the fifth fine-tuning temperature calibration point is the highest fine-tuning temperature calibration point within the subordinate temperature range. For example, assuming the preset low temperature range is below 0℃, the preset normal temperature range is 0℃ to 40℃, and the preset high temperature range is above 40℃, the preset low temperature range has 5 fine-tuning temperature calibration points: -31℃, -28℃, -25℃, -22℃, and -19℃; the preset normal temperature range has 5 fine-tuning temperature calibration points: 17℃, 20℃, 23℃, 26℃, and 29℃; and the preset high temperature range has 5 fine-tuning temperature calibration points: 49℃, 52℃, 55℃, 56℃, 57℃, 58℃, 59 ... 58℃ and 61℃. When the real-time temperature is 24℃, the subordinate temperature range is the preset normal temperature range, the correlation is the first correlation, the first fine-tuning temperature calibration point is 23℃, the second fine-tuning temperature calibration point is 26℃. When the real-time temperature is 16℃, the correlation is the second correlation, the third fine-tuning temperature calibration point is 17℃. When the real-time temperature is 64℃, the correlation is the third correlation, and the fourth fine-tuning temperature calibration point is 61℃.
[0164] As an example, steps E10 to E60 include: determining the preset temperature range to which the target to be calibrated belongs based on the real-time temperature, and determining the correlation between the real-time temperature and a preset number of fine-tuning temperature calibration points within the preset temperature range, wherein the preset temperature range includes a preset low temperature range, a preset normal temperature range, and a preset high temperature range, and the preset number can be multiple, and the correlation is a first correlation, a second correlation, or a third correlation; if the real-time temperature is located in the middle of the preset number of fine-tuning calibration temperatures within the temperature range, then selecting the fine-tuning temperature calibration point with the smallest absolute temperature difference and the fine-tuning temperature calibration point with the smallest absolute temperature difference that is not greater than the real-time temperature from the preset number of fine-tuning temperature calibration points corresponding to the temperature range; inputting the fine-tuning compensation coefficient of the fine-tuning temperature calibration point with the smallest absolute temperature difference and the fine-tuning compensation coefficient of the fine-tuning temperature calibration point with the smallest absolute temperature difference that is greater than the real-time temperature into the fine-tuning calibration target coefficient calculation model to obtain the fine-tuning calibration target coefficient, wherein the calculation formula for the fine-tuning calibration target coefficient is as follows:
[0165] F y =F x1 +(TT x1 )*(F x2 -F x1 ) / (T x2 -T x1 )
[0166] Among them, F y The fine-tuning calibration target coefficient is T, and the real-time temperature is T. x1 The first fine-tuning temperature calibration point can be 20℃, -25℃, or 52℃. x2 This is the second fine-tuning temperature calibration point, specifically 23℃, -22℃, or 55℃. x1 F is the first fine-tuning calibration coefficient. x2 This is the second fine-tuning calibration coefficient;
[0167] The fine-tuning calibration target coefficient and the coarse-tuning calibration curve are input into a preset fine-tuning calibration curve model to obtain the fine-tuning calibration curve of the target to be calibrated. The preset fine-tuning calibration curve model is used to calculate the fine-tuning calibration curve, and it includes a fine-tuning calibration curve calculation formula. The fine-tuning calibration curve calculation formula is as follows:
[0168] F1 ` =F y1 +F
[0169] Among them, F1 ` For the fine-tuning calibration curve corresponding to the first correlation, Fy1 Let F be the target coefficient for fine-tuning calibration, and F be the coarse-tuning calibration curve, where F can specifically be F0. n or F m F n For the first coarse calibration curve, F m This is the second coarse adjustment calibration curve;
[0170] If the real-time temperature is less than the lowest fine-tuning temperature calibration point within the preset fine-tuning temperature calibration point in the subordinate temperature range, then the fine-tuning calibration coefficient of the target to be calibrated at the lowest fine-tuning temperature calibration point within the preset fine-tuning temperature calibration point in the subordinate temperature range and the coarse-tuning calibration curve are input into the preset fine-tuning calibration curve model to obtain the fine-tuning calibration curve of the target to be calibrated. The preset fine-tuning calibration curve model is used to calculate the fine-tuning calibration curve, and the preset fine-tuning calibration curve model is equipped with a fine-tuning calibration curve calculation formula, which is:
[0171] F2 ` =F y2 +F
[0172] Among them, F2 ` For the fine-tuning calibration curve corresponding to the second correlation, F y2 Let F be the fine-tuning calibration coefficient corresponding to the third fine-tuning temperature calibration point, and let F be the coarse-tuning calibration curve. Specifically, F can be F... n or F m F n For the first coarse calibration curve, F m This is the second coarse adjustment calibration curve;
[0173] If the real-time temperature is greater than the highest fine-tuning temperature calibration point within the preset fine-tuning temperature calibration point in the subordinate temperature range, then the fine-tuning calibration coefficient of the target to be calibrated at the highest fine-tuning temperature calibration point within the preset fine-tuning temperature calibration point in the subordinate temperature range and the coarse-tuning calibration curve are input into the preset fine-tuning calibration curve model to obtain the fine-tuning calibration curve of the target to be calibrated. The preset fine-tuning calibration curve model is used to calculate the fine-tuning calibration curve, and the preset fine-tuning calibration curve model is equipped with a fine-tuning calibration curve calculation formula, which is:
[0174] F3 ` =F y3 +F
[0175] Among them, F3 ` For the fine-tuning calibration curve corresponding to the third correlation, F y3 Let F be the fine-tuning calibration coefficient corresponding to the third fine-tuning temperature calibration point, and let F be the coarse-tuning calibration curve. Specifically, F can be F...n or F m F n For the first coarse calibration curve, F m This is the second coarse adjustment calibration curve.
[0176] Step S50: Calibrate the target to be calibrated according to the fine-tuning calibration curve.
[0177] As an example, step S50 includes: calibrating the target to be calibrated according to the fine-tuning calibration curve of the preset low temperature range, the fine-tuning calibration curve of the preset normal temperature range, or the fine-tuning calibration curve of the preset high temperature range.
[0178] The step of calibrating the target to be calibrated based on the fine-tuning calibration curve includes:
[0179] Step F10: When the real-time temperature of the target to be calibrated is detected to be within a preset low temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset low temperature range.
[0180] Step F20: When the real-time temperature of the target to be calibrated is detected to be within the preset room temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset room temperature range.
[0181] Step F30: When the real-time temperature of the target to be calibrated is detected to be within a preset high temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset high temperature range.
[0182] As an example, steps F10 to F30 include: determining the preset temperature range to which the real-time temperature of the target to be calibrated belongs; if the real-time temperature of the target to be calibrated is in a preset low-temperature range, then calibrating the target to be calibrated according to the fine-tuning calibration curve of the preset low-temperature range; if the real-time temperature of the target to be calibrated is in a preset normal-temperature range, then calibrating the target to be calibrated according to the fine-tuning calibration curve of the preset normal-temperature range; if the real-time temperature of the target to be calibrated is in a preset high-temperature range, then calibrating the target to be calibrated according to the fine-tuning calibration curve of the preset high-temperature range. This allows for real-time detection of the operating temperature of the target to be calibrated, thereby achieving further fine-tuning compensation in three temperature ranges: low, normal, and high, greatly improving the clock calibration accuracy of the energy meter.
[0183] In one feasible approach, assuming the fine-tuning compensation coefficients written to the electricity meter include fine-tuning room temperature compensation coefficients corresponding to 20℃, 26℃, -28℃, -22℃, 52℃, and 58℃, then the fine-tuning room temperature calibration curve of the target to be calibrated can be obtained based on the fine-tuning room temperature compensation coefficients corresponding to 20℃ and 26℃, and based on the fine-tuning room temperature compensation coefficients corresponding to -28℃ and -2... The fine-tuned low-temperature calibration curve of the target to be calibrated is obtained by adjusting the low-temperature compensation coefficient corresponding to 2℃. The fine-tuned high-temperature calibration curve is obtained by adjusting the high-temperature compensation coefficient corresponding to 52℃ and 58℃. When the real-time temperature of the target to be calibrated is detected to be 20℃, the fine-tuned compensation value corresponding to 20℃ is obtained according to the fine-tuned room temperature calibration curve to calibrate the target to be calibrated. When the real-time temperature of the target to be calibrated is detected to be 52℃, the fine-tuned compensation value corresponding to 52℃ is obtained according to the fine-tuned high-temperature calibration curve to calibrate the target to be calibrated.
[0184] This application provides a clock calibration method applied to an electricity meter. Specifically, it involves: obtaining the coarse calibration coefficient of the target to be calibrated at a base temperature calibration point, wherein the base temperature calibration point includes a base room temperature calibration point and a base non-base temperature calibration point; determining a coarse calibration curve of the target to be calibrated based on the correspondence between the real-time temperature of the target and the coarse calibration coefficient, wherein the coarse calibration curve is used for coarse adjustment compensation of the target; obtaining the fine calibration coefficient of the target to be calibrated at a fine adjustment temperature calibration point, wherein the fine adjustment temperature calibration point is within a preset fine adjustment calibration temperature range of the target; fusing the fine adjustment calibration coefficient and the coarse calibration curve based on the real-time temperature of the target to obtain a fine adjustment calibration curve of the target, wherein the fine adjustment calibration curve is used for fine adjustment compensation of the target; and calibrating the target to be calibrated based on the fine adjustment calibration curve. Since the basic temperature calibration points include both basic ambient temperature calibration points and basic non-ambient temperature calibration points, it is possible not only to calibrate the initial frequency deviation at a reference temperature of 23℃, but also to calibrate the low-temperature quadratic coefficient and high-temperature quadratic coefficient through the basic non-ambient temperature calibration points. This avoids the technical problem of low clock calibration accuracy of the energy meter caused by setting the low-temperature quadratic coefficient and high-temperature quadratic coefficient as empirical values. Furthermore, by using fine-tuning temperature points, the fine-tuning calibration coefficient of the energy meter within the preset fine-tuning calibration temperature range is calibrated. This achieves the goal of matching the energy meter with the corresponding fine-tuning calibration curve for temperature calibration within the preset fine-tuning calibration temperature range, thereby overcoming the technical defects of existing technologies that rely solely on a reference temperature of 23℃ to calibrate the energy meter's clock, and greatly improving the clock calibration accuracy of the energy meter.
[0185] Example 2
[0186] Furthermore, referring to Figure 2 In another embodiment of this application, content that is the same as or similar to that in Embodiment 1 described above can be referred to the above description and will not be repeated hereafter. Based on this, before the step of obtaining the coarse adjustment calibration coefficient of the target to be calibrated at the base temperature calibration point, the clock calibration method further includes:
[0187] Step G10: Obtain the real-time temperature of the target to be calibrated, and calculate the temperature change value of the real-time temperature within a preset time period;
[0188] Step G20: Based on the temperature change value, determine whether the real-time temperature is stable at the basic temperature calibration point.
[0189] In this embodiment, it should be noted that the preset time period is set by the user, specifically 5 minutes, 6 minutes, and 7 minutes, etc. The temperature change value is used to characterize the real-time temperature change of the target to be calibrated within the preset time period. Whether the real-time temperature is stable at the base temperature calibration point can be determined by a preset temperature change value threshold, specifically 0.5℃, 0.6℃, and 0.7℃, etc. The determination method can be by comparison. For example, assuming the user sets the preset time period to 5 minutes, the base temperature calibration point and the real-time temperature are both 23℃, and the preset temperature difference threshold is 0.5℃, if the real-time temperature of the target to be calibrated is obtained again after 5 minutes and is 23.3℃, then it is determined that the real-time temperature is stable at the base temperature calibration point, and then the next step can be performed: obtaining the coarse adjustment calibration coefficient of the target to be calibrated at the base temperature calibration point.
[0190] As an example, steps G10 to G20 include: acquiring a first real-time temperature of the target to be calibrated and a second real-time temperature of the target after a preset time period; calculating the difference between the first real-time temperature and the second real-time temperature to obtain a temperature change value, wherein the first real-time temperature and the second real-time temperature are the real-time temperatures of the same energy meter at different time points, that is, the first real-time temperature is the starting real-time temperature of the preset time period, and the second real-time temperature is the ending real-time temperature of the preset time period. For example, assuming the preset time period is 5 minutes, and the first real-time temperature is measured by an internal temperature sensor at 17:33:19, then the measurement time of the second real-time temperature is 17:38:19. The calculation method can be achieved by using a preset deviation value calculation formula, which is:
[0191] T n =|Tx -T y |
[0192] Among them, T n The temperature change value, T x T is the first real-time temperature. y The second real-time temperature,
[0193] The temperature change value is calculated as the absolute difference between the starting real-time temperature and the ending real-time temperature over a preset time period. For example, assuming the third determination checks whether the temperature change value is less than a preset temperature difference threshold, the third calculation formula is:
[0194]
[0195] Among them, T n The temperature change value, The starting real-time temperature for the preset time period in the third calculation. The real-time temperature at the end of the preset time period in the third calculation;
[0196] Based on the relationship between the temperature change value and the preset temperature difference threshold, it is detected whether the real-time temperature is stable at the basic temperature calibration point. If the temperature change value is greater than the preset temperature difference threshold, it is detected that the real-time temperature is not stable at the basic temperature calibration point, and the process returns to the execution step: by calculating the difference between the first real-time temperature and the second real-time temperature, the temperature change value is obtained, and based on the temperature change value, it is determined whether the real-time temperature is stable at the basic temperature calibration point. When the target to be calibrated returns to the execution step, the preset time period is the same as the preset time period calculated initially. For example, assuming the preset time period calculated initially is 5 minutes, the preset time period calculated second time is still 5 minutes. If the temperature change value is not greater than the preset temperature difference threshold, it is determined that the real-time temperature is stable at the basic temperature calibration point.
[0197] Additionally, it should be noted that before obtaining the fine-tuning calibration coefficient of the target under the fine-tuning temperature calibration point, it is still necessary to obtain the real-time temperature of the target, calculate the temperature change value of the real-time temperature within a preset time period, and then determine whether the real-time temperature is stable at the fine-tuning temperature calibration point based on the temperature change value. When the real-time temperature is stable at the fine-tuning temperature calibration point, a preset number of fine-tuning temperature calibration points are obtained sequentially, and then the fine-tuning calibration coefficient of the target under the fine-tuning temperature calibration point is obtained. The specific steps for determining whether the real-time temperature is stable at the fine-tuning temperature calibration point can be referred to in steps G10 to G20, which will not be repeated here. Then, the fine-tuning calibration coefficient and the coarse-tuning calibration curve are fused to obtain the fine-tuning calibration curve of the target. The steps for obtaining the fine-tuning calibration curve of the target can be referred to in Embodiment 1 of this application, which will not be repeated here.
[0198] This application provides a method for determining whether the real-time temperature is stable at a base temperature calibration point. Specifically, it involves acquiring the real-time temperature of the target to be calibrated, calculating the temperature change over a preset time period, and determining whether the real-time temperature is stable at the base temperature calibration point based on the temperature change. Compared to using the instantaneous real-time temperature of the target as the base temperature calibration point, obtaining a fine-tuning temperature calibration point in the same way, and then obtaining a fine-tuning calibration curve based on the base temperature calibration point and the fine-tuning temperature calibration point to calibrate the target, this application determines the real-time temperature change of the target over a period of time. Only when the real-time temperature of the target is detected to be stable at the base temperature calibration point is the coarse-tuning calibration coefficient obtained at the base temperature calibration point obtained; and only when the real-time temperature of the target is detected to be stable at the fine-tuning temperature calibration point is the fine-tuning calibration coefficient obtained. This avoids the inaccuracy of the coarse-tuning and fine-tuning calibration coefficients due to real-time temperature instability, thus laying the foundation for accurate calibration of the target.
[0199] Example 3
[0200] This application also provides a clock calibration device, the clock calibration device comprising:
[0201] The coarse adjustment coefficient acquisition module is used to acquire the coarse adjustment calibration coefficient of the target to be calibrated at the base temperature calibration point, wherein the base temperature calibration point includes the base room temperature calibration point and the base non-temperature calibration point.
[0202] The coarse adjustment curve acquisition module is used to determine the coarse adjustment calibration curve of the target to be calibrated based on the correspondence between the real-time temperature of the target to be calibrated and the coarse adjustment calibration coefficient, wherein the coarse adjustment calibration curve is used to perform coarse adjustment compensation on the target to be calibrated.
[0203] The fine-tuning coefficient acquisition module is used to acquire the fine-tuning calibration coefficient of the target to be calibrated at the fine-tuning temperature calibration point, wherein the fine-tuning temperature calibration point is within the preset fine-tuning calibration temperature range of the target to be calibrated.
[0204] The fine-tuning curve acquisition module is used to fuse the fine-tuning calibration coefficient and the coarse-tuning calibration curve based on the real-time temperature of the target to be calibrated, so as to obtain the fine-tuning calibration curve of the target to be calibrated, wherein the fine-tuning calibration curve is used to perform fine-tuning compensation on the target to be calibrated.
[0205] The calibration module is used to calibrate the target to be calibrated based on the fine-tuning calibration curve.
[0206] Optionally, the coarse adjustment calibration coefficient includes an initial frequency offset and a coarse adjustment very-temperature calibration coefficient, and the coarse adjustment coefficient acquisition module is further used for:
[0207] Obtain the first clock error value of the target to be calibrated at the basic room temperature calibration point, and input the first clock error value into the preset frequency offset calculation model to obtain the initial frequency offset;
[0208] Obtain the second clock error value of the target to be calibrated at the basic extreme temperature calibration point, and determine the coarse adjustment extreme temperature calibration coefficient based on the second clock error value.
[0209] Optionally, the second clock error value includes a second low-temperature clock error value and a second high-temperature clock error value, the coarse adjustment non-temperature calibration coefficient includes a coarse adjustment low-temperature calibration coefficient and a coarse adjustment high-temperature calibration coefficient, and the coarse adjustment coefficient acquisition module is further used for:
[0210] The second low-temperature clock error value is input into the preset frequency offset calculation model to obtain the low-temperature frequency offset;
[0211] The basic low temperature calibration point corresponding to the basic very low temperature calibration point, the initial frequency offset, and the low temperature frequency offset are fused to obtain the coarse low temperature calibration coefficient.
[0212] The second high-temperature clock error value is input into the preset frequency offset calculation model to obtain the high-temperature frequency offset;
[0213] The basic high-temperature calibration point corresponding to the basic very low-temperature calibration point, the initial frequency offset, and the high-temperature frequency offset are fused to obtain the coarse-tuned high-temperature calibration coefficient.
[0214] Optionally, the coarse adjustment calibration coefficient includes a first coarse adjustment calibration coefficient and a second coarse adjustment calibration coefficient, and the coarse adjustment curve acquisition module is further used for:
[0215] Determine whether the real-time temperature is lower than the baseline room temperature calibration point;
[0216] If it is less than, then the first coarse adjustment calibration coefficient is input into the preset coarse adjustment calibration curve model to obtain the first coarse adjustment calibration curve;
[0217] If it is not less than, then the second coarse adjustment calibration coefficient is input into the preset coarse adjustment calibration curve model to obtain the second coarse adjustment calibration curve.
[0218] Optionally, the fine-tuning coefficient acquisition module is further configured to:
[0219] Obtain the third clock error value of the target to be calibrated at a preset number of fine-tuning temperature calibration points;
[0220] Each of the aforementioned third clock error values is input into a preset frequency offset calculation model to obtain each of the aforementioned fine-tuning calibration coefficients.
[0221] Optionally, the fine-tuning curve acquisition module is further configured to:
[0222] Based on the real-time temperature, the temperature range to which the target to be calibrated belongs is determined, and the correlation between the real-time temperature and a preset number of fine-tuning temperature calibration points within the temperature range is determined.
[0223] If the correlation is determined to be the first correlation, then based on the real-time temperature of the target to be calibrated, the first and second fine-tuning temperature calibration points for fine-tuning the target to be calibrated are determined.
[0224] Based on the first fine-tuning calibration coefficient corresponding to the first fine-tuning temperature calibration point and the second fine-tuning calibration coefficient corresponding to the second fine-tuning temperature calibration point, calculate the fine-tuning calibration target coefficient of the target to be calibrated.
[0225] Based on the fine-tuning calibration target coefficient and the coarse-tuning calibration curve, the fine-tuning calibration curve of the target to be calibrated is determined;
[0226] If the correlation is determined to be a second correlation, then the fine-tuning calibration curve of the target to be calibrated is determined based on the third fine-tuning calibration coefficient corresponding to the third fine-tuning temperature calibration point within the subordinate temperature range and the coarse-tuning calibration curve.
[0227] If the correlation is determined to be a third correlation, then the fine-tuning calibration curve of the target to be calibrated is determined based on the fourth fine-tuning calibration coefficient corresponding to the fourth fine-tuning temperature calibration point within the subordinate temperature range and the coarse-tuning calibration curve.
[0228] Optionally, the calibration module is further configured to:
[0229] When the real-time temperature of the target to be calibrated is detected to be within a preset low temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset low temperature range.
[0230] When the real-time temperature of the target to be calibrated is detected to be within the preset room temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset room temperature range.
[0231] When the real-time temperature of the target to be calibrated is detected to be within a preset high temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset high temperature range.
[0232] Optionally, the clock calibration device is also used for:
[0233] Obtain the real-time temperature of the target to be calibrated, and calculate the temperature change value of the real-time temperature within a preset time period;
[0234] Based on the temperature change value, determine whether the real-time temperature is stable at the basic temperature calibration point.
[0235] The clock calibration device provided by this invention, employing the clock calibration method described in the above embodiments, solves the technical problem of low clock calibration accuracy in electricity meters. Compared with the prior art, the beneficial effects of the clock calibration device provided by this invention are the same as those of the clock calibration method described in the above embodiments, and other technical features of this clock calibration device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0236] Example 4
[0237] This invention provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the clock calibration method described in Embodiment 1 above.
[0238] The following is for reference. Figure 3 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 3The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0239] like Figure 3 As shown, an electronic device may include a processing unit (such as a central processing unit, graphics processing unit, etc.) that can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) or a program loaded from a storage device into random access memory (RAM). The RAM also stores various programs and data required for the operation of the electronic device. The processing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0240] Typically, the following systems can be connected to the I / O interface: input devices including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices including, for example, magnetic tapes, hard disks, etc.; and communication devices. Communication devices allow electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although electronic devices with various systems are shown in the figures, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.
[0241] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined above in the methods of embodiments of this disclosure.
[0242] The electronic device provided by this invention, employing the clock calibration method described in the above embodiments, solves the technical problem of low clock calibration accuracy in electricity meters. Compared with the prior art, the beneficial effects of the electronic device provided by this invention are the same as those of the clock calibration method provided in Embodiment 1 above, and other technical features of this electronic device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0243] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.
[0244] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0245] Example 5
[0246] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, which are used to execute the clock calibration method in the first embodiment described above.
[0247] The computer-readable storage medium provided in this embodiment of the invention may be, for example, a USB flash drive, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0248] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0249] The aforementioned computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to: acquire the coarse calibration coefficients of the target to be calibrated at a base temperature calibration point, wherein the base temperature calibration point includes a base room temperature calibration point and a base non-room temperature calibration point; determine the coarse calibration curve of the target to be calibrated based on the correspondence between the real-time temperature of the target to be calibrated and the coarse calibration coefficients, wherein the coarse calibration curve is used for coarse compensation of the target to be calibrated; acquire the fine calibration coefficients of the target to be calibrated at a fine calibration point, wherein the fine calibration point is within a preset fine calibration temperature range of the target to be calibrated; fuse the fine calibration coefficients and the coarse calibration curve based on the real-time temperature of the target to be calibrated to obtain the fine calibration curve of the target to be calibrated, wherein the fine calibration curve is used for fine compensation of the target to be calibrated; and calibrate the target to be calibrated based on the fine calibration curve.
[0250] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0251] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0252] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0253] The computer-readable storage medium provided by this invention stores computer-readable program instructions for performing the above-described clock calibration method, thus solving the technical problem of low clock calibration accuracy in electricity meters. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this invention are the same as those of the clock calibration method provided in the above-described embodiments, and will not be repeated here.
[0254] Example 6
[0255] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the clock calibration method described above.
[0256] The computer program product provided in this application solves the technical problem of low clock calibration accuracy in electricity meters. Compared with the prior art, the beneficial effects of the computer program product provided in this embodiment are the same as those of the clock calibration method provided in the above embodiments, and will not be repeated here.
[0257] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.
Claims
1. A clock calibration method, characterized in that, The clock calibration method, applied to electricity meters, includes: Obtain the coarse adjustment calibration coefficient of the target to be calibrated at the base temperature calibration point, wherein the base temperature calibration point includes the base room temperature calibration point and the base non-temperature calibration point, and the coarse adjustment calibration coefficient includes the initial frequency deviation and the coarse adjustment non-temperature calibration coefficient. Based on the correspondence between the real-time temperature of the target to be calibrated and the coarse adjustment calibration coefficient, a coarse adjustment calibration curve for the target to be calibrated is determined, wherein the coarse adjustment calibration curve is used to perform coarse adjustment compensation on the target to be calibrated. Obtain the fine-tuning calibration coefficient of the target to be calibrated at the fine-tuning temperature calibration point, wherein the fine-tuning temperature calibration point is within the preset fine-tuning calibration temperature range of the target to be calibrated; Based on the real-time temperature of the target to be calibrated, the fine-tuning calibration coefficient and the coarse-tuning calibration curve are fused to obtain the fine-tuning calibration curve of the target to be calibrated, wherein the fine-tuning calibration curve is used to fine-tune the compensation of the target to be calibrated. The target to be calibrated is calibrated according to the fine-tuning calibration curve. The step of obtaining the coarse calibration coefficient of the target to be calibrated at the basic temperature calibration point includes: Obtain the first clock error value of the target to be calibrated at the basic room temperature calibration point, and input the first clock error value into the preset frequency offset calculation model to obtain the initial frequency offset; Obtain the second clock error value of the target to be calibrated at the basic extreme temperature calibration point, and determine the coarse adjustment extreme temperature calibration coefficient based on the second clock error value.
2. The clock calibration method as described in claim 1, characterized in that, The second clock error value includes a second low-temperature clock error value and a second high-temperature clock error value, and the coarse adjustment non-temperature calibration coefficient includes a coarse adjustment low-temperature calibration coefficient and a coarse adjustment high-temperature calibration coefficient. The step of determining the coarse adjustment non-temperature calibration coefficient based on the second clock error value includes: The second low-temperature clock error value is input into the preset frequency offset calculation model to obtain the low-temperature frequency offset; The basic low temperature calibration point corresponding to the basic very low temperature calibration point, the initial frequency offset, and the low temperature frequency offset are fused to obtain the coarse low temperature calibration coefficient. The second high-temperature clock error value is input into the preset frequency offset calculation model to obtain the high-temperature frequency offset; The basic high-temperature calibration point corresponding to the basic very low-temperature calibration point, the initial frequency offset, and the high-temperature frequency offset are fused to obtain the coarse-tuned high-temperature calibration coefficient.
3. The clock calibration method as described in claim 1, characterized in that, The coarse adjustment calibration coefficients include a first coarse adjustment calibration coefficient and a second coarse adjustment calibration coefficient. The step of determining the coarse calibration curve of the target to be calibrated based on the correspondence between the real-time temperature of the target and the coarse calibration coefficient includes: Determine whether the real-time temperature is lower than the baseline room temperature calibration point; If it is less than, then the first coarse adjustment calibration coefficient is input into the preset coarse adjustment calibration curve model to obtain the first coarse adjustment calibration curve; If it is not less than, then the second coarse adjustment calibration coefficient is input into the preset coarse adjustment calibration curve model to obtain the second coarse adjustment calibration curve.
4. The clock calibration method as described in claim 1, characterized in that, The step of obtaining the fine-tuning calibration coefficient of the target to be calibrated at the fine-tuning temperature calibration point includes: Obtain the third clock error value of the target to be calibrated at a preset number of fine-tuning temperature calibration points; Each of the aforementioned third clock error values is input into a preset frequency offset calculation model to obtain each of the aforementioned fine-tuning calibration coefficients.
5. The clock calibration method as described in claim 1, characterized in that, The step of fusing the fine-tuning calibration coefficient and the coarse-tuning calibration curve based on the real-time temperature of the target to be calibrated to obtain the fine-tuning calibration curve of the target to be calibrated includes: Based on the real-time temperature, the temperature range to which the target to be calibrated belongs is determined, and the correlation between the real-time temperature and a preset number of fine-tuning temperature calibration points within the temperature range is determined. If the correlation is determined to be the first correlation, then based on the real-time temperature of the target to be calibrated, the first and second fine-tuning temperature calibration points for fine-tuning the target to be calibrated are determined. Based on the first fine-tuning calibration coefficient corresponding to the first fine-tuning temperature calibration point and the second fine-tuning calibration coefficient corresponding to the second fine-tuning temperature calibration point, calculate the fine-tuning calibration target coefficient of the target to be calibrated. Based on the fine-tuning calibration target coefficient and the coarse-tuning calibration curve, the fine-tuning calibration curve of the target to be calibrated is determined; If the correlation is determined to be a second correlation, then the fine-tuning calibration curve of the target to be calibrated is determined based on the third fine-tuning calibration coefficient corresponding to the third fine-tuning temperature calibration point within the subordinate temperature range and the coarse-tuning calibration curve. If the correlation is determined to be a third correlation, then the fine-tuning calibration curve of the target to be calibrated is determined based on the fourth fine-tuning calibration coefficient corresponding to the fourth fine-tuning temperature calibration point within the subordinate temperature range and the coarse-tuning calibration curve.
6. The clock calibration method as described in claim 1, characterized in that, The fine-tuning calibration curves include fine-tuning calibration curves for a preset low temperature range, fine-tuning calibration curves for a preset normal temperature range, and fine-tuning calibration curves for a preset high temperature range. The step of calibrating the target to be calibrated based on the fine-tuning calibration curve includes: When the real-time temperature of the target to be calibrated is detected to be within a preset low temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset low temperature range. When the real-time temperature of the target to be calibrated is detected to be within the preset room temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset room temperature range. When the real-time temperature of the target to be calibrated is detected to be within a preset high temperature range, the target to be calibrated is calibrated according to the fine-tuning calibration curve of the preset high temperature range.
7. The clock calibration method as described in claim 1, characterized in that, Before the step of obtaining the coarse calibration coefficient of the target to be calibrated at the base temperature calibration point, the clock calibration method further includes: Obtain the real-time temperature of the target to be calibrated, and calculate the temperature change value of the real-time temperature within a preset time period; Based on the temperature change value, determine whether the real-time temperature is stable at the basic temperature calibration point.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the clock calibration method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program for implementing a clock calibration method, which is executed by a processor to implement the steps of the clock calibration method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Intelligent ammeter clock calibration method
CN103176400A