Error-state kinematics for IMU-driven systems
0.引言
经常查,总结一下。推导看原论文。
1.System kinematics in continuous time
1.1. The true-state kinematics
p
˙
t
=
v
t
v
˙
t
=
R
t
(
a
m
−
a
b
t
−
a
n
)
+
g
t
q
˙
t
=
1
2
q
t
⊗
(
ω
m
−
ω
b
t
−
ω
n
)
a
˙
b
t
=
a
w
ω
˙
b
t
=
ω
w
g
˙
t
=
0
\begin{aligned} \dot{\mathbf{p}}_{t} &=\mathbf{v}_{t} \\ \dot{\mathbf{v}}_{t} &=\mathbf{R}_{t}\left(\mathbf{a}_{m}-\mathbf{a}_{b t}-\mathbf{a}_{n}\right)+\mathbf{g}_{t} \\ \dot{\mathbf{q}}_{t} &=\frac{1}{2} \mathbf{q}_{t} \otimes\left(\boldsymbol{\omega}_{m}-\boldsymbol{\omega}_{b t}-\boldsymbol{\omega}_{n}\right) \\ \dot{\mathbf{a}}_{b t} &=\mathbf{a}_{w} \\ \dot{\boldsymbol{\omega}}_{b t} &=\boldsymbol{\omega}_{w} \\ \dot{\mathbf{g}}_{t} &=0 \end{aligned}
p˙tv˙tq˙ta˙btω˙btg˙t=vt=Rt(am−abt−an)+gt=21qt⊗(ωm−ωbt−ωn)=aw=ωw=0
g
t
\mathbf{g}_{t}
gt ,
z
z
z轴朝上。
1.2. The nominal-state kinematics
p ˙ = v v ˙ = R ( a m − a b ) + g q ˙ = 1 2 q ⊗ ( ω m − ω b ) a ˙ b = 0 ω ˙ b = 0 g ˙ = 0. \begin{aligned} \dot{\mathbf{p}} &=\mathbf{v} \\ \dot{\mathbf{v}} &=\mathbf{R}\left(\mathbf{a}_{m}-\mathbf{a}_{b}\right)+\mathbf{g} \\ \dot{\mathbf{q}} &=\frac{1}{2} \mathbf{q} \otimes\left(\boldsymbol{\omega}_{m}-\boldsymbol{\omega}_{b}\right) \\ \dot{\mathbf{a}}_{b} &=0 \\ \dot{\boldsymbol{\omega}}_{b} &=0 \\ \dot{\mathbf{g}} &=0 . \end{aligned} p˙v˙q˙a˙bω˙bg˙=v=R(am−ab)+g=21q⊗(ωm−ωb)=0=0=0.
ω \boldsymbol{\omega} ω 为body下测量, q \boldsymbol{q} q 为body到global的变换,故为local角速度更新方式.
1.3. The error-state kinematics
推导见论文。
δ
p
˙
=
δ
v
δ
˙
v
=
−
R
[
a
m
−
a
b
]
×
δ
θ
−
R
δ
a
b
+
δ
g
−
R
a
n
δ
θ
˙
=
−
[
ω
m
−
ω
b
]
×
δ
θ
−
δ
ω
b
−
ω
n
δ
˙
a
˙
b
=
a
w
δ
˙
ω
˙
b
=
ω
w
δ
˙
g
=
0.
\begin{aligned} \dot{\delta \mathbf{p}} &=\delta \mathbf{v} \\ \dot{\delta} \mathbf{v} &=-\mathbf{R}\left[\mathbf{a}_{m}-\mathbf{a}_{b}\right]_{\times} \delta \boldsymbol{\theta}-\mathbf{R} \delta \mathbf{a}_{b}+\delta \mathbf{g}-\mathbf{R} \mathbf{a}_{n} \\ \dot{\delta \boldsymbol{\theta}} &=-\left[\boldsymbol{\omega}_{m}-\boldsymbol{\omega}_{b}\right]_{\times} \delta \boldsymbol{\theta}-\delta \boldsymbol{\omega}_{b}-\boldsymbol{\omega}_{n} \\ \dot{\delta} \dot{\mathbf{a}}_{b} &=\mathbf{a}_{w} \\ \dot{\delta} \dot{\boldsymbol{\omega}}_{b} &=\boldsymbol{\omega}_{w} \\ \dot{\delta} \mathbf{g} &=0 . \end{aligned}
δp˙δ˙vδθ˙δ˙a˙bδ˙ω˙bδ˙g=δv=−R[am−ab]×δθ−Rδab+δg−Ran=−[ωm−ωb]×δθ−δωb−ωn=aw=ωw=0.
进一步假设加速度计噪声为白噪声,相互独立,则
a
n
←
R
a
n
\mathbf{a}_{n} \leftarrow \mathbf{R} \mathbf{a}_{n}
an←Ran对均值和协方差均没有影响,故:
δ
v
˙
=
−
R
[
a
m
−
a
b
]
×
δ
θ
−
R
δ
a
b
+
δ
g
−
a
n
\delta \dot{\mathbf{v}}=-\mathbf{R}\left[\mathbf{a}_{m}-\mathbf{a}_{b}\right]_{\times} \delta \boldsymbol{\theta}-\mathbf{R} \delta \mathbf{a}_{b}+\delta \mathbf{g}-\mathbf{a}_{n}
δv˙=−R[am−ab]×δθ−Rδab+δg−an
对于 JPL: δ ˙ θ = [ ω m − ω b ] × δ θ − δ ω b − ω n \dot{\delta} \boldsymbol{\theta}=\left[\boldsymbol{\omega}_{m}-\boldsymbol{\omega}_{b}\right]_{\times} \delta \boldsymbol{\theta}-\delta \boldsymbol{\omega}_{b}-\boldsymbol{\omega}_{n} δ˙θ=[ωm−ωb]×δθ−δωb−ωn
2.System kinematics in discrete time
Integration needs to be done for the following sub-systems:
- The nominal state.
- The error-state.
(a) The deterministic part: state dynamics and control.
(b) The stochastic part: noise and perturbations.
更新方式
2.1.The nominal state kinematics
p ← p + v Δ t + 1 2 ( R ( a m − a b ) + g ) Δ t 2 v ← v + ( R ( a m − a b ) + g ) Δ t q ← q ⊗ q { ( ω m − ω b ) Δ t } a b ← a b ω b ← ω b g ← g \begin{aligned} \mathbf{p} & \leftarrow \mathbf{p}+\mathbf{v} \Delta t+\frac{1}{2}\left(\mathbf{R}\left(\mathbf{a}_{m}-\mathbf{a}_{b}\right)+\mathbf{g}\right) \Delta t^{2} \\ \mathbf{v} & \leftarrow \mathbf{v}+\left(\mathbf{R}\left(\mathbf{a}_{m}-\mathbf{a}_{b}\right)+\mathbf{g}\right) \Delta t \\ \mathbf{q} & \leftarrow \mathbf{q} \otimes \mathbf{q}\left\{\left(\boldsymbol{\omega}_{m}-\boldsymbol{\omega}_{b}\right) \Delta t\right\} \\ \mathbf{a}_{b} & \leftarrow \mathbf{a}_{b} \\ \boldsymbol{\omega}_{b} & \leftarrow \boldsymbol{\omega}_{b} \\ \mathbf{g} & \leftarrow \mathbf{g} \end{aligned} pvqabωbg←p+vΔt+21(R(am−ab)+g)Δt2←v+(R(am−ab)+g)Δt←q⊗q{(ωm−ωb)Δt}←ab←ωb←g
2.2.The error-state kinematics
δ p ← δ p + δ v Δ t δ v ← δ v + ( − R [ a m − a b ] × δ θ − R δ a b + δ g ) Δ t + v i δ θ ← R ⊤ { ( ω m − ω b ) Δ t } δ θ − δ ω b Δ t + θ i δ a b ← δ a b + a i δ ω b ← δ ω b + ω i δ g ← δ g \begin{aligned} \delta \mathbf{p} & \leftarrow \delta \mathbf{p}+\delta \mathbf{v} \Delta t \\ \delta \mathbf{v} & \leftarrow \delta \mathbf{v}+\left(-\mathbf{R}\left[\mathbf{a}_{m}-\mathbf{a}_{b}\right]_{\times} \delta \boldsymbol{\theta}-\mathbf{R} \delta \mathbf{a}_{b}+\delta \mathbf{g}\right) \Delta t+\mathbf{v}_{\mathbf{i}} \\ \delta \boldsymbol{\theta} & \leftarrow \mathbf{R}^{\top}\left\{\left(\boldsymbol{\omega}_{m}-\boldsymbol{\omega}_{b}\right) \Delta t\right\} \delta \boldsymbol{\theta}-\delta \boldsymbol{\omega}_{b} \Delta t+\boldsymbol{\theta}_{\mathbf{i}} \\ \delta \mathbf{a}_{b} & \leftarrow \delta \mathbf{a}_{b}+\mathbf{a}_{\mathbf{i}} \\ \delta \boldsymbol{\omega}_{b} & \leftarrow \delta \boldsymbol{\omega}_{b}+\boldsymbol{\omega}_{\mathbf{i}} \\ \delta \mathbf{g} & \leftarrow \delta \mathbf{g} \end{aligned} δpδvδθδabδωbδg←δp+δvΔt←δv+(−R[am−ab]×δθ−Rδab+δg)Δt+vi←R⊤{(ωm−ωb)Δt}δθ−δωbΔt+θi←δab+ai←δωb+ωi←δg
其中, v i , θ i , a i , ω i \mathbf{v}_i,\mathbf{\theta}_i,\mathbf{a}_i,\mathbf{\omega}_i vi,θi,ai,ωi 为作用于速度、方向和bias估计的随机值,为高斯白噪声。其均值为零,协方差矩阵为 a n , ω n , a w , ω w \mathbf{a}_n,\mathbf{ω}_n,\mathbf{a}_w,\mathbf{ω}_w an,ωn,aw,ωw 协方差积分所得。
V i = σ a ~ n 2 Δ t 2 I [ m 2 / s 2 ] Θ i = σ ω ~ n Δ t 2 I [ r a d 2 ] A i = σ a w 2 Δ t I [ m 2 / s 4 ] Ω i = σ ω w 2 Δ t I [ r a d 2 / s 2 ] \begin{array}{ll} \mathbf{V}_{\mathbf{i}}=\sigma_{\tilde{\mathbf{a}}_{n}}^{2} \Delta t^{2} \mathbf{I} & {\left[\mathrm{m}^{2} / \mathrm{s}^{2}\right]} \\ \Theta_{\mathbf{i}}=\sigma_{\tilde{\boldsymbol{\omega}}_{n}} \Delta t^{2} \mathbf{I} & {\left[\mathrm{rad}^{2}\right]} \\ \mathbf{A}_{\mathbf{i}}=\sigma_{\mathbf{a}_{w}}^{2} \Delta t \mathbf{I} & {\left[\mathrm{m}^{2} / \mathrm{s}^{4}\right]} \\ \boldsymbol{\Omega}_{\mathbf{i}}=\sigma_{\boldsymbol{\omega}_{w}}^{2} \Delta t \mathbf{I} & {\left[\mathrm{rad}^{2} / \mathrm{s}^{2}\right]} \end{array} Vi=σa~n2Δt2IΘi=σω~nΔt2IAi=σaw2ΔtIΩi=σωw2ΔtI[m2/s2][rad2][m2/s4][rad2/s2]
其中的方差则为测量计算所得。
2.3.The error-state Jacobian and perturbation matrices
x
=
[
p
v
q
a
b
ω
b
g
]
,
δ
x
=
[
δ
p
δ
v
δ
θ
δ
a
b
δ
ω
b
δ
g
]
,
u
m
=
[
a
m
ω
m
]
,
i
=
[
v
i
θ
i
a
i
ω
i
]
\mathbf{x}=\left[\begin{array}{c} \mathbf{p} \\ \mathbf{v} \\ \mathbf{q} \\ \mathbf{a}_{b} \\ \boldsymbol{\omega}_{b} \\ \mathbf{g} \end{array}\right] \quad, \quad \delta \mathbf{x}=\left[\begin{array}{c} \delta \mathbf{p} \\ \delta \mathbf{v} \\ \delta \boldsymbol{\theta} \\ \delta \mathbf{a}_{b} \\ \delta \boldsymbol{\omega}_{b} \\ \delta \mathbf{g} \end{array}\right] \quad, \quad \mathbf{u}_{m}=\left[\begin{array}{l} \mathbf{a}_{m} \\ \boldsymbol{\omega}_{m} \end{array}\right] \quad, \quad \mathbf{i}=\left[\begin{array}{c} \mathbf{v}_{\mathbf{i}} \\ \boldsymbol{\theta}_{\mathbf{i}} \\ \mathbf{a}_{\mathbf{i}} \\ \boldsymbol{\omega}_{\mathbf{i}} \end{array}\right]
x=⎣⎢⎢⎢⎢⎢⎢⎡pvqabωbg⎦⎥⎥⎥⎥⎥⎥⎤,δx=⎣⎢⎢⎢⎢⎢⎢⎡δpδvδθδabδωbδg⎦⎥⎥⎥⎥⎥⎥⎤,um=[amωm],i=⎣⎢⎢⎡viθiaiωi⎦⎥⎥⎤
The error-state system is now:
δ x ← f ( x , δ x , u m , i ) = F x ( x , u m ) ⋅ δ x + F i ⋅ i \delta \mathbf{x} \leftarrow f\left(\mathbf{x}, \delta \mathbf{x}, \mathbf{u}_{m}, \mathbf{i}\right)=\mathbf{F}_{\mathbf{x}}\left(\mathbf{x}, \mathbf{u}_{m}\right) \cdot \delta \mathbf{x}+\mathbf{F}_{\mathbf{i}} \cdot \mathbf{i} δx←f(x,δx,um,i)=Fx(x,um)⋅δx+Fi⋅i
The ESKF prediction equations are written:
δ
^
x
←
F
x
(
x
,
u
m
)
⋅
δ
x
^
(1)
\begin{aligned} \hat{\delta} \mathbf{x} & \leftarrow \mathbf{F}_{\mathbf{x}}\left(\mathbf{x}, \mathbf{u}_{m}\right) \cdot \hat{\delta \mathbf{x}} \end{aligned} \tag{1}
δ^x←Fx(x,um)⋅δx^(1)
P
←
F
x
P
F
x
⊤
+
F
i
Q
i
F
i
⊤
(2)
\begin{aligned} \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} \end{aligned} \tag{2}
P←FxPFx⊤+FiQiFi⊤(2)
其中,
F x = ∂ f ∂ δ x ∣ x , u m = [ I I Δ t 0 0 0 0 0 I − R [ a m − a b ] × Δ t − R Δ t 0 I Δ t 0 0 R ⊤ { ( ω m − ω b ) Δ t } 0 − I Δ t 0 0 0 0 I 0 0 0 0 0 0 I 0 0 0 0 0 0 I ] \mathbf{F}_{\mathbf{x}}=\left.\frac{\partial f}{\partial \delta \mathbf{x}}\right|_{\mathbf{x}, \mathbf{u}_{m}}=\left[\begin{array}{cccccc} \mathbf{I} & \mathbf{I} \Delta t & 0 & 0 & 0 & 0 \\ 0 & \mathbf{I} & -\mathbf{R}\left[\mathbf{a}_{m}-\mathbf{a}_{b}\right]_{\times} \Delta t & -\mathbf{R} \Delta t & 0 & \mathbf{I} \Delta t \\ 0 & 0 & \mathbf{R}^{\top}\left\{\left(\boldsymbol{\omega}_{m}-\boldsymbol{\omega}_{b}\right) \Delta t\right\} & 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{array}\right] Fx=∂δx∂f∣∣∣∣x,um=⎣⎢⎢⎢⎢⎢⎢⎡I00000IΔtI00000−R[am−ab]×ΔtR⊤{(ωm−ωb)Δt}0000−RΔt0I0000−IΔt0I00IΔt000I⎦⎥⎥⎥⎥⎥⎥⎤ F i = ∂ f ∂ i ∣ x , u m = [ 0 0 0 0 I 0 0 0 0 I 0 0 0 0 I 0 0 0 0 I 0 0 0 0 ] , Q i = [ V i 0 0 0 0 Θ i 0 0 0 0 A i 0 0 0 0 Ω i ] . \mathbf{F}_{\mathbf{i}}=\left.\frac{\partial f}{\partial \mathbf{i}}\right|_{\mathbf{x}, \mathbf{u}_{m}}=\left[\begin{array}{llll} 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{array}\right] \quad, \quad \mathbf{Q}_{\mathbf{i}}=\left[\begin{array}{cccc} \mathbf{V}_{\mathbf{i}} & 0 & 0 & 0 \\ 0 & \Theta_{\mathbf{i}} & 0 & 0 \\ 0 & 0 & \mathbf{A}_{\mathbf{i}} & 0 \\ 0 & 0 & 0 & \boldsymbol{\Omega}_{\mathbf{i}} \end{array}\right] . Fi=∂i∂f∣∣∣∣x,um=⎣⎢⎢⎢⎢⎢⎢⎡0I000000I000000I000000I0⎦⎥⎥⎥⎥⎥⎥⎤,Qi=⎣⎢⎢⎡Vi0000Θi0000Ai0000Ωi⎦⎥⎥⎤.
3.Fusing IMU with complementary sensory data
观测方程:
y
=
h
(
x
t
)
+
v
\mathbf{y}=h\left(\mathbf{x}_{t}\right)+v
y=h(xt)+v
There are a myriad of possibilities, the most popular ones being GPS + IMU, monocular vision + IMU, and stereo vision + IMU. While the IMU information has served so far to make predictions to the ESKF, this other information is used to correct the filter, and thus observe the IMU bias errors. The correction consists of three steps:
- observation of the error-state via filter correction,
- injection of the observed errors into the nominal state, and
- reset of the error-state.
3.1.Observation of the error state via filter correction
K = P H ⊤ ( H P H ⊤ + V ) − 1 (3) \begin{aligned} \mathbf{K} &=\mathbf{P} \mathbf{H}^{\top}\left(\mathbf{H} \mathbf{P} \mathbf{H}^{\top}+\mathbf{V}\right)^{-1} \end{aligned} \tag{3} K=PH⊤(HPH⊤+V)−1(3) δ x ^ ← K ( y − h ( x ^ t ) ) (4) \begin{aligned} \hat{\delta \mathbf{x}} & \leftarrow \mathbf{K}\left(\mathbf{y}-h\left(\hat{\mathbf{x}}_{t}\right)\right) \\ \end{aligned} \tag{4} δx^←K(y−h(x^t))(4) P ← ( I − K H ) P (5) \begin{aligned} \mathbf{P} & \leftarrow(\mathbf{I}-\mathbf{K H}) \mathbf{P} \end{aligned} \tag{5} P←(I−KH)P(5)
H
≡
∂
h
∂
δ
x
∣
x
\left.\mathbf{H} \equiv \frac{\partial h}{\partial \delta \mathbf{x}}\right|_{\mathbf{x}}
H≡∂δx∂h∣∣∣∣x
x
^
t
=
x
⊕
δ
^
x
\hat{\mathbf{x}}_{t}=\mathbf{x} \oplus \hat\delta \mathbf{x}
x^t=x⊕δ^x
更新到普通状态。
3.2.Jacobian computation for the filter correction
H
≜
∂
h
∂
δ
x
∣
x
=
∂
h
∂
x
t
∣
x
∂
x
t
∂
δ
x
∣
x
=
H
x
X
δ
x
\left.\mathbf{H} \triangleq \frac{\partial h}{\partial \delta \mathbf{x}}\right|_{\mathbf{x}}=\left.\left.\frac{\partial h}{\partial \mathbf{x}_{t}}\right|_{\mathbf{x}} \frac{\partial \mathbf{x}_{t}}{\partial \delta \mathbf{x}}\right|_{\mathbf{x}}=\mathbf{H}_{\mathbf{x}} \mathbf{X}_{\delta \mathbf{x}}
H≜∂δx∂h∣∣∣∣x=∂xt∂h∣∣∣∣x∂δx∂xt∣∣∣∣x=HxXδx
其中,
H
x
≜
∂
h
∂
x
t
∣
x
\left.\mathbf{H}_{\mathbf{x}} \triangleq \frac{\partial h}{\partial \mathbf{x}_{t}}\right|_{\mathbf{x}}
Hx≜∂xt∂h∣∣∣∣x
为观测方程对状态量的偏导,与实际传感器相关。第二部分 为true-state 相对于 error-state 的雅可比:
X
δ
x
=
[
∂
(
p
+
δ
p
)
∂
δ
p
0
0
0
0
0
0
∂
(
v
+
δ
v
)
∂
δ
v
0
0
0
0
0
0
∂
(
q
⊗
δ
q
)
∂
δ
θ
0
0
0
0
0
0
∂
(
a
b
+
δ
a
b
)
∂
δ
a
b
0
0
0
0
0
0
∂
(
ω
b
+
δ
ω
b
)
∂
δ
ω
b
0
0
0
0
0
0
∂
(
g
+
δ
g
)
∂
δ
g
]
\mathbf{X}_{\delta\mathbf{x}}=\left[\begin{array}{cccccc} \frac{\partial(\mathbf{p}+\delta \mathbf{p})}{\partial \delta \mathbf{p}} & 0 & 0 & 0 & 0 & 0 \\ 0 &\frac{\partial(\mathbf{v}+\delta \mathbf{v})}{\partial \delta \mathbf{v}} &0 &0 & 0 &0 \\ 0 & 0 &\frac{\partial(\mathbf{q} \otimes \delta \mathbf{q})}{\partial \delta \boldsymbol{\theta}} & 0 &0 & 0 \\ 0 & 0 & 0 &\frac{\partial\left(\mathbf{a}_{b}+\delta \mathbf{a}_{b}\right)}{\partial \delta \mathbf{a}_{b}}& 0 & 0 \\ 0 & 0 & 0 & 0 & \frac{\partial\left(\boldsymbol{\omega}_{b}+\delta \boldsymbol{\omega}_{b}\right)}{\partial \delta \boldsymbol{\omega}_{b}} & 0 \\ 0 & 0 & 0 & 0 & 0 &\frac{\partial(\mathbf{g}+\delta \mathbf{g})}{\partial \delta \mathbf{g}} \end{array}\right]
Xδx=⎣⎢⎢⎢⎢⎢⎢⎢⎢⎡∂δp∂(p+δp)000000∂δv∂(v+δv)000000∂δθ∂(q⊗δq)000000∂δab∂(ab+δab)000000∂δωb∂(ωb+δωb)000000∂δg∂(g+δg)⎦⎥⎥⎥⎥⎥⎥⎥⎥⎤
X
δ
x
≜
∂
x
t
∂
δ
x
∣
x
=
[
I
6
0
0
0
Q
δ
θ
0
0
0
I
9
]
\left.\mathbf{X}_{\delta \mathbf{x}} \triangleq \frac{\partial \mathbf{x}_{t}}{\partial \delta \mathbf{x}}\right|_{\mathbf{x}}=\left[\begin{array}{ccc} \mathbf{I}_{6} & 0 & 0 \\ 0 & \mathbf{Q}_{\delta \boldsymbol{\theta}} & 0 \\ 0 & 0 & \mathbf{I}_{9} \end{array}\right]
Xδx≜∂δx∂xt∣∣∣∣x=⎣⎡I6000Qδθ000I9⎦⎤
其中,
Q
δ
θ
≜
∂
(
q
⊗
δ
q
)
∂
δ
θ
∣
q
=
∂
(
q
⊗
δ
q
)
∂
δ
q
∣
q
∂
δ
q
∂
δ
θ
∣
δ
θ
^
=
0
=
∂
(
[
q
]
L
δ
q
)
∂
δ
q
∣
q
∂
[
1
1
2
δ
θ
]
∂
δ
θ
∣
δ
θ
=
0
=
[
q
]
L
1
2
[
0
0
0
1
0
0
0
1
0
0
0
1
]
Q
δ
θ
=
1
2
[
−
q
x
−
q
y
−
q
z
q
w
−
q
z
q
y
q
z
q
w
−
q
x
−
q
y
q
x
q
w
]
\begin{aligned} \left.\mathbf{Q}_{\delta \boldsymbol{\theta}} \triangleq \frac{\partial(\mathbf{q} \otimes \delta \mathbf{q})}{\partial \delta \boldsymbol{\theta}}\right|_{\mathbf{q}} &=\left.\left.\frac{\partial(\mathbf{q} \otimes \delta \mathbf{q})}{\partial \delta \mathbf{q}}\right|_{\mathbf{q}} \frac{\partial \delta \mathbf{q}}{\partial \delta \boldsymbol{\theta}}\right|_{\delta \hat{\theta}=0} \\ &=\left.\left.\frac{\partial\left([\mathbf{q}]_{L} \delta \mathbf{q}\right)}{\partial \delta \mathbf{q}}\right|_{\mathbf{q}} \frac{\partial\left[\begin{array}{c} 1 \\ \frac{1}{2} \delta \boldsymbol{\theta} \end{array}\right]}{\partial \delta \boldsymbol{\theta}}\right|_{\delta \boldsymbol{\theta}=0} \\ &=[\mathbf{q}]_{L} \frac{1}{2}\left[\begin{array}{ccc} 0 & 0 & 0 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array}\right] \\ \mathbf{Q}_{\delta \boldsymbol{\theta}}=\frac{1}{2} & {\left[\begin{array}{ccc} -q_{x} & -q_{y} & -q_{z} \\ q_{w} & -q_{z} & q_{y} \\ q_{z} & q_{w} & -q_{x} \\ -q_{y} & q_{x} & q_{w} \end{array}\right] } \end{aligned}
Qδθ≜∂δθ∂(q⊗δq)∣∣∣∣qQδθ=21=∂δq∂(q⊗δq)∣∣∣∣q∂δθ∂δq∣∣∣∣∣δθ^=0=∂δq∂([q]Lδq)∣∣∣∣q∂δθ∂[121δθ]∣∣∣∣∣∣∣∣δθ=0=[q]L21⎣⎢⎢⎡010000100001⎦⎥⎥⎤⎣⎢⎢⎡−qxqwqz−qy−qy−qzqwqx−qzqy−qxqw⎦⎥⎥⎤
3.3.Injection of the observed error into the nominal state
After the ESKF update, the nominal state gets updated with the observed error state using the appropriate compositions:
p
←
p
+
δ
p
^
v
←
v
+
δ
v
^
q
←
q
⊗
q
{
δ
θ
^
}
a
b
←
a
b
+
δ
a
b
^
ω
b
←
ω
b
+
δ
ω
^
b
g
←
g
+
δ
g
^
\begin{aligned} \mathbf{p} & \leftarrow \mathbf{p}+\hat{\delta \mathbf{p}} \\ \mathbf{v} & \leftarrow \mathbf{v}+\hat{\delta \mathbf{v}} \\ \mathbf{q} & \leftarrow \mathbf{q} \otimes \mathbf{q}\{\hat{\delta \boldsymbol{\theta}}\} \\ \mathbf{a}_{b} & \leftarrow \mathbf{a}_{b}+\delta \hat{\mathbf{a}_{b}} \\ \boldsymbol{\omega}_{b} & \leftarrow \boldsymbol{\omega}_{b}+\delta \hat{\boldsymbol{\omega}}_{b} \\ \mathbf{g} & \leftarrow \mathbf{g}+\hat{\delta \mathbf{g}} \end{aligned}
pvqabωbg←p+δp^←v+δv^←q⊗q{δθ^}←ab+δab^←ωb+δω^b←g+δg^
3.4.ESKF reset
Let us call the error reset function g ( ) g() g(). It is written as follows,
δ x ← g ( δ x ) = δ x ⊖ δ x ^ \delta \mathbf{x} \leftarrow g(\delta \mathbf{x})=\delta \mathbf{x} \ominus \hat{\delta \mathbf{x}} δx←g(δx)=δx⊖δx^其中, δ x ^ ← 0 P ← G P G ⊤ . \begin{aligned} \hat{\delta \mathbf{x}} & \leftarrow 0 \\ \mathbf{P} & \leftarrow \mathbf{G} \mathbf{P} \mathbf{G}^{\top} . \end{aligned} δx^P←0←GPG⊤. G ≜ ∂ g ∂ δ x ∣ δ x . \left.\mathbf{G} \triangleq \frac{\partial g}{\partial \delta \mathbf{x}}\right|_{\delta \mathbf{x}} . G≜∂δx∂g∣∣∣∣δx.
和前面的 Jacobian 类似,除了四元数项外,其他均为单位矩阵:
G = [ I 6 0 0 0 I − [ 1 2 δ θ ^ ] × 0 0 0 I 9 ] \mathbf{G}=\left[\begin{array}{ccc} \mathbf{I}_{6} & 0 & 0 \\ 0 & \mathbf{I}-\left[\begin{array}{c} \frac{1}{2} \hat{\delta \boldsymbol{\theta}} \end{array}\right]_{\times} & 0 \\ 0 & 0 & \mathbf{I}_{9} \end{array}\right] G=⎣⎡I6000I−[21δθ^]×000I9⎦⎤
多数系统里实际忽略了 δ ^ θ \hat \delta\theta δ^θ 项, G = I 18 ∗ 18 \mathbf{G}=\mathbf{I}_{18*18} G=I18∗18.
3.5.Jacobian of the reset operation with respect to the orientation error
-
复位操作时,true-oritentation 不会改变, q t + = q t \mathbf{q}_t^+=\mathbf{q}_t qt+=qt: q + ⊗ δ q + = q ⊗ δ q \mathbf{q}^{+} \otimes \delta \mathbf{q}^{+}=\mathbf{q} \otimes \delta \mathbf{q} q+⊗δq+=q⊗δq
-
观测误差均值已经融合入标称状态: q + = q ⊗ δ q ^ \mathbf{q}^{+}=\mathbf{q} \otimes \hat{\delta \mathbf{q}} q+=q⊗δq^
结合两式得:
δ q + = q + ⊗ q ⊗ δ q = ( q ⊗ δ q ^ ) ∗ ⊗ q ⊗ δ q = δ q ^ ∗ ⊗ δ q = [ δ q ^ ] L ∗ ⋅ δ q \delta \mathbf{q}^{+}=\mathbf{q}^{+}\otimes \mathbf{q} \otimes \delta \mathbf{q}= (\mathbf{q} \otimes \hat{\delta \mathbf{q}})^{*} \otimes \mathbf{q} \otimes \delta \mathbf{q}=\hat{\delta \mathbf{q}}^{*} \otimes \delta \mathbf{q}=[\hat{\delta \mathbf{q}}]_{L}^{*} \cdot \delta \mathbf{q} δq+=q+⊗q⊗δq=(q⊗δq^)∗⊗q⊗δq=δq^∗⊗δq=[δq^]L∗⋅δq
推导见论文,结果: ∂ δ θ + ∂ δ θ = I − [ 1 2 δ θ ^ ] × \frac{\partial \delta \boldsymbol{\theta}^{+}}{\partial \delta \boldsymbol{\theta}}=\mathbf{I}-\left[\frac{1}{2} \hat{\delta \boldsymbol{\theta}}\right]_{\times} ∂δθ∂δθ+=I−[21δθ^]×