Appendix/Mathematics/EulerAngles
Euler Angles
Here we will follow quite closely the online class notes prepared by Professor Mona Berciu, Department of Physics & Astronomy, University of British Columbia.
Basic Relations
In terms of the (black) unit vectors of the Cartesian coordinate system shown in the left panel of Figure 1, we can specify the (red) vector, , by the expression,
where the three coefficients, , give the length (and direction) of each vector component. Alternatively, in terms of the (black) unit vectors of the Cartesian coordinate system shown in the right panel of Figure 1, the same (red) vector is specified by the expression,
| Figure 1 | |
It is clear from the nature of unit vectors and vector dot-products that the value of the coefficient, — which explicitly appears in the second of these two expressions — may be obtained from the dot product, . The same must be true if we insert, for , the first of the two expressions; that is to say,
|
|
|
Analogously, we can write,
|
|
|
|
|
|
|
This set of three relations therefore provides a generic way to express one set of Cartesian vector projections in terms of the other. When written in matrix form, the set becomes,
|
|
|
|
Alternatively, we could "dot" the unit-vector triplet into the vector, , in which case it would be easy to demonstrate that mapping the other direction is accomplished via the relation,
|
|
|
|
where,
|
|
|
|
|
Adopting the shorthand notation used in Berciu's class notes, we will define,
To be clear, these are not different vectors. They are, rather, two different coordinate representations of the same vector as illustrated in Figure 1. Using this notation, mapping from one representation to the other is accomplished via the compact expressions,
|
Matrix Transpose: By definition, a matrix is the transpose of the matrix — that is, — if for all matrix-element indices, . We recognize, therefore, that
|
|
and, |
|
Specifically, this means that all three diagonal elements (for which, ) are the same in and ; but the locations of paired off-diagonal elements are swapped.
A Sequence of Rotations
It is quite generally true that we can transition/map/migrate from one set of orthogonal unit vectors — such as the inertial/laboratory frame illustrated by the black arrows in the left panel of Figure 1 — to any other set of orthogonal unit vectors — such as the body frame illustrated by the black arrows in the right panel of Figure 1 — by carrying out three rotations. The order in which rotations are carried out is relevant, but one fairly standard sequence of rotations is illustrated in Figure 2:
| Figure 2 | ||
|
Rotation #1 |
Rotation #2 |
Rotation #3 |
First Rotation
As depicted in the left-most panel of Figure 2, rotate the triplet of unit vectors about the (i.e., ) axis by an angle, . The result is the green coordinate system labeled, . Note: (a) The 3' axis remains aligned with the inertial-frame Z-axis; and (b) we will refer to the 1' axis as the line of nodes. Given that the 3' axis is aligned with the Z-axis — that is, — it is easy to recognize that the other two mappings are:
Hence, the corresponding rotation matrix is,
|
|
|
|
Note that the subscript, 3, has been attached to in order to indicate that rotation was about the "third" axis.
Second Rotation
As depicted in the center panel of Figure 2, rotate the triplet of unit vectors about the line of nodes by an angle, . The result is the light-blue coordinate system labeled, (1", 2", 3"). Note: (a) The 1" axis is aligned with the 1' axis (line of nodes); and (b) the values of the first pair of rotation angles, , have been chosen, here, to ensure that the 3" axis aligns with the unit vector. Given that, , the other two mappings are,
and .
The corresponding rotation matrix is, then,
|
|
|
|
In this case the subscript, 1, has been attached to in order to indicate that rotation was about the "first" axis.
Third Rotation
As depicted in the right-most panel of Figure 2, rotate the triplet of unit vectors about the 3" axis by an. angle, . The result is the desired black coordinate system labeled, . Given that this rotation — like the first — calls for rotation about the "third" axis, we can immediately deduce that the relevant rotation matrix is,
|
|
|
|
Other Properties of Particular Note
In her online class notes, Professor Berciu points out:
- . This means that if you rotate, first, by angle followed by a rotation by angle about the same axis(!), it is as if you carry out a single rotation by the angle, .
- In flipping the angle of rotation from positive to negative, the rotation matrix flips to its transpose. That is to say, for example, .
Simple Numerical Example
Suppose we set , which are roughly consistent with the trio of rotation angles displayed in Figure 2. The corresponding trio of rotation matrices are:
|
|
|
|
, |
|
|
|
, |
|
|
|
Combined Transformations
Brute Force
and and
and and
and and
Hence, we have,
|
|
= |
|
|
|
= |
|
|
|
= |
|
|
|
= |
|
And,
|
|
= |
|
|
|
= |
|
|
|
= |
|
|
|
= |
|
And,
|
|
= |
|
|
|
= |
|
|
|
= |
|
|
|
= |
|
We can therefore write,
|
|
|
|
|
|
|
|
Using Matrix Notation
With more finesse, we can write the general rotation matrix that links the body frame, , to the inertial/laboratory frame, , as the product of the three rotations about the corresponding axes:
|
|
|
|
|
Berciu's online class notes, bottom of p. 3 |
||
Carrying out the matrix multiplications, starting from the right, gives,
|
|
|
|
|
|
|
|
This precisely matches the Euler-angle expression for the rotation matrix, , that we derived above using a more brute force approach.
For the simple numerical example established above, these three derivation steps give, respectively,
|
|
|
|
|
|
|
|
|
|
|
|
Following the steps provided above, we recognize that the inverse — or transpose — of this rotation matrix is,
|
|
|
|
|
From the last row of the column labeled "Proper Euler angles" in Wikipedia's discussion of the rotation matrix, we find,
The equivalent expression can be found at the top of p. 4 of Professor Berciu's online class notes; it reads,
These two rotation-matrix expressions are equivalent to one another, but they do not match our derived expression for . Instead, then match our expression for . It is not (yet) clear to us why this is the case. For the simple numerical example established above, the rotation matrix on the right-hand-side of both of these expressions gives,
|
Extra Illustrations
The Order of Rotations
For the most part, we have focused our discussion on the case where three simple rotations are carried out in the order depicted in Figure 2. This sequence — first (about the original axis), second (about the line of nodes), third (about the new, tilted axis) — has been denoted by the mathematical expression,
Berciu's online class notes, bottom of p. 3
It is extremely important to appreciate that the order in which the rotations are carried out matters! On the right-hand-side of our adopted expression, the matrix that specifies the first rotation is placed farthest to the right, while the matrix that specifies the third/last rotation is placed farthest to the left. In the paragraph that follows, we explicitly demonstrate that a different mapping arises if the first and third rotation matrixes are swapped. But, as we shall illustrate, once the order of rotations has been specified, it doesn't matter whether the steps that are taken to combine matrix elements begins with multiplication of the first and second rotation matrices, or begins with multiplication of the second and third matrices.
Steps Taken to Combine Matrix Elements
We can now write the general rotation matrix that links the body frame, , to the inertial/laboratory frame, , as the product of the three rotations about the corresponding axes:
|
|
|
|
|
|
|
|
|
|
|
|
Reversing the Order of Rotations
|
|
|
|
|
|
|
|
|
|
|
|
Switching Coordinate Representations of a Vector
Now, given that,
the following three mapping relations must hold:
|
|
= |
|
|
|
= |
|
|
|
= |
|
Alternatively, given that,
the following additional three mapping relations must hold:
|
|
= |
|
|
|
= |
|
|
|
= |
|
Extending the simple numerical example established above, let's assume that the (red) vector that appears in both panels of Figure 1 has the inertial-frame (left panel) components,
The components of this same (red) vector as viewed from the body frame (right panel of Figure 1) should be,
|
|
|
|
|
|
|
|
|
|
|
|
Out of curiosity, what do we obtain if we use the inverse of the rotation matrix? Well …
|
|
|
|
|
|
|
|
|
|
|
|
See Also
- Wikipedia Chapter on Euler Angles
- Online class notes from Professor Mona Berciu, Department of Physics & Astronomy, University of British Columbia
|
Appendices: | VisTrailsEquations | VisTrailsVariables | References | Ramblings | VisTrailsImages | myphys.lsu | ADS | |