A DC metering calibration method, medium, and terminal
By setting a stable output value for the DC energy meter, obtaining the fluctuation range, and establishing a metering compensation model, and using historical averages for output value compensation, the problem of insufficient accuracy of the metering chip is solved, achieving higher metering accuracy and stability, and reducing hardware costs.
Patent Information
- Application Number
- CN202311132162.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-04
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-09-04
AI Technical Summary
Existing DC energy meters have low metering accuracy. Due to hardware defects, the calibration process for metering chips is inconvenient and lacks precision, affecting metering stability and accuracy.
By setting a stable output value for the test bench, the real-time effective value fluctuation range of current, voltage, and power is obtained, a metering compensation model is established, and the output value is compensated using historical averages. The real-time effective value approximates the average value, and a metering correction model is established between each pair of adjacent calibration points to reduce the fluctuation of the effective value.
It improves the metering accuracy and stability of DC energy meters, reduces hardware costs, ensures that metering sensitivity is not affected, and enhances the calibration accuracy of metering chips.
Smart Images

Figure CN117214797B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of DC power metering technology, and particularly relates to a DC metering calibration method, medium and terminal. Background Technology
[0002] In recent years, with the development of new energy electric vehicles and photovoltaic power generation equipment, research on related infrastructure such as charging stations and charging piles has gradually deepened. As a DC output measuring instrument, the accuracy of DC energy meters is of great significance for ensuring the fairness and impartiality of energy trading and promoting the construction of clean energy.
[0003] Currently, the metering accuracy of DC energy meters relies entirely on the accuracy of the metering chip and its calibration method. Traditional metering chip calibration involves the main control chip calculating the calibration value based on the output of the calibration point platform and writing it to the metering chip. After calibration, the metering chip outputs accurate metering data. However, due to hardware limitations, the data collected by the metering chip is not entirely accurate and requires calibration. Current calibration methods require writing calibration parameters into the metering chip's registers during the initialization phase. In separate designs, where the main control chip and metering chip are not packaged on a single chip, they need to exchange data through a hardware communication interface. Because of the calibration parameters, the metering chip must provide a receiving channel to receive the calibration parameters stored by the main control chip. This makes the calibration process inconvenient, and the accuracy of the metering chip is also affected by hardware defects. Patent CN112285628B discloses a method for calibrating a high-reliability, high-current DC ammeter, comprising: S1, performing a preliminary verification of the ammeter to be calibrated; if it fails, the ammeter is discarded; otherwise, the ammeter is calibrated; S2, obtaining the calibration parameters of the ammeters that passed the preliminary verification in step S1; S3, verifying the calibration parameters obtained in step S2; if the verification is successful, the ammeter calibration is complete; if the verification fails, the calibration parameters are corrected until the calibration parameters are verified to be successful. It also discloses a high-reliability, high-current DC ammeter, comprising: a base, a housing, a terminal block, a terminal board, a sampling resistor, a calibration interface, a current acquisition module, a voltage acquisition module, a communication module, and a control module. This patent also calibrates the energy meter based on calibration parameters, and still suffers from the drawback of low accuracy found in existing technologies.
[0004] Therefore, how to overcome the shortcomings of existing technologies and improve the calibration accuracy of metering chips in order to improve the metering stability and accuracy of DC energy meters is an urgent problem to be solved by those in this technical field. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a DC metering calibration method to solve the problem of low metering accuracy of DC energy meters in the prior art; in addition, this invention also provides a DC metering calibration medium and terminal.
[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides a DC metering calibration method, comprising the following steps:
[0008] S10. Set the platform to output at the calibration point. After the output stabilizes, the host computer obtains the real-time effective values of the current, voltage and power of the DC energy meter and their fluctuation range.
[0009] S20. The DC energy meter calculates the difference between the real-time effective values of current, voltage and power and the previous historical values to determine whether the fluctuation range is exceeded. If it is exceeded, the meter returns to step S10 to obtain the fluctuation range again. If it is not exceeded, the fluctuation range is written into the DC energy meter and the historical values are used for metering compensation.
[0010] S30. Obtain the output values of current, voltage, and power at the current calibration point and write them to the DC energy meter;
[0011] S40. Establish a metering compensation model between each pair of adjacent metering points, and take the larger value of the fluctuation range between each pair of adjacent metering points.
[0012] Furthermore, the specific steps of step S10 are as follows:
[0013] S101. According to the full range of the DC energy meter, the calibration points are divided into 1, 2, ... M. After the platform stabilizes at calibration point 1, the host computer obtains N real-time effective values of current I, voltage U and power P within a certain time.
[0014] S102. Calculate the fluctuation value of calibration point 1, wherein the fluctuation value is the absolute value of the difference between two adjacent real-time valid values;
[0015] S103. Calculate the fluctuation range of calibration point 1. The fluctuation range is the maximum value of N-1 fluctuation values, and multiplied by the fluctuation range ratio coefficient K.
[0016] Furthermore, the specific steps of step S20 are as follows:
[0017] S201. After obtaining the fluctuation range in step S103, the host computer obtains N real-time effective values of current I, voltage U, and power P within a certain time period, and detects whether they exceed the fluctuation range.
[0018] S202. After reading the real-time valid values twice in a row, the difference is processed. If the difference is greater than Range(1), it means that the fluctuation range is exceeded. Then return to step S10 to obtain the fluctuation range again. Otherwise, if the difference is less than or equal to Range(1), it means that the fluctuation range is valid. Write the fluctuation range into the DC energy meter and start the historical value for metering compensation.
[0019] S203. After calculating the mean by introducing historical values, the real-time effective values are then approximated to the mean to obtain accurate values.
[0020] Furthermore, in step S30, the stable output value after meter compensation at calibration point 1 is obtained, and the stable output value is written into the DC energy meter, which means that calibration point 1 has been calibrated.
[0021] Furthermore, in step S40, steps S10 to S30 are repeated to complete the parameter correction of M calibration points and obtain the fluctuation range and stable output value of each calibration point.
[0022] In a second aspect, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described above.
[0023] Thirdly, the present invention also provides an electronic terminal, comprising: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to cause the terminal to perform the method described above.
[0024] Compared with the prior art, the DC metering calibration method, medium, and terminal provided by this invention have at least the following advantages:
[0025] In existing technologies, the data collected by the metering chip in a DC energy meter is not entirely accurate, and the chip's precision can be affected by hardware defects. This invention offers a simple process and reliable results. By introducing historical averages for output value compensation, it reduces effective value fluctuations, making DC metering calibration more reliable and accurate.
[0026] To avoid the problem of reduced metering sensitivity caused by the introduction of historical averages, the fluctuation range is used to determine whether the output source has changed. If it exceeds the fluctuation range, it is determined that the output source has changed, and the historical average has no effect until it stabilizes within the fluctuation range again. In addition, by approximating the historical average with the real-time effective value, rather than directly taking the average, the trend of the change of the real-time effective value is preserved, ensuring metering accuracy without affecting metering sensitivity. By establishing a correction model for the error law between each calibration point of the DC energy meter, the problem of low linearity across the entire range, which leads to large differences in accuracy across the entire range, is avoided. This invention can effectively reduce the fluctuation of the effective value of the metering chip, improve the metering robustness and linearity of the DC energy meter, give full play to hardware performance, and reduce hardware costs. Attached Figure Description
[0027] To more clearly illustrate the solution of the present invention, a brief introduction will be given to the drawings used in the description of the embodiments below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0028] Figure 1 A flowchart of a DC correction method provided in an embodiment of the present invention;
[0029] Figure 2 A flowchart illustrating the acquisition and verification of the fluctuation range of a DC correction method provided in this embodiment of the invention;
[0030] Figure 3 The present invention provides a functional flowchart of a metering compensation model for a DC correction method according to an embodiment of the present invention. Detailed Implementation
[0031] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Preferred embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of the invention.
[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0033] This invention provides a DC metering calibration method, applicable to DC power metering scenarios such as charging stations and charging piles. The DC metering calibration method includes the following steps:
[0034] S10. Set the platform to output at the calibration point. After the output stabilizes, the host computer obtains the real-time effective values of the current, voltage and power of the DC energy meter and their fluctuation range.
[0035] S20. The DC energy meter calculates the difference between the real-time effective values of current, voltage and power and the previous historical values to determine whether the fluctuation range is exceeded. If it is exceeded, the meter returns to step S10 to obtain the fluctuation range again. If it is not exceeded, the fluctuation range is written into the DC energy meter and the historical values are used for metering compensation.
[0036] S30. Obtain the output values of current, voltage and power at the current calibration point and write them to the DC energy meter;
[0037] S40. Establish a metering compensation model between each pair of adjacent metering points, and take the larger value of the fluctuation range between each pair of adjacent metering points.
[0038] The present invention has a simple process and reliable results, which effectively improves the accuracy and stability of DC energy meter measurement.
[0039] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0040] This invention provides a DC metering correction method, applicable to DC power metering scenarios such as charging stations and charging piles, combined with... Figures 1 to 3 The DC metering calibration method includes the following steps:
[0041] S10. Set the platform to output at the calibration point. After the output stabilizes, the host computer obtains the real-time effective values of the current, voltage and power of the DC energy meter and their fluctuation range.
[0042] Specifically, the platform (electricity meter calibration device) is a high-precision DC testing system, model TD0450, with an accuracy class of 0.05. The DC electricity meter includes an MCU control module, a metering module, a communication module, etc. The MCU model is V8500P, and the metering chip model is V9260S.
[0043] Furthermore, the host computer is connected to the communication port of the DC energy meter via a communication cable. The host computer can set the number and frequency of data readings, and has the function of detecting the data fluctuation range within the reading quantity. It can provide feedback on the detection results based on the fluctuation of the real-time valid value. In the calibration mode, the calibration parameters of the DC energy meter can be modified through parameter settings.
[0044] The fluctuation range indicates the range of fluctuations in the metering data read by the metering module when the output source (station, mains power, etc.) is stable. If the fluctuation range is exceeded, it is considered that the output source has changed, and the DC energy meter should respond in time.
[0045] Furthermore, based on the fact that the full range of the DC energy meter is divided into calibration points 1, 2, ... M, after the meter body stabilizes its output at calibration point 1, the host computer acquires N real-time effective values of current I, voltage U, and power P within a certain time period:
[0046] I = [I1,I2,…,I N ];
[0047] U = [U1,U2,…,U N ];
[0048] P = [P1,P2,…,P N ];
[0049] Calculate the fluctuation value of calibration point 1: The fluctuation value is the absolute value of the difference between two adjacent real-time valid values.
[0050] Specifically, the current fluctuation values are: |I1-I2|,|I2–I3|,…,|I N-1 –I N |;
[0051] Voltage fluctuation values: |U1-U2|,|U2–U3|,…,|U N-1 –U N |;
[0052] Power fluctuation values: |P1-P2|,|P2–P3|,…,|P N-1 –P N |;
[0053] Calculate the fluctuation range of calibration point 1: The fluctuation range is the maximum value of N fluctuation values, multiplied by the fluctuation range scaling factor K.
[0054] Current fluctuation range RangeI(1) = K*I Range_Max , where I Range_Max The maximum value among N current fluctuation values;
[0055] Voltage fluctuation range RangeU(1) = K*U Range_Max U Range_Max The maximum value among N voltage fluctuation values;
[0056] Power fluctuation range RangeP(1) = K*P Range_Max , where P Range_Max The maximum value among N power fluctuation values;
[0057] Wherein, K is the fluctuation range ratio coefficient, which is used to appropriately widen the fluctuation range to take into account the randomness of fluctuation and system interference. For application environments with unstable output, such as charging stations and charging piles, the fluctuation range needs to be further widened.
[0058] S20. The DC energy meter calculates the difference between the real-time effective values of current, voltage and power and the previous historical values to determine whether the fluctuation range is exceeded. If it is exceeded, the meter returns to step S10 to obtain the fluctuation range again. If it is not exceeded, the fluctuation range is written into the DC energy meter and the historical values are used for metering compensation.
[0059] Specifically, after obtaining the fluctuation range, the host computer acquires N real-time effective values of current I, voltage U, and power P within a certain time period, and checks whether there are any cases exceeding the fluctuation range. The detection method is to read the real-time effective values twice consecutively and perform difference processing. If the difference is greater than Range(1), it means that the fluctuation range is exceeded, and the computer returns to step S10 to reacquire the fluctuation range. Conversely, if all the differences are less than or equal to Range(1), it indicates that the fluctuation range is valid, and the fluctuation range is written into the DC energy meter to start the historical value for metering compensation.
[0060] Furthermore, to ensure effective DC metering calibration, the problem of effective value fluctuation in the metering chip must first be solved: by incorporating historical values into the calculation to obtain the average value, and then approximating the real-time effective value to the average value, a more accurate and stable indication is obtained. This method, which does not directly take the average value, preserves the trend of change of the real-time effective value, and the metering sensitivity is not affected by taking the average value.
[0061] Historical values are L real-time valid values collected within a certain period of time, specifically:
[0062] HIS_I = [HIS_I1,HIS_I2,…,HIS_I L ];
[0063] HIS_U = [HIS_U1,HIS_U2,…,HIS_U L ];
[0064] HIS_P = [HIS_P1,HIS_P2,…,HIS_P L ];
[0065] HIS_I1, HIS_U1, and HIS_P1 are the latest historical values, i.e., the real-time valid values, while HIS_I2, HIS_U2, and HIS_P2 are the previous historical values.
[0066] In this embodiment, taking current compensation as an example, the DC energy meter collects real-time effective values and temporarily stores them to historical values. First, it is determined whether the real-time effective value HIS_I1 exceeds the fluctuation range.
[0067] If the judgment condition is |HIS_I1 - HIS_I2| > RangeI, it means that the fluctuation range has been exceeded (the output source has changed). At this time, all historical values are cleared and only the real-time valid value is output, that is, OutPut_I = HIS_I1.
[0068] If the condition is |HIS_I1 - HIS_I2| <= RangeI, it means the fluctuation range has not been exceeded (the output source has not changed). In this case, the historical average is calculated: Historical average HIS_I_Avg = (HIS_I1 + HIS_I2 + … + HIS_I) L ) / L;
[0069] The output value is obtained by approximating the historical mean value to the real-time effective value:
[0070] OutPut_I' = OutPut_I - (OutPut_I - HIS_I_Avg) * Q, where Q is the approximation coefficient;
[0071] The methods for voltage and power compensation are exactly the same as those for current compensation, and will not be repeated here.
[0072] Specifically, the output value of step S30 is the current, voltage and power values output by the DC energy meter after the fluctuation range is valid and the historical value is used for metering compensation.
[0073] S30. Obtain the output values of current, voltage and power at the current calibration point and write them to the DC energy meter;
[0074] Specifically, the stable output values OutPut_I1, OutPut_U1, and OutPut_P1 after compensation at calibration point 1 are obtained, and the stable output values are written into the DC energy meter. Calibration at calibration point 1 is then completed.
[0075] S40. Establish a metering compensation model between each pair of adjacent metering points, and take the larger value of the fluctuation range between each pair of adjacent metering points.
[0076] Specifically, repeat steps S10 to S30 to complete the parameter calibration of M calibration points, obtain the fluctuation range and stable output value of each calibration point, and further obtain the fluctuation range and metrological calibration model between calibration points. The metrological calibration parameters of each calibration point are shown in Table 1, Calibration Point Metrological Calibration Parameter Table.
[0077] Furthermore, the fluctuation range is calculated as follows: the fluctuation range between any two adjacent calibration points is taken as the larger value of the fluctuation range between these two calibration points, and the fluctuation range is saved to the internal card.
[0078] In this embodiment, taking calibration points 1 and 2 as examples, the fluctuation range between calibration point 1 and calibration point 2 is as follows:
[0079] The current fluctuation range RangeI(12) = MAX(RangeI(1),RangeI(2));
[0080] Voltage fluctuation range RangeU(12) = MAX(RangeU(1),RangeU(2));
[0081] The power fluctuation range RangeP(12) = MAX(RangeP(1),RangeP(2));
[0082] MAX(a,b) is a function that takes the larger value of a and b.
[0083] Furthermore, the DC energy meter establishes a correction model between each pair of adjacent calibration points based on the stable output value after calibration point compensation, and saves the model parameters to the internal card.
[0084] In this embodiment, taking calibration points 1 and 2 as examples, through (I T1 ,OutPut_I1), (I T2 (Output_I2) Establish a current correction model:
[0085] OutPut_II = IA1 * OutPut_I + IB1
[0086] Among them, I T1 I T2 The output current of the calibration points 1 and 2 is used.
[0087] Through (U) T1 ,OutPut_U1), (U T2 Establish a voltage correction model for Output_U2:
[0088] OutPut_UU = UA1 * OutPut_U + UB1
[0089] Among them, U T1 U T2 The output voltage of the calibration points 1 and 2 are used.
[0090] Through (P) T1 ,OutPut_P1), (P T2 (Output_P2) Establish a power correction model:
[0091] OutPut_PP = PA1 * OutPut_P + PB1
[0092] Among them, P T1 P T2 The output power of the calibrator at points 1 and 2 is used for calibration.
[0093] Switch to a calibration point. The calibration method for the remaining calibration points is exactly the same as that for calibration points 1 and 2, until calibration points 1, 2, ... M of the DC energy meter are fully calibrated and a calibration parameter file is established, as shown in Table 1, Calibration Point Calibration Parameter Table.
[0094] Table 1
[0095]
[0096] This invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the methods in this embodiment.
[0097] This invention also provides an electronic terminal, including: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal performs any of the methods in this embodiment.
[0098] As will be understood by those skilled in the art, the computer-readable storage medium described in this embodiment allows for the implementation of all or part of the steps in the above method embodiments by computer program-related hardware. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0099] The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver, and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication between them. The memory is used to store computer programs, the communication interface is used to perform communication, and the processor and the transceiver are used to run the computer programs, so that the electronic terminal performs the steps of the above method.
[0100] Compared with existing technologies, the DC metering calibration method, medium, and terminal described in the above embodiments do not collect completely accurate data from the DC energy meter's metering chip, and the chip's accuracy can be affected by hardware defects. This invention features a simple process and reliable results. By introducing historical averages for output value compensation, it reduces effective value fluctuations, making DC metering calibration more reliable and accurate. To avoid the reduced metering sensitivity caused by introducing historical averages, the fluctuation range is used to determine if the output source has changed. If the fluctuation range is exceeded, it is determined that the output source has changed, and the historical average has no effect until it stabilizes within the fluctuation range again. Furthermore, by approximating the historical average with real-time effective values, rather than directly taking the average, the trend of real-time effective value changes is preserved, ensuring metering accuracy without affecting metering sensitivity. By establishing a calibration model based on the error patterns between various calibration points of the DC energy meter, it avoids the problem of low linearity across the entire range, leading to large differences in accuracy across the entire range. This invention can effectively reduce the effective value fluctuations of the metering chip, improve the robustness and linearity of the DC energy meter, fully utilize hardware performance, and reduce hardware costs.
[0101] Obviously, the embodiments described above are merely preferred embodiments of the present invention, and not all embodiments. The accompanying drawings illustrate preferred embodiments of the present invention, but do not limit the scope of the patent. The present invention can be implemented in many different forms; rather, these embodiments are provided to provide a more thorough and complete understanding of the disclosure of the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this invention.
Claims
1. A DC metering calibration method, characterized in that, Includes the following steps: S10. Set the platform to output at the calibration point. After the output stabilizes, the host computer obtains the real-time effective values of the current, voltage and power of the DC energy meter and their fluctuation range. S20. The DC energy meter calculates the difference between the real-time effective values of current, voltage and power and the previous historical values to determine whether the fluctuation range is exceeded. If it is exceeded, the meter returns to step S10 to obtain the fluctuation range again. If it is not exceeded, the fluctuation range is written into the DC energy meter and the historical values are used for metering compensation. The specific steps of S20 are as follows: S201. After obtaining the fluctuation range in S10, the host computer acquires N' real-time effective values of current I', voltage U', and power P' within a certain time period, and detects whether they exceed the fluctuation range. S202. After reading the real-time valid values twice in a row, the difference is processed. If the difference is greater than Range(1), it means that the fluctuation range is exceeded. Range(1) is the fluctuation range of the calibration point 1. Then return to step S10 to obtain the fluctuation range again. Otherwise, if the difference is less than or equal to Range(1), it means that the fluctuation range is valid. Write the fluctuation range into the DC energy meter and start the historical value for metering compensation. S203. After calculating the mean by introducing historical values, the real-time valid values are then approximated to the mean to obtain the accurate value. Accurate value = real-time valid value - (real-time valid value - historical average value) * approximation coefficient; S30. Obtain the output values of current, voltage, and power at the current calibration point and write them to the DC energy meter; In step S30, the stable output value after meter compensation at the current calibration point 1 is written into the DC energy meter, which means that the calibration of the current calibration point 1 is completed. S40. Establish a metering compensation model between each pair of adjacent metering points, and take the larger value of the fluctuation range between each pair of adjacent metering points.
2. The DC metering calibration method according to claim 1, characterized in that, The specific steps of step S10 are as follows: S101. According to the full range of the DC energy meter, the calibration points are divided into 1, 2, ... M. After the platform stabilizes at calibration point 1, the host computer obtains N real-time effective values of current I, voltage U and power P within a certain time. S102. Calculate the fluctuation value of calibration point 1, wherein the fluctuation value is the absolute value of the difference between two adjacent real-time valid values; S103. Calculate the fluctuation range of calibration point 1. The fluctuation range is the maximum value of N-1 fluctuation values, and multiplied by the fluctuation range ratio coefficient K.
3. The DC metering calibration method according to claim 2, characterized in that, In step S40, steps S10 to S30 are repeated to complete the parameter correction of M calibration points and obtain the fluctuation range and stable output value of each calibration point.
4. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 3.
5. An electronic terminal, characterized in that, include: Processor and memory; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to cause the terminal to perform the method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
A High-Reliability High-Current DC Ammeter and Its Calibration Method
CN112285628B
Method and device for calibrating power source
CN101634695A
Electric energy meter rapid calibration method
CN106814342A
