Calibrating Sensors and Estimating Uncertainty: the short answer
Every sensor reading has an error, and calibration measures and corrects it. Compare the sensor with a reference that is clearly better (at least three to four times more accurate) at several points across the range you care about.
- Level
- Advanced
- Time
- About 6 min
- Topic
- Sensors and actuators
Calibrate a sensor against a reference, correct offset, gain and non-linearity, and state how much a reading can be trusted.
Before this: Interpreting Sensor Data, Accurate ADC Readings: Calibration and Filtering
Every sensor reading has an error, and calibration measures and corrects it. Compare the sensor with a reference that is clearly better (at least three to four times more accurate) at several points across the range you care about. The simplest correction is an offset (add a constant). A two-point calibration corrects offset and gain, a straight line through two known points. If the residuals after a straight-line fit show a curve, fit a second-order polynomial or use a lookup table with interpolation.
Some references are easy to get. Ice water that is properly stirred sits at 0 °C, and boiling water is about 100 °C at sea level (lower at altitude, for example about 95 °C in Shimla). Known weights calibrate a load cell with an HX711. Saturated salt solutions in a sealed jar hold fixed humidity: table salt (sodium chloride) gives about 75 % RH. A good multimeter calibrates voltage readings. Record the date, reference, conditions and resulting constants with each sensor.
State the uncertainty, not just the value. Repeat a reading many times and compute the standard deviation to measure noise. Add the reference's own uncertainty, the sensor's resolution and any drift with temperature. A reading of 24.6 ± 0.3 °C is honest; 24.613 °C from a ±0.5 °C sensor is not. For a lab record, plot sensor reading against reference, show the fitted line and residuals, and quote the largest residual as the calibration error.
Accuracy, precision and resolution are different
Resolution is the smallest change a reading can show. Precision is how close repeated readings are to each other, and accuracy is how close they are to the true value. A sensor can show 0.01 °C resolution and still be 1 °C wrong.
Calibration compares the sensor with a better reference at known points and corrects the difference. For a temperature sensor, ice water at about 0 °C and a trusted thermometer give two points, from which you work out offset and slope.
Estimating uncertainty
Take many readings under the same conditions and calculate the average and the standard deviation. The standard deviation shows the spread, and the uncertainty of the average is that value divided by the square root of the number of readings. Combine the sources of error, such as the reference's own uncertainty and the sensor's drift, by adding them in quadrature when they are independent.
State a result with its uncertainty, for example 21.4 ± 0.3 °C, and say how it was found.
Drift and conditions
Sensors drift with age and with temperature, and a calibration is valid only for the range you tested. Check against the reference at intervals, and record the date. Keep the self-heating of the sensor in mind, since a sensor driven hard heats itself and reads high.
- Treating a high-resolution reading as an accurate one.
- Calibrating at one point and using the sensor over a wide range.
- Quoting a result with no uncertainty.
Practise this lesson with Pro
The explanation above is free for everyone. The practice for Advanced lessons in every domain are part of the Pro plan at ₹999 a month.
With Pro you also get: a worked example, a hands-on task, a 3-question check.
