CN116148754A - Electric energy meter adjusting method and device and electronic equipment - Google Patents

Electric energy meter adjusting method and device and electronic equipment Download PDF

Info

Publication number
CN116148754A
CN116148754A CN202310409601.7A CN202310409601A CN116148754A CN 116148754 A CN116148754 A CN 116148754A CN 202310409601 A CN202310409601 A CN 202310409601A CN 116148754 A CN116148754 A CN 116148754A
Authority
CN
China
Prior art keywords
electric energy
temperature
energy meter
error
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310409601.7A
Other languages
Chinese (zh)
Other versions
CN116148754B (en
Inventor
李科
张权
王强
李峥
张辉
白明
李伟
郭红梅
刘狄
魏茂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shijiazhuang Kelin Electric Co Ltd
Original Assignee
Shijiazhuang Kelin Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shijiazhuang Kelin Electric Co Ltd filed Critical Shijiazhuang Kelin Electric Co Ltd
Priority to CN202310409601.7A priority Critical patent/CN116148754B/en
Publication of CN116148754A publication Critical patent/CN116148754A/en
Application granted granted Critical
Publication of CN116148754B publication Critical patent/CN116148754B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R35/00Testing or calibrating of apparatus covered by the other groups of this subclass
    • G01R35/04Testing or calibrating of apparatus covered by the other groups of this subclass of instruments for measuring time integral of power or current
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Evolutionary Biology (AREA)
  • Operations Research (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Algebra (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Electric Clocks (AREA)

Abstract

The invention provides a method and a device for adjusting an electric energy meter and electronic equipment, wherein the method and the device can be used for carrying out data fitting on the daily time errors of crystal oscillator frequency of the electric energy meter at a plurality of temperature points by adopting a high-order polynomial compensation formula, then adjusting initial coefficients of all items by taking the daily time errors of a plurality of preset temperature points as targets, obtaining the adjustment coefficients of all items in the high-order polynomial compensation formula, correcting the crystal oscillator frequency of the electric energy meter at all temperatures, and realizing the adjustment of the electric energy meter. The daily timing errors of the temperature points tend to zero after adjustment, the lowest temperature point, the highest temperature point, the temperature point corresponding to the maximum error, the error conditions of the daily working temperature point and other special scenes are comprehensively considered, the timing precision of the electric energy meter under the special scenes such as high temperature, low temperature and the like is improved, and the metering error of the electric energy meter is reduced.

Description

Electric energy meter adjusting method and device and electronic equipment
Technical Field
The present invention relates to the field of power supply and distribution technologies, and in particular, to a method and an apparatus for calibrating an electric energy meter, and an electronic device.
Background
Along with the promotion of the construction of a novel electric power system taking new energy as a main body, the system is particularly important to adapt to the requirements of new energy large-scale development, peak-valley characteristic change of the electric power system and the like, continuously deepen the market innovation of electricity price, form effective market time-sharing electricity price settlement, guide users to cut peaks and fill valleys, promote new energy consumption and ensure the safe operation of the electric power system. In order to meet the new energy power generation grid-connection requirement, the modularized internet-of-things electric energy meter is correspondingly introduced. Compared with the traditional intelligent electric energy meter, the modularized internet of things electric energy meter has the advantage that the abundant and extensible functions of the modularized internet of things electric energy meter have strong adaptability to different working conditions. However, in order to accurately record the occurrence of each module and the clock synchronism of the electric energy generation, each module clock of the whole internet of things electric energy meter is provided by the metering module clock, so that the daily timing precision of the metering module is required to be higher.
At present, the daily timing adjustment of the intelligent electric energy meter usually adopts a single-point algorithm to calibrate the normal temperature. Therefore, in some temperature scenes, such as a plurality of temperatures, particularly high temperature and low temperature, the clock error is larger, the problem of low timing precision and low precision of the modularized internet of things electric energy meter exists, and the problem of low precision is easy to cause event record or freezing of electric energy data when serious, so that the metering error is further increased.
Disclosure of Invention
The invention provides a method and a device for adjusting an electric energy meter and electronic equipment, which can improve the timing precision of the electric energy meter and reduce the metering error of the electric energy meter.
In a first aspect, the present invention provides a method for calibrating an electric energy meter, including: acquiring the time-of-day errors of crystal oscillator frequency of an electric energy meter to be calibrated at a plurality of temperature points, and constructing a temperature sequence and an error sequence based on the time-of-day errors of the temperature points; based on the temperature sequence and the error sequence, adopting a high-order polynomial compensation formula to perform data fitting to obtain initial coefficients of each item in the high-order polynomial compensation formula; adjusting initial coefficients of each item by taking the time of day error return to zero of a plurality of preset temperature points as a target to obtain adjustment coefficients of each item in the high-order polynomial compensation formula; and correcting the crystal oscillator frequencies of the electric energy meter at a plurality of temperatures based on the high order polynomial compensation formula and the adjustment coefficients of the various items so as to realize the adjustment of the electric energy meter.
In one possible implementation manner, the adjusting the initial coefficients of each item with the goal of resetting the time of day error of a plurality of preset temperature points to zero to obtain the adjustment coefficients of each item in the high-order polynomial compensation formula includes: and carrying out one or more of vertical axis translation, K value stretching fitting, three-zero fitting and sinusoidal fitting on a polynomial compensation curve by taking the time-of-day error return to zero of a plurality of preset temperature points as a target, so as to adjust the initial coefficients of each item and obtain the adjustment coefficients of each item in the high-order polynomial compensation formula, wherein the polynomial compensation curve is a curve constructed based on the high-order polynomial compensation formula and the initial coefficients of each item.
In one possible implementation manner, the preset plurality of temperature points include a lowest temperature point and a highest temperature point of the electric energy meter, a temperature point corresponding to a maximum error of a daily time, and a daily working temperature point; and performing one or more of vertical axis translation, K-value stretching fitting, three-zero fitting and sinusoidal fitting on a polynomial compensation curve with the time-of-day error return to zero of a preset plurality of temperature points as a target to adjust the initial coefficients of each item to obtain adjustment coefficients of each item in the high-order polynomial compensation formula, wherein the method comprises the following steps: performing vertical axis translation on the polynomial compensation curve by taking the error return-to-zero of the lowest temperature point as a target to obtain a first compensation curve and a first coefficient combination; wherein the first coefficient combination comprises coefficients of each item in the higher order polynomial compensation formula after vertical axis translation; performing K-value stretching fitting on the first compensation curve by taking error return-to-zero of the highest temperature point as a target to obtain a second compensation curve and a second coefficient combination; the second coefficient combination comprises coefficients of each item in the high-order polynomial compensation formula after K-value stretching fitting; taking the error return-to-zero of the temperature point corresponding to the maximum daily timing error in the second compensation curve as a target, and performing three-zero fitting on the second compensation curve to obtain a third compensation curve and a third coefficient combination; the third coefficient combination comprises coefficients of each item in the high-order polynomial compensation formula after three-zero fitting; performing sinusoidal curve fitting on the third compensation curve by taking the error return to zero of a daily working temperature point in the third compensation curve as a target to obtain a target compensation curve and a target coefficient combination; wherein the target coefficient combination includes adjustment coefficients of the terms.
In one possible implementation manner, the correcting the crystal oscillator frequency of the electric energy meter at a plurality of temperatures based on the high order polynomial compensation formula and the adjustment coefficients of the items to realize the adjustment of the electric energy meter includes: acquiring the real-time temperature and the real-time frequency of the electric energy meter; calculating a frequency error corresponding to the real-time temperature based on the real-time temperature, the adjustment coefficients of the various items, and the higher order polynomial compensation formula; and determining the correction frequency of the electric energy meter at the real-time temperature based on the frequency error corresponding to the real-time temperature and the real-time frequency, and adjusting the electric energy meter by using the correction frequency.
In one possible implementation, the initial coefficients include a first term coefficient, a second term coefficient, a third term coefficient, and a fourth term coefficient; and based on the temperature sequence and the error sequence, performing data fitting by adopting a high-order polynomial compensation formula to obtain initial coefficients of each item in the high-order polynomial compensation formula, wherein the method comprises the following steps: performing data fitting based on the following high-order polynomial compensation formula to obtain initial coefficients of the various items;
Figure SMS_1
Wherein f is a time of day error of a temperature point in the error sequence, ka is an intercept constant, kb is a first term coefficient, kc is a second term coefficient, kd is a third term coefficient, ke is a fourth term coefficient, and T is a temperature value of a temperature point in the temperature sequence.
In one possible implementation manner, the electric energy meters to be calibrated are N electric energy meters in the same batch, wherein N is an integer, and N is more than or equal to 1; the method for acquiring the time of day errors of the crystal oscillator frequency of the electric energy meter to be calibrated at a plurality of temperature points comprises the following steps: performing error test on M electric energy meters in the N electric energy meters to obtain the time-of-day errors of the M electric energy meters at the plurality of temperature points; wherein M is an integer, M is less than or equal to N; and for the same temperature point, determining the average value of the time of day errors of the electric energy meters at the temperature point as the time of day error of the electric energy meters to be regulated at the temperature point.
In one possible implementation manner, the correcting the crystal oscillator frequencies at a plurality of temperatures of the electric energy meter based on the high order polynomial compensation formula and the adjustment coefficients of the items, after implementing the adjustment of the electric energy meter, further includes: acquiring historical metering data of the corrected electric energy meter; and historical temperature data corresponding to the historical metering data; based on the historical metering data and the historical temperature data, carrying out time window division, and extracting metering data of each time period and temperature values of each time period in each day; for the same time period, dividing metering data of the time period based on the temperature value of the time period to obtain a plurality of metering data sets; wherein one set of metrology data corresponds to one temperature interval; calculating and comparing the average value and variance of each metering data set to obtain a comparison result; and determining metering conditions of the corrected electric energy meter at the plurality of temperature points based on the comparison result.
In one possible implementation manner, the correcting the crystal oscillator frequencies at a plurality of temperatures of the electric energy meter based on the high order polynomial compensation formula and the adjustment coefficients of the items, after implementing the adjustment of the electric energy meter, further includes: periodically sending a first instruction to the corrected electric energy meter, wherein the first instruction is used for indicating the corrected electric energy meter to return the current time and the current temperature; periodically receiving a first response returned by the corrected electric energy meter; the first response includes a current time and a current temperature of the corrected electric energy meter; comparing the error between the current time returned by the corrected electric energy meter and the current actual time; and if the error is larger than the preset error, re-correcting the corrected electric energy meter based on the current temperature returned by the corrected electric energy meter and the error.
In a second aspect, an embodiment of the present invention provides a device for calibrating an electric energy meter, including: and the communication unit is used for acquiring the time-of-day errors of the crystal oscillator frequency of the electric energy meter to be calibrated at a plurality of temperature points. The processing unit is used for constructing a temperature sequence and an error sequence based on the time-of-day errors of the plurality of temperature points; based on the temperature sequence and the error sequence, adopting a high-order polynomial compensation formula to perform data fitting to obtain initial coefficients of each item in the high-order polynomial compensation formula; adjusting initial coefficients of each item by taking the time of day error return to zero of a plurality of preset temperature points as a target to obtain adjustment coefficients of each item in the high-order polynomial compensation formula; and correcting the crystal oscillator frequencies of the electric energy meter at a plurality of temperatures based on the high order polynomial compensation formula and the adjustment coefficients of the various items so as to realize the adjustment of the electric energy meter.
In one possible implementation manner, the processing unit is specifically configured to perform one or more of vertical axis translation, K-value stretching fitting, three-zero fitting and sinusoidal fitting on a polynomial compensation curve with the goal of resetting a time of day error of a plurality of preset temperature points, so as to adjust initial coefficients of the terms, and obtain adjustment coefficients of the terms in the higher order polynomial compensation formula, where the polynomial compensation curve is a curve constructed based on the higher order polynomial compensation formula and the initial coefficients of the terms.
In one possible implementation manner, the preset plurality of temperature points include a lowest temperature point and a highest temperature point of the electric energy meter, a temperature point corresponding to a maximum error of a daily time, and a daily working temperature point; the processing unit is specifically used for carrying out vertical axis translation on the polynomial compensation curve by taking error return-to-zero of the lowest temperature point as a target to obtain a first compensation curve and a first coefficient combination; wherein the first coefficient combination comprises coefficients of each item in the higher order polynomial compensation formula after vertical axis translation; performing K-value stretching fitting on the first compensation curve by taking error return-to-zero of the highest temperature point as a target to obtain a second compensation curve and a second coefficient combination; the second coefficient combination comprises coefficients of each item in the high-order polynomial compensation formula after K-value stretching fitting; taking the error return-to-zero of the temperature point corresponding to the maximum daily timing error in the second compensation curve as a target, and performing three-zero fitting on the second compensation curve to obtain a third compensation curve and a third coefficient combination; the third coefficient combination comprises coefficients of each item in the high-order polynomial compensation formula after three-zero fitting; performing sinusoidal curve fitting on the third compensation curve by taking the error return to zero of a daily working temperature point in the third compensation curve as a target to obtain a target compensation curve and a target coefficient combination; wherein the target coefficient combination includes adjustment coefficients of the terms.
In one possible implementation, the communication unit is specifically configured to obtain a real-time temperature and a real-time frequency of the electric energy meter; the processing unit is specifically used for calculating a frequency error corresponding to the real-time temperature based on the real-time temperature, the adjustment coefficients of the various items and the higher order polynomial compensation formula; and determining the correction frequency of the electric energy meter at the real-time temperature based on the frequency error corresponding to the real-time temperature and the real-time frequency, and adjusting the electric energy meter by using the correction frequency.
In one possible implementation, the initial coefficients include a first term coefficient, a second term coefficient, a third term coefficient, and a fourth term coefficient; the processing unit is specifically used for carrying out data fitting based on the following high-order polynomial compensation formula to obtain initial coefficients of each item;
Figure SMS_2
wherein f is a time of day error of a temperature point in the error sequence, ka is an intercept constant, kb is a first term coefficient, kc is a second term coefficient, kd is a third term coefficient, ke is a fourth term coefficient, and T is a temperature value of a temperature point in the temperature sequence.
In one possible implementation manner, the electric energy meters to be calibrated are N electric energy meters in the same batch, wherein N is an integer, and N is more than or equal to 1; the processing unit is specifically used for performing error test on M electric energy meters in the N electric energy meters to obtain the daily time errors of the M electric energy meters at the plurality of temperature points; wherein M is an integer, M is less than or equal to N; and for the same temperature point, determining the average value of the time of day errors of the electric energy meters at the temperature point as the time of day error of the electric energy meters to be regulated at the temperature point.
In one possible implementation, the communication unit is further configured to obtain historical metering data of the corrected electric energy meter; and historical temperature data corresponding to the historical metering data; the processing unit is also used for dividing a time window based on the historical metering data and the historical temperature data, and extracting metering data of each time period and temperature values of each time period in each day; for the same time period, dividing metering data of the time period based on the temperature value of the time period to obtain a plurality of metering data sets; wherein one set of metrology data corresponds to one temperature interval; calculating and comparing the average value and variance of each metering data set to obtain a comparison result; and determining metering conditions of the corrected electric energy meter at the plurality of temperature points based on the comparison result.
In a possible implementation manner, the communication unit is further configured to periodically send a first instruction to the corrected electric energy meter, where the first instruction is used to instruct the corrected electric energy meter to return the current time and the current temperature; periodically receiving a first response returned by the corrected electric energy meter; the first response includes a current time and a current temperature of the corrected electric energy meter; the processing unit is also used for comparing the error between the current time returned by the corrected electric energy meter and the current actual time; and if the error is larger than the preset error, re-correcting the corrected electric energy meter based on the current temperature returned by the corrected electric energy meter and the error.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory storing a computer program and a processor for calling and running the computer program stored in the memory to perform the steps of the method according to the first aspect and any possible implementation manner of the first aspect.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to the first aspect and any one of the possible implementations of the first aspect.
The invention provides a method and a device for adjusting an electric energy meter and electronic equipment, wherein the method and the device can be used for carrying out data fitting on the daily time errors of crystal oscillator frequency of the electric energy meter at a plurality of temperature points by adopting a high-order polynomial compensation formula, then adjusting initial coefficients of all items by taking the daily time errors of a plurality of preset temperature points as targets, obtaining the adjustment coefficients of all items in the high-order polynomial compensation formula, and correcting the crystal oscillator frequency of the electric energy meter at a plurality of temperatures based on the adjustment coefficients of all items so as to realize the adjustment of the electric energy meter. The time-of-day error of the preset plurality of temperature points tends to zero after adjustment, error conditions of the plurality of temperature points are comprehensively considered, the timing precision of the electric energy meter under a plurality of temperature scenes is improved, and the metering error of the electric energy meter is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a method for calibrating an electric energy meter according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a polynomial compensation curve according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a first compensation curve according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a second compensation curve according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a third compensation curve according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a target compensation curve provided by an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a calibrating device for an electric energy meter according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In the description of the present invention, "/" means "or" unless otherwise indicated, for example, A/B may mean A or B. "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. Further, "at least one", "a plurality" means two or more. The terms "first," "second," and the like do not limit the number and order of execution, and the terms "first," "second," and the like do not necessarily differ.
In the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion that may be readily understood.
Furthermore, references to the terms "comprising" and "having" and any variations thereof in the description of the present application are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to only those steps or modules but may, alternatively, include other steps or modules not listed or inherent to such process, method, article, or apparatus.
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the following description will be made with reference to the accompanying drawings of the present invention by way of specific embodiments.
As shown in fig. 1, an embodiment of the present invention provides a method for calibrating an electric energy meter. The execution main body is a calibrating device of the electric energy meter. The method comprises steps S101-S103.
S101, acquiring the time-of-day errors of crystal oscillator frequency of an electric energy meter to be calibrated at a plurality of temperature points, and constructing a temperature sequence and an error sequence based on the time-of-day errors of the temperature points.
In some embodiments, each temperature point of the temperature sequence corresponds one-to-one with each timing error in the error sequence.
In some embodiments, the electric energy meters to be calibrated are N electric energy meters of the same batch.
Correspondingly, as a possible implementation manner, the embodiment of the invention can perform error test on M electric energy meters in the N electric energy meters to obtain the daily time errors of the M electric energy meters at a plurality of temperature points; wherein M and N are positive integers M < N; and for the same temperature point, determining the average value of the time-of-day errors of the electric energy meters at the temperature point as the time-of-day error of the electric energy meters to be regulated at the temperature point.
For example, assuming that 1000 electric energy meters are generated in the same batch in the factory A, due to the fact that the electric energy meters produced in batch are very high in consistency of crystal oscillator, circuit board parameters and the like, adjustment of the electric energy meters in the batch can be achieved only by calculating part of the electric energy meters. For example, according to the embodiment of the invention, the adjustment coefficient can be obtained by performing error fitting calculation on 50 electric energy meters in the 1000 electric energy meters, the adjustment of 1000 electric energy meters in the batch can be completed by performing error test and calculation on the 50 electric energy meters, and the adjustment efficiency of the electric energy meters is improved.
S102, based on the temperature sequence and the error sequence, a high-order polynomial compensation formula is adopted to perform data fitting, and initial coefficients of all items in the high-order polynomial compensation formula are obtained.
Here, taking the frequency-temperature curve of a 32768Hz crystal oscillator as an example, the curve is a parabola, and the peak point is generally about 25 ℃. The embodiment of the invention can compensate the crystal oscillator of the type. The main chip of the multifunctional, high-performance and low-power consumption intelligent ammeter adopts a 256K MCU chip, and units such as a Cortex-M0 processor, clock management, power management, hardware automatic temperature compensation RTC, a PLL, a high-frequency RC, a low-frequency RC, an LCD driver and the like, and NVIC and a DEBUG function are integrated in the chip. The MCU chip takes a 32.768KHz crystal oscillator clock source as an RTC clock source, and the automatic digital clock compensation unit integrated inside the chip assists a user to realize automatic compensation of the RTC under the condition that software participation is not needed. The RTC module reads the temperature value of TPS output, calculates the frequency deviation DFi in real time according to the temperature characteristic of OSC, and sends the frequency deviation DFi to the frequency division module for clock correction. The chip is internally provided with a polynomial compensation curve with modifiable coefficients. The DFi calculation formula may be as follows:
Figure SMS_3
The DFA is a 0-time term compensation coefficient, the DFB is a 1-time term compensation coefficient, the DFC is a 2-time term compensation coefficient, the DFD is a 3-time term compensation coefficient, the DFE is a 4-time term compensation coefficient, and the TMPDAT is a temperature sensor output value, namely the temperature of the working environment of the electric energy meter.
Table 1 is each register of the electric energy meter storing polynomial coefficients. The adjustment of the electric energy meter daily time error can be realized by adjusting the polynomial coefficient through adjusting the storage value in the register.
TABLE 1
Figure SMS_4
Table 2 shows the temperature sequence and the error sequence. The time of day error of the electric energy meter at a plurality of temperature points. The unit of time of day error is seconds per day (S/D), i.e., the cumulative error value over the time of day.
TABLE 2
Figure SMS_5
To facilitate writing, ka replaces DAF, kb replaces DFB, kc replaces DFC, kd replaces DFD, ke replaces DFE, and T replaces TMPDAT. In this embodiment, in order to ensure the fitting accuracy of the crystal compensation curve, the fitting error is reduced, and four compensation curves are used to perform data fitting.
As a possible implementation manner, the embodiment of the present invention may perform data fitting based on the following polynomial compensation formula to obtain initial coefficients of each item in the polynomial compensation formula.
Figure SMS_6
Wherein f is a time of day error of a temperature point in the error sequence, ka is an intercept constant, kb is a first term coefficient, kc is a second term coefficient, kd is a third term coefficient, ke is a fourth term coefficient, and T is a temperature value of the temperature point in the temperature sequence.
As shown in fig. 2, an embodiment of the present invention provides a schematic diagram of a polynomial compensation curve. The curve 1 is the polynomial compensation curve, and is a curve constructed based on the above-mentioned higher order polynomial compensation formula and the initial coefficients of each item. Alternatively, the present embodiment may use a least squares method to perform a polynomial fit construction, where the polynomial compensation curve represents the relationship between temperature and time of day error. The polynomial compensation curve can be expressed as the following formula.
Figure SMS_7
Wherein y represents a time of day error, x represents temperature, y is on the ordinate in the figure, and x is on the abscissa. The goodness of fit R2 value was 0.9995. The closer the goodness of fit is to 1, the better the goodness of fit is.
S103, adjusting initial coefficients of each item by taking the time of day error return to zero of a plurality of preset temperature points as a target to obtain adjustment coefficients of each item in a high-order polynomial compensation formula.
The preset temperature points comprise a lowest temperature point, a highest temperature point, a temperature point corresponding to the maximum error and a daily working temperature point.
Optionally, in this embodiment, when the daily time error of the preset plurality of temperature points is set to zero, and the initial coefficients of each item are adjusted to obtain the adjustment coefficients of each item in the high-order polynomial compensation formula, one or more of vertical axis translation, K-value stretching fitting, three-zero fitting and sinusoidal fitting may be performed on the polynomial compensation curve with the daily time error of the preset plurality of temperature points set to zero as a target, so as to adjust the initial coefficients of each item, and obtain the adjustment coefficients of each item in the high-order polynomial compensation formula.
Here, in this embodiment, one or more processing modes of vertical axis translation, K-value stretching fitting, three-zero fitting and sinusoidal fitting may be adopted to process the polynomial compensation curve, and the initial coefficients of each item in the high-order polynomial compensation formula are adjusted, so that the time-of-day error of the electric energy meter at the preset multiple temperature points is zeroed, and the time-of-day precision of the electric energy meter under multiple temperature scenes is improved.
As a possible implementation manner, one manner of processing the polynomial compensation curve in this embodiment by using one or more of the processing manners of vertical axis translation, K-value stretch fitting, three-zero fitting and sinusoidal fitting may be as described in steps S1031-S1034.
S1031, taking error return to zero of the lowest temperature point as a target, and carrying out vertical axis translation on the polynomial compensation curve to obtain a first compensation curve and a first coefficient combination.
The first coefficient combination comprises coefficients of each item after vertical axis translation; the polynomial compensation curve is a curve constructed by a high order polynomial compensation formula and initial coefficients of each item.
Illustratively, the embodiment of the invention carries out vertical axis translation on the polynomial compensation curve at the temperature point of minus 25 ℃ and adjusts the time of day error at the temperature point of minus 25 ℃ to a zero value. The procedure is as follows.
The single point correction formula is y=a. Wherein y0=a.
The higher order polynomial compensation formula is:
Figure SMS_8
the new high order polynomial compensation formula after single point compensation is:
Figure SMS_9
after the new higher order polynomial compensation formula is simplified, the simplified formula is as follows:
Figure SMS_10
bringing (-25, 0) into the above formula, and calculating to obtain
Figure SMS_11
The first compensation curve may be expressed as the following formula.
Figure SMS_12
As shown in fig. 3, an embodiment of the present invention provides a schematic diagram of a first compensation curve. Wherein curve 1 is a polynomial compensation curve and curve 2 is a first compensation curve. The vertical axis shifts, i.e., the single point correction is to zero the time of day error for correcting the curve to the lowest temperature point. Table 3 shows the time of day error at each temperature point calculated by the first compensation curve.
TABLE 3 Table 3
Figure SMS_13
S1032, carrying out K-value stretching fitting on the first compensation curve by taking the error return to zero of the highest temperature point as a target, and obtaining a second compensation curve and a second coefficient combination.
The second coefficient combination includes coefficients of each item after the K-value stretch fit.
Illustratively, the embodiment of the invention performs K-value stretch fitting on the first compensation curve at the temperature point of 60 ℃ to adjust the time of day errors at the temperature points of-25 ℃ and 60 ℃ to zero. The procedure is as follows.
(-25 ℃, 0) (60 ℃, 0.89) two points define a straight line. The straight line equation is expressed as
Figure SMS_14
Wherein, two points are substituted into the equation to obtain:
Figure SMS_15
the calculation based on the set of equations is:
Figure SMS_16
the new higher order polynomial compensation formula is:
Figure SMS_17
the compensation formula after K value stretching fitting is as follows:
Figure SMS_18
the compensation formula after K value stretching fitting is simplified as follows:
Figure SMS_19
based on the two point coordinates (-25 ℃, 0) (60 ℃, 0.89), a second compensation curve can be calculated. As shown in the following formula.
Figure SMS_20
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_21
,/>
Figure SMS_22
as shown in fig. 4, an embodiment of the present invention provides a schematic diagram of a second compensation curve. Wherein curve 2 is the first compensation curve. Curve 3 is the second compensation curve. And (3) stretching and fitting the K value, namely two-point compensation, which is equivalent to subtracting the compensation oblique line from the first compensation curve to obtain a second compensation curve, so that the time-of-day error of the electric energy meter is zeroed at the lowest temperature point and the highest temperature point. Wherein the compensation diagonal line is a straight line defined by two points (-25 ℃, 0) (60 ℃, 0.89). Table 4 shows the time of day error at each temperature point calculated by the second compensation curve.
TABLE 4 Table 4
Figure SMS_23
S1033, performing three-zero fitting on the second compensation curve by taking the error return of the maximum error point in the second compensation curve as a target, and obtaining a third compensation curve and a third coefficient combination.
The third coefficient combination comprises coefficients of each item after three zero fitting;
Illustratively, as shown in FIG. 4, the temperature value of the maximum error point of the second compensation curve is 20 ℃. In the embodiment of the invention, the third zero fitting is carried out on the second compensation curve at the temperature point of 20 ℃, and the daily time errors of the three temperature points of-25 ℃, 20 ℃ and 60 ℃ are adjusted to zero. The procedure is as follows.
According to
Figure SMS_24
The method can obtain:
Figure SMS_25
substituting the coordinates of the three points (-25, 0) (20,1.939) (60,0), the calculation can be obtained: a=1.61583, b=0.03770, c= -0.00107.
The compensation formula after K value stretching fitting is simplified as follows:
Figure SMS_26
the compensation formula of the three-zero fitting is as follows: .
Figure SMS_27
The compensation formula of the three-zero fitting is simplified as follows:
Figure SMS_28
the third compensation curve can be expressed as the following formula.
Figure SMS_29
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_30
,/>
Figure SMS_31
,/>
Figure SMS_32
as shown in fig. 5, an embodiment of the present invention provides a schematic diagram of a third compensation curve. Wherein curve 3 is the second compensation curve. Curve 4 is the third compensation curve. The three zero fitting is equivalent to eliminating the peak of the second compensation curve, so that the third compensation curve has three zero crossings on the temperature axis, namely, the error of the maximum error point is zeroed. After the three-zero fitting, the errors of the lowest temperature point, the highest temperature point and the maximum error point on the third compensation curve are zeroed.
S1034, performing sinusoidal curve fitting on the third compensation curve by taking the error return to zero of the daily working temperature point in the third compensation curve as a target, and obtaining a target compensation curve and target coefficient combination.
Wherein the target coefficient combination includes adjustment coefficients of the respective items.
The daily operating temperature is the temperature point at which the electric energy meter is operated for the longest time. For example, the daily operating temperature of an electric energy meter is 30 degrees, or 15 degrees, or 25 degrees. The embodiment of the invention can adjust the error of the daily working temperature point to be zero. The procedure is as follows.
Sinusoidal fitting, i.e., four-point fitting, the four-point equation is shown below.
Figure SMS_33
Can be simplified into:
Figure SMS_34
Figure SMS_35
Figure SMS_36
,/>
Figure SMS_37
Figure SMS_38
if:
Figure SMS_39
,/>
Figure SMS_40
,/>
Figure SMS_41
,/>
Figure SMS_42
then:
Figure SMS_43
Figure SMS_44
Figure SMS_45
Figure SMS_46
the calculation can be as follows: a= -0.109, b=0.0029, c=0.0002, d= -0.000004.
The compensation formula of the three-zero fitting is simplified as follows:
Figure SMS_47
the compensation formula for the sinusoidal curve fit is:
Figure SMS_48
the compensation formula for the sinusoidal fit is reduced to:
Figure SMS_49
the target compensation curve is shown below.
Figure SMS_50
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_51
,/>
Figure SMS_52
,/>
Figure SMS_53
Figure SMS_54
as shown in fig. 6, an embodiment of the present invention provides a schematic diagram of a target compensation curve. Wherein curve 4 is the third compensation curve. Curve 5 is the target compensation curve. Sinusoidal curve fitting, namely four-point fitting, is equivalent to changing a third compensation curve into a straight line, so that error return to zero in the whole temperature range of the electric energy meter is realized, namely, the high timing precision of the electric energy meter in the whole temperature range is realized, the timing precision of the electric energy meter in special scenes such as high temperature, low temperature and the like is improved, and the metering error of the electric energy meter is reduced. Table 4 shows the time of day error at each temperature point calculated from the target temperature curve.
TABLE 4 Table 4
Figure SMS_55
It should be noted that, the polynomial coefficients calculated in the above process are floating point numbers with decimal numbers, and the integer numbers are further processed to obtain integers and then written into registers of the HTxx series chips, and the processing rules are as follows.
DFA=DFA*128*16
DFB=DFB*128*16*65536
DFC=DFC*128*16*65536*65536
DFD=DFD*128*16*65536*65536*65536
In the comprehensive flow, four temperature points of-25 ℃, 20 ℃, 30 ℃ and 60 ℃ are selected, DFA, DFB, DFC, DFD (DFE is not modified) is calculated, and corresponding registers are written according to requirements, and the time of day error is better than 0.02S/D in the temperature range of-25 ℃ to 60 ℃ through testing, so that the accuracy requirement of the time of day error can be completely met.
S104, correcting the crystal oscillator frequencies of the electric energy meter at a plurality of temperatures based on a high-order polynomial compensation formula and adjustment coefficients of each term, and realizing adjustment of the electric energy meter.
As one possible implementation, step S104 may be embodied as S1041-S1043.
S1041, acquiring the real-time temperature and the real-time frequency of the electric energy meter.
S1042, calculating the frequency error corresponding to the real-time temperature based on the real-time temperature, the adjustment coefficients of each item and the high order polynomial compensation formula.
S1043, determining a correction frequency of the electric energy meter at the real-time temperature based on the frequency error corresponding to the real-time temperature and the real-time frequency, and adjusting the electric energy meter by using the correction frequency.
The invention provides a method for adjusting an electric energy meter, which can be used for carrying out data fitting on the daily time errors of crystal oscillator frequency of the electric energy meter at a plurality of temperature points by adopting a high-order polynomial compensation formula, then adjusting initial coefficients of each item by taking the daily time errors of a plurality of preset temperature points as targets, obtaining adjustment coefficients of each item in the high-order polynomial compensation formula, and correcting the crystal oscillator frequency of the electric energy meter at a plurality of temperatures by the adjustment coefficients of each item, so as to realize the adjustment of the electric energy meter. The daily timing errors of the preset temperature points tend to zero after adjustment, the error conditions of the lowest temperature point, the highest temperature point, the temperature point corresponding to the maximum error, the daily working temperature point and other special scenes are comprehensively considered, the timing precision of the electric energy meter under the special scenes such as high temperature, low temperature and the like is improved, and the metering error of the electric energy meter is reduced.
Optionally, the method for calibrating the electric energy meter provided by the embodiment of the invention further includes steps S201 to S205 after step S104.
S201, acquiring historical metering data of the corrected electric energy meter; and historical temperature data corresponding to the historical metering data.
S202, dividing a time window based on the historical metering data and the historical temperature data, and extracting metering data of each time period and temperature values of each time period in each day.
And S203, dividing the metering data of the same time period based on the temperature value of the time period to obtain a plurality of metering data sets.
Wherein one set of metrology data corresponds to one temperature interval.
Illustratively, the night time period is 2 to 3 points, the temperature of the period varies with seasons and weather every day, and the metering data corresponding to the same temperature is divided into one metering data set. If the temperature of the period from 2 to 3 points in the night of the week is 15 ℃, the metering data of the period from 2 to 3 points in the night of the week are divided into one metering data set.
S204, calculating and comparing the average value and the variance of each metering data set to obtain a comparison result.
The average value and variance of each measurement data set, that is, the average value and variance of each measurement data corresponding to the same temperature.
The comparison result comprises comparison situations of metering data at different temperatures in the same time period, or comparison situations of each metering data at the same temperature in the same time period with average value and variance.
For example, the average and variance of each measurement data is compared at 15℃and-15℃for a 2-to 3-point night period.
For example, the temperature is 15 ℃ in a period from 2 points to 3 points at night, and each metering data is compared with the average value and the variance.
S205, determining metering conditions of the corrected electric energy meter at a plurality of temperature points based on the comparison result.
For example, if the variance of the same period is smaller than the set variance and the difference between the measured data and the average value in the period is larger than the set difference, the measured data in the period is determined to be an abnormal point. And counting the temperature frequency corresponding to the abnormal point, and if the temperature frequency corresponding to the abnormal point is larger than the set frequency, determining that the crystal oscillator frequency of the corrected electric energy meter at the temperature point needs to be corrected again.
For example, the temperature point may be any temperature point. And counting the occurrence frequency of the abnormal point at the lowest temperature or the highest temperature, and if the occurrence frequency is larger than the set frequency, determining that the crystal oscillator frequency of the corrected electric energy meter at the lowest temperature or the highest temperature needs to be corrected again.
Therefore, the embodiment of the invention can re-detect the timing precision of the electric energy meter in real time under the special scenes such as high temperature, low temperature and the like, reduce the influence of the service life of the electric energy meter on the crystal oscillator frequency, further improve the timing precision of the electric energy meter under the special scenes such as high temperature, low temperature and the like, and reduce the metering error of the electric energy meter.
Optionally, the method for calibrating the electric energy meter provided by the embodiment of the invention further includes steps S301 to S305 after step S104.
S301, periodically sending a first instruction to the corrected electric energy meter.
The first instruction is used for indicating the corrected electric energy meter to return the current time and the current temperature.
S302, periodically receiving a first response returned by the corrected electric energy meter.
The first response includes a current time and a current temperature of the corrected electric energy meter.
S303, comparing the error between the current time returned by the corrected electric energy meter and the current actual time.
And S304, if the error is larger than the preset error, re-correcting the corrected electric energy meter based on the current temperature and the error returned by the corrected electric energy meter.
Therefore, the embodiment of the invention can periodically detect the electric energy meter in real time, reduce the influence of the service life of the electric energy meter on the crystal oscillator frequency, further improve the timing precision of the electric energy meter in special scenes such as high temperature, low temperature and the like, and reduce the metering error of the electric energy meter.
After the electric energy meter is placed for a long time, the time of day error may deviate. Before calibration, the electric energy meter (programming program, battery power supply) is put into a temperature box for high-low temperature 3-round cyclic impact: the 1 st round of impact is finished in the steps of 70 ℃ impact for 3 hours, 25 ℃ impact for 3 hours (or normal temperature standing for 1 night), and the normal temperature standing for more than 7 days after the 3 rounds of temperature impact experiments are finished. The phenomenon that the time of day error can deviate after the electricity meter is placed for a long time can be avoided.
For the electric meters produced in batch, as the consistence of crystal oscillator, circuit board parameters and the like is very high, only normal temperature teaching is carried out, and other coefficients adopt empirical values. The time of day error of the volume production ammeter is greatly improved compared with a quadratic curve compensation method.
The invention adopts a multipoint fitting correction mode to carry out longitudinal axis translation, K value stretching fitting, three-zero fitting and sinusoidal curve zeroing on the characteristic curve of the crystal oscillator of 32768 Hz. The accuracy of the timing of the test sample table is better than 0.05 seconds per day over the range of-25 ℃ to 60 ℃.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
The following are device embodiments of the invention, for details not described in detail therein, reference may be made to the corresponding method embodiments described above.
Fig. 7 is a schematic structural diagram of a calibrating device for an electric energy meter according to an embodiment of the present invention. The tuning device 400 comprises a communication unit 401 and a processing unit 402.
The communication unit 401 is configured to obtain a time of day error of a crystal oscillator frequency of the electric energy meter to be calibrated at a plurality of temperature points.
A processing unit 402, configured to construct a temperature sequence and an error sequence based on the timing errors of the plurality of temperature points; based on the temperature sequence and the error sequence, adopting a high-order polynomial compensation formula to perform data fitting to obtain initial coefficients of each item in the high-order polynomial compensation formula; adjusting initial coefficients of each item by taking the time of day error return to zero of a plurality of preset temperature points as a target to obtain adjustment coefficients of each item in the high-order polynomial compensation formula; and correcting the crystal oscillator frequencies of the electric energy meter at a plurality of temperatures based on the high order polynomial compensation formula and the adjustment coefficients of the various items so as to realize the adjustment of the electric energy meter.
In a possible implementation manner, the processing unit 402 is specifically configured to perform one or more processes of vertical axis translation, K-value stretch fitting, three-zero fitting and sinusoidal fitting on a polynomial compensation curve with the goal of resetting a time of day error of a plurality of preset temperature points, so as to adjust initial coefficients of the terms, and obtain adjustment coefficients of the terms in the higher order polynomial compensation formula, where the polynomial compensation curve is a curve constructed based on the higher order polynomial compensation formula and the initial coefficients of the terms.
In one possible implementation manner, the preset plurality of temperature points include a lowest temperature point and a highest temperature point of the electric energy meter, a temperature point corresponding to a maximum error of a daily time, and a daily working temperature point; the processing unit 402 is specifically configured to perform vertical axis translation on the polynomial compensation curve with the error return to zero of the lowest temperature point as a target, so as to obtain a first compensation curve and a first coefficient combination; wherein the first coefficient combination comprises coefficients of each item in the higher order polynomial compensation formula after vertical axis translation; performing K-value stretching fitting on the first compensation curve by taking error return-to-zero of the highest temperature point as a target to obtain a second compensation curve and a second coefficient combination; the second coefficient combination comprises coefficients of each item in the high-order polynomial compensation formula after K-value stretching fitting; taking the error return-to-zero of the temperature point corresponding to the maximum daily timing error in the second compensation curve as a target, and performing three-zero fitting on the second compensation curve to obtain a third compensation curve and a third coefficient combination; the third coefficient combination comprises coefficients of each item in the high-order polynomial compensation formula after three-zero fitting; performing sinusoidal curve fitting on the third compensation curve by taking the error return to zero of a daily working temperature point in the third compensation curve as a target to obtain a target compensation curve and a target coefficient combination; wherein the target coefficient combination includes adjustment coefficients of the terms.
In a possible implementation manner, the communication unit 401 is specifically configured to obtain a real-time temperature and a real-time frequency of the electric energy meter; a processing unit 402, configured to calculate a frequency error corresponding to the real-time temperature based on the real-time temperature, the adjustment coefficients of the items, and the higher order polynomial compensation formula; and determining the correction frequency of the electric energy meter at the real-time temperature based on the frequency error corresponding to the real-time temperature and the real-time frequency, and adjusting the electric energy meter by using the correction frequency.
In one possible implementation, the initial coefficients include a first term coefficient, a second term coefficient, a third term coefficient, and a fourth term coefficient; the processing unit 402 is specifically configured to perform data fitting based on the following high-order polynomial compensation formula to obtain initial coefficients of the respective items;
Figure SMS_56
wherein f is a time of day error of a temperature point in the error sequence, ka is an intercept constant, kb is a first term coefficient, kc is a second term coefficient, kd is a third term coefficient, ke is a fourth term coefficient, and T is a temperature value of a temperature point in the temperature sequence.
In one possible implementation manner, the electric energy meters to be calibrated are N electric energy meters in the same batch, wherein N is an integer, and N is more than or equal to 1; the processing unit 402 is specifically configured to perform an error test on M electric energy meters in the N electric energy meters, so as to obtain a daily time error of the M electric energy meters at the plurality of temperature points; wherein M is an integer, M is less than or equal to N; and for the same temperature point, determining the average value of the time of day errors of the electric energy meters at the temperature point as the time of day error of the electric energy meters to be regulated at the temperature point.
In a possible implementation, the communication unit 401 is further configured to obtain historical metering data of the corrected electric energy meter; and historical temperature data corresponding to the historical metering data; the processing unit 402 is further configured to perform time window division based on the historical metering data and the historical temperature data, and extract metering data of each period and a temperature value of each period in each day; for the same time period, dividing metering data of the time period based on the temperature value of the time period to obtain a plurality of metering data sets; wherein one set of metrology data corresponds to one temperature interval; calculating and comparing the average value and variance of each metering data set to obtain a comparison result; and determining metering conditions of the corrected electric energy meter at the plurality of temperature points based on the comparison result.
In a possible implementation manner, the communication unit 401 is further configured to periodically send a first instruction to the corrected electric energy meter, where the first instruction is used to instruct the corrected electric energy meter to return the current time and the current temperature; periodically receiving a first response returned by the corrected electric energy meter; the first response includes a current time and a current temperature of the corrected electric energy meter; the processing unit 402 is further configured to compare the magnitude of the error between the current time returned by the corrected electric energy meter and the current actual time; and if the error is larger than the preset error, re-correcting the corrected electric energy meter based on the current temperature returned by the corrected electric energy meter and the error.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 8, the electronic apparatus 500 of this embodiment includes: a processor 501, a memory 502 and a computer program 503 stored in said memory 502 and executable on said processor 501. The steps of the method embodiments described above, such as steps S101-S104 shown in fig. 1, are implemented when the processor 501 executes the computer program 503. Alternatively, the processor 501 may implement the functions of the modules/units in the above-described device embodiments when executing the computer program 503, for example, the functions of the communication unit 401 and the processing unit 402 shown in fig. 7.
Illustratively, the computer program 503 may be split into one or more modules/units that are stored in the memory 502 and executed by the processor 501 to accomplish the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used to describe the execution of the computer program 503 in the electronic device 500. For example, the computer program 503 may be divided into the communication unit 401 and the processing unit 402 shown in fig. 7.
The processor 501 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 502 may be an internal storage unit of the electronic device 500, such as a hard disk or a memory of the electronic device 500. The memory 502 may also be an external storage device of the electronic device 500, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device 500. Further, the memory 502 may also include both internal storage units and external storage devices of the electronic device 500. The memory 502 is used for storing the computer program and other programs and data required by the terminal. The memory 502 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal and method may be implemented in other manners. For example, the apparatus/terminal embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (10)

1. The utility model provides a calibration method of an electric energy meter, which is characterized by comprising the following steps:
acquiring the time-of-day errors of crystal oscillator frequency of an electric energy meter to be calibrated at a plurality of temperature points, and constructing a temperature sequence and an error sequence based on the time-of-day errors of the temperature points;
based on the temperature sequence and the error sequence, adopting a high-order polynomial compensation formula to perform data fitting to obtain initial coefficients of each item in the high-order polynomial compensation formula;
adjusting initial coefficients of each item by taking the time of day error return to zero of a plurality of preset temperature points as a target to obtain adjustment coefficients of each item in the high-order polynomial compensation formula;
And correcting the crystal oscillator frequencies of the electric energy meter at a plurality of temperatures based on the high order polynomial compensation formula and the adjustment coefficients of the various items so as to realize the adjustment of the electric energy meter.
2. The method for calibrating an electric energy meter according to claim 1, wherein the adjusting the initial coefficients of the respective items with the goal of zeroing a daily time error of a preset plurality of temperature points to obtain the adjustment coefficients of the respective items in the polynomial compensation formula comprises:
and carrying out one or more of vertical axis translation, K value stretching fitting, three-zero fitting and sinusoidal fitting on a polynomial compensation curve by taking the time-of-day error return to zero of a plurality of preset temperature points as a target, so as to adjust the initial coefficients of each item and obtain the adjustment coefficients of each item in the high-order polynomial compensation formula, wherein the polynomial compensation curve is a curve constructed based on the high-order polynomial compensation formula and the initial coefficients of each item.
3. The method for calibrating an electric energy meter according to claim 2, wherein the preset plurality of temperature points include a lowest temperature point and a highest temperature point of the electric energy meter, a temperature point corresponding to a maximum error of a daily time, and a daily working temperature point;
And performing one or more of vertical axis translation, K-value stretching fitting, three-zero fitting and sinusoidal fitting on a polynomial compensation curve with the time-of-day error return to zero of a preset plurality of temperature points as a target to adjust the initial coefficients of each item to obtain adjustment coefficients of each item in the high-order polynomial compensation formula, wherein the method comprises the following steps:
performing vertical axis translation on the polynomial compensation curve by taking the error return-to-zero of the lowest temperature point as a target to obtain a first compensation curve and a first coefficient combination; wherein the first coefficient combination comprises coefficients of each item in the higher order polynomial compensation formula after vertical axis translation;
performing K-value stretching fitting on the first compensation curve by taking error return-to-zero of the highest temperature point as a target to obtain a second compensation curve and a second coefficient combination; the second coefficient combination comprises coefficients of each item in the high-order polynomial compensation formula after K-value stretching fitting;
taking the error return-to-zero of the temperature point corresponding to the maximum daily timing error in the second compensation curve as a target, and performing three-zero fitting on the second compensation curve to obtain a third compensation curve and a third coefficient combination; the third coefficient combination comprises coefficients of each item in the high-order polynomial compensation formula after three-zero fitting;
Performing sinusoidal curve fitting on the third compensation curve by taking the error return to zero of a daily working temperature point in the third compensation curve as a target to obtain a target compensation curve and a target coefficient combination; wherein the target coefficient combination includes adjustment coefficients of the terms.
4. The method for calibrating an electric energy meter according to any one of claims 1 to 3, wherein the calibrating the electric energy meter by correcting the crystal oscillator frequencies at a plurality of temperatures of the electric energy meter based on the higher order polynomial compensation formula and the adjustment coefficients of the terms comprises:
acquiring the real-time temperature and the real-time frequency of the electric energy meter;
calculating a frequency error corresponding to the real-time temperature based on the real-time temperature, the adjustment coefficients of the various items, and the higher order polynomial compensation formula;
and determining the correction frequency of the electric energy meter at the real-time temperature based on the frequency error corresponding to the real-time temperature and the real-time frequency, and adjusting the electric energy meter by using the correction frequency.
5. A method of calibrating an electric energy meter according to any of claims 1 to 3, wherein the initial coefficients comprise a primary term coefficient, a secondary term coefficient, a tertiary term coefficient and a quaternary term coefficient;
And based on the temperature sequence and the error sequence, performing data fitting by adopting a high-order polynomial compensation formula to obtain initial coefficients of each item in the high-order polynomial compensation formula, wherein the method comprises the following steps:
performing data fitting based on the following high-order polynomial compensation formula to obtain initial coefficients of the various items;
Figure QLYQS_1
wherein f is a time of day error of a temperature point in the error sequence, ka is an intercept constant, kb is a first term coefficient, kc is a second term coefficient, kd is a third term coefficient, ke is a fourth term coefficient, and T is a temperature value of a temperature point in the temperature sequence.
6. The method for calibrating an electric energy meter according to any one of claims 1 to 3, wherein the electric energy meter to be calibrated is N electric energy meters of the same batch, wherein N is an integer, and N is not less than 1;
the method for acquiring the time of day errors of the crystal oscillator frequency of the electric energy meter to be calibrated at a plurality of temperature points comprises the following steps:
performing error test on M electric energy meters in the N electric energy meters to obtain the time-of-day errors of the M electric energy meters at the plurality of temperature points; wherein M is an integer, M is less than or equal to N;
and for the same temperature point, determining the average value of the time of day errors of the electric energy meters at the temperature point as the time of day error of the electric energy meters to be regulated at the temperature point.
7. The method for calibrating an electric energy meter according to any one of claims 1 to 3, wherein the correcting the crystal oscillator frequencies of the electric energy meter at a plurality of temperatures based on the higher order polynomial compensation formula and the adjustment coefficients of the terms to achieve the calibration of the electric energy meter further comprises:
acquiring historical metering data of the corrected electric energy meter; and historical temperature data corresponding to the historical metering data;
based on the historical metering data and the historical temperature data, carrying out time window division, and extracting metering data of each time period and temperature values of each time period in each day;
for the same time period, dividing metering data of the time period based on the temperature value of the time period to obtain a plurality of metering data sets; wherein one set of metrology data corresponds to one temperature interval;
calculating and comparing the average value and variance of each metering data set to obtain a comparison result;
and determining metering conditions of the corrected electric energy meter at the plurality of temperature points based on the comparison result.
8. The method for calibrating an electric energy meter according to any one of claims 1 to 3, wherein the correcting the crystal oscillator frequencies of the electric energy meter at a plurality of temperatures based on the higher order polynomial compensation formula and the adjustment coefficients of the terms to achieve the calibration of the electric energy meter further comprises:
Periodically sending a first instruction to the corrected electric energy meter, wherein the first instruction is used for indicating the corrected electric energy meter to return the current time and the current temperature;
periodically receiving a first response returned by the corrected electric energy meter; the first response includes a current time and a current temperature of the corrected electric energy meter;
comparing the error between the current time returned by the corrected electric energy meter and the current actual time;
and if the error is larger than the preset error, re-correcting the corrected electric energy meter based on the current temperature returned by the corrected electric energy meter and the error.
9. An electric energy meter's timing device, characterized in that includes:
the communication unit is used for acquiring the time-of-day errors of the crystal oscillator frequency of the electric energy meter to be calibrated at a plurality of temperature points and constructing a temperature sequence and an error sequence based on the time-of-day errors of the temperature points;
the processing unit is used for carrying out data fitting by adopting a high-order polynomial compensation formula based on the temperature sequence and the error sequence to obtain initial coefficients of each item in the high-order polynomial compensation formula; adjusting initial coefficients of each item by taking the time of day error return to zero of a plurality of preset temperature points as a target to obtain adjustment coefficients of each item in the high-order polynomial compensation formula; and correcting the crystal oscillator frequencies of the electric energy meter at a plurality of temperatures based on the high order polynomial compensation formula and the adjustment coefficients of the various items, so as to realize the adjustment of the electric energy meter.
10. An electronic device comprising a memory storing a computer program and a processor for invoking and executing the computer program stored in the memory to perform the steps of the method according to any of claims 1 to 7.
CN202310409601.7A 2023-04-18 2023-04-18 Electric energy meter adjusting method and device and electronic equipment Active CN116148754B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310409601.7A CN116148754B (en) 2023-04-18 2023-04-18 Electric energy meter adjusting method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310409601.7A CN116148754B (en) 2023-04-18 2023-04-18 Electric energy meter adjusting method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN116148754A true CN116148754A (en) 2023-05-23
CN116148754B CN116148754B (en) 2023-06-27

Family

ID=86362138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310409601.7A Active CN116148754B (en) 2023-04-18 2023-04-18 Electric energy meter adjusting method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN116148754B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05180878A (en) * 1991-11-01 1993-07-23 Yokogawa Electric Corp Adjusting method for electric power measuring instrument
DE4412973A1 (en) * 1993-05-05 1994-11-17 Landis & Gyr Business Support Method for matching a sensor-type-specific characteristic curve function of a resistance temperature sensor and device for carrying out the method
WO2002037063A2 (en) * 2000-11-03 2002-05-10 Micro Motion, Inc. Apparatus and method for compensating mass flow rate of a material when the density of the material causes an unacceptable error in flow rate
CN101488752A (en) * 2009-02-11 2009-07-22 凯涛电子(上海)有限公司 Temperature frequency correcting apparatus
CN102590782A (en) * 2012-03-05 2012-07-18 钜泉光电科技(上海)股份有限公司 Method and device for automatically correcting voltage influence quantity of electric energy measurement chip
CN202631630U (en) * 2012-05-28 2012-12-26 湖南省电力公司科学研究院 Novel intelligent electric energy meter based on spectrum correction of Blackman-Harris window
CN203299557U (en) * 2013-05-30 2013-11-20 上海贝岭股份有限公司 Real-time clock compensation device
CN108020808A (en) * 2017-11-21 2018-05-11 浙江晨泰科技股份有限公司 A kind of highly reliable high-precision electric energy meter real-time clock design method
CN112461261A (en) * 2020-11-06 2021-03-09 长沙天仪空间科技研究院有限公司 Device and method for correcting temperature drift of MEMS gyroscope
CN113504401A (en) * 2021-06-08 2021-10-15 深圳市科陆电子科技股份有限公司 Method, device and system for compensating time error of electric energy meter diary
CN114035142A (en) * 2021-04-16 2022-02-11 湖南师范大学 Electric energy meter error compensation method and system based on segmented Lagrange interpolation
CN115792374A (en) * 2022-10-20 2023-03-14 南京国电南自电网自动化有限公司 Sine wave frequency measurement calculation method, system, storage medium and calculation equipment
CN115865229A (en) * 2022-12-01 2023-03-28 中国电子科技集团公司第二十九研究所 Broadband phased array channel correction data processing method, device, equipment and medium
CN115904000A (en) * 2022-10-31 2023-04-04 河南大学 Real-time clock crystal oscillator compensation method and system based on orthogonal least square method curve fitting

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05180878A (en) * 1991-11-01 1993-07-23 Yokogawa Electric Corp Adjusting method for electric power measuring instrument
DE4412973A1 (en) * 1993-05-05 1994-11-17 Landis & Gyr Business Support Method for matching a sensor-type-specific characteristic curve function of a resistance temperature sensor and device for carrying out the method
WO2002037063A2 (en) * 2000-11-03 2002-05-10 Micro Motion, Inc. Apparatus and method for compensating mass flow rate of a material when the density of the material causes an unacceptable error in flow rate
CN101488752A (en) * 2009-02-11 2009-07-22 凯涛电子(上海)有限公司 Temperature frequency correcting apparatus
CN102590782A (en) * 2012-03-05 2012-07-18 钜泉光电科技(上海)股份有限公司 Method and device for automatically correcting voltage influence quantity of electric energy measurement chip
CN202631630U (en) * 2012-05-28 2012-12-26 湖南省电力公司科学研究院 Novel intelligent electric energy meter based on spectrum correction of Blackman-Harris window
CN203299557U (en) * 2013-05-30 2013-11-20 上海贝岭股份有限公司 Real-time clock compensation device
CN108020808A (en) * 2017-11-21 2018-05-11 浙江晨泰科技股份有限公司 A kind of highly reliable high-precision electric energy meter real-time clock design method
CN112461261A (en) * 2020-11-06 2021-03-09 长沙天仪空间科技研究院有限公司 Device and method for correcting temperature drift of MEMS gyroscope
CN114035142A (en) * 2021-04-16 2022-02-11 湖南师范大学 Electric energy meter error compensation method and system based on segmented Lagrange interpolation
CN113504401A (en) * 2021-06-08 2021-10-15 深圳市科陆电子科技股份有限公司 Method, device and system for compensating time error of electric energy meter diary
CN115792374A (en) * 2022-10-20 2023-03-14 南京国电南自电网自动化有限公司 Sine wave frequency measurement calculation method, system, storage medium and calculation equipment
CN115904000A (en) * 2022-10-31 2023-04-04 河南大学 Real-time clock crystal oscillator compensation method and system based on orthogonal least square method curve fitting
CN115865229A (en) * 2022-12-01 2023-03-28 中国电子科技集团公司第二十九研究所 Broadband phased array channel correction data processing method, device, equipment and medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JIANMIN LI等: "《A Simple Calibration Method for Ratio Error and Phase Error of Electronic Energy Meter》", 《ELECTRIC POWER SYSTEMS RESEARCH》 *
王刚等: "《使用智能电表数据进行智能电网负载分析》", 《电气自动化》 *
谢宏伟等: "《谐波环境下实现智能电能表计量误差影响量分析》", 《电子设计工程》 *

Also Published As

Publication number Publication date
CN116148754B (en) 2023-06-27

Similar Documents

Publication Publication Date Title
CN106505996B (en) A kind of RTC chip high-precision frequency bias compensation method of combination variable capacitance
CN103176400B (en) Intelligent ammeter clock calibration method
CN105573106B (en) To the amendment circuit and its method of RTC accuracy of timekeeping in a kind of intelligent electric meter
CN103616814A (en) Synchronous sampling clock closed loop correcting method and system based on FPGA
CN111998919B (en) Gas meter calibration method and device
CN103901942B (en) For the calibration method and device of the clock accuracy of terminal
CN103901380B (en) Calibration method and its calibrating installation
CN107272821A (en) Calibration method of real-time clock and device, storage medium, electronic equipment
CN116106605A (en) Electric energy meter parameter compensation method, medium and system considering temperature change
CN109407498A (en) A kind of clock of power meter test method and clock of power meter test device
CN112305485B (en) Method and device for correcting harmonic voltage measurement error of capacitor voltage transformer
CN116148754B (en) Electric energy meter adjusting method and device and electronic equipment
CN203299557U (en) Real-time clock compensation device
CN113761808A (en) Earth surface tide displacement acquisition method based on GPS and empirical tide model, and application method and system thereof
CN113504401B (en) Method, device and system for compensating diary time error of electric energy meter
CN102879061A (en) Water gauge error correction method based on fitted equation
CN114488766A (en) Clock time service method, device and medium
CN115904000A (en) Real-time clock crystal oscillator compensation method and system based on orthogonal least square method curve fitting
CN104635193B (en) A kind of SOC real-time clock high-accuracy compensation method of ammeter
CN113705145B (en) Online self-correction method for pi-type transmission line model parameters
CN112731790B (en) Method for improving RTC (real time clock) calibration precision based on time domain segmented interpolation compensation
CN113432666B (en) Agricultural underground water exploitation amount measuring method based on dynamic calculation of electric-water conversion coefficient
CN201323567Y (en) High precision GPS clock used in detection station of time difference between thunder and lightening
CN109472295B (en) Pearson correlation coefficient-based WAMS/SCADA system time synchronization sorting method
CN116542542A (en) Calculation method, device and equipment of carbon emission data and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant