You are on page 1of 36

Aircraft Equations of Motion:

Flight Path Computation


Robert Stengel, Aircraft Flight Dynamics, MAE 331,
2018
Learning Objectives
• How is a rotating reference frame described in an
inertial reference frame?
• Is the transformation singular?
• Euler Angles vs. quaternions
• What adjustments must be made to expressions
for forces and moments in a non-inertial frame?
• How are the 6-DOF equations implemented in a
computer?
• Aerodynamic damping effects
Reading:
Flight Dynamics
161-180

Copyright 2018 by Robert Stengel. All rights reserved. For educational use only.
http://www.princeton.edu/~stengel/MAE331.html
http://www.princeton.edu/~stengel/FlightDynamics.html 1

Euler Angle Rates

1
Euler-Angle Rates
and Body-Axis Rates
Body-axis " ωx % " p %
angular rate $ ' $ '
vector
(orthogonal
ωB = $ ωy ' =$ q '
) $ ' $ r '
$# ω z '& B # &

Euler angles form


% φ (
a non-orthogonal ' *
vector Θ=' θ *
' ψ *
& )

Euler-angle % φ ( % ω (
rate vector ' * ' x *
is not  ='
Θ θ * ≠ ' ωy *
orthogonal ' ψ * ' *
& ) '& ω z *) I 3

Relationship Between Euler-


Angle Rates and Body-Axis Rates

• ψ˙ is measured in the Inertial Frame ! p $ ! φ $ ! $ ! $


# & 0 0
# & # & B 2# &
• θ˙ is measured in Intermediate Frame #1 B
# q & = I3 # 0 & + H2 # θ & + H 2 H1 # 0 &
• φ˙ is measured in Intermediate Frame #2 # r & #" 0 &% #" 0 &% #" ψ &%
" %
• ... which is
€€
! p $ ! 1 0 −sin θ $!# φ $& Can the inversion
€ # & # &
=
# q & # 0 cos φ 
sin φ cosθ &# θ & = LBI Θ become singular?
# r & # 0 −sin φ &# &
cos φ cosθ %" ψ % What does this mean?
" % "

Inverse transformation [(.)-1 ≠ (.)T]


$ φ ' $
& ) & 1 sin φ tan θ cos φ tan θ '$ p '
)& )
& θ )=& 0 cos φ −sin φ )& q ) = LIB ω B
& ψ ) &
% ( % 0 sin φ secθ cos φ secθ )(&% r )(

2
Euler-Angle Rates and Body-Axis Rates

Avoiding the Euler Angle Singularity


at θ = 90
§ Alternatives to Euler angles
- Direction cosine (rotation) matrix
- Quaternions
Propagation of direction cosine matrix (9 parameters)

 IB h B = ω
H  I H IB h B
Consequently ⎡ 0 −r ( t ) q ( t ) ⎤
⎢ ⎥
H I ( t ) = − ω" B ( t ) H I ( t ) = − ⎢ r ( t )
! B B
0 − p (t ) ⎥ H BI ( t )
⎢ ⎥
⎢⎣ −q ( t ) p ( t ) 0 ( t ) ⎥⎦ B

H BI ( 0 ) = H BI (φ0 ,θ 0 ,ψ 0 ) 6

3
Avoiding the Euler Angle Singularity
at θ = 90
Propagation of quaternion vector: single rotation
from inertial to body frame (4 parameters)

§ Rotation from one axis


system, I, to another, B,
represented by
§ Orientation of axis vector
about which the rotation
occurs (3 parameters of a unit
vector, a1, a2, and a3)
§ Magnitude of the rotation
angle, Ω, rad

Checklist
q Are the components of the Euler Angle rate
vector orthogonal to each other?
q Is the inverse of the transformation from
Euler Angle rates to body-axis rates the
transpose of the matrix?
q What complication does the inverse
transformation introduce?

4
Rigid-Body
Equations of Motion

Point-Mass
Dynamics
• Inertial rate of change of translational position ! u $
# &
rI = v I = H IB v B vB = # v &
#" w &%

• Body-axis rate of change of translational velocity


– Identical to angular-momentum transformation

1
v! I = FI
m
1 B
v! B = H BI v! I − ω" B v B = H I FI − ω" B v B
m
! X $ ! C X qS $
& # & 1
= FB − ω" B v B
#
FB = # Y & = # CY qS &
#" Z &%B # CZ qS &
m 10
" %

5
Rigid-Body Equations of Motion
(Euler Angles)
• Translational
Position
! x $
# & • Rate of change of
rI = # y &
#" z &% Translational Position rI (t ) = H IB (t ) v B (t )
I

• Angular
Position
% φ (
' *
• Rate of change of
Angular Position
 I (t ) = LIB (t ) ω B (t )
Θ
ΘI = ' θ *
' ψ *
& )I
• Translational
Velocity ! • Rate of change of
u $ 1
# & v B (t ) =  B (t ) v B (t )
FB (t ) + H BI (t ) g I − ω
vB = # v & Translational Velocity m (t )
#" w &% B
• Angular
Velocity
" p % • Rate of change of
$ '
ωB = $ q ' Angular Velocity ω! B ( t ) = I B −1 ( t ) ⎡⎣ M B ( t ) − ω" B ( t ) I B ( t ) ω B ( t ) ⎤⎦
$ r '
# &B
11

Aircraft Characteristics
Expressed in Body Frame
of Reference
! Xaero + Xthrust $ ! CX + CX $ ! CX $
Aerodynamic # & # aero thrust
& 1 # &
and thrust FB = # Yaero + Ythrust C
& = # Yaero + CYthrust & ρV 2 S = # CY & qS
force # Z +Z & # & 2 # C &
" aero thrust C
% B #" Zaero + C Zthrust &% " Z %B
B

! C +C $
! Laero + Lthrust $ # (
laero lthrust b & ) ! Cl b $
Aerodynamic and # & # & 1 2 # &
thrust moment M B = # M aero + M thrust ( )
& = # Cmaero + Cmthrust c & ρV S = # Cm c & q S
2
# N +N & # & # Cb &
" aero thrust
"
(
% B # Cnaero + Cnthrust b &
%B
) " n %B

⎡ I xx − I xy − I xz ⎤ Reference Lengths
Inertia ⎢ ⎥
matrix I B = ⎢ − I xy I yy − I yz ⎥ b = wing span
⎢ ⎥
⎢⎣ − I xz − I yz I zz ⎥ c = mean aerodynamic chord 12
⎦B

6
Rigid-Body Equations of Motion:
Position
Rate of change of Translational Position

x I = ( cosθ cosψ ) u + ( − cos φ sin ψ + sin φ sin θ cosψ ) v + ( sin φ sin ψ + cos φ sin θ cosψ ) w
y I = ( cosθ sin ψ ) u + ( cos φ cosψ + sin φ sin θ sin ψ ) v + ( − sin φ cosψ + cos φ sin θ sin ψ ) w
zI = ( − sin θ ) u + ( sin φ cosθ ) v + ( cos φ cosθ ) w

Rate of change of Angular Position

φ = p + ( q sin φ + r cos φ ) tan θ


θ = q cos φ − r sin φ
ψ = ( q sin φ + r cos φ ) sec θ
13

Rigid-Body Equations of Motion:


Rate
Rate of change of Translational Velocity
u = X / m − gsin θ + rv − qw
v = Y / m + gsin φ cosθ − ru + pw
w = Z / m + g cos φ cosθ + qu − pv

Rate of change of Angular Velocity

( { ( ) ( ) })
p! = I zz L + I xz N − I xz I yy − I xx − I zz p + ⎡⎣ I xz2 + I zz I zz − I yy ⎤⎦ r q (I xx I zz − I xz2 )

q! = ⎡⎣ M − ( I xx − I zz ) pr − I xz ( p 2 − r 2 ) ⎤⎦ I yy

( { ( ) ( ) })
r! = I xz L + I xx N − I xz I yy − I xx − I zz r + ⎡⎣ I xz2 + I xx I xx − I yy ⎤⎦ p q (I xx I zz − I xz2 )

Mirror symmetry, Ixz ≠ 0


14

7
Checklist
q Why is it inconvenient to solve momentum rate
equations in an inertial reference frame?
q Are angular rate and momentum vectors
aligned?
q How are angular rate equations transformed
from an inertial to a body frame?

15

FLIGHT -
Computer Program to
Solve the 6-DOF
Equations of Motion

16

8
FLIGHT - MATLAB Program

http://www.princeton.edu/~stengel/FlightDynamics.html 17

FLIGHT - MATLAB Program

http://www.princeton.edu/~stengel/FlightDynamics.html
18

9
FLIGHT, Version 2 (FLIGHTver2.m)
• Provides option for calculating rotations
with quaternions rather than Euler angles
• Input and output via Euler angles in both
cases
• Command window output clarified
• On-line at
http://www.princeton.edu/~stengel/FDcode
B.html

19

Examples from FLIGHT

20

10
Longitudinal Transient
Response to Initial Pitch Rate

• For a symmetric aircraft, longitudinal


Bizjet, M = 0.3, Altitude = 3,052 m perturbations do not induce lateral-
directional motions 21

Transient Response
to Initial Roll Rate
Lateral-Directional Response Longitudinal Response

Bizjet, M = 0.3, Altitude = 3,052 m For a symmetric aircraft, lateral-


directional perturbations do induce
longitudinal motions
22

11
Transient Response to
Initial Yaw Rate
Lateral-Directional Response Longitudinal Response

Bizjet, M = 0.3, Altitude = 3,052 m

23

Crossplot of Transient
Response to Initial Yaw Rate
Longitudinal-Lateral-Directional Coupling

Bizjet, M = 0.3, Altitude = 3,052 m 24

12
Checklist
q Does longitudinal response couple into lateral-
directional response?
q Does lateral-directional response couple into
longitudinal response?

25

Aerodynamic Damping

26

13
Pitching Moment due to Pitch Rate

(
M B = Cm q Sc ≈ Cmo + Cmq q + Cmα α q Sc )
⎛ ∂C ⎞
≈ ⎜ Cmo + m q + Cmα α ⎟ q Sc
⎝ ∂q ⎠
27

Angle of Attack Distribution


Due to Pitch Rate

Aircraft pitching at a constant rate, q rad/s, produces a


normal velocity distribution along x
Δw = −qΔx
Corresponding angle of attack distribution
Δw −qΔx
Δα = =
V V
Angle of attack perturbation at tail center of pressure
qlht
Δα ht = lht = horizontal tail distance from c.m.
V 28

14
Horizontal Tail Lift
Due to Pitch Rate
Incremental tail lift due to pitch rate, referenced to tail area, Sht

ΔLht = ΔC Lht ( ) ht
1
2
ρV 2 Sht

Incremental tail lift coefficient due to pitch rate, referenced


to wing area, S

⎛ Sht ⎞ ⎡⎛ ∂ C Lht ⎞ ⎤ ⎛ ∂ CL ⎞
( ΔC ) (
= ΔC Lht ) ⎜⎝ ⎟⎠ = ⎢⎜ ⎟ Δα ⎥ = ⎜ ht

⎛ qlht ⎞
⎜ ⎟
⎢⎣⎝ ∂α ⎠ aircraft ⎥⎦ ⎝ ∂α ⎠ aircraft ⎝ V ⎠
Lht aircraft ht S

Lift coefficient sensitivity to pitch rate referenced to wing area

∂ ΔC Lht( ) ⎛ ∂ C Lht ⎞ ⎛ lht ⎞


C Lqht ≡ aircraft
=⎜ ⎟ ⎜ ⎟
∂q ⎝ ∂α ⎠ aircraft ⎝ V ⎠
29

Moment Coefficient
Sensitivity to Pitch Rate of
the Horizontal Tail
Differential pitch moment due to pitch rate
∂ ΔM ht 1 ⎛l ⎞ 1
= Cmqht ρV 2 Sc = −C Lqht ⎜ ht ⎟ ρV 2 Sc
∂q 2 ⎝V⎠2
⎡⎛ ∂ C L ⎞ ⎛ lht ⎞ ⎤ ⎛ lht ⎞ 1
= − ⎢⎜ ⎜ ⎟ ⎥ ⎜ ⎟ ρV Sc
ht 2

⎢⎣⎝ ∂α ⎠ aircraft ⎝ V ⎠ ⎥⎦ ⎝ c ⎠ 2

Coefficient derivative with respect to pitch rate


∂ C Lht ⎛ lht ⎞ ⎛ lht ⎞ ∂ C Lht ⎛ lht ⎞ ⎛ c ⎞ 2

Cmqht =− ⎜⎝ ⎟⎠ ⎜⎝ ⎟⎠ = − ⎜ ⎟ ⎜ ⎟
∂α V c ∂α ⎝ c ⎠ ⎝ V ⎠
30

15
Pitch-Rate Derivative Definitions
• Pitch-rate derivatives are often expressed qc
in terms of a normalized pitch rate q̂ !
2V
∂ Cm ∂ Cm ⎛ 2V ⎞
Cmq̂ = = =⎜ ⎟C
∂ q̂ ∂ ( qc 2V ) ⎝ c ⎠ mq

Pitching moment sensitivity to pitch rate

∂ Cm ⎛ c ⎞
C mq = =⎜ ⎟C
∂ q ⎝ 2V ⎠ mq̂

∂M ⎛ c ⎞ ⎛ ρV ⎞
2
⎛ ρVSc 2 ⎞
= Cmq ( ρV 2 2 ) Sc = Cmq̂ ⎜ =
⎝ 2V ⎟⎠ ⎜⎝ 2 ⎟⎠
Sc C mq̂ ⎜
∂q ⎝ 4 ⎟⎠
31

Roll Damping Due to Roll Rate

⎛ ρV 2 ⎞ ⎛ b ⎞ ⎛ ρV ⎞
2
= l p̂ ⎜
⎝ 2V ⎟⎠ ⎜⎝ 2 ⎟⎠
Cl p ⎜ Sb C Sb
⎝ 2 ⎟⎠ pb
p̂ =
⎛ ρV ⎞ 2 2V
= Cl p̂ ⎜
⎝ 4 ⎟⎠
< 0 for stability Sb

• Vertical tail, horizontal tail, and wing


are principal contributors

• Roll damping of wing with taper

∂ ( ΔCl )Wing C Lα & 1 + 3λ )


(C ) l p̂
Wing
=
∂ p̂
=− (
12 ' 1 + λ *
+

• For thin triangular wing


π AR
NACA-TR-1098, 1952
NACA-TR-1052, 1951
(C ) l p̂
Wing
=−
32 32

16
Roll Damping Due
to Roll Rate
Tapered vertical tail
∂ ( ΔCl )vt CY % S (% 1+ 3λ (
(C ) l p̂
vt
=
∂ p̂
= − βvt ' vt *'
12 & S )& 1+ λ )
*
p̂ =
pb
2V
Tapered horizontal tail

∂ ( ΔCl )ht C L % S (% 1+ 3λ (
(C )
l p̂
ht
=
∂ p̂
= − αht ' ht *'
12 & S )& 1+ λ )
*

pb/2V describes helix angle


for a steady roll
33

Yaw Damping Due to Yaw Rate

⎛ ρV 2 ⎞ ⎛ b ⎞ ⎛ ρV ⎞
2
Sb = Cnr̂ ⎜
⎝ 2V ⎟⎠ ⎜⎝ 2 ⎟⎠
Cnr ⎜ Sb
⎝ 2 ⎟⎠
⎛ ρV ⎞ 2
= Cnr̂ ⎜
⎝ 4 ⎟⎠
Sb
< 0 for stability

Normalized yaw rate

rb
r̂ =
2V
34

17
Yaw Damping Due
to Yaw Rate

Vertical tail contribution


( )
Δ ( Cn )Vertical Tail = − Cnβ
Vertical Tail ( )
rlvt
( )
V = − Cnβ Vertical Tail
⎛ lvt ⎞ ⎛ b ⎞
⎜⎝ ⎟⎠ ⎜⎝ ⎟⎠ r
b V

∂ Δ ( Cn )Vertical Tail ∂ Δ ( Cn )Vertical Tail


(C )
nr̂ vt =
(
∂ rb 2V )
=
∂ r̂
= −2 Cnβ ( ) Vertical Tail
⎛ lvt ⎞
⎜⎝ ⎟⎠
b

Wing contribution
(C ) nr̂ Wing = k0C L2 + k1C DParasite, Wing
k0 and k1 are functions of NACA-TR-1098, 1952
aspect ratio and sweep angle NACA-TR-1052, 1951 35

Checklist
q What is the primary source of pitch damping?
q What is the primary source of yaw damping?
q What is the primary source of roll damping?
q What is the difference between

Cmq and Cmq̂ ?

36

18
Daedalus and Icarus, father and son,
Attempt to escape from Crete (<630 BC)

Other human-powered
airplanes that didn t work

Bob W

C Davis

Edward Frost (1902)

19
AeroVironment Gossamer Condor
Winner of the 1st Kremer Prize: Figure 8 around pylons half-mile apart
(1977)

AeroVironment Gossamer Albatross


and MIT Monarch
2nd Kremer Prize: crossing the English Channel (1979)
3rd Kremer Prize: 1500 m on closed course in < 3 min (1984)

Gene Larrabee, 'Mr. Propeller' of human-powered flight, dies at 82 (1/11/2003)


“The Albatross' pilot could stay aloft only 10 minutes at first. With (Larrabee’s)
propeller, he stayed up for over an hour on his first flight …. There was no way the
Albatross could cross the Channel, which took almost three hours, without
(Larrabee’s) propeller.” (D. Wilson)

20
MIT Daedalus
Flew 74 miles across the Aegean Sea, completing Daedalus s
intended flight (1988)

Next Time:
Aircraft Control Devices
and Systems
Reading:
Flight Dynamics
214-234

Learning Objectives
Control surfaces
Control mechanisms
Powered control
Flight control systems
Fly-by-wire control
Nonlinear dynamics and aero/mechanical instability
42

21
Supplemental
Material

43

Airplane Angular Attitude (Position)


(ψ ,θ ,φ )
• Euler angles
• 3 angles that relate one
Cartesian coordinate frame to
another
• defined by sequence of 3
rotations about individual axes
• intuitive description of angular
attitude
• Euler angle rates have a
nonlinear relationship to body-
axis angular rate vector
• Transformation of rates is
singular at 2 orientations,
90
44

22
Airplane Angular Attitude (Position)
B
⎡ h11 h12 h13 ⎤
⎢ ⎥
H I (φ ,θ ,ψ ) = ⎢ h21 h22
B
h23 ⎥
⎢ h h h33 ⎥
⎣ 31 32 ⎦I
H BI (φ ,θ ,ψ ) = H 2B (φ )H12 (θ )H1I (ψ )
−1 T
⎡⎣ H BI (φ ,θ ,ψ ) ⎤⎦ = ⎡⎣ H BI (φ ,θ ,ψ ) ⎤⎦ = H IB (ψ ,θ , φ )

• Rotation matrix
• orthonormal transformation
• inverse = transpose
• linear propagation from one attitude to
another, based on body-axis rate vector
• 9 parameters, 9 equations to solve
• solution for Euler angles from parameters
is intricate 45

Airplane Angular Attitude (Position)


Rotation Matrix
H BI (φ ,θ ,ψ ) = H 2B (φ )H12 (θ )H1I (ψ )
H BI (φ ,θ ,ψ ) =
⎡ 1 0 0 ⎤ ⎡ cosθ 0 − sin θ ⎤ ⎡ cosψ sinψ 0 ⎤
⎢ ⎥⎢ ⎥⎢ ⎥
⎢ 0 cos φ sin φ ⎥⎢ 0 1 0 ⎥ ⎢ − sinψ cosψ 0 ⎥
⎢ 0 − sin φ cos φ ⎥ ⎢⎣ sin θ 0 cosθ ⎥⎦ ⎢ 0 0 1 ⎥⎦
⎣ ⎦ ⎣
H BI (φ ,θ ,ψ ) =
⎡ cosθ cosψ cosθ sinψ − sin θ ⎤
⎢ ⎥
⎢ − cos φ sinψ + sin φ sin θ cosψ cos φ cosψ + sin φ sin θ sinψ sin φ cosθ ⎥
⎢ sin φ sinψ + cos φ sin θ cosψ − sin φ cosψ + cos φ sin θ sinψ cos φ cosθ ⎥
⎣ ⎦

H BI H IB = I for all (φ ,θ ,ψ ), i.e., No Singularities 46

23
Airplane Angular Attitude (Position)
Rotation Matrix = Direction Cosine Matrix

Angles between
each I axis and each
B axis

⎡ cos δ11 cos δ 21 cos δ 31 ⎤


⎢ ⎥
H BI = ⎢ cos δ12 cos δ 22 cos δ 32 ⎥
⎢ cos δ cos δ 23 cos δ 33 ⎥
⎣ 13

47

Euler Angle Dynamics

⎡ φ! ⎤ ⎡ 1 sin φ tan θ cos φ tan θ ⎤ ⎡ p ⎤


! =⎢
Θ
⎥ ⎢
cos φ
⎥⎢ ⎥
− sin φ ⎥ ⎢ q ⎥ = LIB ω B
⎢ θ! ⎥=⎢ 0
⎢ ψ! ⎥ ⎢ 0 sin φ secθ cos φ secθ ⎥ ⎢⎣ r ⎥⎦
⎣ ⎦ ⎣ ⎦

LIB is not orthonormal


LIB is singular when θ = ± 90°

48

24
Rigid-Body Equations of Motion
(Euler Angles)

r!I ( t ) = H IB ( t ) v B ( t )

! ( t ) = LI ( t ) ω ( t )
Θ H IB , H BI are functions of Θ
I B B

1
v! B ( t ) = FB ( t ) + H BI ( t ) g I − ω" B ( t ) v B ( t )
m (t )

ω! B ( t ) = I B −1 ( t ) ⎡⎣ M B ( t ) − ω" B ( t ) I B ( t ) ω B ( t ) ⎤⎦
49

Rotation Matrix Dynamics


# 0 −ω z ωy &
% (
! h B = ω" I h I = ω" I H h B
H I
B
I
B
ω = % ω z 0 −ω x (
% (
%$ −ω y ωx 0 (
'

! IB = ω" I H IB
H

! BI = − ω" B H BI
H
50

25
Rigid-Body Equations of Motion
(Attitude from 9-Element Rotation Matrix)
rI = H IB v B
 BI = −ω
H  B H BI

1
v B = FB + H BI g I − ω B v B
m

ω B = I B−1 ( M B − ω B I Bω B )
No need for Euler angles to solve the dynamic equations
51

Euler Rotation of a Vector


Rotation of a vector to an arbitrary new orientation
can be expressed as a single rotation about an axis
at the vector’s base

⎡ a1 ⎤
⎢ ⎥ Orientation of rotation axis
a ! ⎢ a2 ⎥ :
⎢ a ⎥ in reference frame
⎣ 3 ⎦
Ω : Rotation angle

52

26
Euler’s Rotation Theorem
Vector transformation
involves 3 components
rB = H BI rI
= ( aT rI ) a + ⎡⎣ rI − ( aT rI ) a ⎤⎦ cos Ω + sin Ω ( rI × a )
= cos Ω rI + (1− cos Ω ) ( aT rI ) a − sin Ω ( a × rI )

⎡ a1 ⎤
⎢ ⎥ Orientation of rotation axis
a ! ⎢ a2 ⎥ :
⎢ a ⎥ in reference frame
⎣ 3

Ω : Rotation angle

53

Rotation Matrix
Derived from
Euler’s Formula

rB = H BI rI = cos Ω rI + (1− cos Ω ) ( aT rI ) a − sin Ω ( a! rI )


Identity

( a r ) a = ( aa ) r
T
I
T
I

Rotation matrix

H BI = cos Ω I 3 + (1− cos Ω ) aaT − sin Ω a!


54

27
Quaternion Derived from Euler
Rotation Angle and Orientation
Quaternion vector
4 parameters based on Euler’s formula

⎡ ⎡ ⎛ a1 ⎞ ⎤
q1 ⎤ ⎢ ⎥
⎢ ⎥ ⎤ ⎢ sin ( Ω 2 ) ⎜ a ⎟
⎢ q2 ⎥ ⎡ q 3 ⎤ ⎡ sin ( Ω 2 ) a ⎜ 2 ⎟

q=⎢ !⎢ ⎥=⎢ ⎥=⎢ ⎥ ( 4 × 1)
q3 ⎥ ⎢ q4 ⎥ ⎢ cos ( Ω 2 ) ⎥ ⎢ ⎜ a3


⎠ ⎥
⎢ ⎥ ⎣ ⎦ ⎣ ⎦ ⎢ ⎥
⎢⎣ q4 ⎥
⎦ ⎢⎣ cos ( Ω 2 ) ⎥⎦

4-parameter representation of 3 parameters;


hence, a constraint must be satisfied

q T q = q12 + q2 2 + q32 + q4 2
= sin 2 ( Ω 2 ) + cos 2 ( Ω 2 ) = 1
55

Rotation Matrix Expressed with


Quaternion
From Euler’s formula

H BI = ⎡⎣ q4 2 − ( q 3 T q 3 ) ⎤⎦ I 3 + 2q 3q 3T − 2q4 q! 3
Rotation matrix from quaternion
H BI =
⎡ q2 − q2 − q2 + q2 2 ( q1q2 + q3q4 ) 2 ( q1q3 − q2 q4 ) ⎤
⎢ 1 2 3 4

⎢ 2 ( q1q2 − q3q4 ) −q12 + q22 − q32 + q42 2 ( q2 q3 + q1q4 ) ⎥
⎢ ⎥
⎢ 2 ( q1q3 + q2 q4 ) 2 ( q2 q3 − q1q4 ) −q12 − q22 + q32 + q42 ⎥
⎣ ⎦
56

28
Quaternion Expressed from
Elements of Rotation Matrix
Initialize q(0) from Direction Cosine Matrix or Euler Angles
⎡ h11 ( = cos δ11 ) h12 h13 ⎤
⎢ ⎥
H (0) = ⎢
B
I h21 h22 h23 ⎥ = H BI (φ0 ,θ 0 ,ψ 0 )
⎢ h31 h32 h33 ⎥
⎣ ⎦
1
q4 ( 0 ) = 1+ h11 ( 0 ) + h22 ( 0 ) + h33 ( 0 )
2
Assuming that q4 ≠ 0

⎡ q (0) ⎤ ⎡ ⎡⎣ h23 ( 0 ) − h32 ( 0 ) ⎤⎦ ⎤


⎢ 1 ⎥ ⎢ ⎥
1 ⎢
q 3 ( 0 ) ! ⎢ q2 ( 0 ) ⎥ = ⎣⎡ h31 ( 0 ) − h13 ( 0 ) ⎦⎤ ⎥

⎢ ⎥ 4q4 ( 0 ) ⎢
⎢⎣ q ( 0 ) ⎥⎦ ⎢ ⎡⎣ h12 ( 0 ) − h21 ( 0 ) ⎤⎦ ⎥
⎣ ⎦
3 57

Quaternion Vector Kinematics

d ⎡ q 3 ⎤ 1 ⎡ q4 ω B − ω" B q 3 ⎤
q! = ⎢ ⎥= ⎢ ⎥ ( 4 × 1)
dt ⎢ q4 ⎥ 2 ⎢
⎣ ⎦ −ω BT q 3 ⎥⎦

Differential equation is linear in either q or ωB

⎡ q!1 ⎤ ⎡ 0 ωz −ω y ω x ⎤ ⎡ q1 ⎤
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ q!2 ⎥ 1 ⎢ −ω z 0 ωx ωy ⎥ ⎢ q2 ⎥
⎢ = ⎢ ⎥
q! 3 ⎥ 2 ⎢ ω y −ω x 0 ωz ⎥ ⎢ q3 ⎥
⎢ ⎥ ⎢ ⎥
⎢⎣ q! 4 ⎥ ⎢ −ω −ω y −ω z 0 ⎥ ⎢⎣ q4 ⎥
⎦ ⎣ x
⎦B ⎦
58

29
Propagate Quaternion Vector
Using Body-Axis Angular Rates
⎡ p (t ) q (t ) r (t ) ⎤ ! ⎡ ω ω ω ⎤
⎣ ⎦ ⎣ x y z

⎡ q!1 ( t ) ⎤ ⎡ 0 r ( t ) −q ( t ) p ( t ) ⎤ ⎡ q1 ( t ) ⎤
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
dq ( t ) ⎢ q!2 ( t ) ⎥ 1 ⎢ −r ( t ) 0 p (t ) q (t ) ⎥ ⎢ q2 ( t ) ⎥
=⎢ ⎥= ⎢ ⎥ ⎢ ⎥
dt ⎢ q! 3 ( t ) ⎥ 2 ⎢ q ( t ) − p ( t ) 0 r (t ) ⎥ ⎢ q3 ( t ) ⎥
⎢ q! 4 ( t ) ⎥⎥ ⎢ − p ( t ) −q ( t ) −r ( t ) 0 ⎥ ⎢ q4 ( t ) ⎥⎥
⎢⎣ ⎦ ⎢⎣ ⎥⎦ B ⎢⎣ ⎦
Digital integration to compute q(tk)

dq (τ )
tk

q int ( t k ) = q ( t k−1 ) + ∫t dt dτ
k−1
59

Euler Angles Derived from Quaternion



{
⎡ φ ⎤ ⎢ atan2 2 ( q1q4 + q2 q3 ) , ⎣1− 2 ( q1 + q2 ) ⎦
⎡ 2 2
⎤ } ⎤⎥
⎢ ⎥ ⎢ ⎥
⎢ θ ⎥=⎢ sin −1 ⎡⎣ 2 ( q2 q4 − q1q3 ) ⎤⎦ ⎥
⎢ ψ ⎥ ⎢ ⎥


{
⎦ ⎢ atan2 2 ( q3q4 + q1q2 ) , ⎡1− 2 ( q2 2 + q32 ) ⎤
⎣ ⎦ } ⎥

• atan2: generalized arctangent algorithm, 2 arguments
– returns angle in proper quadrant
– avoids dividing by zero
– has various definitions, e.g., (MATLAB)
⎧ ⎛ y⎞
⎪ tan −1 ⎜ ⎟ if x > 0
⎪ ⎝ x⎠
⎪⎪ ⎛ y⎞ ⎛ y⎞
atan2 ( y, x ) = ⎨ π + tan −1 ⎜ ⎟ , − π + tan −1 ⎜ ⎟ if x < 0 and y ≥ 0, < 0
⎝ x⎠ ⎝ x⎠

⎪ π 2 , −π 2 if x = 0 and y > 0, < 0

⎪⎩ 0 if x = 0 and y = 0 60

30
Successive Rotations Expressed
by Products of Quaternions and
Rotation Matrices
Rotation from Frame q BA : Rotation from A to B
A to Frame C through qCB : Rotation from B to C
Intermediate Frame B
qCA : Rotation from A to C
Matrix Multiplication Rule

HCA ( qCA ) = HCB ( qCB ) H BA ( q BA )


Quaternion Multiplication Rule
⎡ q C q B + q B q C − q" C q B ⎤
⎢ ( 4 )B 3A ( 4 )A 3B ( 3 )B 3A
C
⎡ q3 ⎤ ⎥
qCA = ⎢ ⎥ = qCB q BA ! ⎢ ⎥
⎢⎣ q4 ⎥⎦ A ⎢⎣ ( q 4 )C
B
( q 4 ) B
A
− ( q 3B ) q3AB
C T
⎥⎦
61

Rigid-Body Equations of Motion


(Attitude from 4-Element Quaternion Vector)

rI = H IB v B
q! = Qq H IB , H BI are functions of q
1
v B = FB + H BI g I − ω B v B
m

ω B = I B−1 ( M B − ω B I Bω B )
62

31
Alternative Reference
Frames

63

Velocity Orientation in an Inertial


Frame of Reference
Polar Coordinates Projected on a Sphere

64

32
Body Orientation with Respect
to an Inertial Frame

65

Relationship of Inertial Axes


to Body Axes
• Transformation is
independent of
velocity vector ! u $ ! vx $
• Represented by # & B
# &
– Euler angles # v & = H I # v y &
– Rotation matrix #" w &% # &
v
"# z &%
! vx $ ! u $
# & I # &
# vy & = H B # v &
# & #" w &%
#" vz &%
66

33
Velocity-Vector Components
of an Aircraft
V, ξ , γ

V, β , α
67

Velocity Orientation with Respect


to the Body Frame
Polar Coordinates Projected on a Sphere

68

34
Relationship of Inertial Axes
to Velocity Axes
• No reference to the body
frame
• Bank angle, μ, is roll angle
about the velocity vector

! vx $ ! V cos γ cos ξ $
# & # &
# vy & = # V cos γ sin ξ &
# & # −V sin γ &
#" vz &% I " %
# &
vx2 + vy2 + vz2
# V & % (
% ( % 2 1/2 &
(
−1 #
( 2
% ξ ( = % sin $ vy / vx + vy ' ) (
% γ ( % (
$ ' % sin −1 ( −vz / V ) (
$ '
69

Relationship of Body Axes


to Wind Axes
• No reference to
the inertial frame

# &
! u $ ! V cos α cos β $ # V & % u 2 + v2 + w2 (
# & # & % ( %
# v &=# V sin β & % β (=% sin ( v / V ) (
−1

#" w &% # V sin α cos β & (


%$ α (' % tan −1 ( w / u ) (
" % $ '

70

35
Angles Projected
on the Unit Sphere

Origin is airplane s
center of mass
α : angle of attack
β : sideslip angle
γ : vertical flight path angle
ξ : horizontal flight path angle
ψ : yaw angle
θ : pitch angle
φ : roll angle (about body x − axis)
µ : bank angle (about velocity vector)
71

Alternative Frames of Reference


• Orthonormal transformations connect all reference frames

72

36

You might also like