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.

IMU Prediction

Error state Kalman filter in brief

In error-state filter formulations, we speak of true-, nominal- and error-state values, the true-state being expressed as a suitable composition (linear sum, quaternion product or matrix product) of the nominal- and the error- states. The idea is to consider the nominal-state as large-signal (integrable in non-linear fashion) and the error-state as small signal (thus linearly integrable and suitable for linear-Gaussian filtering).

The error-state filter can be explained as follows. On one side, high-frequency IMU data umu_{m} is integrated into a nominal-state xx. This nominal state does not take into account the noise terms ww and other possible model imperfections. As a consequence, it will accumulate errors. These errors are collected in the error-state δxδx and estimated with the Error-State Kalman Filter (ESKF), this time incorporating all the noise and perturbations. The error-state consists of small-signal magnitudes, and its evolution function is correctly defined by a (time-variant) linear dynamic system, with its dynamic, control and measurement matrices computed from the values of the nominal-state. In parallel with integration of the nominal-state, the ESKF predicts a Gaussian estimate of the error-state. It only predicts, because by now no other measurement is available to correct these estimates. The filter correction is performed at the arrival of information other than IMU (e.g. GPS, vision, etc.), which is able to render the errors observable and which happens generally at a much lower rate than the integration phase. This correction provides a posterior Gaussian estimate of the error-state. After this, the error-state’s mean is injected into the nominal-state, then reset to zero. The error-state’s covariances matrix is conveniently updated to reflect this reset. The system goes on like this forever.

The simplified ESKF goes like this:

  1. Use IMU to propagate mean simply by ignoring noise

  2. Error state equations give you state transition and noise jacobians. These are only needed for covariance propagation. Mean of error state is zero.

  3. Update step updates the covariance using measurement jacobians and the mean error state which is injected into the mean as the next estimate.

Solas Prediction

Note: Sola uses Hamilton convention. Please check the assumptions in Solas paper.

image.png

For continuos system of equations:

True state Kinematics

The true acceleration at\mathbf{a}_t and angular rate ωt\omega_t are obtained from an IMU in the form of noisy sensor readings am\mathbf{a}_m and ωm\omega_m in body frame, namely:

am=Rt(atgt)+abt+an\mathbf{a}_m = \mathbf{R}_t^\top (\mathbf{a}_t - \mathbf{g}_t) + \mathbf{a}_{bt} + \mathbf{a}_n
ωm=ωt+ωbt+ωn\omega_m = \omega_t + \omega_{bt} + \omega_n

with RtR{qt}\mathbf{R}_t \triangleq \mathbf{R}\{\mathbf{q}_t\}. With this, the true values can be isolated (this means that we have inverted the measurement equations),

at=Rt(amabtan)+gt\mathbf{a}_t = \mathbf{R}_t(\mathbf{a}_m - \mathbf{a}_{bt} - \mathbf{a}_n) + \mathbf{g}_t
ωt=ωmωbtωn\omega_t = \omega_m - \omega_{bt} - \omega_n

Substituting above yields the kinematic system

p˙t=vt\dot{\mathbf{p}}_t = \mathbf{v}_t
v˙t=Rt(amabtan)+gt\dot{\mathbf{v}}_t = \mathbf{R}_t(\mathbf{a}_m - \mathbf{a}_{bt} - \mathbf{a}_n) + \mathbf{g}_t
q˙t=12qt(ωmωbtωn)\dot{\mathbf{q}}_t = \frac{1}{2} \mathbf{q}_t \otimes (\omega_m - \omega_{bt} - \omega_n)
a˙bt=aw\dot{\mathbf{a}}_{bt} = \mathbf{a}_w
ω˙bt=ωw\dot{\omega}_{bt} = \omega_w
g˙t=0\dot{\mathbf{g}}_t = 0

which we may name x˙t=ft(xt,u,w)\dot{\mathbf{x}}_t = f_t(\mathbf{x}_t, \mathbf{u}, \mathbf{w}). This system has state xt\mathbf{x}_t, is governed by IMU noisy readings um\mathbf{u}_m, and is perturbed by white Gaussian noise w\mathbf{w}, all defined by

xt=[ptvtqtabtωbtgt]u=[amanωmωn]w=[awωw]\mathbf{x}_t = \begin{bmatrix} \mathbf{p}_t \\ \mathbf{v}_t \\ \mathbf{q}_t \\ \mathbf{a}_{bt} \\ \omega_{bt} \\ \mathbf{g}_t \end{bmatrix} \quad \mathbf{u} = \begin{bmatrix} \mathbf{a}_m - \mathbf{a}_n \\ \omega_m - \omega_n \end{bmatrix} \quad \mathbf{w} = \begin{bmatrix} \mathbf{a}_w \\ \omega_w \end{bmatrix}

Nominal state Kinematics

The nominal-state kinematics corresponds to the modeled system without noises or perturbations,

p˙=v\dot{\mathbf{p}} = \mathbf{v}
v˙=R(amab)+g\dot{\mathbf{v}} = \mathbf{R}(\mathbf{a}_m - \mathbf{a}_b) + \mathbf{g}
q˙=12q(ωmωb)\dot{\mathbf{q}} = \frac{1}{2} \mathbf{q} \otimes (\omega_m - \omega_b)
a˙b=0\dot{\mathbf{a}}_b = 0
ω˙b=0\dot{\omega}_b = 0
g˙=0.\dot{\mathbf{g}} = 0.

Error-state kinematics

The goal is to determine the linearized dynamics of the error-state. For each state equation, we write its composition, linearizing wherever needed, solving for the error state and simplifying all second-order infinitesimals.

δp˙=δv\dot{\delta \mathbf{p}} = \delta \mathbf{v}
δv˙=Ramab×δθRδab+δgRan\dot{\delta \mathbf{v}} = -\mathbf{R} \lfloor \mathbf{a}_m - \mathbf{a}_b \rfloor_\times \delta \theta - \mathbf{R} \delta \mathbf{a}_b + \delta \mathbf{g} - \mathbf{R} \mathbf{a}_n
δθ˙=ωmωb×δθδωbωn\dot{\delta \theta} = -\lfloor \omega_m - \omega_b \rfloor_\times \delta \theta - \delta \omega_b - \omega_n
δa˙b=aw\dot{\delta \mathbf{a}}_b = \mathbf{a}_w
δω˙b=ωw\dot{\delta \omega}_b = \omega_w
δg˙=0.\dot{\delta \mathbf{g}} = 0.

Now we move to discrete case:

True state Kinematics

The above true state kinematics for the continuous case can be converted to true state by converting those equations into difference equations. It should be straightforward.

Nominal state Kinematics

We can write the differences equations of the nominal-state as

pp+vΔt+12(R(amab)+g)Δt2\mathbf{p} \leftarrow \mathbf{p} + \mathbf{v} \Delta t + \frac{1}{2}(\mathbf{R}(\mathbf{a}_m - \mathbf{a}_b) + \mathbf{g}) \Delta t^2
vv+(R(amab)+g)Δt\mathbf{v} \leftarrow \mathbf{v} + (\mathbf{R}(\mathbf{a}_m - \mathbf{a}_b) + \mathbf{g}) \Delta t
qqq{(ωmωb)Δt}\mathbf{q} \leftarrow \mathbf{q} \otimes \mathbf{q} \{ (\omega_m - \omega_b) \Delta t \}
abab\mathbf{a}_b \leftarrow \mathbf{a}_b
ωbωb\omega_b \leftarrow \omega_b
gg,\mathbf{g} \leftarrow \mathbf{g},

where xf(x,)x \leftarrow f(x, \bullet) stands for a time update of the type xk+1=f(xk,k)x_{k+1} = f(x_k, \bullet_k), RR{q}\mathbf{R} \triangleq \mathbf{R}\{\mathbf{q}\} is the rotation matrix associated to the current nominal orientation q\mathbf{q}, and q{v}\mathbf{q}\{v\} is the quaternion associated to the rotation vv.

We can also use more precise integration. Check RK4 methods.

Error-state kinematics

The deterministic part is integrated normally, and the integration of the stochastic part results in random impulses, thus,

δpδp+δvΔt\delta \mathbf{p} \leftarrow \delta \mathbf{p} + \delta \mathbf{v} \Delta t
δvδv+(Ramab×δθRδab+δg)Δt+vi\delta \mathbf{v} \leftarrow \delta \mathbf{v} + (-\mathbf{R} \lfloor \mathbf{a}_m - \mathbf{a}_b \rfloor_\times \delta \theta - \mathbf{R} \delta \mathbf{a}_b + \delta \mathbf{g}) \Delta t + \mathbf{v}_{\mathbf{i}}
δθR{(ωmωb)Δt}δθδωbΔt+θi\delta \theta \leftarrow \mathbf{R}^\top \{ (\omega_m - \omega_b) \Delta t \} \delta \theta - \delta \omega_b \Delta t + \theta_{\mathbf{i}}
δabδab+ai\delta \mathbf{a}_b \leftarrow \delta \mathbf{a}_b + \mathbf{a}_{\mathbf{i}}
δωbδωb+ωi\delta \omega_b \leftarrow \delta \omega_b + \omega_{\mathbf{i}}
δgδg.\delta \mathbf{g} \leftarrow \delta \mathbf{g}.

Here, vi\mathbf{v}_{\mathbf{i}}, θi\theta_{\mathbf{i}}, ai\mathbf{a}_{\mathbf{i}} and ωi\omega_{\mathbf{i}} are the random impulses applied to the velocity, orientation and bias estimates, modeled by white Gaussian processes. Their mean is zero, and their covariances matrices are obtained by integrating the covariances of an,ωn,aw\mathbf{a}_n, \omega_n, \mathbf{a}_w and ωw\omega_w over the step time Δt\Delta t,

Vi=σan2Δt2I[m2/s2]\mathbf{V}_{\mathbf{i}} = \sigma_{\mathbf{a}_n}^2 \Delta t^2 \mathbf{I} \quad [m^2/s^2]
Θi=σωn2Δt2I[rad2]\Theta_{\mathbf{i}} = \sigma_{\omega_n}^2 \Delta t^2 \mathbf{I} \quad [rad^2]
Ai=σaw2ΔtI[m2/s4]\mathbf{A}_{\mathbf{i}} = \sigma_{\mathbf{a}_w}^2 \Delta t \mathbf{I} \quad [m^2/s^4]
Ωi=σωw2ΔtI[rad2/s2]\Omega_{\mathbf{i}} = \sigma_{\omega_w}^2 \Delta t \mathbf{I} \quad [rad^2/s^2]

where σan[m/s2]\sigma_{\mathbf{a}_n} [m/s^2], σωn[rad/s]\sigma_{\omega_n} [rad/s], σaw[m/s2s]\sigma_{\mathbf{a}_w} [m/s^2\sqrt{s}] and σωw[rad/ss]\sigma_{\omega_w} [rad/s\sqrt{s}] are to be determined from the information in the IMU datasheet, or from experimental measurements.

Error-state Jacobian and perturbation matrices

The Jacobians are obtained by simple inspection of the error-state differences equations in the previous section.

To write these equations in compact form, we consider the nominal state vector x\mathbf{x}, the error state vector δx\delta \mathbf{x}, the input vector um\mathbf{u}_m, and the perturbation impulses vector i\mathbf{i}, as follows,

x=[pvqabωbg],δx=[δpδvδθδabδωbδg],um=[amωm],i=[viθiaiωi]\mathbf{x} = \begin{bmatrix} \mathbf{p} \\ \mathbf{v} \\ \mathbf{q} \\ \mathbf{a}_b \\ \omega_b \\ \mathbf{g} \end{bmatrix} , \quad \delta \mathbf{x} = \begin{bmatrix} \delta \mathbf{p} \\ \delta \mathbf{v} \\ \delta \theta \\ \delta \mathbf{a}_b \\ \delta \omega_b \\ \delta \mathbf{g} \end{bmatrix} , \quad \mathbf{u}_m = \begin{bmatrix} \mathbf{a}_m \\ \omega_m \end{bmatrix} , \quad \mathbf{i} = \begin{bmatrix} \mathbf{v}_{\mathbf{i}} \\ \theta_{\mathbf{i}} \\ \mathbf{a}_{\mathbf{i}} \\ \omega_{\mathbf{i}} \end{bmatrix}

The error-state system is now

δxf(x,δx,um,i)=Fx(x,um)δx+Fii,\delta \mathbf{x} \leftarrow f(\mathbf{x}, \delta \mathbf{x}, \mathbf{u}_m, \mathbf{i}) = \mathbf{F}_{\mathbf{x}}(\mathbf{x}, \mathbf{u}_m) \cdot \delta \mathbf{x} + \mathbf{F}_{\mathbf{i}} \cdot \mathbf{i},

The ESKF prediction equations are written:

δx^Fx(x,um)δx^\hat{\delta \mathbf{x}} \leftarrow \mathbf{F}_{\mathbf{x}}(\mathbf{x}, \mathbf{u}_m) \cdot \hat{\delta \mathbf{x}}
PFxPFx+FiQiFi,\mathbf{P} \leftarrow \mathbf{F}_{\mathbf{x}} \mathbf{P} \mathbf{F}_{\mathbf{x}}^\top + \mathbf{F}_{\mathbf{i}} \mathbf{Q}_{\mathbf{i}} \mathbf{F}_{\mathbf{i}}^\top ,

where δxN{δx^,P}25\delta \mathbf{x} \sim \mathcal{N}\{\hat{\delta \mathbf{x}}, \mathbf{P}\}^{25}; Fx\mathbf{F}_{\mathbf{x}} and Fi\mathbf{F}_{\mathbf{i}} are the Jacobians of f()f() with respect to the error and perturbation vectors; and Qi\mathbf{Q}_{\mathbf{i}} is the covariances matrix of the perturbation impulses.

The expressions of the Jacobian and covariances matrices above are detailed below. All state-related values appearing herein are extracted directly from the nominal state.

Fx=fδxx,um=[IIΔt00000IRamab×ΔtRΔt0IΔt00R{(ωmωb)Δt}0IΔt0000I000000I000000I]\mathbf{F}_{\mathbf{x}} = \left. \frac{\partial f}{\partial \delta \mathbf{x}} \right|_{\mathbf{x}, \mathbf{u}_m} = \begin{bmatrix} \mathbf{I} & \mathbf{I} \Delta t & 0 & 0 & 0 & 0 \\ 0 & \mathbf{I} & -\mathbf{R} \lfloor \mathbf{a}_m - \mathbf{a}_b \rfloor_\times \Delta t & -\mathbf{R} \Delta t & 0 & \mathbf{I} \Delta t \\ 0 & 0 & \mathbf{R}^\top \{ (\omega_m - \omega_b) \Delta t \} & 0 & -\mathbf{I} \Delta t & 0 \\ 0 & 0 & 0 & \mathbf{I} & 0 & 0 \\ 0 & 0 & 0 & 0 & \mathbf{I} & 0 \\ 0 & 0 & 0 & 0 & 0 & \mathbf{I} \end{bmatrix}
Fi=fix,um=[0000I0000I0000I0000I0000],Qi=[Vi0000Θi0000Ai0000Ωi].\mathbf{F}_{\mathbf{i}} = \left. \frac{\partial f}{\partial \mathbf{i}} \right|_{\mathbf{x}, \mathbf{u}_m} = \begin{bmatrix} 0 & 0 & 0 & 0 \\ \mathbf{I} & 0 & 0 & 0 \\ 0 & \mathbf{I} & 0 & 0 \\ 0 & 0 & \mathbf{I} & 0 \\ 0 & 0 & 0 & \mathbf{I} \\ 0 & 0 & 0 & 0 \end{bmatrix} \quad , \quad \mathbf{Q}_{\mathbf{i}} = \begin{bmatrix} \mathbf{V}_{\mathbf{i}} & 0 & 0 & 0 \\ 0 & \Theta_{\mathbf{i}} & 0 & 0 \\ 0 & 0 & \mathbf{A}_{\mathbf{i}} & 0 \\ 0 & 0 & 0 & \Omega_{\mathbf{i}} \end{bmatrix} .

Openvins Prediction

Note: Openvins uses JPL convention. Please check the papers for assumptions. Referenes:

As before we start with the continuos case.

True state kinematics

Openvins state is of the form:

xI(t)=[GIqˉ(t)GpI(t)GvI(t)bg(t)ba(t)]\mathbf{x}_I(t) = \begin{bmatrix} {^I_G\bar{q}}(t) \\ {^G\mathbf{p}_I}(t) \\ {^G\mathbf{v}_I}(t) \\ \mathbf{b}_g(t) \\ \mathbf{b}_a(t) \end{bmatrix}

The IMU state evolves over time as follows:

GIqˉ˙(t)=12[Iω(t)×Iω(t)Iω(t)0]GItqˉ{^I_G\dot{\bar{q}}}(t) = \frac{1}{2} \begin{bmatrix} -\lfloor ^I\omega(t) \times \rfloor & ^I\omega(t) \\ -^I\omega(t)^\top & 0 \end{bmatrix} {^{I_t}_G\bar{q}}
12Ω(Iω(t))GItqˉ\triangleq \frac{1}{2} \Omega(^I\omega(t)) {^{I_t}_G\bar{q}}
Gp˙I(t)=GvI(t){^G\dot{\mathbf{p}}_I}(t) = {^G\mathbf{v}_I}(t)
Gv˙I(t)=GItRIa(t){^G\dot{\mathbf{v}}_I}(t) = {^{I_t}_G\mathbf{R}}^\top {^I\mathbf{a}}(t)
b˙g(t)=nwg(t)\dot{\mathbf{b}}_{\mathbf{g}}(t) = \mathbf{n}_{wg}(t)
b˙a(t)=nwa(t)\dot{\mathbf{b}}_{\mathbf{a}}(t) = \mathbf{n}_{wa}(t)

where we have modeled the gyroscope and accelerometer biases as random walk and thus their time derivatives are white Gaussian. Note that the above kinematics have been defined in terms of the true acceleration and angular velocities which can be computed as a function of the sensor measurements and state.

Continuous-time Inertial Integration

Given the continuous-time Iω(t)^I\omega(t) and Ia(t)^I\mathbf{a}(t), in the time interval t[tk,tk+1]t \in [t_k, t_{k+1}], and their estimates, i.e. after taking the expectation, Iω^(t)^I\hat{\omega}(t) and Ia^(t)^I\hat{\mathbf{a}}(t), we can define the solutions to the above IMU kinematics differential equation.

GIk+1R=exp(tktk+1Iω(tτ)dτ)GIkR{^{I_{k+1}}_G\mathbf{R}} = \exp \left( -\int_{t_k}^{t_{k+1}} {}^I\omega(t_\tau) \, d\tau \right) {^{I_k}_G\mathbf{R}}
ΔRkGIkR=IkIk+1RGIkR\triangleq \Delta\mathbf{R}_k {^{I_k}_G\mathbf{R}} = {^{I_{k+1}}_{I_k}\mathbf{R}} {^{I_k}_G\mathbf{R}}
GpIk+1=GpIk+GvIkΔtk+GIkRtktk+1tksIτIkRIa(tτ)dτds12GgΔtk2{^G\mathbf{p}_{I_{k+1}}} = {^G\mathbf{p}_{I_k}} + {^G\mathbf{v}_{I_k}} \Delta t_k + {^{I_k}_G\mathbf{R}}^\top \int_{t_k}^{t_{k+1}} \int_{t_k}^{s} {^{I_k}_{I_\tau}\mathbf{R}} {}^I\mathbf{a}(t_\tau) \, d\tau ds - \frac{1}{2} {}^G\mathbf{g} \Delta t_k^2
GpIk+GvIkΔtk+GIkRΔpk12GgΔtk2\triangleq {^G\mathbf{p}_{I_k}} + {^G\mathbf{v}_{I_k}} \Delta t_k + {^{I_k}_G\mathbf{R}}^\top \Delta \mathbf{p}_k - \frac{1}{2} {}^G\mathbf{g} \Delta t_k^2
GvIk+1=GvIk+GIkRtktk+1IτIkRIa(tτ)dτGgΔtk{^G\mathbf{v}_{I_{k+1}}} = {^G\mathbf{v}_{I_k}} + {^{I_k}_G\mathbf{R}}^\top \int_{t_k}^{t_{k+1}} {^{I_k}_{I_\tau}\mathbf{R}} {}^I\mathbf{a}(t_\tau) \, d\tau - {}^G\mathbf{g} \Delta t_k
GvIk+GIkRΔvkGgΔtk\triangleq {^G\mathbf{v}_{I_k}} + {^{I_k}_G\mathbf{R}}^\top \Delta \mathbf{v}_k - {}^G\mathbf{g} \Delta t_k
bgk+1=bgk+tktk+1nwg(tτ)dτ\mathbf{b}_{g_{k+1}} = \mathbf{b}_{g_k} + \int_{t_k}^{t_{k+1}} \mathbf{n}_{wg}(t_\tau) \, d\tau
bak+1=bak+tktk+1nwa(tτ)dτ\mathbf{b}_{a_{k+1}} = \mathbf{b}_{a_k} + \int_{t_k}^{t_{k+1}} \mathbf{n}_{wa}(t_\tau) \, d\tau

where Δtk=tk+1tk\Delta t_k = t_{k+1} - t_k, IτIkR=exp(tktτIω(tu)du){^{I_k}_{I_\tau}\mathbf{R}} = \exp(\int_{t_k}^{t_\tau} {}^I\omega(t_u) \, du), exp()\exp(\cdot) is the SO(3)SO(3) matrix exponential, and vectors are evaluated at their subscript timesteps (e.g. GvIk=GvI(tk){^G\mathbf{v}_{I_k}} = {^G\mathbf{v}_I}(t_k)). The biases are corrupted by random walk noises nwg\mathbf{n}_{wg} and nwa\mathbf{n}_{wa} that are zero-mean white Gaussians.

ΔRkIkIk+1R=exp(tktk+1Iω(tτ)dτ)\Delta \mathbf{R}_k \triangleq {^{I_{k+1}}_{I_k}\mathbf{R}} = \exp \left( -\int_{t_k}^{t_{k+1}} {}^I\omega(t_\tau) \, d\tau \right)
Δpktktk+1tksIτIkRIa(tτ)dτds\Delta \mathbf{p}_k \triangleq \int_{t_k}^{t_{k+1}} \int_{t_k}^{s} {^{I_k}_{I_\tau}\mathbf{R}} {}^I\mathbf{a}(t_\tau) \, d\tau ds
Δvktktk+1IτIkRIa(tτ)dτ\Delta \mathbf{v}_k \triangleq \int_{t_k}^{t_{k+1}} {^{I_k}_{I_\tau}\mathbf{R}} {}^I\mathbf{a}(t_\tau) \, d\tau

Openvins Discrete Propagation

True state

Assumptions:

  1. Simple IMU model

  2. Hold initial measuement constant over the period including R which in pratice changes since angular velocity is constant over the interval

  3. We model the measurements as discrete-time over the integration period. To do this, the measurements can be assumed to be constant during the sampling period. We employ this assumption and approximate that the measurement at time tkt_k remains the same until we get the next measurement at tk+1t_{k+1}. For the quaternion propagation, it is the same as continuous-time propagation with constant measurement assumption ωm(tk)=ωm,k\omega_m(t_k) = \omega_{m,k} and constant am(tk)=am,k\mathbf{a}_m(t_k) = \mathbf{a}_{m,k} over t[tk,tk+1]t \in [t_k, t_{k+1}]. We use subscript kk to denote it is the measurement we get at time tkt_k. Therefore the propagation of quaternion can be written as:

GpIk+1=GpIk+GvIkΔtk12GgΔtk2+12GIkR(am,kba,kna,k)Δtk2{^G\mathbf{p}_{I_{k+1}}} = {^G\mathbf{p}_{I_k}} + {^G\mathbf{v}_{I_k}} \Delta t_k - \frac{1}{2} {^G\mathbf{g}} \Delta t_k^2 + \frac{1}{2} {^{I_k}_G \mathbf{R}}^\top (\mathbf{a}_{m,k} - \mathbf{b}_{a,k} - \mathbf{n}_{a,k}) \Delta t_k^2
Gvk+1=GvIkGgΔtk+GIkR(am,kba,kna,k)Δtk{^G\mathbf{v}_{k+1}} = {^G\mathbf{v}_{I_k}} - {^G\mathbf{g}} \Delta t_k + {^{I_k}_G \mathbf{R}}^\top (\mathbf{a}_{m,k} - \mathbf{b}_{a,k} - \mathbf{n}_{a,k}) \Delta t_k
GIk+1qˉ^=exp(12Ω(ωm,kbg,kng,k)Δtk)GIkqˉ^{^{I_{k+1}}_G \hat{\bar{q}}} = \exp \left( \frac{1}{2} \Omega(\omega_{m,k} - \mathbf{b}_{g,k} - \mathbf{n}_{g,k}) \Delta t_k \right) {^{I_k}_G \hat{\bar{q}}}
bg,k+1=bg,k+nwg,k\mathbf{b}_{g,k+1} = \mathbf{b}_{g,k} + \mathbf{n}_{wg,k}
ba,k+1=ba,k+nwa,k\mathbf{b}_{a,k+1} = \mathbf{b}_{a,k} + \mathbf{n}_{wa,k}

where Δtk=tk+1tk\Delta t_k = t_{k+1} - t_k.

Note that the noises used here are the discrete ones which need to be converted from their continuous-time versions. In particular, when the covariance matrix of the continuous-time measurement noises is given by Qc\mathbf{Q}_c and nc=[ngcnacnwgcnwac]\mathbf{n}_c = [\mathbf{n}_{g_c} \mathbf{n}_{a_c} \mathbf{n}_{wg_c} \mathbf{n}_{wa_c}]^\top, then the discrete-time noise covariance Qd\mathbf{Q}_d can be computed as (see [Indirect Kalman Filter for 3D Attitude Estimation] Eq. (129) and (130)):

σg=1Δtσwc\sigma_g = \frac{1}{\sqrt{\Delta t}} \sigma_{w_c}
σωg=Δtσωgc\sigma_{\omega g} = \sqrt{\Delta t} \sigma_{\omega g_c}
Qmeas=[1Δtσgc2I303031Δtσac2I3]\mathbf{Q}_{meas} = \begin{bmatrix} \frac{1}{\Delta t} \sigma_{g_c}^2 \mathbf{I}_3 & \mathbf{0}_3 \\ \mathbf{0}_3 & \frac{1}{\Delta t} \sigma_{a_c}^2 \mathbf{I}_3 \end{bmatrix}
Qbias=[Δtσwgc2I30303Δtσwac2I3]\mathbf{Q}_{bias} = \begin{bmatrix} \Delta t \sigma_{wg_c}^2 \mathbf{I}_3 & \mathbf{0}_3 \\ \mathbf{0}_3 & \Delta t \sigma_{wa_c}^2 \mathbf{I}_3 \end{bmatrix}

where n=[ngnanwgnwa]\mathbf{n} = [\mathbf{n}_g \mathbf{n}_a \mathbf{n}_{wg} \mathbf{n}_{wa}]^\top are the discrete IMU sensor noises which have been converted from their continuous representations. We define the stacked discrete measurement noise as follows:

Qd=[Qmeas0303Qbias]\mathbf{Q}_d = \begin{bmatrix} \mathbf{Q}_{meas} & \mathbf{0}_3 \\ \mathbf{0}_3 & \mathbf{Q}_{bias} \end{bmatrix}

Nominal and Error state kinematics

For the error propagation the method of computing Jacobians is to “perturb” each variable in the system and see how the old error “perturbation” relates to the new error state:

GIk+1R=IkIk+1RGIkR{^{I_{k+1}}_G \mathbf{R}} = {^{I_{k+1}}_{I_k}\mathbf{R}} {^{I_k}_G\mathbf{R}}
(I3GIk+1θ~×)GIk+1R^exp(Ikω^ΔtkIkω~Δtk)(I3GIkθ~×)(\mathbf{I}_3 - \lfloor {^{I_{k+1}}_G\tilde{\theta}} \times \rfloor) {^{I_{k+1}}_G\hat{\mathbf{R}}} \approx \exp(-{^{I_k}\hat{\omega}} \Delta t_k - {^{I_k}\tilde{\omega}} \Delta t_k) (\mathbf{I}_3 - \lfloor {^{I_k}_G\tilde{\theta}} \times \rfloor)
=IkIk+1R^(I3Jr(Ikω^Δtk)ω~kΔtk×)(I3GIkθ~×)= {^{I_{k+1}}_{I_k}\hat{\mathbf{R}}} (\mathbf{I}_3 - \lfloor \mathbf{J}_r(-{^{I_k}\hat{\omega}} \Delta t_k) \tilde{\omega}_k \Delta t_k \times \rfloor) (\mathbf{I}_3 - \lfloor {^{I_k}_G\tilde{\theta}} \times \rfloor)
GpIk+1=GpIk+GvIkΔtk12GgΔtk2+12GIkRakΔtk2{^G\mathbf{p}_{I_{k+1}}} = {^G\mathbf{p}_{I_k}} + {^G\mathbf{v}_{I_k}} \Delta t_k - \frac{1}{2} {^G\mathbf{g}} \Delta t_k^2 + \frac{1}{2} {^{I_k}_G\mathbf{R}}^\top \mathbf{a}_k \Delta t_k^2
Gp^Ik+1+Gp~Ik+1Gp^Ik+Gp~Ik+Gv^IkΔtk+Gv~IkΔtk12GgΔtk2+12GIkR^(I3+GIkθ~×)(a^k+a~k)Δtk2{^G\hat{\mathbf{p}}_{I_{k+1}}} + {^G\tilde{\mathbf{p}}_{I_{k+1}}} \approx {^G\hat{\mathbf{p}}_{I_k}} + {^G\tilde{\mathbf{p}}_{I_k}} + {^G\hat{\mathbf{v}}_{I_k}} \Delta t_k + {^G\tilde{\mathbf{v}}_{I_k}} \Delta t_k - \frac{1}{2} {^G\mathbf{g}} \Delta t_k^2 + \frac{1}{2} {^{I_k}_G\hat{\mathbf{R}}^\top} (\mathbf{I}_3 + \lfloor {^{I_k}_G\tilde{\theta}} \times \rfloor)(\hat{\mathbf{a}}_{k} + \tilde{\mathbf{a}}_{k})\Delta t_k^2
Gvk+1=GvIkGgΔtk+GIkRakΔtk{^G\mathbf{v}_{k+1}} = {^G\mathbf{v}_{I_k}} - {^G\mathbf{g}} \Delta t_k + {^{I_k}_G\mathbf{R}}^\top \mathbf{a}_k \Delta t_k
Gv^k+1+Gv~k+1Gv^Ik+Gv~IkGgΔtk+GIkR^(I3+GIkθ~×)(a^k+a~k)Δtk{^G\hat{\mathbf{v}}_{k+1}} + {^G\tilde{\mathbf{v}}_{k+1}} \approx {^G\hat{\mathbf{v}}_{I_k}} + {^G\tilde{\mathbf{v}}_{I_k}} - {^G\mathbf{g}} \Delta t_k + {^{I_k}_G\hat{\mathbf{R}}^\top} (\mathbf{I}_3 + \lfloor {^{I_k}_G\tilde{\theta}} \times \rfloor)(\hat{\mathbf{a}}_{k} + \tilde{\mathbf{a}}_{k})\Delta t_k
bg,k+1=bg,k+nwg\mathbf{b}_{g,k+1} = \mathbf{b}_{g,k} + \mathbf{n}_{wg}
b^g,k+1+b~g,k+1=b^g,k+b~g,k+nwg\hat{\mathbf{b}}_{g,k+1} + \tilde{\mathbf{b}}_{g,k+1} = \hat{\mathbf{b}}_{g,k} + \tilde{\mathbf{b}}_{g,k} + \mathbf{n}_{wg}
ba,k+1=ba,k+nwa\mathbf{b}_{a,k+1} = \mathbf{b}_{a,k} + \mathbf{n}_{wa}
b^a,k+1+b~a,k+1=b^a,k+b~a,k+nwa\hat{\mathbf{b}}_{a,k+1} + \tilde{\mathbf{b}}_{a,k+1} = \hat{\mathbf{b}}_{a,k} + \tilde{\mathbf{b}}_{a,k} + \mathbf{n}_{wa}

where ω~=ωω^=(b~g+ng)\tilde{\omega} = \omega - \hat{\omega} = -(\tilde{\mathbf{b}}_g + \mathbf{n}_g) handles both the perturbation to the bias and measurement noise. Jr(θ)\mathbf{J}_r(\theta) is the right Jacobian of SO(3)SO(3) that maps the variation of rotation angle in the parameter vector space into the variation in the tangent vector space to the manifold. Above we have defined IkIk+1θ^=Ikω^Δtk{^{I_{k+1}}_{I_k}\hat{\theta}} = -{^{I_k}\hat{\omega}} \Delta t_k. a~=aa^=(b~a+na)\tilde{\mathbf{a}} = \mathbf{a} - \hat{\mathbf{a}} = -(\tilde{\mathbf{b}}_a + \mathbf{n}_a).

Gp~Ik+1=Gp~Ik+Gv~IkΔtk12GIkR^a^kΔtk2×GIkθ~12GIkR^Δtk2(b~a,k+na,k){^G\tilde{\mathbf{p}}_{I_{k+1}}} = {^G\tilde{\mathbf{p}}_{I_k}} + {^G\tilde{\mathbf{v}}_{I_k}} \Delta t_k - \frac{1}{2} {^{I_k}_G\hat{\mathbf{R}}^\top} \lfloor \hat{\mathbf{a}}_k \Delta t_k^2 \times \rfloor {^{I_k}_G\tilde{\theta}} - \frac{1}{2} {^{I_k}_G\hat{\mathbf{R}}^\top} \Delta t_k^2 (\tilde{\mathbf{b}}_{a,k} + \mathbf{n}_{a,k})
Gv~k+1=Gv~IkGIkR^a^kΔtk×GIkθ~GIkR^Δtk(b~a,k+na,k){^G\tilde{\mathbf{v}}_{k+1}} = {^G\tilde{\mathbf{v}}_{I_k}} - {^{I_k}_G\hat{\mathbf{R}}^\top} \lfloor \hat{\mathbf{a}}_k \Delta t_k \times \rfloor {^{I_k}_G\tilde{\theta}} - {^{I_k}_G\hat{\mathbf{R}}^\top} \Delta t_k (\tilde{\mathbf{b}}_{a,k} + \mathbf{n}_{a,k})
GIk+1θ~IkIk+1R^GIkθ~IkIk+1R^Jr(IkIk+1θ^)Δtk(b~g,k+ng,k){^{I_{k+1}}_G \tilde{\theta}} \approx {^{I_{k+1}}_{I_k}\hat{\mathbf{R}}} {^{I_k}_G\tilde{\theta}} - {^{I_{k+1}}_{I_k}\hat{\mathbf{R}}} \mathbf{J}_r({^{I_{k+1}}_{I_k}\hat{\theta}}) \Delta t_k (\tilde{\mathbf{b}}_{g,k} + \mathbf{n}_{g,k})
b~g,k+1=b~g,k+nwg\tilde{\mathbf{b}}_{g,k+1} = \tilde{\mathbf{b}}_{g,k} + \mathbf{n}_{wg}
b~a,k+1=b~a,k+nwa\tilde{\mathbf{b}}_{a,k+1} = \tilde{\mathbf{b}}_{a,k} + \mathbf{n}_{wa}

In order to propagate the covariance matrix, we should derive the linearized error-state propagation, i.e., computing the system Jacobian Φ(tk+1,tk)\Phi(t_{k+1}, t_k) and noise Jacobian Gk\mathbf{G}_k.

x~I(tk+1)=Φ(tk+1,tk)x~I(tk)+Gkn\tilde{\mathbf{x}}_I(t_{k+1}) = \Phi(t_{k+1}, t_k)\tilde{\mathbf{x}}_I(t_k) + \mathbf{G}_k \mathbf{n}

By collecting all the perturbation results, we can build Φ(tk+1,tk)\Phi(t_{k+1}, t_k) and Gk\mathbf{G}_k matrices as:

Φ(tk+1,tk)=[IkIk+1R^0303IkIk+1R^Jr(IkIk+1θ^)Δtk0312IGR^a^kΔtk2×I3ΔtkI30312IGR^Δtk2IGR^a^kΔtk×03I303IGR^Δtk030303I30303030303I3]\Phi(t_{k+1}, t_k) = \begin{bmatrix} {^{I_{k+1}}_{I_k}\hat{\mathbf{R}}} & \mathbf{0}_3 & \mathbf{0}_3 & -{^{I_{k+1}}_{I_k}\hat{\mathbf{R}}}\mathbf{J}_r({^{I_{k+1}}_{I_k}\hat{\theta}})\Delta t_k & \mathbf{0}_3 \\ -\frac{1}{2}{^G_I\hat{\mathbf{R}}^\top}\lfloor \hat{\mathbf{a}}_k \Delta t_k^2 \times \rfloor & \mathbf{I}_3 & \Delta t_k \mathbf{I}_3 & \mathbf{0}_3 & -\frac{1}{2}{^G_I\hat{\mathbf{R}}^\top}\Delta t_k^2 \\ -{^G_I\hat{\mathbf{R}}^\top}\lfloor \hat{\mathbf{a}}_k \Delta t_k \times \rfloor & \mathbf{0}_3 & \mathbf{I}_3 & \mathbf{0}_3 & -{^G_I\hat{\mathbf{R}}^\top}\Delta t_k \\ \mathbf{0}_3 & \mathbf{0}_3 & \mathbf{0}_3 & \mathbf{I}_3 & \mathbf{0}_3 \\ \mathbf{0}_3 & \mathbf{0}_3 & \mathbf{0}_3 & \mathbf{0}_3 & \mathbf{I}_3 \end{bmatrix}
Gk=[IkIk+1R^Jr(IkIk+1θ^)Δtk0303030312IGR^Δtk2030303IGR^Δtk03030303I303030303I3]\mathbf{G}_k = \begin{bmatrix} -{^{I_{k+1}}_{I_k}\hat{\mathbf{R}}}\mathbf{J}_r({^{I_{k+1}}_{I_k}\hat{\theta}})\Delta t_k & \mathbf{0}_3 & \mathbf{0}_3 & \mathbf{0}_3 \\ \mathbf{0}_3 & -\frac{1}{2}{^G_I\hat{\mathbf{R}}^\top}\Delta t_k^2 & \mathbf{0}_3 & \mathbf{0}_3 \\ \mathbf{0}_3 & -{^G_I\hat{\mathbf{R}}^\top}\Delta t_k & \mathbf{0}_3 & \mathbf{0}_3 \\ \mathbf{0}_3 & \mathbf{0}_3 & \mathbf{I}_3 & \mathbf{0}_3 \\ \mathbf{0}_3 & \mathbf{0}_3 & \mathbf{0}_3 & \mathbf{I}_3 \end{bmatrix}

Now, with the computed Φ(tk+1,tk)\Phi(t_{k+1}, t_k) and Gk\mathbf{G}_k matrices, we can propagate the covariance from tkt_k to tk+1t_{k+1}:

Pk+1k=Φ(tk+1,tk)PkkΦ(tk+1,tk)+GkQdGk\mathbf{P}_{k+1|k} = \Phi(t_{k+1}, t_k)\mathbf{P}_{k|k}\Phi(t_{k+1}, t_k)^\top + \mathbf{G}_k \mathbf{Q}_d \mathbf{G}_k^\top

Openvins Analytical Propagation

State and IMU Intrinsics Model

First we can re-write our IMU measurement models to find the the true (or corrected) angular velocity Iω(t)^I\boldsymbol{\omega}(t) and linear acceleration Ia(t)^I\mathbf{a}(t). This is how we will relate incoming measurements to IMU dynamics.

Iω(t)=wIRDw(wωm(t)TgIa(t)bg(t)ng(t))^I\boldsymbol{\omega}(t) = {}^I_w\mathbf{R}\mathbf{D}_w \left( {}^w\boldsymbol{\omega}_m(t) - \mathbf{T}_g {}^I\mathbf{a}(t) - \mathbf{b}_g(t) - \mathbf{n}_g(t) \right)
Ia(t)=aIRDa(aam(t)ba(t)na(t))^I\mathbf{a}(t) = {}^I_a\mathbf{R}\mathbf{D}_a \left( {}^a\mathbf{a}_m(t) - \mathbf{b}_a(t) - \mathbf{n}_a(t) \right)

where Dw=Tw1\mathbf{D}_w = \mathbf{T}_w^{-1} and Da=Ta1\mathbf{D}_a = \mathbf{T}_a^{-1}. Note that here we have factored out the GIR(t)Gg-{}^I_G\mathbf{R}(t){}^G\mathbf{g} gravity term. In practice, we calibrate Da\mathbf{D}_a, Dw\mathbf{D}_w, aIR{}^I_a\mathbf{R} (or wIR{}^I_w\mathbf{R}) and Tg\mathbf{T}_g to prevent unneeded matrix inversions and transposes in the measurement equation. We only calibrate either wIR{}^I_w\mathbf{R} or aIR{}^I_a\mathbf{R} since the base “inertial” frame must coincide with one frame arbitrarily. If both wIR{}^I_w\mathbf{R} and aIR{}^I_a\mathbf{R} are calibrated, it will make the rotation between the IMU and camera unobservable due to over parameterization.

KALIBR Contains Dw6\mathbf{D}_{w6}, Da6\mathbf{D}_{a6}, wIR{}^I_w\mathbf{R} and gravity sensitivity Tg9\mathbf{T}_{g9}. It is important to note that one should use the KALIBR model if there is a non-negligible transformation between the gyroscope and accelerometer (it is negligible for most MEMS IMUs) since it assumes the accelerometer frame to be the inertial frame and rigid bodies share the same angular velocity at all points. We can define the following matrices:

D6=[d100d2d40d3d5d6],Tg9=[tg1tg4tg7tg2tg5tg8tg3tg6tg9]\quad \mathbf{D}_{*6} = \begin{bmatrix} d_{*1} & 0 & 0 \\ d_{*2} & d_{*4} & 0 \\ d_{*3} & d_{*5} & d_{*6} \end{bmatrix}, \quad \mathbf{T}_{g9} = \begin{bmatrix} t_{g1} & t_{g4} & t_{g7} \\ t_{g2} & t_{g5} & t_{g8} \\ t_{g3} & t_{g6} & t_{g9} \end{bmatrix}

The state vector contains the IMU state and its intrinsics:

xI=[xnxbxin]=[GIqˉGpIGvIbgbaxin]\begin{aligned} \mathbf{x}_I &= \left[ \mathbf{x}_n^\top \quad | \quad \mathbf{x}_b^\top \quad | \quad \mathbf{x}_{in}^\top \right]^\top \\ &= \left[ {}^I_G\bar{q}^\top \quad {}^G\mathbf{p}_I^\top \quad {}^G\mathbf{v}_I^\top \quad | \quad \mathbf{b}_g^\top \quad \mathbf{b}_a^\top \quad | \quad \mathbf{x}_{in}^\top \right]^\top \end{aligned}
xin=[xDwxDawIqˉaIqˉxTg]\mathbf{x}_{in} = \left[ \mathbf{x}_{Dw}^\top \quad \mathbf{x}_{Da}^\top \quad {}^I_w\bar{q}^\top \quad {}^I_a\bar{q}^\top \quad \mathbf{x}_{Tg}^\top \right]^\top

where GIqˉ{}^I_G\bar{q} denotes the rotation matrix GIR{}^I_G\mathbf{R} from {G}\{G\} to {I}\{I\}. GpI{}^G\mathbf{p}_I and GvI{}^G\mathbf{v}_I denote the IMU position and velocity in {G}\{G\}. xn\mathbf{x}_n denotes the IMU navigation states and xb\mathbf{x}_b denotes the IMU biases. The IMU intrinsics, xin\mathbf{x}_{in}, contain the non-zero elements stored column-wise:

xD=[d1d2d3d4d5d6]\mathbf{x}_{D*} = \begin{bmatrix} d_{*1} & d_{*2} & d_{*3} & d_{*4} & d_{*5} & d_{*6} \end{bmatrix}^\top
xTg=[tg1tg2tg3tg4tg5tg6tg7tg8tg9]\mathbf{x}_{Tg} = \begin{bmatrix} t_{g1} & t_{g2} & t_{g3} & t_{g4} & t_{g5} & t_{g6} & t_{g7} & t_{g8} & t_{g9} \end{bmatrix}^\top

True state Kinematics

First we redefine the continuous-time integration equations mentioned in the Continuous-time Inertial Integration section. They are summarized as follows:

GIk+1RΔRkGIkR{}^{I_{k+1}}_G\mathbf{R} \triangleq \Delta\mathbf{R}_k {}^{I_k}_G\mathbf{R}
GpIk+1GpIk+GvIkΔtk+GIkRΔpk12GgΔtk2{}^G\mathbf{p}_{I_{k+1}} \triangleq {}^G\mathbf{p}_{I_k} + {}^G\mathbf{v}_{I_k}\Delta t_k + {}_G^{I_k}\mathbf{R}^\top \Delta\mathbf{p}_k - \frac{1}{2}{}^G\mathbf{g}\Delta t_k^2
GvIk+1GvIk+GIkRΔvkGgΔtk{}^G\mathbf{v}_{I_{k+1}} \triangleq {}^G\mathbf{v}_{I_k} + {}_G^{I_k}\mathbf{R}^\top \Delta \mathbf{v}_k - {}^G\mathbf{g}\Delta t_k
bgk+1=bgk+tktk+1nwg(tτ)dτ\mathbf{b}_{g_{k+1}} = \mathbf{b}_{g_k} + \int_{t_k}^{t_{k+1}} \mathbf{n}_{wg}(t_\tau) \, d\tau
bak+1=bak+tktk+1nwa(tτ)dτ\mathbf{b}_{a_{k+1}} = \mathbf{b}_{a_k} + \int_{t_k}^{t_{k+1}} \mathbf{n}_{wa}(t_\tau) \, d\tau

where Δtk=tk+1tk\Delta t_k = t_{k+1} - t_k, IτIR=exp(tktτIω(tu)du){}^I_{I_\tau}\mathbf{R} = \exp(\int_{t_k}^{t_\tau} {}^I\boldsymbol{\omega}(t_u) \, du), exp()\exp(\cdot) is the SO(3)SO(3) matrix exponential [8], and vectors are evaluated at their subscript timesteps (e.g. GvIk=GvI(tk){}^G\mathbf{v}_{I_k} = {}^G\mathbf{v}_I(t_k)). We have the following integration components:

ΔRk=IkIk+1R=exp(tktk+1Iω(tτ)dτ)\Delta\mathbf{R}_k = {}^{I_{k+1}}_{I_k}\mathbf{R} = \exp\left( -\int_{t_k}^{t_{k+1}} {}^I\boldsymbol{\omega}(t_\tau) \, d\tau \right)
Δpk=tktk+1tksIτIkRIa(tτ)dτdsΞ2Ika^\Delta\mathbf{p}_k = \int_{t_k}^{t_{k+1}} \int_{t_k}^{s} {}^{I_k}_{I_\tau}\mathbf{R} {}^I\mathbf{a}(t_\tau) \, d\tau ds \triangleq \boldsymbol{\Xi}_2 \cdot {}^{I_k}\hat{\mathbf{a}}
Δvk=tktk+1IτIkRIa(tτ)dτΞ1Ika^\Delta\mathbf{v}_k = \int_{t_k}^{t_{k+1}} {}^{I_k}_{I_\tau}\mathbf{R} {}^I\mathbf{a}(t_\tau) \, d\tau \triangleq \boldsymbol{\Xi}_1 \cdot {}^{I_k}\hat{\mathbf{a}}

where we define the following integrations:

Ξ1tktk+1exp(Iτω^δτ)dτ\boldsymbol{\Xi}_1 \triangleq \int_{t_k}^{t_{k+1}} \exp\left( {}^{I_\tau}\hat{\boldsymbol{\omega}}\delta\tau \right) \, d\tau
Ξ2tktk+1tksexp(Iτω^δτ)dτds\boldsymbol{\Xi}_2 \triangleq \int_{t_k}^{t_{k+1}} \int_{t_k}^{s} \exp\left( {}^{I_\tau}\hat{\boldsymbol{\omega}}\delta\tau \right) \, d\tau ds

where δτ=tτtk\delta\tau = t_\tau - t_k and the Ξ1\boldsymbol{\Xi}_1 and Ξ2\boldsymbol{\Xi}_2 integration components can be evaluated either analytically or numerically using RK4.

Derivations of Nominal and Error state kinematics

Ikω^{}^{I_k}\hat{\boldsymbol{\omega}} and Ika^{}^{I_k}\hat{\mathbf{a}} are defined as (dropping the timestamp):

Iω^=wIR^D^wwω^{}^I\hat{\boldsymbol{\omega}} = {}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w {}^w\hat{\boldsymbol{\omega}}
wω^=wωmT^gIa^b^g=[wω^1wω^2wω^3]{}^w\hat{\boldsymbol{\omega}} = {}^w\boldsymbol{\omega}_m - \hat{\mathbf{T}}_g {}^I\hat{\mathbf{a}} - \hat{\mathbf{b}}_g = \begin{bmatrix} {}^w\hat{\omega}_1 & {}^w\hat{\omega}_2 & {}^w\hat{\omega}_3 \end{bmatrix}^\top
Ia^=aIR^D^aaa^{}^I\hat{\mathbf{a}} = {}^I_a\hat{\mathbf{R}}\hat{\mathbf{D}}_a {}^a\hat{\mathbf{a}}
aa^=aamb^a=[aa^1aa^2aa^3]{}^a\hat{\mathbf{a}} = {}^a\mathbf{a}_m - \hat{\mathbf{b}}_a = \begin{bmatrix} {}^a\hat{a}_1 & {}^a\hat{a}_2 & {}^a\hat{a}_3 \end{bmatrix}^\top

We first define the Ikω~{}^{I_k}\tilde{\boldsymbol{\omega}} and Ika~{}^{I_k}\tilde{\mathbf{a}} error states. For Ia{}^I\mathbf{a} and Ia~{}^I\tilde{\mathbf{a}}, we have:

Ia=Ia^+Ia~aIR^D^a(aamb^a)+aIR^HDax~Da+aIR^D^a(aamb^a)δθIaaIR^D^ab~aaIR^D^ana\begin{aligned} {}^I\mathbf{a} &= {}^I\hat{\mathbf{a}} + {}^I\tilde{\mathbf{a}} \\ &\simeq {}^I_a\hat{\mathbf{R}}\hat{\mathbf{D}}_a \left( {}^a\mathbf{a}_m - \hat{\mathbf{b}}_a \right) + {}^I_a\hat{\mathbf{R}}\mathbf{H}_{Da}\tilde{\mathbf{x}}_{Da} \\ &+ \lfloor {}^I_a\hat{\mathbf{R}}\hat{\mathbf{D}}_a \left( {}^a\mathbf{a}_m - \hat{\mathbf{b}}_a \right) \rfloor \delta\boldsymbol{\theta}_{Ia} - {}^I_a\hat{\mathbf{R}}\hat{\mathbf{D}}_a\tilde{\mathbf{b}}_a - {}^I_a\hat{\mathbf{R}}\hat{\mathbf{D}}_a\mathbf{n}_a \end{aligned}
Ia^=aIR^D^a(aamb^a){}^I\hat{\mathbf{a}} = {}^I_a\hat{\mathbf{R}}\hat{\mathbf{D}}_a \left( {}^a\mathbf{a}_m - \hat{\mathbf{b}}_a \right)
Ia~aIR^HDax~Da+Ia^δθIaaIR^D^ab~aaIR^D^ana{}^I\tilde{\mathbf{a}} \simeq {}^I_a\hat{\mathbf{R}}\mathbf{H}_{Da}\tilde{\mathbf{x}}_{Da} + \lfloor {}^I\hat{\mathbf{a}} \rfloor \delta\boldsymbol{\theta}_{Ia} - {}^I_a\hat{\mathbf{R}}\hat{\mathbf{D}}_a\tilde{\mathbf{b}}_a - {}^I_a\hat{\mathbf{R}}\hat{\mathbf{D}}_a\mathbf{n}_a

For Iω{}^I\boldsymbol{\omega} and Iω~{}^I\tilde{\boldsymbol{\omega}}, we have:

Iω=Iω^+Iω~wIR^D^w(wωmT^gIa^b^g)+wIR^D^w(wωmT^gIa^b^g)δθIw+wIR^HDwx~DwwIR^D^w(T^gIa~+HTgx~Tg)wIR^D^w(b~g+ng)\begin{aligned} {}^I\boldsymbol{\omega} &= {}^I\hat{\boldsymbol{\omega}} + {}^I\tilde{\boldsymbol{\omega}} \\ &\simeq {}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w \left( {}^w\boldsymbol{\omega}_m - \hat{\mathbf{T}}_g {}^I\hat{\mathbf{a}} - \hat{\mathbf{b}}_g \right) + \lfloor {}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w \left( {}^w\boldsymbol{\omega}_m - \hat{\mathbf{T}}_g {}^I\hat{\mathbf{a}} - \hat{\mathbf{b}}_g \right) \rfloor \delta\boldsymbol{\theta}_{Iw} \\ &+ {}^I_w\hat{\mathbf{R}}\mathbf{H}_{Dw}\tilde{\mathbf{x}}_{Dw} - {}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w \left( \hat{\mathbf{T}}_g {}^I\tilde{\mathbf{a}} + \mathbf{H}_{Tg}\tilde{\mathbf{x}}_{Tg} \right) - {}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w \left( \tilde{\mathbf{b}}_g + \mathbf{n}_g \right) \end{aligned}
Iω^=wIR^D^w(wωmT^gIa^b^g){}^I\hat{\boldsymbol{\omega}} = {}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w \left( {}^w\boldsymbol{\omega}_m - \hat{\mathbf{T}}_g {}^I\hat{\mathbf{a}} - \hat{\mathbf{b}}_g \right)
Iω~wIR^D^wb~g+wIR^D^wT^gaIR^D^ab~a+wIR^HDwx~DwwIR^D^wT^gaIR^HDax~Da+Iω^δθIwwIR^D^wT^gIa^δθIawIR^D^wHTgx~TgwIR^D^wng+wIR^D^wT^gaIR^D^ana\begin{aligned} {}^I\tilde{\boldsymbol{\omega}} &\simeq -{}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w\tilde{\mathbf{b}}_g + {}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w \hat{\mathbf{T}}_g {}^I_a\hat{\mathbf{R}}\hat{\mathbf{D}}_a\tilde{\mathbf{b}}_a + {}^I_w\hat{\mathbf{R}}\mathbf{H}_{Dw}\tilde{\mathbf{x}}_{Dw} \\ &- {}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w \hat{\mathbf{T}}_g {}^I_a\hat{\mathbf{R}}\mathbf{H}_{Da}\tilde{\mathbf{x}}_{Da} + \lfloor {}^I\hat{\boldsymbol{\omega}} \rfloor \delta\boldsymbol{\theta}_{Iw} - {}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w \hat{\mathbf{T}}_g \lfloor {}^I\hat{\mathbf{a}} \rfloor \delta\boldsymbol{\theta}_{Ia} \\ &- {}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w \mathbf{H}_{Tg}\tilde{\mathbf{x}}_{Tg} - {}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w\mathbf{n}_g + {}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w \hat{\mathbf{T}}_g {}^I_a\hat{\mathbf{R}}\hat{\mathbf{D}}_a\mathbf{n}_a \end{aligned}

where we need to define HDw\mathbf{H}_{Dw}, HDa\mathbf{H}_{Da} and HTg\mathbf{H}_{Tg}. For the KALIBR model, we

HDw=[ww^1I3ww^2e2ww^2e3ww^3e3]HDa=[aa^1I3aa^2e2aa^2e3aa^3e3]HTg=[Ia^1I3Ia^2I3Ia^3I3]\begin{aligned} \mathbf{H}_{Dw} &= \begin{bmatrix} {}^w\hat{w}_1\mathbf{I}_3 & {}^w\hat{w}_2\mathbf{e}_2 & {}^w\hat{w}_2\mathbf{e}_3 & {}^w\hat{w}_3\mathbf{e}_3 \end{bmatrix} \\ \mathbf{H}_{Da} &= \begin{bmatrix} {}^a\hat{a}_1\mathbf{I}_3 & {}^a\hat{a}_2\mathbf{e}_2 & {}^a\hat{a}_2\mathbf{e}_3 & {}^a\hat{a}_3\mathbf{e}_3 \end{bmatrix} \\ \mathbf{H}_{Tg} &= \begin{bmatrix} {}^I\hat{a}_1\mathbf{I}_3 & {}^I\hat{a}_2\mathbf{I}_3 & {}^I\hat{a}_3\mathbf{I}_3 \end{bmatrix} \end{aligned}

Check below for detailed derivation:

image.png image-2.png

By summarizing the above equations, we have:

[Ikω~Ika~]=[HbHin][x~bx~in]+Hn[ndgnda]\begin{bmatrix} {}^{I_k}\tilde{\boldsymbol{\omega}} \\ {}^{I_k}\tilde{\mathbf{a}} \end{bmatrix} = \begin{bmatrix} \mathbf{H}_b & \mathbf{H}_{in} \end{bmatrix} \begin{bmatrix} \tilde{\mathbf{x}}_b \\ \tilde{\mathbf{x}}_{in} \end{bmatrix} + \mathbf{H}_n \begin{bmatrix} \mathbf{n}_{dg} \\ \mathbf{n}_{da} \end{bmatrix}

where we have defined:

Hb=Hn=[wIR^D^wwIR^D^wT^gaIR^D^a03aIR^D^a]\mathbf{H}_b = \mathbf{H}_n = \begin{bmatrix} -{}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w & {}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w \hat{\mathbf{T}}_g {}^I_a\hat{\mathbf{R}}\hat{\mathbf{D}}_a \\ \mathbf{0}_3 & -{}^I_a\hat{\mathbf{R}}\hat{\mathbf{D}}_a \end{bmatrix}
Hin=[HwHaHIwHIaHg]\mathbf{H}_{in} = \begin{bmatrix} \mathbf{H}_w & \mathbf{H}_a & \mathbf{H}_{Iw} & \mathbf{H}_{Ia} & \mathbf{H}_g \end{bmatrix}
Hw=[Ikω~Ika~]xDw=[wIR^HDw03]\mathbf{H}_w = \frac{\partial [{}^{I_k}\tilde{\boldsymbol{\omega}} \,\, {}^{I_k}\tilde{\mathbf{a}}]}{\partial \mathbf{x}_{Dw}} = \begin{bmatrix} {}^I_w\hat{\mathbf{R}}\mathbf{H}_{Dw} \\ \mathbf{0}_3 \end{bmatrix}
Ha=[Ikω~Ika~]xDa=[wIR^D^wT^gaIR^HDaaIR^HDa]\mathbf{H}_a = \frac{\partial [{}^{I_k}\tilde{\boldsymbol{\omega}} \,\, {}^{I_k}\tilde{\mathbf{a}}]}{\partial \mathbf{x}_{Da}} = \begin{bmatrix} -{}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w \hat{\mathbf{T}}_g {}^I_a\hat{\mathbf{R}}\mathbf{H}_{Da} \\ {}^I_a\hat{\mathbf{R}}\mathbf{H}_{Da} \end{bmatrix}
HIw=[Ikω~Ika~]wIδθ=[Iω^03]\mathbf{H}_{Iw} = \frac{\partial [{}^{I_k}\tilde{\boldsymbol{\omega}} \,\, {}^{I_k}\tilde{\mathbf{a}}]}{\partial {}^I_w\delta\boldsymbol{\theta}} = \begin{bmatrix} \lfloor {}^I\hat{\boldsymbol{\omega}} \rfloor \\ \mathbf{0}_3 \end{bmatrix}
HIa=[Ikω~Ika~]aIδθ=[aIR^D^wT^gIa^Ia^]\mathbf{H}_{Ia} = \frac{\partial [{}^{I_k}\tilde{\boldsymbol{\omega}} \,\, {}^{I_k}\tilde{\mathbf{a}}]}{\partial {}^I_a\delta\boldsymbol{\theta}} = \begin{bmatrix} -{}^I_a\hat{\mathbf{R}}\hat{\mathbf{D}}_w \hat{\mathbf{T}}_g \lfloor {}^I\hat{\mathbf{a}} \rfloor \\ \lfloor {}^I\hat{\mathbf{a}} \rfloor \end{bmatrix}
Hg=[Ikω~Ika~]xTg=[wIR^D^wHTg03]\mathbf{H}_g = \frac{\partial [{}^{I_k}\tilde{\boldsymbol{\omega}} \,\, {}^{I_k}\tilde{\mathbf{a}}]}{\partial \mathbf{x}_{Tg}} = \begin{bmatrix} -{}^I_w\hat{\mathbf{R}}\hat{\mathbf{D}}_w \mathbf{H}_{Tg} \\ \mathbf{0}_3 \end{bmatrix}

We then linearize ΔRk,Δpk\Delta\mathbf{R}_k, \Delta\mathbf{p}_k and Δvk\Delta\mathbf{v}_k. For the ΔRk\Delta\mathbf{R}_k, we can get:

ΔRk=exp(IkωΔtk)=exp((Ikω^+Ikω~)Δtk)exp(Ikω^Δtk)exp(Jr(Ikω^Δtk)Ikω~Δtk)exp(ΔR^kJr(Ikω^Δtk)Ikω~Δtk)ΔR~kexp(Ikω^Δtk)\begin{aligned} \Delta\mathbf{R}_k &= \exp(-{}^{I_k}\boldsymbol{\omega}\Delta t_k) \\ &= \exp(-({}^{I_k}\hat{\boldsymbol{\omega}} + {}^{I_k}\tilde{\boldsymbol{\omega}})\Delta t_k) \\ &\simeq \exp(-{}^{I_k}\hat{\boldsymbol{\omega}}\Delta t_k) \cdot \exp(-\mathbf{J}_r(-{}^{I_k}\hat{\boldsymbol{\omega}}\Delta t_k){}^{I_k}\tilde{\boldsymbol{\omega}}\Delta t_k) \\ &\simeq \underbrace{\exp(-\Delta\hat{\mathbf{R}}_k \mathbf{J}_r(-{}^{I_k}\hat{\boldsymbol{\omega}}\Delta t_k){}^{I_k}\tilde{\boldsymbol{\omega}}\Delta t_k)}_{\Delta\tilde{\mathbf{R}}_k} \exp(-{}^{I_k}\hat{\boldsymbol{\omega}}\Delta t_k) \end{aligned}

For the integration of Δpk\Delta\mathbf{p}_k, we get:

Δpk=tktk+1tksexp(Ikωδτ)dτdsIka=tktk+1tksexp((Ikω^+Ikω~)δτ)dτds(Ika^+Ika~)tktk+1tksexp(Ikω^δτ)exp(Jr(Ikω^δτ)Ikω~δτ)dτds(Ika^+Ika~)tktk+1tksexp(Ikω^δτ)(I+Jr(Ikω^δτ)Ikω~δτ)dτds(Ika^+Ika~)\begin{aligned} \Delta\mathbf{p}_k &= \int_{t_k}^{t_{k+1}} \int_{t_k}^{s} \exp({}^{I_k}\boldsymbol{\omega}\delta\tau) d\tau ds \cdot {}^{I_k}\mathbf{a} \\ &= \int_{t_k}^{t_{k+1}} \int_{t_k}^{s} \exp(({}^{I_k}\hat{\boldsymbol{\omega}} + {}^{I_k}\tilde{\boldsymbol{\omega}})\delta\tau) d\tau ds \cdot ({}^{I_k}\hat{\mathbf{a}} + {}^{I_k}\tilde{\mathbf{a}}) \\ &\simeq \int_{t_k}^{t_{k+1}} \int_{t_k}^{s} \exp({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau) \exp(\mathbf{J}_r({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau){}^{I_k}\tilde{\boldsymbol{\omega}}\delta\tau) d\tau ds \cdot ({}^{I_k}\hat{\mathbf{a}} + {}^{I_k}\tilde{\mathbf{a}}) \\ &\simeq \int_{t_k}^{t_{k+1}} \int_{t_k}^{s} \exp({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau) (\mathbf{I} + \lfloor \mathbf{J}_r({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau){}^{I_k}\tilde{\boldsymbol{\omega}}\delta\tau \rfloor ) d\tau ds \cdot ({}^{I_k}\hat{\mathbf{a}} + {}^{I_k}\tilde{\mathbf{a}}) \end{aligned}
tktk+1tksexp(Ikω^δτ)dτdsΞ2Ika^tktk+1tksexp(Ikω^δτ)Ika^Jr(Ikω^δτ)dτdsΞ4Ikω~+tktk+1tksexp(Ikω^δτ)dτdsΞ2Ika~\begin{aligned} &\simeq \underbrace{\int_{t_k}^{t_{k+1}} \int_{t_k}^{s} \exp({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau) d\tau ds}_{\boldsymbol{\Xi}_2} \cdot {}^{I_k}\hat{\mathbf{a}} \\ &- \underbrace{\int_{t_k}^{t_{k+1}} \int_{t_k}^{s} \exp({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau) \lfloor {}^{I_k}\hat{\mathbf{a}} \rfloor \mathbf{J}_r({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau) d\tau ds}_{\boldsymbol{\Xi}_4} \cdot {}^{I_k}\tilde{\boldsymbol{\omega}} \\ &+ \underbrace{\int_{t_k}^{t_{k+1}} \int_{t_k}^{s} \exp({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau) d\tau ds}_{\boldsymbol{\Xi}_2} \cdot {}^{I_k}\tilde{\mathbf{a}} \end{aligned}
=Δp^kΞ4Ikω~+Ξ2Ika~Δp~k= \Delta\hat{\mathbf{p}}_k \underbrace{- \boldsymbol{\Xi}_4 {}^{I_k}\tilde{\boldsymbol{\omega}} + \boldsymbol{\Xi}_2 {}^{I_k}\tilde{\mathbf{a}}}_{\Delta\tilde{\mathbf{p}}_k}
=Δp^k+Δp~k= \Delta\hat{\mathbf{p}}_k + \Delta\tilde{\mathbf{p}}_k

For the integration of Δvk\Delta \mathbf{v}_k, we get:

Δvk=tktk+1exp(Ikωδτ)dτIka=tktk+1exp((Ikω^+Ikω~)δτ)dτ(Ika^+Ika~)tktk+1exp(Ikω^δτ)exp(Jr(Ikω^δτ)Ikω~δτ)dτ(Ika^+Ika~)tktk+1exp(Ikω^δτ)(I+Jr(Ikω^δτ)Ikω~δτ)dτ(Ika^+Ika~)tktk+1exp(Ikω^δτ)dτΞ1Ika^tktk+1exp(Ikω^δτ)Ika^Jr(Ikω^δτ)dτΞ3Ikω~+tktk+1exp(Ikω^δτ)dτΞ1Ika~\begin{aligned} \Delta \mathbf{v}_k &= \int_{t_k}^{t_{k+1}} \exp({}^{I_k}\boldsymbol{\omega}\delta\tau) d\tau \cdot {}^{I_k}\mathbf{a} \\ &= \int_{t_k}^{t_{k+1}} \exp(({}^{I_k}\hat{\boldsymbol{\omega}} + {}^{I_k}\tilde{\boldsymbol{\omega}})\delta\tau) d\tau \cdot ({}^{I_k}\hat{\mathbf{a}} + {}^{I_k}\tilde{\mathbf{a}}) \\ &\simeq \int_{t_k}^{t_{k+1}} \exp({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau) \exp(\mathbf{J}_r({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau){}^{I_k}\tilde{\boldsymbol{\omega}}\delta\tau) d\tau \cdot ({}^{I_k}\hat{\mathbf{a}} + {}^{I_k}\tilde{\mathbf{a}}) \\ &\simeq \int_{t_k}^{t_{k+1}} \exp({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau) (\mathbf{I} + \lfloor \mathbf{J}_r({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau){}^{I_k}\tilde{\boldsymbol{\omega}}\delta\tau \rfloor ) d\tau \cdot ({}^{I_k}\hat{\mathbf{a}} + {}^{I_k}\tilde{\mathbf{a}}) \\ &\simeq \underbrace{\int_{t_k}^{t_{k+1}} \exp({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau) d\tau}_{\boldsymbol{\Xi}_1} \cdot {}^{I_k}\hat{\mathbf{a}} \\ &- \underbrace{\int_{t_k}^{t_{k+1}} \exp({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau) \lfloor {}^{I_k}\hat{\mathbf{a}} \rfloor \mathbf{J}_r({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau) d\tau}_{\boldsymbol{\Xi}_3} \cdot {}^{I_k}\tilde{\boldsymbol{\omega}} \\ &+ \underbrace{\int_{t_k}^{t_{k+1}} \exp({}^{I_k}\hat{\boldsymbol{\omega}}\delta\tau) d\tau}_{\boldsymbol{\Xi}_1} \cdot {}^{I_k}\tilde{\mathbf{a}} \end{aligned}
=Δv^kΞ3Ikω~+Ξ1Ika~Δv~k= \Delta \hat{\mathbf{v}}_k \underbrace{- \boldsymbol{\Xi}_3 {}^{I_k}\tilde{\boldsymbol{\omega}} + \boldsymbol{\Xi}_1 {}^{I_k}\tilde{\mathbf{a}}}_{\Delta \tilde{\mathbf{v}}_k}
=Δv^k+Δv~k= \Delta \hat{\mathbf{v}}_k + \Delta \tilde{\mathbf{v}}_k

where δτ=tτtk\delta\tau = t_\tau - t_k and Ξi,i=14\boldsymbol{\Xi}_i, i = 1 \dots 4 are shown in the Integration Component Definitions section. Jr(Ikω^Δtk)\mathbf{J}_r(-{}^{I_k}\hat{\boldsymbol{\omega}}\Delta t_k) is the right Jacobian of SO(3)SO(3). In summary, we have the following linearized integration components (see Integration Component Definitions):

ΔRk=ΔR~kΔR^kexp(ΔR^kJr(Δθk)Ikω~Δtk)ΔR^k\Delta\mathbf{R}_k = \Delta\tilde{\mathbf{R}}_k\Delta\hat{\mathbf{R}}_k \triangleq \exp\left(-\Delta\hat{\mathbf{R}}_k\mathbf{J}_r(\Delta\boldsymbol{\theta}_k){}^{I_k}\tilde{\boldsymbol{\omega}}\Delta t_k\right) \Delta\hat{\mathbf{R}}_k
Δpk=Δp^k+Δp~kΔp^kΞ4Ikω~+Ξ2Ika~\Delta\mathbf{p}_k = \Delta\hat{\mathbf{p}}_k + \Delta\tilde{\mathbf{p}}_k \triangleq \Delta\hat{\mathbf{p}}_k - \boldsymbol{\Xi}_4 {}^{I_k}\tilde{\boldsymbol{\omega}} + \boldsymbol{\Xi}_2 {}^{I_k}\tilde{\mathbf{a}}
Δvk=Δv^k+Δv~kΔv^kΞ3Ikω~+Ξ1Ika~\Delta\mathbf{v}_k = \Delta\hat{\mathbf{v}}_k + \Delta\tilde{\mathbf{v}}_k \triangleq \Delta\hat{\mathbf{v}}_k - \boldsymbol{\Xi}_3 {}^{I_k}\tilde{\boldsymbol{\omega}} + \boldsymbol{\Xi}_1 {}^{I_k}\tilde{\mathbf{a}}

where Jr(Δθk)Jr(Ikω^kΔtk)\mathbf{J}_r(\Delta\boldsymbol{\theta}_k) \triangleq \mathbf{J}_r(-{}^{I_k}\hat{\boldsymbol{\omega}}_k\Delta t_k) and Ξ3\boldsymbol{\Xi}_3 and Ξ4\boldsymbol{\Xi}_4 are defined as:

Ξ3=tktk+1IτIkRIτaJr(Ikω^kδτ)δτdτ\boldsymbol{\Xi}_3 = \int_{t_k}^{t_{k+1}} {}^{I_k}_{I_\tau}\mathbf{R} \lfloor {}^{I_\tau}\mathbf{a} \rfloor \mathbf{J}_r({}^{I_k}\hat{\boldsymbol{\omega}}_k \delta\tau) \delta\tau \, d\tau
Ξ4=tktk+1tksIτIkRIτaJr(Ikω^kδτ)δτdτds\boldsymbol{\Xi}_4 = \int_{t_k}^{t_{k+1}} \int_{t_k}^{s} {}^{I_k}_{I_\tau}\mathbf{R} \lfloor {}^{I_\tau}\mathbf{a} \rfloor \mathbf{J}_r({}^{I_k}\hat{\boldsymbol{\omega}}_k \delta\tau) \delta\tau \, d\tau ds

Nominal state Kinematics

Under the assumption of constant Ikω^{}^{I_k}\hat{\boldsymbol{\omega}} and Ika^{}^{I_k}\hat{\mathbf{a}}, the above equations are also constant over the time interval. The mean propagation for the new state at tk+1t_{k+1} can be written after taking the expectation:

GIk+1R^ΔRkGIkR^{}^{I_{k+1}}_G\hat{\mathbf{R}} \simeq \Delta\mathbf{R}_k {}^{I_k}_G\hat{\mathbf{R}}
Gp^Ik+1Gp^Ik+Gv^IkΔtk+GIkR^Ξ2Ika^12GgΔtk2{}^G\hat{\mathbf{p}}_{I_{k+1}} \simeq {}^G\hat{\mathbf{p}}_{I_k} + {}^G\hat{\mathbf{v}}_{I_k}\Delta t_k + {}_G^{I_k}\hat{\mathbf{R}}^\top \boldsymbol{\Xi}_2 {}^{I_k}\hat{\mathbf{a}} - \frac{1}{2}{}^G\mathbf{g}\Delta t_k^2
Gv^Ik+1Gv^Ik+GIkR^Ξ1Ika^GgΔtk{}^G\hat{\mathbf{v}}_{I_{k+1}} \simeq {}^G\hat{\mathbf{v}}_{I_k} + {}_G^{I_k}\hat{\mathbf{R}}^\top \boldsymbol{\Xi}_1 {}^{I_k}\hat{\mathbf{a}} - {}^G\mathbf{g}\Delta t_k
b^gk+1=b^gk\hat{\mathbf{b}}_{g_{k+1}} = \hat{\mathbf{b}}_{g_k}
b^ak+1=b^ak\hat{\mathbf{b}}_{a_{k+1}} = \hat{\mathbf{b}}_{a_k}

Error state Kinematics

Hence, the linearized IMU system is:

δθk+1ΔR^kδθk+ΔR^kJr(Δθk)ΔtkIkω~\delta\boldsymbol{\theta}_{k+1} \simeq \Delta\hat{\mathbf{R}}_k \delta\boldsymbol{\theta}_k + \Delta\hat{\mathbf{R}}_k \mathbf{J}_r(\Delta\boldsymbol{\theta}_k) \Delta t_k {}^{I_k}\tilde{\boldsymbol{\omega}}
Gp~Ik+1Gp~Ik+Gv~IkΔtkGIR^Δp^kδθk+GIR^(Ξ4Ikω~+Ξ2Ika~){}^G\tilde{\mathbf{p}}_{I_{k+1}} \simeq {}^G\tilde{\mathbf{p}}_{I_k} + {}^G\tilde{\mathbf{v}}_{I_k}\Delta t_k - {}^I_G\hat{\mathbf{R}}^\top \lfloor \Delta\hat{\mathbf{p}}_k \rfloor \delta\boldsymbol{\theta}_k + {}^I_G\hat{\mathbf{R}}^\top \left( -\boldsymbol{\Xi}_4 {}^{I_k}\tilde{\boldsymbol{\omega}} + \boldsymbol{\Xi}_2 {}^{I_k}\tilde{\mathbf{a}} \right)
Gv~Ik+1Gv~IkGIR^Δv^kδθk+GIR^(Ξ3Ikω~+Ξ1Ika~){}^G\tilde{\mathbf{v}}_{I_{k+1}} \simeq {}^G\tilde{\mathbf{v}}_{I_k} - {}^I_G\hat{\mathbf{R}}^\top \lfloor \Delta\hat{\mathbf{v}}_k \rfloor \delta\boldsymbol{\theta}_k + {}^I_G\hat{\mathbf{R}}^\top \left( -\boldsymbol{\Xi}_3 {}^{I_k}\tilde{\boldsymbol{\omega}} + \boldsymbol{\Xi}_1 {}^{I_k}\tilde{\mathbf{a}} \right)

The overall linearized error state system is:

x~Ik+1ΦI(k+1,k)x~Ik+GIkndk\tilde{\mathbf{x}}_{I_{k+1}} \simeq \boldsymbol{\Phi}_{I(k+1,k)}\tilde{\mathbf{x}}_{I_k} + \mathbf{G}_{Ik}\mathbf{n}_{dk}
ΦI(k+1,k)=[ΦnnΦwaHbΦwaHin06×9I606×24024×9024×6I24]\boldsymbol{\Phi}_{I(k+1,k)} = \begin{bmatrix} \boldsymbol{\Phi}_{nn} & \boldsymbol{\Phi}_{wa}\mathbf{H}_b & \boldsymbol{\Phi}_{wa}\mathbf{H}_{in} \\ \mathbf{0}_{6 \times 9} & \mathbf{I}_6 & \mathbf{0}_{6 \times 24} \\ \mathbf{0}_{24 \times 9} & \mathbf{0}_{24 \times 6} & \mathbf{I}_{24} \end{bmatrix}
GIk=[ΦwaHn09×606I6Δtk024×6024×6]\mathbf{G}_{Ik} = \begin{bmatrix} \boldsymbol{\Phi}_{wa}\mathbf{H}_n & \mathbf{0}_{9 \times 6} \\ \mathbf{0}_6 & \mathbf{I}_6 \Delta t_k \\ \mathbf{0}_{24 \times 6} & \mathbf{0}_{24 \times 6} \end{bmatrix}

where ΦI(k+1,k)\boldsymbol{\Phi}_{I(k+1,k)} and GIk\mathbf{G}_{Ik} are the state transition matrix and noise Jacobians for IMU dynamic model; Hb\mathbf{H}_b, Hin\mathbf{H}_{in} and Hn\mathbf{H}_n are Jacobians related to bias, IMU intrinsics and noises, which can be found from previous derivations; ndk=[ndgndandwgndwa]\mathbf{n}_{dk} = [\mathbf{n}_{dg}^\top \,\, \mathbf{n}_{da}^\top \,\, \mathbf{n}_{dwg}^\top \,\, \mathbf{n}_{dwa}^\top]^\top is the discrete-time IMU noises; Φnn\boldsymbol{\Phi}_{nn} and Φwa\boldsymbol{\Phi}_{wa} can be computed as:

Φnn=[ΔR^k0303GIR^Δp^kI3I3ΔtkGIR^Δv^k03I3]\boldsymbol{\Phi}_{nn} = \begin{bmatrix} \Delta\hat{\mathbf{R}}_k & \mathbf{0}_3 & \mathbf{0}_3 \\ -{}^I_G\hat{\mathbf{R}}^\top \lfloor \Delta\hat{\mathbf{p}}_k \rfloor & \mathbf{I}_3 & \mathbf{I}_3 \Delta t_k \\ -{}^I_G\hat{\mathbf{R}}^\top \lfloor \Delta\hat{\mathbf{v}}_k \rfloor & \mathbf{0}_3 & \mathbf{I}_3 \end{bmatrix}
Φwa=[ΔR^kJr(Δθk)Δtk03GIR^Ξ4GIR^Ξ2GIR^Ξ3GIR^Ξ1]\boldsymbol{\Phi}_{wa} = \begin{bmatrix} \Delta\hat{\mathbf{R}}_k \mathbf{J}_r(\Delta\boldsymbol{\theta}_k)\Delta t_k & \mathbf{0}_3 \\ -{}^I_G\hat{\mathbf{R}}^\top \boldsymbol{\Xi}_4 & {}^I_G\hat{\mathbf{R}}^\top \boldsymbol{\Xi}_2 \\ -{}^I_G\hat{\mathbf{R}}^\top \boldsymbol{\Xi}_3 & {}^I_G\hat{\mathbf{R}}^\top \boldsymbol{\Xi}_1 \end{bmatrix}

Note that ndN(0,σ2I3Δtk)\mathbf{n}_{d*} \sim \mathcal{N}(\mathbf{0}, \frac{\sigma_*^2 \mathbf{I}_3}{\Delta t_k}) and hence the covariance for ndI\mathbf{n}_{dI} can be written as:

QdI=[σg2ΔtkI303030303σa2ΔtkI303030303σwg2ΔtkI303030303σwa2ΔtkI3]\mathbf{Q}_{dI} = \begin{bmatrix} \frac{\sigma_g^2}{\Delta t_k}\mathbf{I}_3 & \mathbf{0}_3 & \mathbf{0}_3 & \mathbf{0}_3 \\ \mathbf{0}_3 & \frac{\sigma_a^2}{\Delta t_k}\mathbf{I}_3 & \mathbf{0}_3 & \mathbf{0}_3 \\ \mathbf{0}_3 & \mathbf{0}_3 & \sigma_{wg}^2\Delta t_k \mathbf{I}_3 & \mathbf{0}_3 \\ \mathbf{0}_3 & \mathbf{0}_3 & \mathbf{0}_3 & \sigma_{wa}^2\Delta t_k \mathbf{I}_3 \end{bmatrix}

Finally, the covariance propagation can be derived as:

Pk+1=ΦI(k+1,k)PkΦI(k+1,k)+GIkQdIGIk\mathbf{P}_{k+1} = \boldsymbol{\Phi}_{I(k+1,k)} \mathbf{P}_k \boldsymbol{\Phi}_{I(k+1,k)}^\top + \mathbf{G}_{Ik} \mathbf{Q}_{dI} \mathbf{G}_{Ik}^\top

Integration Component Definitions

When deriving the components, we drop the subscripts for simplicity. As we define angular velocity ω^=Iω^\hat{\omega} = || {}^I\hat{\boldsymbol{\omega}} ||, rotation axis k=Iω^/Iω^\mathbf{k} = {}^I\hat{\boldsymbol{\omega}} / || {}^I\hat{\boldsymbol{\omega}} ||, and the small interval we are integrating over as δt\delta t. The first integration we need is:

Ξ1=I3δt+1cos(ω^δt)ω^k^+(δtsin(ω^δt)ω^)k^2\boldsymbol{\Xi}_1 = \mathbf{I}_3 \delta t + \frac{1 - \cos(\hat{\omega} \delta t)}{\hat{\omega}} \lfloor \hat{\mathbf{k}} \rfloor + \left( \delta t - \frac{\sin(\hat{\omega} \delta t)}{\hat{\omega}} \right) \lfloor \hat{\mathbf{k}} \rfloor^2

The second integration we need is:

Ξ2=12δt2I3+ω^δtsin(ω^δt)ω^2k^+(12δt21cos(ω^δt)ω^2)k^2\boldsymbol{\Xi}_2 = \frac{1}{2} \delta t^2 \mathbf{I}_3 + \frac{\hat{\omega} \delta t - \sin(\hat{\omega} \delta t)}{\hat{\omega}^2} \lfloor \hat{\mathbf{k}} \rfloor + \left( \frac{1}{2} \delta t^2 - \frac{1 - \cos(\hat{\omega} \delta t)}{\hat{\omega}^2} \right) \lfloor \hat{\mathbf{k}} \rfloor^2

The third integration can be written as:

Ξ3=12δt2a^+sin(ω^δti)ω^δtω^2a^k^+sin(ω^δt)ω^δtcos(ω^δt)ω^2k^a^+(12δt21cos(ω^δt)ω^2)a^k^2+(12δt2+1cos(ω^δt)ω^δtsin(ω^δt)ω^2)k^2a^+(12δt2+1cos(ω^δt)ω^δtsin(ω^δt)ω^2)k^a^k^3sin(ω^δt)2ω^δtω^δtcos(ω^δt)ω^2k^a^k^2\begin{aligned} \boldsymbol{\Xi}_3 &= \frac{1}{2} \delta t^2 \lfloor \hat{\mathbf{a}} \rfloor + \frac{\sin(\hat{\omega} \delta t_i) - \hat{\omega} \delta t}{\hat{\omega}^2} \lfloor \hat{\mathbf{a}} \rfloor \lfloor \hat{\mathbf{k}} \rfloor \\ &+ \frac{\sin(\hat{\omega} \delta t) - \hat{\omega} \delta t \cos(\hat{\omega} \delta t)}{\hat{\omega}^2} \lfloor \hat{\mathbf{k}} \rfloor \lfloor \hat{\mathbf{a}} \rfloor \\ &+ \left( \frac{1}{2} \delta t^2 - \frac{1 - \cos(\hat{\omega} \delta t)}{\hat{\omega}^2} \right) \lfloor \hat{\mathbf{a}} \rfloor \lfloor \hat{\mathbf{k}} \rfloor^2 \\ &+ \left( \frac{1}{2} \delta t^2 + \frac{1 - \cos(\hat{\omega} \delta t) - \hat{\omega} \delta t \sin(\hat{\omega} \delta t)}{\hat{\omega}^2} \right) \lfloor \hat{\mathbf{k}} \rfloor^2 \lfloor \hat{\mathbf{a}} \rfloor \\ &+ \left( \frac{1}{2} \delta t^2 + \frac{1 - \cos(\hat{\omega} \delta t) - \hat{\omega} \delta t \sin(\hat{\omega} \delta t)}{\hat{\omega}^2} \right) \hat{\mathbf{k}}^\top \hat{\mathbf{a}} \lfloor \hat{\mathbf{k}} \rfloor \\ &- \frac{3 \sin(\hat{\omega} \delta t) - 2 \hat{\omega} \delta t - \hat{\omega} \delta t \cos(\hat{\omega} \delta t)}{\hat{\omega}^2} \hat{\mathbf{k}}^\top \hat{\mathbf{a}} \lfloor \hat{\mathbf{k}} \rfloor^2 \end{aligned}

The fourth integration we need is:

Ξ4=16δt3a^+2(1cos(ω^δt))(ω^2δt2)2ω^3a^k^+(2(1cos(ω^δt))ω^δtsin(ω^δt)ω^3)k^a^+(sin(ω^δt)ω^δtω^3+δt36)a^k^2+ω^δt2sin(ω^δt)+16(ω^δt)3+ω^δtcos(ω^δt)ω^3k^2a^+ω^δt2sin(ω^δt)+16(ω^δt)3+ω^δtcos(ω^δt)ω^3k^a^k^+4cos(ω^δt)4+(ω^δt)2+ω^δtsin(ω^δt)ω^3k^a^k^2\begin{aligned} \boldsymbol{\Xi}_4 &= \frac{1}{6} \delta t^3 \lfloor \hat{\mathbf{a}} \rfloor + \frac{2(1 - \cos(\hat{\omega} \delta t)) - (\hat{\omega}^2 \delta t^2)}{2 \hat{\omega}^3} \lfloor \hat{\mathbf{a}} \rfloor \lfloor \hat{\mathbf{k}} \rfloor \\ &+ \left( \frac{2(1 - \cos(\hat{\omega} \delta t)) - \hat{\omega} \delta t \sin(\hat{\omega} \delta t)}{\hat{\omega}^3} \right) \lfloor \hat{\mathbf{k}} \rfloor \lfloor \hat{\mathbf{a}} \rfloor \\ &+ \left( \frac{\sin(\hat{\omega} \delta t) - \hat{\omega} \delta t}{\hat{\omega}^3} + \frac{\delta t^3}{6} \right) \lfloor \hat{\mathbf{a}} \rfloor \lfloor \hat{\mathbf{k}} \rfloor^2 \\ &+ \frac{\hat{\omega} \delta t - 2 \sin(\hat{\omega} \delta t) + \frac{1}{6}(\hat{\omega} \delta t)^3 + \hat{\omega} \delta t \cos(\hat{\omega} \delta t)}{\hat{\omega}^3} \lfloor \hat{\mathbf{k}} \rfloor^2 \lfloor \hat{\mathbf{a}} \rfloor \\ &+ \frac{\hat{\omega} \delta t - 2 \sin(\hat{\omega} \delta t) + \frac{1}{6}(\hat{\omega} \delta t)^3 + \hat{\omega} \delta t \cos(\hat{\omega} \delta t)}{\hat{\omega}^3} \hat{\mathbf{k}}^\top \hat{\mathbf{a}} \lfloor \hat{\mathbf{k}} \rfloor \\ &+ \frac{4 \cos(\hat{\omega} \delta t) - 4 + (\hat{\omega} \delta t)^2 + \hat{\omega} \delta t \sin(\hat{\omega} \delta t)}{\hat{\omega}^3} \hat{\mathbf{k}}^\top \hat{\mathbf{a}} \lfloor \hat{\mathbf{k}} \rfloor^2 \end{aligned}

Difference between Discrete and Analytical Propagation

Sensor model assumed

The discrete page explicitly says it uses a simplified discrete inertial model which does not include IMU intrinsic parameters. Its propagation uses only raw gyro/accel measurements plus bias and white noise. The analytical page instead assumes the full corrected IMU model with scale/misalignment matrices, sensor-frame rotations R, and gravity sensitivity , and it even includes those intrinsic parameters in the state.

What is assumed constant over [tk,tk+1]

In the discrete derivation, the assumption is: the measurement sample at tk is held constant until tk+1. So it uses ωm,k and am,k directly as zero-order-held inputs. In the analytical derivation, the assumption is that the corrected quantities I_a, I_w are constant over the interval, after applying the intrinsic model and bias correction.

How translation is treated during rotation

This is the most important practical difference. In the discrete derivation, position and velocity are updated such that translational acceleration is effectively applied through the start-of-interval orientation. In the analytical derivation, the rotation changes during the interval inside the integrals terms. So the analytical derivation keeps the effect of within-step rotation on v and p, while the discrete one uses the simpler zeroth-order approximation.

How errors/noise are modeled

In the discrete derivation, the perturbations are simple depending on bias and noises. In analytical case the noise depends on intrinsics parameters as well.

Derivation viewpoint

The discrete page derives the covariance propagation by perturbing an already discretized one-step update. The analytical page starts from the continuous-time kinematics, linearizes the corrected IMU readings, and only then integrates them into a discrete transition. So the difference is also “discretize first, then linearize” versus “linearize continuous corrected dynamics, then integrate.”