← Tutorials

Tutorial Series · Part 18 of 27

IMU Calibration: Bias, Scale and Misalignment

Explain accelerometer and gyro calibration using bias, scale factor and misalignment models.

Series Context

Navigation from First Principles

This article is part of an ordered course. Use the previous and next links to stay in sequence.

A cheap IMU is not useless, but it must be treated honestly. Bias, scale-factor error, misalignment, temperature drift and noise all affect navigation. Analog Devices describes null bias, scale-factor error and noise as major inertial-sensor error sources.1 Their gyro calibration note gives practical equations for null output, scale factor and temperature compensation.2

The problem

When an accelerometer is stationary in many orientations, the magnitude of the true specific force should be approximately gg. But raw measurements often form an offset, stretched ellipsoid rather than a clean sphere.

The model

A common accelerometer calibration model is:

y=Ma+b+η\mathbf{y}=\mathbf{M}\mathbf{a}+\mathbf{b}+\boldsymbol{\eta}

where:

  • y\mathbf{y} is raw measurement.
  • a\mathbf{a} is true specific force.
  • M\mathbf{M} captures scale and misalignment.
  • b\mathbf{b} is bias.
  • η\boldsymbol{\eta} is noise.

Corrected acceleration can be estimated by:

a^=M1(yb)\hat{\mathbf{a}}=\mathbf{M}^{-1}(\mathbf{y}-\mathbf{b})

A six-position accelerometer calibration idea uses orientations where each axis is aligned with +g+g and g-g. A more visual method fits an ellipsoid to stationary data and transforms it toward a sphere.

For a gyro with voltage output, the calibration note gives the basic form:

ω=VgyroV0S\omega = \frac{V_{gyro}-V_0}{S}

where V0V_0 is null output and SS is scale factor.2

Interactive demo: accelerometer ellipsoid calibration

The demo below uses three 2D projections so the calibration effect remains visible without a heavy 3D plotting stack.

Interactive Demo

Accelerometer Ellipsoid Calibration

These synthetic stationary samples should lie on a sphere. Bias, scale error, and misalignment warp them into an ellipsoid until calibration pulls them back.

XY projection

XZ projection

YZ projection

Controls

Change one error source at a time, then press calibrate and compare the raw and corrected clouds in all three projections.

Calibration result

Before RMS0.00 m/s²
After RMS0.00 m/s²
Estimated bias-
Estimated scale-

What to watch

  • Raw points shift and stretch as bias and scale error increase.
  • Pressing calibrate recentres the cloud and reduces magnitude error.
  • Simple per-axis calibration helps a lot for bias and scale, but misalignment leaves residual structure.
  • The before/after RMS readout makes the improvement measurable rather than purely visual.

Try this

Add a large X-axis bias. The raw cloud should shift away from the origin. Press calibrate and watch the corrected cloud centre itself. Then add misalignment and note that simple per-axis calibration is no longer enough.

Where this breaks

Temperature-dependent bias, dynamic acceleration, vibration and imperfect orientation data make real calibration harder. This post should point readers toward the next level rather than oversell a simple six-point fit.

Footnotes

  1. Analog Devices, “What are the major error sources for inertial sensors?”. https://www.analog.com/en/resources/faqs/faq_what_are_the_major_error_sources_for_inertial.html - Inertial sensor bias, scale factor and noise reference. Accessed 2026-06-11.

  2. Analog Devices, “AN-1049: Calibrating iMEMS Gyroscopes”. https://www.analog.com/en/resources/app-notes/an-1049.html - Gyro null output, scale factor and temperature compensation reference. Accessed 2026-06-11. 2