H Infini
H Infini
H Infini
Abstract— In this paper, we present a six degree of freedom For control design, we linearize and discretize the system
model of a quadrotor helicopter, onboard electronics, and a model dynamics at the hovering equilibrium and present the
networked control system. We follow this with a procedure resulting state matrices in numerical form. One of the main
for designing robust control for quasi hover conditions using
Glover-McFarlane loop shaping. The model is presented sym- potential difficulties that can be encountered with the Glover-
bolically as well as numerically for the specific system used McFarlane process is designing the weights to shape the loop
in our experiments. In our control design procedure we take singular values for MIMO plants with complex dynamics.
steps to minimize potential difficulties of MIMO loop shaping, Our approach to control design is essentially two stages.
while still producing effective linear control which is robust In the first stage we design linear quadratic optimal control
to a class of generic uncertainty. Finally, we present both
simulation and experimental implementation results and find for a simplified nominal system. In the second stage use
them in agreement. use the linear quadratic design to form the primary loop
shaping weight for the Glover-McFarlane H∞ design. We
I. INTRODUCTION give particular emphasis in the first stage to the use of
atypical weights in the optimization in an attempt to improve
Modeling and control of quadrotor helicopters is at present performance beyond that achievable with typical weights.
a common area of research and application, with various In Section II, we present the nonlinear model, first sym-
levels of model complexity and control design described bolically and second with the numerical parameters we have
throughout recent literature. The modeling of the vehicle identified for the system used. In Section III, we detail
dynamics is typically kept relatively simple. Control method- the design of our linear quadratic control, using a method
ologies range from linear proportional-integral-derivative of forming the cost function weights which takes account
(PID) controllers, to Linear Quadratic (LQ) [1], [2], [3], [4], of potential conflict among the degrees of freedom of the
to various adaptive and semi-adaptive schemes, backstep- quadrotor vehicle. In Section IV, we show how the LQ
ping, dynamic inversion[5], and numerous robust schemes control scheme is formed into the primary loop shaping
of various types [1], [6], [7], [8]. We present a procedure weight in the Glover-McFarlane process and design the H∞
using Glover-McFarlane loop shaping and a linear quadratic control. Finally, in Section V we detail implementation as
control design step to determine the nominal loop shape. well as provide and compare the results of nonlinear model
In this paper we present a nonlinear, six degree of freedom simulation and experimental trials of our control.
model of a quadrotor (thoroughly developed in [9]). The
model is presented with greater detail than is typical of II. MODELING
most literature. It is symbolically parameterized such that
by user choice it can be either easily simplified or used to A basic picture of the vehicle model architecture is given
represent more complex dynamics, interactions, and various in Fig. 1. The GU-344 receives inputs from a wireless
forms of parametric uncertainty than would otherwise be
possible with a simpler model. Besides the vehicle dynamics,
we model onboard electronics and the networked control
loop implementation.
The system used for implementation consists of a com-
mercially available GAUI 330X-S quadrotor vehicle with
accompanying onboard electronics, a system of infrared
cameras and processing software, and a PC running control
software in real time communicating to the vehicle through a
wireless interface. The OptiTrack camera system[10] specif- Fig. 1. Basic vehicle model structure.
ically consists of 12 V100:R2 cameras and the Tracking
Tools software which is able to provide real time position receiver on the quadrotor (normally provided by a human
and orientation information. pilot) and also contains a 3-axis gyroscope. The output of this
unit is four duty cycle percentage signals which command the
This research was partially supported by grant NSF-CNS 1239319 electronic speed controls of the brushless DC motors. The
The authors are with the Department of Electrical and Computer Engi-
neering, Iowa State University, Ames, IA 50010 USA (e-mails: {m87rich, resulting rotor speeds form the primary input to the rigid
nelia, phjones}@iastate.edu). body dynamics of the quadrotor vehicle.
1190
C. Gravity 2) H-Force: H-Force is the drag force encountered by
the rotors during in-plane motion, i.e. when the rotor is
Since the input wrench to the rigid body equations is taken
translating through its own plane of rotation. This force is
to be in the body frame of reference, the force of gravity
sometimes neglected in rotor craft models or lumped into
needs to be expressed along the local axes. This can be
expressions for fuselage drag and wake deflection forces[13],
accomplished using the appropriate change of coordinates
[14]. The direction of this force is always opposite the
matrix:
direction of in plane motion, i.e. it is opposite the vector
G = E EG = B BG where: BG = L←
− EG [vhix vhix 0]T . The vector for each force can be expressed
BE
as a body frame quantity [9]:
This can be expanded to: vhix
B
Hi = −KH ωi vhix
−mg sin(θ)
0
B
G = mg cos(θ) sin(ψ)
mg cos(θ) cos(ψ) Defining:
1 0 0
Since the origin of the body frame of reference is assumed to ΓH = 0 1 0
coincide with the vehicle center of mass, there is no torque 0 0 0
from gravity and the gravitational wrench can be expressed the H-force of each rotor can be expressed as:
as: [B ]
G Hi = −B(KH ωi ΓH vhi )
B
WG = (2)
[0] B
Hi = −KH ωi ΓH vhi (5)
D. Rotor System 3) Total Rotor Force: The combined total force acting on
the body due to all rotors can be expressed as:
1) Thrust: The thrust produced by one of the rotors can
be calculated as a function of the square of rotor speed and ∑
4
B
Fr = ( B Ti + B Hi ) (6)
a velocity dependent adjustment factor:
i=1
1191
7) Total Rotor Torque: The resulting total torque in the implement the necessary inverter–battery DC to AC for each
body frame of reference due to the rotors can be expressed phase–and commutator functionality.
as: Complete modeling of the physics and several types of
∑4
control of three-phase BLDC motors can be found in [16].
B
Qr = ( B Q F i + B Q di + B Q L i ) (10) As is implicit in the equations governing the dynamics of
i=1
such motors ([16]) and is confirmed in sources such as [17],
8) Rotor System Wrench: BLDC motors of the type used here can be modeled similarly
[B ] to brushed DC motors.
F
B
Wr = B r (11) In what follows, the notation Ṽ is used to describe the
Qr
effective input voltage, i.e. that which is the result of the
E. Other Aerodynamic Effects power-electronic motor control circuit for BLDCs but is
from a modeling equations standpoint equivalent to the same
Aerodynamic effects due to things like fuselage and em-
amplitude voltage applied to the terminals of a brushed DC
pennage drag[12], [13], [14] and wake deflection are also
motor.
not taken into account. The formerly mentioned sources
The equation describing the dynamics of a given motor is
deal mainly with conventional model helicopters with far
expressed [18]:
more significant fuselage cross sectional area in the xy-plane (( ) )
than the quadrotor being modeled here. Also a quadrotor ωi 1 1
˜
Jr ω̇i = Ṽi − − if − Kd ωi2 (12)
has no tail and hence empennage modeling is completely KV Rm KQ
unnecessary.
For the purposes of control design, since the motor dynamics
In [13], [14] the in-plane rotor forces (Section II-D.2)
are very fast in comparison to the rigid body dynamics,
were lumped into expressions for fuselage drag and wake
and in order to keep the state vector used from being
deflection forces. For our quadrotor model, we found it
unnecessarily large, the motors are assumed to achieve their
more appropriate to instead lump whatever forces might
commanded speed effectively instantaneously. In order to
act directly on the cross sectional area of the fuselage into
express this, the derivative term in Equation 12 is set to zero
in-plane rotor drag (Equation 5) and/or velocity dependent
and the resulting quadratic equation is solved for ω:
thrust losses (i.e. the effects of δT in Equation 4). √
Ground effect was also not taken into account in this −1 + 1 − 4Rm KV KQ Kd (KV Rm if − KV upi Vb )
ωi =
model. As given in [12], [15] among others, without signifi- 2Rm KV KQ Kd
cant forward velocity the effects of proximity to the ground
The input to each ESC is a PWM (pulse width modulation)
or other surface can be calculated as:
signal which drives the onboard power-electronics to create
|TGE | 1 the effective voltages for each phase of the motor. Defining
=
|T0 | 1 − ( 4h
r 2
) the input as a PWM duty cycle percentage Pi , it can be
assumed that the effective voltage is proportional to the duty
Where TGE and T0 represent the thrust produced with
cycle percentage above the turn-value, P⊥ , as a fraction of
ground effect and without, r is the rotor radius, and h is the
the maximum and the available battery voltage, i.e.
height above the surface. The thrust increase due to ground
effect was therefore assumed to drop off significantly enough Pi − P⊥
Ṽi = Vb (13)
at even modest heights that it was not included in the model1 . P⊤ − P⊥
Here Vb is the available battery voltage and P⊤ is the max-
F. Brushless DC Motors imum duty cycle percentage input3 , i.e. P⊤ − P⊥ represents
The motors used with this quadrotor are three-phase the full range of duty cycle input, and is a constant for any
brushless DC motors. BLDC motors lack the mechanical given calibration. This notation can be simplified by defining
commutation of brushed dc motors and hence require the uPi as:
input to each phase to be energized by some external Pi − P⊥
uPi = , upi ∈ [0, 1]∀i (14)
source over the correct time span during rotation. In order P⊤ − P⊥
to accomplish this power-electronics many times referred G. Onboard Electronics
to as ESCs (electronic speed controllers)2 are utilized to
The GAUI 330X comes with its own onboard electronic
1 The thrust increase according to this equation is only approximately 7% to assist a human pilot, mainly through gyroscope angular
when a given rotor is above a surface a distance equal to its own radius and rate measurements. Although this device could have been
the radii of the rotors of the vehicle modeled here are only about 10cm. removed and replaced with our own onboard electronics, our
The vehicle used here as it is set up has rotors that are already beyond this
height while landed. By the time the rotors reached a 30cm height (only approach here was to keep the GU-344 onboard and identify
1.3 times the vehicle chassis width), the thrust increase would be under a model for it.
1%. Near ground flight was not part of the intended flight conditions for
the control developed here, so ground effect was ignored. 3 The ESCs used in this model are flexible in that they can work with
2 The name may be somewhat deceptive as they many times do not provide various PWM input schemes through a calibration process where the
any control in the sense of feedback based speed reference tracking, e.g. maximum and minimum duty cycle are provided and the effective output is
the ESCs used in this model. tuned accordingly.
1192
The gyroscope feedback capability of the GU-344 is pro- The state equation and output equation, P , for the GU-344
vided by three separate single axis angular rate sensors with are:
specifications given in [19]. The dynamics of the angular d
ι = ι̇ = Aκ ι + Bκ (us − kg γg Λ) (16)
rate sensors are fast enough relative to the rest of the system dt
to be assumed effectively instantaneous and the feedback is
modeled a static gain matrix: P (ι, us , Λ) = MG Cκ ι+MG Dκ (us −kg γg Λ)+P⊥ [1], (17)
0 0 0 where [1] represents a 4 × 1 vector of ones.
γp 0 0 The yaw dynamics of the quadrotor are relatively easy
γg =
[0](4×3) 0 γq 0 [0](4×6)
to control, and the integrator in the GU-344 rudder closed
0 0 γr loop does not contribute significantly to the overall vehicle
behavior. So the integrator state in the rudder channel is
Where γp , γq , and γr correspond to the gain from observed ignored for control desing purposes. This leaves the output
angular velocity to equivalent integer command values. We equation, i.e. the vector of duty cycle percentages P sent to
define the output of the gyroscope feedback ug as: each motor controller as:
0
kg γp p P = MG Dκ (us − kg γg Λ) + P⊥ [1]
ug = kg γg Λ =
kg γq q
(15)
H. Camera System Model
kg γr r
The camera system was modeled as a discrete system with
The gyroscope feedback gain kg is simply a scalar gain
sampling period T , providing measurements of ro = [x y z]T
affecting the feedback magnitude, which is set by a poten-
and Θ = [ϕθψ]T with some latency τc . Defining the camera
tiometer on the hardware.
system output as yc :
The GU-344 tracking control subsystem is modeled as
having a single state[9]. This state is defined as ι, and
x(n(T − τc ))
represents the accumulated value in the rudder channel y(n(T − τc ))
proportional-integral controller. Both the aileron and elevator
z(n(T − τc ))
channels are modeled as having proportional control, while
yc [n] =
the throttle channel has the equivalent of a proportional gain4 . ϕ(n(T − τc ))
θ(n(T − τc ))
The control and gain functionality are considered linear, and
ψ(n(T − τc ))
the state space matrices for the subsystem are defined:
[ ] For simulation purposes the camera system was also
Aκ = 0 Bκ = 0 0 0 1
modeled as having some small white noise added to all
0 κT 0 0 0 measurements. For control design, the latency of the camera
0 0 κA 0 0
Cκ = 0
D =
0
system was deemed negligible5 and it was treated as an ideal
κ
0 κE 0 sampler.
κRI 0 0 0 κRP
Where κT is the gain from throttle input to output, κA , κE I. Transmitter/Receiver Model
and κRP are the proportional gains corresponding to body
The wireless communication is modeled as a simple
frame angular rate tracking, and κRI is the integral gain of
discrete delay, equal on all channels. The input to the wireless
the PI controller on the rudder channel. The input to the
communication system from the Control PC is us0 and its
tracking control subsystem is us − ug or us − kg γg Λ, i.e.
output to the GU-344 unit is us . Defining the discrete transfer
the integer throttle input and equivalent integer angular rate
function of the communication as D(z) = z −N I4×4 , and N
tracking errors. It is worth noting that this model of the GU-
as the number of periods delay, we have:
344 functionality has been derived by various experiments
as it is is not provided by the manufacturer. us = D(z)us0 = z −N I4×4 us0 (18)
The signal mixing functionality of the GU-344 is al-
lows the more-intuitive-for-a-human-pilot inputs of throttle, J. Numerical Linear Open Loop System
aileron, elevator, and rudder to form equivalent commands
for each of the four individual motor speed controllers. This The complete nonlinear open loop system model consists
mixing is defined by the following matrix: of the appropriate series combination of all previously de-
fined systems with the addition of the gravitational wrench
1 −1 1 1 to the input of the rigid body dynamics. In what follows
1 −1 −1 −1
MG = 1 1 −1 1
we present the linearized open loop system used for control
design purposes.
1 1 1 −1
5 We found that the latency from the communication system was approx-
4 The throttle channel has no feedback within the GU-344. imately 15 times the latency of the cameras.
1193
1) Linear Open Loop System: The continuous (i.e. the In [9] we have identified the numerical system parameters,
model the camera system sees) nonlinear open loop system6 with which the subsystem matrices take the following forms:
has an equilibrium point at Λ = 0, corresponding to hov- [ ] [ ]
ering7 . It can be linearized at this equilibrium using Taylor −0.34 0 −0.02
Aalt = Balt =
Series expansion and keeping first order terms to produce a 1 0 0
linear state space model: −0.99 0 −0.04 9.81 0
1 0 0 0 0
d Alat = −3.21 0 −10.33
Blat = 0.052
Λ = AΛ + Bν 0
dt 0 0 1 0 0
Where ν = us − ūs , with ūs being the equilibrium input.
−0.99 0 0.04 −9.81 0
For the purposes of analysis and control design, the resulting 1 0 0 0 0
Alon = 3.51 0 −11.3
Blon =
nominal system can be formed into four independent (as 0 0.057
far as the linearization is concerned) subsystems. These 0 0 1 0 0
four subsystems will be termed the longitudinal, lateral, [ ] [ ]
altitude, and direction subsystems. This necessitates defining −4.18 0 −0.015
Adir = Bdir =
the decoupled equivalent state vector, Λ̃ as: 1 0 0
Λalt D(z) = z −15 I4×4
Λlat
Λlon III. LINEAR QUADRATIC DESIGN
Λdir
Linear Quadratic optimal control design requires the se-
where each of the components of the equivalent state vector lection of weights in the cost function. It is typical to weight
represents the states corresponding to that subsystem: both the state and input vector each with a diagonal matrix.
This approach is advantageous in that it is fairly simple and
u v [ ] [ ]
x y intuitive to weight each state and input in the cost function
w r
Λlon = Λlat = Λalt = Λdir = individually, and in that it guarantees the resulting cost
q p z ψ
function is convex by choosing non-negative state weights
θ ϕ
and positive input weights, thereby keeping the optimization
Thus the equivalent open loop linear system can be written well posed.
as: Linear quadratic regulation is by no means a novel method
d of control applied to quadrotor helicopters. It has been done
Λ̃ = ÃΛ̃ + B̃ν
dt in for example [17], [1], [20], [2], [21], [3], [4]. In all
with the equivalent block diagonal matrices à and B̃ as: these cases the design was performed using the common
cost function form:
Aalt ··· ··· [0]
.. ∫∞
.. ..
. Alat . . J= xT Qx + uT Ru dt
à =
. ..
.. ..
. Alon . 0
1194
A. Weight Selection roll. Specifically y is positive to the right, and ϕ is negative
To avoid this limitation, we propose to formulate the banking to the left. The aileron input νA would hence have
problem as a generic H2 optimal control problem. LQR to be negative to correct for such a lateral error. Noting that
control can be viewed as a special case of H2 optimal the same relationships hold for the rates, the output function
control[22]. In order to do so, we define the output ζ as: for this subsystem is defined as:
Noting that x C Du = uT DT Cx ⇒ xT C T Du +
T T θ
u DT Cx = 2xT C T Du, the more general form of cost
T
function is then: The same reasoning was applied to the longitudinal sub-
∞
system as the lateral subsystem. The only difference being
∑ that in the case of the longitudinal system, the pitch angle and
J= xT C T Cx + 2xT C T Du + uT DT Du (20)
n=0
corresponding elevator input need to be positive to correct
for positive longitudinal position error and vice-versa. Hence
Since the control was to be implemented using a infrared the output matrices for is system were:
camera system with a fixed sampling interval of T = 0.01s,
each of the subsystems previously mentioned was discretized [1 1 −1 −1
] −1
clon = 2 0.5 2 0.12 dA =
with this sampling interval in mind as part of the design pro- 60
cess. We can conveniently use the MATLAB lqrd command,
3) Altitude Subsystem: The altitude systems input and
with Q = C T C, N = C T D, and R = DT D. Also, to obtain
state vectors are:
a reasonably sized LQR gain matrix, we neglect the delay [ ]
states for this first stage of design. w
νT , Λalt =
1) Lateral Subsystem: The lateral subsystem’s state equa- z
tion matrices have been previously defined. The input and
The linear altitude subsystem did not have the kind of
state vector are:
v degree of freedom conflict that the lateral and longitudinal
y subsystems had, therefore its output matrices could take on
νA , Λlat =
p
the orthogonal form:
ϕ
2 0
The output for the lateral subsystem needs to be defined calt = 0 2
such that it takes account of the conflicting input and degrees 0 0
of freedom, e.g. if the quadrotor is placed to the right of the
origin, in order to correct left, it would require a non-zero 0
8 Q and R being positive semidefinite guarantees the existence of a square
dT = 0
1
root for each 60
1195
4) Direction Subsystem: The direction input and state differentiation[23], [24], [25] of these measurements. The
vectors are: [ ] discrete transfer function of the approximate differentiation
r as implemented is expressed:
νR , Λdir =
ψ
1
As with the linear altitude system the linear direction system d(z) = (1 − z −1 )
T
did not have degree of freedom issues so its output matrices
where T is the fixed sampling interval. In our case T = 0.01.
were chosen similarly:
1 Using this we obtain a good approximation of the full rigid
3 √0 body dynamics state vector Λ with the following transfer
cdir = 0 20 function matrix:
0 0
δ(z)I3×3 [0]3×3
[0]3×3 δ(z)I3×3
0 ∆(z) = I3×3
dR = 0 [0]3×3
1 [0]3×3 I3×3
100
Forming each of the output equations into the correspond- Using these expressions, the effective LQ control using the
ing cost matrices: available output feedback is:
Qalt = cTalt calt Ralt = dTalt dlat Nalt = cTalt dalt Klq (z) = Klqr ∆(z)
Qlat = cTlat clat Rlat = dTlat dlat Nlat = cTalt dlat IV. LOOP SHAPING DESIGN
Qlon = cTlon clon Rlon = dTlon dlon Nlon = cTalt dlon Glover-McFarlane H∞ design uses a very generic de-
scription of uncertainty, allowing significant movement of
Qlat = cTlat clat Rlat = dTlat dlat Ndir = cTalt ddir both poles and zeros, and there is no specific problem-
and combining the results into block diagonal matrices we dependant uncertainty modeling is required in the second
have: stage. Also, along with having other advantageous qualities,
Qalt · · · ··· [0] Glover-McFarlane loop shaping design has been successfully
.. .. .. implemented in various industrial and aerospace applications
. Qlat . .
Q= . [26].
.. ..
.. . Qlon . This method of control design is itself a two stage process.
[0] ··· · · · Qdir The first stage of the process involves shaping the open loop
singular values to obtain desirable closed loop performance.
Ralt · · · ··· [0] This is done by pre- and post-compensation of the nominal
.. .. ..
. Rlat . . plant transfer function. In our case we weight transfer
R= . ..
function matrix which includes the input delays, GD (z), with
.. ..
. Rlon . weights W1 (z) and W2 as in Fig. 2 to create the shaped plant
[0] ··· · · · Rdir Gs (z).
This first stage presents one of the main potential difficul-
Nalt · · · ··· [0]
.. .. .. ties in application of Glover-McFarlane loop shaping, namely
. Nlat . .
N = .
..
desinging the weights to shape the plant. In MIMO cases
.. ..
. Nlon . with complex and unstable plant dynamics, it can become
[0] ··· · · · Ndir very difficult to find and reach a desirable loop shape. It
has been suggested by multiple sources, such as [27], [26]
B. Resulting Control Scheme among others, to use an initial control designed using other
The resulting optimal LQR controller, with columns rear- means (e.g. linear quadratic) to give a loop shape to aim
ranged to work with the original Λ is given by: for. Our approach here is to use the linear quadratic control
scheme directly as the primary loop shaping weight. That is
0 0 −145 0 0 0 ···
0 to say, we use W1 (z) = Klq (z) = Klqr ∆(z). The weight
29.7 0 30.7 0 0 ···
Klqr =
−29.7 0 0 0 30.5 0 ···
0 0 0 0 0 92.9 · · ·
··· 0 0 −118 0 0 0
··· 0 119 0 498 0 0
· · · −119 0 0 0 497 0
··· 0 0 0 0 0 444
The infrared camera system we used provides position Fig. 2. Shaped Plant
and orientation information at a fixed rate of 100Hz. In
order to obtain the velocity states, we use approximate W2 is typically chosen as a diagonal matrix of constants to
1196
emphasize outputs[26]. We take this approach here as well, model reduction we could achieve without destroying the
and our complete shaped plant is expressed: controller functionality, we compared the singular values of
the resulting reduced controllers to the original as shown in
Gs (z) = W2 GD (z)W1 (z) = W2 GD (z)Klqr ∆(z) Fig. 4. It is clear that even though we removed a significant
The second stage robustly stabilizes the shaped plant with
respect to unstructured coprime factor uncertainty. That is, Singular Values
40
30
20
10
−2 −1 0 1 2 3 4
10 10 10 10 10 10 10
Frequency (rad/s)
1197
Height Step Response [3] Y. Al-Younes, M. Al-Jarrah, and A. Jhemi, “Linear vs. nonlinear
1.5
control techniques for a quadrotor vehicle,” in Mechatronics and its
1 Applications (ISMA), 2010 7th International Symposium on. IEEE,
Amplitude (m)
1198