You are on page 1of 9

Review of the 3-2-1 Euler Angles:

a yawpitchroll sequence
by H. Alemi Ardakani & T. J. Bridges
Department of Mathematics, University of Surrey, Guildford GU2 7XH UK
April 15, 2010
1 Introduction
The 3 2 1 Euler angles are one of the most widely used parameterisations of
rotations. OReilly gives a history on page 184 of [4]. This review will give an
overview of the important feautures of this set of Euler angles, and show that they
are the ones used in [2] and [3].
Let {E
1
, E
2
, E
3
} be a basis for a xed spatial frame, and let {e
1
, e
2
, e
3
} be a
basis for a body frame. The 3 2 1 Euler angles provide an orthogonal matrix
Q which maps {E
1
, E
2
, E
3
} to {e
1
, e
2
, e
3
},
{E
1
, E
2
, E
3
}
Q
{e
1
, e
2
, e
3
}
by breaking the action of Q up into three steps
{E
1
, E
2
, E
3
} {a
1
, a
2
, a
3
} {b
1
, b
2
, b
3
} {e
1
, e
2
, e
3
} ,
where {a
1
, a
2
, a
3
} and {b
1
, b
2
, b
3
} are intermediate frames of reference.
2 Map from E
j
to a
j
: the yaw rotation
In this section the details of the map
{E
1
, E
2
, E
3
}
L(,E
3
)
{a
1
, a
2
, a
3
}
are constructed using the rotation tensor
L(, E
3
) = (I E
3
E
3
) cos +

E
3
sin +E
3
E
3
, (2.1)
where
(a b) c := (b c) a , a, b, c R
3
,
1

, yaw
, pitch

, roll
Figure 1: Schematic of the yaw-pitch-roll motion in terms of the Euler angles ,
and .
and
a :=
_
_
0 a
3
a
2
a
3
0 a
1
a
2
a
1
0
_
_
. (2.2)
The hat-matrix has the property that
a b = a b, a, b R
3
.
The rotation (2.1) is a counterclockwise rotation about the Zaxis as shown schemat-
ically in Figure 1.
The new basis is
a
1
= L(, E
3
)E
1
= E
1
cos +E
3
E
1
sin
a
2
= L(, E
3
)E
2
= E
2
cos +E
3
E
2
sin
a
3
= L(, E
3
)E
3
= E
3
.
Using the identities
E
1
E
2
= E
3
, E
3
E
1
= E
2
, E
2
E
3
= E
1
,
the matrix representation of the map is
_
_
a
1
a
2
a
3
_
_
=
_
_
cos sin 0
sin cos 0
0 0 1
_
_
_
_
E
1
E
2
E
3
_
_
.
This is the rst equation of (6.23) on page 184 of [4].
2
3 Map from a
j
to b
j
: the pitch rotation
In this section the details of the map
{a
1
, a
2
, a
3
}
L(,a
2
)
{b
1
, b
2
, b
3
}
are constructed using the rotation tensor
L(, a
2
) = (I a
2
a
2
) cos +a
2
sin +a
2
a
2
, (3.3)
where
a
2
= E
1
sin +E
2
cos .
The new basis is
b
1
= L(, a
2
)a
1
= a
1
cos +a
2
a
1
sin
b
2
= L(, a
2
)a
2
= a
2
b
3
= L(, a
2
)a
3
= a
3
cos +a
2
a
3
sin ,
with matrix representation,
_
_
b
1
b
2
b
3
_
_
=
_
_
cos 0 sin
0 1 0
sin 0 cos
_
_
_
_
a
1
a
2
a
3
_
_
.
This is the second equation of (6.23) on page 184 of [4].
4 Map from b
j
to e
j
: the roll rotation
In this section the details of the map
{b
1
, b
2
, b
3
}
L(,b
1
)
{e
1
, e
2
, e
3
}
are constructed using the rotation tensor
L(, b
1
) = (I b
1
b
1
) cos +

b
1
sin +b
1
b
1
, (4.4)
where
b
1
= a
1
cos a
3
sin .
The new basis is
e
1
= L(, b
1
)b
1
= b
1
e
2
= L(, b
1
)b
2
= b
2
cos +b
1
b
2
sin
e
3
= L(, b
1
)b
3
= b
3
cos +b
1
b
3
sin ,
with matrix representation,
_
_
e
1
e
2
e
3
_
_
=
_
_
1 0 0
0 cos sin
0 sin cos
_
_
_
_
b
1
b
2
b
3
_
_
.
This is the third equation of (6.23) on page 184 of [4].
3
5 The composite rotation from E
j
to e
j
In this section the details of the map
{E
1
, E
2
, E
3
}
L(,b
1
)L(,a
2
)L(,a
3
)
{e
1
, e
2
, e
3
}
are constructed. Using the above results
_
_
e
1
e
2
e
3
_
_
=
_
_
1 0 0
0 cos sin
0 sin cos
_
_
_
_
cos 0 sin
0 1 0
sin 0 cos
_
_
_
_
cos sin 0
sin cos 0
0 0 1
_
_
_
_
E
1
E
2
E
3
_
_
=
_
_
cos 0 sin
sin sin cos sin cos
cos sin sin cos cos
_
_
_
_
cos sin 0
sin cos 0
0 0 1
_
_
_
_
E
1
E
2
E
3
_
_
=
_
_
cos cos cos sin sin
sin sin cos cos sin sin sin sin + cos cos sin cos
cos sin cos + sin sin cos sin sin sin cos cos cos
_
_
_
_
E
1
E
2
E
3
_
_
.
Write this as
e = Q
T
E.
Then
Q =
_
_
cos cos sin sin cos cos sin cos sin cos + sin sin
cos sin sin sin sin + cos cos cos sin sin sin cos
sin sin cos cos cos
_
_
.
(5.5)
To see that this is the correct Q, construct Q directly.
6 Direct construction of Q
By denition
Q = L(, b
1
)L(, a
2
)L(, E
3
) .
In order to construct a matrix representation of the composite rotation, use the
property of rotation tensors
L(, Rb) = RL(, b) R
T
.
when R is any proper rotation. Dene
A
3
= L(, E
3
) , A
2
= L(, E
2
) , A
1
= L(, E
1
) .
Then
L(, a
2
) = L(, A
3
E
2
) = A
3
A
2
A
T
3
,
4
and
L(, b
1
) = L(, L(, a
2
)a
1
)
= L(, a
2
)L(, a
1
)L(, a
2
)
T
= A
3
A
2
A
T
3
L(, a
1
)A
3
A
T
2
A
T
3
= A
3
A
2
A
T
3
L(, A
3
E
1
)A
3
A
T
2
A
T
3
= A
3
A
2
A
T
3
A
3
A
1
A
T
3
A
3
A
T
2
A
T
3
= A
3
A
2
A
1
A
T
2
A
T
3
.
Hence
Q = A
3
A
2
A
1
A
T
2
A
T
3
A
3
A
2
A
T
3
A
3
= A
3
A
2
A
1
=
_
A
T
1
A
T
2
A
T
3
_
T
.
with matrix representation
Q =
_
_
_
_
1 0 0
0 cos sin
0 sin cos
_
_
_
_
cos 0 sin
0 1 0
sin 0 cos
_
_
_
_
cos sin 0
sin cos 0
0 0 1
_
_
_
_
T
,
conrming the form of Q.
7 Angular velocities
To compute angular velocities start with the representation
Q = A
3
A
2
A
1
=
_
_
cos sin 0
sin cos 0
0 0 1
_
_
_
_
cos 0 sin
0 1 0
sin 0 cos
_
_
_
_
1 0 0
0 cos sin
0 sin cos
_
_
,
and use the properties

A
1
A
T
1
=

E
1
,

A
2
A
T
2
=


E
2
,

A
3
A
T
3
=


E
3
.
Now dierentiate Q,

Q =

A
3
A
2
A
1
+A
3

A
2
A
1
+A
3
A
2

A
1
.
The body angular velocity is

b
:= Q
T

Q
= A
T
1
A
T
2
A
T
3
_

Q
_
= A
T
1
A
T
2
A
T
3
_

A
3
A
2
A
1
+A
3

A
2
A
1
+A
3
A
2

A
1
_
=

A
T
1
A
T
2

E
3
A
2
A
1
+

A
T
1

E
2
A
1
+

E
1
.
5
But
A
T
1

E
2
A
1
=

(A
T
1
E
2
) ,
and
A
T
1
E
2
=
_
(I E
1
E
1
) cos sin

E
1
+E
1
E
1
_
E
2
= E
2
cos sin E
1
E
2
= E
2
cos E
3
sin .
Similarly
A
T
2

E
3
A
2
=

(A
T
2
E
3
) ,
and
A
T
2
E
3
=
_
(I E
2
E
2
) cos sin

E
2
+E
2
E
2
_
E
3
= E
3
cos sin E
2
E
3
= E
3
cos E
1
sin .
Continuing
A
T
1
A
T
2

E
3
A
2
A
1
=

(A
T
1
(E
3
cos E
1
sin ) ,
and
A
T
1
(E
3
cos E
1
sin ) = E
1
sin + cos A
T
1
E
3
= E
1
sin + cos (E
3
cos E
1
E
3
sin )
= E
1
sin + cos (E
3
cos +E
2
sin )
= E
1
sin +E
2
cos sin +E
3
cos cos .
Substitute into the expression for the body angular velocity,

b
=

(E
1
sin +E
2
cos sin +E
3
cos cos )
+

(E
2
cos E
3
sin ) +

E
1
= E
1
(



sin ) +E
2
(

cos sin +

cos )
+E
3
(

cos cos

sin ) .
In [4] the body angular velocity is denoted by
0R
and the above expression for
b
agrees with
0R
on page 188 of [4].
In matrix form
_
_

b
1

b
2

b
3
_
_
=
_
_
1 0 sin
0 cos cos sin
0 sin cos cos
_
_
_
_

_
_
.
Write this is

b
= B
1

.
6
Then
B =
_
_
1 sin tan cos tan
0 cos sin
0 sin sec cos sec
_
_
.
As shown below in 9, this expression agrees with [B] := B in [2] and in [3].
8 Small angle approximation
For small angle approximation rewrite the body representation of the angular ve-
locity as
_
_

b
1

b
2

b
3
_
_
=
_
_

_
_
+
_
_
0 0 sin
0 cos 1 cos sin
0 sin cos cos 1
_
_
_
_

_
_
.
Hence for small angles
_
_

b
1

b
2

b
3
_
_
=
_
_

_
_
+
_
_
0 0
0
1
2

0
1
2

1
2

2
_
_
_
_

_
_
+ .
Neglecting the higher order terms, the small angle approximation is
_
_

b
1

b
2

b
3
_
_

_
_

_
_
.
The problem is how to approximate the rotation matrix. The rotation matrix lies
on a manifold so standard linearization will result in a matrix which is no longer a
rotation. Applying the small angle approximation to Q in (5.5)
Q
approx
=
_
_
1
1
1
_
_
= I +

, =
_
_

_
_
.
The problem is that Q
approx
is no longer a rotation
(Q
approx
)
T
= (Q
approx
)
1
.
Using this approximation will give some motion of a vehicle but not a rotation.
There is however a standard way to approximate a rotation matrix using the Cayley
transform. Redene Q
approx
as
Q
cayley
:= (I +
1
2

)(I
1
2

)
1
.
Then Q
cayley
is orthogonal and so is a rotation, and it has the same order of accuracy
as Q
approx
.
7
In general the angular velocity can be linearized, but extra care is necessary in
linearizing rotations. On the other hand, there is no reason for these linearizations.
In both analysis and numerics it is better to use the exact expressions, even for small
angles..
9 Notation in [3]
On page 222 of [3] the ship translational displacements, denoted by (
1
,
2
,
3
), in the
steady moving system and the Eulerian angles, denoted by (e
1
, e
2
, e
3
), are related
by
_
_
_
_
_
_
_
_

3
e
1
e
2
e
3
_
_
_
_
_
_
_
_
=
_

_
[R] 0
0 [B]
_

_
_
_
_
_
_
_
_
_
u
1
u
2
u
3
u
4
u
5
u
6
_
_
_
_
_
_
_
_
. (9.1)
This is equation (5) in [3]. In equations (6)-(7) in [3], the matrices [B] and [R] are
dened as follows
[B] =
_
_
1 sin e
1
tan e
2
cos e
1
tan e
2
0 cos e
1
sin e
1
0 sin e
1
sec e
2
cos e
1
sec e
2
_
_
,
and
[R] =
_
_
cos e
2
cos e
3
sin e
1
sin e
2
cos e
3
cos e
1
sin e
3
cos e
1
sin e
2
cos e
3
+ sin e
1
sin e
2
cos e
2
sin e
3
sin e
1
sin e
2
sin e
3
+ cos e
1
cos e
3
sin e
1
sin e
2
sin e
3
sin e
1
cos e
3
sin e
2
sin e
1
cos e
2
cos e
1
cos e
2
_
_
.
Replacing e
1
= , e
2
= , e
3
= and
1
= q
1
,
2
= q
2
and
3
= q
3
it is clear (after
correcting two boxed typos in [R] ) that [R] = Q and [B] = B. The rst boxed
term should be sin e
2
sin e
3
and the second boxed term should be sin e
1
cos e
1
.
In (9.1), the angular velocity (u
4
, u
5
, u
6
) is related to the Euler angles by
_
_
u
4
u
5
u
6
_
_
= [B]
1
_
_
e
1
e
2
e
3
_
_
.
Hence it is clear that u
4
=
b
1
, u
5
=
b
2
, u
6
=
b
3
.
References
[1] H. Alemi Ardakani & T.J. Bridges. Shallow-water sloshing in rotating
vessels. Part 2. Three-dimensional ow eld, Preprint: University of Surrey
(2009).
8
[2] Z. Huang. Nonlinear shallow water ow on deck and its eect on ship motion,
PhD Thesis, Technical University of Novia Scotia (1995).
[3] Z. Huang & C.C. Hsiung. Nonlinear shallow-water ow on deck coupled with
ship motion, Proceedings of the twenty-rst symposium on naval hydrodynam-
ics (1997).
[4] O.M. OReilly. Intermediate Dynamics for Engineers: a Unied Treatment of
Newton-Euler and Lagrangian Mechanics, Cambridge University Press (2008).
9

You might also like