S L U G S
Santa Cruz Low-cost UAV GNC System

Temperature compensation. It does matter.

Posted by: Mariano I. Lizarraga

Temperature compensation is one of those capabilities that when included in a sensor board can go a long way to reduce the temperature dependence on the computed measurements. The SLUGS AP includes a low-power active thermistor from Microchip (
MCP9701A). This thermistor is really cheap and requires very little board real state. In our case, the thermistor has proven essential to conduct temperature compensation on our sensor measurements.

To decide weather we needed to perform temperature compensation on our sensor suite we conducted the following experiment: First we placed our board inside a ziploc bag, sealed it and placed it inside the lab’s freezer for an hour. After that, we took the board out of the freezer, powered it and blowed warm air to it with a heat gun without moving the board. All this while logging data at 100Hz from the sensors. The results were very conclusive. Temperature compensation was really necessary on some sensors.

Take for instance the gyro Y (from an IDG300) and static pressure measurements (MPXH6115A) shown below in rows two and three in blue. The read values showed a drastic change which was strongly correlated to that of the thermistor. After temperature compensation (shown in red) it is clear that even though temperature compensation does not completely remove this dependence. It does go a long way to reduce this effect.


tempComp


Granted that the temperature variation from freezer to heat gun is quite drastic, but it does a good job on showing how dependent a sensor is to temperature variation.

So how to do temperature compensation? It is quite simple. First you need to find the temperature dependence from a given sensor. To do this you need to do a scatterplot of temperature vs. sensor X. With that, you can do a polynomial fit (preferably a 1st order) to obtain the dependence coefficient.

For instance, the following image shows the temperature dependence on each of the SLUGS IMU sensors:

temp_comp

Note in the above plot how the gyro Y the temperature dependence coefficient is an order of magnitude larger than any other. Thus, this means that gyro Y is severely affected by temperature.

The coefficient displayed on each plot can be used by using Matlab’s polyfit command as:

coefficient = polyfit(temperature_data,sensor_data,1)

In conclusion, if you have sensors that will be subject to temperature variations don’t discard the importance of conducting temperature compensation on those. Adding a thermistor has a negligible impact on board-space and price as long as you have an ADC pin available in your main microcontroller.