Professional Documents
Culture Documents
RD2 Quaternions
RD2 Quaternions
WORK CAREFULLY!
Given a 3D rigid body with attached coordinate system 𝐵, its orientation 𝑪𝐵𝐼
w.r.t. a reference coordinate system 𝐼, can be defined as the mapping which
maps the coordinates of any fixed vector 𝒓 from 𝐼 to 𝐵, i.e.:
𝐵𝒓 = 𝑪𝐵𝐼 𝐼𝒓 = 𝑹𝐵𝐼 ∙ 𝐼𝒓
This is independent of the location!
𝒓
1.5
𝑒𝑥𝐼 𝑒𝑥𝐵
𝒓 𝐵𝒓 = −0.2
1.5 𝑒𝑧𝐵 0.8
𝐼𝒓 = 0.8 𝐵
0.2
𝐼 𝑒𝑦𝐼 𝑒𝑦𝐵
𝑒𝑧𝐼
Autonomous Systems Lab Michael Blösch | 23/09/2015 | 5
Properties and Challenges of Orientations
Hamilton, 1843
Extension of complex numbers to 4D
𝒒 = 𝑞0 + 𝑞1 𝒊 + 𝑞2 𝒋 + 𝑞3 𝒌 = 𝑞0 , 𝑞1 , 𝑞2 , 𝑞3 ∈ 𝐇
𝒊2 = 𝒋2 = 𝒌2 = 𝒊𝒋𝒌 = −1 (Hamilton convention)
𝒊2 = 𝒋2 = 𝒌2 = 𝒌𝒋𝒊 = −1 (JPL convention)
Real and imaginary parts:
𝑅𝑒 𝒒 = 𝑞0 ∈ 𝑅
𝐼𝑚 𝒒 = 𝑞1 , 𝑞2 , 𝑞3 = 𝒒 ∈ 𝑅 3
𝑞0
𝒒= 𝒒
𝛼𝒂
𝛼
𝑞0 cos 2
𝒒 𝛼, 𝒂 = 𝒒 = 𝛼
sin 𝒂
2
𝛼 𝛼
Check of norm: 𝒒 = 𝑞02 + 𝒒 2 = cos2 + 𝒂 2 sin2 =1
2 2
We will write 𝒒𝐵𝐼 for the quaternion describing the orientation of 𝐵 w.r.t. 𝐼.
Given the unit quaternion 𝒒𝐵𝐼 representing the orientation of 𝐵 w.r.t. 𝐼, one
can show that the following holds:
𝒑 𝐵𝒓 = 𝒒𝐵𝐼 ⊗ 𝒑 𝐼𝒓 ⊗ 𝒒𝑇𝐵𝐼
0 𝑞02 + 𝒒 2 𝑞0 𝒒𝑇 − 𝑞0 𝒒𝑇 + 𝒒𝑇 𝒒× 0
=
𝐵𝒓 𝑞0 𝒒 − 𝑞0 𝒒 + 𝒒× 𝒒 𝒒𝒒𝑇 + 𝑞02 𝑰 − 2𝑞0 𝒒× + 𝒒× 𝒒× 𝐼𝒓
0 1 0 0
= 2
𝐵𝒓 0 𝑞0 − 𝒒 2 𝑰 − 2𝑞0 𝒒× + 𝟐𝒒𝒒𝑇 𝐼 𝒓
𝐵𝒓 = 𝑞02 − 𝒒 2
𝑰 − 2𝑞0 𝒒× + 𝟐𝒒𝒒𝑇 𝐼𝒓
Euler-Angle, Angle-Axis
Singularities!
Rotation Matrix
9 scalars, more complex regularization
Concatenation: 27 multiplications
Rotating a vector: 9 multiplications
Quaternion
4 scalars, easy regularization
Concatenation: 16 multiplications
Rotating a vector: 18 multiplications
𝐵 𝑡+∆𝑡
Autonomous Systems Lab
𝑒𝑧 𝑒𝑦
𝐵(𝑡)
Michael Blösch | 23/09/2015 | 16
Time Derivatives of Unit Quaternions
Given the local rotational velocity 𝐵𝝎𝐼𝐵 (𝑡) of the coordinate system 𝐵 w.r.t.
coordinate system 𝐼, we can derive:
1 1
∆𝑡 ⊗ 𝒒𝐵𝐼 (𝑡) − ⊗ 𝒒𝐵𝐼 (𝑡)
𝒒𝐵𝐼 𝑡 + ∆𝑡 − 𝒒𝐵𝐼 (𝑡) 𝝎
𝐵 𝐼𝐵 𝑡 𝟎
𝒒𝐵𝐼 (𝑡) = lim = lim 2
∆𝑡→0 ∆𝑡 ∆𝑡→0 ∆𝑡
0
∆𝑡 ⊗ 𝒒𝐵𝐼 𝑡
𝐵 𝝎𝐼𝐵 𝑡 1 0
𝒒𝐵𝐼 𝑡 = lim 2 = ⊗ 𝒒𝐵𝐼 𝑡
∆𝑡→0 ∆𝑡 2 𝐵𝝎𝐼𝐵 𝑡
1 0 1
𝒒𝐵𝐼 𝑡 = 𝑴𝒍 𝒒𝐵𝐼 𝑡 = 𝜴( 𝐵𝝎𝐼𝐵 𝑡 )𝒒𝐵𝐼 𝑡
2 𝐵𝝎𝐼𝐵 𝑡 2
=:𝜴( 𝐵𝝎𝐼𝐵 𝑡 )
=:𝜩(𝒒𝐵𝐼 )