Method for improving measurement precision of current sensor

By collecting current measurement data at different ambient temperatures, calculating temperature and calibration parameters, and combining smoothing and low-pass filtering technology, the measurement value of the current sensor is corrected, solving the problem of insufficient measurement accuracy of the current sensor at different temperatures, and achieving higher measurement accuracy and stability.

CN119595984APending Publication Date: 2025-03-11MITEYOU SENSING TECH (NANJING) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411871473.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

Existing current sensors have shortcomings in measurement accuracy, especially in terms of accuracy and stability issues at different ambient temperatures.

Method used

By collecting standard point current measurement data and temperature measurement data at different ambient temperatures, calculating temperature and complementary parameters and calibration parameters, combining mean smoothing and IIR low-pass filtering technology, the measured values ​​are corrected to improve the measurement accuracy of the current sensor.

Benefits of technology

It effectively improves the measurement accuracy of the current sensor at different ambient temperatures, and enhances the accuracy and stability of the measurement values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119595984A_ABST
    Figure CN119595984A_ABST
Patent Text Reader

Abstract

The invention provides a method for improving the measurement precision of a current sensor. The method comprises the following steps: S1, collecting preset current measurement data and temperature measurement data of each standard point at different environment temperatures; s2, temperature compensation parameters are calculated; s3, calculating calibration parameters including a scale parameter and a zero parameter; and S4, performing mean smoothing and IIR low-pass filtering on the measured value of the product, and multiplying the measured value by the temperature compensation parameter, the scale parameter and the zero parameter obtained by calculation to output a high-precision current measured value. According to the method, product calibration data can be combined, the temperature compensation and calibration parameters of the product can be calculated and set in the storage area of the MCU of the product, and during product measurement, the measurement value is corrected through the temperature compensation parameters and the calibration parameters, so that the product measurement precision is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of current sensor measurement, and in particular to a method for improving the measurement accuracy of a current sensor. Background Art

[0002] Analog output current sensors generally adjust the zero offset of the product by adjusting the potentiometer to control the measurement accuracy, while digital output current sensors process the measured values ​​using the subsequent software algorithm after AD conversion to ensure product measurement accuracy.

[0003] There are generally three main software algorithms for the current mainstream digital output current sensors. The first is weighted smoothing: smoothing and balancing sensor data to reduce the impact of accidental data mutations; the second is extraction mutations: removing static and slowly changing data backgrounds and emphasizing instantaneous changes; the third is a simple moving average: retaining the most recent K data in the data stream and taking the average value. Summary of the invention

[0004] In order to solve the above problem, the present invention discloses a method for improving the measurement accuracy of a current sensor.

[0005] The specific plan is as follows:

[0006] A method for improving the measurement accuracy of a current sensor, characterized by comprising the following steps:

[0007] S1. Collect current measurement data and temperature measurement data of each preset standard point under different ambient temperatures;

[0008] S2, calculate temperature compensation parameters;

[0009] S3, calculating calibration parameters, including scale parameters and zero position parameters;

[0010] S4. After the measured value of the product is average-smoothed and IIR low-pass filtered, it is multiplied by the calculated temperature compensation parameter, scale parameter and zero position parameter to output a high-precision current measurement value.

[0011] Furthermore, step S1 is specifically as follows: the host computer collects current measurement data and temperature measurement data of various preset standard points at three ambient temperatures of -40°C, 25°C and 85°C through the product CAN port, and saves the collected data as a TXT file.

[0012] Furthermore, step S2 is specifically as follows:

[0013] S21. The host computer opens the TXT file, calculates the average value of the current measurement data collected every 1S at each standard point at three ambient temperatures of -40℃, 25℃ and 85℃, calls the TempCompen function, i.e. the regress function in MATLAB, to calculate the temperature compensation parameters at different standard points. Each standard point corresponds to a temperature compensation parameter Pi.

[0014] S22. Calculate the average value Ai of all current measurement data collected at each standard point at room temperature 25°C, combine it with the temperature compensation parameter Pi obtained above, and use the polyfit(double*x,double*y,double*result,int N) function to perform linear fitting according to the following formula:

[0015] y=Ta*x+Tb

[0016] Where y represents the temperature compensation parameter Pi corresponding to each standard point, x represents the average value Ai of all current measurement data collected at each standard point at room temperature, and N represents the number of standard points. The obtained parameters Ta and Tb are stored in result[2], which are the bound temperature compensation parameters.

[0017] Furthermore, step S3 is specifically as follows:

[0018] S31. The host computer software opens the TXT file and uses the filter_IIR_BiquadCascade function to perform IIR low-pass filtering on the current measurement data collected at each standard point at a normal temperature of 25°C. The cutoff frequency of the IIR low-pass filter is 20Hz and the pass frequency is 0.5Hz (the parameters of the low-pass filter are generated by matlab).

[0019] S32, performing temperature compensation calculation for each current measurement value collected according to the following formula:

[0020] A 温补后 =A 低通滤波后的值 -(A 低通滤波后的值 *Ta+Tb)*T 当前温度

[0021] And calculate the average value of all the current measurement data after temperature compensation at each standard point;

[0022] S33, segment all standard points at the ambient temperature of 25°C to ensure that the linear fitting achieves the best effect; and use the polyfit(double*x,double*y,double*result,int N) function to perform linear fitting for each standard point in each segment and the average value of all temperature-compensated current data at each standard point according to the following formula:

[0023] y'=ai*x'+bi

[0024] Where y' represents the standard value, x' represents the actual measured value after filtering, temperature compensation and averaging, and N represents the number of standard points in each segment. The fitted ai and bi are stored in result[2], which are the scale parameters and zero position parameters of each segment.

[0025] S34, averaging the average value of the temperature-compensated current measurement data corresponding to the last standard point of the previous section and the average value of the temperature-compensated current measurement data corresponding to the first standard point of this section, to obtain the span scale parameter and the zero position parameters ai and bi.

[0026] Furthermore, step S4 is specifically as follows: the calculated temperature compensation parameters, scaling parameters and zero position parameters are sent to the product through the CAN interface. When the product is measuring, the measured value is mean smoothed and IIR low-pass filtered, and then multiplied by the corresponding temperature compensation parameters, scaling parameters and zero position parameters, and a high-precision current measurement value can be output.

[0027] The beneficial effect of the present application is that the method of the present invention can combine the product calibration data, calculate the temperature compensation and calibration parameters of the product and install them in the storage area of ​​the product MCU. When measuring the product, the measured value is corrected by the temperature compensation parameters and calibration parameters, thereby effectively improving the product measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 This is a schematic diagram of the process of this application.

[0029] Figure 2 This is a comparison chart of data before and after temperature compensation. The three sections from left to right are -40℃, 25℃, and 85℃ respectively.

[0030] Figure 3 This is a comparison chart of the original data and the calibrated data at room temperature 25°C.

[0031] Figure 4 Comparison between original data and calibrated data at low temperature of -40℃.

[0032] Figure 5 Comparison between original data and calibrated data at high temperature of 85°C. DETAILED DESCRIPTION

[0033] The present invention will be further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.

[0034] As shown in the figure, the present invention provides a method for improving the measurement accuracy of a current sensor, comprising the following steps:

[0035] (1) Data Collection

[0036] First, the host computer collects current measurement data and temperature measurement data of 16 standard points such as -500A, -300A, -100A, -50A, -10A, -3A, -1A, -500mA, 500mA, 1A, 3A, 10A, 50A, 100A, 300A, and 500A at three ambient temperatures of -40℃ and 85℃ through the product CAN port; then collects current measurement data and temperature measurement data of -500A, -400A, -300A, -200A, -100A, -50A, -30A, -1 Current measurement data and temperature measurement data of 28 standard points including 0A, -3A, -1A, -500mA, -300mA, -200mA, -100mA, 100mA, 200mA, 300mA, 500mA, 1A, 3A, 10A, 30A, 50A, 100A, 200A, 300A, 400A, 500A, etc. 12000 sets of data are collected at each standard point under various temperature environments. All collected data are saved as TXT format files with temperature value and standard point current value as the name.

[0037] (2) Calculation of temperature compensation parameters

[0038] First, the host computer software opens the TXT files of 16 standard points, including -500A, -300A, -100A, -50A, -10A, -3A, -1A, -500mA, 500mA, 1A, 3A, 10A, 50A, 100A, 300A, and 500A, at three ambient temperatures of -40°C, 25°C, and 85°C, and reads out the current measurement data and temperature measurement data;

[0039] Then, the 1s average value of the 12,000 sets of current measurement data collected at each standard point is calculated, that is, the average value of every 100 sets of current measurement data at each standard point is calculated, and the TempCompen function, that is, the regress function in MATLAB, is called to calculate the temperature compensation parameters at different standard points. Each standard point corresponds to a parameter Pi;

[0040] Then calculate the average value Ai of 12000 sets of current measurement data collected at each standard point at room temperature 25℃, combine it with the temperature compensation parameter Pi calculated above, and use the polyfit(double*x,double*y,double*result,int N) function to perform linear fitting according to the following formula:

[0041] y=Ta*x+Tb

[0042] Wherein, y: temperature compensation parameter Pi corresponding to each standard point, X: average value Ai of 12000 sets of current measurement data collected at each standard point at room temperature, N: number of standard points.

[0043] The parameters Ta and Tb are obtained and stored in result[2], which are the bound temperature compensation parameters.

[0044] (3) Calculation of calibration parameters

[0045] First, the host computer software opens the TXT files of 28 standard points including -500A, -400A, -300A, -200A, -100A, -50A, -30A, -10A, -3A, -1A, -500mA, -300mA, -200mA, -100mA, 100mA, 200mA, 300mA, 500mA, 1A, 3A, 10A, 30A, 50A, 100A, 200A, 300A, 400A, and 500A at room temperature of 25°C and reads the current measurement values ​​and temperature measurement values ​​therein.

[0046] Then, the current measurement data collected at each standard point is subjected to IIR low-pass filtering using the filter_IIR_BiquadCascade function. The cutoff frequency of the IIR low-pass filter is 20Hz, and the pass frequency is 0.5Hz (the parameters of the low-pass filter are generated by MATLAB). The temperature compensation calculation is performed for each current measurement value collected according to the following formula:

[0047] A 温补后 =A 低通滤波后的值 -(A 低通滤波后的值 *a+b)*T 当前温度

[0048] The average value of all the temperature-compensated current data at each standard point is calculated; then all the standard points are segmented to ensure that the linear fitting achieves the best effect. Through the simulation of MATLAB software, the 28 standard points are divided into six segments in the following way:

[0049] The first section: 500A, 400A, 300A, 200A, 100A;

[0050] The second section: 50A, 30A, 10A;

[0051] The third section: 3A, 1A, 500mA, 300mA, 200mA, 100mA;

[0052] Section 4: -100mA, -200mA, -300mA, -500mA, -1A, -3A;

[0053] Section 5: -10A, -30A, -50A;

[0054] Section 6: -100A, -200A, -300A, -400A, -500A.

[0055] Use the polyfit(double*x,double*y,double*result,int N) function to perform linear fitting for each standard point in each segment and the average value of all temperature-compensated current data at each standard point according to the following formula:

[0056] y=a*x+b

[0057] Where, y: standard value, X: actual measurement value after filtering, temperature compensation and averaging, N: number of standard points in each segment.

[0058] The fitted ai and bi are stored in result[2], which are the scale parameters and zero position parameters of each segment.

[0059] The average value of the temperature-compensated current data corresponding to the last standard point in the previous section and the average value of the temperature-compensated current data corresponding to the first standard point in this section are averaged to obtain the span scale parameter and zero position parameters ai and bi.

[0060] The calculated temperature compensation parameters, scaling parameters and zero position parameters are sent to the product through the CAN interface. When measuring, the product performs mean smoothing and IIR low-pass filtering on the measured values, and then multiplies them by the corresponding temperature compensation parameters, scaling parameters and zero position parameters to output high-precision current measurement values.

[0061] The technical means disclosed in the scheme of the present invention are not limited to the technical means disclosed in the above-mentioned implementation mode, but also include technical schemes composed of any combination of the above-mentioned technical features. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications are also regarded as the protection scope of the present invention.

Claims

1. A method for improving the measurement accuracy of a current sensor, characterized in that: The following steps are involved: S1, collecting current measurement data and temperature measurement data of each preset standard point under different ambient temperatures; S2, calculate temperature compensation parameters; S3, calculating calibration parameters, including scale parameters and zero position parameters; S4. After the measured value of the product is average-smoothed and IIR low-pass filtered, it is multiplied by the calculated temperature compensation parameter, scale parameter and zero position parameter to output a high-precision current measurement value.

2. A method for improving the measurement accuracy of a current sensor according to claim 1, characterized in that: Step S1 is specifically as follows: the host computer collects current measurement data and temperature measurement data of various preset standard points at three ambient temperatures of -40°C, 25°C and 85°C through the product CAN port, and saves the collected data as a TXT file.

3. A method for improving the measurement accuracy of a current sensor according to claim 2, characterized in that: Step S2 is specifically as follows: S21. The host computer opens the TXT file, calculates the average value of the current measurement data collected every 1S at each standard point at three ambient temperatures of -40℃, 25℃ and 85℃, calls the TempCompen function, i.e. the regress function in MATLAB, to calculate the temperature compensation parameters at different standard points. Each standard point corresponds to a temperature compensation parameter Pi. S22. Calculate the average value Ai of all current measurement data collected at each standard point at room temperature 25°C, and use the polyfit function to perform linear fitting according to the following formula in combination with the temperature compensation parameter Pi calculated above: y=Ta*x+Tb Wherein, y represents the temperature compensation parameter Pi corresponding to each standard point, and x represents the average value Ai of all current measurement data collected at each standard point at room temperature; the obtained parameters Ta and Tb are the bound temperature compensation parameters.

4. A method for improving the measurement accuracy of a current sensor according to claim 3, characterized in that: Step S3 is specifically as follows: S31. The host computer software opens the TXT file and uses the filter_IIR_BiquadCascade function to perform IIR low-pass filtering on the current measurement data collected at each standard point at a normal temperature of 25°C. The cutoff frequency of the IIR low-pass filter is 20 Hz and the pass frequency is 0.5 Hz. S32, performing temperature compensation calculation for each current measurement value collected according to the following formula: A 温补后 =A 低通滤波后的值 -(A 低通滤波后的值 *Ta+Tb)*T 当前温度 And calculate the average value of all the current measurement data after temperature compensation at each standard point; S33, segment all standard points at the ambient temperature of 25°C; and use the polyfit function to perform linear fitting on each standard point in each segment and the average value of all temperature-compensated current data at each standard point according to the following formula: y'=ai*x'+bi Wherein, y' represents the standard value, x' represents the actual measured value after filtering, temperature compensation and averaging; the fitted ai and bi are the scale parameters and zero position parameters of each segment; S34, averaging the average value of the temperature-compensated current measurement data corresponding to the last standard point of the previous section and the average value of the temperature-compensated current measurement data corresponding to the first standard point of this section, to obtain the span scale parameter and the zero position parameters ai and bi.

5. A method for improving the measurement accuracy of a current sensor according to claim 4, characterized in that: Step S4 is specifically as follows: the calculated temperature compensation parameters, scaling parameters and zero position parameters are sent to the product through the CAN interface. When the product is measuring, the measured value is mean smoothed and IIR low-pass filtered, and then multiplied by the corresponding temperature compensation parameters, scaling parameters and zero position parameters, and a high-precision current measurement value can be output.

Citation Information

Cited By

  • Closed-loop current sensor based on magnetic modulation

    CN121276125A