NOTE / 12/12/2021

[SINS] Strapdown Inertial Navigation Update Algorithm

SLAMTechnical NotesSLAMVIOsensor fusion

I recently learned some material about high-accuracy strapdown inertial navigation and summarize it here. I am still new to this area, so corrections are welcome.

This article implements a north-oriented strapdown INS update algorithm. Given initial position, attitude, and velocity, it integrates IMU measurements to obtain real-time position and attitude. The main references are Gongmin Yan’s Strapdown Inertial Navigation Algorithms and Integrated Navigation Principles and the PSINS toolbox.

1. Algorithm

1.1 Attitude update

The attitude differential equation is

C˙bn=Cbn(ωnbb×).\dot{\mathbf C}^n_b=\mathbf C^n_b(\boldsymbol\omega^b_{nb}\times).

Updating attitude directly with this equation is complicated. Decompose the rotation matrix into a product of two matrices:

Cb(m)n(m)=Cin(m)Cb(m)i.\mathbf C^{n(m)}_{b(m)} =\mathbf C^{n(m)}_i\mathbf C^i_{b(m)}.

The two factors on the right can be updated separately:

Cb(m)i=Cb(m−1)iCb(m)b(m−1),Cin(m)=Cn(m−1)n(m)Cin(m−1).\mathbf C^i_{b(m)} =\mathbf C^i_{b(m-1)}\mathbf C^{b(m-1)}_{b(m)}, \qquad \mathbf C^{n(m)}_i =\mathbf C^{n(m)}_{n(m-1)}\mathbf C^{n(m-1)}_i.

Together, this yields the practical attitude-update form:

Cb(m)n(m)=Cn(m−1)n(m)Cb(m−1)n(m−1)Cb(m)b(m−1).\mathbf C^{n(m)}_{b(m)} =\mathbf C^{n(m)}_{n(m-1)} \mathbf C^{n(m-1)}_{b(m-1)} \mathbf C^{b(m-1)}_{b(m)}.

The left factor represents change in the local navigation frame caused by velocity and Earth rotation. Both change slowly, so Euler integration is sufficient:

Cn(m−1)n(m)=Cn(m)n(m−1)=MT(ϕinn)≈MT(ωin(m)nΔT),\mathbf C^{n(m)}_{n(m-1)} =\mathbf C^{n(m-1)}_{n(m)} =\mathbf M^\mathsf T(\boldsymbol\phi^n_{in}) \approx\mathbf M^\mathsf T(\boldsymbol\omega^n_{in(m)}\Delta T), ϕinn=ωien+ωenn,ωien=[0ωiecos⁡Lωiesin⁡L],\boldsymbol\phi^n_{in}=\boldsymbol\omega^n_{ie}+\boldsymbol\omega^n_{en}, \qquad \boldsymbol\omega^n_{ie}= \begin{bmatrix}0\\\omega_{ie}\cos L\\\omega_{ie}\sin L\end{bmatrix}, ωenn=[−vNRM+hvERN+hvERN+htan⁡L].\boldsymbol\omega^n_{en}= \begin{bmatrix} -\frac{v_N}{R_M+h}\\ \frac{v_E}{R_N+h}\\ \frac{v_E}{R_N+h}\tan L \end{bmatrix}.

The right factor changes quickly and needs a higher-accuracy integration method. Here a two-sample algorithm is used:

Cb(m)b(m−1)=M(ϕib(m)b),\mathbf C^{b(m-1)}_{b(m)}=\mathbf M(\boldsymbol\phi^b_{ib(m)}), ϕib(m)b=(Δθm1+Δθm2)+23Δθm1×Δθm2.\boldsymbol\phi^b_{ib(m)} =(\Delta\boldsymbol\theta_{m1}+\Delta\boldsymbol\theta_{m2}) +\frac{2}{3}\Delta\boldsymbol\theta_{m1}\times\Delta\boldsymbol\theta_{m2}.

1.2 Velocity update

The specific-force equation is

v˙enn=Cbnfsfb−(2ωien+ωenn)×venn+gn.\dot{\mathbf v}^n_{en} =\mathbf C^n_b\mathbf f^b_{sf} -(2\boldsymbol\omega^n_{ie}+\boldsymbol\omega^n_{en})\times\mathbf v^n_{en} +\mathbf g^n.

Integrating it gives

vmn(m)=vm−1n(m−1)+Δvsf(m)n+Δvcor/g(m)n.\mathbf v^{n(m)}_m =\mathbf v^{n(m-1)}_{m-1} +\Delta\mathbf v^n_{sf(m)} +\Delta\mathbf v^n_{cor/g(m)}.

The second term is the velocity increment caused by harmful acceleration:

Δvcor/g(m)n=∫m−1m[−(2ωien+ωenn)×venn+gn]dt.\Delta\mathbf v^n_{cor/g(m)} =\int_{m-1}^{m} [-(2\boldsymbol\omega^n_{ie}+\boldsymbol\omega^n_{en})\times\mathbf v^n_{en} +\mathbf g^n]dt.

Its integrand changes slowly, so trapezoidal integration gives

Δvcor/g(m)n=[−(2ωien+ωenn)×venn+gn]m−1/2ΔT.\Delta\mathbf v^n_{cor/g(m)} =[-(2\boldsymbol\omega^n_{ie}+\boldsymbol\omega^n_{en})\times\mathbf v^n_{en} +\mathbf g^n]_{m-1/2}\Delta T.

Obtain half-step values by extrapolation:

xm−1/2=xm−1+xm−1−xm−22=3xm−1−xm−22,x=ωien,ωenn,vn,gn.x_{m-1/2}=x_{m-1}+\frac{x_{m-1}-x_{m-2}}{2} =\frac{3x_{m-1}-x_{m-2}}{2}, \quad x=\boldsymbol\omega^n_{ie},\boldsymbol\omega^n_{en},\mathbf v^n,\mathbf g^n.

The third term is the velocity increment caused by specific force:

Δvsf(m)n=∫m−1mCbnfsfbdt.\Delta\mathbf v^n_{sf(m)} =\int_{m-1}^{m}\mathbf C^n_b\mathbf f^b_{sf}dt.

Because the rotation matrix and specific force change quickly, use high-accuracy integration:

Δvsf(m)n=[I−ΔT2(ωin(m−1/2)n×)]Cb(m−1)n(m−1)(Δvm+Δvrotb+Δvsculb).\Delta\mathbf v^n_{sf(m)} = \left[\mathbf I-\frac{\Delta T}{2}(\boldsymbol\omega^n_{in(m-1/2)}\times)\right] \mathbf C^{n(m-1)}_{b(m-1)} (\Delta\mathbf v_m+\Delta\mathbf v^b_{rot}+\Delta\mathbf v^b_{scul}).

Here

Δvrotb=12Δθm×Δvm\Delta\mathbf v^b_{rot}=\frac12\Delta\boldsymbol\theta_m\times\Delta\mathbf v_m

is rotation-error compensation, and

Δvsculb=23(Δθm1×Δvm2+Δvm1×Δθm2)\Delta\mathbf v^b_{scul} =\frac23(\Delta\boldsymbol\theta_{m1}\times\Delta\mathbf v_{m2} +\Delta\mathbf v_{m1}\times\Delta\boldsymbol\theta_{m2})

is the two-sample sculling-error compensation. Δθm\Delta\boldsymbol\theta_m and Δvm\Delta\mathbf v_m are the IMU’s angle and velocity increments.

1.3 Position update

The position differential equation is

p˙=Mvn,p=[Lλh],\dot{\mathbf p}=\mathbf M\mathbf v^n, \qquad \mathbf p= \begin{bmatrix}L\\\lambda\\h\end{bmatrix}, M=[01RM+h0sec⁡LRN+h00001].\mathbf M= \begin{bmatrix} 0&\frac{1}{R_M+h}&0\\ \frac{\sec L}{R_N+h}&0&0\\ 0&0&1 \end{bmatrix}.

Position-update error is generally small, so simple trapezoidal integration is sufficient:

pm=pm−1+Mm−1/2(vm−1n+vmn)ΔT2.\mathbf p_m=\mathbf p_{m-1} +\mathbf M_{m-1/2}(\mathbf v^n_{m-1}+\mathbf v^n_m)\frac{\Delta T}{2}.

Obtain Mm−1/2\mathbf M_{m-1/2} by simple extrapolation.

2. Code

ydsf16/TinyGrapeKit — InsUpdate

3. Experiment

The same data set as Initial Alignment for High-Accuracy Strapdown INS is used: a SPANISA vehicle test recorded by a NovAtel 100C, with IE post-processing results available as ground truth.

Comparing INS integration with ground truth, over more than one hour the maximum attitude error is under 1.5 arcminutes (about 0.025∘0.025^\circ), velocity error is under 2 m/s2\,\mathrm{m/s}, and position error is below 1500 m1500\,\mathrm m. The accuracy is high.

INS integration versus IE ground truth. The left plot shows AVP values; the right plot compares INS integration and IE ground truth. Rendered with PSINS.

INS trajectory (red) versus ground-truth trajectory (black). Rendered with QGIS.