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

Linear or Polynomial Regression

Figure 2-2 shows the sensor output vs ambient temperature data for the same data as in Figure 2-1. The goal of regression is to obtain the simplest acceptable relationship between the desired variable (ambient temperature), and the known variable (sensor output). Most data analysis software provides curve fitting/trend line tools that can be used to quickly obtain a linear or polynomial relationship.

GUID-20200929-CA0I-XSKD-RQ42-9GQT1FCGGDXB-low.svg Figure 2-2 Ambient Temperature as a Function of Sensor Output Temperature

The R2 value can be used here to evaluate the quality of the regression. A higher R2 value will result in less system temperature error contributed by the curve fit. Using a linear fit will result in a faster computation time, but in a typically lower R2 value when compared to a polynomial regression. In this example, a linear regression line of Tamb = -4.641 +1.03Tc gives an R2 value of greater than 0.999. This quality of fit is sufficient for most system requirements. In this case, the regression shows that the error can be corrected with just a simple offset and gain correction. The I2C host should be used to apply this equation to compensate the sensor temperature readings.