You are on page 1of 36

Navigation and Guidance

Dr. Shashi Ranjan Kumar

Assistant Professor
Department of Aerospace Engineering
Indian Institute of Technology Bombay
Powai, Mumbai, 400076 India

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 1 / 36
Coordinate Transformation
Coordinate Frame

Position of a rigid body: position vector OR OE of origin


Orientation of rigid body: 3 × 3 rotation matrix
For simplification, we assume OE = OR

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 2 / 36
Coordinate Transformation
Transformation Matrix

Rotation matrix approach utilizes 9 parameters, which obey the orthogonality


and unit length constraints, to describe the orientation of the rigid body.
A rigid body possesses 3 rotational DOF, 3 independent parameters are
sufficient to characterize completely and unambiguously its orientation.
Three-parameter representations are popular in engineering because they
minimize the dimensionality of the rigid-body control problem
Transformation of coordinate axes is an important necessity in resolving
angular positions and rates from one coordinate system to another.
Transformation matrix: Mapping of the components of a vector, resolved in
one frame, into the same resolved into the another frame.
⇒ Direction cosine matrix (DCM)
⇒ Euler Angles
⇒ Quaternions

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 3 / 36
Coordinate Transformation
Direction Cosines of a Vector

Angle between two vectors r 1 and r 2 Direction cosines:


" # α = cos a, β = cos b, γ = cos c
−1 r T2 r 1
θ = cos
cos2 a + cos2 b + cos2 c = 1 Proof?
p p
r T1 r 1 r T2 r 2

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 4 / 36
Coordinate Transformation
Direction Cosines of a Vector

Example
Find the direction cosines and direction angles of the vector v = −8i + 3j + 2k.

Assume a, b, c be the angles formed by vector w.r.t. x, y, z axes, respectively,


and direction cosines are α, β, γ.
We can write
vT i −8
α = cos a = =√ =⇒ a = 156◦
kvk 77
Similarly,
vT j 3
β = cos b = =√ =⇒ b = 70◦
kvk 77
vT k 2
γ = cos c = =√ =⇒ c = 77◦
kvk 77

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 5 / 36
Coordinate Transformation
Direction Cosine Matrix

Direction cosine matrix (DCM) transforms a vector in R3 from one frame to


another frame.
DCM for transformation between frames a and b
 
C11 C12 C13
C ba =  C21 C22 C23 
C31 C32 C33

Specifically, if (X, Y, Z) and (x, y, z) are the representations of a vector in


frames a and b, respectively, then
    
x C11 C12 C13 X
 y  =  C21 C22 C23   Y  ⇒ Rb = C ba Ra
z C31 C32 C33 Z
| {z } | {z }| {z }
Rb Rotation Matrix Ra

Matrix DCM projects the vector Ra into a reference frame b.


For orthogonal systems, (C ba )−1 = (C ba )T = C ab
Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 6 / 36
Coordinate Transformation
Components in Two Coordinate Frames

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 7 / 36
Coordinate Transformation
Geometric Interpretation of Direction Cosine Matrix

Assume vector R coordinatized in reference frames a and b as Ra and Rb ,


respectively.

Ra =(RT 1ax )1ax + (RT 1ay )1ay + (RT 1az )1az


Rb =(RT 1bx )1bx + (RT 1by )1by + (RT 1bz )1bz

where, RT 1ai ∀ i = x, y, z denotes scalar component of R projected along


the ith a-frame coordinate direction.
Unit vectors 1ai and 1bj are related, for i, j = x, y, z, as
T T T
1bi =(1bi 1ax )1ax + (1bi 1ay )1ay + (1bi 1az )1az

The ith component of Rb can be expressed as


T T T
RT 1bi =RT [(1bi 1ax )1ax + (1bi 1ay )1ay + (1bi 1az )1az ]
T T T
=(1bi 1ax )RT 1ax + (1bi 1ay )RT 1ay + (1bi 1az )RT 1az

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 8 / 36
Coordinate Transformation
Geometric Interpretation of Direction Cosine Matrix

The vector Rb can be expressed as


 T b   bT a T T

1x 1x 1bx 1ay 1bx 1az RT 1ax

R 1x
 T T T
Rb =  RT 1by  =  1by 1ax 1by 1ay T
1by 1az   R 1ay 

RT 1bz RT 1az
T T T
1bz 1ax 1bz 1ay 1bz 1az
 T T T

1bx 1ax 1bx 1ay 1bx 1az
 T T T
= 1by 1ax 1by 1ay 1by 1az Ra

T T T
1bz 1ax 1bz 1ay 1bz 1az
=C ba Ra = [Cij ]Ra

[Cij ] represents the cosine of the angle between the unit vectors 1bi and 1aj .

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 9 / 36
Coordinate Transformation
Direction Cosine Matrix

Example 1
Consider two coordinate frames with their unit vectors as (i, j, k), and (i0 , j 0 , k0 ),
respectively. If i0 = j, j 0 = −i, and k0 = k then what would be the DCM matrix?

DCM matrix  
0 1 0
 −1 0 0 
0 0 1

Example 2
Consider two coordinate frames with their unit vectors as (i, j, k), and (i0 , j 0 , k0 ),
respectively. If i0 = i, j 0 = −k, and k0 = j then what would be the DCM matrix?

DCM matrix  
1 0 0
 0 0 −1 
0 1 0
Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 10 / 36
Coordinate Transformation
Direction Cosine Matrix

Example 3
Consider two coordinate frames with their unit vectors as (i, j, k), and (i0 , j 0 , k0 ),
respectively. If the old coordinate frame is rotated with angle θ anti-clockwise
w.r.t. z-axis to get a new frame, then what would be the DCM matrix?

Unit vectors of new frame

i0 = cos θi + sin θj
j 0 = − sin θi + cos θj
k0 =k

DCM matrix  
cos θ sin θ 0
 − sin θ cos θ 0 
0 0 1

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 11 / 36
Coordinate Transformation
Direction Cosine Matrix

Example 4
Find out the missing coefficients of DCM.
 
0.8999 −0.4323 0.0578
T =  c21 0.8665 −0.2496 
c31 c32 0.9666

We can use orthogonal property of DCM.

0.9666c32 − 0.8665 × 0.2496 − 0.4323 × 0.0578 = 0

c31 c32 + 0.8665c21 − 0.8999 × 0.4323 = 0


0.9666c31 − 0.2496c21 + 0.0578 × 0.8999 = 0

On solving, we get c21 = 0.4323, c31 = 0.0578, c32 = 0.2496


Check for correctness
Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 12 / 36
Coordinate Transformation
Propagation of Direction Cosine Matrix

Consider the two frames as the a and b frames.


At time t, the frames a and b are related through the DCM C ab (t).
At time t + ∆t, frame b rotates to a new orientation such that the direction
cosine matrix is given by C ab (t + ∆t).
Rate of change of C ab (t) is given by

a ∆C ab C ab (t + ∆t) − C ab (t)
Ċ b (t) = lim = lim
∆t→0 ∆t ∆t→0 ∆t
From geometrical considerations,

C ab (t + ∆t) = C ab (t)(I + ∆θ b )

where, I + ∆θ b is the small angle DCM relating b frame at time t to the


rotated b frame at time t + ∆t.

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 13 / 36
Coordinate Transformation
Direction Cosines

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 14 / 36
Coordinate Transformation
Propagation of Direction Cosine Matrix

∆θ b is given by
 
0 −∆θY ∆θP
∆θ b =  ∆θY 0 −∆θR  , ∆θk = sin ∆θk ∀ k = R, Y, P
−∆θP ∆θR 0
Note that because the rotation angles are small in the limit as ∆t → 0, small
angle approximations are valid and the order of rotation is immaterial.
Rate of change of C ib (t) is now written as

a ∆θ b
Ċ b (t) = C ab (t) lim
∆t→0 ∆t

In the limit ∆t → 0, ∆θ b /∆t is the skew-symmetric form of angular velocity


of the frame b relative to a frame.
 
0 −ωY ωP
a
Ċ b (t) = C ab (t)Ωbab = C ab (t)  ωY 0 −ωR 
−ωP ωR 0

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 15 / 36
Coordinate Transformation
Propagation of Direction Cosine Matrix

DCM differential equation is a linear matrix differential equation, forced by


the angular velocity vector in its skew-symmetric matrix form.
Nine scalar, linear, coupled differential equations
This equation can be integrated with the initial conditions, which represent
the initial orientation of the a-frame with respect to the b-frame.
Differential equation component-wise

Ċ i,j = C i,j+1 ωj+2 − C i,j+2 ωj+1 , i, j = 1, 2, 3

where, second subscript is modulo 3, and ω1 = ωR , ω2 = ωP , ω3 = ωY


A first order approximation for transformation matrix, using Taylor series
h i
C tk +∆T = I + Ωbab (tk )∆T C tk

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 16 / 36
Coordinate Transformation
Propagation of Direction Cosine Matrix: Alternate derivation

Consider the transformation of unit vectors from the b-frame to the i-frame
using DCM
      
îi C11 C12 C13 îb îb
 ĵi  =  C21 C22 C23   ĵb  = Cbi  ĵb 
k̂i C31 C32 C33 k̂b k̂b
Consider the first equation

îi = C11 îb + C12 ĵb + C13 k̂b

On differentiation, we get
˙
î˙ i = Ċ11 îb + Ċ12 ĵb + Ċ13 k̂b + C11 î˙ b + C12 ĵ˙ b + C13 k̂b

We know that
˙
î˙ b = ωb × îb , ĵ˙ b = ωb × ĵb , k̂b = ωb × k̂b
Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 17 / 36
Coordinate Transformation
Propagation of Direction Cosine Matrix: Alternate derivation

Now, one may write

î˙ i =Ċ11 îb + Ċ12 ĵb + Ċ13 k̂b + C11 ωb × îb + C12 ωb × ĵb + C13 ωb × k̂b
=Ċ11 îb + Ċ12 ĵb + Ċ13 k̂b + ωb × (C11 îb + C12 ĵb + C13 k̂b )
=Ċ11 îb + Ċ12 ĵb + Ċ13 k̂b + ωb × îi

As îi is a vector of unit magnitude and fixed direction in inertial frame,


î˙ i = 0, which implies

Ċ11 îb + Ċ12 ĵb + Ċ13 k̂b + ωb × îi = 0

Similarly
Ċ21 îb + Ċ22 ĵb + Ċ23 k̂b + ωb × ĵi = 0
Ċ31 îb + Ċ32 ĵb + Ċ33 k̂b + ωb × k̂i = 0
Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 18 / 36
Coordinate Transformation
Propagation of Direction Cosine Matrix: Alternate derivation

Vector product

îb ĵb k̂b

ωb × îi = p q r

C11 C12 C13

=îb (C13 q − C12 r) + ĵb (C11 r − C13 p) + k̂b (C12 p − C11 q)

Thus, Ċ11 îb + Ċ12 ĵb + Ċ13 k̂b + ωb × îi = 0 leads to

îb (Ċ11 + C13 q − C12 r) + ĵb (Ċ12 + C11 r − C13 p) + k̂b (Ċ13 + C12 p − C11 q) = 0

Now we have

Ċ11 = C12 r − C13 q, Ċ12 = C13 p − C11 r, Ċ13 = C11 q − C12 p

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 19 / 36
Coordinate Transformation
Propagation of Direction Cosine Matrix: Alternate derivation

Similarly

Ċ21 = C22 r − C23 q, Ċ22 = C23 p − C21 r, Ċ23 = C21 q − C22 p

Ċ31 = C32 r − C33 q, Ċ32 = C33 p − C31 r, Ċ33 = C31 q − C32 p


In compact form,
    
Ċ11 Ċ12 Ċ13 C11 C12 C13 0 −r q
 Ċ21 Ċ22 Ċ23  =  C21 C22 C23   r 0 −p 
Ċ31 Ċ32 Ċ33 C31 C32 C33 −q p 0
Ċbi = Cbi Ωbib

where  
0 −r q
Ωbib =  r 0 −p 
−q p 0

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 20 / 36
Coordinate Transformation
Propagation of Direction Cosine Matrix

On taking transpose and using the fact that (Ωbib )0 = −Ωbib , we get

Ċib = − Ωbib Cib

This equation is of the form of Ẋ = AX, A = −Ωbib .


Characteristic equation: ∆(λI − A) = 0, where ∆ denotes the determinant
of matrix.
λ(λ2 + p2 + q 2 + r2 ) = 0

p
Eigenvalues: λ = 0, ±j p2 + q 2 + r2 = ±j|ωb |
Neutrally stable system
Care needs to be taken during updating these coefficients to avoid
accumulation of rounding off error, and prevent the system from blow out.

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 21 / 36
Coordinate Transformation
Vector Rotation in Frame of Reference

R0
RY0

RY R
θ
β
O RX0 RX
X

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 22 / 36
Coordinate Transformation
Rotation of Frame of Reference

The position of a point R in XY coordinate frame is given by


   
RX R cos β
=
RY R sin β

Let us assume γ = θ + β.
Position of a point R0 in XY coordinate frame is given by
 0     
RX R cos γ R cos θ cos β − R sin θ sin β
= =
RY0 R sin γ R sin θ cos β + R cos θ sin β
  
cos θ − sin θ RX
=
sin θ cos θ RY
| {z }
Rotation matrix

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 23 / 36
Coordinate Transformation
Rotation of Frame of Reference

Y0 Y

RY R
X0
δ
RY 0 RX 0
θ
RX
X

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 24 / 36
Coordinate Transformation
Rotation of Frame of Reference

Let us assume α = θ + δ.
The position of a point R in XY frame is given by
   
RX R cos α
=
RY R sin α
Position of a point R in X 0 Y 0 frame is given by
   
RX 0 R cos δ
=
RY 0 R sin δ

As δ = α − θ, we can also write


     
RX 0 R cos(α − θ) R cos α cos θ + R sin α sin θ
= =
RY 0 R sin(α − θ) R sin α cos θ − R cos α sin θ
    
RX cos θ + RY sin θ cos θ sin θ RX
= =
RY cos θ − RX sin θ − sin θ cos θ RY
| {z }
Rotation matrix

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 25 / 36
Coordinate Transformation
Euler Angle Rotations

Euler angles
⇒ Method to specify the angular orientation of one coordinate frame w.r.t.
another frame
⇒ A series of three ordered right-handed rotations
⇒ Correspond to the conventional roll pitch yaw angles
Euler angles are not uniquely defined since there is an infinite set of choices.
No standardized definitions of the Euler angles.
For a particular choice of Euler angles, the rotation order selected and/or
defined should be consistent.
Interchange in order of rotation ⇒ different Euler angle representation.
Rotations are made about the Z, Y , X axes through an angle ψ, θ, φ angles.
These rotations are made in the positive (anticlockwise sense) when looking
down the axis of rotation toward the origin.

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 26 / 36
Coordinate Transformation
Euler Angle Rotations (ZY 0 Z 00 )

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 27 / 36
Coordinate Transformation
Euler Angle Rotations

Euler angles: Three ordered elemental rotations


Extrinsic rotations: Rotations about the axes xyz of the original coordinate
system, which is assumed to remain motionless.
Intrinsic rotations: Rotations about the axes of rotating coordinate system
XY Z, which changes its orientation after each elemental rotation.
Another classification
⇒ Proper Euler angles
⇒ Tait-Bryan angles
Proper Euler angles: (zxz, zyz, xyx, xzx, yzy, yxy)
Tait-Bryan angles: (zyx, zxy, xyz, xzy, yzx, yxz)
What is the major difference between Proper Euler and Tait-Bryan angles?
Tait-Bryan angles represent rotations about three distinct axes, while proper
Euler angles use the same axis for both the first and third elemental rotations.

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 28 / 36
Coordinate Transformation
Euler Angle Rotations

Rotation about Z axis in anticlockwise


direction by an angle ψ
 0    
X cos ψ sin ψ 0 X
 Y 0  =  − sin ψ cos ψ 0   Y 
Z0 0 0 1 Z
 
X
=A  Y 
Z

where
 
cos ψ sin ψ 0
A =  − sin ψ cos ψ 0 
0 0 1

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 29 / 36
Coordinate Transformation
Euler Angle Rotations

Rotation about Y axis in anticlockwise


direction by an angle θ
 00    0 
X cos θ 0 − sin θ X
00
 Y  = 0 1 0  Y 0 
Z0
00
Z sin θ 0 cos θ
 0 
X
=B  Y 0 
Z0

where
 
cos θ 0 − sin θ
B = 0 1 0 
sin θ 0 cos θ

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 30 / 36
Coordinate Transformation
Euler Angle Rotations

Rotation about X axis in anticlockwise


direction by an angle φ
     00 
x 1 0 0 X
 y  =  0 cos φ sin φ   Y 00 
00
z 0 − sin φ cos φ Z
 00 
X
00
=D  Y 
00
Z

where
 
1 0 0
D = 0 cos φ sin φ 
0 − sin φ cos φ

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 31 / 36
Coordinate Transformation
Euler Angle Rotations

If the consecutive rotations are performed in the order ψ, θ, φ i.e., (yaw,


pitch, and roll) on reference frame XY Z, then we obtain the other reference
frame xyz.
Rotation matrix for representing these three rotations
   00   0   
x X X X
00 0
 y  =D  Y  = DB  Y  = DBA  Y 
00 0
z Z Z Z

Equivalently,
   
x X
 y  = DBA  Y 
| {z }
z C Z

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 32 / 36
Coordinate Transformation
Euler Angle Rotations

Equivalent rotation matrix C = DBA can be written as


   
1 0 0 cos θ 0 − sin θ cos ψ sin ψ 0
C =  0 cos φ sin φ   0 1 0   − sin ψ cos ψ 0 
0 − sin φ cos φ sin θ 0 cos θ 0 0 1
 
cos θ cos ψ cos θ sin ψ − sin θ
=  cos ψ sin θ sin φ − sin ψ cos φ sin ψ sin θ sin φ + cos ψ cos φ cos θ sin φ 
cos ψ sin θ cos φ + sin ψ sin φ sin ψ sin θ cos φ − cos ψ sin φ cos θ cos φ

This rotation matrix is called Euler angle transformation matrix.


Range of Euler angles:
π π
−π ≤ ψ ≤ π, − ≤θ ≤ , −π ≤φ≤π
2 2

Is there any issue with |θ| > π/2?

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 33 / 36
Coordinate Transformation
Computations of Euler Angles

Equivalent rotation matrices


 
cos θ cos ψ cos θ sin ψ − sin θ
C =  cos ψ sin θ sin φ − sin ψ cos φ sin ψ sin θ sin φ + cos ψ cos φ cos θ sin φ 
cos ψ sin θ cos φ + sin ψ sin φ sin ψ sin θ cos φ − cos ψ sin φ cos θ cos φ
 
C11 C12 C13
=  C21 C22 C23 
C31 C32 C33
How to obtain Euler angles from given DCM matrix?
θ = sin−1 (−C13 )

!
−1 C23
φ = sin p
2
1 − C13
!
−1 C12
ψ = sin p
2
1 − C13

Are there some issues with these expressions?


Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 34 / 36
Coordinate Transformation
Computations of Euler Angles

Recall the ranges of these Euler angles


How to determine the quadrant in which these angles lie?
As pitch angle θ lies in −π/2 ≤ θ ≤ π/2,
(
[0, π/2] C13 ≤ 0
θ∈
[−π/2, 0] C13 ≥ 0

What about bank angle φ?


As C33 = cos φ cos θ, and cos θ > 0, sign of C33 is same as that of cos φ.
Also, C23 = sin φ cos θ, and cos θ > 0, sign of C23 is same as that of sin φ.

First quadrant


C33 > 0 & C23 > 0
Second quadrant C < 0 & C > 0
33 23
φ∈
Third quadrant
 C 33 < 0 & C 23 < 0

Fourth quadrant C33 > 0 & C23 < 0

Obtain the quadrants of ψ using C11 and C12 in a similar way.


Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 35 / 36
Coordinate Transformation

Reference
1 George M. Siouris, Aerospace Avionics Systems: A Modern Synthesis,
Academic Press, Inc. 1993.
2 Bandhu N. Pamadi, Performance, Stability, and Control of Airplanes, AIAA
Education Series, 1998.

Thank you for your attention !!!

Dr. Shashi Ranjan Kumar IITB-AE 410/641 DCM and Euler Angle 36 / 36

You might also like