3.5.15 · D3Guidance, Navigation & Control (GNC)

Worked examples — IMU — integrated accelerometer + gyroscope

3,422 words16 min readBack to topic

Everything here rests on three facts from the parent note. Let us restate them in plain words so nothing is used before it is earned:

First, a plain-words note on position error. When we dead-reckon, we estimate where the box is by adding up (integrating) its motion. The estimate drifts away from the truth; we call that gap the position error and write it (here = position, = "the error in"). It is measured in metres. Keep this meaning in mind — it appears in the drift bullet and again in Examples 7 and 8.

Here = true acceleration (how the box speeds up), = the gravity vector (points down, so if is up), and = "specific force" = the push per kilogram that the sensor's internal spring feels. Keep the world axes fixed: = East, = North, = Up.


The scenario matrix

Every IMU problem is one (or a mix) of these cells. The examples below are tagged with the cell they cover.

Cell What is special Example
A. Rest, level , , no tilt Ex 1
B. Rest, tilted (sign of tilt) still, but rotated — gravity splits across axes Ex 2
C. Degenerate: free fall spring force is zero Ex 3
D. Linear acceleration, level true motion, must be subtracted Ex 4
E. Pure rotation (gyro only, on axis) orientation changes, no translation Ex 5
F. Coupled: accelerate while tilted must rotate before removing Ex 6
G. Limiting behaviour: drift over time error growth vs Ex 7
H. Real-world word problem drone in a tunnel, GPS-denied Ex 8
I. Exam twist: sign trap negative reading, which way is "up"? Ex 9
J. Off-axis rotation (centripetal) sensor not at the spin axis Ex 10

Example 1 — Cell A: rest and level


Example 2 — Cell B: rest but tilted (the sign of tilt matters)

Read the figure below first. The lavender box is the tilted IMU. The dark grey arrow is the true up-reaction that gravity forces the table to supply — it always points straight up in the world. The coral and mint arrows are the sensor's own tilted body and axes. Notice how the single grey arrow casts shadows (dashed lines) onto the two tilted axes: the coral shadow is the that leaks into body-, the mint shadow is the that stays along body-. The butter arc marks the tilt. This picture is the derivation in steps 1–2.

Figure — IMU — integrated accelerometer + gyroscope
  1. In the world frame the sensor still only feels the up-reaction to gravity: . Why? It is still; the physics is identical to Ex 1 in the world frame.
  2. Express that world vector in the body's tilted axes using (world → body, from the definition box). For about : Why this step? Look at the figure: as the box tips forward, part of the "up" push now falls along the body's -axis (the coral shadow). The measures how much leaks sideways; how much stays vertical.
  3. Sign check: tilt the other way, , and flips sign → . The sign of the -component tells you which way you tipped. Why this matters? This is exactly how the IMU derives a tilt angle: .

Verify: ✓ (rotation preserves length). And ✓.


Example 3 — Cell C: free fall (degenerate, spring force zero)


Example 4 — Cell D: linear acceleration, level


Example 5 — Cell E: pure rotation (gyro only, on the axis)

Read the figure below first. The lavender dot is the IMU, sitting exactly on the vertical spin axis (the dashed slate line). The mint circular arrow shows the spin . Because the sensor is on the axis, it never travels along a circle — it just pivots in place, so there is no circular (centripetal) acceleration. The only force its spring feels is still the up-reaction to gravity (the grey arrow, unchanged from Ex 1). Contrast this with Ex 10, where the dot is moved off the axis and a new inward pull appears.

Figure — IMU — integrated accelerometer + gyroscope
  1. Gyro reads rad/s, constant. Why? Constant spin about .
  2. Angle turned rad . Why this step? Integrating a constant rate is just rate × time — the simplest case of the strapdown attitude update.
  3. Accelerometer still reads — no linear acceleration. Why? The sensor is exactly on the vertical spin axis, so it has no circular motion and gravity is not tipped into other axes. (Move it off the axis and this changes — that is Ex 10.)

Answer: turned rad; accel unchanged.

Verify: rad, and ✓. This uses only Reference Frames — Body vs World: orientation changed, position did not. ✓


Example 6 — Cell F: accelerate while tilted (the coupled case)

Read the figure below first. In the fixed world axes (slate) the true acceleration (coral, pointing East) and the up-reaction to gravity (mint, pointing up) add tip-to-tail to give the total specific force (grey diagonal). The lavender dashed axes are the tilted body frame: the very same grey vector, when read off the tilted axes, splits into the mixed-up numbers — that is what the device outputs. The picture shows why you must rotate the grey arrow back onto the world axes before the mint gravity part will cancel cleanly.

Figure — IMU — integrated accelerometer + gyroscope
  1. Compute . With (world → body) for about : Why this step? This is what the physical device outputs — mixed up because the body is tilted.
  2. Correct recovery: rotate to world first with (body → world), then subtract gravity. Why this step? Only after rotating are the axes world-aligned, so gravity is purely in and cancels cleanly.
  3. Naive shortcut (wrong): read as world and subtract : Why it's wrong? You never rotated, so gravity was still smeared across and . You now "see" a phantom m/s² eastward acceleration.

Answer: correct ; naive method gives the garbage .

Verify: so step 2 round-trips exactly ✓. The naive -error is ✓. Lesson: attitude → rotate → subtract → integrate, always.


Example 7 — Cell G: limiting behaviour, drift over time

Read the figure below first. The horizontal axis is elapsed time; the vertical axis is how many metres your position estimate has drifted. The coral curve is the accelerometer error, a gentle parabola (). The lavender curve is the gyro-tilt error, a steeper cubic (). The mint dashed line marks the crossover moment where the cubic overtakes the parabola — before it the accel error dominates, after it the gyro error runs away. The dots are the four numbers we compute in steps 1–2.

Figure — IMU — integrated accelerometer + gyroscope
  1. Accel error grows as .
    • : m.
    • : m. Why this step? A constant acceleration error integrated twice gives a position error.
  2. Gyro-tilt error grows as .
    • : m.
    • : m. Why this step? Bias tilts the frame linearly, leaking a ramp of acceleration; integrating a ramp twice gives .
  3. Crossover: at s accel error (1 m) beats gyro (0.29 m); by s the gyro cubic (285 m) has crushed the accel quadratic (100 m). Why? eventually overtakes no matter how small is — this is why GPS-Denied Navigation must fuse with other sensors.

Verify: ratios — accel error scales ×100 from to (i.e. ) ✓; gyro error scales ×1000 (i.e. ) ✓. See Sensor Fusion & Kalman Filter for the cure.


Example 8 — Cell H: real-world word problem


Example 9 — Cell I: exam twist, the sign trap


Example 10 — Cell J: off-axis rotation (the case Ex 5 warned about)


Recall Quick self-test

A resting accelerometer reads in body — is it accelerating? ::: No. Its -axis points down; it's stationary but flipped. Why does a error eventually beat a error? ::: Because for large , grows faster than regardless of coefficients. In Ex 6, why did the naive method invent a phantom acceleration? ::: It skipped the rotation, so gravity stayed smeared across the body axes and leaked into . Off the spin axis, what extra reading appears and how big for , ? ::: Centripetal m/s² toward the axis. What single word summarises the fix for all coupled cases? ::: Rotate (into the world frame) before subtracting gravity.