没有合适的资源?快使用搜索试试~ 我知道了~
首页Quaternion kinematics for the error-state KF.pdf
Quaternion kinematics for the error-state KF.pdf
需积分: 19 203 浏览量
更新于2023-05-21
评论
收藏 684KB PDF 举报
描述了四元数相关得基础理论、公式推导以及根据运动学推导得误差状态方程。。。
资源详情
资源评论
资源推荐

Quaternion kinematics for the error-state KF
Joan Sol`a
July 24, 2016
Contents
1 Quaternions and rotation operations 2
1.1 Definition of quaternion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Alternative representations of the quaternion . . . . . . . . . . . . . . . . . 3
1.3 Some quaternion properties . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Rotations and cross-relations . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Quaternion conventions. My choice. . . . . . . . . . . . . . . . . . . . . . . 17
1.6 Frame composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.7 Perturbations and time-derivatives . . . . . . . . . . . . . . . . . . . . . . 24
1.8 Time-integration of rotation rates . . . . . . . . . . . . . . . . . . . . . . . 26
1.9 Useful, and very useful, Jacobians of the rotation . . . . . . . . . . . . . . 29
2 Error-state kinematics for IMU-driven systems 31
2.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.2 The error-state Kalman filter explained . . . . . . . . . . . . . . . . . . . . 31
2.3 System kinematics in continuous time . . . . . . . . . . . . . . . . . . . . . 32
2.4 System kinematics in discrete time . . . . . . . . . . . . . . . . . . . . . . 38
3 Fusing IMU with complementary sensory data 40
3.1 Observation of the error state via filter correction . . . . . . . . . . . . . . 41
3.2 Injection of the observed error into the nominal state . . . . . . . . . . . . 43
3.3 ESKF reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4 The ESKF using global angular errors 45
4.1 System kinematics in continuous time . . . . . . . . . . . . . . . . . . . . . 45
4.2 System kinematics in discrete time . . . . . . . . . . . . . . . . . . . . . . 47
4.3 Fusing with complementary sensory data . . . . . . . . . . . . . . . . . . . 48
1

A Runge-Kutta numerical integration methods 50
A.1 The Euler method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
A.2 The midpoint method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
A.3 The RK4 method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
A.4 General Runge-Kutta method . . . . . . . . . . . . . . . . . . . . . . . . . 53
B Closed-form integration methods 54
B.1 Integration of the angular error . . . . . . . . . . . . . . . . . . . . . . . . 54
B.2 Simplified IMU example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
B.3 Full IMU example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
C Approximate methods using truncated series 61
C.1 System-wise truncation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
C.2 Block-wise truncation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
D The transition matrix via Runge-Kutta integration 64
D.1 Error-state example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
E Integration of random noise and perturbations 67
E.1 Noise and perturbation impulses . . . . . . . . . . . . . . . . . . . . . . . . 69
E.2 Full IMU example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
1 Quaternions and rotation operations
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)
where {a, b, c, d} ∈ R, and {i, j, k} are three imaginary unit numbers defined so that
i
2
= j
2
= k
2
= 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

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),
Q = bi + cj + dk ∈ I
3
⊂ H . (4)
It is noticeable that, while regular complex numbers of unit length z = e
iθ
can encode
rotations in the 2D plane (with one complex product, x
0
= z ·x), “extended complex
numbers” or quaternions of unit length q = e
(u
x
i+u
y
j+u
z
k)θ/2
encode rotations in the 3D
space (with a double quaternion product, x
0
= 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 Section 1.5 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 Section 1.5 for further explanations and disambiguation.
1.2 Alternative representations of the quaternion
The real + imaginary notation {1, i, j, k} is not always convenient for our purposes. Pro-
vided that the algebra (2) is used, a quaternion can be posed as a sum scalar + vector,
Q = q
w
+ q
x
i + q
y
j + q
z
k ⇔ Q = q
w
+ q
v
, (5)
where q
w
is referred to as the real or scalar part, and q
v
= q
x
i + q
y
j + q
z
k = (q
x
, q
y
, q
z
) as
the imaginary or vector part.
1
It can be also defined as an ordered pair scalar-vector
Q = hq
w
, q
v
i . (6)
We mostly represent a quaternion Q as a 4-vector q ,
q ,
q
w
q
v
=
q
w
q
x
q
y
q
z
, (7)
1
Our choice for the (w, x, y, z) subscripts notation comes from the fact that we are interested in the
geometric properties of the quaternion in the 3D Cartesian space. Other texts often use alternative
subscripts such as (0, 1, 2, 3) (more suited for algebraic interpretations) or (1, i, j, k) (for mathematical
interpretations).
3

which allows us to use matrix algebra for operations involving quaternions. At certain
occasions, we may allow ourselves to mix notations by abusing of the sign “=”. Typical
examples are real quaternions and pure quaternions,
q = q
w
+ q
v
=
q
w
q
v
, real: q
w
=
q
w
0
v
, pure: q
v
=
0
q
v
. (8)
1.3 Some quaternion properties
1.3.1 Sum
The sum is straightforward,
p q =
p
w
p
v
q
w
q
v
=
p
w
q
w
p
v
q
v
. (9)
By construction, the sum is commutative and associative,
p + q = q + p (10)
p + (q + r) = (p + q) + r . (11)
Thus, the set of quaternions endowed with the sum operation form a commutative group,
where the identity is the zero quaternion, q
0
= 0, and the inverse is the negative −q.
1.3.2 Product
Denoted by ⊗, the quaternion product requires using the original form (1) and the quater-
nion algebra (2). Writing the result in vector form gives
p ⊗ q =
p
w
q
w
− p
x
q
x
− p
y
q
y
− p
z
q
z
p
w
q
x
+ p
x
q
w
+ p
y
q
z
− p
z
q
y
p
w
q
y
− p
x
q
z
+ p
y
q
w
+ p
z
q
x
p
w
q
z
+ p
x
q
y
− p
y
q
x
+ p
z
q
w
. (12)
This can be posed also in terms of the scalar and vector parts,
p ⊗ q =
p
w
q
w
− p
>
v
q
v
p
w
q
v
+ q
w
p
v
+ p
v
×q
v
, (13)
where the presence of the cross-product reveals that the quaternion product is not com-
mutative in the general case,
p ⊗ q 6= q ⊗ p . (14)
Exceptions to this general non-commutativity are limited to the cases where p
v
×q
v
= 0,
which happens whenever one quaternion is real, p = p
w
or q = q
w
, or when both vector
parts are parallel, p
v
kq
v
. Only in these cases the quaternion product is commutative.
4

The quaternion product is however associative,
(p ⊗ q) ⊗ r = p ⊗ (q ⊗ r) , (15)
and distributive over the sum,
p ⊗ (q + r) = p ⊗ q + p ⊗ r and (p + q) ⊗ r = p ⊗ r + q ⊗ r . (16)
Thus, quaternions endowed with the product operation ⊗ form a (non-commutative) group.
The group’s elements identity, q
1
= 1, and inverse, q
−1
, are explored below.
The product of two quaternions is bi-linear and can be expressed as two equivalent
matrix products, namely
q
1
⊗ q
2
= [q
1
]
L
q
2
and q
1
⊗ q
2
= [q
2
]
R
q
1
, (17)
where [q
1
]
L
and [q
2
]
R
are respectively the left- and right- quaternion-product matrices,
[q]
L
= q
w
I +
0 −q
>
v
q
v
[q
v
]
×
, [q]
R
= q
w
I +
0 −q
>
v
q
v
−[q
v
]
×
(18)
Here, the skew operator
2
[•]
×
produces the cross-product matrix,
[a]
×
,
0 −a
z
a
y
a
z
0 −a
x
−a
y
a
x
0
, (19)
which is a skew-symmetric matrix, [a]
>
×
= −[a]
×
, left-hand-equivalent to the cross product,
i.e.,
[a]
×
b = a×b , ∀a, b ∈ R
3
. (20)
Finally, since
q ⊗ r ⊗ p = [p]
R
[q]
L
r and q ⊗ r ⊗ p = [q]
L
[p]
R
r (21)
we have the relation
[p]
R
[q]
L
= [q]
L
[p]
R
. (22)
Further properties of these matrices are provided in Section 1.4.7.
2
The skew-operator can be found in the literature in a number of different names and notations, either
related to the cross operator ×, or to the ‘hat’ operator
∧
, so that all these forms are equivalent,
[a]
×
≡ [a
×
] ≡ a× ≡ a
×
≡ [a] ≡
b
a ≡ a
∧
,
5
剩余72页未读,继续阅读



















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0