NOTE / 3/12/2021
[SWF] A Practical Summary of IMU Methods
IMUs are central sensors in localization and mapping systems. This article summarizes common ways to use them. The key question is how to relate IMU measurements to a system state. There are two main forms: (1) integration and (2) differentiation. An interesting observation is that iterative IMU preintegration has the same form as direct integration when gravity is set to zero. In practice, one direct-integration implementation can therefore also be used for preintegration by setting gravity to zero.
1. Integration-based methods
This family of methods relates IMU measurements to the state by integrating them.
1.1 IMU ODE
For details, see Sola J., Quaternion Kinematics for the Error-State Kalman Filter, 2017.
1.2 Filtering
In filters such as the EKF, the IMU is normally used for state prediction—for example in IMU+GPS navigation and MSCKF. Integrating (1) predicts the state at time to time :
These equations can use Euler, midpoint, RK4, or other numerical integration. With Euler integration:
This gives the EKF prediction step. For state-transition matrices and Jacobians, see IMU Propagation Derivations.
1.3 Optimization-based methods
IMUs run at much higher frequencies than cameras or LiDAR. Optimization systems such as VIO and LIO typically integrate IMU measurements between two keyframes to form a relation between the states at both ends. There are two common approaches.
1.3.1 Direct integration
Apply (2) directly, propagating from the previous keyframe state to the next one. This forms the constraint:
Its drawback is clear: after every optimization iteration, a changed state requires the integration to be recomputed. Its strength is also clear: recomputing every time can provide higher accuracy. Use this form when accuracy matters more than computation.
1.3.2 Preintegration
Preintegration was introduced by Lupton and later extended to manifolds by Forster. Li Mingyang also discussed the idea in MSCKF 2.0. A key paper is On-Manifold Preintegration for Real-Time Visual—Inertial Odometry.
The issue with (4) is that it cannot be written as a fixed-measurement constraint . When state changes, we do not want to change. The essence of preintegration is finding a state-independent measurement .
Rewriting (2) with frame as the integration reference makes , , and independent of the state—the preintegrated quantities:
The iterative form is:
Comparing (6) with (2) reveals the useful equivalence: with gravitational acceleration in (2) set to zero, the two have exactly the same form. An iterative preintegration implementation can therefore reuse direct-integration code with gravity set to zero.
The equations above assume constant IMU bias, but bias changes during optimization. Apply a first-order correction:
This approximation loses some accuracy relative to direct integration.
Preintegration avoids repeated integration. Because it uses approximations such as (7), its theoretical accuracy is lower than direct integration.
Implementations and papers:
2. Differentiation-based methods
Integrating IMU data produces pose and thereby relates measurements to state. Conversely, differentiating the state gives velocity and angular velocity at first order, and acceleration at second order; this also relates IMU angular velocity and acceleration to the state.
The challenge is differentiating a state that is usually distributed at discrete times. A standard solution is interpolation: given discrete states, interpolate a pose at any time. B-splines are commonly used. At an IMU sample time, an interpolated state is obtained from four neighboring states:

Differentiating with respect to relative time forms acceleration and angular-velocity residuals:
For details, see:
- Continuous-Time Visual-Inertial Odometry for Event Cameras.
- Sommer C, Usenko V, Schubert D, et al. Efficient derivative computation for cumulative B-splines on Lie groups. CVPR 2020.