Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Galilean IMU preintegration: Logmap NEES and bias correction

This notebook compares GTSAM’s Manifold, Tangent, Lie-group, and Galilean IMU preintegration backends under identical measurements and noise samples. Every statistical experiment uses the IMU factor’s default SE2(3)SE_2(3) Logmap residual,

e=Xj.logmap⁡(X^j),e=X_j.\operatorname{logmap}(\widehat X_j),

so the comparison isolates preintegration means and covariances rather than changing the residual chart. The final experiment tests the right-applied first-order bias correction used by the paper’s direct-product Galilean model, alongside the corresponding correction for every other backend, directly against complete reintegration.

Here Galilean denotes the companion paper’s Gal(3)×R6\mathrm{Gal}(3)\times\mathbb R^6 construction. It retains Delama et al.'s held-input Galilean composition and uses Brossard et al.'s endpoint and rotating-frame structure, but its physical bias model, left-invariant covariance, and right correction are the paper’s direct-product formulation.

The visible cells contain assumptions, scenario parameters, experiment calls, and conclusions. Mechanical Monte Carlo and plotting code lives in galilean_imu_factor_nees.py; plot cells are collapsed but expandable.

Open In Colab

1. Reading the experiments

For residual e∈Rde\in\mathbb R^d and predicted covariance PP,

NEES⁡=eTP−1e.\operatorname{NEES}=e^\mathsf{T}P^{-1}e.

A consistent model has expected NEES dd. The reported green bands are exact 95% intervals for the sampled mean. Physical endpoint errors are reported separately because changing coordinates cannot repair deterministic integration error.

2. One-second inertial stress test

The three established backends use the same piecewise update for this trajectory and converge as the timestep shrinks. Galilean composition evaluates each held-input increment with the coupled exponential.

Source
Loading...
Loading...
Loading...
Expected 95% interval for mean NEES: [8.849, 9.152]
Source
Loading...

The Logmap residual does not hide finite-rate integration error. Under deliberately stressful 20 Hz simultaneous rotation and acceleration, the established backends remain overconfident; Galilean preintegration removes most of the held-input mean error.

3. Powered ascent in a rotating Earth frame

The next benchmark models four seconds of a high-power sounding-rocket ascent: constant 12 g measured specific force, a modest pitch rate, and Earth rotation at a representative launch-site latitude. Every backend is evaluated with omegaCoriolis both omitted and correctly specified.

For θ=−ωET\theta=-\omega_E T, the independent truth calculation uses A=Exp⁡(θ)A=\operatorname{Exp}(\theta), Gv=JL(θ)G^v=J_L(\theta), and Gp=JL(θ)−Γ2(θ)G^p=J_L(\theta)-\Gamma_2(\theta). Position and velocity blocks are translated from the paper to GTSAM’s (R,p,v) order.

Exact endpoint: altitude 861.0 m, speed 431.1 m/s, pitch -9.2 deg
Loading...
Loading...
Expected 95% interval for mean NEES: [8.849, 9.152]
Source
Loading...

Supplying Earth rate improves every backend. The remaining gap between Galilean and the established methods is the held-input integration model, not the Logmap residual.

4. Long-horizon uncertainty with fixed nonzero bias

This ten-second experiment centers every backend on its own noise-free discrete mean. It therefore isolates accumulated sensor uncertainty while retaining a fixed, nonzero accelerometer and gyroscope bias.

Loading...
Expected 95% interval for mean NEES: [8.815, 9.187]
Source
Loading...

All four Logmap results should remain close to the theoretical mean. This experiment concerns the uncertainty representation; it does not yet perturb the optimizer’s bias away from the preintegration bias.

5. Full 15D uncertainty with bias random walk

Loading...
Expected 95% interval for mean NEES: [14.761, 15.241]
Source
Loading...

The 15D residual retains the sampled bias path and the state-bias cross-covariance. The navigation block is always the SE2(3)SE_2(3) Logmap; the final six rows are the bias random-walk residual.

6. Right-applied first-order bias correction

The paper defines the Galilean correction at a changed preintegration bias by one right update,

Υ^ij(b^+δb)≃Υ^ij(b^)Exp⁡(Jbδb).\widehat\Upsilon_{ij}(\hat b+\delta b) \simeq \widehat\Upsilon_{ij}(\hat b)\operatorname{Exp}(J_b\delta b).

This is the same perturbation side as the direct-product state’s standard left-invariant error, with the sensitivity recursion Jk+1=Ad⁡Vk−1Jk−CkJ_{k+1}=\operatorname{Ad}_{V_k^{-1}}J_k-C_k. For each random update below, every backend’s first-order prediction is compared with complete reintegration of the same noise-free measurements. The linearization bias is nonzero, and ∥δba∥=30∥δbω∥\lVert\delta b_a\rVert=30\lVert\delta b_\omega\rVert, following the bias-update scaling used by Brossard et al. Errors use only reintegratedState.logmap(correctedState).

Loading...
Source
Loading...

Manifold, Lie-group, and Galilean show nearly identical attitude-correction error here, while Tangent’s tangent-space update differs. The position and velocity curves expose whether a backend applies the complete group exponential correction or separately adds component derivatives. Near zero, all first-order approximation errors scale quadratically with bias-update magnitude.

7. Conclusions

  • Residual: use the default SE2(3)SE_2(3) Logmap for IMU factors.

  • Bias correction: Galilean preintegration uses the companion paper’s direct-product right correction; Lie-group preintegration uses the analogous complete right-applied SE2(3)SE_2(3) update in GTSAM’s (R,p,v) convention.

  • Rotating frames: supply omegaCoriolis; omitting known Earth rate creates deterministic error for every backend.

  • Backend: Galilean preintegration is most useful when simultaneous rotation and acceleration, lower rates, or longer held-input intervals make coupled integration accuracy important.

Legacy and ComponentWise remain API compatibility choices, but they are not active notebook experiment modes.