SNAA344 October   2020 HDC2080

 

  1.   Trademarks
  2. 1Introduction
  3. 2Temperature Accuracy Compensation
    1. 2.1 Linear or Polynomial Regression
  4. 3Relative Humidity Correction
  5. 4Response Compensation
    1. 4.1 Symptoms of Slow Thermal Response
    2. 4.2 Simulating Thermal Response Compensation
    3. 4.3 Realistic Thermal Response Compensation
  6. 5Summary
  7. 6References

Simulating Thermal Response Compensation

It is possible to algorithmically correct for this kind of transient error of a temperature/humidity sensing system using only known quantities. To begin the designer should make the following assumptions:

  1. The system thermal behavior is approximately that of a first-order system (equivalent to a single pole low-pass filter, like the RC circuit discussed previously)
  2. The temperature sampling rate is uniform
  3. The system time constant (τ) is known

In a real system, the first assumption will contribute some unavoidable error to the final results of the compensation, but it is a common assumption for temperature sensing applications. For the second assumption, either the sensor controller can configure a timer to trigger and read temperature from the temperature sensor, or if the device allows it (such as with the automatic measurement mode of the HDC20xx family), the sensor itself can be configured to convert temperature regularly.

The third assumption will require the system designer to characterize their system, similar to Section 2. The time constant should be measured as the time it takes for the system to reach roughly 63% of final value when subjected to a step-change in temperature. When selecting a sample rate, ensure that the sample time is much faster than the measured system time constant (at least 20x faster as a best practice).

GUID-20201001-CA0I-2PWV-KXRN-SDTMR2GHPL2Q-low.svg Figure 4-5 Estimation of Residual Temperature
With this information we can calculate the ambient temperature value from the system temperature value by calculating two unknown values: the temperature gradient, and the residual temperature. As shown in Figure 4-5, the temperature gradient is the rate of change of the case temperature, and the residual temperature is the difference between the ambient and interior case temperatures.

Tgradient is just a slope calculation and can be found as follows:

Equation 3. GUID-20201001-CA0I-RCB1-PQ02-FR0K7XRDZV2N-low.svg

Where TC_n is the nth temperature sample, TC_n-1 is the n-1th temperature sample, and Δt is the time between them.

With Tgradient known, we can determine Tresidual and estimate Tamb like so:

Equation 4. GUID-20201001-CA0I-CN6H-PDDQ-RZ1CCKTP8X3D-low.svg
Equation 5. GUID-20201001-CA0I-KDW4-WXF4-ZVVBG92DMHMB-low.svg

When calculating Tresidual, tsample should be the time between regular temperature samples.

Figure 4-6, Figure 4-7, and Figure 4-8 show the three kinds of ambient temperature changes modeled before in Section 4.1, with the sensor temperature reported values, and the compensated temperature result in simulation. As can be seen, the results are very nearly ideal, with only the step change in temperature showing any overshoot. As will be shown, this quality of compensation is not attainable in real applications.

GUID-20201001-CA0I-MJ7X-TD8G-D22RN6PNSQHQ-low.svg Figure 4-6 Compensated System Temperature Response (Blue) to a Step Change in Temperature
GUID-20201001-CA0I-VQBJ-FXFN-WV9MKWXFR3VC-low.svg Figure 4-7 Compensated System Temperature Response (Blue) to a Ramp Change in Temperature
GUID-20201001-CA0I-QBSS-STB9-HGSS9VFGRMDR-low.svg Figure 4-8 Compensated System Temperature Response (Blue) for a Temperature Cycling Ambient Environment