C.8 Adaptive Control
C.8 Adaptive Control
6
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
8. Adaptive Control
8.1.2 What is Adaptive Control ? Example 8.1 MRAC control of unknown mass____________
An adaptive controller differs from an ordinary controller in
Consider the control of a mass on a frictionless surface by a
that the controller parameters are variable, and there is a
mechanism for adjusting these parameters on-line based on motor force u , with the plant dynamics being
signals in the system. There are two main approaches for
m &x& = u (8.1)
constructing adaptive controllers: so-called model-reference
adaptive control method and so-called self-tuning method.
Choose the following model reference
Model-Reference Adaptive Control (MRAC) &x&m + λ1 x& m + λ2 x m = λ2 r (t ) (8.2)
ym
reference model where,
λ1 , λ1 : positive constants chosen to reflect the performance
r
u y e specifications
controller plant xm : the reference model output (ideal out put of the
controlled system)
r (t ) : reference position
â
adaptation law
* m is known exactly, we can choose the following control
Fig. 8.3 A model-reference adaptive control system law to achieve perfect tracking &~
x& + 2λ ~
x& + λ2 ~
x = 0 , with
~
x = x − xm representing the tracking error and λ is a strictly
A MRAC can be schematically represented by Fig. 8.3. It is
composed of four parts: a plant containing unknown positive number. This control law leads to the exponentially
parameters, a reference model for compactly specifying the convergent tracking error dynamics: u = mˆ ( &x&m − 2λ ~
x& − λ2 ~
x).
desired output of the control system, a feedback control law
containing adjustable parameters, and an adaptation * m is not known exactly, we may use the control law
mechanism for updating the adjustable parameters.
u = mˆ ( &x&m − 2λ ~
x& − λ2 ~
x) (8.3)
The plant is assumed to have a known structure, although the
parameters are unknown. which contains the adjustable parameter m̂ . Substitution this
- For linear plants, the numbers of poles and zeros are control law into the plant dynamics, yields
assumed to be known, but their locations are not.
- For nonlinear plants, this implies that the structure of the m &x& = mˆ ( &x&m − 2λ ~x& − λ2 ~
x)
dynamic equations is known, but that some parameters are = (m + m ) ( &x&m − 2λ x& − λ2 ~
~ ~ x ), with m~ ≡ mˆ − m
not.
⇒ m &~ x& + 2m λ ~ x& + m λ2 ~x =m~ ( &x& − 2λ ~
x& − λ2 ~
x) m
A reference model is used to specify the ideal response of the
adaptive control system to external command. The choice of ⇒ m( ~
&x& + λ ~
x& ) + λ m ( ~
x& + λ ~ ~ ( &x& − 2λ ~
x)=m m x& − λ2 ~
x)
the reference model has to satisfy two requirements:
- It should reflect the performance specification in the control Let the combined tracking error measure be
tasks such as rise time, settling time, overshoot or frequency
s =~
x& + λ ~
x (8.5)
domain characteristics.
- This ideal behavior should be achievable for the adaptive
control system, i.e., there are some inherence constrains on and the signal quantity v is defined as v = &x&m − 2λ ~
x& − λ2 ~
x .
the structure of reference model given the assumed structure The closed-loop zero dynamics
of the plant model.
~v
m s& + λ m s = m (8.4)
The controller is usually parameterized by a number of
adjustable parameters. The controller should have perfect Consider Lyapunov function
___________________________________________________________________________________________________________
Chapter 8 Adaptive Control 37
Applied Nonlinear Control Nguyen Tan Tien - 2002.6
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
0.5
2
2.0
Tracking Performance
Parameter Estimation
0.4 0
1.5
0.3
0.2
1.0 with w = &x& . If actually, the unknown parameter m is slowly
time-varying, the above estimate has to be recalculated at
0.1
0.5
0.0
-0.1
0.0 0.5 1.0 1.5 2.0 2.5 3.0
0.0
1.0 1.5 2.0 3.0
every new time instant. To increase computational efficiency,
0.0 0.5 2.5
Time (s) Time (s) it is desirable to adopt a recursive formulation instead of
Fig. 8.4 Tracking performance and parameter estimation for repeatedly using (8.11). To do this, we define
an unknown mass with reference path r (t ) = 0
0.8 2.5 1
0.6 P (t ) ≡ t
(8.12)
∫w
2.0
Tracking Performance
Parameter Estimation
0.4
2
0.2 1.5
dr
0.0 0
-0.2 1.0
-0.8
0.0 0.5 1.0 1.5 2.0 2.5 3.0
0.0
0.0 0.5 1.0 1.5 2.0 2.5 3.0 be directly obtained by using
Time (s) Time (s)
( )
Fig. 8.5 Tracking performance and parameter estimation for d −1
an unknown mass with reference path r (t ) = sin( 4t ) P = w2 (8.13)
__________________________________________________________________________________________
dt
mˆ& = − P (t ) w e (8.14)
Lemma 8.1: Consider two signals e and φ related by the Now we choose the adaptation laws for â r and â y . Let the
following dynamic equation tracking error be e = y − y m and the error of parameter
estimation be
e(t ) = H ( p ) [ k φT (t ) v (t )] (8.15)
a~r = aˆ r − a r a~ y = aˆ y − a y (8.25)
where e(t ) is a scalar output signal, H ( p) is strictly positive
real transfer function, k is an unknown constant with know The dynamics of tracking error can be found by subtracting
sign, φ(t ) is m × 1 vector function of time, and v (t ) is a (8.23) and (8.21)
measurable m × 1 vector. If the vector φ(t ) varies according to
e& = − a m ( y − y m ) + (a m − a p + b p aˆ y ) y + (b p aˆ r − bm )r
φ& (t ) = − sgn(k ) γ e v (t ) (8.16) = −a m e + b p (a~r r − a~ y y ) (8.26)
with γ being a positive constant, then e(t ) and φ(t ) are The Lemma 8.1 suggests the following adaptation laws
globally bounded. Furthermore, if v (t ) is bounded, then
aˆ& r = − sgn(b p ) γ e r (8.27)
e(t ) → 0 as t → ∞ .
a&ˆ y = − sgn(b p ) γ e y (8.28)
8.2 Adaptive Control of First-Order Systems
Let us discuss the adaptive control of first-order plants using with γ being a positive constant representing the adaptation
MRAC method. Consider the first-order differential equation gain. The sgn(b p ) in (8.27-28) determines the direction of the
y& = − a p y + b p u (8.20) search for the proper controller parameters.
___________________________________________________________________________________________________________
Chapter 8 Adaptive Control 39
Applied Nonlinear Control Nguyen Tan Tien - 2002.6
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Tracking Performance
Parameter Estimation
Parameter Estimation
1.0 1.0
3.5
4
0.5 âr 3.0 0.5 â y
3 0.0 2.5 0.0
Fig. 8.9 Tracking performance and parameter estimation with Fig. 8.11 Tracking performance and parameter estimation
reference path r (t ) = 4 with reference path r (t ) = 4
5 2.0 5 2.0
4 1.5 4 1.5 âr
3 3
Tracking Performance
Tracking Performance
Parameter Estimation
Parameter Estimation
1.0 1.0
2 2
0.5 âr 0.5
1 1
â f
0 0.0 0 0.0
-1 -0.5 -1 -0.5
-2
-1.0
â y -2
-1.0
-3 -3 â y
-1.5 -1.5
-4 -4
-5 -2.0 -5 -2.0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
Time (s) Time (s) Time (s) Time (s)
Fig. 8.10 Tracking performance and parameter estimation Fig. 8.12 Tracking performance and parameter estimation
with reference path r (t ) = 4 sin(3t ) with reference path r (t ) = 4 sin(3t )
__________________________________________________________________________________________ __________________________________________________________________________________________
Parameter convergence analysis ⇒ refer text book 8.3 Adaptive Control of Linear Systems with Full States
Feedback
Extension to nonlinear plant
The same method of adaptive control design can be used for Consider the nth-order linear system in the canonical form
the non-linear first-order plant describe by the differential
equation a n y ( n ) + a n−1 y ( n−1) + K + a0 y = u (8.36)
y& = − a p y − c p f ( y ) + b p u (8.32) where the state components y, y& ,K, y ( n−1) are measurable,
coefficient vector a = [a n L a1 a0 ]T is unknown, but
where f is any known nonlinear function. The nonlinear in
their signs are known. The objective of the control system is to
these dynamics is characterized by its linear parametrization in make y closely track the response of a stable reference model
terms of the unknown constant c . Instead of using (8.22), now
we use the control law α n y m ( n) + α n−1 y m ( n−1) + K + α 0 y m = r (t ) (8.37)
where the second term in (8.33) is introduced with the Choice of control law
intention of adaptively canceling the nonlinear term. Using the Define a signal z (t ) as follows
same procedure for the linear plant,
(n)
z (t ) = y m − β n−1e ( n−1) − K − β 0 e (8.38)
y& = − a p y − c p f ( y ) + b p [aˆ y y + aˆ f f ( y ) + aˆ r r ]
= −(a p − b p aˆ y ) y − (c p − b p aˆ f ) f ( y ) + b p aˆ r r with β1 ,K, β n being positive constants chosen such that
p n + β n−1 p n−1 + K + β 0 is a stable (Hurwitz) polynomial.
Comparing to (8.21) and define a f ≡ c p / bp and Adding both side of (8.36) and rearranging, we can rewrite the
a~ f ≡ aˆ f − a f . The adaptation laws are plant dynamics as
a n [ y ( n) − z ] = u − a n z − a n−1 y ( n−1) − K − a0 y
a&ˆ y = − sgn(b p ) γ e y (8.34a)
Let us choose the control law to be
a&ˆ f = − sgn(b p ) γ e f (8.34b)
Choice of adaptation law theory that the relative degree of the reference model has to be
Rewrite the closed-loop system (3.40) in state space form larger or equal to that the plant in order to allow the possibility
of perfect tracking. Therefore, in our treatment, we will
x& = A x + b [(1 / a n ) v T ~
a] (3.41a) assume that nm − mm ≥ n − m .
e = cx (3.41b)
where The objective of the design is to determine a control law, and
0 1 0 L 0 0 1 an associated adaptation law, so that the plant
output y asymptotically approaches y m . We assume as follows
0 0 1 L 0 0 0 - the plant order n is known
A= M M M O M , b = M , cT = M
- the relative degree n − m is known
0 0 0 L 1 0 0 - the sign of k p is known
− β − β n−1 1 0
0 − β1 − β 2 L - the plant is minimum phase
Consider Lyapunov function candidate 8.4.1 Linear systems with relative degree one
Choice of the control law
V ( x, ~
a ) = xT P x + ~
a T Γ −1~
a To determine the appropriate control law for the adaptive
controller, we must first know what control law can achieve
perfect tracking when the plant parameters are perfect known.
where both Γ and P are symmetric positive constant matrix, Many controller structures can be used for this purpose. The
and P satisfies following one is particularly convenient for later adaptation
design.
PA + A T P = −Q Q = QT > 0
Example 8.5 A controller for perfect tracking_____________
for a chosen Q . The derivative V& can be computed easily as Consider the plant described by
V& = − xT Q x + 2~
a T v bT P x + 2~
a Γ −1~
a& k p ( p + bp )
y= 2
u (8.45)
p + a p1 p + a p2
Therefore, the adaptation law
and the reference model
aˆ& = − Γ v bT P x (8.42)
k m ( p + bm )
ym = r (8.46)
leads to V& = − x T Q x ≤ 0 . p 2 + a m1 p + a m2
ym (t )
8.4 Adaptive Control of Linear Systems with Output r (t ) Wm ( p )
Feedback u0 u1 e
u
Consider the linear time-invariant system presented bu the k W p ( p)
transfer function α1
p + bm
Z p ( p) b0 + b1 p + K + bm−1 p m−1 + p m
W ( p) = k p = kp (8.43) β1 p + β 2
R p ( p) a0 + a1 p + K + a n−1 p n−1 + p n p + bm
where k p is called the high-frequency gain. The reason for Fig. 8.13 Model-reference control system for relative degree 1
this term is that the plant frequency response at high frequency
Let the controller be chosen as shown in Fig. 8.13, with the
kp
verifies W ( jω ) = n−m , i.e., the high frequency response is control law being
ω
essentially determined by k p . The relative degree r of this β1 p + β 2
u = α1 z + y+kr (8.47)
system is r = n − m . In our adaptive control problem, the p + bm
coefficients ai , b j (i = 0,1,K, n − 1; j = 0,1,K, m − 1) and the
high frequency gain k p are all assumed to be unknown. where z = u /( p + bm ) , i.e., z is the output of a first-order
filter with input u , and α1 , β1 , β 2 , k are controller parameters.
The desired performance is assumed to be described by a If we take these parameters to be α1 = b p − bm ,
reference model with transfer function
a m1 − a p1 a m2 − a p2 km
β1 = , β2 = , k= , the transfer
Zm kp kp kp
Wm ( p ) = k m (8.44)
Rm function from the reference input r to the plant output is
Therefore, perfect tracking is achieved with this control law, - The vector θ1* contains (n − 1) parameters which intend to
i.e., y (t ) = y m (t ), ∀t ≥ 0 .
cancel the zeros of plant.
Why the closed-loop transfer function can become exactly the - The vector θ 2* contains (n − 1) parameters which, together
same as that of the reference model ? To know this, note that with the scalar gain θ 0* can move the poles of the closed-loop
the control input in (8.47) is composed of three parts:
- The first part in effect replaces the plant zero by the control system to the locations of the reference model poles.
reference model zero, since the transfer function from u1 to
As before, the control input in this system is a linear
y is combination of:
- the reference signal r (t )
p + bm k p ( p + b p ) k p ( p + bm )
Wu1, y = = 2 - the vector signal ω1 obtained by filtering the control input u
p + bp p2 + a p p + a p p + a p1 p + a p2
1 2 - the vector signal ω 2 obtained by filtering the plant output y
- The second part places the closed-loop poles at locations of and the output itself.
those of reference model. This is seen by noting that the The control input can be rewritten in terms of the adjustable
transfer function from u 0 to y is parameters and the various signals, as
u0 u1
r (t ) u y Let the controller be chosen as shown in Fig. 8.16. Noting that
* W p ( p)
k
bm in the filter in Fig. 8.13 has been replaced by a positive
ω1
θ1* Λ, h number λ . The closed-loop transfer function from the
T
φ ω ω2 reference signal r to the plant output y is
k* θ 2* Λ, h
p + λ0 kp
θ 0* p + λ0 + α1 p 2 + a p p + a p
Fig. 8.15 An equivalent control system for time-varying gains W ry = k 1 2
p + λ0 β1 p + β 2 kp
1+
Since y m (t ) = Wm ( p ) r , the tracking error is seen to be related p + λ0 + α 1 p + λ0 p 2 + a p p + a p
1 2
km k k p Z p λ1 ( p ) Z m ( p )
ym = r Wry = (8.58)
2
p + a m1 p + a m2 R p ( p )[λ ( p ) + C ( p )] + k p Z p D( p )
ym (t )
Wm ( p ) The question now is whether in this general case, there exists
r (t )
u0 u1 choice of values for k , θ1 , θ 2 and θ 0 such that the above
e
u transfer function becomes exactly the same as Wm ( p ) , or
k W p ( p)
equivalently
α1
p + λ0 R p (λ ( p ) + C ( p )) + k p Z p D( p ) = λ1Z p Rm ( p ) (8.59)
β1 p + β 2
p +λ 0 The answer to this question can be obtained from the
Fig. 8.16 Model-reference control system for relative degree 2 following lemma
___________________________________________________________________________________________________________
Chapter 8 Adaptive Control 43
Applied Nonlinear Control Nguyen Tan Tien - 2002.6
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
u = m &x&r − α s + c f1 + k f 2 ( → 8.71)
where k is constant of the same sign as h , and y r(n) is the
which yields m &x& + c f1 + k f 2 = m &x&r − α s + c f1 + k f 2 or
derivative of y r( n−1) , i.e., y r( n) = y d( n) − λn−2 e ( n−1) − K − λ0 e& .
m ( &x& − &x&r ) + α s = 0 . Because the unknown parameters, the
Noting that y r(n) , the so-called “reference” value of y (n) , is controller is
obtained by modifying y d(n ) according to the tracking errors. If
u → uˆ = mˆ &x&r − α s + cˆ f1 + kˆ f 2 ( → 8.72)
the parameters are all known, this choice leads to the tracking
error dynamics h s& + k s = 0 and therefore gives exponential which leads to the tracking error
convergence of s , which in turn, guarantees the convergence
of e . m &x& + c f1 + k f 2 = mˆ &x&r − α s + cˆ f1 + kˆ f 2
Choice of adaptation law (m &x& − m &x&r ) − (mˆ &x&r − m &x&r ) − (cˆ − c) f1 − (kˆ − k ) f 2 + α s = 0
For our adaptive control, the control law (8.71) is replaced by ~ &x& − c~ f − k~ f + α s = 0
m ( &x& − &x& ) − mr r 1 2
n
&x&r
u = hˆ y r( n) − k s + ∑ aˆ f (x, t )
i =1
i i (8.72) ~ c~ k~ f
m s& + α s = m 1 [ ] ( → 8.74)
where h, ai have been replaced by their estimated values. The f 2
tracking error yields &
Adaptation laws: m&ˆ = − γ s &x&r , c&ˆ = − γ s f1 , kˆ = − γ s f 2
n
∑ a~ f (x, t )
~
h s& + k s = h y r( n) + i i (8.73) ~ 2 + c~ 2 + k~ 2 ) and its
Lyapunov function: V = m s 2 + γ −1 ( m
i =1
~ derivative with the above adaptation laws yields
where, hi = hˆi − hi , a~i = aˆ i − ai . (8.73) can be written in the
form
V& = 2m s s& + 2γ −1 ( m~ m&ˆ + c~ c&ˆ + k~ k&ˆ)
= −2α s 2 + 2γ −1 m
2
~ (mˆ& + γ s &x& ) + c~ (cˆ& + γ s f ) + k~ (kˆ& + γ s f )
i =1 r 1 2
y r( n) (8.74)
= −2α s 2 ≤ 0
=
1/ h ~ ~
h a1 L a n
p + ( k / h)
[
~ f1 (x, t )
M
] __________________________________________________________________________________________
qualitative answers can improve our understanding of adaptive of non-parametric uncertainties present in the above example,
control system behavior in practical applications. the observed instability can seem quite surprising.
_________________________________________________________________________________________
may lead to slower estimation, we may multiply both side of
(8.79) by a constant number, i.e., λ f .
In view of the global tracking convergence proven in the
absence of non-parametric uncertainties and the small amount
___________________________________________________________________________________________________________
Chapter 8 Adaptive Control 46
Applied Nonlinear Control Nguyen Tan Tien - 2002.6
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Generally, for a linear SISO system, its dynamics can be H 12 = H 21 = m 2 l1c 2 cos q 2 + m 2 l c22 + I 2
described by
H 22 = m 2 l c22 + I 2
A( p ) y = B ( p ) u (8.80) h = m 2 l1l c 2 sin q 2
where g1 = m1l c1 g cos q1 + m 2 g[l c 2 cos(q1 + q 2 ) + l1 cos q1 ]
A( p ) = a0 + a1 p + K + a n−1 p n−1 + p n g 2 = m 2 l c 2 g cos(q1 + q 2 )
B ( p ) = b0 + b1 p + K + a n−1 p n−1
Let us define a1 = m2 , a 2 = m2lc 2 , a3 = I1 + m1lc21 , and
Divide both sides of (8.80) by a known monic polynomial of
order n, leading to a4 = I 2 + m2 lc22 .
Then each term on the left-hand side of (6.9)
is linear terms of the equivalent inertia parameters
y=
A0 ( p ) − A( p) B( p )
u (8.81) a = [a1 a 2 a3 a 4 ]T . Specially,
A0 ( p ) A0 ( p )
where H11 = a3 + a 4 + a1l12 + 2a 2 l1 cos q 2
n −1 n
A0 = α 0 + α1 p + K + α n−1 p +p H 22 = a 4
H12 = H 21 = a 2 l1 cos q 2 + a 4
has known coefficients. In view of the fact that
Thus we can write
A0 ( p ) − A( p ) = (α 0 − a0 ) + (α1 − a1 ) p + K + (α n−1 − a n−1 ) p n−1
τ = Y1 (q, q& , q
&&) a (8.83)
(8.81) can be rewritten in the form
This linear parametrization property actually applies to any
y = θT w (t ) (8.82) mechanical system, including multiple-link robots.
t t d
∫ ∫ dr [wH]q& dr
I2, m2 t
w(t − r )Hq
&& dr = w(t − r )Hq& −
lc2 0 0 0
l2
l1 q 2, τ 2 = w(0)H (q)q& − w(0)H[q (0)] q& (0) −
t
Fig. 6.2 A two-link robot where y is the filtered torque and W is the filtered version of
Y1 . Thus the matrix W can be computed from available
Consider the nonlinear dynamics of a two-link robot measurements of q and q& . The filtered torque y can also be
computed because the torque signals issued by the computer
H 11 H 12 q&&1 − h q& 2 − h q&1 − h q& 2 q&1 g1 τ 1 are known.
= & + = _________________________________________________________________________________________
H 21 H 22 q&&2 h q&1 0 q 2 g 2 τ 2
(6.9) 8.7.2 Prediction-error-based estimation model
where,
8.7.3 The gradient estimator
q = [q1 q 2 ]T : joint angles
τ = [τ 1 τ 2 ]T : joint inputs (torques) 8.7.4 The standard least-squares estimator
___________________________________________________________________________________________________________
Chapter 8 Adaptive Control 48