Euler angles

From Wikipedia, the free encyclopedia

This article deals with the use of the word in mathematics. For the use of the word in aerospace engineering see Tait-Bryan rotations

The Euler angles were developed by Leonhard Euler to describe the orientation of a rigid body (a body in which the relative position of all its points is constant) in 3-dimensional Euclidean space. To give an object a specific orientation it may be subjected to a sequence of three rotations described by the Euler angles. This is equivalent to saying that a rotation matrix can be decomposed as a product of three elemental rotations.

Contents

[edit] Definition

Euler angles - The xyz (fixed) system is shown in blue, the XYZ (rotated) system is shown in red. The line of nodes, labeled N, is shown in green.
Euler angles - The xyz (fixed) system is shown in blue, the XYZ (rotated) system is shown in red. The line of nodes, labeled N, is shown in green.

Euler angles are a means of representing the spatial orientation of any frame of the space as a composition of rotations from a reference frame. In the following we denote the fixed system in lower case (x,y,z) and the rotated system in upper case letters (X,Y,Z).

The definition is Static. The intersection of the xy and the XY coordinate planes is called the line of nodes (N).

  • α is the angle between the x-axis and the line of nodes.
  • β is the angle between the z-axis and the Z-axis.
  • γ is the angle between the line of nodes and the X-axis.

This previous definition is called z-x-z convention and is the most usual. Unfortunately the order in which the angles are given and even the axes about which they are applied has never been “agreed” upon. When using Euler angles the order and the axes about which the rotations are applied should be supplied. Mathworld does a good job describing this issue.

Euler angles are one of several ways of specifying the relative orientation of two such coordinate systems. Moreover, different authors may use different sets of angles to describe these orientations, or different names for the same angles. Therefore a discussion employing Euler angles should always be preceded by their definition.

[edit] Angle ranges

  • α and γ range from 0 to 2π radians.
  • β ranges from 0 to π radians.

These angles are uniquely determined, with certain exceptions.

  • With α and γ, 0 and 2π radians give the same 3D rotation.
  • With β, 0 and π give the same 3D rotation.

This corresponds to the xy and the XY planes being identical, so the rotation is just a rotation of α+γ about the z-axis. (This last ambiguity is known as gimbal lock in applications.)

[edit] Matrix notation

Behavior of a reference frame embedded in a body, under modification of its Euler angles. Using z-x-z convention.
Behavior of a reference frame embedded in a body, under modification of its Euler angles. Using z-x-z convention.

We call [\mathbf{R}] the matrix that represents the coordinates of the referred frame with respect to the reference frame. The theorem of decomposition of Euler guarantees that its matrix is equivalent to the composition of three rotations. The most used is the so called z-x-z

[\mathbf{R}] = \begin{bmatrix}
\cos \gamma & -\sin \gamma & 0 \\
\sin \gamma & \cos \gamma & 0 \\
0 & 0 & 1 \end{bmatrix} \begin{bmatrix}
1 & 0 & 0 \\
0 & \cos \beta & -\sin \beta \\
0 & \sin \beta & \cos \beta \end{bmatrix} \begin{bmatrix}
\cos \alpha & -\sin \alpha & 0 \\
\sin \alpha & \cos \alpha & 0 \\
0 & 0 & 1 \end{bmatrix}


Notice that independently each matrix refers to a rotation around an axis, but when they are multiplied,

  • The inner (rightmost) matrix refers to a rotation around the axis ' z ' of the referred frame
  • The outer (leftmost) matrix refers a to rotation around the axis ' Z ' of the reference frame
  • The one in the middle represents a rotation around the line of nodes.

[edit] Other conventions

Behavior of a reference frame embedded in a body, under modification of its Euler angles. Using x-y-z convention.
Behavior of a reference frame embedded in a body, under modification of its Euler angles. Using x-y-z convention.

There are 12 possible conventions regarding the Euler angles in use. The above description works for the z-x-z form. Similar conventions are obtained just renaming the axis (zyz, xyx, xzx, yzy, yxy). There are six possible combinations of this kind, and all of them behave in an identical way to the one described before. Just imagine the three axis with other names. This first convention is sometimes known as Cardan angles or nautical angles, because their relationship with Cardan's gimbals.

A second kind of conventions is with the three rotation matrices with a different axis. z-y-x for example. There are also six possibilities of this kind. They behave slightly differently. In the zyx case, the two first rotations determine the line of nodes and the axis x, and the third rotation is around x.

Because their relationship with Tait-Bryan rotations, this second kind of convention sometimes are referred to as "yaw, pitch and roll", or Tait-Bryan angles, though usually this name is reserved for intrinsic angles in a moving frame.

To add to the confusion, flight and aerospace engineers, when using yaw, pitch and roll to refer to rotations about moving frames, often call these Euler angles. These rotations in moving frames are properly known as Tait-Bryan rotations.

[edit] Table of matrices

The following matrices assume fixed (world) axes and column vectors, with rotations acting on objects rather than on reference frames. A matrix like that for xzy is constructed as a product of three matrices, Rot(y3)Rot(z2)Rot(x1). To obtain a matrix for the same axis order but with rotating (body) axes, use the matrix for yzx with θ1 and θ3 swapped. In the matrices, c1 represents cos(θ1), s1 represents sin(θ1), and similarly for the other subscripts.

xzx \begin{bmatrix}
 c_2 & - c_1 s_2 & s_1 s_2 \\
 c_3 s_2 & c_1 c_2 c_3 - s_1 s_3 & - c_2 c_3 s_1 - c_1 s_3 \\
 s_2 s_3 & c_3 s_1 + c_1 c_2 s_3 & c_1 c_3 - c_2 s_1 s_3
\end{bmatrix} xzy \begin{bmatrix}
c_2 c_3 & s_1 s_3 - c_1 c_3 s_2 & c_3 s_1 s_2 + c_1 s_3 \\
 s_2 & c_1 c_2 & - c_2 s_1 \\
 -c_2 s_3 & c_3 s_1 + c_1 s_2 s_3 & c_1 c_3 - s_1 s_2 s_3
\end{bmatrix}
xyx \begin{bmatrix}
c_2 & s_1 s_2 & c_1 s_2 \\
 s_2 s_3 & c_1 c_3 - c_2 s_1 s_3 & - c_3 s_1 - c_1 c_2 s_3 \\
 -c_3 s_2 & c_2 c_3 s_1 + c_1 s_3 & c_1 c_2 c_3 - s_1 s_3
\end{bmatrix} xyz \begin{bmatrix}
c_2 c_3 & c_3 s_1 s_2 - c_1 s_3 & c_1 c_3 s_2 + s_1 s_3 \\
 c_2 s_3 & c_1 c_3 + s_1 s_2 s_3 & c_1 s_2 s_3 - c_3 s_1 \\
 -s_2 & c_2 s_1 & c_1 c_2
\end{bmatrix}
yxy \begin{bmatrix}
 c_1 c_3 - c_2 s_1 s_3 & s_2 s_3 & c_3 s_1 + c_1 c_2 s_3 \\
 s_1 s_2 & c_2 & - c_1 s_2 \\
 -c_2 c_3 s_1 - c_1 s_3 & c_3 s_2 & c_1 c_2 c_3 - s_1 s_3
\end{bmatrix} yxz \begin{bmatrix}
c_1 c_3 - s_1 s_2 s_3 & - c_2 s_3 & c_3 s_1 + c_1 s_2 s_3 \\
 c_3 s_1 s_2 + c_1 s_3 & c_2 c_3 & s_1 s_3 - c_1 c_3 s_2 \\
 -c_2 s_1 & s_2 & c_1 c_2
\end{bmatrix}
yzy \begin{bmatrix}
c_1 c_2 c_3 - s_1 s_3 & - c_3 s_2 & c_2 c_3 s_1 + c_1 s_3 \\
 c_1 s_2 & c_2 & s_1 s_2 \\
 -c_3 s_1 - c_1 c_2 s_3 & s_2 s_3 & c_1 c_3 - c_2 s_1 s_3
\end{bmatrix} yzx \begin{bmatrix}
c_1 c_2 & - s_2 & c_2 s_1 \\
 c_1 c_3 s_2 + s_1 s_3 & c_2 c_3 & c_3 s_1 s_2 - c_1 s_3 \\
 c_1 s_2 s_3 - c_3 s_1 & c_2 s_3 & c_1 c_3 + s_1 s_2 s_3
\end{bmatrix}
zyz \begin{bmatrix}
c_1 c_2 c_3 - s_1 s_3 & - c_2 c_3 s_1 - c_1 s_3 & c_3 s_2 \\
 c_3 s_1 + c_1 c_2 s_3 & c_1 c_3 - c_2 s_1 s_3 & s_2 s_3 \\
 -c_1 s_2 & s_1 s_2 & c_2
\end{bmatrix} zyx \begin{bmatrix}
c_1 c_2 & - c_2 s_1 & s_2 \\
 c_3 s_1 + c_1 s_2 s_3 & c_1 c_3 - s_1 s_2 s_3 & - c_2 s_3 \\
 s_1 s_3 - c_1 c_3 s_2 & c_3 s_1 s_2 + c_1 s_3 & c_2 c_3
\end{bmatrix}
zxz \begin{bmatrix}
c_1 c_3 - c_2 s_1 s_3 & - c_3 s_1 - c_1 c_2 s_3 & s_2 s_3 \\
 c_2 c_3 s_1 + c_1 s_3 & c_1 c_2 c_3 - s_1 s_3 & - c_3 s_2 \\
 s_1 s_2 & c_1 s_2 & c_2
\end{bmatrix} zxy \begin{bmatrix}
c_1 c_3 + s_1 s_2 s_3 & c_1 s_2 s_3 - c_3 s_1 & c_2 s_3 \\
 c_2 s_1 & c_1 c_2 & - s_2 \\
 c_3 s_1 s_2 - c_1 s_3 & c_1 c_3 s_2 + s_1 s_3 & c_2 c_3
\end{bmatrix}

[edit] Relationship with physical motions

[edit] Euler rotations

Precession of the frame of a gyroscope. The second and third Euler angles of the frame are constant
Precession of the frame of a gyroscope. The second and third Euler angles of the frame are constant

Euler rotations are defined as the movement we obtain by changing one of the Euler angles while leaving the other two constant. Euler rotations are never expressed in terms of the external frame, or in terms of the co-moving rotated body frame, but in a mixture. They constitute a mixed axes of rotation system, where the first angle moves the line of nodes around the external axis z, the second rotates around the line of nodes and the third one is an intrinsic rotation around an axis fixed in the body that moves.

These rotations are called Precession, Nutation, and intrinsic rotation and, at difference from other systems of rotations, they are commutative. The result is the same regardless of the order in which we apply them.

[edit] Euler angles as composition of Euler rotations

Three axes z-x-z-gimbal showing Euler angles. External frame and external axis 'x' are not shown. Axes 'Y' are perpendicular to each gimbal ring
Three axes z-x-z-gimbal showing Euler angles. External frame and external axis 'x' are not shown. Axes 'Y' are perpendicular to each gimbal ring

When we perform these rotations on a frame whose Euler angles are all zero, we start with the rotating XYZ system coinciding with the fixed xyz system. We perform the first rotation around z (which is over Z), the second around the line of nodes N (which at this point is over X) and the third around Z. In this way we will reach the final frame starting from the initial one.

[edit] Intermediate frames

Stereoscopic image of Euler angles, showing intermediate frames
Stereoscopic image of Euler angles, showing intermediate frames
Anaglyph image of Euler angles, showing intermediate frames
Anaglyph image of Euler angles, showing intermediate frames

Imagine three frames S1, S2 and S3 with the origin in common and coinciding with the reference frame S0. We can reach any target frame St, whose Euler angles we will call <θ123> performing three simple rotations, with values θ123, in such a way that each one of them differs from the previous one just in an elemental rotation, like if they were mounted on a gimbal (S0 and S1 differ in a Z0-rotation of value θ1, S1 and S2 differ in a X1-rotation of value θ2S1, S0 and S3 differ in a Z2-rotation of value θ2).

This frames can be defined also statically. S0 is the reference frame [x,y,z]. S1 is defined using a unitary vector over the line of nodes N, as [N,v',z], being v' a unitary vector perpendicular to the other two. S2 is [N,v,Z], (again v is defined as vector product of the other two), and finally S3 is [X,Y,Z].

[edit] Other composition of movements equivalent

Assumed some initial conditions, the former definition can be seen as composition of three rotations around the intrinsic (moving) or extrinsic (fixed) axes.

Given two coordinate systems xyz and XYZ with common origin, starting with the axis z and Z overlapping, one can specify the position of the second in terms of the first using three rotations with angles α, β, γ in three ways equivalent to the former definition, as follows:

  • Moving axes of rotation (See Tait-Bryan angles) The XYZ system is fixed while the xyz system rotates. If we start with the xyz system coinciding with the XYZ system we can perform the same rotations as before using only rotations around the moving axis.
    • Rotate the xyz-system about the z-axis by α. The x-axis now lies on the line of nodes.
    • Rotate the xyz-system again about the now rotated x-axis by β. The z-axis is now in its final orientation, and the X-axis remains on the line of nodes.
    • Rotate the xyz-system a third time about the new z-axis by γ.
  • Fixed axes of rotation - The xyz system is fixed while the XYZ system rotates. Start with the rotating XYZ system coinciding with the fixed xyz system.
    • Rotate the XYZ-system about the z-axis by γ. The X-axis is now at angle γ with respect to the x-axis.
    • Rotate the XYZ-system again about the x-axis by β. The Z-axis is now at angle β with respect to the z-axis.
    • Rotate the XYZ-system a third time about the z-axis by α. (Note that the first and third axes are identical).
  • Equivalence of the movements

The static description is usually used in conjunction with spherical trigonometry. It is the only form in older sources. The two rotating axes descriptions are usually used in conjunction with matrices, since 2D coordinate rotations have a simple form. These last two are easily seen to be equivalent, since rotation about a moved axis is the conjugation of the original rotation by the move in question.

To be explicit, in the fixed axes description, let x(φ) and z(φ) denote the rotations of angle φ about the x-axis and z-axis, respectively. In the moving axes description, let Z(φ)=z(φ), X′(φ) be the rotation of angle φ about the once-rotated X-axis, and let Z″(φ) be the rotation of angle φ about the twice-rotated Z-axis. Then:

Z″(α)oX′(β)oZ(γ) = [ (X′(β)z(γ)) o z(α) o (X′(β)z(γ))−1 ] o X′(β) o z(γ)
   = [ {z(γ)x(β)z(−γ) z(γ)} o z(α) o {z(−γ) z(γ)x(−β)z(−γ)} ] o [ z(γ)x(β)z(−γ) ] o z(γ)
   = z(γ)x(β)z(α)x(−β)x(β) = z(γ)x(β)z(α) .

The equivalence of the static description with the rotating axes descriptions can be verified by direct geometric construction, or by showing that the nine direction cosines (between the three xyz axes and the three XYZ axes) form the correct rotation matrix.

The equivalence of the static description with the rotating axes descriptions can be understood as external or internal composition of matrices. Composing rotations about fixed axes is to multiply our orientation matrix by the left. Composing rotations about the moving axes is to multiply the orientation matrix by the right.

Both methods will lead to the same final decomposition. If M = A.B.C is our orientation matrix (the components of the frame to be described in the reference frame), we can reach it from composing C, B and A at the left of I (identity, reference frame on itself), or composing A, B and C at the right of I. Both ways we obtain ABC.

[edit] Properties of Euler angles

The Euler angles form a chart on all of SO(3), the special orthogonal group of rotations in 3D space. The chart is smooth except for a polar coordinate style singularity along β=0. See charts on SO(3) for a more complete treatment.

A similar three angle decomposition applies to SU(2), the special unitary group of rotations in complex 2D space, with the difference that β ranges from 0 to 2π. These are also called Euler angles.

Haar measure for Euler angles has the simple form sin(β)dαdβdγ, usually normalized by a factor of 1/8π². For example, to generate uniformly randomized orientations, let α and γ be uniform from 0 to 2π, let z be uniform from −1 to 1, and let β = arccos(z).

[edit] Applications

Euler angles are used extensively in the classical mechanics of rigid bodies, and in the quantum mechanics of angular momentum.

When studying rigid bodies, one calls the xyz system space coordinates, and the XYZ system body coordinates. The space coordinates are treated as unmoving, while the body coordinates are considered embedded in the moving body. Calculations involving kinetic energy are usually easiest in body coordinates, because then the moment of inertia tensor does not change in time. If one also diagonalizes the rigid body's moment of inertia tensor (with nine components, six of which are independent), then one has a set of coordinates (called the principal axes) in which the moment of inertia tensor has only three components.

The angular velocity, in body coordinates, of a rigid body takes a simple form using Euler angles:

(\dot\alpha\sin\beta\sin\gamma+\dot\beta\cos\gamma){\bold I}
      +(\dot\alpha\sin\beta\cos\gamma-\dot\beta\sin\gamma){\bold J}
      +(\dot\alpha\cos\beta+\dot\gamma){\bold K},

where IJK are unit vectors for XYZ.

Here the rotation sequence is 3-1-3 (or Z-X-Z using the convention stated above).

In quantum mechanics, explicit descriptions of the representations of SO(3) are very important for calculations, and almost all the work has been done using Euler angles. In the early history of quantum mechanics, when physicists and chemists had a sharply negative reaction towards abstract group theoretic methods (called the Gruppenpest), reliance on Euler angles was also essential for basic theoretical work.

Unit quaternions, also known as Euler-Rodrigues parameters, provide another mechanism for representing 3D rotations. This is equivalent to the special unitary group description.

Expressing rotations in 3D as unit quaternions instead of matrices has some advantages:

  • Concatenating rotations is faster and more stable.
  • Extracting the angle and axis of rotation is simpler.
  • Interpolation is more straightforward. See for example slerp.

There is a common misconception that replacing the use of rotation matrices with quaternions will avoid gimbal lock, but this is not correct. Merely changing the representation of rotation transformation matrices with equivalent quaternion forms does not help with gimbal lock, because the problem lies in the logic and not the representation. However, the logic of interpolating between rotations is expressed with quaternions in such a way that a gimbal lock that might have occurred if straightforward Euler angles were used, is avoided.

[edit] See also

[edit] References

[edit] External links

Wikimedia Commons has media related to: