Professional Documents
Culture Documents
u
c
c
=
c
c
=
e
e
J
dt
d
References: Adaptive control (2nd Edition); Karl Johan Astrom, Bjorn Wittenmark, Prentice Hall
MIT Rule
Can chose different cost functions
EX:
From cost function and MIT rule, control law
can be formed
<
=
>
=
=
=
0 , 1
0 , 0
0 , 1
) ( where
) (
) ( ) (
e
e
e
e sign
e sign
e
dt
d
e J
ou
o
u
u u
MIT Rule- Example of Adaptation
of feedforward gain
For system where is unknown.
Goal: Make it look like using plant
(note, plant model is scalar multiplied
by plant)
Choose cost function:
Write equation for error:
Calculate sensitivity derivative:
Apply MIT rule:
) (
) (
) (
s kG
s U
s Y
=
k
) (
) (
) (
s G k
s U
s Y
o
c
=
) ( ) ( s G k s G
o m
=
ou
o
u
u u
e
e
dt
d
e J = = ) (
2
1
) (
2
c o c c m m
U G k U kG U G kGU y y e = = = u
m
o
c
y
k
k
kGU
e
= =
ou
o
e y e y
k
k
dt
d
m m
o
u
= = '
block diagram of Adaptation of
feedforward gain using mit-rule
Adjustment Mechanism
y
model
u y
plant
u
c
Reference
Model
Plant
s
) ( ) ( s G k s G
o m
=
) ( ) ( s G k s G
p
=
-
+
e y
m
u =
Control Law:
gamma (g) = 1
Actual Kp = 2
Initial guessed Kp = 1
Simulation block diagram
Simulation results of MRAC using
MIT Rule Adaptation of
feedforward gain
Error between Estimated and Actual value of Kp
Simulation results for MRAC
using MIT- rule
Error between Model and Plant
MRAC of Pendulum
( ) T d mgd c J
c 1
sin = + + u u u
d
2
d
1
d
c
T
c
mgd cs Js
d
s T
s
+ +
=
2
1
) (
) ( u
77 . 10 0389 . 0
89 . 1
) (
) (
2
+ +
=
s s s T
s u
As an exercise in the use of MRAC, the MIT rule (explained in the theory section) was
applied to a driven pendulum system. The system contained a vertically oreinted bar whose
pivot point was attached to an encoder, so that the angle and angular velocity could be
measured. To the end of the bar, a DC motor and propellor were affixed. When voltage was
applied to the motor, the propellor spin and pull the bar up. The goal was to command the
bar to a specified angle. A diagram of the system is given below:
Newton's laws and conservation of angular
momentum were used to derrive the equations of
motion. The equations and resulting transfer function
for the linearized system are given below:
MRAC of Pendulum
Controller will take form
Controller
Model
Adjustment
Mechanism
Controller Parameters
y
model
u y
plant
u
c
77 . 10 0389 . 0
89 . 1
2
+ + s s
Reference:
http://www.pages.drexel.edu/~kws23/tutorials/MRAC/simulation/simulation.html
MRAC of Pendulum
Following process as before, write equation for error, cost function, and
update rule
model plant
y y e =
ou
o
ou
o
u e
e
J
dt
d
= =
) (
2
1
) (
2
u u e J =
It is then assumed that the controller has both an adaptive feedforward (Theta1) and an adaptive
feedback (Theta2) gain. To derive expressions for the sensitivity derivatives associated with these
parameters, the error function must be restated to invlude Theta1 and Theta2. The equation for the
error is first rewritten as the transfer function of the plant and model multiplied by their respective
inputs. The input Uc is not a function of either of the adaptive parameters, and therefore can be
ginored for now. However, the input U can be rewritten using the feedforward and feedback gains.
This can be used to derrive an equation for Yplant.
MRAC of Pendulum
Assuming controller takes the form:
( )
c plant
plant c p plant
c m p model plant
plant c
u
s s
y
y u
s s
u G y
u G u G y y e
y u u
2
2
1
2 1
2
2 1
89 . 1 77 . 10 0389 . 0
89 . 1
77 . 10 0389 . 0
89 . 1
u
u
u u
u u
+ + +
=
|
.
|
\
|
+ +
= =
= =
=
( )
plant
c
c
c m c
y
s s
u
s s
e
u
s s
e
u G u
s s
e
2
2
1
2
2
2
1
2
2
2
2
1
2
2
1
89 . 1 77 . 10 0389 . 0
89 . 1
89 . 1 77 . 10 0389 . 0
89 . 1
89 . 1 77 . 10 0389 . 0
89 . 1
89 . 1 77 . 10 0389 . 0
89 . 1
u
u
u
u
u
u u
u
u
+ + +
=
+ + +
=
c
c
+ + +
=
c
c
+ + +
=
The error can now be written with the adaptive terms included. Taking the partial derivative of the error with respect to
Theta1 and Theta2 gives the sensitivity derivatives. Remember that Uc does not include either parameter, and therefore is
inconsequential when evaluating the derivative
plant
m m
m m
c
m m
m m
m m
y
a s a s
a s a e
u
a s a s
a s a e
a s a s s s
0 1
2
0 1
2
0 1
2
0 1
1
0 1
2
2
2
89 . 1 77 . 10 0389 . 0
+ +
+
=
c
c
+ +
+
=
c
c
+ + ~ + + +
u
u
u
e y
a s a s
a s a
e
e
dt
d
e u
a s a s
a s a
e
e
dt
d
plant
m m
m m
c
m m
m m
|
|
.
|
\
|
+ +
+
=
c
c
=
|
|
.
|
\
|
+ +
+
=
c
c
=
0 1
2
0 1
2
2
0 1
2
0 1
1
1
u
From MIT rule, update rules are then:
The sensitivity derivatives obtained contain the parameters from the plant. The premise of
design with MRAC assumes that the plant characteristics are not absolutely known. This
seemingly places the design process at a dead end. However, the goal was to make the plant
approach the model. If the model is close to the actual plant, the model characteristics can be
substituted for the plant characteristics, giving the following sensitivity derivatives
MRAC of Pendulum
Block diagram
y
model
e
y
plant
u
c
1
Reference Model
Plant
s
77 . 10 0389 . 0
89 . 1
2
+ + s s
+
-
m m
m m
a s a s
a s a
0 1
2
0 1
+ +
+
m m
m m
a s a s
a s a
0 1
2
0 1
+ +
+
m m
m
a s a s
b
0 1
2
+ +
s
-
+
2
Simulation block diagram :
am
s+am
am
s+am
-gamma
s
gamma
s
Step
Saturati on
omega^2
s+am
Reference Model
180/pi
Radi ans
to Degrees
4.41
s +.039s+10.77
2
Pl ant
2/26
Degrees
to Vol ts
35
Degrees
y m
Error
Theta2
Theta1
y
The controller designed above was implemented. The Simulink block diagram is shown below, along with the
response to a step command of 35 degrees. The transfer function implemented does not exactly mach the transfer
function stated earlier. There are also several gains added around the plant. This is because the system stated earlier
assumed an input of a commanded angle. Here, the plant must receive a voltage command
Reference:
http://www.pages.drexel.edu/~kws23/tutorials/MRAC/simulation/simulation.html
Simulation results
Simulation with small gamma = UNSTABLE! The plant response obviously doesnt
match the reference model. In fact, the plant almost goes unstable. This response is
largely due to the near instability of the open loop system. Tuning of gamma and
changing the reference model did not alleviate this problem. In an unconventional
attempt to kill the oscillations, proportional and derivative control was applied across
the plant.
0 200 400 600 800 1000 1200
-100
-50
0
50
100
150
ym
g=.0001
am
s+am
am
s+am
-gamma
s
gamma
s
Step
Saturati on
omega^2
s+am
Reference Model
180/pi
Radi ans
to Degrees
4.41
s +.039s+10.77
2
Pl ant
1
P
du/dt
2/26
Degrees
to Vol ts
35
Degrees
1.5
D
y m
Error
Theta2
Theta1
y
Solution: Add PD feedback
Reference:
http://www.pages.drexel.edu/~kws23/tutorials/MRAC/simulation/simulation.html
Simulation results with varying
gammas
The reference model was chosen to have a settling time of 3 seconds and a damping ratio of
.707, which is an industry accepted standard. The plot shows the response for several different
values of gamma. As can be seen, when the value of gamma is increased, the system responds
much faster, but threatens to become unstable. A smaller value of gamma leads to longer
adaptation times, but a less volatile response.
0 500 1000 1500 2000 2500
0
5
10
15
20
25
30
35
40
45
ym
g=.01
g=.001
g=.0001
707 .
sec 3
: such that Designed
56 . 3 67 . 2
56 . 3
2
=
=
+ +
=
,
s
m
T
s s
y
Experimental Results
of mrac of pendulam
PD feedback necessary to stabilize system.
Deadzone necessary to prevent updating when plant approached model.
Often went unstable (attributed to inherent instability in system i.e. little
damping).
Much tuning to get acceptable response.
Reference:
http://www.pages.drexel.edu/~kws23/tutorials/MRAC/simulation/simulation.html
Design of MRAC using LYAPUNOV
THEORY
Let the process is described by
The desired response is given by
Where am > 0 and reference signal is bounded. The controller is
Introduce the error
For minimizing error, we take differential of e, such that
The error goes to zero if the parameters are equal to
u b
y
a
dt
dy
+ =
u b
y
a
dt
dy
c m
m
m
m
+ =
y
u u c u u 2 1
=
y y
e
m
=
( ) ( )
u b b
y
a a b e a
dt
de
c m m m
+ + =
u u 1 2
b
b
m
o
= =
u u
1 1
b
a
a m
|
.
|
\
|
= =
u u
0
2 2
&
References: Adaptive control (2nd Edition); Karl Johan Astrom, Bjorn Wittenmark, Prentice Hall
Design of MRAC using LYAPUNOV
THEORY
Now a parameter adjustment mechanism is constructed that will drive the
parameters 1; 2 to there desired values. For this purpose, let us assume that
> 0 and introduce the following quadratic function
This function is zero when e is zero and the controller parameters are equal to
correct values.
For function to be a Lyapunov the derivative must be negative. The derivative
is
b
( )
( ) ( )
|
|
|
.
|
\
|
+ + + =
2
1
2
2
1 1
2
2
1
2 1
, ,
b b
b
a a b
e
e V
m m
b
u
u u u
dt
de
( ) ( )
dt
d
b b
dt
d
a a
b
dt
de
e
dt
dV
m m
u
u
u
u
1
1
1 2
2
1
+
+ =
+
References: Adaptive control (2nd Edition); Karl Johan Astrom, Bjorn Wittenmark, Prentice Hall
Design of MRAC using LYAPUNOV
THEORY
If the parameters are updated as
(
)
( )( )
e
u
dt
d
b b
ye
dt
d
a a
b
e
a
dt
dV
c
m
m m
u
u
u
u
+ +
|
.
|
\
|
+ = +
1
1
1 2
2
1
2
e u
dt
d
c
u
=
1
ye
dt
d
u
=
2
And we get
e a
dt
dV
m
2
=
The derivative of V is thus negative semidefnite but not negative definite. This implies
that V(t) V(0) and that e,
1
and
2
must be bounded. This implies that y = e + y
m
also is bounded. Since u
c
, e, and y are bounded, it follows is bounded. Hence
dV/dt is uniformly continous.
V
..
V
..
Block diagram of MRAC using
LYAPUNOV THEORY
References: Adaptive control (2nd Edition); Karl Johan Astrom, Bjorn Wittenmark, Prentice
Hall
MULTIVARIABLE SYSTEM
A continuous stirred tank reactor (CSTR) is used to convert a reactant (A) to a product (B). The
reaction is liquid phase, first order and exothermic. Perfect mixing is assumed. A cooling jacket
surrounds the reactor to remove the heat of reaction. In this system variables of interest (from a
control engineers perspective) could be, for example, product composition and temperature of the
reacting mass. There will therefore be a composition control loop as well as a temperature control
loop. Feed to the reactor is often used to manipulate product composition while temperature is
controlled by adding (removing) energy via heating (cooling) coils or jackets. This basic control
configuration is demonstrated in Fig (1). 'TC' represents a temperature controller, the mv for this
loop being coolant flowrate to the jacket. 'CC' represents the composition controller, the mv being
reactant feedrate.
References: Multivariable Control: An introduction, Dr M.J. Willis: Department of Chemical and
Process Engineering, University of Newcastle upon Tyne
Input-Output
Multivariable System
Models:
Here G11(s) is a symbol used to represent the forward path dynamics between mv1 and cv1, while
G22(s) describes how cv2 responds after a change in mv2. The interaction effects are modelled
using transfer functions G21(s) and G12(s). G21(s) describes how cv2 changes with respect to a
change in mv1 while G12(s) describes how cv1 changes with respect to a change in mv2.
For the CSTR shown in above figure mv1 could be the coolant flowrate, while mv2 could be the
flowrate of the reactant. The output cv1 may be the reactor temperature while the output cv2
would be the effluent concentration.
The mathematical model written in matrix-vector notation:
on a loop by loop basis, the outputs of the system model are related to the inputs as follows,
Loop 1: cv
1
= G
11
mv1 + G
12
mv2 ; Loop 2: cv
2
= G
21
mv1 + G
22
mv2 or cv = G mv
where cv = [cv1, cv1]
T
mv = [mv1 mv2 ]
T
G=
(
G G
G G
22 21
12 11
and, G=
References:
Multivariable Control:
An introduction, Dr M.J.
Willis: Department of
Chemical and Process
Engineering, University
of Newcastle upon Tyne
Adaptive Control for
Multivariable Plants
Decentralized Adaptive Control:
Let us consider the MIMO plant model
Where y R
N
, u R
N
and H(s) C
N*N
is the plant transfer matrix that is assumed to be proper.
Where hij , the elements of H(s), are transfer function.
For some different hij(s) and qij(s). If the MIMO plant model is such that the interconnecting or
coupling transfer functions hij(s);qij(s). (I j) are stable and small in some sense, then they can be treated
as modelling error terms in the control design. This means that instead of designing an adaptive controller
for the MIMO plant (3), we can design N adaptive controllers for N SISO plant models of the form
=
References: ROBUST ADAPTIVE CONTROL by Petros A. Ioannou & Jing Sun, PTR Prentice -Hall(1996)
MRAC FOR MULTIVARIABLE
Consider the MIMO plant
y=G(s)u (1)
where y R
N
, u R
N
and G(s) is N*N transfer matrix. The reference model to be matched by
the closed-loop plant is given by
y
m
=W
m
(s)r (2)
where y
m
,r R
N
Because G(s) is vector transfer function. The following Lemma is used to
define the counterpart of the high frequency gain and relative degree for MIMO plants.
Lemma (1) : For any N*N strictly proper rational full rank transfer ma-
References: ROBUST ADAPTIVE CONTROL by Petros A. Ioannou & Jing Sun, PTR Prentice -Hall(1996)
To meet the control objective we make the following assumptions about
the plant:
A1. G(s) is strictly proper, has full rank and a known MLI matrix (s)
A2. All zeros of G(s) are stable.
A3. A matrix Sp that satisfies KpSp = (KpSp)T > 0 is known.
Furthermore we assume that the transfer matrix Wm(s) of the reference model is
designed to satisfy the following assumptions:
Tao, G. and P.A. Ioannou, Robust Model Reference Adaptive Control for Multivariable Plants," International Journal of
Adaptive Control and Signal Processing, Vol. 2, no. 3, pp. 217-248, 1988.
DESIGN of MRAC for
Multivariable system
We can design a MRAC scheme for the plant (1) by using the certainty equivalence
approach by assuming that all the parameters of G(s) are known and propose the control
law
vo
(s) is a monic Hurwitz polynomial of degree
.
A
Kp
1
The closed-loop plant transfer matrix from y to r is equal to W
m
(s) provided
3
*
= and 1*; 2*
are chosen to satisfy the matching equation
(3)
(4)
Tao, G. and P.A. Ioannou, Robust Model Reference Adaptive Control for Multivariable Plants," International Journal of
Adaptive Control and Signal Processing, Vol. 2, no. 3, pp. 217-248, 1988.
CONTINUE..
The same approach as in the SISO case can be used to show that the control law with i*; i=
1; 2; 3 as chosen above guarantees that all closed-loop signals are bounded and the elements
of the tracking error e1 = y-ym converge to zero exponentially fast.
Because the parameters of G(s) are unknown, instead of (3) we use the control law
u =
T
(t) (5)
where (t) is the on-line estimate of the matrix * to be generated by an adaptive law.
From the plant and matching equations (1), (4) we obtain
(6)
m
Let dm be the maximum degree of (s) and choose a Hurwitz polynomial f(s) of degree d
m.
Filtering
each side of (6) with 1=f(s) we obtain
(7)
Refrence:Tao, G. and P.A. Ioannou,
Robust Model Reference Adaptive
Control for Multivariable Plants,"
International Journal of Adaptive
Control and Signal Processing, Vol. 2,
no. 3, pp. 217-248, 1988.
CONTINUE..
Generated the estimated value of z,
and the estimation error
Refrence:Tao, G. and P.A. Ioannou, Robust Model Reference Adaptive Control for Multivariable Plants," International
Journal of Adaptive Control and Signal Processing, Vol. 2, no. 3, pp. 217-248, 1988.
Multivariable nonlinear model
reference control of cement
mills
The dynamical model of the system is described by three coupled and nonlinear differential
equations as given in (1)(3). The states of the system are characterized by the mill load denoted
by z (in tons), the product flow rate denoted by yf (in tons/h) and the tailings flow rate denoted by
yr (in tons/h). On the other hand, w is the output flow rate of the mill and d denotes the relative
hardness of the material inside the mill with respect to the nominal one, which is unity. The
system has two control inputs, denoted by u (tons/h), the feed flow rate and, v (rpm), the classifier
speed
( )
y
u
d z
z
r
+ + =
-
,
( )
( ) ( ) d z
d v z y
y
T
f
f f
,
, ,
1
o
+ =
-
( ) ( ) d z d v z
y y
T
r
r
r
, , , o + =
-
(1)
(2)
(3)
The variables T
f
and T
r
stand for the time constants for product flow rate and tailings flow
rate dynamics, respectively.
(4)
References: Mehmet Onder Efe, Multivariable nonlinear model reference control of cement mills, Transactions of the
Institute of Measurement and Control 25,5 (2003), pp. 373385
Schematic diagram of the
cement milling circuit
References: Mehmet Onder Efe, Multivariable nonlinear model reference control of cement mills, Transactions of the
Institute of Measurement and Control 25,5 (2003), pp. 373385
The control problem is to enforce the system states to follow the states of a reference model by
appropriately altering the two control inputs.
Reference model: In choosing the reference dynamics for z and yf, we assume
1) The reference model for each state, whose variables are represented with a subscript m, must
be stable and must follow the command signal. Since the differential equations in (1)-(3) are
of first order, we choose the corresponding reference dynamics as a first-order system;
2) The response imposed by the reference system must not be faster than what could be achieved
by the actual system, i.e., the time constants must be compatible.
Denote the command signals for reference mill load (z
m
) and the reference product flow rate (y
mf
)
states by r and f, respectively. If for some tc 0, z
m
(tc ) = r(tc) is satisfied, then (5) is
satisfied for all t tc.
>
>
Two out of three state variables are kept under control; the behaviour of the third state is determined by the first two.
Refrence:Tao, G. and P.A. Ioannou,
Robust Model Reference Adaptive
Control for Multivariable Plants,"
International Journal of Adaptive Control
and Signal Processing, Vol. 2, no. 3, pp.
217-248, 1988.
Synthesis of the control signal for
cement mill
Simulation
results:
In the upper subplot of Figure, the command signal (r), the response of the reference model (zm) and the response of the
system are illustrated together. After approximately 5 h, the value of the plant output comes admissibly close to that of the
model output. In order to clarify the tracking claim, the lower subplot depicts the model following error in state z. The
variation in the plant output is due to the uncertainty on the relative material hardness parameter.
Refrence:Tao, G. and P.A. Ioannou,
Robust Model Reference Adaptive
Control for Multivariable Plants,"
International Journal of Adaptive Control
and Signal Processing, Vol. 2, no. 3, pp.
217-248, 1988.
Recent development in mrac
Modified MRAC methods
Fuzzy-MRAC
Variable Structure MRAC (VS-MRAC)
Robust multiple model adaptive control (RMMAC)
Brief History:
Generated Library of
Tools
1960s
Sensitivity Method, MIT Rule
Limited stability analysis
Whitaker, Kalman, Parks,
1970s
Lyapunov based
Passivity based
Morse, Narendra, Landau,
Late 1970s - 1980s
Global stability
Morse, Narendra, Egardt, Landau, Goodwin,
Keisselmeier, Anderson, Astrom.
Early 1980s
Robustness issues, Instability
Egard, Rohrs, Ioannou, Athans, Anderson,
Astrom,
1980s
Robust adaptive control
Praly, Ioannou, Narendra, Tsakalis, Annaswamy,
Sun, Tao, Goodwin, Middleton etc
1990s
Nonlinear adaptive control
1990s
Search methods, Multiple
models, Switching
techniques
Martenson, Miller, Barmish,Morse,Narendra,
Morse, Andreson, Safonov, .
Adaptive backstepping
Krstic, Kanelakopoulos,
Kokotovic, Zhang,
Neuro-Adaptive
control
Fuzzy-Adaptive control
Narendra, Lewis, Polycarpou,
Kosmatopoulos, Xu, Ioannou, Wang,
Lavresky, Hovakimyan
A New Toolbox for use with MATLAB
and Simulink
[P.A. Ioannou & B. Fidan]
Parameter Identification
Adaptive Control
in both Continuous-Time and Discrete-Time
Parameter Identification
Gradient Methods
Least-Squares Methods
SPR-Lyapunov Approaches
(Adaptive) Control
Model Reference (Adaptive) Control
Direct, Indirect
(Adaptive) Pole Placement Control
Polynomial, State-Variable,
Linear Quadratic
Minimum Prediction Error Control
Direct, Indirect, Semi-direct
Adaptive Law Modifications
Normalization
Static, Dynamic
Parameter Projection
Robustness Modifications
, , Dead-zone
Other
(Adaptive) State Estimation
Output Prediction (ARMA)
Parametric Model Order Reduction
Polynomial Algebra
Adaptive control toolbox
Simulink
Blocks:
MATLAB
Commands:
|
z u
y
Plant I/O
Signals
Parametric
Model
Signals
|
z
u
d
n
Parameter
Estimate
Parametric Model
Signals
Normalizing Signal
u
y
Plant I/O
Signals
u
Parameter
Estimate
z
r
z
|
r
|
Original
Parametric Model
Signals
Reduced-Order
Parametric Model
Signals
Gradient Methods:
Function Purpose
ucgrad,ucgradbk,ucgradint Continuous-time gradient algorithms
dgradb, dgradl, udgrad Discrete-time gradient algorithms
dprojmod, dprojorth, Discrete-time projection algorithms
dprojpure, udproj
Least-Squares (LS) Methods:
Function Purpose
ucrls, urlsarg Continuous-time LS algorithms
drls, udrls, urlsarg Discrete-time LS algorithms
Model Conversion/Model Order Reduction:
Function Purpose
utf2lm, io2lm Transfer function to linear parametric model
uarma2lm, io2lm ARMA to linear parametric model
lmred Parametric model order reduction
d
n
Normalizing Signal
On line Parameter Estimators
Simulink
Block:
MATLAB
Commands:
r
u y
Plant Output Control Signal
|
z
u d
n Parameter Estimate
Parametric Model
Signals
Dynamic Normalizing Signal
Model Reference Adaptive Control (MRAC):
Function Purpose
mrcpoly MRC/MRAC design Polynomial Approach
dmrc Discrete-time MRC/MRAC design
umrcdrb, umrcdrl Continuous-time direct MRAC
umrcidr Continuous-time indirect MRAC
udmracdr Discrete-time direct MRAC
udmracidr Discrete-time indirect MRAC
One-Step Ahead Adaptive Control (OSAAC):
(Discrete Time)
Function Purpose
dosac OSAC/OSAAC design
udosacdr Direct OSAAC
udosacidr Indirect OSAAC
udosaclcf OSAAC Linear control form approach
Adaptive Pole Placement Control (APPC):
Function Purpose
ppcpoly, ppcssv Continuous-time PPC/APPC design
dppcdo, dppcimp, Discrete-time PPC/APPC design
dppcdo, dppcimp
ppcclq Continuous-time (adaptive) LQC design
ppcdlq Discrete-time (adaptive) LQC design
uppcpoly, uppcrsf PPC/APPC & (adaptive) LQC implementation
Polynomial Algebra Tools:
Function Purpose
bezout, diophant Solving Diophantine equations
euclid Greatest common divisor of two polynomials
polylcm Lowest common multiple of two polynomials
Reference Signal
Adaptive control
Numerical implementation of an extensive set of parameter
identification and adaptive control schemes.
Simulink