Skip to the content
FixTheRobot Explore Robotics / UAV / Module 3 / M3-T7

UAV Systems Engineering · Module 3

M3-T7: IMU noise and bias modelling

Four numbers describe an IMU’s errors well enough to run a filter: learn what they mean and how to measure them from a stationary log.

  • Lesson 7 of 16
  • Sensor Fusion and State Estimation
  • Established engineering
  • About 6 minutes to read

A VIO or LIO filter is only as honest as its IMU noise model. Datasheet numbers are optimistic, units are inconsistent between vendors, and bias is not constant. This lesson shows how to extract proper noise parameters and put them into a filter.

Learning objectives

After this lesson, you should be able to:

  • Distinguish white noise, bias instability and bias random walk and their units.
  • Read noise density and random walk from an Allan deviation plot.
  • Discretise continuous noise parameters for a given sample time.
  • Estimate parameters from a stationary log in code.

Conceptual explanation

A raw IMU measurement is the true signal plus a slowly changing bias plus white noise. Two parameters per sensor are the minimum: the noise density σ\sigma (units: m/s²/√Hz for the accelerometer, rad/s/√Hz for the gyro) and the bias random-walk σb\sigma _{b} (rad/s²/√Hz for a gyro). A third, bias instability, is the best-case flicker floor of the bias and is read from the minimum of the Allan deviation.

Allan deviationA log-log plot of Allan deviation against averaging time. White noise gives a slope of minus one half at short times, the minimum is the bias instability, and random walk gives a slope of plus one half at long times.log₁₀ τ (averaging time)log₁₀ σ(τ) slope −½: white noise (N)flat minimum: bias instability (B)slope +½: random walk of bias (K)N read at τ = 1 sB read at the minimum
Allan deviation of a gyro: different noise processes occupy different slopes and averaging times.
Animation of an Allan deviation plot built up from a gyro recording that grows from a few minutes to several hours. On logarithmic axes the curve first falls with slope minus one half, the signature of white angle random walk noise, reaches a minimum that gives the bias instability, and then rises with slope plus one half, the signature of rate random walk. More points appear at long averaging times as more data is collected.
The Allan deviation σ(τ)\sigma (\tau ) of a simulated gyro (white noise plus a bias random walk): slope −1/2 at short τ\tau gives the noise density, the flat bottom is the bias instability, slope +1/2 at long τ\tau is the bias random walk. Long averaging times need long recordings: the right end of the curve only exists once the data is long enough. (Looping, about 6 seconds; drawn and computed for this course with illustrative values.)

Engineering intuition

Averaging white noise helps: the error shrinks as the square root of averaging time. Bias does not average away; it wanders. The Allan deviation plots the stability of the signal against averaging time: it falls while noise is being averaged, bottoms out where the wandering bias starts to dominate, and rises after. That minimum is the longest you can usefully average a stationary sensor; filters use the two ends of the plot as their noise and random walk parameters.

Mathematical formulation

Continuous-time model for a gyro (the accelerometer is identical):

IMU measurement model
ωm(t)=ω(t)+b(t)+n(t)\boldsymbol\omega_m(t) = \boldsymbol\omega(t) + \mathbf b(t) + \mathbf n(t)
b˙(t)=nb(t)\dot{\mathbf b}(t) = \mathbf n_b(t)
n is white with density σg; nb is white with density σbg.
σg\sigma _{g}
noise density (rad/s/√Hz): variance of the sampled noise is σg2/Δt\sigma _{g}^{2}/\Delta t.
σbg\sigma _{\text{bg}}
bias random-walk density (rad/s²/√Hz): the bias variance grows as σbg2 t\sigma _{\text{bg}}^{2}\,t.
Δt\Delta t
sample period.

Discrete-time equivalents for a filter at sample time Δt\Delta t:

Discretisation
σg,d=σgΔt\sigma_{g,d} = \frac{\sigma_g}{\sqrt{\Delta t}}
Sampled white-noise standard deviation.
σbg,d=σbgΔt\sigma_{bg,d} = \sigma_{bg}\sqrt{\Delta t}
Standard deviation of the bias random-walk step.

Allan deviation

Allan variance and its regions
σA2(τ)=12⟨(yˉk+1(τ)−yˉk(τ))2⟩\sigma_A^{2}(\tau) = \tfrac{1}{2}\left\langle\left(\bar y_{k+1}(\tau) - \bar y_k(\tau)\right)^{2}\right\rangle
ȳk(τ) is the average of the signal over consecutive windows of length τ.
White noise N
σA(τ)=Nτ\sigma_A(\tau) = \frac{N}{\sqrt{\tau}}
N is the value of σA at τ = 1 s.
Bias instability B
σA,min⁡≈0.664 B\sigma_{A,\min} \approx 0.664\,B
The minimum of σA(τ).
Random walk K
σA(τ)=Kτ/3\sigma_A(\tau) = K\sqrt{\tau/3}

These relations are from IEEE Std 952 and its derivatives. Vendors sometimes quote noise in ∘/h^{\circ}/\sqrt{h} or µg/√Hz: convert carefully (1°/√h = (1/60) °/s/√Hz ≈ 2.9×10−42.9\times 10^{-4} rad/s/√Hz), and treat datasheet values as lower bounds. Measure your own unit.

Architecture and data flow

Allan-derived parameters feed the filter’s process-noise matrix QQ: the noise density sets the covariance growth of attitude and velocity per step; the random-walk densities set how fast the bias states are allowed to wander (and so how responsive bias estimation is). In VIO configuration files these are exactly the four parameters (accelerometer and gyro noise and random walk). Inflating them modestly above the measured values is common and absorbs unmodelled effects such as vibration; inflate on evidence, not fear.

Real-world UAV applications

  • Configuring VINS-Fusion, OpenVINS and similar systems (they ask for these four numbers).
  • Choosing an IMU: comparing candidate sensors on the parameter that matters for your outage duration.
  • Building simulations with realistic IMU errors.
  • Detecting a damaged or temperature-sensitive IMU by comparing its Allan curve to its history.

Implementation example

This runs as shown: it simulates a gyro with known white noise and bias random walk, computes the overlapping Allan deviation, and recovers the noise density and the random walk from the two ends of the curve.

import numpy as np
rng = np.random.default_rng(7)
fs = 100.0; dt = 1 / fs; n = 1_000_000                       # 10 000 s of stationary data at 100 Hz
N_true = 0.002                                                # noise density (rad/s/sqrt(Hz))
K_true = 1e-4                                                 # bias random walk (rad/s^2/sqrt(Hz)): large, to show the random-walk region
white = N_true / np.sqrt(dt) * rng.standard_normal(n)
bias = np.cumsum(K_true * np.sqrt(dt) * rng.standard_normal(n))
y = white + bias                                              # stationary gyro output

def allan_dev(y, m):                                          # non-overlapping clusters of m samples
    k = len(y) // m
    means = y[: k * m].reshape(k, m).mean(axis=1)
    return np.sqrt(0.5 * np.mean(np.diff(means) ** 2))

tau_s = np.array([1, 3, 10, 30, 100, 300])                    # averaging times in seconds
ad = np.array([allan_dev(y, int(t * fs)) for t in tau_s])
N_est = ad[0] * np.sqrt(tau_s[0])                             # white-noise region (slope -1/2): N = sigma_A * sqrt(tau)
K_est = ad[-1] * np.sqrt(3.0 / tau_s[-1])                     # random-walk region (slope +1/2): K = sigma_A * sqrt(3 / tau)
print(f"N: true {N_true:.4f}, estimated {N_est:.4f} | K: true {K_true:.1e}, estimated {K_est:.1e}")
assert abs(N_est / N_true - 1) < 0.15
assert 0.5 < K_est / K_true < 2.0                             # long-tau Allan estimates from one run are noisy
Allan deviation estimation of noise density and bias random walk from a synthetic stationary log.

Common engineering mistakes

Using datasheet noise density as is

Datasheets are typically at best-case temperature and without vibration. Measure on the vehicle, motors off, then with motors on.

Mixing units

µg/√Hz vs m/s²/√Hz and ∘/h^{\circ}/\sqrt{h} vs rad/s/√Hz are the usual disasters. Write units on every parameter.

Treating bias as constant in the filter

Without a random walk the filter cannot track bias changes and drift returns after warm-up.

Calibrating on a table with motors off and flying with motors on

Vibration adds noise and bias (rectification) that the stationary test does not capture.

Inflating noise by orders of magnitude to “make it work”

This usually hides a timing or extrinsics bug.

Failure modes

Failure modes, symptoms and causes
Failure modeHow it shows upLikely cause
Too-small accelerometer noise in a VIO configFilter trusts IMU too much, drifts when vision is lostDatasheet noise used without margin for vibration
Too-large noiseFilter ignores the IMU, jittery estimateOvercautious inflation
Bias estimate oscillatesBias state moves rapidly with the motionRandom walk set too high or observability poor
Temperature-correlated driftBias changes with warm-upNo thermal model and heating from the companion

Debugging approach

  1. Record 2–3 hours stationary at constant temperature and compute the Allan deviation of each axis.
  2. Repeat with motors spinning (props off) to see vibration’s effect on noise.
  3. Check that estimated biases in flight stay within a reasonable band; a bias state that saturates points to a wrong model elsewhere.
  4. Compare Allan curves between units: a mismatch indicates a damaged or different sensor revision.

Practical exercises

  1. Convert 100 µg/√Hz to m/s²/√Hz (1 μg=9.81×10−6 m/s2)(1\,\mathrm{\mu{}g}=9.81\times 10^{-6}\,m/s^{2}) and 0.1°/√h to rad/s/√Hz.
  2. For a 200 Hz IMU with N = 0.003 m/s²/√Hz, find the standard deviation of one sample.
  3. Compute the growth of position uncertainty after 10 s from white accelerometer noise alone.
  4. Run the code with KtrueK_{\text{true}} ten times larger and observe the Allan curve.

Interview questions

Write an answer in your own words, then reveal the model answer. Nothing is sent anywhere.

Question 1

What is the difference between noise density and bias random walk?

Model answer

Noise density sets sample-to-sample white noise (error shrinks by averaging); bias random walk sets how fast the slowly varying offset wanders (error grows with time). They show up on opposite ends of the Allan plot.

Question 2

Why is bias instability read at the minimum of the Allan curve?

Model answer

At short times white noise dominates and averaging helps; at long times the random walk dominates; the minimum is where the bias flicker floor is the limiting error.

Question 3

Why do VIO systems need IMU noise parameters?

Model answer

They set the covariance of IMU preintegration and of bias evolution, which weights IMU against vision in the optimisation. Wrong values mis-weight the sensors.

References and further reading

Primary papers, official documentation and standards. Each claim above that is specific to a tool or version points here.

What’s next

Mark this lesson

Saved in this browser and synced to your account when you are signed in.

Next lesson

M3-T8: IMU preintegration

Preintegrate IMU measurements between camera frames, and explain bias correction and the covariance of the result.