This action might not be possible to undo. Are you sure you want to continue?
Coordinate System
Transformations
3.1 Problem Statement
We have met the various coordinate systems that will be of primary interest
in the study of ﬂight dynamics. Now we address the subject of how these
coordinate systems are related to one another. For instance, when we begin
to sum the external forces acting on the aircraft, we will have to relate all
these forces to a common reference frame. If we take some bodyaxis system
to be the common frame, then we need to be able to take the gravity vector
(weight) from the local horizontal reference frame, the thrust from some other
bodyaxis frame, and the aerodynamic forces from the windaxis frame, and
represent all these forces in the bodyaxis frame.
Some of these relationships are easy because they are ﬁxed: Two body
axis systems, once deﬁned, are always related by a single rotation around
their common y axis. Others are much more complicated because they vary
with time: The orientation of a given bodyaxis system with respect to the
wind axes determines certain aerodynamic forces and moments which change
that orientation.
First we must characterize the relationship between two coordinate sys
tems at some frozen instant in time. The instantaneous relationship between
two coordinate systems will be addressed by determining a transformation
that will take the representation of an arbitrary vector in one system and
convert it to its representation in the other.
23
24 CHAPTER 3. COORDINATE SYSTEM TRANSFORMATIONS
Three approaches to ﬁnding the needed transformations will be presented.
The ﬁrst is called Direction Cosines, a sort of bruteforce approach to the
problem. Next we will discuss Euler angles, by far the most common ap
proach but one with a potentially serious problem. Finally we will examine
Euler parameters, an elegant solution to the problem found with Euler angles.
3.2 Transformations
3.2.1 Deﬁnitions
Consider two reference frames, F
1
and F
2
, and a vector v whose components
are known in F
1
, represented as {v}
1
:
{v}
1
=
v
x
1
v
y
1
v
z
1
We wish to determine the representation of the same vector in F
2
, or
{v}
2
:
{v}
2
=
v
x
2
v
y
2
v
z
2
These are linear spaces, so the transformation of the vector from F
1
to
F
2
is simply a matrix multiplication which we will denote T
2,1
, such that
{v}
2
= T
2,1
{v}
1
. Transformations such as T
2,1
are called similarity trans
formations. The transformations involved in simple rotations of orthogonal
reference frames have many special properties that will be shown.
The order of subscripts of T
2,1
is such that the left subscript goes with the
system of the vector on the left side of the equation and the right subscript
with the vector on the right. For the matrix multiplication to be conformal
T
2,1
must be a 3x3 matrix:
T
2,1
=
t
11
t
12
t
13
t
21
t
22
t
23
t
31
t
32
t
33
¸
¸
¸
x
1
y
1
z
1
z
2
y
2
x
2
v
3.2. TRANSFORMATIONS 25
Figure 3.1: Two Coordinate Systems
(The t
ij
probably need more subscripting to distinguish them from those
in other transformation matrices, but this gets cumbersome.)
The whole point of the three approaches to be presented is to ﬁgure out
how to evaluate the numbers t
ij
. It is important to note that for a ﬁxed
orientation between two coordinate systems, the numbers t
ij
are the same
quantities no matter how they are evaluated.
3.2.2 Direction Cosines
Derivation
Consider our two reference frames F
1
and F
2
, and the vector v, shown in
ﬁgure 3.1. We claim to know the representation of v in F
1
. The vector v
is the vector sum of the three components v
x
1
i
1
, v
y
1
j
1
, and v
z
1
k
1
so we may
replace the vector by those three components, shown in ﬁgure 3.2
Now, the projection of v onto x
2
is the same as the vector sum of the
projections of each of its components v
x
1
i
1
, v
y
1
j
1
, and v
z
1
k
1
onto x
2
, and
similarly for y
2
and z
2
. Deﬁne the angle generated in going from x
2
to x
1
as
θ
x
2
x
1
. The projection of v
x
1
i
1
onto x
2
therefore has magnitude v
x
1
cos θ
x
2
x
1
and direction i
2
, as shown if ﬁgure 3.3.
To the vector v
x
1
cos θ
x
2
x
1
i
2
must be added the other two projections,
v
y
1
cos θ
x
2
y
1
i
2
and v
z
1
cos θ
x
2
z
1
i
2
. Similar projections onto y
2
and z
2
result in:
x
1
y
1
z
1
z
2
y
2
x
2
v
x1
i
1
v
y1
j
1
v
z1
k
1
x
1 x
2
v
x1
i
1
v
x1
cos θ
x2x1
i
2
θ
x2x1
26 CHAPTER 3. COORDINATE SYSTEM TRANSFORMATIONS
Figure 3.2: Vector in Component Form
Figure 3.3: One Component of the Vector
3.2. TRANSFORMATIONS 27
v
x
2
= v
x
1
cos θ
x
2
x
1
+v
y
1
cos θ
x
2
y
1
+v
z
1
cos θ
x
2
z
1
v
y
2
= v
x
1
cos θ
y
2
x
1
+v
y
1
cos θ
y
2
y
1
+v
z
1
cos θ
y
2
z
1
v
z
2
= v
x
1
cos θ
z
2
x
1
+v
y
1
cos θ
z
2
y
1
+v
z
1
cos θ
z
2
z
1
In vectormatrix notation, this may be written
v
x
2
v
y
2
v
z
2
=
cos θ
x
2
x
1
cos θ
x
2
y
1
cos θ
x
2
z
1
cos θ
y
2
x
1
cos θ
y
2
y
1
cos θ
y
2
z
1
cos θ
z
2
x
1
cos θ
z
2
y
1
cos θ
z
2
z
1
¸
¸
¸
v
x
1
v
y
1
v
z
1
Clearly this is {v}
2
= T
2,1
{v}
1
, so we must have t
ij
= cos θ
(axis)
2
(axis)
1
in
which i or j is 1 if the corresponding (axis) is x, 2 if (axis) is y, and 3 if
(axis) is z.
T
2,1
=
cos θ
x
2
x
1
cos θ
x
2
y
1
cos θ
x
2
z
1
cos θ
y
2
x
1
cos θ
y
2
y
1
cos θ
y
2
z
1
cos θ
z
2
x
1
cos θ
z
2
y
1
cos θ
z
2
z
1
¸
¸
¸
(3.1)
Properties of the Direction Cosine Matrix
The transformation matrix (often called the direction cosine matrix, regard
less of how it is derived or represented) does not depend on the vector v for
its existence. It is therefore the same no matter what we choose for v. If we
take
{v}
1
=
1
0
0
Then {v}
2
is just the ﬁrst column of the direction cosine matrix:
{v}
2
=
cos θ
x
2
x
1
cos θ
y
2
x
1
cos θ
z
2
x
1
28 CHAPTER 3. COORDINATE SYSTEM TRANSFORMATIONS
Since the length of v is 1, we have shown the wellknown property of
direction cosines, that
cos
2
θ
x
2
x
1
+ cos
2
θ
y
2
x
1
+ cos
2
θ
z
2
x
1
= 1
The same obviously holds true for any column of the direction cosine
matrix.
If we need to go the other way, {v}
1
= T
1,2
{v}
2
, it is clear that T
1,2
=
T
−1
2,1
, and we might be tempted to invert the direction cosine matrix. On the
other hand, had we begun by assuming {v}
2
was known, and ﬁguring out
how to get {v}
1
= T
1,2
{v}
2
using similar arguments to the above, we would
have arrived at
v
x
1
v
y
1
v
z
1
=
cos θ
x
1
x
2
cos θ
x
1
y
2
cos θ
x
1
z
2
cos θ
y
1
x
2
cos θ
y
1
y
2
cos θ
y
1
z
2
cos θ
z
1
x
2
cos θ
z
1
y
2
cos θ
z
1
z
2
¸
¸
¸
v
x
2
v
y
2
v
z
2
Here we observe that cos θ
x
1
x
2
is the same as cos θ
x
2
x
1
, cos θ
x
1
y
2
is the
same as cos θ
y
2
x
1
, etc., since (even if we had deﬁned positive rotations of
these angles) the cosine is an even function. So the same transformation is
v
x
1
v
y
1
v
z
1
=
cos θ
x
2
x
1
cos θ
y
2
x
1
cos θ
z
2
x
1
cos θ
x
2
y
1
cos θ
y
2
y
1
cos θ
z
2
y
1
cos θ
x
2
z
1
cos θ
y
2
z
1
cos θ
z
2
z
1
¸
¸
¸
v
x
2
v
y
2
v
z
2
Obviously the columns of T
1,2
are the rows of T
2,1
(and have unit length
as well). This leads us to another nice property of these transformation ma
trices, that the inverse of the direction cosine matrix is equal to its transpose,
T
1,2
= T
−1
2,1
= T
T
2,1
Since T
2,1
T
−1
2,1
= T
2,1
T
T
2,1
= I
3
, the 3 × 3 identity matrix, it must be true
that the scalar (dot) product of any row of T
2,1
with any other row must
be zero. It is easy to show that T
1,2
T
−1
1,2
= T
1,2
T
T
1,2
= I
3
, so the scalar (dot)
product of any column of T
2,1
with any other column must be zero since the
3.2. TRANSFORMATIONS 29
columns of T
2,1
are the rows of T
1,2
. When the rows (or columns) of the
direction cosine matrix are viewed as vectors, this means the rows (or the
columns) form orthogonal bases for 3dimensional space.
Also, with T
2,1
T
T
2,1
= I
3
, if we take the determinant of each side and note
that
T
T
2,1
= T
2,1
, we have
T
2,1
T
T
2,1
=T
2,1

T
T
2,1
=T
2,1
 T
2,1

=T
2,1

2
= 1
The only conclusion we can reach at this point is that T
2,1
 = ±1. Be
cause the identity matrix is a transformation matrix with determinant +1,
and since all other transformations may be reached through continuous rota
tions from the identity transformation, it seems unreasonable to think that
the sign of the determinant would be diﬀerent for some rotations and not
others. We will show in our discussion of Euler angles that the right answer
is indeed T
2,1
 = +1.
While we have 9 variables in T
2,1
= {t
ij
} , i, j = 1 . . . 3, there are 6
nonlinear constraining equations based on the orthogonality of the rows (or
columns) of the matrix. For the rows these are:
t
2
11
+ t
2
12
+ t
2
13
= 1
t
2
21
+ t
2
22
+ t
2
23
= 1
t
2
31
+ t
2
32
+ t
2
33
= 1
t
11
t
21
+t
12
t
22
+t
13
t
23
= 0
t
11
t
31
+t
12
t
32
+t
13
t
33
= 0
t
21
t
31
+t
22
t
32
+t
23
t
33
= 0
The result of these constraints is that there are only 3 independent vari
ables. In principle all nine may be derived given any three that do not violate
a constraint.
3.2.3 Euler angles
If there are only three independent variables in the direction cosine matrix,
then we should be able to express each of the t
ij
in terms of some set of three
x
1
y
1
θ
z
θ
z
x′
y′
z
1
= z′
30 CHAPTER 3. COORDINATE SYSTEM TRANSFORMATIONS
Figure 3.4: Rotation Through θ
z
(not necesarily unique) independent variables. One means of determining
these variables is by use of a famous theorem due to the Swiss mathematician
Leonhard Euler (170783). Brieﬂy, this theorem holds that any arbitrarily
oriented reference frame may be placed in alignment with (made to have axes
parallel to) any other reference frame by three successive rotations about the
axes of the reference frame. The order of selection of axes in these rotations
is arbitrary, but the same axis may not be used twice in succesion. The
rotation sequences are usually denoted by three numbers, 1 for x, 2 for y,
and 3 for z. The twelve valid sequences are 123, 121, 131, 132, 213, 212,
231, 232, 312, 313, 321, and 323. The angles through which these rotations
are performed (deﬁned as positive according to the right hand rule for right
handed coordinate systems) are called generically Euler angles.
The rotation sequence most often used in ﬂight dynamics is the 321, or
z −y −x. Considering a rotation from F
1
to F
2
the ﬁrst rotation (ﬁgure 3.4)
is about z
1
through an angle θ
z
which is positive according to the right hand
rule about the z
1
axis. With two rotations to go, the resulting alignment in
general is oriented with neither F
1
or F
2
, but some intermediate reference
frame (the ﬁrst of two) denoted F
. Since the rotation was about z
1
, z
is
parallel to it but neither of the other two primed axes is.
The next rotation (ﬁgure 3.5) is through an angle θ
y
about the axis y
of the ﬁrst intermediate reference frame to the second intermediate reference
frame, F
. Note that y
= y
, and neither y
or z
are necessarily axes of
either F
1
or F
2
.
x′
y″ = y′
z′
x″
z″
θ
y
θ
y
3.2. TRANSFORMATIONS 31
Figure 3.5: Rotation Through θ
y
The ﬁnal rotation (ﬁgure 3.6) is about x
through angle θ
x
and the ﬁnal
alignment is parallel to the axes of F
2
.
Now assuming we know the angles θ
x
, θ
y
, and θ
z
we need to relate them
to the elements of the direction cosine matrix T
2,1
. We will do this by seeing
how the arbitrary vector v is represented in each of the intermediate and ﬁnal
reference frames in terms of its representation in the prior reference frame.
Consider ﬁrst the rotation about z
1
(Figure 3.7). In terms of the direc
tion cosines previously deﬁned, the angles between the axes are as follows:
between z
1
and z
it is zero; between either z and any x or y it is 90 deg;
between x
1
and x
or y
1
and y
it is θ
z
; between x
1
and y
it is 90 deg +θ
z
;
and between y
1
and x
it is 90 deg −θ
z
. We therefore may write
z″
y″
x″ = x
2
y
2
z
2 θ
x
θ
x
x
1
y
1
θ
z
θ
z
x′
y′
v
v
x
i
1
v
y
1
j
1
v
x′
i′
v
y′
j′
32 CHAPTER 3. COORDINATE SYSTEM TRANSFORMATIONS
Figure 3.6: Rotation Through θ
x
Figure 3.7: Rotation from F
1
to F
3.2. TRANSFORMATIONS 33
v
x
v
y
v
z
=
cos θ
x
x
1
cos θ
x
y
1
cos θ
x
z
1
cos θ
y
x
1
cos θ
y
y
1
cos θ
y
z
1
cos θ
z
x
1
cos θ
z
y
1
cos θ
z
z
1
¸
¸
¸
v
x
1
v
y
1
v
z
1
=
cos θ
z
cos (90 deg −θ
z
) cos 90 deg
cos (90 deg +θ
z
) cos θ
z
cos 90 deg
cos 90 deg cos 90 deg cos 0
¸
¸
¸
v
x
1
v
y
1
v
z
1
=
cos θ
z
sin θ
z
0
−sin θ
z
cos θ
z
0
0 0 1
¸
¸
¸
v
x
1
v
y
1
v
z
1
In short, {v}
= T
F
,1
{v}
1
in which
T
F
,1
=
cos θ
z
sin θ
z
0
−sin θ
z
cos θ
z
0
0 0 1
¸
¸
¸
(3.2)
From the rotation about y
we get {v}
= T
F
,F
{v}
in which
T
F
,F
=
cos θ
y
0 −sin θ
y
0 1 0
sin θ
y
0 cos θ
y
¸
¸
¸
(3.3)
From the rotation about x
, ﬁnally, {v}
2
= T
2,F
{v}
with
T
2,F
=
1 0 0
0 cos θ
x
sin θ
x
0 −sin θ
x
cos θ
x
¸
¸
¸
(3.4)
We now cascade the relationships: {v}
2
= T
2,F
{v}
, {v}
= T
F
,F
{v}
to arrive ﬁrst at {v}
2
= T
2,F
T
F
,F
{v}
and then at {v}
2
= T
2,F
T
F
,F
T
F
,1
{v}
1
,
or
34 CHAPTER 3. COORDINATE SYSTEM TRANSFORMATIONS
{v}
2
=
1 0 0
0 cos θ
x
sin θ
x
0 −sin θ
x
cos θ
x
¸
¸
¸
cos θ
y
0 −sin θ
y
0 1 0
sin θ
y
0 cos θ
y
¸
¸
¸
cos θ
z
sin θ
z
0
−sin θ
z
cos θ
z
0
0 0 1
¸
¸
¸
{v}
1
The transformation matrix we seek is the product of the three sequential
transformations (in the correct order!), or T
2,1
= T
2,F
T
F
,F
T
F
,1
. The details
are slightly tedious, but the result is
T
2,1
=
cos θ
y
cos θ
z
cos θ
y
sin θ
z
−sin θ
y
sin θ
x
sin θ
y
cos θ
z
−cos θ
x
sin θ
z
sin θ
x
sin θ
y
sin θ
z
+cos θ
x
cos θ
z
sin θ
x
cos θ
y
cos θ
x
sin θ
y
cos θ
z
+sin θ
x
sin θ
z
cos θ
x
sin θ
y
sin θ
z
−sin θ
x
cos θ
z
cos θ
x
cos θ
y
¸
¸
¸
¸
¸
¸
¸
¸
Since this is just a diﬀerent way of representing the direction cosine ma
trix, it must be true that cos θ
y
cos θ
z
= cos θ
x
2
x
1
, cos θ
y
sin θ
z
= cos θ
x
2
y
1
,
etc. At this point we may observe that since T
2,1
= T
2,F
T
F
,F
T
F
,1
, we must
have
T
2,1
 = T
2,F
T
F
,F
T
F
,1
 = T
2,F
 T
F
,F
 T
F
,1

The determinant of each of the three intermediate transformations is eas
ily veriﬁed to be +1, so that we have the expected result,
T
2,1
 = +1
It is very important to note that the Euler angles θ
x
, θ
y
, and θ
z
have been
deﬁned for a rotation from F
1
to F
2
using a 321 rotation sequence. Thus, a
321 rotation from F
2
to F
1
(T
1,2
) with suitably deﬁned angles (say, φ
x
, φ
y
,
and φ
z
) would have the same form as given for T
2,1
, but the angles involved
would be physically diﬀerent from those in T
2,1
. So, for the rotation from F
1
to F
2
using a 321 rotation sequence:
3.2. TRANSFORMATIONS 35
T
1,2
=
cos φ
y
cos φ
z
cos φ
y
sin φ
z
−sin φ
y
sin φ
x
sin φ
y
cos φ
z
−cos φ
x
sin φ
z
sin φ
x
sin φ
y
sin φ
z
+cos φ
x
cos φ
z
sin φ
x
cos φ
y
cos φ
x
sin φ
y
cos φ
z
+sin φ
x
sin φ
z
cos φ
x
sin φ
y
sin φ
z
−sin φ
x
cos φ
z
cos φ
x
cos φ
y
¸
¸
¸
¸
¸
¸
¸
¸
Alternatively we may note that T
1,2
= T
−1
2,1
= T
T
2,1
and may write the
matrix
T
1,2
=
cos θ
y
cos θ
z
sin θ
x
sin θ
y
cos θ
z
−cos θ
x
sin θ
z
cos θ
x
sin θ
y
cos θ
z
+sin θ
x
sin θ
z
cos θ
y
sin θ
z
sin θ
x
sin θ
y
sin θ
z
+cos θ
x
cos θ
z
cos θ
x
sin θ
y
sin θ
z
−sin θ
x
cos θ
z
−sin θ
y
sin θ
x
cos θ
y
cos θ
x
cos θ
y
¸
¸
¸
¸
¸
¸
¸
¸
The two matrices are the same, only the deﬁnitions of the angles are
diﬀerent. Clearly the relationships among the two sets of angles are non
trivial.
In short, the deﬁnitions of Euler angles are unique to the rotation sequence
used and the decision as to which frame one goes from and which one goes
to in that sequence. We will normally deﬁne our Euler angles going in only
one direction using a 321 rotation sequence, and rely on relationships like
T
1,2
= T
−1
2,1
= T
T
2,1
to obtain the other.
3.2.4 Euler parameters
The derivation of Euler parameters is at appendix A. They are based on the
observation that any two coordinate systems are instantaneously related by
a single rotation about some axis that has the same representation in each
system. The axis, called the eigenaxis, has direction cosines ξ, ζ, and χ; the
angle of rotation is η. Then, with the deﬁnition of the Euler parameters
36 CHAPTER 3. COORDINATE SYSTEM TRANSFORMATIONS
q
0
.
=cos (η/2)
q
1
.
=ξ sin (η/2)
q
2
.
=ζ sin (η/2)
q
3
.
=χsin (η/2)
(3.5)
the transformation matrix becomes:
T
2,1
=
(q
2
0
+ q
2
1
−q
2
2
−q
2
3
) 2 (q
1
q
2
+ q
0
q
3
) 2 (q
1
q
3
−q
0
q
2
)
2 (q
1
q
2
−q
0
q
3
) (q
2
0
−q
2
1
+ q
2
2
−q
2
3
) 2 (q
2
q
3
+ q
0
q
1
)
2 (q
1
q
3
+ q
0
q
2
) 2 (q
2
q
3
−q
0
q
1
) (q
2
0
−q
2
1
−q
2
2
+ q
2
3
)
¸
¸
¸
(3.6)
Euler parameters have one great disadvantage relative to Euler angles:
Euler angles may in most cases be easily visualized. If one is given values of
θ
x
, θ
y
, and θ
z
it is not hard to visualize the relative orientation of two coordi
nate systems. A given set of Euler parameters, however, conveys almost no
information about how the systems are related. Thus even in applications
in which Euler parameters are preferred (such as in ﬂight simulation), the
results are very often converted to Euler angles for ease of interpretation and
visualization.
The direct approach to convert a set of Euler parameters to the corre
sponding set of Euler angles is to equate corresponding elements of the two
representations of the transformation matrix. We may combine the (2,3) and
(3,3) entries to obtain
sin θ
x
cos θ
y
cos θ
x
cos θ
y
= tan θ
x
=
2 (q
2
q
3
+ q
0
q
1
)
q
2
0
−q
2
1
−q
2
2
+ q
2
3
θ
x
= tan
−1
t
23
t
33
= tan
−1
¸
2 (q
2
q
3
+ q
0
q
1
)
q
2
0
−q
2
1
−q
2
2
+ q
2
3
, −π ≤ θ
x
< π
From the (1,3) entry we have
−sin θ
y
= 2 (q
1
q
3
−q
0
q
2
)
3.2. TRANSFORMATIONS 37
θ
y
= −sin
−1
(t
13
) = −sin
−1
(2q
1
q
3
−2q
0
q
2
) , −π/2 ≤ θ
y
≤ π/2
Finally we use the (1,1) and (1,2) entries to yield
cos θ
y
sin θ
z
cos θ
y
cos θ
z
= tan θ
z
=
2 (q
1
q
2
+ q
0
q
3
)
q
2
0
+ q
2
1
−q
2
2
−q
2
3
θ
z
= tan
−1
t
12
t
11
= tan
−1
¸
2 (q
1
q
2
+ q
0
q
3
)
q
2
0
+ q
2
1
−q
2
2
−q
2
3
, 0 ≤ θ
z
≤ 2π
With the arctangent functions one has to be careful to not divide by
zero when evaluating the argument. Most software libraries have the two
argument arctangent function which avoids this problem and helps keep track
of the quadrant. In summary,
θ
x
= tan
−1
2(q
2
q
3
+q
0
q
1
)
q
2
0
−q
2
1
−q
2
2
+q
2
3
, −π ≤ θ
x
< π
θ
y
= −sin
−1
(2q
1
q
3
−2q
0
q
2
) , −π/2 ≤ θ
y
≤ π/2
θ
z
= tan
−1
2(q
1
q
2
+q
0
q
3
)
q
2
0
+q
2
1
−q
2
2
−q
2
3
, 0 ≤ θ
z
≤ 2π
(3.7)
Going the other way, from Euler angles to Euler parameters, has been
studied extensively. It may be done in a somewhat similar manner to equat
ing elements of the transformation matrix. Another more elegant method
due to Junkins and Turner
1
yields a very nice result, here presented without
proof:
q
0
= cos (θ
z
/2) cos (θ
y
/2) cos (θ
x
/2) + sin (θ
z
/2) sin (θ
y
/2) sin (θ
x
/2)
q
1
= cos (θ
z
/2) cos (θ
y
/2) sin (θ
x
/2) −sin (θ
z
/2) sin (θ
y
/2) cos (θ
x
/2)
q
2
= cos (θ
z
/2) sin (θ
y
/2) cos (θ
x
/2) + sin (θ
z
/2) cos (θ
y
/2) sin (θ
x
/2)
q
3
= sin (θ
z
/2) cos (θ
y
/2) cos (θ
x
/2) −cos (θ
z
/2) sin (θ
y
/2) sin (θ
x
/2)
(3.8)
1
Junkins, J.L. and Turner, J.D., “Optional Continuous Torque Attitude Maneuvers,”
AIAAAAS Astrodynamics Conference, Palo Alto, California, August 1978.
38 CHAPTER 3. COORDINATE SYSTEM TRANSFORMATIONS
Just one ﬁnal note on Euler parameters. Frequently in the literature
Euler parameters are referred to as quaternions. However, quaternions are
actually deﬁned as halfscalar, halfvector entities in some coordinate system
as
˜
Q = q
0
+ q
1
i + q
2
j + q
3
k. The algebra of quaternions is useful for proving
theorems regarding Euler parameters, but will not be used in this course.
3.3 Transformations of Systems of Equations
Suppose we have a linear system of equations in some reference frame F
1
:
{y}
1
= A
1
{x}
1
We know the transformation to F
2
(T
2,1
) and wish to represent the same
equations in that reference frame. Each side of {y}
1
= A
1
{x}
1
is a vector in
F
1
, so we transform both sides as T
2,1
{y}
1
= {y}
2
= T
2,1
A
1
{x}
1
. Then we
may insert the identity matrix in the form of T
T
2,1
T
2,1
in the right hand side
to yield {y}
2
= T
2,1
A
1
T
T
2,1
T
2,1
{x}
1
. The reason for doing this is to transform
the vector {x}
1
to {x}
2
= T
2,1
{x}
1
. Grouping terms we have the result,
{y}
2
= T
2,1
A
1
T
T
2,1
{x}
2
= A
2
{x}
2
With the conclusion that the transformation of a matrix A
1
from F
1
to
F
2
(or the equivalent operation performed by A
1
in F
2
) is given by
A
2
= T
2,1
A
1
T
T
2,1
(3.9)
This is sometimes spoken of as the transformation of a matrix. Such
transformations may be very useful. For example, if we could ﬁnd F
2
and
T
2,1
such that A
2
is diagonal, then the system of equations {y}
2
= A
2
{x}
2
is very easy to solve. The original variables can then be recovered by {y}
1
=
T
T
2,1
{y}
2
, {x}
1
= T
T
2,1
{x}
2
.
3.4. CUSTOMS AND CONVENTIONS 39
3.4 Customs and Conventions
3.4.1 Names of Euler angles
Some transformation matrices occur frequently, and the 321 Euler angles
associated with them are given special symbols. These are summarized as
follows:
T
F
2
,F
1
θ
x
θ
y
θ
z
T
B,H
φ θ ψ
T
W,H
µ γ χ
T
B,W
0 α −β
(3.10)
3.4.2 Principal Values of Euler angles
The principal range of values of the Euler angles is ﬁxed largely by convention
and may vary according to the application. In this course the convention is
−π≤θ
x
< π
−π/2≤θ
y
≤ π/2
0≤θ
z
< 2π
(3.11)
These ranges are most frequently used in ﬂight dynamics, although occa
sionaly one sees −π < θ
z
≤ π and 0 < θ
x
≤ 2π.
by far the most common approach but one with a potentially serious problem.1 .1 are called similarity transformations. and a vector v whose components are known in F1 . F1 and F2 . For the matrix multiplication to be conformal T2. represented as {v}1 : v x1 {v}1 = v y1 v z1 We wish to determine the representation of the same vector in F2 .1 Transformations Deﬁnitions Consider two reference frames. COORDINATE SYSTEM TRANSFORMATIONS Three approaches to ﬁnding the needed transformations will be presented. 3. Finally we will examine Euler parameters.2 3.24 CHAPTER 3. a sort of bruteforce approach to the problem. or {v}2 : v x2 {v}2 = v y2 v z2 These are linear spaces. The ﬁrst is called Direction Cosines. Transformations such as T2. so the transformation of the vector from F1 to F2 is simply a matrix multiplication which we will denote T2. The transformations involved in simple rotations of orthogonal reference frames have many special properties that will be shown. an elegant solution to the problem found with Euler angles.1 . The order of subscripts of T2.2.1 is such that the left subscript goes with the system of the vector on the left side of the equation and the right subscript with the vector on the right.1 {v}1 . Next we will discuss Euler angles. such that {v}2 = T2.1 must be a 3x3 matrix: t11 t12 t13 = t21 t22 t23 t31 t32 t33 T2.
shown in ﬁgure 3. the projection of v onto x2 is the same as the vector sum of the projections of each of its components vx1 i1 . We claim to know the representation of v in F1 . but this gets cumbersome. 3.3. shown in ﬁgure 3. and similarly for y2 and z2 .2. The projection of vx1 i1 onto x2 therefore has magnitude vx1 cos θx2 x1 and direction i2 . Deﬁne the angle generated in going from x2 to x1 as θx2 x1 . Similar projections onto y2 and z2 result in: . vy1 j1 .1. The vector v is the vector sum of the three components vx1 i1 . It is important to note that for a ﬁxed orientation between two coordinate systems. and the vector v.2 Direction Cosines Derivation Consider our two reference frames F1 and F2 .3.2 Now. and vz1 k1 so we may replace the vector by those three components. vy1 cos θx2 y1 i2 and vz1 cos θx2 z1 i2 . To the vector vx1 cos θx2 x1 i2 must be added the other two projections. the numbers tij are the same quantities no matter how they are evaluated.2. TRANSFORMATIONS 25 x1 v x2 y1 z2 y2 z1 Figure 3. as shown if ﬁgure 3. vy1 j1 .) The whole point of the three approaches to be presented is to ﬁgure out how to evaluate the numbers tij .1: Two Coordinate Systems (The tij probably need more subscripting to distinguish them from those in other transformation matrices. and vz1 k1 onto x2 .
2: Vector in Component Form x1 x2 v x 1i 1 θ x 2x 1 v x 1 cos θ x 2x 1 i 2 Figure 3. COORDINATE SYSTEM TRANSFORMATIONS x1 x2 y1 z2 v x 1i 1 v y 1j1 y2 z1 v z 1k1 Figure 3.3: One Component of the Vector .26 CHAPTER 3.
and 3 if (axis) is z. If we take 1 {v}1 = 0 0 Then {v}2 is just the ﬁrst column of the direction cosine matrix: cos θx2 x1 {v}2 = cos θy2 x1 cos θz2 x1 . this may be written v x2 v y2 v z2 cos θx2 x1 cos θx2 y1 cos θx2 z1 vx1 = cos θy2 x1 cos θy2 y1 cos θy2 z1 vy1 cos θz2 x1 cos θz2 y1 cos θz2 z1 v z1 Clearly this is {v}2 = T2. regardless of how it is derived or represented) does not depend on the vector v for its existence. cos θx2 x1 cos θx2 y1 cos θx2 z1 = cos θy2 x1 cos θy2 y1 cos θy2 z1 cos θz2 x1 cos θz2 y1 cos θz2 z1 T2. TRANSFORMATIONS 27 vx2 = vx1 cos θx2 x1 +vy1 cos θx2 y1 +vz1 cos θx2 z1 vy2 = vx1 cos θy2 x1 +vy1 cos θy2 y1 +vz1 cos θy2 z1 vz2 = vx1 cos θz2 x1 +vy1 cos θz2 y1 +vz1 cos θz2 z1 In vectormatrix notation. It is therefore the same no matter what we choose for v. so we must have tij = cos θ(axis)2 (axis)1 in which i or j is 1 if the corresponding (axis) is x.3.1 (3.1 {v}1 . 2 if (axis) is y.1) Properties of the Direction Cosine Matrix The transformation matrix (often called the direction cosine matrix.2.
2 T1.2 {v}2 using similar arguments to the above. so the scalar (dot) product of any column of T2.1 with any other column must be zero since the . it must be true that the scalar (dot) product of any row of T2. {v}1 = T1.2 = T1. and we might be tempted to invert the direction cosine matrix.1 .2 = I3 .1 −1 T Since T2. had we begun by assuming {v}2 was known. This leads us to another nice property of these transformation matrices.2 = −1 T2.2 are the rows of T2. we have shown the wellknown property of direction cosines. So the same transformation is v x1 v y1 v z1 cos θx2 x1 cos θy2 x1 cos θz2 x1 vx2 = cos θx2 y1 cos θy2 y1 cos θz2 y1 vy2 cos θx2 z1 cos θy2 z1 cos θz2 z1 v z2 Obviously the columns of T1.1 T2.1 (and have unit length as well). since (even if we had deﬁned positive rotations of these angles) the cosine is an even function. etc.1 T2. If we need to go the other way. it is clear that T1.1 = I3 . −1 T T1.. that the inverse of the direction cosine matrix is equal to its transpose.2 = T2.2 T1.1 = T2. It is easy to show that T1. cos θx1 y2 is the same as cos θy2 x1 .1 = T2. we would have arrived at v x1 v y1 v z1 cos θx1 x2 cos θx1 y2 cos θx1 z2 vx2 = cos θy1 x2 cos θy1 y2 cos θy1 z2 vy2 cos θz1 x2 cos θz1 y2 cos θz1 z2 v z2 Here we observe that cos θx1 x2 is the same as cos θx2 x1 .2 {v}2 . On the other hand. and ﬁguring out how to get {v}1 = T1.28 CHAPTER 3. the 3 × 3 identity matrix. COORDINATE SYSTEM TRANSFORMATIONS Since the length of v is 1. that cos2 θx2 x1 + cos2 θy2 x1 + cos2 θz2 x1 = 1 The same obviously holds true for any column of the direction cosine matrix.1 with any other row must −1 T be zero.
1 = T2.1  = T2. .1  T2.1 = T2.1 T2. it seems unreasonable to think that the sign of the determinant would be diﬀerent for some rotations and not others. with T2. Because the identity matrix is a transformation matrix with determinant +1. T Also. this means the rows (or the columns) form orthogonal bases for 3dimensional space. . While we have 9 variables in T2. if we take the determinant of each side and note T that T2. i.2. we have T T T2.1 are the rows of T1.3. 3.1  = ±1.2. When the rows (or columns) of the direction cosine matrix are viewed as vectors. j = 1 . For the rows these are: t2 + t2 + t2 = 1 11 12 13 2 2 t21 + t22 + t2 = 1 23 2 2 t31 + t32 + t2 = 1 33 t11 t21 +t12 t22 +t13 t23 = 0 t11 t31 +t12 t32 +t13 t33 = 0 t21 t31 +t22 t32 +t23 t33 = 0 The result of these constraints is that there are only 3 independent variables. In principle all nine may be derived given any three that do not violate a constraint.1 = T2. We will show in our discussion of Euler angles that the right answer is indeed T2.2 . TRANSFORMATIONS 29 columns of T2.1 . there are 6 nonlinear constraining equations based on the orthogonality of the rows (or columns) of the matrix. 3.1 T2.1 = I3 .1  T2.3 Euler angles If there are only three independent variables in the direction cosine matrix. and since all other transformations may be reached through continuous rotations from the identity transformation.1 = {tij } .1 2 = 1 The only conclusion we can reach at this point is that T2.1  = +1. then we should be able to express each of the tij in terms of some set of three .
321. z is parallel to it but neither of the other two primed axes is. The twelve valid sequences are 123. 212.4) is about z1 through an angle θz which is positive according to the right hand rule about the z1 axis. 121. With two rotations to go. The next rotation (ﬁgure 3. 312. 213. 132. 231. but some intermediate reference frame (the ﬁrst of two) denoted F . and neither y or z are necessarily axes of either F1 or F2 . 131. The order of selection of axes in these rotations is arbitrary. One means of determining these variables is by use of a famous theorem due to the Swiss mathematician Leonhard Euler (170783). 232. Considering a rotation from F1 to F2 the ﬁrst rotation (ﬁgure 3. The rotation sequences are usually denoted by three numbers.30 CHAPTER 3. the resulting alignment in general is oriented with neither F1 or F2 . and 323. F . The angles through which these rotations are performed (deﬁned as positive according to the right hand rule for right handed coordinate systems) are called generically Euler angles. this theorem holds that any arbitrarily oriented reference frame may be placed in alignment with (made to have axes parallel to) any other reference frame by three successive rotations about the axes of the reference frame. or z − y − x. . The rotation sequence most often used in ﬂight dynamics is the 321.4: Rotation Through θz (not necesarily unique) independent variables.5) is through an angle θy about the axis y of the ﬁrst intermediate reference frame to the second intermediate reference frame. 2 for y. but the same axis may not be used twice in succesion. 313. Note that y = y . Brieﬂy. COORDINATE SYSTEM TRANSFORMATIONS x1 θz x′ y1 θz y′ z1 = z′ Figure 3. and 3 for z. 1 for x. Since the rotation was about z1 .
θy . between x1 and x or y1 and y it is θz . and θz we need to relate them to the elements of the direction cosine matrix T2. Consider ﬁrst the rotation about z1 (Figure 3. We will do this by seeing how the arbitrary vector v is represented in each of the intermediate and ﬁnal reference frames in terms of its representation in the prior reference frame. between either z and any x or y it is 90 deg. TRANSFORMATIONS 31 x″ θy x′ θy z′ z″ y″ = y′ Figure 3.1 . between x1 and y it is 90 deg +θz . Now assuming we know the angles θx . the angles between the axes are as follows: between z1 and z it is zero. We therefore may write . In terms of the direction cosines previously deﬁned.7).5: Rotation Through θy The ﬁnal rotation (ﬁgure 3.3.6) is about x through angle θx and the ﬁnal alignment is parallel to the axes of F2 . and between y1 and x it is 90 deg −θz .2.
32 CHAPTER 3. COORDINATE SYSTEM TRANSFORMATIONS x″ = x 2 z2 θx θx z″ y2 y″ Figure 3.6: Rotation Through θx x1 θz v x ′i′ x′ vx i1 v v y 1j 1 v y ′j′ y1 θz y′ Figure 3.7: Rotation from F1 to F .
{v} = TF .2) From the rotation about y we get {v} = TF {v} in which TF .F TF . {v}2 = T2.1 (3.F TF .F {v} and then at {v}2 = T2. {v} = TF {v}1 in which cos θz sin θz 0 = − sin θz cos θz 0 0 0 1 .4) We now cascade the relationships: {v}2 = T2.F {v} . TRANSFORMATIONS 33 vx v y vz = = = cos θx x1 cos θx y1 cos θx z1 vx1 cos θy x1 cos θy y1 cos θy z1 vy1 cos θz x1 cos θz y1 cos θz z1 v z1 cos (90 deg −θz ) cos 90 deg vx1 cos θz cos θz cos 90 deg vy1 cos (90 deg +θz ) v z1 cos 90 deg cos 90 deg cos 0 cos θz sin θz 0 vx1 − sin θz cos θz 0 vy1 v z1 0 0 1 .1 {v}1 .1 In short.3) From the rotation about x .F TF . or .3. ﬁnally.F {v} with 1 0 0 = 0 cos θx sin θx 0 − sin θx cos θx T2.2.F {v} to arrive ﬁrst at {v}2 = T2.F cos θy 0 − sin θy = 0 1 0 sin θy 0 cos θy (3.F (3.F TF .
for the rotation from F1 to F2 using a 321 rotation sequence: .1 cos θy cos θz sin θx sin θy cos θz − cos θx sin θz cos θx sin θy cos θz + sin θx sin θz cos θy sin θz sin θx sin θy sin θz + cos θx cos θz cos θx sin θy sin θz − sin θx cos θz sin θx cos θy cos θx cos θy − sin θy Since this is just a diﬀerent way of representing the direction cosine matrix.1 . φx . and φz ) would have the same form as given for T2. Thus. but the result is = T2. and θz have been deﬁned for a rotation from F1 to F2 using a 321 rotation sequence. φy . a 321 rotation from F2 to F1 (T1.1  = +1 It is very important to note that the Euler angles θx . we must have T2. The details are slightly tedious. COORDINATE SYSTEM TRANSFORMATIONS 1 0 0 cos θy 0 − sin θy cos θz sin θz 0 {v}2 = 0 cos θx sin θx 0 1 0 − sin θz cos θz 0 {v}1 0 − sin θx cos θx sin θy 0 cos θy 0 0 1 The transformation matrix we seek is the product of the three sequential transformations (in the correct order!). cos θy sin θz = cos θx2 y1 .1 . So.F TF TF .1 = T2.F TF . but the angles involved would be physically diﬀerent from those in T2. θy .1 . or T2. etc.2 ) with suitably deﬁned angles (say.F TF . T2.1  .F TF . so that we have the expected result. At this point we may observe that since T2.1 .1  = T2.1  = T2.F TF .F .34 CHAPTER 3.F The determinant of each of the three intermediate transformations is easily veriﬁed to be +1.1 = T2. it must be true that cos θy cos θz = cos θx2 x1 .F  TF  TF .
In short. TRANSFORMATIONS 35 = cos φy cos φz sin φx sin φy cos φz − cos φx sin φz cos φx sin φy cos φz + sin φx sin φz T1. ζ. with the deﬁnition of the Euler parameters . called the eigenaxis.1 and may write the matrix cos θy cos θz = cos θ sin θ y z − sin θy sin θx sin θy cos θz − cos θx sin θz sin θx sin θy sin θz + cos θx cos θz sin θx cos θy cos θx sin θy cos θz + sin θx sin θz cos θx sin θy sin θz − sin θx cos θz cos θx cos θy T1. We will normally deﬁne our Euler angles going in only one direction using a 321 rotation sequence.2 The two matrices are the same.2 cos φy sin φz sin φx sin φy sin φz + cos φx cos φz cos φx sin φy sin φz − sin φx cos φz sin φx cos φy cos φx cos φy − sin φy −1 T Alternatively we may note that T1. only the deﬁnitions of the angles are diﬀerent. 3.2.1 = T2. has direction cosines ξ. and χ.4 Euler parameters The derivation of Euler parameters is at appendix A.2 = T2.1 = T2.1 to obtain the other. the deﬁnitions of Euler angles are unique to the rotation sequence used and the decision as to which frame one goes from and which one goes to in that sequence. Clearly the relationships among the two sets of angles are nontrivial. They are based on the observation that any two coordinate systems are instantaneously related by a single rotation about some axis that has the same representation in each system. Then. the angle of rotation is η. The axis.3.2 = T2. and rely on relationships like −1 T T1.2.
q2 =ζ sin (η/2) . A given set of Euler parameters.3) entries to obtain sin θx cos θy 2 (q2 q3 + q0 q1 ) = tan θx = 2 2 2 2 cos θx cos θy q0 − q1 − q2 + q 3 θx = tan−1 t23 t33 = tan−1 2 (q2 q3 + q0 q1 ) . and θz it is not hard to visualize the relative orientation of two coordinate systems.3) and (3. q3 =χ sin (η/2) the transformation matrix becomes: (3.3) entry we have − sin θy = 2 (q1 q3 − q0 q2 ) . We may combine the (2.5) T2. −π ≤ θx < π 2 2 2 − q 1 − q 2 + q3 2 q0 From the (1. q1 =ξ sin (η/2) .1 2 2 2 2 (q0 + q1 − q2 − q3 ) 2 (q1 q2 + q0 q3 ) 2 (q1 q3 − q0 q2 ) 2 2 2 2 = 2 (q1 q2 − q0 q3 ) (q0 − q1 + q2 − q3 ) 2 (q2 q3 + q0 q1 ) 2 2 2 2 2 (q2 q3 − q0 q1 ) (q0 − q1 − q2 + q3 ) 2 (q1 q3 + q0 q2 ) (3. q0 =cos (η/2) . Thus even in applications in which Euler parameters are preferred (such as in ﬂight simulation). θy .6) Euler parameters have one great disadvantage relative to Euler angles: Euler angles may in most cases be easily visualized. conveys almost no information about how the systems are related.36 CHAPTER 3. however. The direct approach to convert a set of Euler parameters to the corresponding set of Euler angles is to equate corresponding elements of the two representations of the transformation matrix. COORDINATE SYSTEM TRANSFORMATIONS . the results are very often converted to Euler angles for ease of interpretation and visualization. If one is given values of θx .
In summary.1) and (1. −π/2 ≤ θy ≤ π/2 Finally we use the (1. θx = tan−1 θz = tan−1 2(q2 q3 +q0 q1 ) 2 2 2 2 q0 −q1 −q2 +q3 . TRANSFORMATIONS 37 θy = − sin−1 (t13 ) = − sin−1 (2q1 q3 − 2q0 q2 ) .2.3. Most software libraries have the twoargument arctangent function which avoids this problem and helps keep track of the quadrant. California. and Turner.D.7) . It may be done in a somewhat similar manner to equating elements of the transformation matrix. has been studied extensively. Another more elegant method due to Junkins and Turner 1 yields a very nice result.L.8) Junkins..2) entries to yield 2 (q1 q2 + q0 q3 ) cos θy sin θz = tan θz = 2 2 2 2 cos θy cos θz q 0 + q 1 − q2 − q 3 t12 t11 2 (q1 q2 + q0 q3 ) . . J. J. here presented without proof: q0 = cos (θz /2) cos (θy /2) cos (θx /2) + sin (θz /2) sin (θy /2) sin (θx /2) q1 = cos (θz /2) cos (θy /2) sin (θx /2) − sin (θz /2) sin (θy /2) cos (θx /2) q2 = cos (θz /2) sin (θy /2) cos (θx /2) + sin (θz /2) cos (θy /2) sin (θx /2) q3 = sin (θz /2) cos (θy /2) cos (θx /2) − cos (θz /2) sin (θy /2) sin (θx /2) 1 (3. August 1978.” AIAAAAS Astrodynamics Conference. 0 ≤ θz ≤ 2π 2 2 2 + q 1 − q2 − q3 θz = tan−1 = tan−1 2 q0 With the arctangent functions one has to be careful to not divide by zero when evaluating the argument. “Optional Continuous Torque Attitude Maneuvers. 0 ≤ θz ≤ 2π θy = − sin−1 (2q1 q3 − 2q0 q2 ) . Palo Alto. −π/2 ≤ θy ≤ π/2 2(q1 q2 +q0 q3 ) 2 2 2 2 q0 +q1 −q2 −q3 Going the other way. from Euler angles to Euler parameters. −π ≤ θx < π (3.
1 (3. so we transform both sides as T2. then the system of equations {y}2 = A2 {x}2 is very easy to solve. However. For example. 3. T {y}2 = T2.1 ) and wish to represent the same equations in that reference frame. COORDINATE SYSTEM TRANSFORMATIONS Just one ﬁnal note on Euler parameters.1 {x}1 . .1 T2. {x}1 = T2. The reason for doing this is to transform the vector {x}1 to {x}2 = T2. Then we T may insert the identity matrix in the form of T2. Frequently in the literature Euler parameters are referred to as quaternions.1 such that A2 is diagonal.9) This is sometimes spoken of as the transformation of a matrix.1 A1 T2.1 {x}1 .3 Transformations of Systems of Equations Suppose we have a linear system of equations in some reference frame F1 : {y}1 = A1 {x}1 We know the transformation to F2 (T2.1 in the right hand side T to yield {y}2 = T2. The algebra of quaternions is useful for proving theorems regarding Euler parameters. quaternions are actually deﬁned as halfscalar. halfvector entities in some coordinate system ˜ as Q = q0 + q1 i + q2 j + q3 k. Each side of {y}1 = A1 {x}1 is a vector in F1 .1 {y}2 .1 A1 T2.1 {x}2 = A2 {x}2 With the conclusion that the transformation of a matrix A1 from F1 to F2 (or the equivalent operation performed by A1 in F2 ) is given by T A2 = T2.1 A1 T2.1 T2.38 CHAPTER 3. Grouping terms we have the result. Such transformations may be very useful.1 {y}1 = {y}2 = T2. The original variables can then be recovered by {y}1 = T T T2. if we could ﬁnd F2 and T2.1 A1 {x}1 . but will not be used in this course.1 {x}2 .
3. .4 3.H TW. and the 321 Euler angles associated with them are given special symbols.4.10) θ ψ γ χ α −β 3.F1 TB. These are summarized as follows: TF2 .H TB.2 Principal Values of Euler angles The principal range of values of the Euler angles is ﬁxed largely by convention and may vary according to the application.4.11) These ranges are most frequently used in ﬂight dynamics. although occasionaly one sees −π < θz ≤ π and 0 < θx ≤ 2π.1 Customs and Conventions Names of Euler angles Some transformation matrices occur frequently.4. In this course the convention is −π≤θx < π −π/2≤θy ≤ π/2 0≤θz < 2π (3.W θx θ y φ µ 0 θz (3. CUSTOMS AND CONVENTIONS 39 3.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.