0% found this document useful (0 votes)
54 views11 pages

UAV Coordinate Frames and Rigid Body Dynamics

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views11 pages

UAV Coordinate Frames and Rigid Body Dynamics

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Brigham Young University

BYU ScholarsArchive

Faculty Publications

2004-01-01

UAV Coordinate Frames and Rigid Body Dynamics


Randal Beard
beard@byu.edu

Follow this and additional works at: https://scholarsarchive.byu.edu/facpub

Part of the Electrical and Computer Engineering Commons

Original Publication Citation


Randal W. Beard, Timothy W. McLain, Small Unmanned Aircraft: Theory and Practice, Princeton
University Press, 2012, ISBN: 978-06-911-4921-9.

BYU ScholarsArchive Citation


Beard, Randal, "UAV Coordinate Frames and Rigid Body Dynamics" (2004). Faculty Publications. 1323.
https://scholarsarchive.byu.edu/facpub/1323

This Report is brought to you for free and open access by BYU ScholarsArchive. It has been accepted for inclusion
in Faculty Publications by an authorized administrator of BYU ScholarsArchive. For more information, please
contact ellen_amatangelo@byu.edu.
Chapter 2

UAV Coordinate Frames and Rigid Body


Dynamics

2.0.1 Rotation Matrices


This section describes the various coordinate systems that are used to describe the position of
orientation of aircraft, and the transformation between these coordinate systems. It is necessary to
use several different coordinate systems for the following reasons:
• Newton’s equations of motion are given the coordinate frame attached to the UAV.

• Some of the on-board sensors take measurements in the body frame, e.g., rate gyros, while
some of the sensors take measurements in the inertial frame, e.g., GPS.

• Aerodynamics forces and torques are exerted in the body frame.

• Most system requirements, e.g., flight trajectories, are specified in the inertial frame.
We begin in two dimensions by considering the two coordinate frames shown in Figure 2.1.
The vector p can be expressed in both the C0 frame (specified by (i0 , j0 )) and in the C1 frame
(specified by (i1 , j1 )). In the C0 frame we have

p = p0x i0 + p0y j0 .

Alternatively in the C1 frame we have

p = p1x i1 + p1y j1 .

Setting these two expressions equal to each other gives

p0x i0 + p0y j0 = p1x i1 + p1y j1 .

3
4

Figure 2.1: Rotation in 2D

Taking the dot product of both sides with i0 and j0 respectively, and stacking the result into matrix
form gives à ! à !à !
0
4 p x i 0 · i 1 i 0 · j 1 p1x
p0 = = .
p0y j0 · i1 j0 · j1 p1y
Noting that

i0 · i1 = cos(θ)
i0 · j1 = − sin(θ)
j0 · i1 = sin(θ)
j0 · j1 = cos(θ)

gives
p0 = R1→0 p1 ,
where à !
4 cos(θ) − sin(θ)
R1→0 = .
sin(θ) cos(θ)
One interpretation is that R1→0 transforms vectors expressed in frame C1 to an equivalent expres-
sion in C0 .
Inverting R1→0 gives
4
p1 = R1→0
−1
p0 = R0→1 p0 ,
where
à !−1 à !
cos(θ) − sin(θ) 1 cos(θ) sin(θ) T
R0→1 = = = R1→0 .
sin(θ) cos(θ) cos2 (θ) + sin2 (θ) − sin(θ) cos(θ)
UAV Coordinate Frames and Rigid Body Dynamics 5

In general, the inverse of a rotation matrix will be its transpose.


An alternate interpretation of R1→0 is that the coordinate axis C0 has been rotated into the
coordinate axis C1 by an angle of θ.
In three dimensions, a rotation of θ about the z-axis is given by
 
cos(θ) − sin(θ) 0
4  
R1→0 =  sin(θ) cos(θ) 0 .
0 0 1

Alternatively, a rotation of θ about the x-axis is given by


 
1 0 0
4  
R1→0 = 0 cos(θ) − sin(θ) ,
0 sin(θ) cos(θ)

and a rotation about the y-axis is given by


 
cos(θ) 0 − sin(θ)
4  
R1→0 = 0 1 0 .
sin(θ) 0 cos(θ)

2.0.2 UAV Coordinate Frames


For UAVs there are several coordinate systems that are of interest.

The inertial frame CI . The inertial coordinate system is an earth fixed coordinate system with
origin at the defined home location. The x-axis of CI points North, the y-axis points East,
and the z axis points toward the center of the earth.

The vehicle frame Cv . The origin of the vehicle frame is at the center of mass of the UAV. How-
ever, the axes of Cv are aligned with the axis of the inertial frame CI . In other words, the
x-axis points North, the y-axis points East, and the z-axis points toward the center of the
earth.

The body frame Cb . The origin of the body frame is also at the center of mass of the UAV. The
x-axis points out the nose of the UAV, the y-axis points out the right wing, and the z-axis
point out the belly. As the attitude of the UAV moves, the body frame remains fixed with
respect to the airframe.
6

The wind frame Cw . To maintain lift, the UAV is required to maintain a positive pitch angle with
respect to the velocity vector of the UAV. It is often convenient to align the body fixed
reference frame with the velocity vector. This is the purpose of the wind frame. The origin
of the wind frame is the center of mass of the UAV. The x-axis is aligned with the projection
of the velocity vector on the x−z plane of the body axis. The y-axis points out the right wing
of the UAV and the z-axis is constructed to complete a right handed orthogonal coordinate
systems.

Figure 2.2 shows the body and the wind axes. The velocity vectory of the UAV points in the
direction of the xw axis which makes a angle α with the xb axis.

Figure 2.2: The body and the wind axes of the UAV. The x-axis of the body frame Cb is aligned
with the body of the UAV, whereas the x-axis of the wind frame Cw is aligned with the velocity
vector of the UAV. The angle between xb and xw is the angle of attack α.

The orientation of an aircraft is specified by three angles, roll (φ), pitch (θ), and yaw (ψ),
which are called the Euler angles. The yaw angle is defined as the rotation ψ about the zv -axis in
the vehicle frame Cv . The resulting coordinate frame is denoted C1 and is shown in Figure 2.3. It
can be seen from the figure that the transformation from Cv to C1 is given by
 
cos(ψ) sin(ψ) 0
 
Ryaw (ψ) = Rv→1 = − sin(ψ) cos(ψ) 0 .
0 0 1
UAV Coordinate Frames and Rigid Body Dynamics 7

Cv xv

y1 ψ
C1
ψ x1

yv

z1 zv

Figure 2.3: Yaw Angle.

The pitch angle is defined as the rotation θ about the y1 axis in C1 . The resulting coordinate frame
is denoted by C2 and is shown in Figure 2.4. It can be seen from the figure that the transformation

x2

θ
x1

y2
C2
y1
C1
θ z2
z1

Figure 2.4: Pitch Angle.

from C1 to C2 is given by
 
cos(θ) 0 − sin(θ)
 
Rpitch (θ) = R1→2 = 0 1 0 .
sin(θ) 0 cos(θ)

The roll angle is defined as the rotation φ about the x2 axis in C2 . The resulting coordinate frame
is the body frame, denoted by Cb , and shown in Figure 2.5. It can be seen from the figure that the
8

x2
xb

y2
φ
C2 Cb
yb
φ
zb
z2

Figure 2.5: Roll Angle.

transformation from C2 to C1 is given by

 
1 0 0
 
Rroll (φ) = R2→b = 0 cos(φ) sin(φ)  .
0 − sin(φ) cos(φ)

Therefore, the complete transformation from the vehicle frame Cv to the body frame Cb is given by

pb = Rv→b pv ,

where

Rv→b = Rroll (φ)Rpitch (θ)Ryaw (ψ)


 
cθcψ cθsψ −sθ
 
= sφsθcψ − cφsψ sφsθsψ + cφcψ sφcθ ,
cφsθcψ + sφsψ cφsθsψ − sφcψ cφcθ

where cϕ = cos(ϕ) and sϕ = sin(ϕ).

2.0.3 UAV State Variables

The state variables of the UAV are the following twelve quantities
UAV Coordinate Frames and Rigid Body Dynamics 9

x = the inertial position of the UAV along xI in CI ,


y = the inertial position of the UAV along yI in CI ,
h = the altitude of the aircraft measured along zv in Cv ,
u = the body frame velocity measured along xb in Cb ,
v = the body frame velocity measured along yb in Cb ,
w = the body frame velocity measured along zb in Cb ,
φ = the roll angle defined with respect to C2 ,
θ = the pitch angle defined with respect to C1 ,
ψ = the yaw angle defined with respect to Cv ,
p = the roll rate measured along xb in Cb ,
q = the pitch rate measured along yb in Cb ,
r = the yaw rate measured along zb in Cb .

The state variables are shown schematically in Figure 2.6.

(x, u)
(φ, p)
(θ, q) Roll Axis

(ψ, r)
(y, v)
(z, w)
Pitch Axis
Yaw Axis

Figure 2.6: Definition of Axes


10

2.0.4 UAV Kinematics

The state variables x, y, and h are inertial frame quantities, whereas the velocities u, v, and w are
body frame quantities. Therefore the relationship between position and velocities is given by
   
x u
d    
 y  = Rb→v  v 
dt
−h w
 
u
T  
= Rv→b  v 
w
  
cθcψ sφsθcψ − cφsψ cφsθcψ + sφsψ u
  
= cθsψ sφsθsψ + cφcψ cφsθsψ − sφcψ   v  .
−sθ sφcθ cφcθ w

The relationship between absolute angles φ, θ, and ψ, and the angular rates p, q, and r is
also complicated by the fact that these quantities are defined in different coordinate frames. The
angular rates are defined in the body frame Cb , whereas the roll angle φ is defined in Cb as shown in
Figure 2.5, the pitch angle θ is defined in C2 as shown in Figure 2.4, and the yaw angle ψ is defined
in the vehicle frame C1 as shown in Figure 2.3. Therefore we have
       
p φ̇ 0 0
       
q  = Rb→b  0  + R2→b θ̇  + R1→b  0 
r 0 0 ψ̇
     
φ̇ 0 0
     
= I3  0  + Rroll (φ) θ̇ + Rroll (φ)Rpitch (θ)  0 
0 0 ψ̇
  
1 0 −sθ φ̇
  
= 0 cφ sφcθ  θ̇  .
0 −sφ cφcθ ψ̇

Inverting we get
    
φ̇ 1 sin(φ) tan(θ) cos(φ) tan(θ) p
    
 θ̇  = 0 cos(φ) − sin(φ)  q  .
ψ̇ 0 sin(φ) sec(θ) cos(φ) sec(θ) r
UAV Coordinate Frames and Rigid Body Dynamics 11

2.0.5 Rigid Body Dynamics

In general, Newton’s equations of motion are given by

¯
dv ¯¯
m =F
dt ¯I
¯
dω ¯¯
J = M,
dt ¯I

where vcg is the inertial velocity of the center of mass, F is the force exerted on the body in the
inertial frame, ω is the angular velocity, M is the inertial frame torque, m is the mass,

 
Jx Jxy Jxz
 
J = Jxy Jy Jyz 
Jxz Jyz Jz

¯
is the inertia tensor expressed in the body frame, and da ¯ is the time derivative of a in the inertial
dt I
frame. It is straightforward to argue [5] that if the body is rotating at an angular velocity of ω, then

¯ ¯
d ¯¯ d ¯¯
a = a¯ + ω × a,
dt ¯I dt b

where d/dt|b is the time derivate in the body frame.


Therefore the general six degrees-of-freedom model for a rigid body is given by [2, p. 101]

¯
dv ¯¯
m = −ω × mv + F
dt ¯b
¯
dω ¯¯
J = −ω × Jω + M
dt ¯b

where v = (u, v, w)T is the body frame velocity of the center of gravity expressed in the body
frame, ω = (p, q, r)T is the angular velocity about the center of gravity expressed in the body
frame, F = (Fx , Fy , Fz )T is the external force placed on the center of gravity, expressed in the
body frame, M = (L, M, N )T are the torques about the center of gravity, expressed in the body
frame.
12 2.1 Exercises

Summarizing the equations of motion are given by


    
ẋ cθcψ sφsθcψ − cφsψ cφsθcψ + sφsψ u
    
ẏ  = cθsψ sφsθsψ + cφcψ cφsθsψ − sφcψ   v  (2.1)
ḣ sθ −sφcθ −cφcθ w
1
v̇ = −ω × v + F (2.2)
   m  
φ̇ 1 sin(φ) tan(θ) cos(φ) tan(θ) p
    
 θ̇  = 0 cos(φ) − sin(φ)  q  (2.3)
ψ̇ 0 sin(φ) sec(θ) cos(φ) sec(θ) r
ω̇ = J−1 (−ω × Jω + M) (2.4)

2.1 Exercises
2.1 Develop a Simulink simulation of the equations of motion given in Equations (2.1)–(2.4).
Place various forces an torques on the UAV and convince yourself that your simulation gives
reasonable results.
Unzip the file homework1.zip. Change the name of the file

uaveom0_empty.m

to

uaveom0.m.

Find the location in the file where it says “UAV dynamics go here.” Delete the zeros and add
the appropriate equations.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy