Error correction method and system based on test temperature sensor
By generating fitting curves and implementing a dynamic compensation mechanism, the problem of error variation differences in temperature sensors within a specific temperature range was solved, achieving ultra-high precision calibration of temperature sensors.
Patent Information
- Application Number
- CN202510202761.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-02-24
AI Technical Summary
In existing technologies, temperature sensors exhibit significant variations in error variation within specific temperature ranges, making it impossible to meet the ultra-high precision requirements of specialized fields.
By generating a fitted curve, an error compensation mechanism is established. The output of the temperature sensor is dynamically adjusted using an error function, and segmented compensation is performed in different temperature ranges. Combined with a weighting function, a smooth transition is achieved to eliminate errors.
It achieves accurate error compensation in different temperature ranges, meeting the ultra-high precision requirements of temperature sensors in special fields.
Smart Images

Figure CN119984570B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of temperature sensor correction, in particular to an error correction method and system based on a test temperature sensor. BACKGROUND
[0002] A temperature sensor is an electronic component used for temperature monitoring. According to its principle, it can be divided into thermocouple temperature sensors, thermal temperature sensors, resistance temperature sensors, infrared temperature sensors, and semiconductor temperature sensors. According to the use scenario, the appropriate temperature sensor is selected to improve the accuracy of temperature detection.
[0003] However, in actual application, the temperature sensor has a certain range of errors when used due to the interference of manufacturing process, material properties, and external environmental factors. Reasonable use and product quality inspection can effectively eliminate certain errors, but the self-limiting error cannot be objectively eliminated, so a corresponding correction algorithm logic is usually used to compensate for it to further reduce the error range.
[0004] In the disclosed patent CN112924054B, a correction method for non-linear error of a digital temperature sensor system is disclosed. However, in this patent, the main core of error correction is to select multiple temperature points for measurement within the temperature measurement range, then fit the error values of the multiple temperature points, and then use the mean difference method for data processing to achieve error correction.
[0005] However, in actual application, the temperature sensor is affected by the material properties of its manufacturing process, and the error in different temperature zones is not the same weight function. In a specific temperature range, the error change performance is different, so the above-mentioned correction method will cause a large error in the actual measurement error in a specific temperature range, which does not meet the current demand for ultra-high precision of temperature sensors in some special fields. Therefore, a method and system for correcting the error of a test temperature sensor are provided. SUMMARY
[0006] In view of the shortcomings of the prior art, the present application provides an error correction method and system based on a test temperature sensor, which solves the problem of the correction method for non-linear error of a digital temperature sensor system disclosed in the prior art patent CN112924054B, that is, in a specific temperature range, the error change performance is different, so the above-mentioned correction method will cause a large error in the actual measurement error in a specific temperature range, which does not meet the current demand for ultra-high precision of temperature sensors in some special fields.
[0007] To achieve the above object, the application is implemented by the following technical solutions: an error correction method based on a test temperature sensor, comprising the following steps:
[0008] S1, generating a fitting curve based on the error of the temperature sensor data sample;
[0009]
[0010] Wherein E is the error at each temperature point, αn, αn-1…, αn is the polynomial coefficient, and n is the polynomial order;
[0011] S2, establishing an error compensation mechanism according to the fitting curve, dynamically adjusting the output of the temperature sensor through the error function E(T m ), and correcting the temperature T c after correction is expressed as;
[0012] T c = T m +E(T m )
[0013] The polynomial of the error fitting is substituted to obtain;
[0014]
[0015] The error of different temperature points is automatically compensated by a fixed value in this way;
[0016] S3, according to the performance of the error fitting curve at different temperatures, additional dynamic compensation is added;
[0017] The dynamic compensation formula is expressed as;
[0018] T c (t) = T m (t) + E(T m (t), t)
[0019] Wherein E(T m (t), t) is an error function that changes with time t;
[0020] After introducing dynamic compensation, a new error correction function is obtained;
[0021] T c (t) = T m (t) + (α n (t) × T m (t) n + α n-1 (t) × T m (t) n-1 + ··· + α1(t) × T m (t) + α0(t))
[0022] Then on the basis of dynamic compensation, set segmented temperature compensation, according to temperature sensitivity division, in the error change smooth interval, take sparse points, in the error change sharp interval, take dense points, set to interval 1, interval 2… Interval n, for the kth temperature interval, fit independent polynomial:
[0023] E k (T) = α k,n T n + α k,n-1 T n-1 + ··· + α k , 0 (k=1,2,…,k)
[0024] At the same time, in order to ensure the smooth transition of compensation between adjacent two temperature intervals, the weight function ω k (T) is introduced, and the boundary temperature of interval K and k+1 is T b , so as to obtain the weight function as;
[0025] And ω k+1 (T) = 1-ω k (T)
[0026] When T approaches T b ,
[0027] T C = ω k (T)·(T+E k (T))+ω k+1 (T)·(T+E k+1 (T))S4, verification and optimization.
[0028] Preferably, the specific implementation steps of S1 are:
[0029] I. Data collection, record the actual measured temperature value T a of the temperature sensor at different temperatures T m ;
[0030] II. Calculate the error E(T m ), E(T m ) = T a -T m ;
[0031] III. Use polynomial to fit the relationship between error E(T m ) and measured value T m , so as to obtain the curve function shown in S1.
[0032] Preferably, in the test process, by selecting n groups of temperature sensors in the same batch for synchronous test, and obtaining the average value In the expected case, the actual error curve should be a nearly smooth curve, if the specificity data appears, for the specificity data of a single temperature sensor, it is judged that the process problem of the temperature sensor, then the data of this group is rejected, for the specificity data of multiple temperature sensors, it is judged that the system error, through the verification of the experimental environment, the retest is carried out.
[0033] Preferably, the data statistics in the test process follow the normal distribution principle, and in the specificity data processing process, the covariate is introduced, and the covariance analysis is used to eliminate the influence of uncertain factors.
[0034] Preferably, in the polynomial function fitting process in S2, the value range of the polynomial order n is 2-4 order, and according to the temperature difference T c The error change range in each temperature zone can select appropriate order respectively, high order is used in the large range of change, low order is used in the small range of change, and then the optimal order is determined through cross validation to avoid overfitting.
[0035] Preferably, in S3, high-order polynomial (such as 3 order) is used in the low-temperature zone to compensate for nonlinear error, and linear term and exponential decay term are combined in the high-temperature zone to suppress the influence of material aging.
[0036] Preferably, in the verification process in S4, 20% of the sensor samples are left out as a test set, and the average absolute error after compensation is calculated;
[0037]
[0038] It is necessary to ensure that MAE≤0.1.
[0039] Preferably, in the optimization process in S4, the entire test process needs to be continuously run for 100h between-50℃ and 300℃, and the error drift after compensation is monitored.
[0040] The error correction system based on the test temperature sensor comprises:
[0041] The data acquisition module obtains the actual temperature value of the test environment through the calibrated standard temperature sensor, and reads the real-time data of the temperature sensor used for testing at the same time;
[0042] The data processing module cleans and stores the collected data;
[0043] The error dynamic model performs curve fitting according to the error at each temperature point, and provides a model for the dynamic compensation mechanism;
[0044] The verification module repeatedly verifies the error compensation mechanism and the dynamic compensation formed finally.
[0045] The application discloses an error correction method and system based on a test temperature sensor, which has the following beneficial effects:
[0046] 1. The error correction method based on the test temperature sensor generates a fitting curve based on the error of the temperature sensor data sample, then establishes an error compensation mechanism according to the fitting curve, dynamically adjusts the output of the temperature sensor through an error function, thereby automatically compensating the error of different temperature points with fixed values, then adds dynamic compensation according to the performance of the error fitting curve at different temperatures, finally sets segmented temperature compensation on the basis of the dynamic compensation, and realizes smooth transition of cross-temperature zone compensation by introducing a weight function at the partition boundary position, so as to achieve fixed compensation and dynamic compensation of the error of the temperature sensor in different temperature zones, thereby realizing different error compensation in different temperature zones, more accurately eliminating the error, and meeting the demand of some special fields for ultra-high precision of the temperature sensor. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of these drawings.
[0048] Fig. 1 The error correction method based on the test temperature sensor of the present application is a flow chart.
[0049] Fig. 2 The error correction system based on the test temperature sensor of the present application is a functional block diagram. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical scheme and advantages of the embodiments of the present application more clear, the technical scheme in the embodiments of the present application is described clearly and completely. Obviously, the described embodiments are some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0051] The embodiment of the application provides an error correction method and system based on a test temperature sensor, and solves the problem that the error correction method for the non-linear error of the digital temperature sensor system disclosed in the prior art patent CN112924054B has differences in error change performance in a specific temperature range, so that the actual measurement error has a large error in the specific temperature range when the above scheme is used for correction, and the problem that the demand for ultra-high precision of the temperature sensor in some special fields is not met.
[0052] In order to better understand the above technical solutions, the above technical solutions will be described in detail below in combination with the drawings of the specification and specific embodiments.
[0053] Embodiment one,
[0054] The embodiment of the application discloses an error correction method based on a test temperature sensor.
[0055] According to the drawings, Figs. 1-2 The method comprises the following steps:
[0056] S1, based on the error of the temperature sensor data sample, a fitting curve is generated;
[0057]
[0058] Wherein E is the error at each temperature point, an, an-1…, an is the polynomial coefficient, and n is the polynomial order;
[0059] S2, according to the fitting curve, an error compensation mechanism is established, and the output of the temperature sensor is dynamically adjusted through the error function E(T m ) to correct the temperature T c after correction, which is expressed as:
[0060] T c = T m +E(T m )
[0061] The polynomial of the error fitting is substituted to obtain:
[0062]
[0063] The error of different temperature points is automatically compensated by a fixed value in this way;
[0064] S3, according to the performance of the error fitting curve at different temperatures, dynamic compensation is added;
[0065] The dynamic compensation formula is expressed as:
[0066] T c (t) = T m (t) + E(Tm (t),t)
[0067] Among them, E(T) m (t),t) is the error function that varies with time t;
[0068] After introducing dynamic compensation, a new error correction function is obtained;
[0069] T c (t)=T m (t)+(α n (t)×T m (t) n +α n-1 (t)×T m (t) n-1 +···+α1(t)×T m (t)+α0(t))
[0070] Then, based on dynamic compensation, piecewise temperature compensation is set up, divided according to temperature sensitivity. In the interval where the error changes smoothly, sparse point sampling is adopted, and in the interval where the error changes rapidly, dense point sampling is adopted, which are respectively set as interval 1, interval 2... interval n. For the k-th temperature interval, an independent polynomial is fitted:
[0071] E k (T)=α k,n T n +α k,n-1 T n-1 +···+α k 0 (k=1,2,…,k)
[0072] To ensure a smooth compensation transition between adjacent temperature ranges, a weighting function ω is defined. k (T), the boundary temperature between interval K and k+1 is T. b Thus, the weight function is obtained;
[0073] And ω k+1 (T)=1-ω k (T)
[0074] When T approaches T b hour,
[0075] T C =ω k (T)·(T+E k (T))+ω k+1 (T)·(T+E k+1 (T))
[0076] S4. Verification and Optimization.
[0077] Preferably, the specific implementation steps of S1 are as follows:
[0078] I. Data collection, at different temperatures T a Next, record the actual measured temperature value T m of the temperature sensor.
[0079] II. Calculate the error E(T m ), E(T m ) = T a - T m .
[0080] III. Use polynomial fitting to fit the relationship between the error E(T m ) and the measured value T m , thereby obtaining the curve function shown in S1.
[0081] Preferably, during the test process, by selecting n groups of temperature sensors in the same batch for synchronous testing, process consistency is ensured, and the average value is obtained In the expected case, the actual error curve should be a nearly smooth curve. If specific data appears, for a single temperature sensor, it is judged that the temperature sensor has a process problem, and the data is excluded. For specific data of multiple temperature sensors, it is judged as a system error. After checking the experimental environment, retest is performed, and during the test, a constant temperature tank or a high-low temperature box needs to be built to cover the temperature range of the sensor to provide a reliable test environment and eliminate environmental errors.
[0082] Preferably, the data statistics in the test process follow the normal distribution principle, and during the processing of specific data, a covariant is introduced, and covariance analysis is used to eliminate the influence of uncertain factors.
[0083] Preferably, during the polynomial function fitting process in S2, the value range of the polynomial order n is 2-4 orders, and the temperature difference T c The error change range in each temperature zone can be selected to select the appropriate order. High order is used in the interval with large change range, and low order is used in the interval with small change range. Then, the optimal order is determined through cross-validation to avoid overfitting.
[0084] If the polynomial order n is assumed to be 2, it can be expressed as
[0085]
[0086] Then, according to the above formula, we can obtain
[0087] T c = T m + (α2×T m 2 + α1×Tm +α0)
[0088] After introducing dynamic compensation, the following can be obtained:
[0089] T c (t)=T m (t)+(α2(t)×T m (t) 2 +α1(t)×T m (t)+α0(t))
[0090] Finally, by introducing a weight function, a smooth transition in the over-temperature zone is realized, so as to achieve the same equal difference fixed compensation and different dynamic compensation of the error of the temperature sensor in different temperature zones, so as to realize different error compensation in different temperature zones, thereby more accurately eliminating errors and meeting the current demand for ultra-high precision of temperature sensors in some special fields.
[0091] Preferably, in S3, a high-order polynomial (such as 3-order) is used to compensate for nonlinear errors in the low-temperature zone, and a linear term and an exponential decay term are combined to suppress the influence of material aging in the high-temperature zone.
[0092] Preferably, in the verification process in S4, 20% of the sensor samples are left out as a test set, and the average absolute error after compensation is calculated;
[0093]
[0094] It is necessary to ensure that MAE≤0.1.
[0095] Preferably, in the optimization process in S4, the entire test process needs to be continuously run for 100h between -50℃ and 300℃, and the error drift after compensation is monitored.
[0096] Example two,
[0097] Referring to the accompanying drawings, Figs. 1-2 The application also discloses an error correction system based on a test temperature sensor, which comprises:
[0098] A data acquisition module acquires actual temperature values of a test environment through a verified standard temperature sensor, and simultaneously reads real-time data of a temperature sensor used for testing;
[0099] A data processing module cleans and stores the collected data;
[0100] An error dynamic model performs curve fitting according to errors at each temperature point, and provides a model for a dynamic compensation mechanism;
[0101] A verification module performs repeated data verification on the finally formed error compensation mechanism and dynamic compensation.
[0102] The foregoing is considered as illustrative only of the principles of the application and the forms thereof which are demonstrated by the described embodiments. Further, those skilled in the art will readily recognize that certain of the above described embodiments can include, inter alia, alternate configurations and steps thereof without departing from the true spirit and scope of the present application. Accordingly, what is sought to be protected by Letters Patent is set forth and dependent on the claims and their equivalents.
Claims
1. A method for error correction based on a test temperature sensor, characterized in that, Comprising the following steps; S1, based on the error of temperature sensor data samples, generate a fitting curve; where E(T m ) is the error at each temperature point T m , an, an-i..., an are polynomial coefficients, and n is the polynomial order; S2, according to the fitting curve, the establishment of error compensation mechanism, through the error function E(T m ) dynamic adjustment of the output of the temperature sensor, the corrected temperature T c is expressed as; T c = T m + E(T m ) The polynomial of error fitting is substituted into the equation to obtain; In this way, the error of different temperature points is automatically compensated by a fixed value; S3, according to the performance of error fitting curve at different temperatures, additional dynamic compensation; The dynamic compensation formula is expressed as: T c (t) = T m (t) + E(T m (t), t) where E(T m (t),t) is an error function of temperature T as a function of time t; After introducing dynamic compensation, a new error correction function is obtained; T c (t) = T m (t) + (a n (t) x T m (t) n + a n-1 (t) x T m (t) n-1 + ··· + a1(t) x T m (t) + a0(t) Then, on the basis of dynamic compensation, set the segmented temperature compensation, according to the temperature sensitivity, divide it into intervals, in the interval of smooth error change, take sparse points, in the interval of sharp error change, take dense points, set it as interval 1, interval 2… Interval n, for the kth temperature interval, fit an independent polynomial: E k (T) = a k , nT n + a k , n-1T n-1 + ··· + a k , 0 (k=1,2,…,n) In order to ensure the smooth transition of compensation between two adjacent temperature intervals, the weight function ω k (T), the boundary temperature of interval k and k+1 is T b The weight function is and ω k+1 (T) = 1 - ω k (T) When T approaches T b , T C = ω k (T) · (T + E k (T)) + ω k+1 (T) · (T + E k+1 (T)) S4, verification and optimization.
2. The test temperature sensor-based error correction method of claim 1, wherein: The specific implementation steps of S1 are: I. Data acquisition, at different temperatures T a Next, the actual measured temperature value T m of the temperature sensor is recorded II. Calculating the error E(T m ), E(T m ) = T a - T m ; III. Using a polynomial to fit the error E(T m ) to the measured value T m , resulting in the curve function shown in S1.
3. The test temperature sensor-based error correction method of claim 2, wherein: During the test, the S group of temperature sensors are selected for synchronous test and data acquisition, and the average value is obtained In the expected case, the actual error curve should be a nearly smooth curve. If specific data occurs, for the specific data of a single temperature sensor, it is judged that the temperature sensor has a process problem, and the test data is rejected. For specific data of multiple temperature sensors, it is judged that there is a system error, and the test is retested after checking the experimental environment.
4. The test temperature sensor-based error correction method of claim 3, wherein: The data statistics in the test process follow the normal distribution principle. In the process of specific data processing, the covariant is introduced, the covariance analysis is used, and the influence of uncertain factors is eliminated.
5. The test temperature sensor-based error correction method of claim 1, wherein: In the polynomial function fitting process in S2, the value range of the polynomial order n is 2-4 orders, and the temperature T c The error change range in each temperature zone can be selected to select a suitable order, a high order is used in a large change range, a low order is used in a small change range, and then the optimal order is determined through cross validation to avoid overfitting.
6. The test temperature sensor-based error correction method of claim 1, wherein: In S3, 3-order polynomial is used to compensate for nonlinear error in low temperature area, and linear term and exponential decay term are combined to suppress the influence of material aging in high temperature area.
7. The test temperature sensor-based error correction method of claim 1, wherein: In S4, the optimization process needs the whole test process to run continuously for 100h between-50℃ and 300℃, and monitor the error drift after compensation.
8. A test temperature sensor based error correction system for performing the test temperature sensor based error correction method of any one of claims 1-7, characterized by Comprising: Data acquisition module, through the standard temperature sensor after verification, the actual temperature value of test environment is obtained, and the real-time data of temperature sensor for test is read; Data processing module, the collected data is cleaned and stored; Error dynamic model, according to the error at each temperature point, the curve fitting is carried out, and the model is provided for dynamic compensation mechanism; Verification module, through repeated data verification on the final formed error compensation mechanism and dynamic compensation.
Citation Information
Patent Citations
A method for correcting nonlinear errors in digital temperature sensor systems
CN112924054B
Temperature sensor calibration method based on twice application of polynomial fitting
CN105371993A
Non-linear error correction method applied to digital temperature sensor system
CN112924054A