Aircraft Attitude and Euler Angles

Introduction

This article is a brief simplistic overview of aircraft kinematics, in particular as it refers to attitude. We discuss the 3-2-1 Euler angles \((\phi, \theta, \psi\)) corresponding to roll angle, pitch angle, and yaw angle, which relate the body frame B to the inertial frame E. We also describe the 3-2-1 Euler angles \((\mu, \gamma, \xi)\) corresponding to bank angle,  vertical flight path angle, and horizontal flight path angle, which relate the wind frame to the inertial frame. Finally, we define the angle of attack \(\alpha\) and sideslip angle \(\beta\), which relate the wind frame to the body frame.

After that, we construct the directional cosine matrices (DCM) from the above angles, which can be used for basis transformations of vector coefficients between one reference frame and another. These DCMs will depend on the Euler angles.

As a last step, we write down the differential kinematic equation, which relates the body angular rates \((p, q, r)\) to the Euler rates \(\dot\phi, \dot\theta, \dot\psi)\) and we find the body-to-Euler-rate transformation matrix [B].

Both the DCMs and the body-to-Euler-rate transformation matrices will be needed, when we introduce the equations of motion in the article “Differential Equations for Rigid Aircraft Flight Dynamics (Equations of Motion)”. A more systematic approach to kinematics, including other parametrization than Euler angles – for instance quaternions or classic or modified Rodrigues parameters (CRP and MRP) – is left for some other time and is beyond the scope of this article.

Euler Angles

For an introduction into reference frames (axis systems, see our article “Reference Frames (Axis Systems)”). Here we assume you are already familiar with them and their construction, and we will focus on how to define the Euler angles which describe the relative orientation between them. We will discuss the four reference frames: inertial/world/Earth frame, body (aircraft) frame, wind frame, and velocity frame, and their relative orientations. 

Body Frame

Procedure to get attitude from known Euler angles:

  1. Start with airplane in level flight flying north (i.e. airplane axes coinciding with the inertial frame axes).
  2. Rotate airplane by yaw angle ψ around its current z-axis (coincides with zI-axis of the inertial (world) frame).
  3. Rotate airplane by pitch angle θ around its new (current) y-axis (is a new axis, neither coinciding with yI-axis of the world frame, nor with yB-axis of the final attitude body frame).
  4. Rotate airplane by roll angle φ around current x-axis of the airplane (coincides with xB-axis of final attitude body frame).

Note that the order of rotations in 3 dimensions matters (rotations are non-commutative). So you have to follow precisely the above order to get to the attitude described by given Euler angles. (Keep in mind that this is a mathematical procedure; we do not fly an airplane physically this way.)

If you want to determine the Euler angles from a given attitude, you need to follow the instructions in reverse order, and arrive in the end at an airplane flying north in level flight.

Wind Frame

Same procedure as above for the body frame, except with the following replacements:

  • Instead of yaw angle \(\psi\) use the horizontal flight path angle \(\xi\).
  • Instead of pitch angle \(\theta\) use the vertical flight path angle \(\gamma\).
  • Instead of roll angle \(\phi\) use the bank angle \(\mu\).

The bank angle is chosen such that the third reference frame axis lies in the plane of symmetry of the aircraft.

Velocity Frame

To obtain the velocity frame, use the same replacements as above, but set bank angle \(\mu\) to zero.

Angle of Attack and Sideslip Angle

Angle of attack \(\alpha\) and sideslip angle \(\beta\) relate the wind frame directly to the body frame (without going via the inertial frame).

The sideslip angle \(\beta\) is the angle between the velocity vector of the aircraft and its projection onto the plane of symmetry of the aircraft. With velocity vector \(\mathbf{V}_B=(u, v, w)\) in the body frame, this amounts to \(\beta=\arcsin(v/V)\), where \(V=|V|\) is the magnitude (length) of the velocity vector.

The angle of attack \(\alpha\) is the angle between this projection and the longitudinal (\(x_B\)-)axis of the aircraft. Mathematically, this corresponds to \(\alpha=\arctan(u/w)\).

Directional Cosine Matrix (DCM)

The directional cosine matrix performs the transformation of vector components with respect to one basis to another. Let \(\mathbf{V}\) be a vector, and let {\(\mathbf{e}_i\)}\({}_{i=1,2,3}\) be the basis vectors of frame E  and {\(\mathbf{b}_j\)}\({}_{j=1,2,3}\) be the basis vectors of frame B. Then this vector can be written as
\begin{equation}
\mathbf{V}=\sum_{i=1}^{3}e^i\mathbf{e}_i = \sum_{j=1}^{3}b^j\mathbf{b}_j.
\end{equation}
The \(e^i\) are the coefficients, whereas the \(\mathbf{e}_i\) are the basis vectors for the E frame, – and analogously for the B frame.

Instead of writing the basis vectors explicitly, we can express the vector \(V\) as an 3-tuple of coefficients, but when we do so, we must include with respect to which basis the coefficient are taken. We define
\begin{eqnarray}
\mathbf{V}_E&:=&
\begin{pmatrix}
e^1 \\ e^2 \\ e^3 
\end{pmatrix}_E\\
\mathbf{V}_B&:=&
\begin{pmatrix}
b^1 \\ b^2 \\ b^3 
\end{pmatrix}_B.
\end{eqnarray}

We now want to find the matrix \([BE]\) which takes the coefficients from the E basis to the B basis and therefore satisfies the equation
\begin{equation}
\mathbf{V}_B = [BE]\mathbf{V}_E.
\end{equation}

Matrix \([BE]\) is called the directional cosine matrix (DCM), because its entries correspond to the cosine of the angle between the basis vectors they represent, at least in the case when the basis vectors of the two bases are orthogonal and of unit length. (Orthogonal with respect to the standard scalar product.) This matrix describes the rotation completely. Our goal is to find an expression for this matrix in terms of Euler angles.

We define matrix \([EB]\) to be the DCM in the opposite direction, i.e. going from the B basis to the E basis:
\begin{equation}
\mathbf{V}_E = [BE]\mathbf{V}_B.
\end{equation}
It is a basic result from linear algebra that \([EB]\) is the multiplicative inverse of matrix \([BE]\). Furthermore, since we are dealing with rotations, these matrices are orthonormal, and their inverse is therefore equal to the transposed, making it very easy to invert. In summary, we have
\begin{equation}
[EB]=[BE]^{-1}=[BE]^T.
\end{equation}

Describing a rotation, the DCM has several key advantages over the Euler angles: it is easy to calculate with (much easier than Euler angles: for instance, two consecutive rotations just correspond to matrix multiplication of two DCMs) and unlike the Euler angles, the DCM has no coordinate singularity. It also has disadvantages: it has nine parameters, of which only three are independent, and it is very difficult for a human to tell what kind of a rotation it represents from just looking at it. We shall therefore use both, the Euler angles and the DCM, as needed, which is why we need to learn how to convert between the two for a given rotation.

Euler Angles to DCM

DCM from Inertial Frame E to Body Frame B

Given values for the Euler angles \((\phi, \theta, \psi)\) we can construct the DCM [BE] from the inertial frame E to the body frame B, using the following expression:
\begin{equation}
[BE] =
\begin{pmatrix}
\cos(\theta)\cos(\psi) & \cos(\theta)\sin(\psi) & -\sin(\theta) \\
\sin(\phi)\sin(\theta)\cos(\psi)-\cos(\phi)\sin(\psi) & \sin(\phi)\sin(\theta)\sin(\psi)+\cos(\phi)\cos(\psi) & \sin(\phi)\cos(\theta)\\
\cos(\phi)\sin(\theta)\cos(\psi)+\sin(\phi)\sin(\psi) & \cos(\phi)\sin(\theta)\sin(\psi)-\sin(\phi)\cos(\psi) & \cos(\phi)\cos(\theta)
\end{pmatrix}
\end{equation}

As a sidenote for the advanced reader, this matrix is the matrix that transforms the vector coefficients. The matrix transforming the basis vectors is the inverse-transposed on this matrix. However, because for orthonormal matrices the inverse is the transposed, the two matrices are actually the same. For this reason, we have not made any verbal distinction in this text whether we are talking about the matrix that takes the vector coefficients from basis E to basis B or the basis vectors. More on this can be found in our linear algebra primer.

DCM from Inertial Frame E to Wind Frame W

The DCM [WE] from the inertial frame E to the wind frame W is obtained from the same expression as above, with the following replacements:

  • Instead of yaw angle \(\psi\) use the horizontal flight path angle \(\xi\).
  • Instead of pitch angle \(\theta\) use the vertical flight path angle \(\gamma\).
  • Instead of roll angle \(\phi\) use the bank angle \(\mu\).

To obtain the velocity frame, use the same replacements as above, but set bank angle \(\mu\) to zero.

Note that roll angle and bank angle are in general not the same (they are only the same if there is no sideslip and angle of attack), but that for many situations in flight they are fairly similar and it is often not necessary to distinguish between them.

DCM from Wind Frame W to Body Frame B

The wind frame and to body frame differ from each other by the angle of attack \(\alpha\) and the sideslip angle \(\beta\). The DCM \([BW]\) from the wind frame to the body frame is given by the expression:
\begin{equation}
[BW] =
\begin{pmatrix}
\cos\alpha\cos\beta & -\cos\alpha\sin\beta & -\sin\alpha\\
\sin\beta & \cos\beta & 0 \\
\sin\alpha\cos\beta & -\sin\alpha\sin\beta & \cos\alpha
\end{pmatrix}
\end{equation}

This matrix lets you transform the aerodynamic forces lift, drag, and sideforce, which are naturally expressed in the wind frame, to the body frame to compute their effect on aircraft motion.

DCM to Euler Angles

The opposite direction is also possible: if we know the DCM, we can extract the Euler angles. This is useful, for instance, if we want to perform several consecutive rotations and are interested only in the Euler angles of the final position. Consecutive rotations are most easily performed with DCMs as several matrix multiplications (while it is not obvious how to add Euler angles directly).

We do this only for the example of the inertial-frame-to-body-frame DCM [BE]. Given a DCM [BE] from the inertial frame to the body frame, we can infer the values of the Euler angles of the aircraft attitude:

\begin{eqnarray}
\phi &=& \tan^{-1}\left(\frac{[BE]_{23}}{[BE]_{33}}\right)\\
\theta &=& – \sin^{-1}([BE]_{13})\\
\psi &=& \tan^{-1}\left(\frac{[BE]_{12}}{[BE]_{11}}\right)
\end{eqnarray}

Differential Kinematic Equation

When solving the rotational dynamic equation (equation of motion), we will obtain the body rates \((p, q, r)\). Their relationship to the Euler rates \((\dot\phi, \dot\theta, \dot\psi)\) – the first time derivatives of the Euler angles – is nontrivial. First of all, a novice might think that the Euler rates are equal to the body rates, which is distinctly false: for instance, it is possible to have an aircraft motion with a nonzero roll rate \(p\) around the longitudinal (\(x_B\))-axis of the aircraft, yet the wings are always level.

The next guess turns out to be false as well: because the Euler angles were defined in  mixture of reference frames around different axes, the matrix [EB] is not the appropriate transformation matrix between the body rates \((p, q, r)\) and the Euler rates \((\dot\phi, \dot\theta, \dot\psi)\), even though the body rates do form an angular velocity vector which does transform in a standard way under basis transformation (the Euler rates are not a vector, they are just a 3-tuple of numbers).

A calculation which we shall not give here shows that the relationship between body rates is captured by matrix \([B]\) as defined below:
\begin{equation}
\begin{pmatrix}
\dot\phi\\
\dot\theta\\
\dot\psi\\
\end{pmatrix}
=
\underbrace{\frac{1}{\cos\theta}
\begin{pmatrix}
\cos(\theta) & \sin(\phi)\sin(\theta) & \cos(\phi)\sin(\theta)\\
0 & \cos(\phi)\cos(\theta) & -\sin(\phi)\cos(\theta)\\
0 & \sin(\phi) & \cos(\phi)\\
\end{pmatrix}}_{=:[B](\phi, \theta, \psi)}
\begin{pmatrix}
p \\
q \\
r
\end{pmatrix}
\end{equation}
Unlike the DCMs \([EB]\) and \([BE]\), matrix \([B]\) is not an orthogonal matrix and needs to be properly inverted, when the relation in the opposite direction is sought (it is incorrect to just take the transposed). Note that \([B]\) becomes singular as \(\theta\) approaches 90 degrees and \(\cos\theta\) in the denominator becomes zero. This is where the 3-2-1 Euler angles have a coordinate singularity.