Appendix/Mathematics/EulerAngles

From jetwiki
Jump to navigation Jump to search


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 unit vectors of the (X,Y,Z) Cartesian coordinate system shown in the left panel of Figure 1, we can uniquely specify the (red) vector, A, by the expression,

A=eX(AX)+eY(AY)+eZ(AZ)

where the coefficient triplet, (AX,AY,AZ), give the length (and ± direction) of each vector component. Alternatively, in terms of the unit vectors of the (x1,x2,x3) Cartesian coordinate system shown in the right panel of Figure 1, the same (red) vector is specified by the expression,

A=e1(A1)+e2(A2)+e3(A3).

Figure 1

Berciu Figure 1a

Berciu Figure 1b

Now, it is clear from the nature of unit vectors and vector dot-products that the value of the coefficient, A1 — which explicitly appears in the second of these two expressions — may be obtained from the dot product, e1A. The same must be true if we insert, for A, the first of the two expressions; that is to say,

A1=e1A

=

e1eX(AX)+e1eY(AY)+e1eZ(AZ).

Analogously, we can write,

A2=e2A

=

e2eX(AX)+e2eY(AY)+e2eZ(AZ),

A3=e3A

=

e3eX(AX)+e3eY(AY)+e3eZ(AZ).

This set of three relations therefore provides a generic way to express one set of projections in terms of the other. When written in matrix form, the set becomes,

[A1A2A3]

=

[e1eXe1eYe1eZe2eXe2eYe2eZe3eXe3eYe3eZ][AXAYAZ]=R^[AXAYAZ].

Alternatively, we could "dot" the unit-vector triplet (eX,eY,eZ) into the vector, A, in which case it would be easy to demonstrate that mapping the other direction is accomplished via the relation,

[AXAYAZ]

=

R^1[A1A2A3],

where,

R^1

[eXe1eXe2eXe3eYe1eYe2eYe3eZe1eZe2eZe3].

Adopting the shorthand notation used in Berciu's class notes, we will define,

Abody[A1A2A3]

      and,      

AXYZ[AXAYAZ].

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,

Abody=R^AXYZ

      or,      

AXYZ=R^1Abody.


Matrix Transpose:  By definition, a matrix M^ is the transpose of the matrix N^ — that is, M^=N^T — if mij=nji for all matrix-element indices, i,j. We recognize, therefore, that

R^1=R^T

      and,      

R^=[R^1]T.

Specifically, this means that all three diagonal elements (for which, i=j) are the same in R^ and R^1; 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 (eX,eY,eZ) 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 (e1,e2,e3) 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

Berciu Figure 2a

Berciu Figure 2b

Berciu Figure 2c

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 Z (i.e., eZ) axis by an angle, ϕ. The result is the green coordinate system labeled, (1,2,3). 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, e3=eZ — it is easy to recognize that the other two mappings are:

e1=eXcosϕ+eYsinϕ,     and     e2=eYcosϕeXsinϕ.

Hence, the corresponding rotation matrix is,

R^3(ϕ)

=

[e1eXe1eYe1eZe2eXe2eYe2eZe3eXe3eYe3eZ]=[cosϕsinϕ0sinϕcosϕ0001].

Note that the subscript, 3, has been attached to R^ 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 to ensure that the 3" axis aligns with the e3 unit vector. In this case, e1=e1 and the other two mappings are,

e2=e2cosθ+e3sinθ     and     e3=e3cosθe2sinθ.

In this case, then, the corresponding rotation matrix is,

R^1(θ)

=

[e1e1e1e2e1e3e2e1e2e2e2e3e3e1e3e2e3e3]=[1000cosθsinθ0sinθcosθ].

In this case the subscript, 1, has been attached to R^ 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, (e1,e2,e3). Given that this rotation — like the first — calls for rotation about the "third" axis, we can immediately deduce that the relevant rotation matrix is,

R^3(ψ)

=

[cosψsinψ0sinψcosψ0001].

Simple Numerical Example

Suppose we set (ϕ,θ,ψ)=(30,25,15), which are roughly consistent with the trio of rotation angles displayed in Figure 2. The corresponding trio of rotation matrices are:

R^3(ϕ)

=

[0.86600.500000.50000.86600001]

,      

R^1(θ)

=

[10000.90630.422600.42260.9063]

,      

R^3(ψ)

=

[0.96590.258800.25880.96590001].

Combined

We can now write the general rotation matrix that links the body frame, (x1,x2,x3), to the inertial/laboratory frame, (X,Y,Z), as the product of the three rotations about the corresponding axes:

R^(ϕ,θ,ψ)=R^3(ψ)R^1(θ)R^3(ϕ)

=

[cosψsinψ0sinψcosψ0001][1000cosθsinθ0sinθcosθ][cosϕsinϕ0sinϕcosϕ0001].

Carrying out the matrix multiplications, starting from the right, gives,

R^(ϕ,θ,ψ)

=

[cosψsinψ0sinψcosψ0001][cosϕsinϕ0sinϕcosθcosθcosϕsinθsinθsinϕsinθcosϕcosθ]

 

=

[(cosψcosϕsinψsinϕcosθ)(sinϕcosψ+sinψcosθcosϕ)(sinψsinθ)(sinψcosϕsinϕcosθcosψ)(sinψsinϕ+cosψcosθcosϕ)sinθcosψsinθsinϕsinθcosϕcosθ].


For the simple numerical example established above, these three derivation steps give, respectively,

R^(ϕ,θ,ψ)

=

[0.96590.258800.25880.96590001][10000.90630.422600.42260.9063][0.86600.500000.50000.86600001]

 

=

[0.96590.258800.25880.96590001][0.86600.50000.45320.78490.42260.21130.36600.9063]

 

=

[0.71920.68610.10940.66190.62870.40820.21130.36600.9063].



Following the steps provided above, we recognize that the inverse — or transpose — of this rotation matrix is,

R^1=R^T

=

[(cosψcosϕsinψsinϕcosθ)(sinψcosϕsinϕcosθcosψ)(sinθsinϕ)(sinϕcosψ+sinψcosθcosϕ)(sinψsinϕ+cosψcosθcosϕ)(sinθcosϕ)(sinψsinθ)(sinθcosψ)(cosθ)].

From the last row of the column labeled "Proper Euler angles" in Wikipedia's discussion of the rotation matrix, we find,

Z1X2Z3

=

[(c1c3c2s1s3)(c1s3c2c3s1)(s1s2)(c3s1+c1c2s3)(c1c2c3s1s3)(c1s2)(s2s3)(c3s2)(c2)]

The equivalent expression can be found in Professor Berciu's online class notes; it reads,

R^(ϕ,θ,ψ)

=

[(cosϕcosψcosθsinϕsinψ)(cosϕsinψcosθcosψsinϕ)(sinϕsinθ)(cosψsinϕ+cosϕcosθsinψ)(cosϕcosθcosψsinϕsinψ)(cosϕsinθ)(sinθsinψ)(cosψsinθ)(cosθ)]

These two rotation-matrix expressions are equivalent to one another, but they do not match our derived expression for R^. Instead, then match our expression for R^1. It is not (yet) clear to us why this is the case.

Now, given that,

Abody=R^AXYZ,

the following three mapping relations must hold:

A1

=

AX(cosψcosϕsinψsinϕcosθ)+AY(sinϕcosψ+sinψcosθcosϕ)+AZ(sinψsinθ),

A2

=

AX(sinψcosϕsinϕcosθcosψ)+AY(sinψsinϕ+cosψcosθcosϕ)+AZ(sinθcosψ),

A3

=

AX(sinθsinϕ)+AY(sinθcosϕ)+AZ(cosθ).

Alternatively, given that,

AXYZ=R^1Abody,

the following additional three mapping relations must hold:

AX

=

A1(cosψcosϕsinψsinϕcosθ)+A2(sinψcosϕsinϕcosθcosψ)+A3(sinθsinϕ),

AY

=

A1(sinϕcosψ+sinψcosθcosϕ)+A2(sinψsinϕ+cosψcosθcosϕ)+A3(sinθcosϕ),

AZ

=

A1(sinψsinθ)+A2(sinθcosψ)+A3(cosθ).

Extra Illustrations

Part 1

We can now write the general rotation matrix that links the body frame, (x1,x2,x3), to the inertial/laboratory frame, (X,Y,Z), as the product of the three rotations about the corresponding axes:

R^(ϕ,θ,ψ)=R^3(ψ)R^1(θ)R^3(ϕ)

=

[cosψsinψ0sinψcosψ0001][1000cosθsinθ0sinθcosθ][cosϕsinϕ0sinϕcosϕ0001].

R^(ϕ,θ,ψ)

=

[cosψsinψcosθsinψsinθsinψcosψcosθcosψsinθ0sinθcosθ][cosϕsinϕ0sinϕcosϕ0001]

 

=

[(cosψcosϕsinϕsinψcosθ)(cosψsinϕ+cosϕsinψcosθ)(sinψsinθ)(sinψcosϕsinϕcosψcosθ)(sinψsinϕ+cosψcosϕcosθ)(cosψsinθ)(sinϕsinθ)(sinθcosϕ)(cosθ)].

Part 2

Carrying out the matrix multiplications, starting from the right, gives,

R^(ϕ,θ,ψ)

=

[cosψsinψ0sinψcosψ0001][cosϕsinϕ0sinϕcosθcosθcosϕsinθsinθsinϕsinθcosϕcosθ]

 

=

[(cosψcosϕsinψsinϕcosθ)(sinϕcosψ+sinψcosθcosϕ)(sinψsinθ)(sinψcosϕsinϕcosθcosψ)(sinψsinϕ+cosψcosθcosϕ)sinθcosψsinθsinϕsinθcosϕcosθ]

Part 3

From the last row of the column labeled "Proper Euler angles" in Wikipedia's discussion of the rotation matrix, we find,

Z1X2Z3

=

[(c1c3c2s1s3)(c1s3c2c3s1)(s1s2)(c3s1+c1c2s3)(c1c2c3s1s3)(c1s2)(s2s3)(c3s2)(c2)]

The equivalent expression can be found in Professor Berciu's online class notes; it reads,

R^(ϕ,θ,ψ)

=

[(cosϕcosψcosθsinϕsinψ)(cosϕsinψcosθcosψsinϕ)(sinϕsinθ)(cosψsinϕ+cosϕcosθsinψ)(cosϕcosθcosψsinϕsinψ)(cosϕsinθ)(sinθsinψ)(cosψsinθ)(cosθ)]

Part 4

Try reversing the order of rotations:

R^(ϕ,θ,ψ)=R^3(ϕ)R^1(θ)R^3(ψ)

=

[cosϕsinϕ0sinϕcosϕ0001][1000cosθsinθ0sinθcosθ][cosψsinψ0sinψcosψ0001].

R^(ϕ,θ,ψ)

=

[cosϕsinϕcosθsinϕsinθsinϕcosϕcosθcosϕsinθ0sinθcosθ][cosψsinψ0sinψcosψ0001]

 

=

[(cosϕcosψsinψsinϕcosθ)(cosϕsinψ+cosψsinϕcosθ)(sinϕsinθ)(sinϕcosψsinψcosϕcosθ)(sinψsinϕ+cosψcosϕcosθ)(cosϕsinθ)(sinψsinθ)(sinθcosψ)(cosθ)]

See Also


 

Tiled Menu

Appendices: | VisTrailsEquations | VisTrailsVariables | References | Ramblings | VisTrailsImages | myphys.lsu | ADS |