r
overall residual propeller angular speed [
rad
s
]
CHAPTER 1
Introduction and motivations
Lately, signicant research work have been performed in the elds of modeling and
control of UAVs (Unmanned Autonomous Vehicles). Flying objects have ever ex
erted a great fascination on man and given the motivation to all kinds of research.
Nowadays they have been proved to be very useful in many areas, not only for mil
itary applications: for certain kinds of dangerous observations, like measurements
in radioactive zones etc. it is easier to send unmanned vehicles.
There are many dierent types of UAVs from miniaircrafts to mini helicopters.
It took a long time until the technology made it possible to precisely control a
helicopter with plenty of degrees of freedom. In this thesis research and analysis
is done on a 6 DOF aircraft with four rotors, also known as quadrocopter. This
vehicle is hard to be controlled manually but with the development of control
technology, research started to turn to this construction again, and tried to control
it automatically.
The model of a quadrocopter, investigated in the thesis, consists of 12 dieren
tial equations, and it is highly nonlinear. It is an ideal model for trying to test the
performances of linear control strategies against nonlinear ones. Literature shows,
that many linear and nonlinear controllers were made to the quadrocopter, but
very few provided a real analysis on the performance of various applied controllers.
The implementation of linear controllers is easy, but robustness and appropriate
timedomain behaviour are also required here that are dicult to guarantee. That
leads us to the development and test of nonlinear controllers. However, it is im
portant to investigate when it is worth to choose a nonlinear controller over an
easytoimplement linear one.
Most often, the starting phase of nonlinear controller design is performed in
continuous time, but the practical implementation requires a stable controller in
discrete time. This thesis also deals with a theoretical estimation of the sampling
times in the case of the linear controllers, and gives a working sampling time to
each of the controllers. A state of the art, and most eective known estimation
CHAPTER 1. INTRODUCTION AND MOTIVATIONS 2
technique is introduced here briey and applied to the controllers working on a
linear system model.
This thesis provides new controller combinations for the angle, heightand
position control tasks, were nonlinear and linear controllers are working together,
based on a backstepping schema, both in continuous and discrete time, ready for
implementation. The analysis described here can be useful to one dealing with a
quadrotor helicopters to implement the controllers, and also to one interested in
control theory.
1.1 Related works in the literature
As mentioned before, numerous papers and theses are dealing with the problem of
modelling and controlling a quadrotor aircraft. The most detailed publication from
this thesis point of view is the PhD thesis [1]. In this paper a highly nonlinear
model of a quadrocopter is introduced that describes the dynamics very precisely,
but also makes some simplications with respect to indoor ying. The thesis also
applies various control strategies to the model, like PID, PD, LQR, Lyapunov sta
bilisation and backstepping control design. But there were also other interesting
papers, that aected this thesis. Paper [2] deals with designing nonlinear control
strategy for stabilization. It deals with a similar but partially simplied model,
than the one described in the thesis mentioned above. Controllers based on Lya
punov stabilisation and backstepping based PID controlling were constructed here.
Paper [3] deals with a nonlinear but very simple statespace model, and it shows
explicitly, that applying nonlinear control theory can improve the performance of
the controller and enable tracking of aggressive trajectories. It implies that way,
that it is worth to apply nonlinear control techniques, that are more dicult to
implement than linear ones, to achieve more robust controllers. This paper also
introduced the idea to handle stabilisation of the dierent angles and position
coordinates with independent control loops (with one control loop one angle and
position coordinate is handled). It also applies some simplications during the
design of nonlinear controller, that enables to get still easy to implement non
linear feedbacks. These simplication ideas also inspired the designs introduced in
my thesis.
Thesis [4] also deals with nonlinear control of a quadrocopter. The model
used here is also a highly nonlinear one, but it is given in a quite dierent form
than in the mentioned PhD thesis [1]. It applies LQR technique, backstepping
control schema and the inversion method. The applied thechniques here are very
interesting, but the nonlinear control strategies made the control sometimes very
complicated.
Paper [7] shows, that the model of a quadrocopter is suitable to apply advanced
control techniques, because of its complexity. It gives inspiration to apply further
control techniques, and analyse them using this model, even though various con
CHAPTER 1. INTRODUCTION AND MOTIVATIONS 3
trollers were presented in the past few years solving angle and height stabilisation
and trajectory tracking issues. This paper also presents controllers to trajectory
tracking and planning suitable for surveillance.
The paper [8] deals with the control of a large quadrocopter robot. Hence it
deals with a quite dierent model under the circumstances of outdoor ying. But
one interesting thing about it is, that it explicitly deals with the discretisation of
the controller designed in continuous time. It estimates the sampling time with
the matched polezero discretisation method, so it tries to nd a good sampling
time analytically, not only based on simulation results. Another paper [9] from
the same journal introduces a H1 controller design to the very same model then
described in paper [1].
Many other papers are dealing with developing VTOLs (vertical take o and
landing UAVs), or implementing some applications to a quadrocopter like obser
vation or object tracking. These show, how important it is to have a precisely
working controller with a very high performance. Paper [5] e.g. deals with devel
oping nonlinear controller techniques related to visual ow [6].
It can be seen, that the controllers described in the literature use mostly LQR,
PID and backstepping control schema. The feedbacks resulting from the nonlinear
controllers are often very complex ones. Only just few of the articles and theses
are dealing seriously with the issue of discretisation.
In my thesis, further linear and nonlinear strategies are used to control the
quadrocopter, like LQservo, bounded LQR, and nonlinear feedback technique,
with the aim to nd easy to implement feedbacks. This thesis also gives a unique
construction of linear and nonlinear controllers, and it deals with nding sampling
times analytically for dicretisation of the controllers, with the sharpest known
sampling time estimation technique.
S andor Alpar, former student at the P azm any University, built a quadrotor
robot [10] and presented a simple angle controller. Controllers developed by this
thesis are suitable to the built robot, and were simulated using its parameters.
CHAPTER 2
Controller design in continuous
time
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 5
2.1 The applied model
The literature about quadrocopters is nowadays very extensive. Lots of papers are
dealing with nding a good physical model to a quadrocopter. The solutions, one
can nd in the literature are very diverse. Some of them include lots of simpli
cation making the model less nonlinear to be able to implement linear control
strategies more easily. Some others consider too many actuators, to make an as
good as possible approach to the dynamics of the actuators in the case of outdoor
ying.
After doing some research, the physical model described in thesis [1] was cho
sen. On one hand those actuator dynamics can easily be incorporated into the
model which are important in the case of a quadrocopter, and its assumptions are
applicable in case of designing controllers to a minihelicpoter for indoor ying.
On the other hand, Sandor Alp ar, former student at the P azm any University, built
a miniquadrotor, and used the same physical model to design an anglecontroller
[10]. Since the goal of this thesis is both to obtain some results in the analysis of
the dierent control strategies and to prepare the controllers for implementation on
the existing miniaircraft, using the mentioned physical model was the best choice.
The physical model. Since the applied physical model was developed for indoor
ight of a minihelicopter, the following assumptions can be made:
The structure is supposed to be rigid.
structure is assumed to be symmetric.
The center of gravity (CoG) and the body xed frame origin are assumed to
coincide.
The propellers are supposed rigid.
Thrust and drag are proportional to the square of propellers speed.
The physical model given in NewtonEuler formalism [1] (list of symbols and their
untis can be found at page vi):
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 6
_
_
I
xx
(I
yy
I
zz
) + J
r
r
+ l(T
1
+ T
4
) h(
4
i=1
H
y
i) +
4
i=1
(1)
(i+1)
R
mxi
I
yy
(I
zz
I
xx
) J
r
r
+ l(T
1
T
3
) + h(
4
i=1
H
x
i) +
4
i=1
(1)
(i+1)
R
myi
I
zz
(I
xx
I
yy
) + J
r
r
+
4
i=1
(1)
i
Q
i
+ l(H
x2
H
x4
) + l(H
y1
+ H
y3
)
m z = mg (cc)
4
i=1
T
i
m x = (ss + csc)
4
i=1
T
i
4
i=1
H
xi
1
2
C
x
A
c
x x
m y = (cs + ssc)
4
i=1
T
i
4
i=1
H
yi
1
2
C
y
A
c
y y
To get a better understanding of the equations above, gure 2.1 gives a schematic
draw of the quadrocopter indicating the most important parameters [2], and g
ure 2.2 shows the quadrotor concept motion description, where the arrow width is
proportional to propeller rotational speed [11].
Figure 2.1: Schematic draw of the quadrocopter
The derived statespace model. To be able to design controllers, these equations
must be rewritten as a statespace model. Since the equations above are highly
nonlinear, the resulting statespace model is also a nonlinear one. Nonlinear
input ane statespace models can be written in the following form:
x = f(x) + g(x)U
State variables:
x = (x
1
x
2
x
3
x
4
x
5
x
6
x
7
x
8
x
9
x
10
x
11
x
12
) = (
z z x x y y)
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 7
Figure 2.2: Quadrotor concept motion description, the arrow width is
proportional to propeller rotational speed.
Inputs:
U = (U
1
U
2
U
3
U
4
)
With:
U
1
= b(
2
1
+
2
2
+
2
3
+
2
4
)
U
2
= b(
2
2
+
2
4
)
U
3
= b(
2
1
+
2
3
)
U
4
= b(
2
1
+
2
2
2
3
+
2
4
)
The resulting statespace model after some simplications (hub forces and rolling
moments are neglected and thrust and drag coecients are supposed constant) can
be written as:
f(x) =
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
x
2
a
1
x
4
x
6
+ a
2
r
x
4
x
4
a
3
x
2
x
6
+ a
4
r
x
2
x
6
a
5
x
4
x
2
x
8
g
x
10
0
x
12
0
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
g(x) =
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
0 0 0 0
0 b
1
0 0
0 0 0 0
0 0 b
2
0
0 0 0 0
0 0 0 b
3
0 0 0 0
u
t
1
m
0 0 0
0 0 0 0
u
x
1
m
0 0 0
0 0 0 0
u
y
1
m
0 0 0
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 8
Parameter Value
Ixx 8.11858e005
Iyy 8.11858e005
Izz 6.12233e005
Jr 6e5
l 0.235
b 3.13e5
d 7.5e7
m 0.506
Table 2.1: Model parameter values
With:
a
1
=
I
yy
I
zz
I
xx
b
1
=
l
I
xx
a
2
=
J
r
I
xx
b
2
=
l
I
yy
a
3
=
I
zz
I
xx
I
yy
b
3
=
l
I
zz
a
4
=
J
r
I
yy
a
5
=
I
xx
I
yy
I
zz
u
t
= coscos
u
x
= (cossincos + sinsin)
u
y
= (cossincossincos)
At this point it must be noticed, that the speeds of the propellers are the real
inputs and outputs of the system, but the statespace model deals only with Us.
The propeller speeds can be calculated easily with the following linear relation:
_
_
_
_
_
2
1
2
2
2
3
2
4
_
_
_
_
_
=
_
_
_
_
_
0.25 0 0.5 0.25
0.25 0.5 0 0.25
0.25 0 0.5 0.25
0.25 0.5 0 0.25
_
_
_
_
_
_
_
_
_
_
U
1
/b
U
2
/b
U
3
/b
U
4
/b
_
_
_
_
_
It can be seen, that this system is an underactuated system, because the
number of inputs is four, but the degree of freedom is six (three angles and three
coordinates). It can be also seen, that the positions depend on the angles, but
not on each other, and the angles only depend from each other but not from the
positions. That way it is possible to decompose the height and position control
loops.
The values of the parameters in the state space model can be found in [10],
where these values are estimated based on the built model at the Pazm any
university. These parameters can be seen at table 2.1 .
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 9
2.2 Simulink model
The model based on the described statespace model above was built in MATLAB
Simulink. Each controller, even the linear ones, are applied to this model.
Figure 2.3: Model built in Simulink
The block on the top is computing the equations related to the angles, and
the block on the bottom computes the equations related to the positions. The
sequence of the lines corresponds to the sequence of the state variables.
2.3 Angle stabilization using LQservo control tech
nique
To perform various tasks with a quadrocopter, the rst step is always to be able to
control the angles. In this physical system, the angles have a dedicated role. The
angles determine whether the helicopter hovers, or heads toward a direction. To
be able to control this construction, fast and robust angle controllers are needed.
That is why the angle controller is the heart of every robotpilot designed to a
quadrocopter.
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 10
2.3.1 Theoretical background
To be able to hover with the quadrocopter is not the only goal here, therefore a
control strategy was needed that is capable of performing a reference tracking. LQ
servo is such a technique, and usually it handles the dierences between a linear
and nonlinear system model quite well, so it is also known as a suciently robust
control technique.
The idea beyond the construction of an LQservo control loop is to extend the
model with an error variable, that shows the dierence between the desired and
the actual state [17]. So the task is nd a feedback that brings the value of the
error vector to zero.
We have the following linear time invariant statespace model:
x = Ax + Bu
y = Cx
This system can be extended with an error vector. r stands for a desired constant
reference value.
x = Ax + Bu
z = r y = r Cx
In matrix form:
_
x
z
_
=
_
A 0
C 0
__
x
z
_
+
_
B
0
_
u +
_
0
I
_
r
The goal is to make z asymptotically converge to zero. This means that a full
state feedback must be applied, with other words, the value of K feedback must
be calculated: u = K
_
x
z
_
,where K is a block matrix:
K =
_
K
x
K
z
_
The feedback gain K is designed using the LQR control strategy, that solves the
Control Algebraic Ricatti equation minimizing the J functional:
J =
_
0
x
T
Qx + u
T
Ru dt
We remark that K can also be computed using other stabilizing controller design
methods (e.g. poleplacement), but the advantageous robustness properties of the
LQ loop might be lost in this case.
The linear statespace model To design the K feedback in a linear way, a linear
state space model is needed, so the nonlinear statespace model must be linearised.
The nonlinear state space model:
x = f(x) + g(x)U
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 11
Figure 2.4: Schema of the LQsevo controller
The equilibrium point of a model is following:
(x
, U
) : f(x
) + g(x
)U
= 0
The linear model is:
A =
f
x

x=x
B = g(x
)
The equilibrium point of the quadrocopter:
(U
, x
) :
U
1
= mg
U
2 3 4
= 0
x
1 2 3 4 5 6 8 10 12
= 0
x
7 9 11
= constant
That means, that the quadrocopter hovers in its equilibrium point, so the angles
are zero, and each position is a constant. The resulting linear model is:
A =
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
B =
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
0 0 0 0
0 b
1
0 0
0 0 0 0
0 0 b
2
0
0 0 0 0
0 0 0 b
3
0 0 0 0
1
m
0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 12
2.3.2 Controller design and simulation results
Design servo feedback using poleplacement technique. It is known, that a linear
system is asymptotically stable, if the real part of its poles are negative. The
idea of the poleplacement technique is to design a feedback, that shifts the real
part of the poles to the desired places. This technique can provide a smooth
stabilization curve, without any big overshoots and oscillations. But usually it
does not guarantee the robustness of controller. If we assume that the angles are
close to the zero equilibrium (so that there are no big dierences between the
linearised and the nonlinear state space model), using poleplace is expected to
be a good approach. The statespace model used at the angle controller is the
following:
A =
_
_
_
_
_
_
_
_
_
0 1 0 0 0 0
0 0 0 0 0 0
0 0 0 1 0 0
0 0 0 0 0 0
0 0 0 0 0 1
0 0 0 0 0 0
_
_
_
_
_
_
_
_
_
B =
_
_
_
_
_
_
_
_
_
0 0 0
b
1
0 0
0 0 0
0 b
2
0
0 0 0
0 0 b
3
_
_
_
_
_
_
_
_
_
C =
_
_
1 0 0 0 0 0
0 0 1 0 0 0
0 0 0 0 1 0
_
_
In this model, we only obtain the equations corresponding to the angles. The
input U
1
is considered to be constant (mg), so the matrix B only has three rows.
C shows, that the angles are the outputs of the system.
The extended system for the design of the servo controller:
A =
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
B =
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
0 0 0
b
1
0 0
0 0 0
0 b
2
0
0 0 0
0 0 b
3
0 0 0
0 0 0
0 0 0
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
By choosing the values for the poles it must be considered, that the values of the
poles can not be too close to each other, otherwise we may face numerical problems
when trying to solve the pole placement task. But the real parts of the poles can
not be too far from zero, otherwise that would make the controller too hard in terms
of necessary control inputs. Using poles (1 1.5 2 2.5 3 3.5 4 4.5 5)
we got the feedback:
K =
_
_
_
0.01 0.0031 0.0012 0.0002 0.0006 0.0001 0.0151 0.0025 0.0012
0.0015 0.0002 0.0114 0.0034 0.002 0.0003 0.0031 0.0177 0.0044
0.0002 0 0.0003 0 0.0027 0.0007 0.0005 0.0007 0.0046
_
_
_
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 13
Figure 2.5: The LQservo controller in Simulink
The initial state of the angles is:
0
= 0.3,
0
= 0.5,
0
= 0.5, the references
are zeros, respectively. Using the above described controller with K feedback, we
get following results:
Figure 2.6: Angles and angular speeds controlled with a servo controller
using poleplacement technique
It can be seen at 2.6, that the controller works eectively it handles the non
linear system well and the overshooting is acceptable.
It must be remarked that equipping the original linearised model with addi
tional integrators through the servo control scheme will allow us to follow not only
constant but also more complex angle references that will be useful later when the
position is controlled using a cascade structure.
Design LQservo feedback using LQR technique. Its dicult to design eective
controllers with the poleplacement technique, if the angles are not near zero,
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 14
so if the dierence between the linear and the nonlinear model is getting more
signicant. LQR technique is known as a very robust control strategy, so in case of
the angle controller is better to rely on that technique. The idea of this technique is
to nd a K feedback, that minimizes the J functional, with given Q and R matrices:
J =
_
0
x
T
Qx + u
T
Ru dt
solving the Control Algebraic Ricatti equation:
A
T
x + xA xBR
1
B
T
x + Q = 0
The property of the controller can be given with the Q and R matrices. The
performance of the controller depends essentially on the ratio between the norms
of the matrices Q and R.
Q = 0.001
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
20 0 0 0 0 0 0 0 0
0 20 0 0 0 0 0 0 0
0 0 20 0 0 0 0 0 0
0 0 0 20 0 0 0 0 0
0 0 0 0 20 0 0 0 0
0 0 0 0 0 20 0 0 0
0 0 0 0 0 0 8 0 0
0 0 0 0 0 0 0 8 0
0 0 0 0 0 0 0 0 8
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
R =
_
_
1 0 0
0 1 0
0 0 1
_
_
Having these Q and R matrices we get the feedback:
K =
_
_
0.4384 0.1425 0 0 0 0 0.6057 0 0
0 0 0.4384 0.1425 0 0 0 0.6057 0
0 0 0 0 0.4372 0.1416 0 0 0.6045
_
_
If we look at the structure of K it can be seen, that nally the LQ optimal
control design procedure gives a PID controller structure. This also justies the
use of additional integrators through the servo design method. The proportional,
derivator and integrator coecients can be found in each row. That means, that
the angle stabilization can be solved with 3 independent PID control loops, so K
gives an optimal and easy to implement controller.
The initial states of the angles are:
0
= 1.2,
0
= 1.5,
0
= 1.1, the
references are zeros, respectively. Using the above described controller with K
feedback, we get following results:
It can be seen at 2.7, that the controller works eectively, with less overshooting
than the poleplacement controller, and it handles the nonlinear system very well,
even if the angles are not near zero.
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 15
Figure 2.7: Angles and angular speeds controlled with LQservo controller
2.4 Height stabilization using LQservo control tech
nique
The controllers described above only aect the angles. That means, that even if the
controller manages to control the angles, that does not mean, that the helicopter
will stay in one position. That is why further control loops are needed to the height
and positions control. The rst step is to design a height controller. This task is
also a referencetracking task, so an LQservo technique can be used here, too.
2.4.1 Design of the controller and simulation results
Linear controller with one control loop. Since the height stabilization is also a ref
erence tracking issue, it is possible to nd a solution to the angle and height
stabilization with one LQservo control loop. This means, that besides the system
described in the angle stabilization, the equations describing the motion among the
z coordinate are also needed, and the error vector must be extended with the dif
ference between the z coordinate and the desired height. So the resulting extended
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 16
linearised system is the following:
A =
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
B =
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
0 0 0 0
b
1
0 0 0
0 0 0 0
0 b
2
0 0
0 0 0 0
0 0 b
3
0
0 0 0 0
0 0 0 1/m
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
The construction using poleplacement based servo controller did not produce
satisfying results, so an LQ design is described below.
Q = 0.1
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
20 0 0 0 0 0 0 0 0 0 0 0
0 20 0 0 0 0 0 0 0 0 0 0
0 0 20 0 0 0 0 0 0 0 0 0
0 0 0 20 0 0 0 0 0 0 0 0
0 0 0 0 20 0 0 0 0 0 0 0
0 0 0 0 0 20 0 0 0 0 0 0
0 0 0 0 0 0 20 0 0 0 0 0
0 0 0 0 0 0 0 20 0 0 0 0
0 0 0 0 0 0 0 0 8 0 0 0
0 0 0 0 0 0 0 0 0 8 0 0
0 0 0 0 0 0 0 0 0 0 8 0
0 0 0 0 0 0 0 0 0 0 0 8
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
R =
_
_
_
_
_
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
_
_
_
_
_
Having these Q and R matrices, we got K feedback:
K =
_
_
_
_
_
2.13 1.41 0 0 0 0 0 0 0.89 0 0 0
0 0 2.13 1.41 0 0 0 0 0 0.89 0 0
0 0 0 0 2.13 1.41 0 0 0 0 0.89 0
0 0 0 0 0 0 2.40 2.10 0 0 0 0.89
_
_
_
_
_
The structure of K gives PID controller again, so with these methods, an opti
mal and easy to implement feedback could be found.
Simulation results with initial states
0
= 1,
0
= 1,
0
= 1,z
0
= 0 and
references (0, 0, 0, 1), respectively:
It can be seen at 2.8, that with besides a quite signicant undershooting the
controller handles the height stabilization together with the angle stabilization.
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 17
Figure 2.8: Angles and angular speeds, inputs and height controlled with
LQservo controller using LQR technique
2.5 Height stabilization using bounded LQR tech
nique
At the height stabilization problem, where the task is getting quite dicult, it is
important to watch the output of the controller, that means to pay attention to the
magnitude of the inputs. The model built in our robotics laboratory can handle
a maximum 25 N thrust force. So it is important to keep the inputs below that
range. Bounded input controller can be designed using bounded LQR technique.
2.5.1 Theoretical background
Considering the linear system:
x = Ax + Bu
y = Cx
There exists a stabilizing state feedback K such that for every initial condition x(0)
with x(0) 1 , the resulting control satises u(t)
max
< U
max
for all t 0,
if and only if there exist an matrix Q and an matrix R satisfying the equality
constraint [18]:
QQ
T
= 0
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 18
and the inequality constraints:
Q 0
AQQA
T
BR B
T
R
T
> 0
_
U
2
max
I R
R
T
Q
_
> 0
in which case one such K can be constructed as:
K = RQ
1
2.5.2 Design of the controller and simulation results
The same LQservo structure will be used as in the section above, but inside the
LQservo controller, the error vector will be driven to zero with bounded LQR
technique. Having A and B matrices as above, the set of matrix equalities and
inequalities need to be solved. This can be easily done in MATLAB using the
yalmip toolbox [14]. Setting U
max
= 800 the resulting Q and R matrices are:
R = 10
3
_
_
_
_
_
0.27 0.13 0 0 0 0 0 0 0.068 0 0 0
0 0 0.27 0.13 0 0 0 0 0 0.068 0 0
0 0 0 0 0.048 0.024 0 0 0 0 0.012 0
0 0 0 0 0 0 2600 1700 0 0 0 750
_
_
_
_
_
Q = 10
5
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
4.7 1.9 0 0 0 0 0 0 1.9 0 0 0
1.9 7.8 0 0 0 0 0 0 1.5 0 0 0
0 0 4.7 1.9 0 0 0 0 0 1.9 0 0
0 0 1.9 7.8 0 0 0 0 0 1.5 0 0
0 0 0 0 4.7 1.9 0 0 0 0 1.9 0
0 0 0 0 1.9 7.8 0 0 0 0 1.5 0
0 0 0 0 0 0 4.7 1.8 0 0 0 1.9
0 0 0 0 0 0 1.8 6.5 0 0 0 1.5
1.9 1.5 0 0 0 0 0 0 7.8 0 0 0
0 0 1.9 1.5 0 0 0 0 0 7.8 0 0
0 0 0 0 1.9 1.5 0 0 0 0 7.8 0
0 0 0 0 0 0 1.9 1.5 0 0 0 7.8
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
The resulting K feedback is:
K = 10
5
_
_
_
_
_
84 42 0 0 0 0 0 0 21 0 0 0
0 0 84 42 0 0 0 0 0 21 0 0
0 0 0 0 15 7.52 0 0 0 0 3.69 0
0 0 0 0 0 0 8900 5800 0 0 0 2400
_
_
_
_
_
The structure of K gives a PID controller again, so the bounded input problem
can be solved with four optimal PID control loops (three to the angles and one to
the height).
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 19
Simulation results with initial states
0
= 1,
0
= 1,
0
= 1,z
0
= 0 and
references (0, 0, 0, 1), respectively (same as at the section above):
Figure 2.9: Angles and angular speeds, inputs and height controlled with
LQservo controller using bounded LQR technique
It can be seen in 2.9, that the performance of the controller slows down, because
of the input bounds. At the linear height controller in the section above, the norm
of the vector U was 836.4056, in the bounded case, we got an U vector with bound
62.859, which is about ten times smaller.
2.6 Height stabilization using nonlinear feedback input
output linearisation
Since the height stabilization problem can be handled independently from the angle
stabilization it became worth to try nonlinear control strategies, like the feedback
inputoutput linearisation [15].
2.6.1 Theoretical background
[15] The basic idea of inputoutput linearisation is to nd a nonlinear static feed
back that makes the system look linear from the inputoutput point of view. The
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 20
nonlinear statespace model:
x = f(x) + g(x)U
y = h(x)
The relative degree of this system at x
0
is r, if following statements are true:
L
g
L
r
k
h(x) = 0 for all x in the near of x
0
for all k < r 1
L
g
L
r1
f
h(x
0
) = 0
The goal is to nd U in the form U = (x)+(x)v, so that the system looks linear
from the input to the output. That way, a linear control strategy can be applied
to the system. The relative degree of freedom of the system can be maximum n,
where n is the dimension of the statespace.
2.6.2 Design of the controller and simulation results
While designing a control loop to the height stabilisation problem, the following
two equations are considered:
x
7
= x
8
x
8
= (cosx
1
cosx
3
)
1
m
U
1
g
The steps of the input linearisation are the followings: Let U
1
= (cosx
1
cosx
3
)
1
m
U
1
.
Then we will have the following equations:
x
7
= x
8
x
8
= U
1
g
Let U
1
= U
1
g, and let x
7
= h
ref
x
7
, since we have also a reference tracking
issue at the height stabilisation. Then we will have the following equations:
x
7
= x
8
x
8
= U
1
The resulting equations form a linear system, it is now possible to dene the matrix
form of the linearised statespace model.
A =
_
0 1
0 0
_
B =
_
0
1
_
This is a controllable system, that can be stabilized with a U
1
= K
_
x
7
x
8
_
feedback.
From that we can compute the value of U
1
:
U
1
=
g U
1
cosx
1
cosx
3
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 21
We can get the K feedback with LQR technique:
Q =
_
1 0
0 1
_
R = 1 K =
_
0.1 0.04583
_
Simulation results with initial states
0
= 1,
0
= 1,
0
= 1,z
0
= 0 and
references (0, 0, 0, 1), respectively:
Figure 2.10: Angles and angular speeds, inputs and height controlled with
LQservo and nonlinear feedback inputoutput linearisation
It can be seen in 2.10, that with a smooth overshooting, the controller handles
the task very well, even with initial angle values, that are not near to zero. This
controller, combined from linear and nonlinear control loops (linear LQservo for
angle stabilisation, and feedback inputoutput linearisation for the height stabili
sation) works quite well.
2.6.3 Comparison between the performances of the linear and
nonlinear controller
In the linear case the resulted feedback is an optimal PID controller, so the task in
the linear case can be solved with four independent PID loops, and the performance
of the controller is satisfactory. In the nonlinear case an optimal PID controller
can be used to the angle stabilization as well, but the feedback to the height
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 22
stabilization task is a nonlinear one, but it is easy to handle, since only cosine
functions are needed.
In 2.11 angles and height can be seen in the linear case at the top, and in the
nonlinear case at the bottom, with initial states
0
= 0.1,
0
= 0.1,
0
=
0.15,z
0
= 0 and references (0, 0, 0, 1), respectively. Having these small, near zero
initial values to the angle, it can be seen, that the nonlinear controller works
more satisfactory since it produces no undershoot. The angle stabilisation remains
satisfactory in both cases.
At 2.12 angles and height can be seen in the linear case at the top, and in
the nonlinear case at the bottom, with initial states
0
= 1.4,
0
= 1.5,
0
=
1.3,z
0
= 0 and references (0, 0, 0, 5), respectively. Having these more signicant
initial values to the angles, it can be seen, that the nonlinear controller shows a
quite better performance to the angle stabilisation as well.
One other important advantage of the nonlinear controller is, that it is very
easy to tune its parameters. In the linear case, the controller was very sensitive
to its parameters. Even small changes in the parametrization could lead to an
unstable controller. But in the nonlinear case, the parameters can be changed
easily, depending on the needed performance.
2.7 Position stabilization using nonlinear feedback
control technique
At the height stabilization it was shown that even if the controller stabilizes the
angles, it is not guaranteed, that the helicopter will stay in a given position. So
it is necessary to deal with position stabilization as well. Also when we want to
perform trajectory tracking tasks, it is important to be able to move the helicopter
to a given position. Controllers were designed in a backstepping schema, which
is a nonlinear schema [16], so for the height and the position stabilization only
nonlinear controllers will be shown .
2.7.1 Design of the controller and simulation results
To perform the position stabilization, separate control loops must be applied to
the state variables x
9
, x
10
and x
11
, x
12
. These loops were designed with the non
linear inputoutput feedback control technique. To simplify the equations, let us
assume that x
5
= 0, so that the rotation around the z axis is zero. The controller
applied to x
7
, x
8
gives the feedback to U
1
. At the position stabilization it has to be
calculated, which angles are needed to take the helicopter into the given position.
So we consider x
1
and x
3
as inputs here. Let us design the controller to stabilize
the y coordinate rst.
x
11
= x
12
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 23
Figure 2.11: Comparison of the linear and nonlinear controllers in case
of small, near zero angles and small height reference
x
12
= u
y
1
m
U
1
with u
y
= cosx
1
sinx
3
sinx
5
sinx
1
cosx
5
= sinx
1
.
Let x
11
= y
ref
x
11
and let u
y
= u
y
1
m
U
1
. Then we have the following linear
equations:
x
11
= x
12
x
12
= u
y
The resulting statespace model:
A =
_
0 1
0 0
_
B =
_
0
1
_
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 24
Figure 2.12: Comparison of the linear and nonlinear controllers in case
of large, near zero angles and small height reference
This is a controllable model, which can be stabilized with an
u
y
= K
_
x
11
x
12
_
feedback. This feedback can be designed using LQR technique. Having Q and R
matrices as described at the nonlinear height stabilization, we get the feedback:
K =
_
0.1000 0.04583
_
This means, that
u
y
=
u
y
m
U
1
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 25
From u
y
we can calculate the value of x
1
easily:
x
1
= arcsin(u
y
)
Now let us design a controller, that stabilizes the x coordinate.
x
9
= x
10
x
10
= u
x
1
m
U
1
with u
x
= cosx
1
sinx
3
cosx
5
+ sinx
1
sinx
5
= cosx
1
sinx
3
.
Let x
9
= x
ref
x
9
and let u
x
= u
x
1
m
U
1
. Then we have the following linear
equations:
x
9
= x
10
x
10
= u
x
The resulting statespace model:
A =
_
0 1
0 0
_
B =
_
0
1
_
This is a controllable model, which can be stabilized with an
u
x
= K
_
x
9
x
10
_
feedback. This feedback can be designed using LQR technique. Having Q and R
matrices as described at the nonlinear height stabilization, we get the feedback:
K =
_
0.1000 0.04583
_
This means, that
u
x
=
u
x
m
U
1
From u
x
we can calculate the value of x
3
easily:
x
3
= arcsin(
u
x
cosx
1
)
where the value of x
1
is calculated from the feedback at the control loop for co
ordinate y. Now we have two feedbacks to x
1
and x
3
. These feedbacks will give
the reference values to the LQservo control loops at the angle stabilization. The
nonlinear height stabilization stays as an independent control loop.
We got the following results with initial values: x
7
= 0, x
9
= 0, x
11
= 0, and
reference values 10, 12, 15 respectively:
It can be seen in 2.13 that the controller combined from linear and nonlinear
control loops handles the position stabilizing in a very satisfying way. Overshoot
ing is acceptable, and the dierent loops do not slow down the performance of
each other. To get a better view on the helicopters trajectory during the position
stabilizing 2.14 shows the 3D curve of the motion of the helicopter.
CHAPTER 2. CONTROLLER DESIGN IN CONTINUOUS TIME 26
Figure 2.13: Angles and angular speeds, inputs and positions controlled
with LQservo and nonlinear feedback inputoutput linearisation
Figure 2.14: Position curve of the quadrocopter
CHAPTER 3
Discrete time analysis and control
CHAPTER 3. DISCRETE TIME ANALYSIS AND CONTROL 28
3.1 Introduction
The goal of this thesis is not only to provide working controllers to the quadrocopter
and analyse the applied control strategies, but to prepare these controllers for
implementation. To implement the controllers, they must work in discrete time.
So it is a remaining question, how to choose a working sampling time to these
controllers. In this chapter sampling times to the controllers described in chapter
1 will be provided.
3.2 Theoretical background
Where it is possible, this chapter will give an estimated sampling time based on
the paper [12]. This work provides the sharpest estimation technique known today,
based on that, a sampling time can be given, to which it is proven, that the discrete
system keeps the main stability properties of the continuous time system.
Usually the actuators, sensors and controllers are connected via a separate or
shared network, as it can be seen in gure 3.1 [13].
Figure 3.1: networked control system
Variables:
x
p
plant state vector
x
c
controller state vector
y plant output
u controller output
y most recently transmitted plant output
u most recently transmitted controller output
We assume that data is transmitted between the nodes (individual sensors and
actuators connected to the network) at time instants t
0
, t
1
, ..., t
i
where i N. The
transmission time instants satisfy:
< t
j+1
t
j
for j 0, where , > 0
The upper interval bound is called the maximum allowable transfer interval,
MATI. Error caused by the network transmission:
e(t) =
_
y(t) y(t)
u(t) u(t)
_
CHAPTER 3. DISCRETE TIME ANALYSIS AND CONTROL 29
The equations of the networked control system:
x = f(t, x, e, w), t [t
i1
, t
i
]
e = g(t, x, e, w), t [t
i1
, t
i
]
with x = [x
T
p
x
T
c
]
T
R, and disturbance vector w. The change of e during trans
mission instants:
e(t
+
i
) = (I (i, e(t
i
)))e(t
i
)
e(t
+
i
) = (i, (i, e(t
i
))e(t
i
),
(t
i
))
with e decision vector of the network scheduler, scheduling function, and
decision update function.
Theorem(Tabbara et al, 2007): Suppose that the NCS scheduling protocol is
uniformly persistently exciting in time T and the following assumptions hold:
There exists Q positive denite symmetric matrix and continuous output of
the form y(x, w) = G(x) + w so that the error dynamics e = g(t, x, e, w)
satises:
g(t, x, e, w) Q e + y(x, w)
for all (x, e, w) for t (t
i
, t
i+1
) and for all i N. Note, that x y x
i
y
i
for i = 1, ..., n, and x = [x
1
, ..., x
n
]
T
x = f(t, x, e, w) is L
p
stable from (e, w) to G(x) with gain for some p
[1, ]
The MATI satises (,
), (0,
), where
=
ln(v)
QT
with v solution of
v(Q + T) Tv
1
1
T
2Q = 0
Then the NCS is L
p
stable form w to (G(x), e) with linear gain. Naturally, equidis
tant discretization in time can be regarded as a special case of networked control
described above. This means, that with a t <
. The computation
is quite straightforward in case of linear systems and linear controllers but it can
be challenging in the case of nonlinear models. Now, the method is applied to the
discretization of the angle controller, described at section 2.3, that uses LQservo
control strategy.
3.3.1 Estimation of the sampling time
[13]At the following computations we assume, that
zero order hold is at the controller output
network or discretization induced error is simplied to e = y y
w = 0
The system model is:
x
p
= A
p
x
p
+ B
p
u
y = C
p
x
p
with feedback:
u
t
= Ky = KCx
p
So the closed loop state equation is:
x
p
= (A
p
+ B
p
KC
p
)x
p
We have the following error term
e(t) = y(t) y(t) = y = e + y
Then the actual state equation is
x
p
= (A
p
+ B
p
KC
p
)x
p
+ B
p
Ke
and the error dynamics is:
e = y = C
p
x
p
= C
p
(A
p
+ B
p
KC
p
)x
p
C
p
B
p
Ke
NCS model form:
x
p
=
11
x +
12
e
e =
21
x +
22
e
Finding Q and y for the elementwise inequality:
g(t, x, e, w) = Q e + y(x, w)
CHAPTER 3. DISCRETE TIME ANALYSIS AND CONTROL 31
g(t, x, e, w) =
21
x +
22
e
a good choice in the linear case is:
q
ij
= max{[
22
]
ij
, [
22
]
ji
}
y =
21
x
So the L
p
gain should be computed for:
x =
11
x +
12
e
y =
21
x
Then we have to solve the equation:
v(Q + T) Tv
1
1
T
2Q = 0
and nally we get
=
ln(z)
QT
.
In this case T = 4 and the matrices are:
11
=
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
0 1.00 0 0 0 0 0 0 0
7.75 4.14 0 0 0 0 9.28 0 0
0 0 0 1.00 0 0 0 0 0
0 0 7.75 4.14 0 0 0 9.28 0
0 0 0 0 0 1.00 0 0 0
0 0 0 0 26.70 10.33 0 0 35.35
1.00 0 0 0 0 0 1.00 0 0
0 0 1.00 0 0 0 0 1.00 0
0 0 0 0 1.00 0 0 0 1.00
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
12
=
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
0 0 0 0 0 0 0 0 0
7.75 4.14 0 0 0 0 9.28 0 0
0 0 0 0 0 0 0 0 0
0 0 7.75 4.14 0 0 0 9.28 0
0 0 0 0 0 0 0 0 0
0 0 0 0 26.70 10.33 0 0 35.35
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
CHAPTER 3. DISCRETE TIME ANALYSIS AND CONTROL 32
21
=
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
0 1.00 0 0 0 0 0 0 0
7.75 4.14 0 0 0 0 9.28 0 0
0 0 0 1.00 0 0 0 0 0
0 0 7.75 4.14 0 0 0 9.28 0
0 0 0 0 0 1.00 0 0 0
0 0 0 0 26.70 10.33 0 0 35.35
1.00 0 0 0 0 0 1.00 0 0
0 0 1.00 0 0 0 0 1.00 0
0 0 0 0 1.00 0 0 0 1.00
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
22
=
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
0 0 0 0 0 0 0 0 0
7.75 4.14 0 0 0 0 9.28 0 0
0 0 0 0 0 0 0 0 0
0 0 7.75 4.14 0 0 0 9.28 0
0 0 0 0 0 0 0 0 0
0 0 0 0 26.70 10.33 0 0 35.35
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
So we have
Q =
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
0 7.745 0 0 0 0 0 0 0
7.745 4.14 0 0 0 0 9.28 0 0
0 0 0 7.75 0 0 0 0 0
0 0 7.75 4.14 0 0 0 9.28 0
0 0 0 0 0 26.70 0 0 0
0 0 0 0 26.70 10.33 0 0 35.35
0 9.28 0 0 0 0 0 0 0
0 0 0 9.28 0 0 0 0 0
0 0 0 0 0 35.35 0 0 0
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
and = 122.91. That gives us
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
20 0 0 0 0 0 0 0 0
0 20 0 0 0 0 0 0 0
0 0 20 0 0 0 0 0 0
0 0 0 20 0 0 0 0 0
0 0 0 0 20 0 0 0 0
0 0 0 0 0 20 0 0 0
0 0 0 0 0 0 8 0 0
0 0 0 0 0 0 0 8 0
0 0 0 0 0 0 0 0 8
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
R =
_
_
1 0 0
0 1 0
0 0 1
_
_
Using the matrices above to design the controller, a sampling time 0.0037 could
be achieved, which is more than 10
2
times better, than the one before. Using
the modied controller with the new sampling time, we got following simulation
results:
Figure 3.4: Angles and angular speeds controlled with LQservo controller,
discrete case, sampling frequency 1 kHz
It can be seen at 3.4, that the controller got weaker, so its performance became
slower, but the system could be indeed discretized with 1 kHz.
3.4 Discretization of the height controller in linear
case
In section 2.4 a linear controller can be seen, designed for the angle and height
stabilisation task. It could be seen, that this controller only works at angle values,
CHAPTER 3. DISCRETE TIME ANALYSIS AND CONTROL 35
that are near zero. In this section, a discertization time will be estimated for this
controller, with the technique introduced at the section before.
3.4.1 Estimation of the sampling time
Making the same computations as above, with the controller settings used in section
2.4, the upper bound of MATI became 5 10
= 2.84 10
7
which means, that with 10 MHz the model
can be discretized.
3.4.2 Simulation results
Since
became 0.020863. That means, that with 50 Hz the system can be discretized.
This very low sampling frequency can be explained with the input bounds that
were applied to the design of the controller. These bounds make the controller
weaker in the sense that they do not allow the controller to create control inputs
with high norm. Therefore, the less aggressive the behaviour of the controller
CHAPTER 3. DISCRETE TIME ANALYSIS AND CONTROL 36
Figure 3.5: Angles, angular speeds, forces and height controlled with linear
LQservo control, discrete case, sampling frequency 10 kHz
is, the more the sampling time can be increased. The simulation results with a
sampling time of 50 Hz, can be seen at 3.6. These results are essentially the same,
as in the continuous case, seen at 2.9.
3.6 Discretization of the height controller in the case
of nonlinear feedback
In the nonlinear case, the necessary computations (and some estimations in par
ticular) to compute the MATI are quite hard. Therefore the sampling times to the
controllers designed at section 2.6 and 2.7 will be examined only through simula
tions. At section 3.3 it could be seen, that the angle controller must be weakened
to get a better and easier to implement sampling time. So the LQservo angle
controller loop in the case of the nonlinear height and position stabilisation will
CHAPTER 3. DISCRETE TIME ANALYSIS AND CONTROL 37
Figure 3.6: Angles, angular speeds, forces and height controlled with
bounded linear control, discrete case, sampling frequency 50 Hz
be designed with the following Q and R matrices:
Q = 10
6
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
20 0 0 0 0 0 0 0 0 0 0 0
0 20 0 0 0 0 0 0 0 0 0 0
0 0 20 0 0 0 0 0 0 0 0 0
0 0 0 20 0 0 0 0 0 0 0 0
0 0 0 0 20 0 0 0 0 0 0 0
0 0 0 0 0 20 0 0 0 0 0 0
0 0 0 0 0 0 20 0 0 0 0 0
0 0 0 0 0 0 0 20 0 0 0 0
0 0 0 0 0 0 0 0 8 0 0 0
0 0 0 0 0 0 0 0 0 8 0 0
0 0 0 0 0 0 0 0 0 0 8 0
0 0 0 0 0 0 0 0 0 0 0 8
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
R =
_
_
_
_
_
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
_
_
_
_
_
3.6.1 Simulation results
Simulation has shown that with 1000 Hz the height controller described, at section
2.6 can be discretized properly. It can be seen at 3.7, that there are no essential
dierences compared to the results in the continuous case, seen at 2.10 besides,
that we use a weaker angle controller in this case to get a satisfactory sampling
time.
CHAPTER 3. DISCRETE TIME ANALYSIS AND CONTROL 38
Figure 3.7: Angles, angular speeds, forces and positions with nonlinear
control, discrete case, sampling frequency 1 kHz
3.7 Discretization of the position controller in non
linear case
The controller examined here was described in section 2.7. In this case, the sam
pling time was examined using simulations, too.
3.7.1 Simulation results
Simulation has shown that with 1000 Hz the system can be discretized properly. It
can be seen at 3.8, that there are no essential dierences compared to the results
in the continuous case, seen at 2.13 besides, that we use a weaker angle controller
in this case to get a satisfactory sampling time.
But again, it needs to be mentioned, that the sampling time can not be in
creased lot further. With sampling frequency lower than 100 Hz, the controller got
unstable. But at 3.9 it can be seen, that even with 100 Hz sampling frequency, the
controller keeps its robustness, so the simulation results show no essential dierence
to the results of the continuous one, seen at 2.13.
CHAPTER 3. DISCRETE TIME ANALYSIS AND CONTROL 39
Figure 3.8: Angles, angular speeds, forces and positions with nonlinear
control, discrete case, sampling frequency 1 kHz
3.8 Robustness testing of the position controller un
der Gaussian noise
Since the position controller incorporates all the designed controllers (angle and
height controller loops are also included in it), by testing the performance of this
construction the robustness of all control subsystems can be shown. The tests are
aim to prove that the nonlinear height and position stabilizing loops hold their
performance even under signicant noise in the sensor data.
During the simulation 100 Hz sampling frequency was applied. The angle sensor
data were corrupted with additive Gaussian white noise in the range of degrees
(between 3 and +3 degree), the height and position sensor data were added with
an Gaussian white noise in the range of centimetres (between 15 and +15 cm).
Figure 3.10 shows, that the controller maintains its robustness and performance.
CHAPTER 3. DISCRETE TIME ANALYSIS AND CONTROL 40
Figure 3.9: Angles, angular speeds, forces and positions with nonlinear
control, discrete case, sampling frequency 100 Hz
Figure 3.10: Angles, angular speeds, forces and positions with nonlinear
control, discrete case, sampling frequency 100 Hz, Gaussian noise applied
to sensor data
CHAPTER 4
Summary and Conclusions
In this thesis various controllers were provided to stabilize angles, height and po
sition of a quadrocopter. Each controller is ready for implementation, and an
appropriate sampling time was given for each either through an analytic estima
tion or through simulations. The most meaningful achievement in this thesis is
the construction of a unique control strategy to the position stabilizing task. The
controller described combines linear and nonlinear controllers in a nonlinear back
stepping based schema. That means, that to the tasks, where linear controllers can
be used, the easy to implement linear controllers can be kept, and to those parts,
that are more successfully handled with a nonlinear controller, an appropriate
nonlinear control loop can be designed. To the purely linear controllers, there is
a sampling time provided, which was estimated based on the sharpest estimation
technique known today [12]. To estimate a realistic sampling time with this tech
nique is also considered as an achievement. That way it is proven, that with the
given sampling time, the closed loop system will keep its stability properties, and
its behaviour will not change signicantly in discrete time.
4.1 Acknowledgement
At rst place I would like to thank G abor Szederkenyi, my supervisor for guiding
my studies for more than over a year, and for his attention and ideas. I would
also like to thank Gy orgy Cserey for giving me the idea to deal with the control
of a quadrocopter. And nally thanks to Alpar S andor who built the quadro
copter model in our robotic laboratory, and so made it possible to implement the
controllers in the future.
Bibliography
[1] Samir Bouabdallah, Design and control of quadrotors with application to au
tonomous ying.
ECOLE POLYTECHNIQUE F
ED
ERALE DE LAUSANNE
Phd thesis, 2007. [cited at p. 2, 3, 5]
[2] Ashfaq Ahmad Mian, Wang Daobo, Modeling and Backsteppingbased Nonlin
ear Control Strategy for a 6 DOF Quadrotor Helicopter. College of Automa
tion Engineering, Nanjing University of Aeronautics and Astronautics, China.
Chinese Journal of Aeronautics, 2008. [cited at p. 2, 6]
[3] Pedro Castillo, Rogelio Lozano and Alejandro Dzul, Experimental implemen
tation of linear and nonlinear control laws: Stabilization of a Mini Rotor
craft with Four Rotors. IEEE Control Systems Magazine, December, 2005.
[cited at p. 2]
[4] Muriel Labadille, Nonlinear Control of a Quadrotor. Craneld University
School of Engineering, MSc Thesis, 2007. [cited at p. 2]
[5] Bruno Herisse, Tarek Hamel, Robert Mahony, FrancoisXavier Russotto, A
terrainfollowing control approach for a VTOL Unmanned Aerial Vehicle using
average optical ow. Springer Science+Business Media, LLC, 2010. [cited at p. 3]
[6] Srinivasan M., Zhang S., Chahl J. S., Barth E., Venkatesh S., How hon
eybees make grazing landings on at surfaces. Biological Cybernetics, 2000.
[cited at p. 3]
[7] Ian D. Cowling, Oleg A. Yakimenko, James F. Whidborne, Alastair K. Cooke,
Direct Method Based Control System for an Autonomous Quadrotor. Pub
lished online, US Government, 2010. [cited at p. 2]
[8] P. Pounds, R.Mahony, P.Corke, Modelling and control of a large quadrotor
robot. Control Engineering Practice, Elsevier. 2010. [cited at p. 3]
[9] Guilherme V. Rao, Manuel G. Ortega, Francisco R. Rubio, An integral pre
dictive nonlinear H1 control structure for a quadrotor helicopter. Departa
mento de Ingeniera de Sistemas y Automatica, Universidad de Sevilla, Spain.
Control Engineering Practice, Elsevier. 2010. [cited at p. 3]
BIBLIOGRAPHY 43
[10] Sandor Alp ar, Negyrotoros kishelikopter eptese, iranytasa es k ulonbozo szen
zori adatok alapjan szabalyzassal torteno stabilizalasa. P azm any Peter Kato
likus Egyetem OTDK, 2007. [cited at p. 3, 5, 8]
[11] SAMIR BOUABDALLAH, PIERPAOLO MURRIERI, ROLAND SIEG
WART, Towards Autonomous Indoor Micro VTOL. Springer Science + Busi
ness Media, 2005. [cited at p. 6]
[12] Mohammad Tabbara, Dragan Nesic, Andrew R. Teel, Stability of Wireless
and Wireline Networked Control Systems. IEEE Transactions and automatic
control, vol. 52., NO.9 September 2007. [cited at p. 28, 30, 41]
[13] Gabor Szederkenyi, Katalin Hangos, Passivity based control and its use in the
stability and performance analysis of networked control loops. 9th International
PhD Workshop on Systems and Control 2008. [cited at p. 28, 30]
[14] Developped by Dr Johan L ofberg, downloaded from
http://users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Main.HomePage
[cited at p. 18]
[15] K. M. Hangos, J. Bokor, G. Szederkenyi, Analysis and Control of Nonlinear
Process Systems. Springer, 2004. [cited at p. 19]
[16] P. Kokotovic and M. Arcak, Constructive Nonlinear Control: A Historical
Perspective. Automatica, 37:637662, 2001. [cited at p. 22]
[17] W. N. Wonham, Linear Multivariable Control  A Geometric Approach.
SpringerVerlag, New York (Third Edition) 1985. [cited at p. 10]
[18] G. F. Wredenhagen, P. R. Belanger Piecewiselinear LQ control for systems
with input consternates. Automatica, 30:403416, 1994. [cited at p. 17]
List of Figures
2.1 Schematic draw of the quadrocopter . . . . . . . . . . . . . . . . . . . 6
2.2 Quadrotor concept motion description, the arrow width is proportional
to propeller rotational speed. . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Model built in Simulink . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4 Schema of the LQsevo controller . . . . . . . . . . . . . . . . . . . . . 11
2.5 The LQservo controller in Simulink . . . . . . . . . . . . . . . . . . . . 13
2.6 Angles and angular speeds controlled with a servo controller using pole
placement technique . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.7 Angles and angular speeds controlled with LQservo controller . . . . . 15
2.8 Angles and angular speeds, inputs and height controlled with LQservo
controller using LQR technique . . . . . . . . . . . . . . . . . . . . . . 17
2.9 Angles and angular speeds, inputs and height controlled with LQservo
controller using bounded LQR technique . . . . . . . . . . . . . . . . . 19
2.10 Angles and angular speeds, inputs and height controlled with LQservo
and nonlinear feedback inputoutput linearisation . . . . . . . . . . . . 21
2.11 Comparison of the linear and nonlinear controllers in case of small,
near zero angles and small height reference . . . . . . . . . . . . . . . . 23
2.12 Comparison of the linear and nonlinear controllers in case of large, near
zero angles and small height reference . . . . . . . . . . . . . . . . . . . 24
2.13 Angles and angular speeds, inputs and positions controlled with LQ
servo and nonlinear feedback inputoutput linearisation . . . . . . . . 26
2.14 Position curve of the quadrocopter . . . . . . . . . . . . . . . . . . . . 26
3.1 networked control system . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.2 Angles and angular speeds controlled with LQservo controller, discrete
case, sampling frequency 100 kHz . . . . . . . . . . . . . . . . . . . . . 33
3.3 Angles and angular speeds controlled with LQservo controller, discrete
case, sampling frequency 5 kHz . . . . . . . . . . . . . . . . . . . . . . 33
3.4 Angles and angular speeds controlled with LQservo controller, discrete
case, sampling frequency 1 kHz . . . . . . . . . . . . . . . . . . . . . . 34
3.5 Angles, angular speeds, forces and height controlled with linear LQ
servo control, discrete case, sampling frequency 10 kHz . . . . . . . . . 36
LIST OF FIGURES 45
3.6 Angles, angular speeds, forces and height controlled with bounded linear
control, discrete case, sampling frequency 50 Hz . . . . . . . . . . . . . 37
3.7 Angles, angular speeds, forces and positions with nonlinear control,
discrete case, sampling frequency 1 kHz . . . . . . . . . . . . . . . . . . 38
3.8 Angles, angular speeds, forces and positions with nonlinear control,
discrete case, sampling frequency 1 kHz . . . . . . . . . . . . . . . . . . 39
3.9 Angles, angular speeds, forces and positions with nonlinear control,
discrete case, sampling frequency 100 Hz . . . . . . . . . . . . . . . . . 40
3.10 Angles, angular speeds, forces and positions with nonlinear control,
discrete case, sampling frequency 100 Hz, Gaussian noise applied to
sensor data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Much more than documents.
Discover everything Scribd has to offer, including books and audiobooks from major publishers.
Cancel anytime.