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

Proceedings of the Control Conference Africa, 2017

Proceedings
Proceedings of
Johannesburg, the
the Control
of South Conference
Africa,
Control December Africa,
Conference 2017
7-8, 2017
Africa, 2017
Proceedings of the Control
Johannesburg, Conference Africa, 2017
Johannesburg, South
South Africa,
Africa, December
December 7-8,
7-8, 2017
Available
2017online at www.sciencedirect.com
Johannesburg, South Africa, December 7-8, 2017

ScienceDirect
IFAC PapersOnLine 50-2 (2017) 157–162
Adaptive Model Predictive Control of a
Adaptive
Adaptive Model
Model Predictive
Predictive Control
Control of
of a
a
Quadrotor
Quadrotor
Quadrotor
Piwai N. Chikasha ∗ Chioniso Dube ∗∗

Piwai N. Chikasha ∗ Chioniso Dube ∗∗ ∗∗
Piwai
Piwai N. N. Chikasha
Chikasha ∗ Chioniso
Chioniso Dube
Dube ∗∗


University of the Witwatersrand, Johannesburg, Wits 2050 South
∗ University of the Witwatersrand, Johannesburg, Wits 2050 South
∗ UniversityAfrica
of
of the
∗∗UniversityAfrica
Witwatersrand,
the(e-mail: Johannesburg,
Johannesburg, Wits
Wits 2050
481274.students@wits.ac.za)
Witwatersrand,
(e-mail: 481274.students@wits.ac.za) 2050 South
South
∗∗
UniversityAfrica
of
Africathe(e-mail:
(e-mail: 481274.students@wits.ac.za)
Witwatersrand, Johannesburg, Wits
481274.students@wits.ac.za) 2050 South
∗∗ University of the Witwatersrand, Johannesburg, Wits 2050 South
∗∗ University
Africaof the
University
Africa the Witwatersrand,
of(e-mail:
(e-mail:
Johannesburg,
Johannesburg, Wits
Wits 2050
Chioniso.Kuchwa-Dube@wits.ac.za)
Witwatersrand,
Chioniso.Kuchwa-Dube@wits.ac.za) 2050 South
South
Africa (e-mail: Chioniso.Kuchwa-Dube@wits.ac.za)
Africa (e-mail: Chioniso.Kuchwa-Dube@wits.ac.za)
Abstract: This work explores the application of Adaptive Model Predictive Control (AMPC)
Abstract:
to quadrotorThis
Abstract: This work
work explores
explores the
the application
Predictiveof Adaptive Model isPredictive Control (AMPC)
Abstract:
to quadrotor
altitude
This control.
work control.
altitude explores Model the application
Model application
Predictive
of Adaptive
Control
ofControl
Adaptive Model
(MPC)
Modelis
(MPC)
Predictive
a very powerful
Predictive
aa very
Control
Controlmethod
powerful
(AMPC)
method
(AMPC) of
of
to
to quadrotor
Advanced
quadrotor altitude
Control,
altitude control.
utilizing an
control. Model Model
implicit Predictive
model
Predictive to Control
make
Control (MPC)
output
(MPC) is
predictions very
is a very powerful
which are in method
powerfulinmethod turn used of
of
Advanced
Advanced
in computing Control,
Control,
control utilizing
action.an
utilizing an implicit
implicit
Dynamic model
model
Matrix to
to make
make
Control output
output
(DMC) predictions
the firstwhich
predictions
was MPC are
which are in
technique turn
turn used
used
to be
Advanced
in Control,
computing control
control utilizing
action. an implicit
Dynamic model
Matrix to make
Control output
(DMC) predictions
was the the firstwhich are
MPC technique in
technique turn used
to be be
in computing
implemented,
in computing controland is stillaction.
veryDynamic
action. commonMatrix Control
in process (DMC)
control was
especially forfirst MPC
Chemical plants. Due to to
implemented,
implemented,
changes in and is
and
operating is still
still veryDynamic
very
points, common
common
the
Matrix
implicitin model
in
Control
process
process in
(DMC)
control
control
MPC
was the
especially
especially
typically forfirst
for
becomes
MPC technique
Chemical
Chemical plants. costing
plants.
insufficient, Due
Due
to be to
to
implemented,
changes in and
operating is still very
points, common
the implicitin process control especially for Chemical plants. Due to
changes
the quality
changes in
in operating points,
points, the
of the controller.
operating This
the work model
implicit
implicit model
proposes
model
in
in MPC
in MPC
typically
typically
Adaptation
MPC typically (basedbecomes
becomes
becomes on theinsufficient,
Recursivecosting
insufficient,
insufficient, costing
Least
costing
the
the
Squaresquality
quality
(RLS)of
of the
the controller.
controller.
algorithm), for This
This
online work
work proposes
proposes
system Adaptation
Adaptation
identification to (based
(based
take changeson
on the
the
in Recursive
Recursive
operating Least
Least
points
the
Squaresquality
(RLS)of the controller.
algorithm), for This
online work proposes
system Adaptation
identification to take (based
take changeson the Recursive points
in operating
operating Least
Squares
into account
Squares (RLS)
(RLS) whenalgorithm),
computing
algorithm), for
for theonline
the
onlineDMC system
control
system identification
action. Overall,
identification to
to take changes
Adaptive
changesDMC DMCin points
is investigated
in operating points
into
into account
as toaccount
whetherwhenwhen computing
computing
DMC the DMC
DMC control action. Overall, Adaptive is investigated
into
as to account
whether
Adaptive
when
Adaptivecomputing
DMC the
is DMC control
is capable
capable control
of
action.
of improved
action.
improved
Overall,
quadrotor Adaptive
control
Overall, control
quadrotor Adaptive or DMC
or
tracking.
DMC
tracking.
is
is investigated
investigated
as
as to
to whether
whether Adaptive
Adaptive DMC
DMC is
is capable
capable of
of improved
improved quadrotor
quadrotor control
control or
or tracking.
tracking.
© 2017, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved.
Keywords: Model Predictive Control, Dynamic Matrix Control, Adaptive Control, Recursive
Keywords:
Keywords:
Least Model
Model
Squares, Predictive
Predictive
Forgetting Control,
Control, Dynamic
Factor. Dynamic Matrix
Matrix Control,
Control, Adaptive
Adaptive Control,Control, Recursive
Recursive
Keywords:
Least Model
Squares, Predictive
Forgetting Control,
Factor. Dynamic Matrix Control, Adaptive Control, Recursive
Least Squares, Forgetting
Least Squares, Forgetting Factor. Factor.
1. INTRODUCTION et al., 2012). Two common types of MPC are Dynamic
1.
1. INTRODUCTION
INTRODUCTION et
et al., 2012). Two common and types of MPC are Dynamic
1. INTRODUCTION et al.,
al., 2012).
Matrix Control
2012). Two
Two (DMC) common
common types
Generalised
types of
of MPC
MPC are
are Dynamic
Predictive Con-
Dynamic
This research proposes Adaptive Model Predictive Con- Matrix Matrix
trol
Matrix
Control
Control
(GPC).
Control The (DMC)
(DMC) and
and
differences
(DMC)
Generalised
Generalised
between
and Generalised the Predictive
Predictive
two
Predictive are Con-
Con-
rather
Con-
This
This
trol research
research
(AMPC) proposes
proposes
for altitudeAdaptive
Adaptive
control Model
Model
of a Predictive
Predictive
quadrotor. Con-
Con-
Many trol
trol (GPC).
(GPC).
subtle, but The
The
important differences
differences
to note between
between
is that the
theDMC, two
two are
are
which rather
rather
was
This
trol research
(AMPC) proposes
for altitudeAdaptive
control Model
of aa for Predictive
quadrotor. Con-
Many trol (GPC).
subtle, but The
important differences
to note between
is that theDMC, two are
which rather
was
trol (AMPC)
different
trol (AMPC) for
controllers altitude
have
for altitude control
been
control of
tested
of a for quadrotor.
the
quadrotor. controlMany
Many of subtle,
developed
subtle, but and
butand important
introduced
important to
to bynote
by
note is
Charles that
is thatCutler DMC,
Cutler in
DMC,in which which
the was
1970s.
was
different
different
quadrotors. controllers
controllers
Whether have
have
or not been
been
a tested
tested
controller for
works the
the control
control
desirably of
of
for developed
developed
(Cutler et and
al., introduced
introduced
Guiamba, by
2001), Charles
Charles
uses a Cutler
step in
response the
the 1970s.
1970s.
model,
different
quadrotors. controllers
Whether have
or not been
a tested
controller for
works the control
desirably of
for developed
(Cutler et and
al., introduced
Guiamba, by
2001), Charles
uses a Cutler
step in
response the 1970s.
model,
quadrotors.
quadrotor control
quadrotors. Whether
Whether or not
normally
or not aadepends
controller
controller works
onworksthe systemdesirably
desirably for and
model
for (Cutler
putset
(Cutler al.,
al., Guiamba,
etrelatively
Guiamba, more2001),
emphasis
2001), uses
uses aaon step
past
step response
input data
response model,
to
model,
quadrotor
quadrotor
of the control
control
quadrotor normally
normally
(Schreier, depends
depends
2012) and on
on
the the
the system
system
environment model
model
the and
and
make puts
puts relatively
relatively
predictions, thanmore
more GPCemphasis
emphasis
does on
on past
past
(Rossiter, input
input
2003). data
data
DMC to
to
quadrotor
of the control(Schreier,
quadrotor normally2012) depends and on
the the system model
environment the and
make puts relativelythan
predictions, moreGPC emphasis
does on past input
(Rossiter, 2003). data
DMC to
of the
quadrotor
of the quadrotor
will
quadrotor (Schreier,
operate in.
(Schreier, 2012)
2012) and
and the
the environment
environment the
the make
also,
make predictions,
because
predictions, it is than
than GPC
non-parametric
GPC does
does (Rossiter,
(utilising
(Rossiter, a 2003).
step
2003). DMC
response
DMC
quadrotor
quadrotor will will operate
operate in. in. also, because
also,
model because
with 60it itdata
is non-parametric
is non-parametric
points for example) (utilising
(utilising aaa step
is less step response
response
sensitive to
quadrotor
Some of thewill operate
aspects thatin.make quadrotor control demand- also, model
model
noise,
because
with
with
although 60
60
itdata
is non-parametric
data
a points
points
little morefor
for
(utilising
example)
example)
computationally is
is less
less
step response
sensitive
sensitive
expensive to
to
Some
Some
ing areof
of the
the
that aspects
aspects
the that
that
quadrotor make
make is quadrotor
quadrotor
subject to control
control
unknown demand-
demand-
wind model
noise, with 60 data
although a points
little morefor example)
computationally is less sensitive
expensive to
Some
ing areof the
that aspects
the that
quadrotor make is quadrotor
subject to control
unknown demand-
wind noise,noise,
compared although
to
although the a
a little
parametric
little more
more computationally
GPC. For
computationally the expensive
advantage
expensive of
ing
ing are
disturbancesthat
are that and the
and quadrotor
possibly,
the quadrotor is subject
uncertain
is subjectdynamicsto
dynamics unknown
to unknown wind
influenced compared
wind compared
noise to the
to
sensitivity, thethe parametric
parametric
type of MPCGPC.
GPC. For the
For
investigatedthe advantage
advantage
in this of
of
work
disturbances
disturbances
by misalignment possibly,
and possibly,
possibly,
of motors, uncertain
uncertain dynamics influenced
imbalanceinfluenced
weight dynamics etc, and noise compared to thethe
sensitivity, parametric
type of MPCGPC. For the advantage
investigated in this of
work
disturbances
by misalignment and of motors, uncertain
weight imbalance influenced
etc, and noise
is DMC,
noise sensitivity,
leading
sensitivity, the
theto type
type of
Adaptive MPC
of MPC investigated
Dynamic
investigated Matrix in this work
Control
in this work
by
by misalignment
physical limitations
misalignment of inmotors,
velocity,
of motors, weight
attitude
weight imbalance
angles,
imbalance etc,
rotor and
an-
etc, and (ADMC).is DMC,
is DMC, leading to Adaptive Dynamic Matrix Control
physical
physical limitations
etc. A in
limitations
gular velocity in velocity, attitude
velocity,designed
controller attitude for angles,
angles, rotor
rotor an-
one operation an- is DMC, leading
(ADMC).
It should
leading
It should
to
to Adaptive
be note though
Adaptive
be note
Dynamic
Dynamic
though
Matrix
that,
Matrix
that,
methods
methods
Control
do
Control
do
physical
gular limitations
velocity etc. A in velocity, attitude angles, rotor an- (ADMC).
exist, to It
make should
GPC be
less note though
sensitive to that,
noise methods
(for exampledo
gular
gular velocity
condition of the
velocity etc.
etc. A controller
A controller
quadrotor is prone
controller
designed
designed
designed
for
for one
to performance
for one operation
one degra- (ADMC).
operation
operation exist,
exist, to
to
implementing
It should
make
make GPC
GPC
filters).
be note
less
less
MPC
though
sensitive
sensitive
has been to
to
that, (for
noise
noise
successful
methods
(for
for example
example
do
quadro-
condition
condition
dation as of
of
the the
the quadrotor
quadrotor
environment is
is prone
prone
and/or to
to
vehicle performance
performance
dynamics degra-
degra-
change exist, to
implementing make GPC
filters). less
MPC sensitive
has been to noise
successful (for
for example
quadro-
condition
dation of the quadrotorand/or is prone to performance degra- tor implementing
control (Alexis filters).
filters).et MPC
al., has
2014been andsuccessful
Kunz etfor al.,quadro-
2013)
(Wang as
dation
dation et the
as
as al., environment
the
the environment
2016).
environment and/or vehicle
and/or vehicle dynamics
vehicle dynamics change
dynamics change implementing
change tor
tor control
control
achieving high (Alexis
(Alexis
quality et
et
MPC
al.,
al.,
has
2014
2014
performance
been
and
and
successful
and Kunz
Kunz
on the et
et
for quadro-
al.,
al.,
other 2013)
2013)
hand,
(Wang
(Wang et
et al.,
al., 2016).
2016). tor control
achieving high (Alexis
quality etperformance
al., 2014 and and Kunz
on the etother
al., hand,
2013)
(Wang
On the etother al., 2016).
hand, Adaptive control allows adjustment adaptive achieving
achieving high
control
high quality
(Li
quality etperformance
al., 2014
performance and and
and on
Monte
on the
the etother
al.,
other hand,
2013).
hand,
On
On the
the other
of control
On the other
other
hand,
hand,
of the
hand,
Adaptive
Adaptivebycontrol
quadrotor
Adaptive control allows
automatically
control allows updating adaptive
allows adjustment
adjustment
adjustment
adaptive
AMPC,
adaptive incontrol
control
the form
control
(Li
(Li
(Li of
et
et al.,
al.,
et GPC,
2014
al., 2014has and
2014 also Monte
and
and Monte
been found
Monte
et
et al.,to2013).
et al.,
al.,to2013).
meet
2013).
of
of control
control
thecontrol
of system of of
of
modelthe
the quadrotor
quadrotor
(through
the (through
by
by
parameter
quadrotorparameter
automatically
automatically
estimation),
by automatically online AMPC, in the form of GPC, has also been found to meet
updating
updating
updating
AMPC,
AMPC,
high in
in
performancethe
the form
form of
of
indices GPC,
GPC,
for has
has
quadrotoralso
also been
been
trajectoryfound
found to meet
tracking
meet
the
the
or system
system
offline, model
model
according (through
to the parameter
prevailing estimation),
estimation),
process online
online
dynamics. high
high performance
performance
(Bouffard et al., indices
indices
2012). for
for quadrotor
quadrotor trajectory
trajectory tracking
tracking
the system model (through parameter estimation), online high performance indices for quadrotor trajectory tracking
or
or
Work
or
offline,
suchaccording
offline,
offline, as that ofto
according
according
the
the prevailing
toLandau
to the prevailing
and team
prevailing
process
process
(Landau
process et al., (Bouffard
dynamics.
dynamics.
dynamics.
(Bouffard
(Bouffard
A commonet form
et
et al.,
al., 2012).
al., 2012).
2012).
of ADMC is one in which adaptation
Work
Work
2011 and such
suchOsa as that
as that
that
et al., of Landau
of 2001)
Landau showsand team
and that
teamadaptive(Landau
(Landaucontrol et al.,
et al.,
al., A common form of ADMC is one
Work
2011 such
and as of Landau and team (Landau et A
is common
used to form
form of
calculate of ADMC
parameters is
is one of inthewhich
in DMCadaptation
which adaptation
controller
2011
2011 and Osa
has gained
and Osa
much
Osa
et
et
al.,
al., 2001)
et ground
al., 2001)
2001)
shows
shows
that
that adaptive
showscontrol
in flight that adaptive
systems and
adaptive
control
has A
control
control is
is
common
used
used
such as to
to
the calculate
calculate
prediction
ADMC
parameters
parameters
or control
one of
of
in
the
the
horizon,
which
DMC
DMC
adaptation
controller
controller
depending on
has
has
becomegained
gained much ground
muchofground
a topic ground in flight
ininflight
interestin flight control
control
casescontrol
wheresystemssystems
systems and has
has is
and has
plant dynamics used
such as tothecalculate
prediction parameters
or control ofhorizon,
the DMC controller
depending on
has
becomegaineda much
topic of interest in cases where plant and
dynamics such
the
such as
as the
estimated
the prediction
real-time
prediction or
or control
system
control horizon,
dynamics.
horizon, Independing
the
dependingwork onof
on
become
become a topic
or disturbances
a topic are of interest
of interest
unknown in or
in cases
cases whereModel
varying.
where plant predictive
plant dynamics the
dynamics the estimated
estimated real-time
real-time system
system dynamics.
dynamics. In
In the
the work
work of
or
or disturbances
disturbances
control (MPC) are
are
is an unknown
unknown
optimal or
or varying.
varying.
control techniqueModel
Model predictive
predictive
employing
Klopot,
the
Klopot,
this
estimated
this
is
is
achieved
real-time
achieved
by
system
by
using
using
linear
dynamics.
linear
spline
In the
spline work of
interpola-
interpola-of
or disturbances
control (MPC) areanunknown
is optimal or varying.
control techniqueModel employing
predictive tion, Klopot,
Klopot, for this
some
this is
is achieved
nonlinear
achieved by using
hydraulic
by using linear
plantspline
linear (Klopot
spline interpola-
et al.,
interpola-
control
an
control (MPC)
internal
(MPC) modelis an tooptimal
predict
is antooptimal control
system technique
behaviour employing
in some tion,
tion, for some nonlinear hydraulic plant (Klopot et al.,
an
an internal
internal
finite model
model
time horizon to predictcontrol
predict
(Abdolhosseini system
system
technique
behaviour
et behaviour
al., 2012 and
employing
in some
in some
Kim tion,
2015). for
2015).for
High
High
some
some nonlinear
quality
nonlinear
quality
system
system
hydraulic
performance
hydraulic
performance
plant
plant is (Klopot
archieved
is(Klopot
archieved
et
et al.,
for
al.,
for
an internal
finite time model
horizon to predict
(Abdolhosseini system et behaviour
al., 2012 in
and some
Kim 2015).
process
2015). High
control
High quality
by
quality system
updating
system performance
the parameters;
performance is
is archieved
suppression
archieved for
for
finite time

finite time horizon (Abdolhosseini
(Abdolhosseini et et al.,
al., 2012
2012 and and Kim process control by updating the parameters; suppression
This work horizon
is based on the research supported in part byKim the process
and
process control
scaling
control by
factor,
by updating
of the
updating the
DMC
the parameters;
(Posada
parameters; et suppression
al., 2008).
suppression
 This and scaling factor, of the DMC (Posada et al., 2008).
 This work is
is based on
on the
the ofresearch supportedfor thein part by
by the and scaling factor, of the
Another realisation
factor, of the DMC
ofADMC (Posada
is to update
(Posadathe et
etDMCal.,
al., 2008).
model
National
 Research
work Foundation
based South Africa
research supported ingrant,
part Uniquethe
This work
National is based on the ofresearch
No.Research
107025. Foundation
supportedtheingrant, part by the and scaling
Another realisation of ADMC DMC
is to update the DMC 2008).
model
Grant Foundation of South
South Africa
Africa for for the grant, Unique Another
Another realisation of ADMC is to update the DMC model
realisation of ADMC is to update the DMC
National Research Unique
National
Grant
Grant No.
Research
No. 107025.
107025.
Foundation of South Africa for the grant, Unique model
Grant No. 107025.
Copyright
2405-8963 ©© 2017
2017, IFAC 157 Hosting by Elsevier Ltd. All rights reserved.
IFAC (International Federation of Automatic Control)
Copyright
Copyright
Peer review© 2017
2017 IFAC
© under IFAC
responsibility of International Federation of 157
157 Control.
Automatic
Copyright © 2017 IFAC 157
10.1016/j.ifacol.2017.12.029
CCA 2017
Johannesburg, South Africa
December 7-8, 2017
158 Piwai N. Chikasha et al. / IFAC PapersOnLine 50-2 (2017) 157–162

as the system moves from one operating point to another.


This has been investigated for a distillation column (Maiti
et al., 1995) and also for a turbine system (Lee et al, 2003).
Another realisation is to have several models of the system,
for different points, then, based on system measurements,
use interpolation to find the best model for a particular
operating point. This has been successfully implemented
for process control, (Chen et al., 2009 and Demircan et al.,
1999). Other forms of ADMC have been implemented and
are in most ways, extensions of the above stated. Extra
caution must however be taken with ADMC because a
variable prediction model typically results in poor system
performance, especially for low order systems, (Demircan
et al., 1999) due to the switching. It is therefore common Fig. 1. Quadrotor inertial and body frames
practice to set up ADMC such that all models continue to
calculate the dynamic matrix although only the activated equation (1) and equation (2) represent the resultant ana-
model is considered for calculating control action at each lytical model in terms of linear and angular accelerations
sample time. This in turn, however, raises computational respectively:
cost. 
 u1
Since the majority of the work done on ADMC does not 
 ẍ = −(cψsθcφ + sψsφ)
 um1
take computational expense and implementation (espe-
ÿ = −(sψsθcφ − cψsφ) (1)
cially for such systems as multi-rotors) into account, this 
 m

 u1
work looks into ADMC from theory to implementation. As z̈ = −(cθcφ) + g
such, with the intention to improve controller efficiency, m
this work proposes the use of a single step response model and
for different disturbance influence, hence limiting switch-  
  sφ cφ
ing. This follows several simulations to analyse how model φ̈ 0 φ̇cφtθ + θ̇ φ̇sφcθ + θ̇  
 c2 θ c2 θ  p
parameters are affected by disturbance. This is supported  θ̈  = 
0 −φ̇sφ −φ̇cφ

· q
by a Supervisor which monitors system behaviour and then  cφ tθ sφ tθ  r
ψ̈ 0 φ̇ + φ̇sφ −φ̇ + θ̇cφ
decides when to switch to or from the disturbance step
response model. The expected profits of using a super-  cθ cθ cθ cθ (2)
1 sφtθ cφtθ  
visor over interpolation are code simplicity (hence more
0 cφ −sφ ṗ
efficiency) and, since a RLS estimator already exists, which + 
estimates model parameters in real time, the RLS output  sφ cφ  · q̇
0 ṙ
can conveniently and readily be used by the supervisor in cθ cθ
decision making. The mathematical model is presented in
Section 2 while Section 3 explores the derivation and im- where u1 is total thrust force, g is acceleration due to
plementation of ADMC and Section 4 presents simulation gravity, s, c and t are trigonometric functions sine, cosine
results. Section 5 concludes. and tangent respectively. φ, θ and ψ are the roll, pitch
and yaw attitude angles of the quadrotor (Euler angles),
2. MATHEMATICAL MODEL respectively and x, y and z represent 3 the dimensional
position of the quadrotor, all expressed in the reference
(stationary frame) i.e. Earth frame. The roll, pitch and
2.1 Analytical Model
yaw rotational angular velocities are denoted as p, q and
r for roll, pitch and yaw respectively and expressed in the
AMPC is based on an internal model, which is updated in quadrotor frame.
real-time according to adaptive laws and is used to predict
system output. The quadrotor is modelled analytically,
based on dynamic and kinematic equations (Newton-Euler 2.2 System Identification
formalisation) as in (Balas, 2007, Ahmed et al., 2015 and
Abaunza et al., 2016). This considers the quadrotor as the System identification is necessary for this work because
moving (body) frame (xB − yB − zB ) and the earth as the this results in a relatively reliable model, representing ac-
inertial frame (xE − yE − zE ) as summarised by Fig. 1 and curate system dynamics. The identified ARX model is used
for this work, according to the parameters given in table 1. to determine the regressors for parameter estimation. This
parameter estimation, as stated earlier, is based on the Re-
Table 1. Model parameters cursive Least Squares (RLS) method, a method well known
Parameter Unit Symbol Value
for convenient implementation with the discrete-time ARX
Mass kg m 0.55
model type (Landau et al., 2011). The analytical model
Rotor wheelbase m l 0.23 available is therefore run in MATLAB for step input and
Drag factor − d 7.5 ∗ 10−3 the resultant input-output data is collected and stored.
Thrust factor − b 3.13 ∗ 10−3 Prior to this simulation, the model is stabilised by PID
control using Simulink PID Tuner, because DMC works
The notation ωi denotes angular velocity of the ith motor when the internal step response model is stable. Using
and τM i denotes torque produced by the ith motor. The the System Identification tool in MATLAB, the collected

158
CCA 2017
Johannesburg, South Africa
December 7-8, 2017 Piwai N. Chikasha et al. / IFAC PapersOnLine 50-2 (2017) 157–162 159

RLS principle is used based on the Regressor Form as


in (8) (Landau et al., 2012 and Osa et al., 2001) where
ϕT = [ϕ1 , ϕ2 · · · ϕn ]T - regressor functions - and θ =
[θ1 , θ2 · · · θn ] - model parameters to be estimated.

y(i) = ϕT (i)θ (8)


Fig. 2. ARX model structure The RLS parameter estimation algorithm can be summa-
rized by the equations (9), (10)and (11), (Landau et al.,
2012 and Guo et al., 1993):

θ̂(t + 1) = θ̂(t) + P (t + 1)ϕ(t)ε(t + 1) (9)


where
P (t)ϕ(t)ϕT (t)P (t)
P (t + 1) = P (t) − (10)
1 + ϕT (t)P (t)ϕ(t)
Fig. 3. Direct adaptive control scheme and
data is processed for ARX model identification and the ε(t + 1) = y(t + 1) − θ̂T (t)ϕ(t) (11)
identified ARX model is optimised using the Response
The solution for the estimated parameters comes from
Optimisation tool to minimise error. The discrete-time
minimising a cost function, which is expressed in terms
ARX model, is of the form:
of the Forgetting Factor (λ) (Guo et al., 1993):

A(z)y(t) = B(z)u(t) + e(t) (3) k


−1 1  k−i
where A(z) and B(z) are backward shift operator (z ) V (θ̂, k) = λ [y(k) − ϕT (k)θ̂(k)]2 (12)
polynomials (considering zero input delay for simplifica- 2 i=1
tion) as follows:
The idea is that when λ is close to 1, the result is good
A(z) = 1 + a1 z −1 + a2 z −2 + · · · + ana z na (4) convergence and small variances of the estimates; while
B(z) = b1 z −1 + b2 z −2 + · · · + bnb z nb (5) when λ is closer to zero, the result is good tracking (quick
forgetting of old data). The parameters of adaptive control
with the backward shift operator such that z −n u(k) = that are tuned are the Forgetting Factor and Starting
u(k − n) (Bhuvaneswari et al., 2012 and Andersson et (Initial) Values. P(0) represents some estimate of the
al., 1998). The ARX model can presented by such an covariance matrix of the initial parameters. Small P(0)
illustration as Fig. 2 where e represents random zero-mean results in small changes of the estimated parameters. On
noise. the other hand, large P(0) results in quick a rapid move
The system identification and optimisation processes pro- from initial parameters to the estimates (Soderstrom et
duce a second order ARX model: al., 1989). Typically, for the practical case:
θ̂(0) = 0 (13)
A(z) = 1 − 1.811z −1 + 0.8147z −2 (6) and
B(z) = 0.0044z −1 (7) P (0) = ρI (14)

from the recorded input-output data. This model is suc- where ρ is a constant and I is a unitary identity matrix.
cessfully verified by simulating ramp reference input then Simulations are run to determine suitable parameters
comparing the ARX response against that of the initial for tuning the estimator. The RLS estimator requires
analytical model. persistent excitation, i.e. input signal capable of exposing
the characteristics of the system, in this case, a pulse width
3. AMPC DERIVATION AND IMPLEMENTATION Modulated signal. After several simulations, the estimator
is tuned to λ = 0.97, ρ = 1e6 and initial estimates = 1
3.1 Adaptive mechanism for the poles (a1 and a2 parameters). This setting brings
about satisfactory convergence as shown in Fig. 4 when a
step altitude increase of 1 meter is input at hover.
Fig. 3 shows the general direct adaptive control scheme.
To quickly demonstrate the effect of the tuning parame-
The signal u represents control action and y represents ters, the simulation with ρ = 1e4 is run, which is expected
the system output. Using these two signals, adaptive to give slower convergence, as is the case shown in Fig. 5.
laws estimate parameters of the system model (within
the parameter estimator block) in real-time, the model The behaviour of the parameters of the model is analysed
for which control is designed by updating the controller for varying dynamics i.e. with different disturbances. It
parameters. In this way, the reason adaptivity is needed is observed that, while the poles of the system vary
is that adaptivity tracks changes in system dynamics in magnitude as system dynamics change, this variation
(resulting from wind disturbance or payload attachment) is consistent even for low magnitude disturbance input.
and allows the controller to adjust for the changes. The One reason for this is the low order of the system. This

159
CCA 2017
Johannesburg, South Africa
December 7-8, 2017
160 Piwai N. Chikasha et al. / IFAC PapersOnLine 50-2 (2017) 157–162

where G is the dynamic matrix, and is derived from a


step model of the system due to step input (su ) and (17)
is in fact summary to (19) and also, (17) simplifies to (18)
(Lopez-Guede et al., 2013 and Rani et al., 2014).

ŷ(k + 1) = y p (k + 1) + G∆u(k) (18)

   
ŷ(k + 1|k) f (k + 1|k)
Fig. 4. RLS estimation λ = 0.97, ρ = 1e6 ŷ(k + 2|k) f (k + 2|k)
 ..  = .. 
 .   . 
ŷ(k + p|k) f (k + p|k)
su (1) 0 ··· 0 
 u .. .. 
s (2) su (1) . . 
+ . .. ·
 . ..
. . . 0 
su (p) su (p − 1) · · · su (1)
  sd (1)
∆u(k|k)
 ∆u(k + 1|k)   sd (2)
· + 

· ∆d(k|k)
Fig. 5. RLS estimation λ = 0.97, ρ = 1e4  .
..   .. 
. 
makes the use of a Supervisor for adaptation profitable as ∆u(k + p − 1|k) sd (p)
explained in Section 4.  
1
3.2 Model Predictive Control - DMC  1 
+ .. 

.
DMC utilises two main components, i.e. the model and 1 · (y(k) − f (k|k))
the optimisation solver to minimise such a cost function (19)
as (15), (k is the sampling instant). p p p p
The term y where (y (k + 1) = [y (k + 1), y (k +
2), · · · , y p (k + p)]T ) represents the past free response term
p
 c−1
 and the present feed-forward and feedback terms. ∆u
J= (y ref (k + i) − ŷ(k + i))2 + r ∆u(k + i)2 (15) denotes change in control action. The term G∆u where
i=1 i=0 G is of p × c dimension represents the part due to the
• y ref
is the reference trajectory. future control moves. From here, the sequence of computed
• y sp is the set-point. control action is derived from (20)
• ŷ(k) is the predicted output at instant k. ∆u = [GT G + rI]−1 GT (y sp − y p )
• ∆u(k) is the control move at instant k and ∆u(k) =      
H e
(20)
u(k) − u(k − 1). = He
• p is the prediction horizon, c is the control horizon.
• r is a weighting factor. The control horizon c is selected and held constant early
Signal y ref , which is typically an exponential rise, is the in the controller design while tuning other controller
reference trajectory to move from measured output to the settings. Keeping c small means fewer variables need to
set-point. The expression for y ref can be manipulated to be calculated at each control interval. This in turn, allows
tune the rate at which the output approaches the set-point, faster computation. Typically, tuning the model predictive
by introducing the scaling factor α (Lopez-Guede et al., controller is not standardised but rather more intuitive.
2013 and Rani et al., 2014):
4. SIMULATION RESULTS
y ref (t + k) = αy ref (t + k − 1) + (1 − α)y sp (t + k) (16)

α is a value between zero and one and technically (from It was seen in Section 3.1 that the model parame-
the expression of y ref ), should result in aggressive response ters change in magnitude with varying system dynamics.
when closer to zero and sluggish response when closer to ADMC is therefore realised by monitoring parameter val-
one. The DMC Prediction of output can be written as (17) ues using the supervisor and then switching models based
on value of the parameters (poles in this case, as the system
zeros remain relatively unchanged) when disturbance acts
ŷ(k + 1) = Tf (k) + sd ∆d(k) + (y(k) − f (k|k)) on the system. This is illustrated by Fig. 6
        
=prediction =past =present Simulations are run to investigate the quality of control
(17)
+ G∆u(k) provided by ADMC (with a 0.025 seconds sampling time)
   leading to a conclusion as to how much ADMC improves
=future quadrotor control. Two aspects are tested, reference track-
ing and disturbance rejection. The ADMC is compared

160
CCA 2017
Johannesburg, South Africa
December 7-8, 2017 Piwai N. Chikasha et al. / IFAC PapersOnLine 50-2 (2017) 157–162 161

Fig. 6. General supervisory scheme

Fig. 9. PID, DMC and ADMC response - step disturbance

Fig. 7. PID and ADMC response - ramp input

Fig. 10. PID and ADMC noise response


The DMC controller is more rapid in disturbance compen-
sation than PID, but not as rapid as the ADMC controller.
Overall, as expected, ADMC provides more rapid and
more precise reference tracking and disturbance rejection.
Considering a more practical case, with measurement noise
Fig. 8. PID and ADMC response - sinusoidal input in sensor data, ADMC outperforms the PID again, as
expected. Simulation shows that the PID response is af-
against the PID controller introduced earlier and a DMC fected more by noise than ADMC, as shown in Fig. 10
only controller. The parameters used for the initial tuning where vibrations occur with greater amplitude for PID.
of the predictive controller are p = 5 and c = 5. Prior One reason for this is that the derivative action of the PID
simulations show that a shorter prediction horizon, in this gains high influence when the measured output fluctuates
case, leads to better performance, which is why p is set to rapidly as this translates to a steep slope. This problem
a rather low value of 5. This is not entirely unusual, Lopez however, can be resolved by the use of a low-pass filter.
and team make a solid conclusion in their work that, in Another desirable feature of ADMC is that once set up,
reality, a low and intermediate value of p results in a better ADMC is easy to tune.
performance of DMC (Lopez-Guede et al., 2013).
Implementation of ADMC however, cannot be done with-
The first investigation is with respect to reference tracking out considering sampling time of the controller. Effects of
without disturbance (therefore with deactivated adapta- sampling time depend on the capacity of the computer
tion in ADMC) and is summarised by Fig. 7 and Fig. 8 used. Investigations carried out in this work (using an i5
for two different reference trajectories. processor and 4 Gigabytes of RAM) with 0.1 and 0.0001
It can be concluded that ADMC archives superior refer- seconds sampling times reveal that too large a sampling
ence tracking, especially even as the reference trajectory interval prevents adequate capture of the plant dynamics
becomes more complex. As for disturbance rejection, the leading to instability, while too small a sampling interval
three controllers i.e. PID, DMC and ADMC are investi- fails to allow for the full computation of the algorithm,
gated for step disturbance, which can be modelled as a again leading to poor performance.
change in sensor output or as a force, as in this work.
While at hover, disturbance is applied to the system as 5. CONCLUSION
illustrated by Fig. 9.
ADMC is capable of providing the expected improved
quadrotor control. In this context, ADMC has been vali-

161
CCA 2017
Johannesburg, South Africa
December 7-8, 2017
162 Piwai N. Chikasha et al. / IFAC PapersOnLine 50-2 (2017) 157–162

dated with respect to reference tracking and disturbance Guo L., Ljung L., and Priouret P. (1993). Perfomance
rejection, where in both cases, ADMC surpasses the classi- analysis of the Forgetting Factor RLS algorithm. In-
cal PID controller. Tuning the ADMC is quite an intuitive ternational Journal of Adaptive Control and Signal pro-
process, one which demands extensive simulation. When cessing, volume 7, 525–537.
tuned well however, the ADMC controller satisfies the two Kim B.A., Lee S.H., Lee Y.O. and Chung C.C. (2012).
main objectives i.e. adaptation to varying plant dynamics Comparative study of approximate, proximate, and
and optimal reference tracking. While DMC is the oldest fast model predictive control with applications to au-
form of MPC, DMC remains a powerful control tool and tonomous vehicles. 12th International Conference on
further research into implementing or extending DMC for Control, Automation and Systems, 479–484.
quadrotor control is worthwhile. Klopot T. and Skupin P. (2015). Adaptive dynamic matrix
control with interpolated parameters. 20th International
REFERENCES Conference on Methods and Models in Automation and
Robotics (MMAR), 683–688.
Abaunza H., Castillo P., Lozano R., and Victorino A. Kunz K., Huck S.M. and Summers T.H. (2013). Fast
(2016). Quadrotor aerial manipulator based on dual Model Predictive Control of miniature helicopters. Eu-
quaternions. International Conference on Unmanned ropean Control Conference, 1377–1382.
Aircraft Systems, 125–247. Landau I., Lozano D., Karimi A. and MSaad M. (2011).
Abdolhosseini M., Zhang Y.M. and Rabbath C.A. (2012). Adaptive Control. Springer, London.
An Efficient Model Predictive Control Scheme for an Lee K.Y. and Moon U.C. (2003). A boiler-turbine system
Unmanned Quadrotor Helicopter. J Intell Robot Syst, control using a fuzzy auto-regressive moving average
volume 70, 27-38. (FARMA) model. IEEE T. Energy Conver., volume 18,
Ahmed S.F., Kushsairy K, Bakar M.I.A., Hazry D. and 142–148.
Joyo M.K. (2015). Attitude stabilization of Quad- Li S., Li B. and Geng Q. (2014). Adaptive sliding mode
rotor (UAV) system using Fuzzy PID controller (an control for quadrotor helicopters. 33rd Chinese Control
experimental test). 2nd International Conference on Conference, 71–76.
Computing Technology and Information Management, Lopez-Guede J., Fernandez-Gauna B., Grana M. and
99–104. Oterino F. (2013) Model Predictive Control, Dynamic
Alexis K., Nikolakopoulos G. and Tzes A. (2014). On Matrix Control, Prediction Horizon. International Jour-
Trajectory Tracking Model Predictive Control of an Un- nal of Control Science and Engineering.
manned Quadrotor Helicopter subject to aerodynamic Maiti S.N. and Saraf D.N. and Kapoor N. (1995). Adaptive
disturbances. Asian Journal of Control volume 16, no. dynamic matrix control of a distillation column with
1, 209–224. closed-loop online identification. Journal of Process
Andersson L., Jonsson U., Johansson K.H. and Bengtsson Control, volume 5, 315–327.
J. (1998). A manual for system identification. Labo- Monte P.D. and Lohmann B. (2013). Position trajectory
ratory Exercises in System Identification. Department tracking of a quadrotor helicopter based on L1 adaptive
of Automatic Control, Lund Institute of Technology, control. European Control Conference, volume 18, 3346–
volume 118. 3353.
Balas C. (2007). Modelling and Linear Control of a Osa Y., Mabuchi T. and Uchikado S. (2001). Synthesis of
Quadrotor. MSc Thesis, Cranfield University, UK. discrete time adaptive flight control system using non-
Bhuvaneswari N.S., Praveena R. and Divya R. (2012). Sys- linear model matching. IEEE International Symposium
tem identification and modeling for interacting and non- on Industrial Electronics, volume 1, 58–63.
interacting tank systems using intelligent techniques. Posada J. and Sanjuan M. (2008). Intelligent adaptive
Easwari Engineering College, Chennai, Tamilnadu, In- dynamic matrix control. Proceedings of the 17th World
dia. Congress, The International Federation of Automatic
Bouffard P., Aswani A. and Tomlin C. (2012). Learning- Control, Seoul, Korea.
based model predictive control on a quadrotor: Onboard Rani L., Sivakumar D. and Rathikarani D. (2017) Dy-
implementation and experimental results. IEEE Inter- namic Matrix Controller Design for Performance Study
national Conference on Robotics and Automation, 79– of an Interacting Coupled Tank MIMO Process. AIP
284. Conference Proceedings, volume 1859.
Chen X., Li S., Zhai J. and Li Q. (2009). Expert System Rossiter J. A. (2003). Model-Based Predictive Control: A
Based Adaptive Dynamic Matrix Control for Ball Mill Practical Approach. CRC Press.
Grinding Circuit. Expert Syst. Appl., volume 36, 716– Schreier M. (2012) Modeling and adaptive control of a
723. quadrotor. IEEE International Conference on Mecha-
Cutler C.R., Ramaker B.L. (1979). Dynamic Matrix Con- tronics and Automation, 383–390.
trol - A Computer Control Algorithm. American Insti- Soderstrom T. and Stoica P. (1989). System Identification.
tute of Chemical Engineers (AIChE) National Meeting. Prentice Hall International.
Demircan M. Camurdan M.C. and Postlethwaite B.E. Wang C., Song B., Huang P. and Tang C. (2016). Trajec-
(1999). On-Line Learning Fuzzy Relational Model Based tory Tracking Control for Quadrotor Robot Subject to
Dynamic Matrix Control of an Openloop Unstable Pro- Payload Variation and Wind Gust Disturbance. J Intell
cess. Chemical Engineering Research and Design, vol- Robot Syst, volume 83, no. 2, 315–333.
ume 36, no. 5, 421–428.
Guiamba I.R.F. (2001). Adaptive dynamic matrix control
for a multivariable training plant. MSc Thesis

162

You might also like