3.5.15Guidance, Navigation & Control (GNC)

IMU — integrated accelerometer + gyroscope

2,015 words9 min readdifficulty · medium

WHAT is an IMU?

WHY these two together? A gyro tells you how the box is oriented (needed to know which way "down" and "forward" point). An accelerometer tells you how the box is being pushed. You need orientation before you can turn acceleration into world-frame motion — so the two sensors are inseparable partners.


WHY an accelerometer measures specific force, not acceleration

Here is the single most misunderstood point. An accelerometer is a proof mass on a spring. It reports the force per unit mass that the spring must apply to keep the mass in place.

Let us derive this. In an inertial frame the proof mass obeys ma=Fspring+mg.m\,\mathbf{a} = \mathbf{F}_{\text{spring}} + m\,\mathbf{g}. The sensor reports specific force fFspring/m\mathbf{f} \equiv \mathbf{F}_{\text{spring}}/m. Solve:   f=ag  \boxed{\;\mathbf{f} = \mathbf{a} - \mathbf{g}\;}


HOW gyroscope data becomes orientation (strapdown mechanization)

A gyro gives body-frame rate ωb=(ωx,ωy,ωz)\boldsymbol{\omega}_b = (\omega_x,\omega_y,\omega_z). We want the rotation RbwR^w_b that maps body vectors to world vectors, and it evolves with time.

Derive the propagation. A small rotation over dtdt about axis ω\boldsymbol\omega rotates any body-fixed vector. The kinematic law for a rotation matrix is R˙bw=Rbw[ωb]×,\dot{R}^w_b = R^w_b\,[\boldsymbol{\omega}_b]_\times, where the skew matrix encodes the cross product [ω]×v=ω×v[\boldsymbol\omega]_\times \mathbf v = \boldsymbol\omega\times\mathbf v: [ω]×=(0ωzωyωz0ωxωyωx0).[\boldsymbol{\omega}]_\times=\begin{pmatrix}0&-\omega_z&\omega_y\\ \omega_z&0&-\omega_x\\ -\omega_y&\omega_x&0\end{pmatrix}.

Why the cross product? A point at position r\mathbf r on a rotating body moves with velocity ω×r\boldsymbol\omega\times\mathbf r — that is rigid-body rotation. The matrix ODE just packs this for all axes at once.

For a small step, Rk+1=Rkexp ⁣([ωb]×Δt)Rk(I+[ωb]×Δt).R_{k+1}=R_k\,\exp\!\big([\boldsymbol\omega_b]_\times \Delta t\big)\approx R_k\big(I+[\boldsymbol\omega_b]_\times\Delta t\big).


HOW the full IMU dead-reckons position (strapdown integration)

Chain the three integrations:

ωbgyro    Rbwaw=Rbwfb+gvw=awdtpw=vwdt\underbrace{\boldsymbol\omega_b}_{\text{gyro}}\ \xrightarrow{\ \int\ }\ R^w_b \qquad \mathbf a_w = R^w_b\,\mathbf f_b + \mathbf g \qquad \mathbf v_w=\int\mathbf a_w\,dt \qquad \mathbf p_w=\int\mathbf v_w\,dt
Figure — IMU — integrated accelerometer + gyroscope

WHY errors explode: integration drift

A tiny constant gyro bias bgb_g (rad/s) becomes an angle error bgtb_g\,tlinear in time. That angle error mis-points gravity, so a component of gg leaks into aw\mathbf a_w. A constant acceleration error εa\varepsilon_a integrated twice gives a position error 12εat2\tfrac12\varepsilon_a t^2.


Worked Examples


Common Mistakes


Flashcards

What physical quantity does an accelerometer actually measure?
Specific force f=ag\mathbf f=\mathbf a-\mathbf g (spring force per mass), not acceleration.
What does an accelerometer read when at rest on a table?
+g+g pointing up (magnitude 9.81 m/s²), because it senses the normal force.
What does an accelerometer read in free fall?
Zero — no spring force acts on the proof mass.
Two core sensors in an IMU and what each outputs?
Accelerometer → specific force fb\mathbf f_b; Gyroscope → angular rate ωb\boldsymbol\omega_b.
Why must gyro data be processed before accelerometer data?
You need orientation RbwR^w_b to rotate specific force into the world frame and add gravity back.
Attitude propagation ODE from gyro rate?
R˙bw=Rbw[ωb]×\dot R^w_b = R^w_b[\boldsymbol\omega_b]_\times (skew-symmetric cross-product matrix).
Equation to get true world acceleration from IMU?
aw=Rbwfb+g\mathbf a_w = R^w_b\mathbf f_b + \mathbf g.
How does a constant gyro bias affect position error over time?
Grows like 16gbgt3\tfrac16 g\,b_g\,t^3 (tilt leaks a gravity-ramp, double-integrated).
How does a constant accelerometer bias affect position error?
Grows like 12εat2\tfrac12\varepsilon_a t^2.
Why are IMUs always fused with GPS/vision?
Inertial drift grows unboundedly (t2t^2, t3t^3); external references bound the error.

Recall Feynman: explain to a 12-year-old

Imagine a phone in a box that's blindfolded. It has two feelings. One feeling ("gyro") is "how fast am I spinning?" Another feeling ("accelerometer") is "how hard is something pushing me?" — like the push you feel in your back when a car speeds up. By keeping a running total of the spins, the box always knows which way it's facing. Then it knows which push is just the ground holding it up (gravity) and which push is real movement. Adding up the real pushes tells it how fast it's going, and adding those up tells it where it went — all with eyes closed! The catch: every tiny mistake keeps adding up, so after a while it gets lost, which is why it peeks at GPS sometimes.

Connections

  • Sensor Fusion & Kalman Filter — bounds the IMU's drift with GPS/vision
  • Rotation Matrices & Quaternions — the attitude representation RbwR^w_b
  • Dead Reckoning — the double-integration idea generalized
  • Coriolis Effect — how MEMS gyros physically sense ω\boldsymbol\omega
  • Reference Frames — Body vs World — the rotation that ties fb\mathbf f_b to aw\mathbf a_w
  • GPS-Denied Navigation — where IMUs are indispensable

Concept Map

contains

contains

measures

measures

via f = a - g

needs

integrated via strapdown

rotates a into

integrate twice

tells which way is

lets us add g back to

works without

IMU sensor box

3-axis accelerometer

3-axis gyroscope

Specific force f_b

Angular velocity omega_b

True acceleration a

Orientation R world-body

World-frame motion

Position and velocity

Down and forward

External reference like GPS

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, IMU ek chhota sa box hai jisme do sensor hote hain: accelerometer aur gyroscope. Gyroscope batata hai ki box kitni tezi se ghoom raha hai (angular rate ω\omega), aur accelerometer batata hai ki box par kitna push lag raha hai. Sabse important baat — accelerometer sach mein acceleration nahi, balki specific force (f=ag\mathbf f = \mathbf a - \mathbf g) measure karta hai. Isiliye table par rakha hua stationary phone bhi +g+g (9.81) upar dikhata hai, kyunki table ka normal force spring ko push karta hai. Aur free-fall me phone zero dikhayega!

Ab position kaise nikalte hain? Pehle gyro ka data integrate karke orientation (RbwR^w_b) nikalo — yani box kis taraf face kar raha hai. Phir accelerometer ki reading ko us orientation se world frame me rotate karo, gravity wapas add karo (aw=Rfb+g\mathbf a_w = R\mathbf f_b + \mathbf g), aur do baar integrate karke velocity aur position paao. Iska naam hai strapdown mechanization. Yaad rakhne ka trick: pehle gyro, phir rotate, phir gravity, phir velocity, phir position.

Lekin ek badi problem hai — drift. Chhoti si gyro bias (jaise 0.01 degree/second) bhi time ke saath tilt error banati hai, aur wo tilt gravity ka ek ramp-jaisa component leak karti hai, jisko do baar integrate karne se position error 16gbgt3\tfrac16 g b_g t^3 ki speed se badhta hai. 60 second me hi ~62 meter ka error! Isiliye real drones, rockets aur phones me IMU akela kaam nahi karta — use GPS ya camera ke saath Kalman filter se fuse kiya jaata hai. IMU short-term me superb hai, long-term me akela bekaar. Yehi core intuition hai.

Go deeper — visual, from zero

Test yourself — Guidance, Navigation & Control (GNC)

Connections