Quaternion Kinematics for the Error-State KF

Quaternion Kinematics for the Error-State KF

Quaternion kinematics for the error-state Kalman filter Joan Sol`a October 12, 2017 Contents 1 Quaternion definition and properties4 1.1 Definition of quaternion............................4 1.1.1 Alternative representations of the quaternion.............5 1.2 Main quaternion properties..........................6 1.2.1 Sum...................................6 1.2.2 Product.................................6 1.2.3 Identity.................................8 1.2.4 Conjugate................................8 1.2.5 Norm..................................8 1.2.6 Inverse..................................8 1.2.7 Unit or normalized quaternion.....................9 1.3 Additional quaternion properties.......................9 1.3.1 Quaternion commutator........................9 1.3.2 Product of pure quaternions......................9 1.3.3 Natural powers of pure quaternions.................. 10 1.3.4 Exponential of pure quaternions.................... 10 1.3.5 Exponential of general quaternions.................. 11 1.3.6 Logarithm of unit quaternions..................... 11 1.3.7 Logarithm of general quaternions................... 11 1.3.8 Exponential forms of the type qt ................... 11 2 Rotations and cross-relations 12 2.1 The 3D vector rotation formula........................ 12 2.2 The rotation group SO(3)........................... 13 2.3 The rotation group and the rotation matrix................. 15 2.3.1 The exponential map.......................... 16 2.3.2 The capitalized exponential map................... 17 2.3.3 Rotation matrix and rotation vector: the Rodrigues rotation formula 18 2.3.4 The logarithmic maps......................... 18 2.3.5 The rotation action........................... 19 1 2.4 The rotation group and the quaternion.................... 19 2.4.1 The exponential map.......................... 20 2.4.2 The capitalized exponential map................... 21 2.4.3 Quaternion and rotation vector.................... 22 2.4.4 The logarithmic maps......................... 22 2.4.5 The rotation action........................... 23 2.4.6 The double cover of the manifold of SO(3).............. 23 2.5 Rotation matrix and quaternion........................ 24 2.6 Rotation composition.............................. 26 2.7 Spherical linear interpolation (SLERP).................... 27 2.8 Quaternion and isoclinic rotations: explaining the magic.......... 29 3 Quaternion conventions. My choice. 33 3.1 Quaternion flavors............................... 33 3.1.1 Order of the quaternion components................. 35 3.1.2 Specification of the quaternion algebra................ 35 3.1.3 Function of the rotation operator................... 36 3.1.4 Direction of the rotation operator................... 37 4 Perturbations, derivatives and integrals 38 4.1 The additive and subtractive operators in SO(3)............... 38 4.2 The four possible derivative definitions.................... 38 4.2.1 Functions from vector space to vector space............. 38 4.2.2 Functions from SO(3) to SO(3).................... 39 4.2.3 Functions from vector space to SO(3)................. 39 4.2.4 Functions from SO(3) to vector space................. 39 4.3 Useful, and very useful, Jacobians of the rotation.............. 40 4.3.1 Jacobian with respect to the vector.................. 40 4.3.2 Jacobian with respect to the quaternion............... 40 4.3.3 Right Jacobian of SO(3)....................... 41 4.3.4 Jacobian with respect to the rotation vector............. 42 4.4 Perturbations, uncertainties, noise....................... 43 4.4.1 Local perturbations........................... 43 4.4.2 Global perturbations.......................... 43 4.5 Time derivatives................................ 44 4.5.1 Global-to-local relations........................ 45 4.5.2 Time-derivative of the quaternion product.............. 46 4.5.3 Other useful expressions with the derivative............. 46 4.6 Time-integration of rotation rates....................... 46 4.6.1 Zeroth order integration........................ 47 4.6.2 First order integration......................... 48 2 5 Error-state kinematics for IMU-driven systems 50 5.1 Motivation.................................... 50 5.2 The error-state Kalman filter explained.................... 51 5.3 System kinematics in continuous time..................... 52 5.3.1 The true-state kinematics....................... 53 5.3.2 The nominal-state kinematics..................... 54 5.3.3 The error-state kinematics....................... 54 5.4 System kinematics in discrete time...................... 57 5.4.1 The nominal state kinematics..................... 58 5.4.2 The error-state kinematics....................... 58 5.4.3 The error-state Jacobian and perturbation matrices......... 59 6 Fusing IMU with complementary sensory data 60 6.1 Observation of the error state via filter correction.............. 60 6.1.1 Jacobian computation for the filter correction............ 61 6.2 Injection of the observed error into the nominal state............ 62 6.3 ESKF reset................................... 63 6.3.1 Jacobian of the reset operation with respect to the orientation error 63 7 The ESKF using global angular errors 64 7.1 System kinematics in continuous time..................... 65 7.1.1 The true- and nominal-state kinematics................ 65 7.1.2 The error-state kinematics....................... 65 7.2 System kinematics in discrete time...................... 67 7.2.1 The nominal state........................... 67 7.2.2 The error state............................. 67 7.2.3 The error state Jacobian and perturbation matrices......... 67 7.3 Fusing with complementary sensory data................... 68 7.3.1 Error state observation......................... 68 7.3.2 Injection of the observed error into the nominal state........ 69 7.3.3 ESKF reset............................... 69 A Runge-Kutta numerical integration methods 70 A.1 The Euler method............................... 71 A.2 The midpoint method............................. 71 A.3 The RK4 method................................ 72 A.4 General Runge-Kutta method......................... 72 B Closed-form integration methods 73 B.1 Integration of the angular error........................ 74 B.2 Simplified IMU example............................ 74 B.3 Full IMU example................................ 78 3 C Approximate methods using truncated series 80 C.1 System-wise truncation............................. 81 C.1.1 First order truncation: the finite differences method......... 81 C.1.2 N-th order truncation.......................... 82 C.2 Block-wise truncation.............................. 82 D The transition matrix via Runge-Kutta integration 84 D.1 Error-state example............................... 85 E Integration of random noise and perturbations 86 E.1 Noise and perturbation impulses........................ 89 E.2 Full IMU example................................ 89 E.2.1 Noise and perturbation impulses.................... 90 1 Quaternion definition and properties 1.1 Definition of quaternion One introduction to the quaternion that I find particularly attractive is given by the Cayley- Dickson construction: If we have two complex numbers A = a + bi and C = c + di, then constructing Q = A + Cj and defining k , ij yields a number in the space of quaternions H, Q = a + bi + cj + dk H ; (1) 2 where a; b; c; d R, and i; j; k are three imaginary unit numbers defined so that f g 2 f g i2 = j2 = k2 = ijk = 1 ; (2a) − from which we can derive ij = ji = k ; jk = kj = i ; ki = ik = j : (2b) − − − From (1) we see that we can embed complex numbers, and thus real and imaginary num- bers, in the quaternion definition, in the sense that real, imaginary and complex numbers are indeed quaternions, Q = a R H ;Q = bi I H ;Q = a + bi Z H : (3) 2 ⊂ 2 ⊂ 2 ⊂ Likewise, and for the sake of completeness, we may define numbers in the tri-dimensional imaginary subspace of H. We refer to them as pure quaternions, and may note Hp = Im(H) the space of pure quaternions, Q = bi + cj + dk Hp H : (4) 2 ⊂ 4 It is noticeable that, while regular complex numbers of unit length z = eiθ can encode rotations in the 2D plane (with one complex product, x0 = z x), \extended complex · numbers" or quaternions of unit length q = e(uxi+uyj+uzk)θ=2 encode rotations in the 3D space (with a double quaternion product, x0 = q x q∗, as we explain later in this document). ⊗ ⊗ CAUTION: Not all quaternion definitions are the same. Some authors write the products as ib instead of bi, and therefore they get the property k = ji = ij, which results in ijk = 1 and a left-handed quaternion. Also, many authors place the real− part at the end position, yielding Q = ia+jb+kc+d. These choices have no fundamental implications but make the whole formulation different in the details. Please refer to Section3 for further explanations and disambiguation. CAUTION: There are additional conventions that also make the formulation different in details. They concern the \meaning" or \interpretation" we give to the rotation op- erators, either rotating vectors or rotating reference frames {which, essentially, constitute opposite operations. Refer also to Section3 for further explanations and disambiguation. NOTE: Among the different conventions exposed above, this document concentrates on the Hamilton convention, whose most remarkable property is the definition (2). A proper and grounded disambiguation requires to first develop a significant amount of material; therefore, this disambiguation is relegated to the aforementioned Section3. 1.1.1 Alternative representations

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    93 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us