16.333: Lecture #3
Frame Rotations
Euler Angles
Quaternions
Fall 2004 16.333 3–1
Euler Angles
? For general applications in 3D, often need to perform 3 separate
rotations to relate our “inertial frame” to our “body frame”
– Especially true for aircraft problems
? There are many ways to do this set of rotations - with the variations
be based on the order of the rotations
– All would be acceptable
– Some are more commonly used than others
? Standard: start with the body frame (x,y,z) aligned with the inertial
(X,Y,Z), and then perform 3 rotations to re-orient the body frame.
? Rotate by ψ about Z x
?
,y
?
,z
?
?
? Rotate by θ about y
?
x
??
,y
??
,z
??
?
fi Rotate by φ about x
??
? x,y,z
Euler angles:
– ψ ~ Heading/yaw
– θ ~ Pitch
– φ ~ Roll
Fall 2004 16.333 3–2
Can write these rotations in a convenient form: ?
? ? ? ?? ? ? ?
x
?
cψ sψ 0 X X
??
y
?
?
=
?
?sψ cψ 0
??
Y
?
= T
3
(ψ)
?
Y
z
?
0 0 1 Z Z
? ? ? ?? ? ? ?
x
??
cθ 0 ?sθ x
?
x
?
?
y
??
?
=
?
0 1 0
??
y
?
?
= T
2
(θ)
?
y
?
?
z
??
sθ 0 cθ z
?
z
?
? ? ? ?? ? ? ?
x 1 0 0 x
??
x
??
?
y
?
=
?
0 cφ sφ
??
y
??
?
= T
1
(φ)
?
y
??
?
z 0 ?sφ cφ z
??
z
??
which combines to give:
? ? ? ?
x X
?
y
?
= T
1
(φ)T
2
(θ)T
3
(ψ)
?
Y
?
z Z
? ?? ?
cθcψ cθsψ ?sθ X
?
=
?
?cφsψ + sφsθcψ cφcψ + sφsθsψ sφcθ
??
Y
sφsψ + cφsθcψ ?sφcψ + cφsθsψ cφcθ Z
? Note that the order that these rotations are applied matters and will
greatly change the answer – matrix multiplies of T
i
must be done
consistently.
Fall 2004 16.333 3–3
? To get the angular velocity in this case, we have to include three
terms:
? ψ
˙
about Z
? θ
˙
about y
?
fi φ
˙
about x
??
which we combine to get ?ω
? ω in terms of its components in ?nal frame (body) Want to write ?
– Use the rotation matrices
Example: rotate ψ
˙
about Z ≡ z
?
?
? ?
0
– In terms of X, Y, Z, frame rotation rate has components
?
0
?
,
ψ
˙
which is the same as in frame x
?
, y
?
, z
?
– To transform a vector from x
?
, y
?
, z
?
to x, y, z, need to use T
1
(φ)T
2
(θ)
? ?
0
– Similar operation for θ
˙
about y
?
≡ y
??
use T
1
(φ) on
?
φ
˙ ?
?
0
Final result: ?
? ? ? ? ? ? ? ?
ω
x
0 0 φ
˙
ω
b
=
?
ω
y
?
= T
1
(φ)T
2
(θ)
?
0
?
+ T
1
(φ)
?
θ
˙ ?
+
?
0
?
ω
z
ψ
˙
0 0
ly
rojec-
,z
?
Fall 2004 16.333 3–4
Visualization: Can write ?
?
˙
?
˙
ω = φ +
?
θ
˙
+ ψ
?
˙
?
˙
?
˙
But φ,θ,ψ do not form a mutual
orthogonal triad
Need to form the orthogonal p
tions onto the body frame x, y
? ? ? ? ? ? ? ?
ω
x
0 0 φ
˙
ω
b
=
?
ω
y
?
= T
1
(φ)T
2
(θ)
?
0
?
+ T
1
(φ)
?
θ
˙ ?
+
?
0
?
ω
z
ψ
˙
0 0
Final form ?
˙
ω
x
= φ ? ψ
˙
sin θ
˙
ω
y
= θ
˙
cos φ + ψ cos θ sin φ
˙
ω
z
= ?θ
˙
sin φ + ψ cos θ cos φ
With inverse: ?
φ
˙
= ω
x
+ [ω
y
sin φ + ω
z
cos φ] tan θ
θ
˙
= ω
y
cos φ ? ω
z
sin φ
ψ
˙
= [ω
y
sin φ + ω
z
cos φ] sec θ
Fall 2004 16.333 3–5
? Need to watch for singularities at θ = ±90
?
| |
If we limit ?
ψ ≤ 2π0 ≤
π π
θ?
2
≤ ≤
2
φ < 2π0 ≤
then any possible orientation of the body can be obtained by per-
forming the appropriate rotations in the order given.
? These are a pretty standard set of Euler angles
? ?
? ?
?
?
Fall 2004 16.333 3–6
Quaternions
? Theorem by Euler states that any given sequence of rotations can be
represented as a single rotation about a single ?xed axis
? Quaterions provide a convenient parameterization of this e?ective axis
and the rotation angle
?
?
?
?
?
?
b
1
b
2
b
3
?
?
?
?
E sin ζ/2
cos ζ/2
b =
=
b
4
where E is a unit vector and ζ is a positive rotation about E
Notes:?
– ?b? = 1 and thus there are only 3 degrees of freedom in this
formulation as well
– If b represents the rotational transformation from the reference
frame a to reference frame b, the frame a is aligned with frame b
when frame a is rotated by ζ radians about E
? In terms of the Euler Angles:
sin θ ?2(b
2
b
4
+ b
1
b
3
)=
φ = arctan 2
1
+ b
2
2(b
2
b
3
? b
1
b
4
), 1 ? 2(b
2
2
)
2
+ b
2
ψ = arctan 2 2(b
1
b
2
? b
3
b
4
), 1 ? 2(b
2
3
)
Pros: ?
– Singularity free; Computationally e?cient to do state propagation
in time compared to Euler Angles
Cons:
?
– Far less intuitive - less appealing
? Refs: Kuipers, Quaternions and rotation sequences, 1999 Princeton
University Press.