A sensor temperature compensation system with stable and smooth output
By combining small-disturbance filtering and large-disturbance shielding techniques with a step-output method, the problems of signal jitter and sudden environmental changes in sensor temperature compensation are solved, achieving stable and smooth temperature compensation output.
Patent Information
- Application Number
- CN202511277014.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-09-09
AI Technical Summary
Existing temperature compensation technology cannot effectively suppress the jitter of compensation signals caused by minute temperature fluctuations, cannot shield against erroneous compensation caused by sudden changes in ambient temperature, and is prone to output signal jitter and system oscillation when switching compensation codes.
A combination of a small disturbance filtering module and a large disturbance shielding module, along with a step output method, is used. The small disturbance filtering module filters out signal jitter caused by minute temperature fluctuations, while the large disturbance shielding module shields against interference from drastic environmental changes. The temperature code conversion module and the step output module achieve a smooth transition of the compensation code.
Stable and smooth sensor temperature compensation is achieved, suppressing compensation code jitter caused by minor temperature fluctuations and sudden environmental changes, shielding erroneous compensation, and ensuring a smooth transition of output.
Smart Images

Figure CN120760758B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a temperature compensation system, and more particularly to a sensor temperature compensation system with stable and smooth output, belonging to the field of semiconductor integrated circuit technology. Background Technology
[0002] In high-precision sensor applications, signal drift caused by changes in ambient temperature is a core issue affecting measurement accuracy. Traditional temperature compensation techniques typically employ the following two methods:
[0003] Direct compensation method: A compensation signal that is linearly related to temperature is superimposed at the sensor output. For example, a compensation voltage proportional to temperature change is generated by introducing a temperature-sensitive resistor network into the signal chain. Although this method is simple in 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 ranges (such as below -40℃ or above 100℃); (2) The compensation accuracy is limited by the resistance matching degree, with a typical error of ±3%; (3) It is sensitive to sudden temperature changes and is prone to compensation overshoot.
[0004] Digital lookup table method: The temperature-compensation code mapping table is stored in the memory in advance. After reading the temperature value through the analog-to-digital converter, the corresponding compensation code is directly output. Although this method can handle nonlinear relationships, it still has inherent limitations: (1) Small temperature fluctuations (such as ±0.5℃) will trigger the compensation code jump, resulting in output signal jitter; (2) When the ambient temperature changes drastically (such as the temperature rise rate of 50℃ / minute when a car is cold-started), the system cannot distinguish between the real temperature change and the instantaneous interference; (3) The step change is generated when the compensation code is switched, which can easily cause the controlled system to oscillate.
[0005] Therefore, there is an urgent need for a temperature compensation technology that can simultaneously have the following functions: (1) suppressing the jitter of the compensation signal caused by small temperature fluctuations; (2) shielding the error compensation caused by sudden changes in ambient temperature; and (3) realizing the smooth transition output of the compensation code. Summary of the Invention
[0006] 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.
[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0008] 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 stepping 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 analog temperature signal into a digital temperature value. 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 interference when the rate of temperature change exceeds a sudden change 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 fitting algorithm. The stepping output module is connected to the temperature code value conversion module to gradually adjust the output with a configurable step size S and a stepping frequency F when the difference between the compensation code and the previous output compensation code exceeds a configurable step size S.
[0009] Furthermore, the preset window threshold W of the small perturbation filtering module is 1 to 8 LSB, and the preset window threshold W of the small perturbation filtering module is dynamically configured through the I2C or SPI interface.
[0010] Furthermore, the mutation threshold R of the large disturbance shielding module is set based on the maximum reasonable rate of change of ambient temperature, and satisfies:
[0011]
[0012] Among them, V ΔT Δt represents the maximum reasonable rate of change of ambient temperature. sample is the sampling interval, and k is the safety factor.
[0013] Furthermore, the mutation threshold R of the large disturbance shielding module is dynamically configured via an I2C or SPI interface.
[0014] 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 temperature values and compensation codes. The interpolation calculation unit is connected to the compensation relationship storage unit and is used to perform linear interpolation calculation of compensation codes 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 of a specific temperature range.
[0015] Furthermore, the compensation relationship storage unit adopts a piecewise linearized storage structure, dividing the temperature range into K intervals, with each interval storing the initial temperature value T. k Termination temperature value T k+1 and the corresponding compensation code slope a k .
[0016] Furthermore, the workflow of the interpolation calculation unit is as follows:
[0017] When the input temperature value T satisfies T k <T<T k+1 When the time comes, output the compensation code:
[0018]
[0019] Among them, Code k The initial temperature value T k The corresponding compensation code.
[0020] Furthermore, the nonlinear correction unit employs second-order polynomial correction for the low-temperature range of -40℃ to 0℃ and the high-temperature range of 100℃ to 150℃:
[0021]
[0022] Among them, T rim_code_corrected Here, b is the compensation code correction value, and T is the curvature coefficient. mid This is the value at the midpoint of the temperature range.
[0023] Furthermore, the step output module includes a difference calculation unit, a step size 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 size controller is connected to the difference calculation unit to decompose the difference ΔC into M steps according to a configurable step size S. The timing trigger is used to generate a step clock with a frequency of F. The accumulator is connected to the step size controller and the timing trigger to adjust the compensation code value according to a step size of ±S when the enable signal is triggered.
[0024] Furthermore, the configurable step size S and frequency F are dynamically configured via an I2C or SPI interface.
[0025] 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 step output method, the frequent jitter of compensation code caused by noise or small temperature fluctuations is filtered out. At the same time, the compensation error caused by drastic environmental changes or circuit state errors is shielded. The compensation code output step size can be configured through I2C or SPI to achieve stable and smooth output. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of a sensor temperature compensation system with stable and smooth output according to the present invention.
[0027] Figure 2This is a flowchart of the operation of a sensor temperature compensation system with stable and smooth output according to the present invention.
[0028] Figure 3 This is a schematic diagram of the temperature code value conversion module of the present invention.
[0029] Figure 4 This is a schematic diagram of the step output module of the present invention.
[0030] Figure 5 This is a schematic diagram illustrating how the output compensation code of the present invention changes with temperature. Detailed Implementation
[0031] To illustrate in detail the technical solutions adopted by the present invention to achieve the intended technical objectives, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Furthermore, the technical means or technical features in the embodiments of the present invention can be replaced without creative effort. The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
[0032] like Figure 1 As shown, the present invention discloses a sensor temperature compensation system with stable and smooth output, comprising 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 stepping output module. The temperature sensor probe is used to detect temperature signals. The temperature detection ADC is connected to the temperature sensor probe to convert the analog temperature signal into a digital temperature value. 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 interference when the temperature change rate exceeds the sudden change threshold R and maintain the previous valid value. The temperature code value conversion module is connected to the large disturbance shielding module to generate compensation codes through a lookup table (LUT) or fitting algorithm. The stepping output module is connected to the temperature code value conversion module to gradually adjust the output with a configurable step size S and a stepping frequency F when the difference between the compensation code and the previous output compensation code exceeds a configurable step size S.
[0033] like Figure 2As shown, the temperature sensor probe obtains temperature-related signals through an NTC resistor or integrated bipolar transistor, and quantizes these signals into digital code values via an analog-to-digital converter (ADC) for processing by the digital signal processing module. The digital code values first pass through a small-perturbation filtering module. If the difference between the current and previous code values is less than the perturbation threshold W, the current code value is invalid, and the previous output code value remains unchanged, filtering out small fluctuations in the code value caused by noise or minor changes in ambient temperature. If the difference is greater than the small-perturbation threshold W, the code is passed to a large-perturbation shielding module for judgment. If the difference between the two code values is greater than the set large-perturbation threshold R, the current code value is shielded, and the previous output code value remains unchanged, shielding compensation errors caused by drastic changes in ambient temperature or circuit malfunctions. Otherwise, the normal code value is passed to the temperature conversion module. This module uses a lookup table or fitting algorithm to map the quantized temperature code value to the compensation code and then passes it to the step output module to control the step size and frequency of the compensation code output before outputting the Trim-Code.
[0034] 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 the I2C or SPI interface.
[0035] The abrupt change threshold R of the large disturbance shielding module is set based on the maximum reasonable rate of change of ambient temperature, and satisfies:
[0036]
[0037] Among them, V ΔT Δt represents the maximum reasonable rate of change of ambient temperature. sample is the sampling interval, and k is the safety factor.
[0038] The mutation threshold R of the large disturbance shielding module is dynamically configured via the I2C or SPI interface.
[0039] 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 temperature values and compensation codes. The interpolation calculation unit is connected to the compensation relationship storage unit and is used to perform linear interpolation calculation of compensation codes 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 for a specific temperature range.
[0040] The compensation relation storage unit adopts a piecewise linearized storage structure, dividing the temperature range into K intervals, with each interval storing the initial temperature value T. k Termination temperature value T k+1 and the corresponding compensation code slope a k .
[0041] The workflow of the interpolation calculation unit is as follows:
[0042] When the input temperature value T satisfies T k <T<T k+1 When the time comes, output the compensation code:
[0043]
[0044] Among them, Code k The initial temperature value T k The corresponding compensation code.
[0045] The nonlinear correction unit employs second-order polynomial correction for the low-temperature range of -40℃ to 0℃ and the high-temperature range of 100℃ to 150℃.
[0046]
[0047] Among them, T rim_code_corrected Here, b is the compensation code correction value, and T is the curvature coefficient. mid This is the value at the midpoint of the temperature range.
[0048] like Figure 4 As shown, the step output module includes a difference calculation unit, a step size controller, a timer 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 size controller is connected to the difference calculation unit to decompose the difference ΔC into M steps according to the configurable step size S. The timer trigger is used to generate a step clock with a frequency of F. The accumulator is connected to the step size controller and the timer trigger to adjust the compensation code value according to the step size ±S when the enable signal is triggered, so as to achieve smooth output of the compensation code.
[0049] The configurable step size S and frequency F can be dynamically configured via the I2C or SPI interface.
[0050] like Figure 5 As shown, time t1 is the first temperature compensation, at which time the temperature code is the temperature code corresponding to 29℃. The compensation code is output in steps with a frequency of F and a step size of S. Between time t1 and t2, a small temperature disturbance is detected. Through small disturbance filtering, the temperature code remains stable. The compensation code remains unchanged at time t2 for the second temperature compensation. Between time t2 and t3, the temperature suddenly changes to 90℃, which is determined to be an abnormal large disturbance. The temperature code value at this time is masked, and the temperature code value remains unchanged. The compensation code remains stable at time t3 for the third temperature compensation. At time t4, the temperature changes to 31℃, which is determined to be a normal situation. The temperature code is output normally to the temperature code value conversion module, and the compensation code is output in a step manner.
[0051] This invention discloses a sensor temperature compensation system with stable and smooth output. By using small disturbance filtering technology, large disturbance shielding technology and step output method, it filters out the frequent jitter of compensation code caused by noise or small temperature fluctuations, and shields the compensation errors caused by drastic environmental changes or circuit state errors. The compensation code output step size can be configured via I2C or SPI to achieve stable and smooth output.
[0052] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent substitutions, and improvements made to the above embodiments without departing from the scope of the present invention, based on the technical essence of the present invention and within the spirit and principles of the present invention, shall still fall within the protection scope of the present invention.
Claims
1. A sensor temperature compensation system with stable and smooth output, characterized in that: 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 stepping 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 analog temperature signal into a digital temperature 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 interference when the rate of temperature change exceeds the sudden change 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 fitting algorithm. The stepping output module is connected to the temperature code value conversion module to gradually adjust the output with a configurable step size S and a stepping frequency F when the difference between the compensation code and the previous output compensation code exceeds the configurable step size S. The sudden change threshold R of the large disturbance shielding module is set based on the maximum reasonable rate of change of ambient temperature, and satisfies: Among them, V ΔT Δt represents the maximum reasonable rate of change of ambient temperature. sample is the sampling interval, and k is the safety factor.
2. The 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 the I2C or SPI interface.
3. The 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 dynamically configured via an I2C or SPI interface.
4. The sensor temperature compensation system with stable and smooth output according to claim 1, characterized in that: The temperature code 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 temperature values and compensation codes. The interpolation calculation unit is connected to the compensation relationship storage unit and is used to perform linear interpolation calculation of compensation codes 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 for a specific temperature range.
5. A sensor temperature compensation system with stable and smooth output according to claim 4, characterized in that: The compensation relationship storage unit adopts a piecewise linearized storage structure, dividing the temperature range into K intervals, with each interval storing the initial temperature value T. k Termination temperature value T k+1 and the corresponding compensation code slope a k .
6. A sensor temperature compensation system with stable and smooth output according to claim 5, 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 time comes, output the compensation code: Among them, Code k The initial temperature value T k The corresponding compensation code.
7. A sensor temperature compensation system with stable and smooth output according to claim 6, characterized in that: The nonlinear correction unit employs second-order polynomial correction for the low-temperature range of -40℃ to 0℃ and the high-temperature range of 100℃ to 150℃. Among them, T rim_code_corrected Here, b is the compensation code correction value, and T is the curvature coefficient. mid This is the value at the midpoint of the temperature range.
8. A 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 size controller, a timer 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 size controller is connected to the difference calculation unit and is used to decompose the difference ΔC into M steps according to a configurable step size S. The timer trigger is used to generate a step clock with a frequency of F. The accumulator is connected to the step size controller and the timer trigger and is used to adjust the compensation code value according to a step size of ±S when the enable signal is triggered.
9. A sensor temperature compensation system with stable and smooth output according to claim 8, characterized in that: The configurable step size S and frequency F are dynamically configured via I2C or SPI interfaces.
Citation Information
Patent Citations
Stepping temperature compensation method of crystal oscillator
CN107276581A
Apparatus for the automatic calibration of signals employed in oximetry
US5259381A