H Infini

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

2013 21st Mediterranean Conference on Control & Automation (MED)

Platanias-Chania, Crete, Greece, June 25-28, 2013

Design and implementation of an H∞ controller for a quadrotor


helicopter
Matt Rich Nicola Elia Phillip Jones

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.

978-1-4799-0997-1/13/$31.00 ©2013 IEEE 1189


A. Frames of Reference The body frame rates related to the Euler rates with the
inverse:
In this section we present the basic modeling framework.
 
This material is fairly standard and reported here for user 1 sϕ sθ /cθ cϕ sθ /cθ
− = 0 −sϕ 
convenience. More details can be found in [9], [11], [12] −1
A←
− = A←
EB BE

among others. For our model, two main frames of reference 0 sϕ /cθ cϕ /cθ
are utilized. These are the assumed inertial, Earth-fixed frame
of reference with corresponding basis matrix E ∈ R3×3 , and B. Rigid Body Dynamics
the local body frame of reference with corresponding basis
matrix B ∈ R3×3 . Each can be expressed in terms of three The body center of mass velocity expressed in the body
orthogonal basis vectors as: frame of reference Bvo , angular velocity expressed in the
[ ] [ ] body frame of reference BΩ , center of mass position ex-
E = ex ey ez and B = bx by bz pressed in the inertial frame of reference Ero and Euler angles
orienting the body frame relative to the inertial frame are
The z-axis of the Earth-fixed frame is oriented so as to be expressed in components respectively as:
positive along the acceleration of gravity, i.e. ez is positive
       
straight down in this frame. u p x ϕ
1) Orientation and Coordinate Change: Representation B
vo =  v  B Ω =  q  E ro =  y  Θ =  θ 
of the orientation of the body frame axes with respect to the w r z ψ
earth frame axes is accomplished using Euler angles. For
the purposes of this model, Euler angles are sufficient since Using these quantities, the rigid body equations of motion
the intended flight envelope does not include situations that for the system are given:
would cause singularities with this method[11]. Defining the [B ] [ ] [B ] [B ]
change of coordinates matrix L← − as the product the three F mI [0] v̇o Ω × m B vo
EB = + B
Euler angle rotation matrices in a yaw-pitch-roll sequence
B
Q [0] J B
Ω̇ Ω × J BΩ
gives:
  where BF and BQ are the total force and torque vectors
cθ cψ sϕ sθ cψ − cϕ sψ cϕ sθ cψ + sϕ sψ acting on the system, m is the total mass, and J is the 3 ×
L←− = cθ sψ sϕ sθ sψ + cϕ cψ cϕ sθ sψ − sϕ cψ  3 moment of inertia tensor with respect to the body frame
EB
−sθ sϕ cθ cϕ cθ of reference. We define the state vector for the rigid body
dynamics system as:
Where c(·) and s(·) are used to abbreviate cos(·) and sin(·)
B 
respectively. Change of coordinates from the body to in- vo
ertial frame coordinates can be accomplished through left  BΩ 
Λ = E 

multiplication by the matrix L← − . That is to say, for some
EB ro 
arbitrary pair a and c such that Ea = Bc we have that Θ
a = L← − c. Also since L←
EB
− was defined as the product of
EB
three orthogonal matrices, its inverse is its transpose, and so Using the appropriate change of coordinates matrices, we
c = L−1 − a = L←

EB
T
− a = L←
EB
−a
BE define the time derivatives of the position and Euler angle
Using this notation, the body frame of reference basis states as:
matrix can be obtained from the inertial frame of reference E
− B vo
ṙo = L←
basis matrix using right multiplication by L← − , i.e. B =
EB
EB

EL← − .The basis matrix E can be assumed to be identity, in


EB
which case we have B = L← − . Further, the time derivative of − BΩ
Θ̇ = A←
EB EB
the body to inertial change of coordinates matrix (as derived
in [9], [12]) is: It is convenient to define the combined force and torque as
L̇←
− = L←
−[ Ω] B the wrench, forming the input to the rigid body system:
EB EB
[B ]
Where [ BΩ ] is a skew-symmetric matrix the left multiplica- B F
W = B
tion of which is equivalent to a cross product, i.e. [ BΩ ]a = Q
Ω × a.
Following the definition of Euler angles and the sequence The nonlinear state equation for the rigid body system can
they are used in here, the change of coordinates matrix from be expressed as in [9]:
Euler rates to body frame angular velocities can be defined B   
m F − Ω × vo
v̇o 1 B B B
as:    BΩ̇  J −1 BQ − J −1 BΩ × J BΩ 
1 0 −sθ R(Λ, BW ) =   
 Eṙo  = 

 (1)
L←− B vo
A←− = 0 cϕ sϕ cθ  EB
BE
Θ̇ A←− BΩ
0 −sϕ cϕ cθ EB

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

|T | = KT ω 2 + δT vh ω 4) In-plane Drag and Induced Torque: We lump the


torque acting on each rotor due to in-plane drag and due
In this expression vh is the velocity of the rotor hub in a to the velocity induced in the wake into one expression[9],
local reference frame. This is different and more accurate, namely:
see [9] for more detail, than the more popular model which |Qdi | = ±Kd ωi2
only uses the quadratic term. At the same time the extra Here the quantity ΓΩi is defined as a unit vector by right
complexity due to the linear term is easily manageable. For hand rule for each ωi in the body frame of reference. So,
this quadrotor, vh can be represented using the velocity of depending on the direction of ωi :
the body frame of reference origin and the radius of the hub  
from that origin rh as: 0
ΓΩi =  0 
vh = B v o + B Ω × r h (3) ±1
The drag torque of each rotor can be expressed using B, and
In order to represent the thrust of each rotor in vector QdBi defined:
form, the quantity ΓTi is defined as a unit vector giving the
direction of thrust i in the body frame of reference. With Qdi = B(−Kd ωi2 ΓΩi )
each rotor assumed to be attached so that thrust is along B
Qdi = −Kd ωi2 ΓΩi (7)
−bz or exactly ”straight up” in the body frame of reference:
5) Change in Angular Momentum Torque: Expressing the
Ti = −(KT ωi2 + δT vh ωi )bz ∀i = 1 . . . 4 angular momentum vector of each rotor in body frame coor-
dinates and taking the time derivative yields an expression for
 
0 the magnitude torque due to changing the blades momentum
⇒ ΓTi = 0  ∀i = 1 . . . 4 [9]:
−1
B
QLi = −J˜r ( BΩ × ωi ΓΩi + ω̇i ΓΩi ) (8)
6) Force Lever Arm Torque: Since each rotor force acts on
That is:
the body of the quadrotor at a distance from the center, each
Ti = B(KT ωi2 + δT vhi ωi )ΓTi causes a torque. The contribution of each can be expressed
as the cross product of the radius from the body frame origin
or as body frame quantities: with the force vector, i.e. the torque due to rotor force i is:
B
Ti = (KT ωi2 + δT vhi ωi )ΓTi (4) QFi = (Brhi ) × Fri (9)

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

[0] ··· · · · Adir Or the equivalent for the discrete case:


  ∞
Balt ··· ··· [0] ∑
 .. .. ..  J= xT Qx + uT Ru (19)
 . Blat . . 
B̃ = 
 .

.. 
n=0
 .. ..
. Blon .  With Q and R diagonal, and positive semidefinite and
[0] ··· · · · Bdir definite respectively. While simple, this weight selection may
not be appropriated for the quadrotor as it excludes coupling
We define the transfer function matrix form of this system as
among states and controls. A quadrotor has multiple states
G(s). We treat the addition of the camera system as an ideal
and inputs corresponding to potentially conflicting degrees
sampler, and define the resulting discrete system as G(z).
of freedom.
Finally, the addition of the communication delay (Equation
18) to the inputs of the system we define as GD , i.e. Due to the physics of the system in order to produce
lateral or longitudinal acceleration the orientation must be
GD = G(z)D(z) changed, hence the rotational and linear degrees of freedom
themselves are interdependent. In particular, regulation to the
6 Note that the nonlinear system linearized here treats certain dynamics
origin in the form of correcting errors in the linear states
as negligable, e.g. the motor transient dynamics. The full model was used requires manipulation of the angular states away from the
for nonlinear simulation purposes.
7 Actually a continuum of equilibrium points where all velocity states are origin. These sort of issues were encountered in [1] which
zero. uses the typical, diagonal weights cost function.

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:

ζ = Cx + Du ζlat = clat Λlat + dA νA


 
A cost function can be formed (given in the discrete case v
here): [ ] y 
∑∞ ζlat = cv cy cp cϕ  
 p  + dA νA
J= ζT ζ
n=0
ϕ
Where: where the sign on all the terms is kept positive to reflect
T T the fact that it is desirable that if the lateral position is in
ζ ζ = (Cx + Du) (Cx + Du)
positive error the roll and aileron input should be allowed to
= xT C T Cx + xT C T Du + uT DT Cx + uT DT Du be negative for correction while still keeping the cost close
Note that in the special case if the output matrices C and D to zero, and vice-versa.
are chosen as: The values that would end up producing good results in
[ 1] [ ] this case were:
Q2 [0]
C= and D = 1 [ ] 1
[0] R2 clat = 21 0.5 1 1 1
dA =
2 0.12 60
1 1
Where Q 2 and R 2 are the square roots of the positive
2) Longitudinal Subsystem: The longitudinal subsystem’s
semidefinite weighting matrices8 in the typical LQR cost
state equation matrices have been previously defined. The
function, then C T D = 0 and DT C = 0, and the optimal
input and state vector are:
cost reduced to the classical one:

 
∑ u
J= xT Qx + uT Ru x
n=0 νE , Λlon = 
q 

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

K∞ is designed to stabilize the family of plants: 90


Original
G∆ = (M̃ + ∆M )−1 (Ñ + ∆N ), with ∥∆N ∆M ∥∞ < ϵ 80 Small Residue Reduction
Small Numerical Reduction

where M̃ −1 Ñ is the normalized left coprime factorization 70

of the shaped plant Gs (see Fig. 3), with ϵ the stability

Singular Values (dB)


60
margin[28], [29], [26].
50

40

30

20

10
−2 −1 0 1 2 3 4
10 10 10 10 10 10 10
Frequency (rad/s)

Fig. 4. Original and Reduced Controller Singular Values

number of states from the model, and further removed a large


Fig. 3. Coprime Factor Uncertainty number of terms from the state space matrices, the resulting
controller singular values are relatively unaffected over most
Using frequencies.
 
0.65 0 0 0 0 0 B. Results
 0 0.65 0 0 0 0
 
 0 0 1 0 0 0 The results of our control designs are shown below. We
W2 = 
 0

 0 0 1 0 0
found that our resulting closed loop system was able to
 0 0 0 0 1 0 handle inputs it was not explicitly designed for quite well.
0 0 0 0 0 1 In Fig. 5 we compare the results obtained from simulation
to those obtained from implementation with our Glover-
and the MATLAB function ncfsyn along with GD and W1 McFarlane H∞ control design. We show step input tracking
as previously defined, we obtained a controller, results, first for lateral and longitudinal movement, second
Kgm = −W1 (z)K∞ (z)W2 = −Klqr ∆(z)K∞ (z)W2 for height change. Our control was designed for hovering
set point regulation, but as both the nonlinear simulation and
with ϵ = 0.292, indicating a successful design[26]. Note the experimental responses show it is also able to handle high
negative sign in the equation for the controller, which we bandwidth input changes without problems.
added simply to use it in a negative feedback configuration. In Fig. 6 we show the corresponding pitch response to
the forward step in Fig. 5. We see here that our control
V. IMPLEMENTATION produces a fairly aggressive pitch response when given a step
A. Controller Reduction command to move forward, giving at least some indication
Our resulting controller, Kgm had 78 states. In order to that our attention to degree of freedom interaction in the first
obtain a more practical form for implementation, we used design stage has been beneficial.
the MATLAB functions balreal and modred to reduce the
order of the controller. Using this process we were able VI. CONCLUSIONS
to reduce the number of controller states to 13. Following We have presented a detailed nonlinear model of a
this we noticed that the matrices in the resulting state space quadrotor helicopter along with onboard electronics and a
controller model were effectively sparse, as in many entries networked control loop. We used this model, along with pa-
were very close to zero. rameters we identified for our system, to design a controller
We further reduced the complexity of the control for that is robust to a generic class of uncertainty using Glover-
implementation purposes by eliminating terms from these McFarlane loop shaping. We gave particular attention to the
state space matrices with magnitude less than a small MIMO weight selection, employing a linear quadratic design
threshold (in our case 10−4 ). In order to check how much step to form the loop shaping weight.

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)

2010, pp. 1–10.


0.5 Experimental [4] S. Bouabdallah, “design and control of quadrotors with application to
Reference autonomous flying,” Ph.D. dissertation, Federal Polytechnic School of
0 Simulation Lausanne, 2007.
[5] D. Mellinger, Q. Lindsey, M. Shomin, and V. Kumar, “Design, mod-
−0.5
0 2 4 6 8 10 12 14 16 18 eling, estimation and control for aerial grasping and manipulation,” in
Time (s) Intelligent Robots and Systems (IROS), 2011 IEEE/RSJ International
Longitudinal Step Response
1.5 Conference on. IEEE, 2011, pp. 2668–2673.
[6] M. O. Efe, “Robust low altitude behavior control of a quadrotor
1
Amplitude (m)

rotorcraft through sliding modes,” in Control & Automation, 2007.


Experimental
MED’07. Mediterranean Conference on. IEEE, 2007, pp. 1–6.
0.5 [7] T. Lee, M. Leoky, and N. H. McClamroch, “Geometric tracking control
Reference
Simulation of a quadrotor uav on se (3),” in Decision and Control (CDC), 2010
0
49th IEEE Conference on. IEEE, 2010, pp. 5420–5425.
−0.5 [8] Y. Bai, H. Liu, Z. Shi, and Y. Zhong, “Robust control of quadrotor
0 2 4 6 8 10 12 14 16 18 unmanned air vehicles,” in Control Conference (CCC), 2012 31st
Time (s)
Chinese. IEEE, 2012, pp. 4462–4467.
[9] M. Rich, “Model development, system identification, and control of a
Fig. 5. Glover-McFarlane Simulation vs. Implementation quadrotor helicopter,” Master’s thesis, Iowa State University, 2012.
[10] [Online]. Available: http://www.naturalpoint.com/optitrack/
[11] J. M. Rolfe and K. J. Staples, Flight simulation / edited by J.M.
0.5
Rolfe, K.J. Staples. Cambridge University Press, Cambridge [Cam-
Amplitude (rad)

bridgeshire] ; New York :, 1986.


[12] G. D. Padfield, Helicopter Flight Dynamics: The Theory and Applica-
0
tion of Flying Qualities and Simulation Modeling. American Insititute
of Aeronautics and Astronautics, Inc., 2007.
[13] V. Gavrilets, B. Mettler, and E. Feron, “Dynamic model for a miniature
−0.5
0 2 4 6 8 10 12 14 16 18 aerobatic helicopter,” Massachusetts Institute of Technology, MIT-LIDS
Time (s) report# LIDS-P-2579, 2003.
[14] V. Gavrilets, “Autonomous aerobatic maneuvering of miniature he-
Fig. 6. Pitch Response to Forward Step licopters,” Ph.D. dissertation, Massachusetts Institute of Technology,
2003.
[15] J. Seddon and S. Newman, Basic Helicopter Aerodynamics. American
Insititute of Aeronautics and Astronautics, Inc., 2001.
Our implementation and simulation results are generally [16] S. Baldursson, “Bldc motor modelling and control a matlab/simulink
in agreement. Although we designed for hovering conditions, implementation,” Master’s thesis, Chalmers University of Technology,
we found that our H∞ controller was able to perform well 2005.
[17] T. Buchholz, D. Gretarsson, and E. Hendricks, “Construction of a four
under conditions it was not specifically designed for, namely rotor helicopter control system,” Master’s thesis, Technical University
relatively large step disturbances. We believe this is due of Denmark, 2009.
to the robustness of the controller, but we plan to further [18] M. Drela, “First-order dc electric motor model,” Massachusetts Insti-
tute of Technology, 2007.
analyze and study the robustness of the design. [19] XV-3500CB Datasheet, EPSON.
We assumed in our modeling that all discrete loop el- [20] C. Balas, “Modelling and linear control of a quadrotor,” Cranfield
ements operated at the same rate as the camera sensors. Unicersity, MSc Thesis, vol. 2007, 2006.
[21] L. Minh and C. Ha, “Modeling and control of quadrotor mav using
However the onboard electronics for example operated at vision-based measurement,” in Strategic Technology (IFOST), 2010
a slightly faster rate, and due to our method of implemen- International Forum on. IEEE, 2010, pp. 70–75.
tation using a PC and Linux operating system, our effective [22] T. Chen and B. Francis, Optimal sampled-data control systems.
Springer London, 1995, vol. 124.
controller update rate was not fixed but somewhat variable. [23] H. Berghuis and H. Nijmeijer, “Global regulation of robots using only
We did not take this into account in our simulation model, position measurements,” Systems & Control Letters, vol. 21, no. 4,
and it is likely that at least some of what mismatch there pp. 289–295, 1993. [Online]. Available: http://doc.utwente.nl/29963/
[24] I. Burkov, “Stabilization of mechanical systems via bounded control
is between our simulation and experimental results could be and without velocity measurement,” in Proc. 2nd Russian-Swedish
due to these issues. We plan on investigating the effects of Control Conf, 1995, pp. 37–41.
the multi-rate nature of the closed loop system in the future. [25] A. Ailon and R. Ortega, “An observer-based set-point controller for
robot manipulators with flexible joints,” Systems & control letters,
Finally, our control was designed for implementation over vol. 21, no. 4, pp. 329–335, 1993.
a communication network with fixed delay. In the future, [26] S. Skogestad and I. Postlethwaite, Multivariable Feedback Control:
we would like to design a networked remote controller for Analysis and Design. John Wiley & Sons, 2007, vol. 2.
[27] J. Tierno and S. Glavaski, “Phase-lead compensation of pitch axis
the quadrotor which is resilient to packet drops and random control laws via mcfarlane-glover h infin; loop shaping,” in Decision
delays. and Control, 1999. Proceedings of the 38th IEEE Conference on,
vol. 2, 1999, pp. 1538 –1543 vol.2.
R EFERENCES [28] K. Glover and D. McFarlane, “Robust stabilization of normalized
coprime factor plant descriptions with h∞ bounded uncertainty,”
[1] M. D. L. C. de Oliveira, “Modeling, identification and control of Automatic Control, IEEE Transactions on, vol. 34, no. 8, pp. 821–
a quadrotor aircraft,” Master’s thesis, Czech Technical University in 830, 1989.
Prague, 2011. [29] D. McFarlane and K. Glover, “A loop-shaping design procedure using
[2] I. Cowling, J. Whidborne, and A. Cooke, “Optimal trajectory planning h∞ synthesis,” Automatic Control, IEEE Transactions on, vol. 37,
and lqr control for a quadrotor uav,” in Proceedings of the International no. 6, pp. 759–769, 1992.
Conference Control–2006, Glasgow, Scotland, vol. 30, 2006.

1198

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