Calibration method for full-temperature-range fluxgate current sensor
Through the full-temperature domain flux gate current sensor calibration method, first-order linear fitting and temperature compensation technology are used to solve the problem of low measurement accuracy of flux gate current sensor, achieving higher current measurement accuracy and more accurate error correction.
Patent Information
- Application Number
- CN202411634202.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-04
AI Technical Summary
The flux gate current sensor has a problem of low accuracy when measuring current, which leads to recalibration in practical applications to correct the error.
A full-temperature flux gate current sensor calibration method is proposed. By calculating the measured current value and current relative error of the conductor to be measured, a first-order linear fit is performed to obtain the full-temperature fitting function, and the temperature drift coefficient is used for temperature compensation, and finally the measured current to be measured is compensated according to the relative error of the fitted current.
The current measurement accuracy of the flux gate current sensor in the full temperature domain is improved, the need for error correction is reduced, and the accuracy of the measurement results is ensured.
Smart Images

Figure CN119555993A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of sensor calibration, and more specifically relates to a full-temperature range fluxgate current sensor calibration method. Background Art
[0002] With the advancement and development of science and technology, the new energy vehicle market is growing continuously, and fire accidents related to new energy vehicles are also occurring frequently. Battery thermal runaway is one of the main causes of new energy vehicle fires. When the battery temperature is too high, a "thermal runaway" reaction may occur, leading to problems such as internal short circuits in the battery and electrolyte leakage, which may eventually cause combustion or explosion.
[0003] Domestic and foreign researchers have conducted research on the thermal runaway safety warning mechanism of power batteries from the vehicle side and the cloud side. As a core component of the battery management system BMS, the current sensor can accurately detect the current and help the battery management system BMS to grasp the status of the battery in real time to ensure the safety of the power battery. The accuracy of the current sensor directly affects the measurement effect of the battery management system BMS. In the current technical solutions, current detection focuses on shunts and Hall current sensors. However, the shunt needs to be directly connected in series in the circuit, which increases the cost of electrical insulation and the difficulty of installation. The Hall current sensor does not need to be in direct contact with the measurement circuit, avoiding the problem of electrical isolation, but it is very sensitive to temperature changes and has high output noise, which affects the accuracy of current measurement.
[0004] The fluxgate current sensor has become a better solution for current measurement due to its high precision, high stability and good linearity. However, due to factors such as measurement circuit errors, geometric asymmetry of the core winding, winding coil turns error, ambient temperature, etc., the calibration value of the fluxgate current sensor is significantly different from the actual current value in some cases, resulting in low measurement accuracy of the fluxgate current sensor. In order to ensure the current measurement accuracy, in practical applications, it is generally necessary to calibrate it again to correct the error between the current sensor calibration value and the actual measured current. Summary of the invention
[0005] In order to solve the problem of low current measurement accuracy of the current by the current fluxgate sensor, the present invention proposes a full-temperature range fluxgate current sensor calibration method to improve the current measurement accuracy of the fluxgate current sensor.
[0006] In order to achieve the above technical effects, the technical solution of the present invention is as follows:
[0007] A full-temperature range fluxgate current sensor calibration method comprises the following steps:
[0008] S1: Calculate the measured current value of the conductor to be measured, and calculate the current relative error based on the measured current value;
[0009] S2: Take the measured current value as the horizontal axis parameter and the current relative error as the vertical axis parameter, perform first-order linear fitting, and obtain the full temperature range fitting function;
[0010] S3: Calculate the temperature drift coefficient generated by the unit temperature in the full temperature range, and use the temperature drift coefficient to perform temperature compensation on the full temperature range fitting function to obtain the temperature compensated full temperature range fitting function;
[0011] S4: Based on the full temperature range fitting function after temperature compensation, calculate the relative error of the fitting current of the current measurement value to be measured after temperature compensation;
[0012] S5: Compensating the measured value of the current to be measured according to the relative error of the fitted current, completing the calibration of the fluxgate current sensor, and obtaining the compensated measured value of the current to be measured.
[0013] Furthermore, the step of calculating the measured value of the current to be measured of the conductor to be measured in S1 includes:
[0014] S101: Acquire a current message, and calculate the analog-to-digital conversion voltage difference of the conductor to be measured based on the current message; the current message is obtained by converting the analog current signal of the conductor to be measured measured by the fluxgate current sensor into a digital signal, and then reading it through a host computer;
[0015] S102: Calculate the measured current value of the conductor to be measured according to the analog-to-digital conversion voltage difference, and calculate the current relative error based on the measured current value to be measured.
[0016] Furthermore, the step of calculating the analog-to-digital conversion voltage difference of the conductor to be tested in S101 includes:
[0017] Step 1: Extract the first four hexadecimal substrings from the current message read by the host computer, and concatenate the substrings to obtain the hexadecimal first half cycle sampling value ADC;
[0018] Step 2: Convert the hexadecimal first half cycle sampling value ADC to decimal number DEC high ;
[0019] Step 3: Extract the last four digits of the hexadecimal substring from the current message read by the host computer, and concatenate the strings to obtain the hexadecimal second half cycle sampling value ADC;
[0020] Step 4: Convert the hexadecimal second half cycle sampling value ADC to decimal number DEC low ;
[0021] Step 5: Calculate the analog-to-digital conversion voltage difference, the expression is:
[0022] ADC dif =DEChigh -DEC low
[0023] Among them, DEC high Indicates the sampling value of the first half period in decimal system, DEC low Indicates the decimal sampling value of the second half period, ADC dif Represents the analog-to-digital conversion voltage difference, as a decimal number.
[0024] Further, the process of calculating the measured value of the current to be measured of the conductor to be measured in S102 is:
[0025] Based on the analog-to-digital conversion voltage difference, the analog-to-digital conversion voltage is calculated, and the expression is:
[0026]
[0027] In the formula, Z represents the number of sampling points of the analog-to-digital converter for the analog signal, A represents the total amplification factor of the amplifier circuit, N represents the number of coil turns of the fluxgate current sensor, and V min Indicates the minimum voltage change that the analog-to-digital converter can recognize;
[0028] Calculate the measured current value of the conductor to be tested, the expression is:
[0029]
[0030] In the formula, I output Indicates the measured current value of the conductor to be tested, V ADC Represents the analog-to-digital conversion voltage, and R represents the sampling resistor value;
[0031] The calculation expression for calculating the current relative error based on the measured current value is:
[0032] ΔI=I output -I input
[0033] In the formula, I output Indicates the measured current value of the conductor to be tested, I input Indicates the set value of the current to be measured of the conductor to be measured.
[0034] Further, the full temperature range fitting function includes: a first temperature interval fitting function, a second temperature interval fitting function and a third temperature interval fitting function; the full temperature range includes a first temperature interval, a second temperature interval and a third temperature interval, the first temperature interval is an interval where a temperature greater than a first temperature setting value is located, the second temperature interval is an interval where a temperature greater than a second temperature setting value and less than a third temperature setting value is located, the third temperature interval is an interval where a temperature less than a fourth temperature setting value is located, wherein the first temperature setting value is greater than the third temperature setting value, and the second temperature setting value is greater than the fourth temperature setting value;
[0035] When performing the first-order linear fitting, different temperature intervals are set with different current setting values to be measured, and corresponding different current measurement values to be measured can be calculated based on the different current setting values to be measured, and the current relative errors corresponding to the different current measurement values to be measured can be calculated;
[0036] A set of different current setting values I to be measured is set in the first temperature interval inputh1 ,I inputh2 ,…,I inputhn The corresponding set of current measurement values I outputh1 ,I outputh2 ,...,I outputhn is the horizontal axis parameter x, and the current relative error ΔI corresponding to a set of different current measurement values to be measured h1 , ΔI h2 , ..., ΔI hn As the ordinate parameter y, a first-order linear fit is performed with y h =h i x h +a i represents the fitting function expression after the first-order linear fitting in the first temperature interval;
[0037] Among them, h i represents the slope, a i represents the intercept, y h Indicates the current relative temperature difference when the temperature is in the first temperature interval, x h Indicates the measured value of the current to be measured when the temperature is in the first temperature interval;
[0038] A set of different current setting values I to be measured is set in the second temperature range inputc1 ,I inputc2 ,...,I inputcm The corresponding set of current measurement values I outputc1 ,I outputc2 ,…,I outputcm is the horizontal axis parameter x, and the current relative error ΔI corresponding to a set of different current measurement values to be measured c1 , ΔI c2, ..., ΔI cm As the ordinate parameter y, a first-order linear fit is performed with y c =k i x c +b i represents the fitting function expression after the first-order linear fitting in the second temperature interval;
[0039] Among them, k i represents the slope, b i represents the intercept, y c Indicates the relative temperature difference of the current when the temperature is in the second temperature interval, x c Indicates the measured value of the current to be measured when the temperature is in the second temperature interval;
[0040] A set of different current setting values I to be measured is set in the third temperature range inputl1 ,I inputl2 ,...,I inputlq The corresponding set of current measurement values I outputl1 ,I outputl2 ,...,I outputlq is the horizontal axis parameter x, and the current relative error ΔI corresponding to a set of different current measurement values to be measured l1 , ΔI l2 , ..., ΔI lq As the ordinate parameter y, a first-order linear fit is performed with y l = l i x l +c i represents the fitting function expression after the first-order linear fitting in the third temperature interval;
[0041] Among them, l i represents the slope, c i represents the intercept, y l Indicates the relative temperature difference of the current when the temperature is in the third temperature interval, x l Indicates the measured value of the current to be measured when the temperature is in the third temperature interval.
[0042] Furthermore, the temperature drift coefficient generated by unit temperature in the full temperature range includes: the temperature drift coefficient generated by unit temperature in the first temperature interval and the temperature drift coefficient generated by unit temperature in the third temperature interval;
[0043] The calculation expression of the temperature drift coefficient generated by unit temperature in the first temperature interval is:
[0044]
[0045] Wherein, m represents the temperature difference between the selected temperature in the first temperature interval and the selected temperature in the second temperature interval, h irepresents the slope of the fitting function after the first-order linear fitting in the first temperature interval, k i represents the slope of the fitting function after the first-order linear fitting in the second temperature interval;
[0046] The calculation expression of the temperature drift coefficient generated by unit temperature in the third temperature range is:
[0047]
[0048] Where n represents the temperature difference between the selected temperature in the second temperature interval and the selected temperature in the third temperature interval, l i represents the slope of the fitting function after the first-order linear fitting in the third temperature interval, k i represents the slope of the fitting function after the first-order linear fitting in the second temperature interval;
[0049] The calculation expression of the temperature drift coefficient generated by unit temperature in the whole temperature range is:
[0050]
[0051] In the formula, khig h Indicates the temperature drift coefficient generated by unit temperature in the first temperature interval, k low Indicates the temperature drift coefficient produced by unit temperature in the third temperature range;
[0052] Based on the fitting function of the second temperature interval, the temperature drift coefficient and the fitting function of the second temperature interval are used to calculate the full temperature range fitting function after temperature compensation, and a set of different current setting values I to be measured are set in the full temperature range. inputt1 ,I inputt2 ,…,I inputtp The corresponding set of current measurement values I outputt1 ,I outputt2 ,...,I outputtp is the horizontal axis parameter x, and the current relative error ΔI corresponding to a set of different current measurement values to be measured t1 , ΔI t2 , ..., ΔI tp The temperature drift coefficient represents the change in the slope of the second temperature interval caused by temperature change, expressed in y. t =(k i +k*T)x t +b i It represents the fitting function expression of the whole temperature range after temperature compensation;
[0053] Among them, y t Represents the relative error of current in the entire temperature range, x t Indicates the measured current value in the full temperature range, k irepresents the slope of the fitting function in the second temperature interval, k represents the temperature drift coefficient generated by unit temperature, T represents the ambient temperature, and b i Represents the intercept of the fitting function in the second temperature interval.
[0054] Furthermore, the relative error calculation process of the fitting current after temperature compensation is as follows:
[0055] The measured current value I output Substitute the fitting function after full temperature range temperature compensation to calculate the relative error of the fitting current after temperature compensation of the measured current value:
[0056] ΔI fit-ten =(k i +k*T)I output +b i
[0057] In the formula, I output Indicates the measured current value, k i represents the slope of the fitting function in the second temperature interval, k represents the temperature drift coefficient generated by unit temperature, T represents the ambient temperature, and b i Represents the intercept of the fitting function in the second temperature interval;
[0058] When the ambient temperature is in the second temperature interval, the temperature compensation is 0, and the calculation process of the relative error of the measured conductor fitting current in the second temperature interval is:
[0059] The measured current value I output Substitute the fitting function of the second temperature interval into the fitting function to calculate the relative error of the fitting current of the current measurement value to be measured in the second temperature interval:
[0060] ΔI fit =k i I output +b i
[0061] In the formula, I output Indicates the measured current value of the conductor under test.
[0062] Furthermore, the calculation process of the measured current value of the conductor to be measured after the conductor to be measured is compensated in the second temperature range is:
[0063] I nea =I output -ΔI fit
[0064] In the formula, ΔI fit Relative error of the fitted current in the second temperature interval;
[0065] The calculation process of the measured current value of the conductor to be measured after compensation in the first temperature interval and the third temperature interval is:
[0066] I mea-tem =I output -ΔI fit-tem
[0067] In the formula, ΔI fit-tem Represents the relative error of the fitting current after temperature compensation.
[0068] Furthermore, the method further includes: S6: based on the measured value of the current to be measured after compensation, solving the relative error of the current after compensation, with the purpose of comparing it with the relative error of the current before calibration to determine whether the calibration is successful.
[0069] Furthermore, the calculation process of the relative error of the current of the conductor to be measured after compensation in the second temperature range is:
[0070] ΔI mea =I mea -I input
[0071] In the formula, ΔI mea Represents the relative error of the current of the conductor to be measured after compensation in the second temperature range, I mea A measured value of the current to be measured of the conductor to be measured after compensation in the second temperature interval;
[0072] The calculation process of the current relative error of the conductor to be measured after compensation in the first temperature interval and the third temperature interval is:
[0073] ΔI mea-tem =I mea-tem -I input
[0074] In the formula, ΔI mea-tem It represents the relative error of the current after compensation of the conductor to be measured in the first temperature interval and the third temperature interval, I mea-tem Indicates the measured current value of the conductor to be measured after compensation in the first temperature interval and the third temperature interval.
[0075] Compared with the prior art, the beneficial effects of this method are:
[0076] The present invention proposes a full-temperature domain fluxgate current sensor calibration method, firstly, the measured current value of the conductor to be measured is calculated, the current relative error is calculated based on the measured current value to be measured, the measured current value to be measured is used as the horizontal coordinate parameter, the current relative error is used as the vertical coordinate parameter, and a first-order linear fitting is performed to obtain a full-temperature domain fitting function; the temperature drift coefficient generated by the unit temperature in the full temperature domain is calculated, and the full-temperature domain fitting function is temperature compensated by the temperature drift coefficient to obtain a full-temperature domain fitting function after temperature compensation; based on the full-temperature domain fitting function after temperature compensation, the relative error of the fitting current of the measured current value to be measured after temperature compensation is calculated; the measured current value to be measured is compensated according to the relative error of the fitting current, and the calibration of the fluxgate current sensor is completed to obtain the compensated measured current value to be measured. By calibrating the fluxgate current sensor, the actual measured current can be error corrected based on the calibration result to ensure the accuracy of the current measurement of the fluxgate current sensor. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 A flow chart showing a method for calibrating a high-precision, high-current fluxgate current sensor over a full temperature range proposed in an embodiment of the present invention;
[0078] Figure 2 A fitting function representing the forward current measurement value-current relative error in the large current section of the second temperature interval proposed in an embodiment of the present invention;
[0079] Figure 3 A fitting function representing the negative current to be measured measured value-current relative error in the large current segment of the second temperature interval proposed in an embodiment of the present invention;
[0080] Figure 4 A fitting function representing a relative current error of a forward current measurement value of a current segment in a second temperature interval proposed in an embodiment of the present invention;
[0081] Figure 5 A fitting function representing a negative current measurement value to be measured in the current segment in the second temperature interval proposed in an embodiment of the present invention and a current relative error;
[0082] Figure 6 A fitting function representing the forward current to be measured measured value-current relative error in the small current segment of the second temperature interval proposed in an embodiment of the present invention;
[0083] Figure 7 A fitting function representing the negative current to be measured measured value-current relative error in the small current segment of the second temperature interval proposed in an embodiment of the present invention;
[0084] Figure 8 A flow chart showing another full-temperature range high-precision large-current fluxgate current sensor calibration method proposed in this embodiment;
[0085] Fig. 9 A comparison diagram showing the current relative error before and after compensation of the large current segment in the second temperature range proposed in this embodiment;
[0086] Fig.10 A comparison diagram showing the current relative error before and after compensation of the current segment in the second temperature interval proposed in this embodiment;
[0087] Fig.11 A comparison diagram showing the current relative error before and after compensation of the small current segment in the second temperature interval proposed in this embodiment;
[0088] Fig.12 A comparison diagram showing the current relative error before and after compensation of the high current segment in the first temperature interval proposed in this embodiment;
[0089] Fig.13 A comparison diagram showing the current relative error before and after compensation of the current segment in the first temperature interval proposed in this embodiment;
[0090] Fig.14 A comparison diagram showing the current relative error before and after compensation of the small current segment in the first temperature interval proposed in this embodiment;
[0091] Fig.15 A comparison diagram showing the current relative error before and after compensation of the high current segment in the third temperature range proposed in this embodiment;
[0092] Fig.16 A comparison diagram showing the current relative error before and after compensation of the current segment in the third temperature interval proposed in this embodiment;
[0093] Fig.17 A comparison diagram of the current relative errors before and after compensation of the small current segment in the third temperature range proposed in this embodiment is shown. DETAILED DESCRIPTION
[0094] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;
[0095] In order to better illustrate the present embodiment, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the actual size;
[0096] It is understandable to those skilled in the art that descriptions of certain well-known contents in the drawings may be omitted.
[0097] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0098] The positional relationships described in the drawings are only for illustrative purposes and should not be construed as limiting the present patent;
[0099] Example 1
[0100] This embodiment proposes a full temperature range fluxgate current sensor calibration method, such as Figure 1 The flowchart of the method shown in FIG. 1 generally includes the following steps:
[0101] S1: Calculate the measured current value of the conductor to be measured, and calculate the current relative error based on the measured current value;
[0102] S2: Take the measured current value as the horizontal axis parameter and the current relative error as the vertical axis parameter, perform first-order linear fitting, and obtain the full temperature range fitting function;
[0103] S3: Calculate the temperature drift coefficient generated by the unit temperature in the full temperature range, and use the temperature drift coefficient to perform temperature compensation on the full temperature range fitting function to obtain the temperature compensated full temperature range fitting function;
[0104] S4: Based on the full temperature range fitting function after temperature compensation, calculate the relative error of the fitting current of the current measurement value to be measured after temperature compensation;
[0105] S5: Compensating the measured value of the current to be measured according to the relative error of the fitted current, completing the calibration of the fluxgate current sensor, and obtaining the compensated measured value of the current to be measured.
[0106] This embodiment first calculates the measured current value of the conductor to be tested, obtains the current relative error based on the measured current value to be tested, and then performs a first-order linear fitting based on the measured current value to be tested and the current relative error to obtain a full temperature domain fitting function, then calculates the temperature drift coefficient generated by the unit temperature in the full temperature domain, uses the temperature drift coefficient to perform temperature compensation on the full temperature domain fitting function, obtains the full temperature domain fitting function after temperature compensation, and calculates the fitted current relative error of the measured current value to be tested after temperature compensation based on the full temperature domain fitting function after temperature compensation. Finally, the measured current value to be tested is compensated according to the fitted current relative error, and the calibration of the fluxgate current sensor is completed to obtain the compensated measured current value to be tested. The fluxgate current sensor is calibrated using the method proposed in this embodiment, and the actual measured current can be error corrected based on the fitted current relative error to ensure the accuracy of the current measurement of the fluxgate current sensor.
[0107] Example 2
[0108] This embodiment specifically describes the process of calculating the measured value of the current to be measured of the conductor to be measured and calculating the current relative error based on the measured value of the current to be measured as described in S1 in Embodiment 1.
[0109] The step of calculating the measured value of the current to be measured of the conductor to be measured in S1 includes the following steps:
[0110] S101: Acquire a current message, and calculate the analog-to-digital conversion voltage difference of the conductor to be measured based on the current message; the current message is obtained by converting the analog current signal of the conductor to be measured measured by the fluxgate current sensor into a digital signal, and then reading it through a host computer;
[0111] S102: Calculate the measured current value of the conductor to be measured according to the analog-to-digital conversion voltage difference, and calculate the current relative error based on the measured current value to be measured.
[0112] In this embodiment, a fluxgate current sensor is used to detect the conductor to be measured. The analog signal measured by the fluxgate current sensor is converted by an analog-to-digital converter and sent to a host computer, and the host computer reads the current message.
[0113] The analog-to-digital converter samples 128 times in one cycle, and 64 times in the upper and lower half cycles. To facilitate calculation, the hexadecimal current message is converted to decimal, and the analog-to-digital conversion voltage difference of the conductor to be tested is calculated. The specific operation steps include:
[0114] Step 1: Use the MID function to extract the first four hexadecimal substrings from the current message read from the host computer, and concatenate the strings to obtain the hexadecimal first half cycle sampling value ADC;
[0115] Step 2: Use the HEX2DEC function to convert the hexadecimal first half cycle sampling value ADC to decimal number DEC high ;
[0116] Step 3: Use the MID function to extract the last four digits of the hexadecimal substring from the current message read from the host computer, and concatenate the strings to obtain the hexadecimal second half cycle sampling value ADC;
[0117] Step 4: Use the HEX2DEC function to convert the hexadecimal second half cycle sampling value ADC to decimal number DEC low ;
[0118] Step 5: Calculate the analog-to-digital conversion voltage difference, the expression is:
[0119] ADC dif =DEC high -DEC low
[0120] In the above formula, DEC high Indicates the sampling value of the first half period in decimal system, DEC low Indicates the decimal sampling value of the second half period, ADC dif Represents the analog-to-digital conversion voltage difference, as a decimal number.
[0121] In this embodiment, the analog-to-digital conversion voltage is calculated based on the analog-to-digital conversion voltage difference, and the expression is:
[0122]
[0123] In the formula, Z represents the number of sampling points of the analog-to-digital converter for the analog signal, A represents the total amplification factor of the amplifier circuit, N represents the number of coil turns of the fluxgate current sensor, and V min Indicates the minimum voltage change that the analog-to-digital converter can recognize;
[0124] In this embodiment, different amplifier circuits are used for large current, medium current and small current. The range of large current is 871A-1500A, the range of medium current is 91A-870A, and the range of small current is 0A-90A. The large current uses a first-stage amplifier circuit, and its total amplification factor A=5 times, the medium current uses a second-stage amplifier circuit, and its total amplification factor A=10 times, and the small current uses a third-stage amplifier circuit, and its total amplification factor A=100 times.
[0125] In this embodiment, the number of sampling points is selected to be 128, and the number of turns of the fluxgate current sensor coil is 2000.
[0126] In this embodiment, the minimum voltage change that the analog-to-digital converter can recognize is:
[0127] V min =4.096 / 2 12 =4.096 / 4096=0.001.
[0128] Calculate the measured current value of the conductor to be tested, the expression is:
[0129]
[0130] In the formula, I output Indicates the measured current value of the conductor to be tested, V ADC Represents the analog-to-digital conversion voltage, and R represents the sampling resistor value;
[0131] In this embodiment, the sampling resistor is selected to have a resistance of 0.47Ω.
[0132] The calculation expression for calculating the current relative error based on the measured current value is:
[0133] ΔI=I output -I input
[0134] In the formula, I output Indicates the measured current value of the conductor to be tested, I input Indicates the set value of the current to be measured of the conductor to be measured.
[0135] Example 3
[0136] This embodiment performs targeted calibration on the full temperature range mentioned in Embodiment 1. The full temperature range fitting function mentioned in Embodiment 1 includes: a first temperature interval fitting function, a second temperature interval fitting function and a third temperature interval fitting function in this embodiment; the full temperature range includes a first temperature interval, a second temperature interval and a third temperature interval, the first temperature interval is an interval where temperatures greater than the first temperature setting value are located, the second temperature interval is an interval where temperatures greater than the second temperature setting value and less than the third temperature setting value are located, the third temperature interval is an interval where temperatures less than the fourth temperature setting value are located, wherein the first temperature setting value is greater than the third temperature setting value, and the second temperature setting value is greater than the fourth temperature setting value.
[0137] In this embodiment, the first temperature interval represents a high temperature interval in the full temperature range, the second temperature interval represents a normal temperature interval in the full temperature range, and the third temperature interval represents a low temperature interval in the full temperature range.
[0138] In this embodiment, when performing first-order linear fitting, different temperature intervals are set with different measured current setting values. Based on the different measured current setting values, corresponding different measured current values can be calculated, and the current relative errors corresponding to the different measured current values can be calculated.
[0139] When performing the first-order linear fitting, different temperature intervals are set with different current setting values to be measured, and corresponding different current measurement values to be measured can be calculated based on the different current setting values to be measured, and the current relative errors corresponding to the different current measurement values to be measured can be calculated;
[0140] A set of different current setting values I to be measured is set in the first temperature interval inputh1 ,I inputh2 ,...,I inputhn The corresponding set of current measurement values I outputh1 ,I outputh2 ,..,I outputhn is the horizontal axis parameter x, and the current relative error ΔI corresponding to a set of different current measurement values to be measured h1 , ΔI h2 , ..., ΔI hn As the ordinate parameter y, a first-order linear fit is performed with y h =h i x h +a i represents the fitting function expression after the first-order linear fitting in the first temperature interval;
[0141] Among them, h i represents the slope, a i represents the intercept, y hIndicates the current relative temperature difference when the temperature is in the first temperature interval, x h Indicates the measured value of the current to be measured when the temperature is in the first temperature interval;
[0142] A set of different current setting values I to be measured is set in the second temperature range inputc1 ,I inputc2 ,...,I inputcm The corresponding set of current measurement values I outputc1 ,I outputc2 ,..,I outputcm is the horizontal axis parameter x, and the current relative error ΔI corresponding to a set of different current measurement values to be measured c1 , ΔI c2 , ..., ΔI cm As the ordinate parameter y, a first-order linear fit is performed with y c =k i x c +b i represents the fitting function expression after the first-order linear fitting in the second temperature interval;
[0143] Among them, k i represents the slope, b i represents the intercept, y c Indicates the relative temperature difference of the current when the temperature is in the second temperature interval, x c Indicates the measured value of the current to be measured when the temperature is in the second temperature interval;
[0144] A set of different current setting values I to be measured is set in the third temperature range inputl1 ,I inputl2 ,...,I inputlq The corresponding set of current measurement values I outputl1 ,I outputl2 ,..,I outputlq is the horizontal axis parameter x, and the current relative error ΔI corresponding to a set of different current measurement values to be measured l1 , ΔI l2 , .., ΔI lq As the ordinate parameter y, a first-order linear fit is performed with y l = l i x l +c i represents the fitting function expression after the first-order linear fitting in the third temperature interval;
[0145] Among them, l i represents the slope, c i represents the intercept, y l Indicates the relative temperature difference of the current when the temperature is in the third temperature interval, x l Indicates the measured value of the current to be measured when the temperature is in the third temperature interval.
[0146] In this embodiment, the slope and intercept of the fitting function expression in the second temperature interval are shown in Table 1.
[0147] Table 1
[0148]
[0149]
[0150] The fitting function of the forward current measurement value and the current relative error in the large current section of the second temperature interval is as follows: Figure 2 As shown, the fitting function of the negative current measurement value and the current relative error in the large current segment is as follows Figure 3 As shown, the fitting function of the forward current measurement value and the current relative error in the medium current segment is as follows Figure 4 As shown, the fitting function of the negative current measurement value and the current relative error in the medium current segment is as follows Figure 5 As shown, the fitting function of the forward current measurement value and the current relative error in the small current segment is as follows Figure 6 As shown, the fitting function of the negative current measurement value and the current relative error in the small current segment is as follows Figure 7 shown.
[0151] In this embodiment, 85° C. is selected as a representative point of the high temperature range, 25° C. is selected as a representative point of the normal temperature range, and -40° C. is selected as a representative point of the low temperature range.
[0152] The calculation expression of the temperature drift coefficient generated by unit temperature in the first temperature interval is:
[0153]
[0154] In the formula, 60 represents the temperature difference between the selected temperature in the first temperature interval and the selected temperature in the second temperature interval, h i represents the slope of the fitting function after the first-order linear fitting in the first temperature interval, k i represents the slope of the fitting function after the first-order linear fitting in the second temperature interval;
[0155] The calculation expression of the temperature drift coefficient generated by unit temperature in the third temperature range is:
[0156]
[0157] Where, 65 represents the temperature difference between the selected temperature in the second temperature interval and the selected temperature in the third temperature interval, l i represents the slope of the fitting function after the first-order linear fitting in the third temperature interval, k i represents the slope of the fitting function after the first-order linear fitting in the second temperature interval;
[0158] The expression of temperature drift coefficient produced by unit temperature is:
[0159]
[0160] In the formula, k high Indicates the temperature drift coefficient generated by unit temperature in the first temperature interval, k low Indicates the temperature drift coefficient produced by unit temperature in the third temperature range.
[0161] In the first temperature interval and the third temperature interval, the accuracy and linearity of the components inside the fluxgate current sensor will decrease, resulting in temperature drift. In the second temperature interval, no temperature drift will occur. In this embodiment, based on experimental analysis, the temperature drift is concretized as a change in the slope of the fitting function. The temperature drift generated at each degree Celsius, that is, the temperature drift coefficient, is calculated based on the slopes of the fitting function of the first temperature interval, the fitting function of the second temperature interval, and the fitting function of the third temperature interval. Then, on the basis of the fitting function of the second temperature interval, the slope change caused by the temperature drift caused by the change in ambient temperature is introduced to obtain the fitting function expression of the full temperature range after temperature compensation.
[0162] Based on the fitting function of the second temperature interval, the temperature drift coefficient and the fitting function of the second temperature interval are used to calculate the full temperature range fitting function after temperature compensation, and a set of different current setting values I to be measured are set in the full temperature range. inputt1 ,I inputt2 ,...,I inputtp The corresponding set of current measurement values I outputt1 ,I outputt2 ,...,I outputtp is the horizontal axis parameter x, and the current relative error ΔI corresponding to a set of different current measurement values to be measured t1 , ΔI t2 , ..., ΔI tp The temperature drift coefficient represents the change in the slope of the second temperature interval caused by temperature change, expressed in y. t =(k i +k*T)x t +b i It represents the fitting function expression of the whole temperature range after temperature compensation;
[0163] Among them, y t Represents the relative error of current in the entire temperature range, x t Indicates the measured current value in the full temperature range, k i represents the slope of the fitting function in the second temperature interval, k represents the temperature drift coefficient generated by unit temperature, T represents the ambient temperature, and b i Represents the intercept of the fitting function in the second temperature interval.
[0164] When the ambient temperature is in the second temperature interval, the temperature compensation is 0, and the calculation process of the relative error of the measured conductor fitting current in the second temperature interval is:
[0165] The measured current value I output Substitute the fitting function of the second temperature interval into the fitting function to calculate the relative error of the fitting current of the current measurement value to be measured in the second temperature interval:
[0166] ΔI fit =k i I output +b i
[0167] In the formula, I output Indicates the measured current value of the conductor under test.
[0168] The measured current value I output Substitute the fitting function after full temperature range temperature compensation to calculate the relative error of the fitting current after temperature compensation of the measured current value:
[0169] ΔI fit-tem =(k i +k*T)I output +b i
[0170] In the formula, I output Indicates the measured current value, k i represents the slope of the fitting function in the second temperature interval, k represents the temperature drift coefficient generated by unit temperature, T represents the ambient temperature, and b i Represents the intercept of the fitting function in the second temperature interval.
[0171] The calculation process of the measured current value of the conductor to be measured after the conductor to be measured is compensated in the second temperature interval is:
[0172] I mea =I output -ΔI fit
[0173] In the formula, ΔI fit Relative error of the fitted current in the second temperature interval;
[0174] The calculation process of the measured current value of the conductor to be measured after compensation in the first temperature interval and the third temperature interval is:
[0175] I mea-tem =I output -ΔI fit-tem
[0176] In the formula, ΔI fit-tem Represents the relative error of the fitting current after temperature compensation.
[0177] Example 4
[0178] This embodiment also proposes another full-temperature range fluxgate current sensor calibration method, such as Figure 8 The flowchart of the method shown in the figure, compared with embodiment 1, the method further includes S6: based on the measured value of the current to be measured after compensation, solving the relative error of the current after compensation, the purpose is to compare it with the relative error of the current before calibration, and the calculation process of the relative error of the current after compensation of the conductor to be measured in the second temperature range is:
[0179] ΔI mea =I mea -I input
[0180] In the formula, ΔI mea Represents the relative error of the current of the conductor to be measured after compensation in the second temperature range, I mea A measured value of the current to be measured of the conductor to be measured after compensation in the second temperature interval;
[0181] The calculation process of the current relative error of the conductor to be measured after compensation in the first temperature interval and the third temperature interval is:
[0182] ΔI mea-tem =I mea-tem -I input
[0183] In the formula, ΔI mea-tem It represents the relative error of the current after compensation of the conductor to be measured in the first temperature interval and the third temperature interval, I mea-tem Indicates the measured current value of the conductor to be measured after compensation in the first temperature interval and the third temperature interval.
[0184] The current relative error comparison before and after compensation of the high current segment in the second temperature range proposed in this embodiment is as follows: Fig. 9 As shown in the figure, the relative error of the current before and after compensation in the middle current segment is as follows: Fig.10 As shown in the figure, the relative error of the current before and after compensation of the small current segment is as follows Fig.11 The relative current error before and after compensation of the high current section in the first temperature range is shown in Fig.12 As shown in the figure, the relative error of the current before and after compensation in the middle current segment is as follows: Fig.13 As shown in the figure, the relative error of the current before and after compensation of the small current segment is as follows Fig.14 The relative current error before and after compensation of the high current segment in the third temperature range is shown in Fig.15 As shown in the figure, the relative error of the current before and after compensation in the middle current segment is as follows: Fig.16 As shown in the figure, the relative error of the current before and after compensation of the small current segment is as follows Fig.17The full-temperature fluxgate current sensor calibration method proposed in this embodiment can effectively reduce the current relative error in the full temperature range, and control the current relative error of different current segments in the second temperature range within 3‰, and control the current relative error of different current segments in the first temperature range and the third temperature range within 5‰.
[0185] The embodiments are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A full-temperature range fluxgate current sensor calibration method, characterized in that: The following steps are involved: S1: Calculate the measured current value of the conductor to be measured, and calculate the current relative error based on the measured current value; S2: Take the measured current value as the horizontal axis parameter and the current relative error as the vertical axis parameter, perform first-order linear fitting, and obtain the full temperature range fitting function; S3: Calculate the temperature drift coefficient generated by the unit temperature in the full temperature range, and use the temperature drift coefficient to perform temperature compensation on the full temperature range fitting function to obtain the temperature compensated full temperature range fitting function; S4: Based on the full temperature range fitting function after temperature compensation, calculate the relative error of the fitting current of the current measurement value to be measured after temperature compensation; S5: Compensating the measured value of the current to be measured according to the relative error of the fitted current, completing the calibration of the fluxgate current sensor, and obtaining the compensated measured value of the current to be measured.
2. A full-temperature fluxgate current sensor calibration method according to claim 1, characterized in that: The step of calculating the measured value of the current of the conductor to be measured in S1 comprises: S101: Acquire a current message, and calculate the analog-to-digital conversion voltage difference of the conductor to be measured based on the current message; the current message is obtained by converting the analog current signal of the conductor to be measured measured by the fluxgate current sensor into a digital signal, and then reading it through a host computer; S102: Calculate the measured current value of the conductor to be measured according to the analog-to-digital conversion voltage difference, and calculate the current relative error based on the measured current value to be measured.
3. A full-temperature fluxgate current sensor calibration method according to claim 2, characterized in that: The step of calculating the analog-to-digital conversion voltage difference of the conductor to be tested in S101 includes: Step 1: Extract the first four hexadecimal substrings from the current message read by the host computer, and concatenate the substrings to obtain the hexadecimal first half cycle sampling value ADC; Step 2: Convert the hexadecimal first half cycle sampling value ADC to decimal number DEC high ; Step 3: Extract the last four digits of the hexadecimal substring from the current message read by the host computer, and concatenate the strings to obtain the hexadecimal second half cycle sampling value ADC; Step 4: Convert the hexadecimal second half cycle sampling value ADC to decimal number DEC low ; Step 5: Calculate the analog-to-digital conversion voltage difference, the expression is: ADC dif =DEC high -DEC low Among them, DEC high Indicates the sampling value of the first half period in decimal system, DEC low Indicates the decimal sampling value of the second half period, ADC dif Represents the analog-to-digital conversion voltage difference, as a decimal number.
4. A full-temperature fluxgate current sensor calibration method according to claim 3, characterized in that: The process of calculating the measured value of the current to be measured of the conductor to be measured in S102 is: Based on the analog-to-digital conversion voltage difference, the analog-to-digital conversion voltage is calculated, and the expression is: In the formula, Z represents the number of sampling points of the analog-to-digital converter for the analog signal, A represents the total amplification factor of the amplifier circuit, N represents the number of coil turns of the fluxgate current sensor, and V min Indicates the minimum voltage change that the analog-to-digital converter can recognize; Calculate the measured current value of the conductor to be tested, the expression is: In the formula, I output Indicates the measured current value of the conductor to be tested, V ADC Represents the analog-to-digital conversion voltage, and R represents the sampling resistor value; The calculation expression for calculating the current relative error based on the measured current value is: ΔI=I output -I input In the formula, I output Indicates the measured current value of the conductor to be tested, I input Indicates the set value of the current to be measured of the conductor to be measured.
5. A full-temperature range fluxgate current sensor calibration method according to claim 4, characterized in that: The full temperature range fitting function includes: a first temperature interval fitting function, a second temperature interval fitting function and a third temperature interval fitting function; the full temperature range includes a first temperature interval, a second temperature interval and a third temperature interval, the first temperature interval is an interval where a temperature greater than a first temperature setting value is located, the second temperature interval is an interval where a temperature greater than a second temperature setting value and less than a third temperature setting value is located, and the third temperature interval is an interval where a temperature less than a fourth temperature setting value is located, wherein the first temperature setting value is greater than the third temperature setting value, and the second temperature setting value is greater than the fourth temperature setting value; When performing the first-order linear fitting, different temperature intervals are set with different current setting values to be measured, and corresponding different current measurement values to be measured can be calculated based on the different current setting values to be measured, and the current relative errors corresponding to the different current measurement values to be measured can be calculated; A set of different current setting values I to be measured is set in the first temperature interval inputh1 ,I inputh2 ,...,I inputhn The corresponding set of current measurement values I outputh1 ,I outputh2 ,...,I outputhn is the horizontal axis parameter x, and the current relative error ΔI corresponding to a set of different current measurement values to be measured h1 , ΔI h2 , ..., ΔI hn As the ordinate parameter y, a first-order linear fit is performed with y h =h i x h +a i represents the fitting function expression after the first-order linear fitting in the first temperature interval; Among them, h i represents the slope, a i represents the intercept, y h Indicates the current relative temperature difference when the temperature is in the first temperature interval, x h Indicates the measured value of the current to be measured when the temperature is in the first temperature interval; A set of different current setting values I to be measured is set in the second temperature range inputc1 ,I inputc2 ,...,I inputcm The corresponding set of current measurement values I outputc1 ,I outputc2 ,...,I outputcm is the horizontal axis parameter x, and the current relative error ΔI corresponding to a set of different current measurement values to be measured c1 , ΔI c2 , ..., ΔI cm As the ordinate parameter y, a first-order linear fit is performed with y c =k i x c +b i represents the fitting function expression after the first-order linear fitting in the second temperature interval; Among them, k i represents the slope, b i represents the intercept, y c Indicates the relative temperature difference of the current when the temperature is in the second temperature interval, x c Indicates the measured value of the current to be measured when the temperature is in the second temperature interval; A set of different current setting values I to be measured is set in the third temperature range inputl1 ,I inputl2 ,...,I inputlq The corresponding set of current measurement values I outputh1 ,I outputl2 ,...,I outputlq is the horizontal axis parameter x, and the current relative error ΔI corresponding to a set of different current measurement values to be measured l1 , ΔI l2 , ..., ΔI lq As the ordinate parameter y, a first-order linear fit is performed with y l = l i x l +c i represents the fitting function expression after the first-order linear fitting in the third temperature interval; Among them, l i represents the slope, c i represents the intercept, y l Indicates the current relative temperature difference when the temperature is in the third temperature interval, x l Indicates the measured value of the current to be measured when the temperature is in the third temperature interval.
6. A full-temperature fluxgate current sensor calibration method according to claim 5, characterized in that: The temperature drift coefficient generated by unit temperature in the full temperature range includes: the temperature drift coefficient generated by unit temperature in the first temperature interval and the temperature drift coefficient generated by unit temperature in the third temperature interval; The calculation expression of the temperature drift coefficient generated by unit temperature in the first temperature interval is: Wherein, m represents the temperature difference between the selected temperature in the first temperature interval and the selected temperature in the second temperature interval, h i represents the slope of the fitting function after the first-order linear fitting in the first temperature interval, k i represents the slope of the fitting function after the first-order linear fitting in the second temperature interval; The calculation expression of the temperature drift coefficient generated by unit temperature in the third temperature range is: Where n represents the temperature difference between the selected temperature in the second temperature interval and the selected temperature in the third temperature interval, l i represents the slope of the fitting function after the first-order linear fitting in the third temperature interval, k i represents the slope of the fitting function after the first-order linear fitting in the second temperature interval; The calculation expression of the temperature drift coefficient generated by unit temperature in the whole temperature range is: In the formula, k high Indicates the temperature drift coefficient generated by unit temperature in the first temperature interval, k low Indicates the temperature drift coefficient produced by unit temperature in the third temperature range; Based on the fitting function of the second temperature interval, the temperature drift coefficient and the fitting function of the second temperature interval are used to calculate the full temperature range fitting function after temperature compensation, and a set of different current setting values I to be measured are set in the full temperature range. inputt1 ,I inputt2 ,...,I inputtp The corresponding set of current measurement values I outputt1 ,I outputt2 ,...,I outputtp is the horizontal axis parameter x, and the current relative error ΔI corresponding to a set of different current measurement values to be measured t1 , ΔI t2 , ..., ΔI tp The temperature drift coefficient represents the change in the slope of the second temperature interval caused by temperature change, expressed in y. t =(k i +k*T)x t +b i It represents the fitting function expression of the whole temperature range after temperature compensation; Among them, y t Represents the relative error of current in the entire temperature range, x t Indicates the measured current value in the full temperature range, k i represents the slope of the fitting function in the second temperature interval, k represents the temperature drift coefficient generated by unit temperature, T represents the ambient temperature, and b i Represents the intercept of the fitting function in the second temperature interval.
7. A full-temperature range fluxgate current sensor calibration method according to claim 6, characterized in that: The calculation process of the relative error of the fitting current after temperature compensation is as follows: The measured current value I output Substitute the fitting function after full temperature range temperature compensation to calculate the relative error of the fitting current after temperature compensation of the measured current value: ΔI fit-tem =(k i +k*T)I output +b i In the formula, I output Indicates the measured current value, k i represents the slope of the fitting function in the second temperature interval, k represents the temperature drift coefficient generated by unit temperature, T represents the ambient temperature, b i Represents the intercept of the fitting function in the second temperature interval; When the ambient temperature is in the second temperature range, the temperature compensation is 0, and the calculation process of the relative error of the measured conductor fitting current in the second temperature range is: The measured current value I output Substitute the fitting function of the second temperature interval into the fitting function and calculate the relative error of the fitting current of the current measurement value to be measured in the second temperature interval: ΔI fit =k i I output +b i In the formula, I output Indicates the measured current value of the conductor under test.
8. A full-temperature range fluxgate current sensor calibration method according to claim 7, characterized in that: The calculation process of the measured current value of the conductor to be measured after the conductor to be measured is compensated in the second temperature range is: I mea =I output -ΔI fit In the formula, ΔI fit Relative error of the fitted current in the second temperature range; The calculation process of the measured current value of the conductor to be measured after compensation in the first temperature interval and the third temperature interval is: I mea-tem =I output -ΔI fit-tem In the formula, ΔI fit-tem Represents the relative error of the fitting current after temperature compensation.
9. A full-temperature range fluxgate current sensor calibration method according to claim 8, characterized in that: The method further includes: S6: based on the measured value of the current to be measured after compensation, solving the relative error of the current after compensation, with the purpose of comparing it with the relative error of the current before calibration to determine whether the calibration is successful.
10. A full-temperature range fluxgate current sensor calibration method according to claim 9, characterized in that: The calculation process of the current relative error of the conductor to be measured after compensation in the second temperature range is: ΔI mea =I mea -I input In the formula, ΔI mea Represents the relative error of the current of the conductor to be measured after compensation in the second temperature range, I mea A measured value of the current to be measured of the conductor to be measured after compensation in the second temperature interval; The calculation process of the current relative error of the conductor to be measured after compensation in the first temperature interval and the third temperature interval is: ΔI mea-tem =I mea-tem -I input In the formula, ΔI mea-tem It represents the relative error of the current after compensation of the conductor to be measured in the first temperature interval and the third temperature interval, I mea-tem Indicates the measured current value of the conductor to be measured after compensation in the first temperature interval and the third temperature interval.