Sensor temperature compensation system with stable and smooth output
By combining small disturbance filtering and large disturbance shielding technology with the step output method, the output instability problem caused by jitter and mutation in sensor temperature compensation is solved, and stable and smooth sensor temperature compensation is achieved.
Patent Information
- Application Number
- CN202511277014.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-09-09
AI Technical Summary
Existing sensor temperature compensation technology cannot effectively suppress compensation signal jitter caused by small temperature fluctuations, cannot shield erroneous compensation caused by sudden changes in ambient temperature, and can easily cause system oscillation when the compensation code switches.
A small disturbance filtering module is used to filter out small temperature fluctuations, a large disturbance shielding module is used to shield sudden environmental changes, and a step output module is combined to achieve smooth output. A stable compensation code is generated through a lookup table or fitting algorithm.
It achieves stable and smooth sensor temperature compensation, suppresses frequent jitter of the compensation code caused by noise or slight temperature jitter, shields compensation errors caused by drastic environmental changes or circuit state errors, and outputs smooth without step changes.
Smart Images

Figure CN120760758A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a temperature compensation system, in particular to a sensor temperature compensation system with stable and smooth output, belonging to the technical field of semiconductor integrated circuits. Background Art
[0002] In high-precision sensor applications, signal drift caused by ambient temperature changes is a core issue affecting measurement accuracy. Traditional temperature compensation technologies generally use the following two methods: Direct compensation method: A compensation signal that is linearly related to temperature is superimposed on the sensor output. For example, by introducing a temperature-sensitive resistor network into the signal chain, a compensation voltage proportional to the temperature change is generated. Although this method has a simple structure, it has significant drawbacks: (1) It is only applicable to linear temperature drift and cannot handle the nonlinear response of the sensor in extreme temperature zones (such as below -40°C or above 100°C); (2) The compensation accuracy is limited by the resistor matching, with a typical error of ±3%; (3) It is sensitive to sudden temperature changes and is prone to compensation overshoot.
[0003] Digital lookup table method: A temperature-compensation code mapping table is stored in memory in advance, and the corresponding compensation code is directly output after the temperature value is read through the analog-to-digital converter. Although this method can handle nonlinear relationships, it still has inherent limitations: (1) Small temperature fluctuations (such as ±0.5°C) will trigger the compensation code to jump, resulting in output signal jitter; (2) When the ambient temperature changes drastically (such as the temperature rise rate of 50°C / minute during a cold start of a car), the system cannot distinguish between real temperature changes and transient interference; (3) Step changes occur when the compensation code switches, which can easily cause oscillation of the controlled system.
[0004] Therefore, there is an urgent need for a temperature compensation technology that can simultaneously perform the following functions: (1) suppress the compensation signal jitter caused by small temperature fluctuations; (2) shield the erroneous compensation caused by sudden changes in ambient temperature; and (3) achieve smooth transition output of the compensation code. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a sensor temperature compensation system with stable and smooth output, thereby solving at least one problem of the prior art.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: A sensor temperature compensation system with stable and smooth output includes a temperature sensor probe, a temperature detection ADC, a small disturbance filtering module, a large disturbance shielding module, a temperature code value conversion module and a step output module. The temperature sensor probe is used to detect a temperature signal. The temperature detection ADC is connected to the temperature sensor probe to convert the temperature signal of an analog signal into a temperature value of a digital signal. The small disturbance filtering module is connected to the temperature detection ADC to maintain the previous output when the change in adjacent sampled temperature values is less than a preset window threshold W. The large disturbance shielding module is connected to the small disturbance filtering module to determine that when the temperature change rate exceeds a mutation threshold R, it is interference and maintain the previous valid value. The temperature code value conversion module is connected to the large disturbance shielding module to generate a compensation code through a lookup table (LUT) or a fitting algorithm. The step output module is connected to the temperature code value conversion module to gradually adjust the output with a configurable step size S and a step frequency F when the difference between the compensation code and the previous output compensation code exceeds a configurable step size S.
[0007] Furthermore, the preset window threshold W of the small disturbance filtering module is 1 to 8 LSB, and the preset window threshold W of the small disturbance filtering module is dynamically configured through an I2C or SPI interface.
[0008] Furthermore, the mutation threshold R of the large disturbance shielding module is set based on the maximum reasonable change rate of the ambient temperature and satisfies:
[0009] Among them, V ΔT is the maximum reasonable rate of change of ambient temperature, Δt sample is the sampling interval, and k is the safety factor.
[0010] Furthermore, the mutation threshold R of the large disturbance shielding module is dynamically configured through an I2C or SPI interface.
[0011] Furthermore, the temperature code value conversion module includes a compensation relationship storage unit, an interpolation calculation unit and a nonlinear correction unit. The compensation relationship storage unit is used to store the mapping relationship between the temperature value and the compensation code. The interpolation calculation unit is connected to the compensation relationship storage unit and is used to perform linear interpolation calculation of the compensation code through adjacent storage points when the current temperature value is not directly stored. The nonlinear correction unit is connected to the interpolation calculation unit and is used to perform curvature correction on the compensation relationship in a specific temperature range.
[0012] Furthermore, the compensation relationship storage unit adopts a piecewise linear storage structure to divide the temperature range into K intervals, and each interval stores the starting temperature value T k , termination temperature value T k+1 And the corresponding compensation code slope a k .
[0013] Furthermore, the workflow of the interpolation calculation unit is as follows: When the input temperature value T satisfies T k <T<T k+1 When , the compensation code is output:
[0014] Among them, Code k is the starting temperature value T k The corresponding compensation code.
[0015] Furthermore, the nonlinear correction unit adopts a second-order polynomial correction for the low temperature range of -40°C to 0°C and the high temperature range of 100°C to 150°C:
[0016] Among them, T rim_code_corrected is the compensation code correction value, b is the curvature coefficient, T mid is the midpoint value of the temperature range.
[0017] Furthermore, the step output module includes a difference calculation unit, a step length controller, a timing trigger and an accumulator. The difference calculation unit is used to calculate the difference ΔC between the target code and the current output code. The step length controller is connected to the difference calculation unit to decompose the difference ΔC into M steps according to a configurable step length S. The timing trigger is used to generate a step clock with a frequency of F. The accumulator is connected to the step length controller and the timing trigger to adjust the compensation code value according to a step length of ±S when the enable signal is triggered.
[0018] Furthermore, the configurable step size S and frequency F are dynamically configured via an I2C or SPI interface.
[0019] Compared with the prior art, the present invention has the following advantages and effects: The present invention discloses a sensor temperature compensation system with stable and smooth output. By using small disturbance filtering technology, large disturbance shielding technology and combining a step output method, frequent jitter of the compensation code caused by noise or slight temperature jitter is filtered out, and at the same time, compensation errors caused by drastic environmental changes or circuit state errors are shielded. The compensation code output step size can be configured through I2C or SPI to achieve stable and smooth output. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a schematic diagram of a sensor temperature compensation system with stable and smooth output according to the present invention.
[0021] Figure 2 The present invention is a flow chart of a sensor temperature compensation system with stable and smooth output.
[0022] Figure 3Schematic diagram of the temperature code value conversion module of the present invention.
[0023] Figure 4 Schematic diagram of the step output module of the present invention.
[0024] Figure 5 This is a schematic diagram of the output compensation code of the present invention changing with temperature. DETAILED DESCRIPTION
[0025] In order to elaborate on the technical solutions adopted by the present invention to achieve the predetermined technical purpose, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments, and the technical means or technical features in the embodiments of the present invention can be replaced without creative work. The present invention will be described in detail below with reference to the drawings and in conjunction with the embodiments.
[0026] like Figure 1 As shown, a sensor temperature compensation system with stable and smooth output of the present invention includes a temperature sensor probe, a temperature detection ADC, a small disturbance filtering module, a large disturbance shielding module, a temperature code value conversion module and a step output module. The temperature sensor probe is used to detect the temperature signal. The temperature detection ADC is connected to the temperature sensor probe to convert the temperature signal of the analog signal into the temperature value of the digital signal. The small disturbance filtering module is connected to the temperature detection ADC to maintain the previous output when the change in the adjacent sampled temperature values is less than the preset window threshold W. The large disturbance shielding module is connected to the small disturbance filtering module to determine that it is interference when the temperature change rate exceeds the mutation threshold R and maintain the previous valid value. The temperature code value conversion module is connected to the large disturbance shielding module to generate a compensation code through a lookup table LUT or a fitting algorithm. The step output module is connected to the temperature code value conversion module to gradually adjust the output with a configurable step size S and a step frequency F when the difference between the compensation code and the previous output compensation code exceeds a configurable step size S.
[0027] like Figure 2As shown, the temperature sensor probe acquires temperature-related signals through an NTC resistor or integrated bipolar resistor. This signal is quantized into a digital code value by an analog-to-digital converter and then processed by the digital signal processing module. The digital code value first passes through the small-disturbance filtering module. If the difference between the current detection code value and the previous detection code value is less than the disturbance threshold W, the current detection code value is invalidated and the previous output code value remains unchanged. Small fluctuations in the code value caused by noise or small changes in ambient temperature are filtered out. If the difference is greater than the small-disturbance threshold W, the signal is passed to the large-disturbance shielding module for evaluation. If the difference between the two detection code values is greater than the set large-disturbance threshold R, the current detection code value is shielded, and the previous output code value remains unchanged. Compensation errors caused by sudden changes in ambient temperature or circuit state errors are shielded. Otherwise, the normal code value is passed to the temperature conversion module. This module uses a lookup table or fitting algorithm to map the temperature code value quantized by the analog-to-digital converter to the compensation code value. The module then passes the code value to the step output module to control the step size and frequency of the compensation code step output and output the trim code.
[0028] The preset window threshold W of the small disturbance filter module is 1 to 8 LSB, and the preset window threshold W of the small disturbance filter module is dynamically configured through the I2C or SPI interface.
[0029] The mutation threshold R of the large disturbance shielding module is set based on the maximum reasonable change rate of the ambient temperature and satisfies:
[0030] Among them, V ΔT is the maximum reasonable rate of change of ambient temperature, Δt sample is the sampling interval, and k is the safety factor.
[0031] The mutation threshold R of the large disturbance shield module is dynamically configured through the I2C or SPI interface.
[0032] like Figure 3 As shown, the temperature code value conversion module includes a compensation relationship storage unit, an interpolation calculation unit and a nonlinear correction unit. The compensation relationship storage unit is used to store the mapping relationship between the temperature value and the compensation code. The interpolation calculation unit is connected to the compensation relationship storage unit and is used to perform linear interpolation calculation of the compensation code through adjacent storage points when the current temperature value is not directly stored. The nonlinear correction unit is connected to the interpolation calculation unit and is used to perform curvature correction on the compensation relationship in a specific temperature range.
[0033] The compensation relationship storage unit adopts a piecewise linear storage structure, which divides the temperature range into K intervals, and each interval stores the starting temperature value T k , termination temperature value T k+1 And the corresponding compensation code slope a k .
[0034] The workflow of the interpolation calculation unit is: When the input temperature value T satisfies T k <T<T k+1 When , the compensation code is output:
[0035] Among them, Code k is the starting temperature value T k The corresponding compensation code.
[0036] The nonlinear correction unit uses a second-order polynomial correction for the low-temperature range of -40°C to 0°C and the high-temperature range of 100°C to 150°C:
[0037] Among them, T rim_code_corrected is the compensation code correction value, b is the curvature coefficient, T mid is the midpoint value of the temperature range.
[0038] like Figure 4 As shown, the step output module includes a difference calculation unit, a step length controller, a timing trigger and an accumulator. The difference calculation unit is used to calculate the difference ΔC between the target code and the current output code. The step length controller is connected to the difference calculation unit to decompose the difference ΔC into M steps according to a configurable step length S. The timing trigger is used to generate a step clock with a frequency of F. The accumulator is connected to the step length controller and the timing trigger to adjust the compensation code value according to a step length of ±S when the enable signal is triggered, so as to achieve smooth output of the compensation code.
[0039] The configurable step size S and frequency F are dynamically configured via the I2C or SPI interface.
[0040] like Figure 5 As shown, time t1 is the first temperature compensation. At this time, the temperature code is the corresponding temperature code of 29°C. The compensation code is output in steps with a frequency of F and a step size of S. A small temperature disturbance is detected between time t1 and time t2. Through small disturbance filtering, the temperature code remains stable. The compensation code remains unchanged at time t2 of the second temperature compensation. The temperature suddenly changes to 90°C between time t2 and time t3, which is judged as an abnormal large disturbance. The temperature code value at this time is shielded and the temperature code value remains unchanged. The compensation code remains stable at time t3 of the third temperature compensation. The temperature changes to 31°C at time t4, which is judged to be normal. The temperature code is normally output to the temperature code value conversion module, and the compensation code is output in a step-by-step manner.
[0041] The present invention discloses a sensor temperature compensation system with stable and smooth output. By using small disturbance filtering technology, large disturbance shielding technology and combining with a step output method, frequent jitter of the compensation code caused by noise or small temperature jitter is filtered out, and at the same time, compensation errors caused by drastic environmental changes or circuit state errors are shielded. The compensation code output step size can be configured through I2C or SPI to achieve stable and smooth output.
[0042] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Although the present invention has been disclosed as a preferred embodiment as above, it is not intended to limit the present invention. Any technician familiar with the present profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical content disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent replacement and improvement of the above embodiments made according to the technical essence of the present invention, within the spirit and principles of the present invention, without departing from the content of the technical solution of the present invention, shall still fall within the scope of protection of the technical solution of the present invention.
Claims
1. A sensor temperature compensation system with stable and smooth output, characterized by: It includes a temperature sensor probe, a temperature detection ADC, a small disturbance filtering module, a large disturbance shielding module, a temperature code value conversion module and a step output module. The temperature sensor probe is used to detect the temperature signal. The temperature detection ADC is connected to the temperature sensor probe to convert the temperature signal of the analog signal into the temperature value of the digital signal. The small disturbance filtering module is connected to the temperature detection ADC to maintain the previous output when the change in the adjacent sampled temperature values is less than the preset window threshold W. The large disturbance shielding module is connected to the small disturbance filtering module to determine it as interference and maintain the previous valid value when the temperature change rate exceeds the mutation threshold R. The temperature code value conversion module is connected to the large disturbance shielding module to generate a compensation code through a lookup table LUT or a fitting algorithm. The step output module is connected to the temperature code value conversion module to gradually adjust the output with a configurable step size S and a step frequency F when the difference between the compensation code and the previous output compensation code exceeds a configurable step size S.
2. A sensor temperature compensation system with stable and smooth output according to claim 1, characterized in that: The preset window threshold W of the small disturbance filtering module is 1 to 8 LSB, and the preset window threshold W of the small disturbance filtering module is dynamically configured through an I2C or SPI interface.
3. A sensor temperature compensation system with stable and smooth output according to claim 1, characterized in that: The mutation threshold R of the large disturbance shielding module is set based on the maximum reasonable change rate of the ambient temperature and satisfies: Among them, V ΔT is the maximum reasonable rate of change of ambient temperature, Δt sample is the sampling interval, and k is the safety factor.
4. A sensor temperature compensation system with stable and smooth output according to claim 3, characterized in that: The mutation threshold R of the large disturbance shielding module is dynamically configured via an I2C or SPI interface.
5. The sensor temperature compensation system with stable and smooth output according to claim 1, characterized in that: The temperature code value conversion module includes a compensation relationship storage unit, an interpolation calculation unit and a nonlinear correction unit. The compensation relationship storage unit is used to store the mapping relationship between the temperature value and the compensation code. The interpolation calculation unit is connected to the compensation relationship storage unit and is used to perform linear interpolation calculation of the compensation code through adjacent storage points when the current temperature value is not directly stored. The nonlinear correction unit is connected to the interpolation calculation unit and is used to perform curvature correction on the compensation relationship in a specific temperature range.
6. A sensor temperature compensation system with stable and smooth output according to claim 5, characterized in that: The compensation relationship storage unit adopts a segmented linear storage structure to divide the temperature range into K intervals, each interval stores the starting temperature value T k , termination temperature value T k+1 And the corresponding compensation code slope a k .
7. A sensor temperature compensation system with stable and smooth output according to claim 6, characterized in that: The workflow of the interpolation calculation unit is as follows: When the input temperature value T satisfies T k <T<T k+1 When , the compensation code is output: Among them, Code k is the starting temperature value T k The corresponding compensation code.
8. A sensor temperature compensation system with stable and smooth output according to claim 7, characterized in that: The nonlinear correction unit uses a second-order polynomial correction for the low temperature range of -40°C to 0°C and the high temperature range of 100°C to 150°C: Among them, T rim_code_corrected is the compensation code correction value, b is the curvature coefficient, T mid is the midpoint value of the temperature range.
9. The sensor temperature compensation system with stable and smooth output according to claim 1, characterized in that: The step output module includes a difference calculation unit, a step length controller, a timing trigger and an accumulator. The difference calculation unit is used to calculate the difference ΔC between the target code and the current output code. The step length controller is connected to the difference calculation unit to decompose the difference ΔC into M steps according to a configurable step length S. The timing trigger is used to generate a step clock with a frequency of F. The accumulator is connected to the step length controller and the timing trigger to adjust the compensation code value according to a step length of ±S when an enable signal is triggered.
10. A sensor temperature compensation system with stable and smooth output according to claim 9, characterized in that: The configurable step size S and frequency F are dynamically configured via an I2C or SPI interface.
Citation Information
Patent Citations
Stepping temperature compensation method of crystal oscillator
CN107276581A
Temperature detection method, system and equipment of temperature sensor and medium
CN113267264A
Switch cabinet contact temperature rise wireless sensing method and system based on surface acoustic wave resonance
CN120213261A
Temperature compensation method of sensor, and sensor including temperature compensating function
KR1020120082607A
Temperature compensation apparatus for electronic signal
US20070005289A1
Cited By
Response compensation method and system of total temperature sensor
CN121475457A
A method and system for compensating the response of a total temperature sensor
CN121475457B
