IMU preintegration
An IMU produces measurements at 100–1000 Hz, while cameras deliver keyframes at 10–30 Hz. A naive VIO formulation would insert every IMU reading into the estimator, exploding the number of state variables. Worse, naive integration is done in the world frame: the integrated result depends on the absolute pose at the start of the interval, so every time the optimizer adjusts that pose, all raw IMU data would need to be re-integrated.
Preintegration (introduced by Lupton and Sukkarieh, 2012) solves both problems. IMU measurements between two keyframe times and are integrated in the local frame of keyframe , producing a compact relative-motion summary:
— a relative rotation, velocity change, and position change. Crucially, these quantities depend only on the IMU measurements and the bias estimates, not on the absolute poses. They are computed once, stored, and act as a single “IMU factor” connecting the states at and in the factor graph. When the optimizer moves the poses, nothing needs re-integration.
The math
Starting from the measurement model , , the preintegrated terms accumulate over the IMU samples in :
Note that gravity does not appear here — it re-enters only in the residual below, where absolute orientation is available. In pseudo-code, the accumulation is a simple loop run once per keyframe interval:
ΔR, Δv, Δp ← I, 0, 0
for each IMU sample (ω̃, ã, δt) in [i, j):
Δp ← Δp + Δv·δt + ½·ΔR·(ã − bᵃ)·δt²
Δv ← Δv + ΔR·(ã − bᵃ)·δt
ΔR ← ΔR · Exp((ω̃ − bᵍ)·δt)
(propagate covariance and bias Jacobians alongside)
The IMU residual
The resulting factor compares the predicted relative motion (from the current pose/velocity/bias estimates and gravity) against the stored preintegrated measurement, exactly parallel to how a reprojection residual compares a predicted and observed pixel:
weighted by the covariance propagated during the accumulation loop (which is where the IMU noise model parameters enter).
Two refinements that make it practical
- Bias correction via Jacobians. The preintegrated terms were computed with a particular bias estimate . When the optimizer updates the bias by , a first-order correction using stored Jacobians updates the factor without touching raw data: and analogously for with and terms. Only if the bias moves far from the linearization point must the interval be re-integrated.
- On-manifold formulation (Forster et al., 2015). Rotations live on the Lie group , not in a vector space. Forster’s formulation performs the integration and its noise propagation properly on the manifold, yielding correct covariances and analytic Jacobians. This is the version implemented in GTSAM, VINS-Mono, ORB-SLAM3, Kimera-VIO, and OKVIS2.
Common pitfalls
- Forgetting the bias linearization limit. The first-order bias correction is only valid near the stored linearization point; after large bias updates (e.g., during initialization) the preintegrated terms should be recomputed.
- Gravity sign/frame conventions. Whether points up or down, and whether the accelerometer model subtracts or adds it, differs across papers and codebases — mismatches produce a estimator that diverges immediately.
- Timestamp jitter and dropped samples. The accumulation assumes accurate per-sample ; naive use of nominal rates instead of measured timestamps injects unmodeled error.
- Ignoring the covariance propagation. The preintegrated measurement is only as useful as its weight; skipping proper noise propagation (or using ad hoc constant covariances) mis-balances IMU vs visual terms.
Why it matters for SLAM
Preintegration is the single idea that made optimization-based VIO real-time: it compresses hundreds of high-rate measurements into one factor per keyframe pair while remaining exactly re-linearizable. Every modern tightly-coupled VIO system builds on it, and understanding how is formed and bias-corrected is the fastest route to understanding any VIO codebase.
Related
- IMU Preintegration on Manifold — the Forster 2015 paper note.
- IMU noise model — the bias and noise terms that enter the integration.
- Lie groups — the math behind the on-manifold formulation.
- Factor graph — where the preintegrated IMU factor lives.
- VINS-Mono — a complete system built around preintegrated IMU factors.