假设系统模型方程:
x ˙ ( t ) = f ( x ( t ) , v ( t ) , w ( t ) ) \dot{x}\left( t\right) =f\left( x\left( t\right) ,v\left( t\right) ,w\left( t\right) \right) x˙(t)=f(x(t),v(t),w(t))
则按照名义状态的定义,有:
x ˉ ˙ ( t ) = f ( x ˉ ( t ) , v ( t ) , 0 ) \dot{\bar{x}}\left( t\right) =f\left( \bar{x}\left( t\right) ,v\left( t\right) ,0\right) xˉ˙(t)=f(xˉ(t),v(t),0)
x ˙ ( t ) = ( x ˉ ( t ) + δ x ) ˙ = x ˉ ˙ ( t ) + δ x ˙ = f ( x ˉ ( t ) + δ x ( t ) , u ( t ) , w ( t ) ) \begin{aligned} \dot{x}(t)&=\dot{(\bar{x}\left( t\right) +\delta x)}=\dot{\bar{x}}\left( t\right) +\dot{\delta x} \\&=f\left( \bar{x}\left( t\right) +\delta x\left( t\right) ,u\left( t\right) ,w \left( t\right) \right) \end{aligned} x˙(t)=(xˉ(t)+δx)˙=xˉ˙(t)+δx˙=f(xˉ(t)+δx(t),u(t),w(t))
δ x ˙ ( t ) = x ˙ ( t ) − x ˉ ˙ ( t ) = f ( x ˉ ( t ) + δ x ( t ) , u ( t ) , w ( t ) ) − f ( x ˉ ( t ) , u ( t ) , 0 ) = ∂ f ( x ˉ ( t ) , u ( t ) , 0 ) ∂ x δ x ( t ) + 1 2 ! ∂ 2 f ( x ˉ ( t ) , u ( t ) , 0 ) ∂ x 2 δ x ( t ) 2 + ⋯ + ∂ f ( x ˉ ( t ) , u ( t ) , 0 ) ∂ w w ( t ) + 1 2 ! ∂ 2 f ( x ˉ ( t ) , u ( t ) , 0 ) ∂ w 2 w ( t ) 2 + ⋯ = ∂ f ( x ˉ ( t ) , u ( t ) , 0 ) ∂ x δ x ( t ) + O ( δ x ( t ) ) + ∂ f ( x ˉ ( t ) , u ( t ) , 0 ) ∂ w w ( t ) + O ( w ( t ) ) \begin{aligned} \dot{\delta x}(t)&=\dot{x}\left( t\right) - \dot{\bar{x}}\left( t\right) =f\left( \bar{x}\left( t\right) +\delta x\left( t\right) ,u\left( t\right) ,w \left( t\right) \right) - f\left( \bar{x}\left( t\right) ,u\left( t\right) ,0\right) \\ &=\dfrac{\partial f(\bar{x}(t),u(t),0)}{\partial x}\delta x \left( t\right)+\dfrac{1}{2!}\dfrac{\partial^2 f(\bar{x}(t),u(t),0)}{\partial x^2}\delta x \left( t\right)^2+\cdots \\&\quad+\dfrac{\partial f(\bar{x}(t),u(t),0)}{\partial w}w \left( t\right)+\dfrac{1}{2!}\dfrac{\partial^2 f(\bar{x}(t),u(t),0)}{\partial w^2}w \left( t\right)^2+\cdots \\ &=\dfrac{\partial f(\bar{x}(t),u(t),0)}{\partial x}\delta x \left( t\right) +O\left( \delta x\left( t\right) \right) +\dfrac{\partial f(\bar{x}(t),u(t),0)}{\partial w }w\left( t\right) +O\left( w \left( t\right) \right) \end{aligned} δx˙(t)=x˙(t)−xˉ˙(t)=f(xˉ(t)+δx(t),u(t),w(t))−f(xˉ(t),u(t),0)=∂x∂f(xˉ(t),u(t),0)δx(t)+2!1∂x2∂2f(xˉ(t),u(t),0)δx(t)2+⋯+∂w∂f(xˉ(t),u(t),0)w(t)+2!1∂w2∂2f(xˉ(t),u(t),0)w(t)2+⋯=∂x∂f(xˉ(t),u(t),0)δx(t)+O(δx(t))+∂w∂f(xˉ(t),u(t),0)w(t)+O(w(t))
记 F ( t ) = ∂ f ( x ˉ ( t ) , u ( t ) , 0 ) ∂ x , L ( t ) = ∂ f ( x ˉ ( t ) , u ( t ) , 0 ) ∂ w F(t)=\dfrac{\partial f(\bar{x}(t),u(t),0)}{\partial x},\ L(t)=\dfrac{\partial f(\bar{x}(t),u(t),0)}{\partial w } F(t)=∂x∂f(xˉ(t),u(t),0), L(t)=∂w∂f(xˉ(t),u(t),0),忽略噪声 w w w的高阶项,则
δ x ˙ ( t ) = F ( t ) δ x ( t ) + L ( t ) w ( t ) + O ( δ x ( t ) ) \dot{\delta x}(t)=F(t)\delta x(t)+L(t)w(t)+O\left( \delta x\left( t\right)\right) δx˙(t)=F(t)δx(t)+L(t)w(t)+O(δx(t))
误差状态方程的离散化:
δ x ( t + Δ t ) = δ x ( t ) + δ x ˙ ( t ) Δ t = δ x ( t ) + F ( t ) δ x ( t ) Δ t + O ( δ x ( t ) ) Δ t + L ( t ) w ( t ) Δ t = ( I + F ( t ) Δ t ) δ x ( t ) + O ( δ x ( t ) ) Δ t + L ( t ) w ( t ) Δ t = Φ ( t ) δ x ( t ) + O ( δ x ( t ) ) Δ t + L ( t ) w ( t ) Δ t \begin{aligned} \delta x\left( t+\Delta t\right) &=\delta x\left( t\right) + \dot{\delta x}\left( t\right) \Delta t\\ &=\delta x\left( t\right) +F\left( t\right) \delta x\left( t\right) \Delta t+O\left( \delta x\left( t\right) \right) \Delta t+L\left( t\right) w\left( t\right) \Delta t\\ &=\left( I+F\left( t\right) \Delta t\right) \delta x\left( t\right) +O\left( \delta x\left( t\right) \right) \Delta t+L\left( t\right) w\left( t\right) \Delta t\\ &=\Phi \left( t\right) \delta x\left( t\right) +O\left( \delta x\left( t\right) \right) \Delta t+L\left( t\right) w\left( t\right) \Delta t \end{aligned} δx(t+Δt)=δx(t)+δx˙(t)Δt=δx(t)+F(t)δx(t)Δt+O(δx(t))Δt+L(t)w(t)Δt=(I+F(t)Δt)δx(t)+O(δx(t))Δt+L(t)w(t)Δt=Φ(t)δx(t)+O(δx(t))Δt+L(t)w(t)Δt
在ESKF中, Φ ( t ) \Phi(t) Φ(t)被称作State Transition Matrix。ESKF的Predict步骤作近似 δ x ( t + Δ t ) ≃ Φ ( t ) δ x ( t ) \delta x\left( t+\Delta t\right)\simeq \Phi(t)\delta x\left( t\right) δx(t+Δt)≃Φ(t)δx(t) ,剩下的由于非线性导致的误差项 O ( δ x ( t ) ) Δ t + L ( t ) w ( t ) Δ t O\left( \delta x\left( t\right) \right) \Delta t+L\left( t\right) w\left( t\right) \Delta t O(δx(t))Δt+L(t)w(t)Δt在Update步骤使用观测方程进行估计。
从 F ( t ) F(t) F(t) 的定义中可以看到,其与 error δ x ( t ) \delta x(t) δx(t) 是无关的,使用上一步的估计值 x ^ ( t ) \hat{x}(t) x^(t) 与这一步的控制值 u ( t ) u(t) u(t) 即可计算得到。于是,在 Predict 步骤无需设计 error 部分 δ x ( t ) \delta x(t) δx(t) ,对 Φ ( t ) \Phi(t) Φ(t) 进行近似。
真实状态的运动模型方程
x k = f ( x k − 1 , u k , w k ) (1) x_{k}=f\left( x_{k-1},u_{k},w_{k}\right) \tag{1} xk=f(xk−1,uk,wk)(1)
由名义状态的定义,不考虑噪声项,得到名义状态的运动模型方程
x ˉ k = f ( x ˉ k − 1 , u k , 0 ) (2) \bar{x}_{k}=f\left( \bar{x}_{k-1},u_{k},0\right) \tag{2} xˉk=f(xˉk−1,uk,0)(2)
由定义: x k = x ˉ k + δ x k x_{k}=\bar{x}_{k}+\delta x_{k} xk=xˉk+δxk,得
δ x k = f ( x k − 1 , u k , w k ) − f ( x ˉ k − 1 , u k , 0 ) = f ( x ˉ k − 1 + δ x k − 1 , u k , w k ) − f ( x ˉ k − 1 , u k , 0 ) = ∂ f ( x ˉ k − 1 , u k , 0 ) ∂ x δ x k − 1 + 1 2 ! ∂ 2 f ( x ˉ k − 1 , u k , 0 ) ∂ x 2 δ x k − 1 2 + ⋯ + ∂ f ( x ˉ k − 1 , u k , 0 ) ∂ w w k + 1 2 ! ∂ 2 f ( x ˉ k − 1 , u k , 0 ) ∂ w 2 w k 2 + ⋯ = ∂ f ( x ˉ k − 1 , u k , 0 ) ∂ x δ x k − 1 + O ( δ x k − 1 ) + ∂ f ( x ˉ k − 1 , u k , 0 ) ∂ w w k + O ( w k ) \begin{aligned} \delta x_{k}&=f\left( x_{k-1},u_{k},w_{k}\right) -f\left( \bar{x}_{k-1},u_{k},0\right) \\ &=f\left( \bar{x}_{k-1}+\delta x_{k-1},u_{k},w_{k}\right) -f\left( \bar{x}_{k-1},u_{k},0\right) \\ &=\dfrac{\partial f(\bar{x}_{k-1},u_k,0)}{\partial x}\delta x_{k-1} +\dfrac{1}{2!}\dfrac{\partial^2 f(\bar{x}_{k-1},u_{k},0)}{\partial x^2}\delta x_{k-1}^2+\cdots \\&\quad+\dfrac{\partial f(\bar{x}_{k-1},u_{k},0)}{\partial w}w_{k}+\dfrac{1}{2!}\dfrac{\partial^2 f(\bar{x}_{k-1},u_k,0)}{\partial w^2}w_k^2+\cdots \\ &=\dfrac{\partial f(\bar{x}_{k-1},u_k,0)}{\partial x}\delta x_{k-1} +O\left( \delta x_{k-1} \right) +\dfrac{\partial f(\bar{x}_{k-1},u_k,0)}{\partial w }w_k +O\left( w_k \right) \end{aligned} δxk=f(xk−1,uk,wk)−f(xˉk−1,uk,0)=f(xˉk−1+δxk−1,uk,wk)−f(xˉk−1,uk,0)=∂x∂f(xˉk−1,uk,0)δxk−1+2!1∂x2∂2f(xˉk−1,uk,0)δxk−12+⋯+∂w∂f(xˉk−1,uk,0)wk+2!1∂w2∂2f(xˉk−1,uk,0)wk2+⋯=∂x∂f(xˉk−1,uk,0)δxk−1+O(δxk−1)+∂w∂f(xˉk−1,uk,0)wk+O(wk)
记 F k − 1 = ∂ f ( x ˉ k − 1 , u k , 0 ) ∂ x , L k = ∂ f ( x ˉ k − 1 , u k , 0 ) ∂ w F_{k-1}=\dfrac{\partial f(\bar{x}_{k-1},u_k,0)}{\partial x},\ L_k=\dfrac{\partial f(\bar{x}_{k-1},u_k,0)}{\partial w } Fk−1=∂x∂f(xˉk−1,uk,0), Lk=∂w∂f(xˉk−1,uk,0),忽略非线性小量部分: δ x k , w \delta x_k,w δxk,w的高阶项,则
δ x k = F k − 1 δ x k − 1 + L k w k (3) \delta x_k=F_{k-1}\delta x_{k-1}+L_kw_k\tag{3} δxk=Fk−1δxk−1+Lkwk(3)
观测方程:
y k = h ( x k , n n ) = h ( x ‾ k + δ x k , n k ) = h ( x ˉ k + δ x k , n k ) − h ( x ˉ k , 0 ) + h ( x ‾ k , 0 ) ≈ h ( x ˉ k , 0 ) + ∂ h ( x ˉ k , 0 ) ∂ x δ x k + ∂ h ( x ˉ k , 0 ) ∂ n n k + O ( δ x k ) + O ( n k ) \begin{aligned} y_{k}&=h\left( x_{k},n_{n}\right) =h\left( \overline{x}_{k}+\delta x_{k},n_{k}\right) \\ &=h\left( \bar{x}_{k}+\delta x_{k},n_{k}\right) -h\left( \bar{x}_{k},0\right) +h\left( \overline{x}_{k},0\right) \\ &\approx h\left( \bar{x}_{k},0\right) + \dfrac{\partial h\left( \bar{x}_{k},0\right)}{\partial x}\delta x_{k}+\dfrac{\partial h\left( \bar{x}_{k},0\right)}{\partial n}n_{k}+O(\delta x_k) +O(n_k) \end{aligned} yk=h(xk,nn)=h(xk+δxk,nk)=h(xˉk+δxk,nk)−h(xˉk,0)+h(xk,0)≈h(xˉk,0)+∂x∂h(xˉk,0)δxk+∂n∂h(xˉk,0)nk+O(δxk)+O(nk)
记 H k − 1 = ∂ h ( x ˉ k , 0 ) ∂ x , L k = ∂ h ( x ˉ k , 0 ) ∂ n H_{k-1}=\dfrac{\partial h(\bar{x}_{k},0)}{\partial x},\ L_k=\dfrac{\partial h(\bar{x}_{k},0)}{\partial n } Hk−1=∂x∂h(xˉk,0), Lk=∂n∂h(xˉk,0),忽略非线性小量部分: δ x k , n k \delta x_k,n_k δxk,nk的高阶项,则
y k = h ( x ˉ k , 0 ) + H k δ x k + M k n k (4) y_k=h(\bar{x}_k,0)+H_k\delta x_k + M_k n_k\tag{4} yk=h(xˉk,0)+Hkδxk+Mknk(4)
ES-EKF直接估计Error State,然后用它矫正Nominal State。在整个滤波过程中,我们实际上修正的变量是 δ x \delta x δx。
若状态量里面有旋转,则旋转通常被表示为欧拉角或四元数的形式。
在EKF框架中,若一个旋转状态量:
但这些问题在ESKF中被弥补。在ESKF中,一个误差旋转变量:
参考链接1
参考链接2