#### Calibration

You could buy a sensor and start using it with the assumption that it is already well calibrated. For a cheaper sensor, however, the calibration is often unreliable. Suppose we have one expensive, well-calibrated sensor that reports angular velocities with very little error. Let denote its output, to distinguish it from the forever unknown true value . Now suppose that we want to calibrate a bunch of cheap sensors so that they behave as closely as possible to the expensive sensor. This could be accomplished by mounting them together on a movable surface and comparing their outputs. For greater accuracy and control, the most expensive sensor may be part of a complete mechanical system such as an expensive turntable, calibration rig, or robot. Let denote the output of one cheap sensor to be calibrated; each cheap sensor must be calibrated separately.

Calibration involves taking many samples, sometimes thousands, and comparing to . A common criterion is the sum of squares error, which is given by (9.5)

for samples of the angular velocity. The task is to determine a transformation to apply to the cheap sensor outputs so that it behaves as closely as possible to the expensive sensor outputs .

Using the error model from (9.1), we can select constants and that optimize the error: (9.6)

This is a classical regression problem referred to as linear least-squares. It is typically solved by calculating the Moore-Penrose pseudoinverse of an non-square matrix that contains the sampled data .

Once and are calculated, every future sensor reading is transformed as (9.7)

in which is the original, raw sensor output, and is the calibrated output. Thus, the calibration produces a kind of invisible wrapper around the cheap sensor outputs so that the expensive sensor is simulated. The raw, cheap sensor outputs are no longer visible to outside processes. The calibrated outputs will therefore simply be referred to as in the remainder of this chapter.

Steven M LaValle 2020-01-06