2

I am a bit confused about the difference between direction cosine matrix(DCM) and rotation matrix. I have searched through the literature but found no explicit explanation if they are different or same and when should each of them be used. For DCM I have referred to this documents ([DCM][1]) and what I understood is that the DCM and rotation matrix for a Yaw,Pitch,Roll sequence can be calculated as shown in the code snippet below:

import math
import numpy as np

yaw = np.deg2rad(90); pitch = np.deg2rad(0); roll = np.deg2rad(0);

yawMatrix = np.matrix([[math.cos(yaw), -math.sin(yaw), 0], [math.sin(yaw), math.cos(yaw), 0], [0, 0, 1] ])

pitchMatrix = np.matrix([[math.cos(pitch), 0, math.sin(pitch)], [0, 1, 0], [-math.sin(pitch), 0, math.cos(pitch)] ]) rollMatrix = np.matrix([[1, 0, 0], [0, math.cos(roll), -math.sin(roll)], [0, math.sin(roll), math.cos(roll)] ])

R = yawMatrix * pitchMatrix * rollMatrix

dcm_yaw = np.matrix([[math.cos(yaw), math.sin(yaw), 0], [-math.sin(yaw), math.cos(yaw), 0], [0, 0, 1] ]) dcm_pitch = np.matrix([[math.cos(pitch), 0, -math.sin(pitch)], [0, 1, 0], [math.sin(pitch), 0, math.cos(pitch)] ]) dcm_roll = np.matrix([[1, 0, 0], [0, math.cos(roll), math.sin(roll)], [0, -math.sin(roll), math.cos(roll)] ])

DCM = dcm_yaw * dcm_pitch * dcm_roll

print(R) print(DCM)

Is this intepretation of DCM and rotation matrices correct? [1]: https://www.scribd.com/document/439833165/Directional-Cosine-Matrices

Owais
  • 21

2 Answers2

2

Yes DCM is a rotation matrix.

You can check it is defined as rotation matrix in this paper of the "MEMS inertial navigation systems for aircraft" https://www.sciencedirect.com/topics/engineering/direction-cosine-matrix

And in several other papers is regarded as member of SO(3) group, which means it is a rotation. Also, you can check the matrix is orthogonal and its determinant is equal to one, which is the dedinition of a rotation matrix.

0

Motivated by the the answer from Mauricio Cele Lopez Belon. But I don't agree with that the DCM is the same as Eulerian rotation matrix. It probably can be related with the some special orthogonal rotation matrix. We generally use DCM for a vector in a "static" frame which itself can have 3 DOF rotations. Or in other way, the vector is rotated, but what are the rotation axes? You need reference axes.

Further for Euler angles: Any discussion employing Euler angles should always be preceded by their definition.

Without considering the possibility of using two different conventions for the definition of the rotation axes (intrinsic or extrinsic), there exist twelve possible sequences of rotation axes, divided in two groups:

  • Proper Euler angles ($z-x-z$, $x-y-x$, $y-z-y$, $z-y-z$, $x-z-x$, $y-x-y$)
  • Tait–Bryan angles ($x-y-z$, $y-z-x$, $z-x-y$, $x-z-y$, $z-y-x$, $y-x-z$)

It is stated in that above reference (similar in many textbooks for rigid body dynamics, for instance, the famous one The Dynamics of Marine Craft: Maneuvering and Seakeeping, Caveat: the paper book I bought missed about 20 pages):

However, if I am not mistaken, the reference seems not correctly stated the rotation angle as Tait–Bryan angles.

As in the classical Euler sequence, the yaw–pitch–roll sequence rotates the inertial $XYZ$ axes into the triad of body-fixed $xyz$ axes by means of a series of three elementary rotations, as illustrated in the Fig.3D rotations following Tait–Bryan angles. Like the classical Euler sequence, the first rotation is around the $Z(=z_1)$ axis through the yaw angle $\phi$. This takes $X$ into $x_1$ and $Y$ into $y_1$. The second rotation is around the $y_2(=y_1)$ axis through the pitch angle $\theta$. This carries $x_1$ and $z_1$ into $x_2$ and $z_2$, respectively. The third and final rotation is around the $x(=x_2)$ axis through the roll angle $\psi$, which takes $y_2$ into $y$ and $z_2$ into $z$.

MathArt
  • 1,053