A sampling calibration method for power router based on first-order curve fitting

Through the sampling calibration method of the electric energy router based on first-order curve fitting, the problem of low manual calibration accuracy and susceptible to human factors in the prior art is solved, and high-precision and stable sampling circuit calibration is achieved, which can effectively discover the problem of sampling circuits.

CN118731814BActive Publication Date: 2025-04-29MAYTIME (SHENZHEN) TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410855583.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2025-04-29
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

The existing calibration methods for hardware sampling circuits of electrical energy routers rely on manual recording of data and calculating calibration curves, resulting in low accuracy, long time-consuming and susceptible to human factors, making it difficult to effectively discover the problem of sampling circuits.

Method used

The sampling calibration method of the electric energy router based on first-order curve fitting is adopted. By selecting multiple points in the full voltage and full current range as the set values, recording the sample value and actual values, calculating the average value of voltage and current, fitting out the calibration curve, and determining the fitting degree to determine whether the calibration is successful or not.

Benefits of technology

It improves the reliability and stability of the calibration of the hardware sampling circuit of the electric energy router, can effectively detect problems in the sampling circuit, and has high accuracy and error is no more than 5% of the full scale.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118731814B_ABST
    Figure CN118731814B_ABST
Patent Text Reader

Abstract

The present invention relates to a sampling and calibration method of an electric energy router based on first-order curve fitting, comprising: selecting multiple voltage setting values ​​and multiple current setting values, setting voltage output values ​​and current output values ​​according to the selected voltage setting values ​​and current setting values, and recording the sampling values ​​and actual values ​​of each voltage and current, and taking the average data of the sampling values ​​and the actual values ​​as the average value in the fitting algorithm, calculating the voltage average value and the current average value according to the sampling values ​​and the actual values, respectively obtaining a voltage calibration curve and a current calibration curve through the fitting algorithm, respectively calculating the voltage fitting degree and the current fitting degree according to the voltage calibration curve and the current calibration curve, and then judging whether the voltage and current are calibrated successfully according to the voltage fitting degree result and the current fitting degree result. The calibration method of the present invention effectively improves the reliability and stability of the calibration results of the hardware sampling circuit of the electric energy router, so as to discover problems existing in the hardware sampling circuit through calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric energy routers, and in particular to a sampling and calibration method of an electric energy router based on first-order curve fitting. Background Art

[0002] With the rapid development of smart grid and energy Internet, power routers, as key equipment, play an important role in energy distribution, conversion and management. The sampling accuracy of the power router hardware sampling circuit directly affects the stability and reliability of its performance.

[0003] The calibration of the traditional power router hardware sampling circuit is usually done by manually recording data and calculating calibration curves. Manually recording data and calculating calibration curves are not only labor-intensive and time-consuming, but also the accuracy cannot be guaranteed. Especially when processing large amounts of data, the error rate increases significantly. Secondly, the calibration curve calculation process is complicated and requires high professional skills from the calculation personnel. As a result, the calculation results are easily affected by human factors, resulting in poor accuracy and stability of the calibration results, making it difficult to find problems with the hardware sampling circuit through calibration.

[0004] Therefore, there is an urgent need to provide a power router sampling calibration method based on first-order curve fitting to solve the above problems. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings and defects of the prior art and provide a sampling calibration method for an electric energy router based on first-order curve fitting, so as to find problems existing in the hardware sampling circuit through calibration.

[0006] The objective of the present invention is achieved through the following technical solutions:

[0007] A sampling and calibration method for an electric energy router based on first-order curve fitting comprises the following steps:

[0008] S1: Select multiple voltage points within the full output voltage range as voltage setting values, and select multiple current points within the full output current range as current setting values;

[0009] S2: setting the voltage output value according to the selected voltage setting value, recording the voltage sampling value and the actual value each time, and taking the average data of the voltage sampling value and the actual value as the voltage average value in the fitting algorithm; setting the current output value according to the selected current setting value, recording the current sampling value and the actual value each time, and taking the average data of the current sampling value and the actual value as the current average value in the fitting algorithm;

[0010] S3: A voltage calibration curve is obtained by a fitting algorithm based on an average voltage value calculated according to the voltage sampling value and the actual value, and a current calibration curve is obtained by a fitting algorithm based on an average current value calculated according to the current sampling value and the actual value;

[0011] S4: Calculate the voltage fit according to the voltage calibration curve, and then judge whether the voltage calibration is successful according to the fit result; calculate the current fit according to the current calibration curve, and then judge whether the current calibration is successful according to the fit result.

[0012] As a preferred technical solution of the present invention, step S1 is specifically as follows: the selected voltage setting value includes the lowest point and the highest point of the output voltage, and several key voltage points evenly distributed between the lowest point and the highest point; the selected current setting value includes the lowest point and the highest point of the output current, and several key current points evenly distributed between the lowest point and the highest point.

[0013] As a preferred technical solution of the present invention, in step S2, the sampling value is obtained by collecting the output value of the sampling circuit inside the power router, and the actual value is obtained by measuring the output value with a high-precision standard test instrument.

[0014] As a preferred technical solution of the present invention, in step S2, the voltage average value and the current average value both include the sampled value average value, the actual value average value, the sampled actual average value, and the sampled value square average value, and the voltage average value and the current average value are calculated by the following formulas:

[0015] ;

[0016] ;

[0017] ;

[0018] ;

[0019] in, is the sampling value, is the actual value, x_avg is the average of the sampled values, y_avg is the average of the actual value, xy_avg is the actual average of the samples, and xx_avg is the square average of the sampled values.

[0020] As a preferred technical solution of the present invention, in step S3, the calculation formulas of the voltage calibration curve and the current calibration curve are as follows:

[0021] ;

[0022] ;

[0023] Among them, a_value and b_value are two coefficients in the calibration formula obtained by the curve fitting algorithm; x_avg is the average value of the sampled values; y_avg is the average value of the actual values; xy_avg is the average value of the product of the sampled values ​​and the actual values; xx_avg is the average value of the square of the sampled values; is the square of the average of the sample values.

[0024] As a preferred technical solution of the present invention, after executing step S3, the calculation result is and After that, and Substituting into the following formula yields the calibration value:

[0025] Calibration value = sampling value * a + b

[0026] Among them, a_value and b_value are two coefficients in the calibration formula obtained by the curve fitting algorithm.

[0027] As a preferred technical solution of the present invention, in step S4, the voltage fitting degree and current fitting degree calculation formula are both:

[0028] ;

[0029] in, Indicates the degree of fit; i indicates the serial number (indicates the number), such as i 1, Represents the first sample value, Indicates the first actual value. Compared with the prior art, the present invention has the following beneficial effects:

[0030] The present invention samples the output value of the power router through a high-precision instrument, compares the actual value collected by the high-precision instrument with the set value, and fits a calibration curve so that the actual voltage output value and the actual current output value after calibration are close to the actual value measured by the high-precision standard test instrument. The calibration method of the present invention can effectively improve the reliability and stability of the calibration results of the hardware sampling circuit of the power router, so as to discover problems existing in the hardware sampling circuit through calibration. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a schematic diagram of the process of the present invention.

[0032] Figure 2 This is a flow chart of the calibration method of the present invention.

[0033] Figure 3Schematic diagram of voltage calibration curve of Example 1 of the present invention.

[0034] Figure 4 This is a schematic diagram of the current calibration curve of Example 1 of the present invention. DETAILED DESCRIPTION

[0035] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0036] The specific implementation process of the present invention is as follows:

[0037] The present invention fits the calibration curve so that the actual voltage output value and the actual current output value after calibration are close to the actual value measured by the high-precision standard test instrument. The voltage calibration step is consistent with the current calibration step. In the constant voltage mode, when the voltage output is stable, the set value of the voltage is equal to the sampled value, but the actual value is not necessarily equal to the set value. After calibration, the set value, sampled value and actual value of the voltage are all equal. In the constant current mode, when the current output is stable, the set value of the current is equal to the sampled value, but the actual value is not necessarily equal to the set value. After calibration, the set value, sampled value and actual value of the current are all equal.

[0038] like Figure 1 to Figure 2 As shown, a sampling and calibration method of an electric energy router based on first-order curve fitting specifically includes the following steps:

[0039] S1: Select multiple voltage points as voltage setting values ​​within the full output voltage range, and the selected voltage setting values ​​include the lowest and highest points of the output voltage, and several key voltage points evenly distributed between the lowest and highest points; select multiple current points as current setting values ​​within the full output current range; the selected current setting values ​​include the lowest and highest points of the output current, and several key current points evenly distributed between the lowest and highest points. In this embodiment, five voltage setting values ​​and five current setting values ​​are selected.

[0040] S2: Set the voltage output value and current output value according to the selected voltage setting value and current setting value, thereby obtaining five sets of corresponding data of voltage setting value and actual voltage output value, and record the sampling value and actual value of voltage and current each time, and take the average data of voltage sampling value and actual value as the average voltage value in the fitting algorithm, and the average data of current sampling value and actual value as the average current value in the fitting algorithm. The sampling value is obtained by collecting the actual output value of the sampling circuit inside the power router, and the actual value is obtained by measuring the actual output value with high-precision standard test instruments. Substitute the recorded voltage sampling value and actual value into the formula:

[0041] ;

[0042] ;

[0043] ;

[0044] ;

[0045] Calculate the average value of the sampled value, the average value of the actual value, the actual average value of the sampled value, and the square average value of the sampled value. is the sampling value, The calculation of the average current value is the same as that of the average voltage value, and both are calculated using the above formula.

[0046] S3: Calculate the average voltage value based on the voltage sampling value and the actual value, and obtain a voltage calibration curve through a fitting algorithm; substitute the average voltage value obtained in step S2 into the formula:

[0047] ;

[0048] ;

[0049] The voltage calibration curve is calculated. Among them, a_value and b_value are two coefficients in the calibration formula obtained by the curve fitting algorithm; x_avg is the average value of the sampled value; y_avg is the average value of the actual value; xy_avg is the average value of the product of the sampled value and the actual value; xx_avg is the average value of the square of the sampled value; is the square value of the average value of the sampling value; similarly, the average current value obtained in step S2 is substituted into the above formula to calculate the current calibration curve. and Substituting into the following formula yields the calibration value:

[0050] Calibration value = sampling value * a + b ;

[0051] Among them, a_value and b_value are two coefficients in the calibration formula obtained by the curve fitting algorithm.

[0052] S4: Calculate the voltage fit according to the voltage calibration curve, and then judge whether the voltage calibration is successful according to the fit result, calculate the current fit according to the current calibration curve, and then judge whether the current calibration is successful according to the fit result. The fit calculation formula is as follows:

[0053] ;

[0054] in, Indicates the degree of fit; i indicates the serial number (indicates the number), such as i 1, Represents the first sample value, Indicates the first actual value.

[0055] By substituting the voltage calibration curve and the current calibration curve into the fitting calculation formula, the voltage fitting degree and the current fitting degree are calculated. If the value is less than 0.98, it means that the sampling circuit inside the current power router has too large deviation to be calibrated. The sampling circuit needs to be rechecked and a calibration failure signal is sent. If it is greater than 0.98, the calibration data is written into Eeprom and a calibration completion signal is sent. The current fit result judgment is similar to the voltage fit result judgment. Example 1

[0056] Through the above calibration steps, the measured calibration data table is as follows:

[0057]

[0058] Calibration curve reference Figure 3 , Figure 4 .

[0059] The maximum voltage error is 0.62V, and the error is 0.16%FS; the maximum current error is 0.3A, and the error is 1.2%FS; the error values ​​are all less than 5% of the full scale, and this calibration method has high accuracy.

[0060] R² is the coefficient of determination, and its value is 0.9999, close to 1, indicating that the calibration method has a good fit and is also applicable to other equipment.

[0061] The present invention samples the output value of the power router through an external high-precision instrument, compares the actual value collected by the high-precision instrument with the set value, and fits a calibration curve so that the error between the actual output value and the set value after calibration is no more than 5% of the full scale.

[0062] Reference Figure 2, the voltage calibration process of the present invention: the voltage calibration instruction is sent to the power router through the CAN bus, and the power router receives the CAN data. When the voltage calibration instruction is received, the voltage value is selected and the voltage value is set, and the actual voltage output value corresponding to each set voltage value, as well as the sampling value and the actual value are recorded until the set voltage value is full of five, and then the fitting curve is calculated according to the recorded data, and the collected sampling value and actual value data are used to calculate the voltage average value, and then the calculated voltage average value is used to calculate the voltage calibration curve, and the voltage fitting degree is verified according to the voltage calibration curve. When the calculated voltage fitting degree is less than 0.98, it means that the current hardware sampling circuit deviation is too large to be calibrated, and the sampling circuit needs to be rechecked, and the upper computer calibration failure signal and fitting degree are sent; when the calculated voltage fitting degree is greater than 0.98, the calibration data is written into Eeprom, and the upper computer calibration completion signal is sent, and the data is restarted to take effect, and the calibration is completed. The current calibration process of the present invention is the same as the voltage calibration process, which will not be repeated here.

[0063] The above-mentioned embodiments only express the implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.

Claims

1. A sampling and calibration method for an electric energy router based on first-order curve fitting, characterized in that: The following steps are involved: S1: Select multiple voltage points within the full output voltage range as voltage setting values, and select multiple current points within the full output current range as current setting values; S2: setting the voltage output value according to the selected voltage setting value, recording the voltage sampling value and the actual value each time, and taking the average data of the voltage sampling value and the actual value as the voltage average value in the fitting algorithm; setting the current output value according to the selected current setting value, recording the current sampling value and the actual value each time, and taking the average data of the current sampling value and the actual value as the current average value in the fitting algorithm; S3: A voltage calibration curve is obtained by a fitting algorithm based on an average voltage value calculated according to the voltage sampling value and the actual value, and a current calibration curve is obtained by a fitting algorithm based on an average current value calculated according to the current sampling value and the actual value; The calculation formulas of the voltage calibration curve and the current calibration curve are as follows: ; ; Among them, a_value and b_value are two coefficients in the calibration formula obtained by the curve fitting algorithm; x_avg is the average value of the sampled values; y_avg is the average value of the actual values; xy_avg is the average value of the product of the sampled values ​​and the actual values; xx_avg is the average value of the square of the sampled values; is the square value of the average of the sample values; S4: Calculate the voltage fit according to the voltage calibration curve, and then judge whether the voltage calibration is successful according to the fit result; calculate the current fit according to the current calibration curve, and then judge whether the current calibration is successful according to the fit result.

2. According to the first-order curve fitting-based sampling and calibration method of the power router of claim 1, it is characterized in that: The step S1 specifically comprises: the selected voltage setting value comprises the lowest point and the highest point of the output voltage, and several key voltage points evenly distributed between the lowest point and the highest point; the selected current setting value comprises the lowest point and the highest point of the output current, and several key current points evenly distributed between the lowest point and the highest point.

3. The method for sampling and calibrating an electric energy router based on first-order curve fitting according to claim 1 is characterized in that: In step S2, the sampling value is obtained by collecting the output value of the internal sampling circuit of the power router, and the actual value is obtained by measuring the output value with a high-precision standard test instrument.

4. The method for sampling and calibrating an electric energy router based on first-order curve fitting according to claim 1 is characterized in that: In step S2, the voltage average value and the current average value both include the sampled value average value, the actual value average value, the sampled actual average value, and the sampled value square average value. The voltage average value and the current average value are calculated by the following formulas: ; ; ; ; in, is the sampling value, is the actual value, x_avg is the average of the sampled values, y_avg is the average of the actual value, xy_avg is the actual average of the samples, and xx_avg is the square average of the sampled values.

5. The method for sampling and calibrating an electric energy router based on first-order curve fitting according to claim 1 is characterized in that: After executing step S3, we can calculate and After that, and Substituting into the following formula yields the calibration value: Calibration value = sampling value * a + b ; Among them, a_value and b_value are two coefficients in the calibration formula obtained by the curve fitting algorithm.

6. The method for sampling and calibrating a power router based on first-order curve fitting according to claim 1, characterized in that: In step S4, the voltage fitting degree and current fitting degree calculation formula are both: ; in, Indicates the degree of fit; i indicates the serial number (indicates the number), such as i 1, Represents the first sample value, Indicates the first actual value.

Citation Information

Patent Citations

  • System and method for automatically calibrating sampling circuit in circuit board

    CN109164404A