Overview
System State Vector
the nominal-state x and the error-state δx
x=⎣⎢⎢⎢⎢⎡pvqbabg⎦⎥⎥⎥⎥⎤∈R16×1δx=⎣⎢⎢⎢⎢⎡δpδvδθδbaδbg⎦⎥⎥⎥⎥⎤∈R15×1
the true-state
x^t=x⊕δ^x
ENU Coordinate
- using ENU coordinate
- in ENU coordinate, g=[00−9.81007]T
- extrinsic between IMU and GPS: IpGps
State Prediction (IMU-driven system kinematics in discrete time)
The nominal state kinematics
p←p+vΔt+21(R(am−ab)+g)Δt2v←v+(R(am−ab)+g)Δtq←q⊗q{(ωm−ωb)Δt}ab←abωb←ωb
The error-state Jacobian and perturbation matrices
δx^←Fx(x,um)⋅δx^P←FxPFx⊤+FiQiFi⊤
δx∼N{δ^x,P}
where
Fx=∂δx∂f∣∣∣∣x,um=⎣⎢⎢⎢⎢⎡I0000IΔtI0000−R[am−ab]×ΔtR⊤{(ωm−ωb)Δt}000−RΔt0I000IΔt0I⎦⎥⎥⎥⎥⎤
Fi=∂i∂f∣∣∣∣x,um=⎣⎢⎢⎢⎢⎡0I00000I00000I00000I⎦⎥⎥⎥⎥⎤
Qi=⎣⎢⎢⎡Vi0000Θi0000Ai0000Ωi⎦⎥⎥⎤,withVi=σa~n2Δt2IΘi=σω~n2Δt2IAi=σaw2ΔtIΩi=σωw2ΔtI[m2/s2][rad2][m2/s4][rad2/s2]
ESKF Measurement Update (Fusing IMU with GPS data)
GPS measurement
y=h(xt)+v,v∼N{0,V}
convert the GPS raw data which is in WGS84 coordinate to ENU by GeographicLib
h(x^t)=GpGps=GpI+IGR⋅IpGps
the filter correction equations
K=PH⊤(HPH⊤+V)−1δ^x←K(y−h(x^t))P←(I−KH)P
where
H≜∂δx∂h∣∣∣∣x=[I0−IGR⌊IpGps⌋×00]
the best true-state estimate
x^t=x⊕δ^x
Results
path on ROS rviz and plot the result path(fusion_gps.csv & fusion_state.csv) on google map:
Reference
- Quaternion kinematics for the error-state Kalman filter