You are on page 1of 7

Coordinate

Transformations via Euler Angle Rotations


J. Riggs
Rev. E - 10 April 2019

Introduction
Coordinate transformations are employed when dealing with vectors in multiple coordinate systems,
or reference frames. For relative motion, one axis system is considered fixed, and a second axis
system is displaced (or rotated) with respect to the fixed axes. For simple dynamics problems, the
fixed axis system is the “inertial” system, and the rotated axes are the “body” axes. In some cases,
however, there are more than two sets of coordinate systems, as is the case where the rotation of the
earth is not negligible and must be accounted for. In such a case, we may employ multiple axis
systems: 1) Earth-Centered, Inertial, (ECI) 2) Earth-Centered, Earth Fixed (ECEF), 3) Local Level,
and 4) Vehicle Body axes.
In this later example, the four coordinate frames represent a cascade of 4 systems in relative motion,
each defined by its orientation relative to its immediate predecessor. In other words, the orientation
of the ECEF frame is defined by its displacement with respect to the ECI reference frame. Likewise,
the local-level reference frame orientation is defined by a set of angular rotations relative to the
ECEF reference frame, and the vehicle body axis orientation is defined by a set of angular rotations
relative to the local-level reference frame. We will begin with a discussion of the general “Inertial”
and “Body” rotation, and will later expand this to our own specific choices for reference frames.

Preliminary Considerations
The approach to coordinate rotations is simple and straightforward. The general rotation of one axis
system is broken down into a series of two-dimensional planar rotations which can be easily derived
by inspection from the problem geometry. Coordinate rotations, however, are not associative, and
therefore the order of rotation sequences is not arbitrary. It must be predetermined and held
invariant. In many dynamics applications, coordinate rotations are performed in Z-Y-X order, or
YAW-PITCH-ROLL. The rotation angle about the Z (yaw) axis is designated . The rotation angle
about the Y (pitch) axis is designated , and the rotation angle about the X (roll) axis is designated
. These are illustrated in the following figures.

Figure 1 YAW Rotation Figure 2 PITCH Rotation Figure 3 - ROLL Rotation

Coordinate Rotation Derivations  Rev E 2019 pg 1


Planar YAW Rotation
Consider the case of a rotation about the Z axis
as depicted in Figure 4. There is a fixed, un-
rotated axis system denoted by X, Y and Z axes
with unit vectors i, j, and k associated with them.
A second axis system is initially aligned with the
first, and then is rotated about the Z axis through
the angle . This rotated set of axes is denoted
by, X  , Y  and Z  , with associated unit vectors
i  , j  and k  . The coordinate transformation
process involves expressing one set of unit
vectors in terms of the other. This mapping
operation is accomplished using the vector dot Figure 4 - YAW Rotation
product.
The expressions for the i, j, and k unit vectors in terms of the rotated axis system are obtained as the
vector sum of the projections of i, j, and k onto the rotated axes. Thus

⋅ ⋅ ⋅
⋅ ⋅ ⋅
⋅ ⋅ ⋅

Now by substituting the definition of the scalar product for the terms in parentheses, (and remember
that i, j, and k are mutually orthogonal) obtain
cos cos cos
cos cos cos
cos cos cos 0
The use of the vector dot product results in the specification of the cosine of the angle between each
pairing of unit vectors, which is where the process gets the name “direction cosine matrix”. Noting
the trigonometric identities
cos 2      sin 
cos 2     sin 
cos 2  0
cos(0)  1
The planar yaw rotation equations become
i  cos i  sin  j 
j  sin  i  cos j 
k  k

Coordinate Rotation Derivations  Rev E 2019 pg 2


It is convenient to express this in matrix form as
 i  cos  sin  0  i  
    
 j    sin cos 0  j  
 k   0 0 1  k  
This is the planar yaw rotation matrix, expressing a vector in the un-rotated frame in terms of the
rotated, i.e. a “body” vector expressed in “inertial” coordinates (or a Body-to-Inertial rotation). This
is referred to as the “Direct transformation”, which is used to express the rotated vector in the fixed
frame.

The term “Direct Transformation” suggests a preference for working in the fixed axis system. This is because the principles
of kinetic analysis (e.g. Newton, LaGrange, Hamilton, etc.) are only valid in an inertial reference frame, thus the equations
of motion must initially be derived in an inertial frame.

When a similar rotation is performed for the pitch and the roll axes, the following results are
obtained:

Planar PITCH Rotation (Direct)


The direct, planar pitch () rotation (rotation about the Y axis)
 i   cos 0 sin    i  
    
 j   0 1 0  j  
 k   sin  0 cos   k  

Planar ROLL Rotation (Direct)


The direct, planar roll () rotation (rotation about the X axis)
 i  1 0 0   i 
    
 j   0 cos   sin    j
    
k  0 sin  cos   k 

The Three‐Dimensional Transformation


Each of these planar rotations may be applied successively to obtain two or three axis rotations.
Note that finite angle rotations are not associative, therefore the rotation sequence is not associative.
When describing the orientation of one reference frame relative to another, the multi-axis rotation
sequence is arbitrary, but once a multi-axis rotation is conducted, the rotation order cannot change,
or the inverse transformation will not hold true. Therefore, it is standard practice to establish the
rotation order, and to always use the same order. In the field of flight dynamics, the order is typically
YAW-PITCH-ROLL (YPR). Note that this YPR sequence is one of six possible permutations.

Coordinate Rotation Derivations  Rev E 2019 pg 3


The general three dimensional transformation matrix for body to inertial axes is obtained by
expanding the matrix multiplication
Yaw Pitch Roll
cos  sin 0  cos 0 sin   1 0 0 
   
TBI    sin cos 0  0 1 0  0 cos   sin  
   
 0 0 1  sin  0 cos  0 sin  cos  

which evaluates (using pre-multiplication) to

Direct Transformation, YPR sequence:

cos cos cos sin  sin   sin cos cos sin  cos  sin  sin 
 
T 
B I   sin  cos sin  sin  sin   cos cos  sin  sin  cos   cos sin  
  sin  cos sin  cos cos 

The Inverse Transformation


A convenient property of the direction cosine matrix is that it’s inverse is equal to its transpose.
Therefore, the inverse transformation is identical to the transpose of the matrix, or in mathematical
terms

T   T 
I B B I
T

and therefore,

Inverse Transformation, YPR sequence:

 cos cos sin cos  sin  


 
T 
IB  cos sin  sin   sin cos sin sin  sin   cos cos cos sin  
cos sin  cos  sin sin sin  sin  cos  cos sin  cos cos 

Applications
The preceding concepts of planar rotation and coordinate frame transformation are now put to some
common applications. A simple application is the description of the orientation of the earth as it
rotates against the background of the stars. This is a system involving two reference frames. The
first is a stationary “inertial” reference frame that is fixed with respect to sidereal space, and the
second is one that is fixed to the earth.

Coordinate Rotation Derivations  Rev E 2019 pg 4


The Earth‐Centered Inertial (ECI) frame
The inertial reference frame is a Cartesian frame which is fixed relative to the stars. Experience has
shown that this reference frame provides accurate results in the analysis if kinetic systems. For
convenience, the inertial axes are aligned to the earth, with the X and Y axes in the equatorial plane,
and the Z axis aligned with the earth spin axis. This reference frame is often located at the center
of mass of the earth. When this is the case, the reference frame is referred to as the earth-centered,
inertial (ECI) reference frame.

The Earth‐Centered, Earth Fixed (ECEF)


Coordinate Frame
By definition, the Earth Centered, Earth Fixed (ECEF) coordinate
frame is located at the center of mass of the earth. The Z-axis is
aligned to the earth polar axis, the X-axis is the normal which passes
through the intersection of the equatorial plane and the reference
meridian, and the Y-axis completes the right-handed reference frame.
This is illustrated in Figure 5. This reference frame is “fixed” to the
earth, such that it rotates with the earth so that any point that is
stationary on the earth is stationery in the ECEF coordinate system.
The rotation of the earth (the ECEF reference frame) is measured
relative to the ECI frame. Figure 6 illustrates the ECEF frame which
Figure 5 ECEF Coordinate Frame
is displaced through a Z-axis (Yaw) rotation relative to the ECI
reference frame. Note that, by definition, when the displacement
angle is zero the ECEF frame is aligned with the ECI frame.
Vectors in the ECEF frame may be transformed to the ECI frame
using the (direct) planar yaw rotation:

cos sin 0
sin cos 0
0 0 1
Figure 6 ECEF Yaw Rotation w/r ECI

cos sin 0 cos sin 0


→ sin cos 0 and → sin cos 0
0 0 1 0 0 1

Coordinate Rotation Derivations  Rev E 2019 pg 5


The Local‐Level Coordinate Frame
It is often convenient to deal with a local coordinate frame which is “level” at some specific location
on the earth. This section presents a method to construct a “Local Level” frame at a given location
on the earth located at latitude , and longitude  with respect to an earth-fixed frame. This is
accomplished through application of the planar rotations previously discussed.

ECEF and Local Level Coordinates


One type of “Local Level” frame at a given location on the earth is defined where the X-axis is
aligned to north, the Y-Axis points to the East, and the Z-Axis points down. This will result in the
X-axis and the Y-axis both being “level” with the local surface, the X-Y plane is a level plane at
that location, with the Z-axis pointing down. Such a reference frame is developed in a four-step
process, as illustrated in Figure 7, where a “North-East-Down” (NED) frame is located at latitude
, and longitude  with respect to the ECEF frame1.

Figure 7 – Development of the NED Local Level Frame

(1) Begin with a reference frame that is aligned with the ECEF frame. This is the reference frame
at position (1).
(2) Rotate the frame about the Z axis (Yaw rotation) to position (2). The illustration shows a negative
yaw rotation, producing a negative longitude angle, , therefore, for the yaw rotation,  = .
(3) Rotate the frame about the Y-axis (pitch rotation) to arrive at position (3). This is a negative
pitch rotation, but a positive angle , therefore .

1
The figure may seem to imply that the latitude angle is geocentric, but this is not necessary. Using a geocentric
latitude will result in an NED frame that is “level” with respect to local gravity, while using geodetic latitude results in
an NED frame that is “level” (locally tangent) with respect to the ellipsoid.

Coordinate Rotation Derivations  Rev E 2019 pg 6


(4) In order to complete the alignment, an additional pitch rotation of ⁄2 is required, resulting
in the final NED frame at position (4) (shown in green).

The resulting reference frame is “level” in the sense that the Z axis is inclined by the latitude angle
at the local latitude, longitude point on the earth, and therefore is aligned with the local “down”
direction. The X-Y plane represents a “level” plane which is perpendicular to the “down” axis at
this location. The X-axis points to the north, and the Y axis points to the east, thus this reference
frame is called the “North, East, Down”, or “NED” frame.
To summarize, the NED reference frame is constructed relative to the ECEF reference frame at a
specified latitude and longitude location, using the latitude and longitude angles, and applying a
Yaw-Pitch rotation sequence, where
and

When these substitutions are made, the following DCM’s are obtained:

YAW (Z) ROTATION


cos sin 0
sin cos 0
0 0 1
PITCH (Y) ROTATION
cos 0 sin sin 0 cos
0 1 0 = 0 1 0
sin 0 cos cos 0 sin

Now the transformation from Local Level (NED) to ECEF is given by a YAW-PITCH rotation
sequence using the two planar rotations, above.

 cos  sin   sin   cos  cos  


Direct: TNED  ECEF     sin  sin  cos   sin  cos  
 cos  0  sin  

and the inverse transformation is obtained from the transpose of the above,

  cos  sin   sin  sin  cos  


Inverse: TECEF  NED     sin  cos  0 
 cos  cos   sin  cos   sin  

Coordinate Rotation Derivations  Rev E 2019 pg 7

You might also like