06 Control1 Notes
06 Control1 Notes
Disclaimer: These notes have not been subjected to the usual scrutiny reserved for formal publications.
They may be distributed outside this class only with the permission of the Instructor(s).
This lecture introduces the Newton-Euler equation, basic aerodynamic effects of rotating propellers and the
dynamical model of a quadrotor. Furthermore we derive the derivative of a rotation matrix and discuss
differential flatness of the quadrotor dynamics.
2
1
3
4
Let us introduce the Newton-Euler equation, describing the translational and rotational dynamics of a rigid
body:
B
f mI3 0 aB 0
= + , (6.1)
τB 0 J αB ωB × J ωB
6-1
6-2 Lecture 6: Quadrotor Dynamics
For notational convenience, we express the forces in the world frame “w” while the torques remain in body
frame:
w w
f RB 0 mI3 0 aB 0
= + (6.2)
τB 0 I3 0 J αB ωB × J ωB
In the following, we discuss the nature of the forces f w and the torques τ B when the rigid body is a
quadrotor. The first external force we consider is gravity, which we make explicit in our model and move to
the right-hand-side of (6.1) (note: g w ∈ R3 is the gravity vector expressed in the world frame):
w w
−mg w
f RB 0 mI3 0 aB
= + (6.3)
τB 0 I3 0 J αB ωB × J ωB
Other forces and torques are due to aerodynamic effects. The two main aerodynamic effects for a quadrotor
are:
• Thrust Force
• Rotor Drag
• Hub Force
• Hub Moment
• Rolling Moment
• Ground effect
At low speed (< 10m/s), the latter are by more than one order of magnitude smaller than the rotor drag
and the trust force, and can therefore be neglected. A more detailed explanation of these effects is given
in [1].
Let us start modeling the thrust force of a full quadrotor. In a first approximation, the thrust force of a
single rotor i, expressed in the reference frame of rotor i (a.k.a. propeller frame Pi ), can be computed as
TiPi = cf wi |wi |e3 , with cf being a constant coefficient, mapping the signed square of the rotor spinning
velocity wi to a force and e3 = [0 0 1]T . This means that the thrust force pushes in the direction of the
Lecture 6: Quadrotor Dynamics 6-3
vertical axis of the propeller frame. For clarity, wi |wi | is the signed square of the rotor spinning velocity and
is sometimes denoted as sign(wi )(wi )2 . Therefore, the sum of all forces can be written as
4
X
B
fthrust = RPBi TiPi , (6.4)
i=1
with RPBi being the rotation matrix from propeller- to body-frame (RPBi = I3 for standard quadrotors).
The second force is the drag force due to the airflow around the body of the quadrotor. This is typically
modeled as a term proportional to the velocity of the quadrotor (we will include it in the model as part of
the Lab 3 exercises), but for now we will assume that it is negligible at low speeds (we will instead consider
the impact of drag on the torque).
Next we compute all torques. The torque consist of two components:
τ B = τdrag
B B
+ τthrust , (6.5)
B B
the drag torque τdrag and thrust torque τthrust . The drag torque provided by every single propeller (expressed
Pi
in the propeller frame Pi ) corresponds in a first approximation to τdragi
= (−1)(i+1) cd wi |wi |e3 , with cd being
i
the propeller drag coefficient. The factor (−1) is used since half of the propellers rotate clockwise and the
other half rotates counter-clockwise. The total drag torque expressed in body frame is therefore
4
X
B Pi
τdrag = RPBi τdragi
(6.6)
i=1
The thrust torque results from applying a non-centered force (thrust force) to a body. From physics we know
4
X
B
τthrust = (ρB B Pi
i × RPi Ti ), (6.7)
i=1
with ρBi being the position (vector) of the propeller i in the body frame.
We can now include the forces and torques in the model (6.3) and rearrange the terms:
maw mg w
w w
RB 0 B
fthrust −mge3 RB 0
= + = + Fw (6.8)
J αB −ω B × J ω B 0 I3 τdrag B B
+ τthrust −ω B × J ω B 0 I3
where we defined w = [w1 |w1 |, w2 |w2 |, w3 |w3 |, w4 |w4 |]T , we defined a suitable matrix F , and we observed
that for a typical choice of world frame (with the z axis pointing upwards) it holds g w = −ge3 . We remark
that the vector F w essentially includes the forces (except gravity) and the torques in the body frame, which
using (6.4)-(6.7) and assuming RPBi = I3 , can be written as:
B
fx
fyB
B
fz cf e3 cf e3 cf e3 cf e3
B = Fw = w
τx
B cd e3 + cf ρB1 × e3 −cd e3 + cf ρB2 × e3 cd e3 + cf ρB3 × e3 −cd e3 + cf ρB4 × e3
τy
τzB
(6.9)
Finally, we observe that (linear and angular) velocities and accelerations are related by:
ṗw = v w v̇ w = aw
(6.10)
ṘBw = RBw [ω B ]∧ ω˙B = αB
6-4 Lecture 6: Quadrotor Dynamics
where pw , v w , aw are the position, velocity, and acceleration of the body frame “B” with respect to the “w”
frame. Similarly, as mentioned above, ω B and αB are the angular velocity and acceleration of the body in
the body frame. The only expression in (6.10) which is nontrivial is ṘBw = RBw [ω B ]∧ , which we prove in the
next section.
We can now use (6.8) and (6.10) to finalize the dynamical model of a quadrotor in terms of first-order
differential equations:
mv̇ w
w
−mge3 RB 0
= + Fw
J ω˙B −ω B × J ω B 0 I3
(6.11)
ṗw = v w
ṘBw = RBw [ω B ]∧
where the state of the quadrotor is pw , v w , RBw , ω B and the control actions or inputs are the propeller
velocities, included in the vector w.
Consider the time-varying rotation matrix RBw = RBw (t), representing the rotation of the frame “B” with
respect to frame “w”. In the view of the orthogonality of RBw , it holds:
Equation (6.16) relates the rotation matrix RBw to its derivative by means of the skew-symmetric operator S.
In order to get a physical insight on the nature of the skew-symmetric operator S, let us consider a position
pB and assume that this position is constant in the body frame. Clearly, we can express the same point in
the world frame via: pw (t) = RBw (t)pB . Now, let us compute the time derivative of pw (t) as (recall the point
is fixed in the body frame):
ṗw (t) = ṘBw (t)pB , (6.17)
which, in view of (6.14), can be expressed as
If the vector ω w (t) denotes the angular velocity of the body frame with respect to the world frame (expressed
in the world frame), we know from basic physics that:
A differentially flat system is one in which the state x and control inputs u can be expressed as functions of
a subset of the system’s outputs, called the flat outputs and their time-derivatives. In other words,
y = h(x, u, u̇, ü, . . . ) (6.22)
is a flat output if there exists smooth functions gx and gu such that
x = gx (y, ẏ, ÿ, . . . ) (6.23)
and
u = gu (y, ẏ, ÿ, . . . ) (6.24)
In this section we show that the quadrotor dynamics with the four angular velocities of the propellers w as
inputs is differentially flat [2]. In other words, the states and the inputs can be written as algebraic functions
of four carefully selected flat outputs and their derivatives. This facilitates the automated generation of
trajectories since any smooth trajectory (with reasonably bounded derivatives) in the space of flat outputs
can be followed by the underactuated quadrotor. Our choice of flat outputs is given by
σ = [σ1 σ2 σ3 σ4 ]T = [x, y, z, ψ]T , (6.25)
where pw = [x, y, z]T are the coordinates of the center of mass of the quadrotor in the world coordinate
system and ψ is the yaw angle. We will define a trajectory, σ(t), as a smooth curve in the space of flat
outputs:
σ(t) : [to , tm ] → R3 × SO(2). (6.26)
We will now show that the state of the system and the control inputs can be written in terms of σ and its
derivatives. The following proof can be also found in [2].
Position pw and velocity v w . The position and velocity of the center of mass are simply the first three
terms of σ and σ̇, respectively.
w
Rotation matrix RB . To see that RBw is a function of the flat outputs and their derivatives, consider the
equation of motion (6.11). From (6.11), the translational part can be rewritten as:
σ̈1
m m
maw = −mge3 + f zBw ⇐⇒ zBw = [aw + ge3 ] ⇐⇒ zBw = σ̈2 (6.27)
f f
σ̈3 + g
1 Proof within the proof : to show (a)∧ R = R (RT a)∧ , we can show that the i-th column of the matrix in the left- and
right-hand side of the equation are identical. The i-th column of (a)∧ R is (a)∧ Rei (ei is a vector which is zero everywhere and
has the i-th entry equal to 1). On the other hand, the i-th column of matrix in the rhs side is R(RT a)∧ ei = R(RT a × ei ) =
a × Rei = a∧ Rei , concluding the proof.
6-6 Lecture 6: Quadrotor Dynamics
z̃B
z̃B
Side view:
x̃B
x̃B
where we noticed that the thrust force (with some magnitude f ) is applied along the vertical direction in the
body frame, i.e., along the vector zBw . Noticing that zBw must have unit norm, we realize we do not actually
need to compute m f , but we can simply write:
σ̈1
v
zBw = with v = σ̈2 (6.28)
kvk
σ̈3 + g
Given the yaw angle, σ4 = ψ, we can write the unit vector
x̃w
B = [cos(σ4 ), sin(σ4 ), 0]
T
(6.29)
as shown in Figure 6.2. Note that x̃w
B is an auxiliary vector describing the x axis of a rotating frame having
the same yaw angle as B but with no pitch and roll. This auxiliary vector allows computing the yBw axis as
(provided zBw × x̃w
B 6= 0):
zBw × x̃w
yBw = B
, (6.30)
||zBw × x̃w
B ||
from which we can also compute the last axis of the body frame:
xw w w
B = yB × zB , (6.31)
In other words, we uniquely determined
RBw = [xw w w
B yB zB ] (6.32)
provided we never encounter the singularity where zBw is parallel to x̃w
B.
Angular velocity ω B . To show the angular velocity ω B is a function of the flat outputs and their derivatives,
take the first derivative of the first equation in (6.11):
d d
(maw ) = (−mge3 + u1 zBw ) (6.33)
dt dt
d
mȧw = (u1 zBw ) (6.34)
dt
mȧw = u̇1 zBw + ω w × u1 zBw , (6.35)
for some time-varying scalar u1 (note: we leveraged again the fact that the thrust force is aligned with zBw ).
Projecting this expression along zBw , we obtain u̇1 = zBw · mȧw (the cross product vanishes in the projection).
Substituting u̇1 back into (6.35):
mȧw = (zBw · mȧw )zBw + ω w × u1 zBw ⇐⇒ mȧw − m(zBw · ȧw )zBw = u1 ω w × zBw (6.36)
Lecture 6: Quadrotor Dynamics 6-7
p = −hω · yBw , q = hω · xw
B r = ψ̇e3 · zBw (6.38)
References
[1] Ilan Kroo, Fritz Prinz, Michael Shantz, Peter Kunz, Gary Fay, Shelley Cheng, Tibor Fabian, and Chad
Partridge. The mesicopter: A miniature rotorcraft concept phase ii interim report. Stanford university,
2000.
[2] Daniel Mellinger and Vijay Kumar. Minimum snap trajectory generation and control for quadrotors.
In Robotics and Automation (ICRA), 2011 IEEE International Conference on, pages 2520–2525. IEEE,
2011.