The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
Discrete control2 converted
1. 1
Discrete Control
State Space Analysis:
In many situations, one is able to find a difference equation that describes the relation between
several variables. We need to put this equation in a format that is suitable for discrete control.
The standard linear time invariant state space model is given as:
)()()1( kuHkXGkX +=+
With observations:
)()()1( kuDkXCky +=+
Where
)(kX = n-vector
)(ky = m-vector
)(ku = r-vector
Consider the discrete linear system, with scalar input and scalar output, described by:
)(...)1()()(...)2()1()( 1021 mkubkubkubnkyakyakyaky mn −++−+=−++−+−+
This could be put in several format.
(1)Controllable Canonical form:
Define )()1( 21 kxkx =+ ,…, )()1(1 kxkx nn =+−
Then )()(...)()()1( 1121 kukXakXakXakX nnnn +−−−−=+ −
)(
1
0
...
0
0
)(
)(
...
)(
)(
...
1...000
...............
0...100
0...010
)1(
)1(
...
)1(
)1(
1
2
1
121
1
2
1
ku
kX
kX
kX
kX
aaaakX
kX
kX
kX
n
n
nnnn
n
+
−−−−
=
+
+
+
+
−
−−
−
And
2. 2
( ) ( ) ( ) )(
)(
..
...
)(
)(
...)( 0
2
1
0110110 kub
kX
kX
kX
babbabbabky
n
nnnn +
−−−= −−
(2) Observable Canonical Form:
(3) Diagonal Canonical Form:
Optimization:
Define
−
=
++=
1
0
)()()()(
2
1
)()(
2
1 N
k
TTT
kuRkukXQkXNXSNXJ
The optimal values of u(k) that minimize the objective function J are given by the following
equations:
)1()( 1
+−= −
kHRku T
, k=0,1,…,N-1
)1()()( ++= kGkXQk T
, k=1,2,3,…,N-1, )()( NXSN =
3. 3
Linear Systems
The linear time invariant system is described using the delay operator
1−
q as:
( ) ( ) ( ) )()()( 111
kqCkuqBkyqA −−−
+=
where ( ) A
AqaqaqaqA deg
deg
2
2
1
1
1
...1 −−−−
++++=
( ) B
BqbqbqbbqB deg
deg
2
2
1
10
1
... −−−−
++++=
( ) C
CqcqcqccqC deg
deg
2
2
1
10
1
... −−−−
++++=
Or
( )
( )
( )
( ) )()()( 1
1
1
1
k
qA
qC
ku
qA
qB
ky −
−
−
−
+=
( ) ( ) )()( 11
kqGkuqGu
−−
+=
Notice that the delay operator
1−
q plays the role of the z transform i.e.
11 −−
= zq . For example
( ) )1()()(1 1
1
1 −+=+ −
kyakykyqa , and the z transform of ( ))1()( 1 −+ kyaky is ( ) )(1 1
1 zyza −
+ .
Remember that the definition of Z transform y(z) of the signal y(k) is given as:
=
−
=
0
)()(
k
k
zkyzy
which, in the frequency domain, is given as:
=
−
=
==
0
)()()(
k
kj
ez
j
ekyzyey j
i.e. we are evaluating the z-transform on the unit circle and thus obtain the frequency response (if
y(z)=H(z)= the transfer function).
For finite impulse response (FIR) model for data or filter we have:
4. 4
=
−=
I
i
i ikyky
1
)()( or =
−+=+
I
i
i iIkyIky
1
)()(
with known initial conditions )1((),...1(),0( −Iyyy . The z transform y(z) will depend on the
initial conditions.
Example: )()1()2( 21 kykyky ++=+ . Rearrange we get: 0)()1()2( 21 =−+−+ kykyky
Since )1()...2()1()0()()( 21
−−−−−=+ −−
nzyyzyzyzzyznkyZ nnnn
Then )1()0()()2( 22
zyyzzyzkyZ −−=+ , and )0()()1( zyzzykyZ −=+
after some manipulations we get
( )
21
2
1
2
)1()0(
)(
−−
+−
=
zz
zyyzz
zy
Stability:
The linear time-invariant system:
( ) ( ) 0),()( 11
= −−
kkuqBkyqA ,
with zero input, ,0=u(k) is asymptotically stable if 0)(lim =
→
ky
k
for all initial conditions
y(0),y(-1),…,y(1-degA). Thus, to study asymptotic stability we must first zero the input.
Example: Consider the first order system ( ) 11
1 −−
−= qqA which has the form
( ) ( ) 0,0)1()()(1)( 11
=−−=−= −−
kkykykyqkyqA i.e. )1()( −= kyky . Thus, for
k=1, we have )0()1( yy = , for k=2, we have )0()1()2( 2
yyy == , and for any k and for any
initial conditions y(0), we have, )0()( yky k
= . The system is asymptotically stable,
0)(lim =
→
ky
k
, if 1 .
5. 5
The general case with characteristic polynomial ( ) ( )
m
i
v
i
i
qqA
1
11
1
=
−−
−= is stable if ii ,1
Stability of Nonlinear Systems:
For the general nonlinear system dynamics of the form:
),...2(),1(),...,2(),1()( −−−−= kukukykyfky
We first zero the input and study only the system
,...0)2(,0)1(),...,2(),1()( =−=−−−= kukukykyfky . One has to convert the nonlinear
system into linear one by using Taylor series expansion around reference values )(kyr
(to be
calculated) and keeping only the first order terms. To simplify the analysis we will confine
ourselves to the case where the nonlinearity is in y(k) not u(k). We shall first start with a simple
example and then generalize the approach.
Example: Consider the system dynamics given by )()1()( kbukyfky +−= , we first find the
reference value, ry ,by setting u(k)=0. Thus rr yfy = and we solve to find )(kyr
. Using Taylor
series expansion around ry we get:
( )
( )r
yky
r
r
yky
r
yky
ky
kyf
y
yky
ky
kyf
yfky
r
r
−−
−
−
+=
−−
−
−
+
=−
=−
)1(
)1(
)1(
)1(
)1(
)1(
)(
)1(
)1(
Define ( )rykykx −= )()( , then we get the new difference equation:
6. 6
( )r
yky
r yky
ky
kyf
yky
r
−−
−
−
=−
=−
)1(
)1(
)1(
)(
)1(
i.e. )1(
)1(
)1(
)(
)1(
−
−
−
=
=−
kx
ky
kyf
kx
ryky
It is this equation that we use in the analysis.
Feedback System:
In the feedback system, we design a controller that has two inputs, y(k) and r(k). Where r(k) is a
reference/external input. In polynomial format we have:
( ) ( ) ( ) )()()( 111
kyqSkrqTkuqR −−−
−=
Where ( ) R
RqrqrqrqR deg
deg
2
2
1
1
1
...1 −−−−
++++=
( ) S
SqsqsqssqS deg
deg
2
2
1
10
1
... −−−−
++++=
( ) S
SqtqtqttqT deg
deg
2
2
1
10
1
... −−−−
++++=
Thus,
( )
( )
( )
( ) )()()( 1
1
1
1
ky
qR
qS
kr
qR
qT
ku −
−
−
−
−=
( ) ( ) )()( 11
kyqGkrqG yr
−−
−=
Substituting, we get the closed loop output y(k):
7. 7
( ) ( )
( ) ( ) ( ) ( )
( ) ( )
( ) ( ) ( ) ( ) )()()( 1111
11
1111
11
k
qSqBqRqA
qCqR
kr
qSqBqRqA
qTqB
ky −−−−
−−
−−−−
−−
+
+
+
=
The polynomial ( ) ( ) ( ) ( ) ( )11111 −−−−−
+= qSqBqRqAqAc
is called the characteristic polynomial.
Stationary and Transient Response:
It is usually of interest to find the transient response for a unit step input, sinusoidal input, or
others. For example, administering the patient with steady level of glucose (step function) might
cause overshoot in the patient’s temperature, blood pressure, or others. Thus, one has to design
the control such that the transient response is within acceptable limits. In this analysis, we shall
use the table of the inverse Z transform, the final and initial value theorems.
Some Inverse Z Transform for Zero Initial Conditions:
1
1
1
−
− az
has the inverse ,...2,1,0, =kak
,
azaz
z
−
=
− −
−
1
1 1
1
has the inverse ,...3,2,1,1
=−
kak
,
Final Value Theorem:
For a stable system, ( ) )(1lim)(lim 1
1
zyzky
zk
−
→→
−= , where y(z) is the Z transform of y(k).
Initial Value Theorem:
If )(lim zy
z →
exists, then the initial value y(0) of y(k) is given by )0()(lim yzy
z
=
→
.
Consider the simple stable system:
8. 8
( ) ( ) ( ) ( ) ( ) 0,1,1,1),()( 11111
=== −−−−
kaqB-azqAkuqBkyqA -
i.e.
( ) )(
1
1
)( 1
zu
-az
zy -
=
which could be rewritten as:
)1()1()( −=−− kukayky or )1()1()( −+−= kukayky or )()()1( kukayky +=+
We need to find the transient and steady state response to a unit step function u(k)=1.
Remember that the Z transform of y(k+n), )( nkyZ + , depends on the initial conditions as
follows:
)1()...2()1()0()()( 21
−−−−−=+ −−
nzyyzyzyzzyznkyZ nnnn
The Z transform of a unit step function, u(k)=1, is given as:
( )1
1
1
)( -
-z
zu = .
The Z transform of the output, y(k+1), is given as:
)0()()1( zyzzykyZ −=+
The Z transform of the RHS of the equation, )()()1( kukayky +=+ , is given as:
)()()()( zuzaykukayZ +=+
Equating both sides we get:
)()()1( kukayZkyZ +=+
i.e. )()()0()( zuzayzyzzy +=−
9. 9
Rearrange we get:
( ) )()0()( zuzyzyaz +=−
Which yields:
( ) ( )az
zu
az
zy
zy
−
+
−
=
)()0(
)(
If )1()()1( ++=+ kukayky
Then, for zero initial conditions and unit step function as input, y(z) is obtained as:
( ) ( ) ( )( )111
11
1
)(
1
1)(
)( −
−
==
−
=
z-az
zu
-azaz
zzu
zy --
Using the method of partial fraction expansion, if the order of numerator is less or equal to the
order of denominator, we get:
( )( ) ( )( ) ( ) ( )1111
1
)( 21
2
11
−
+
−
=
−−
=
−
= −
zazzaz
z
z-az
zy -
Where ( ) ( )
( )( ) ( )11
)( 2
1
−
=
−−
−=
−=
== a
a
zzaz
z
az
z
zy
az
azaz
and ( ) ( )
( )( ) ( )azzaz
z
z
z
zy
z
zz −
=
−−
−=
−=
== 1
1
1
1
)(
1
1
2
1
2
Using the inverse Z transform we get:
( ) ,...3,2,1,1)( 2121 =+=+= kaaky kkk
10. 10
For a stable system, the steady state (final value) is:
( )
)(
1
1
lim
1
1
)(lim 11
2 zy
za
ky
zk
−
=
−
== −→→
The transient part that will die out is:
( ) ( )
,...2,1,
11
1
1 =
−
=
−
=
+
k
a
a
a
a
a
a
k
kk
Structure of Control Systems:
The general feedback system has the following relations:
( ) ( ) )()()( 11
kqGkuqGky u
−−
+=
( ) ( ) )()()( 11
kyqGkrqGku yr
−−
−=
We shall first give some examples of simple linear feedback systems and their applications.
Consider the case where ( ) 01
=−
qG , ( ) 11
=−
qGr . In terms of the z transform, the transfer
function becomes:
( )
( ) ( )zGzG
zG
zr
zy
yu
u
+
=
1)(
)(
Example1, Inverse system design:
In some applications one is interested in the synthesis of the inverse of a given discrete time
system with transfer function p(z). Assuming that ( ) KzGu = , and setting the feedback
( ) )(zpzGy = , then
11. 11
( )zpK
K
zr
zy
1)(
)(
+
=
If the gain is sufficiently large such that ( ) 1zpK , then:
( ) ( ) ( )zpzpK
K
zpK
K
zr
zy 1
1)(
)(
=
+
=
We could obtain this by using operational amplifiers.
Example 2, stabilization of unstable systems:
Consider a first order system with ( ) 1,
−
= a
az
b
zGu
The system is unstable and we assume that the feedback is a constant gain i.e. ( ) KzGy = , the
closed loop transfer function becomes:
( )
( ) ( )
( )
( ) ( ) Kbaz
b
KzG
zG
zGzG
zG
zr
zy
u
u
yu
u
+−
=
+
=
+
=
11)(
)(
The closed loop system will be stable if the pole is placed inside the unit circle by choosing:
1−aKb which leads to
b
a
K
+
1
Thus, we stabilize the system with a constant gain in the feedback loop. This is called a
proportional feedback system.
As another example, consider the second order unstable system:
12. 12
( )
( )( ) 1,2
+−
=
−
= a
azaz
b
az
b
zGu
We propose to use a proportional plus derivative feedback system;
( ) zKKzGy 21 +=
Which yields
( )
( ) ( )
( )
( ) ( ) ( ) ( )bKazbKz
b
azbzKK
azb
zGzG
zG
zr
zy
yu
u
12
22
21
2
/1
/
1)(
)(
+−++
=
−++
−
=
+
=
The close loop system will be stable as long as the poles are inside the unit circle.
Example 3, tracking system:
One of major applications of feedback is to have the output follows/tracks a reference input. As
an example consider the system where we choose:
( ) ( ) ( )111 −−−
== qGqGqG eyr
in the equation ( ) ( ) )()()( 11
kyqGkrqGku yr
−−
−=
i.e. ( )( ))()()( 1
kykrqGku e −= −
then )(
)()(1
)()(
)( zr
zGzG
zGzG
zy
ue
ue
+
=
Define )()()( kykrke −=
Then )()()()( zezGzGzy ue=
13. 13
and )(
)()(1
1
)( zr
zGzG
ze
ue+
=
For good tracking system, we would like
= j
ez
ze )( to be close to zero for the desired frequency
range. Thus, in this range, we need )()( zGzG ue to be large. This means that for good tracking we
need large gain.
14. 14
Design of Discrete time Control Systems
One of the objectives of digital control is to design a system that has some basic properties; (1)
Stability, (2) Steady state and transient response should be within acceptable limits, (3) Good
tracking capabilities.
In many applications, the plant or the system dynamics are given in terms of continuous time
differential equations. One has to find the plant transfer functions in the z domain not in the S
domain. Through sampling and hold unit, one is able to obtain the desired result.
Consider the plant transfer function G(s). The equivalent z transform of the plant G(z) is given
as:
)()( 1
sGzG −
= LZ
Where )(1
sG−
L is the inverse Laplace transform of G(s).
Example:
as
sG
+
=
1
)( , then akTat
eesG −−−
==)(1
L .
( ) 1
1
1
1
)()( −−
−−
−
===
ze
esGzG aT
akT
ZLZ
End of example.
Consider the transfer function G(s) where there is a sampling and hold unit before the plant. The
sampling and hold unit has the transfer function
s
e Ts−
−1
where T is the sampling interval. The
new transfer function X(s) becomes:
15. 15
)(
1
)( sG
s
e
sX
Ts−
−
=
After some manipulations we get the z transform of the system dynamics X(z) as:
( ) ( )
−=
−= −−−
s
sG
z
s
sG
zzX
)(
1
)(
1)( 111
LZZ
Where
−
s
sG )(1
LZ is the Z transform of the inverse Laplace transform of
s
sG )(
i.e. we get
the inverse Laplace transform of
s
sG )(
and then take the Z transform of the obtained time-
domain signal.
Example: Assume that:
1
1
)(
+
=
s
sG . Thus
1
11
)(
1
)(
+
−
=
−
=
−−
ss
e
sG
s
e
sX
TsTs
.
( ) ( )1
11
1
1)(
+
−=
+
=
sssss
sG
,
and
( )
kTt
ekTstepetstep
sss
sG −−−−−
−=−=
+
−
=
)()(
1
11)( 111
LLL
where )(tstep is the step function starting at t=0.
( )
( )( )11
1
11
1
11
1
1
1
1
1
)(
)(
−−−
−−
−−−
−−
−−
−
=
−
−
−
=−=
zez
ze
zez
ekTstep
s
sG
T
T
T
kT
ZLZ
And ( ) ( )
−=
−= −−−
s
sG
z
s
sG
zzX
)(
1
)(
1)( 111
LZZ ( ) ( )
( )( )11
1
1
11
1
1 −−−
−−
−
−−
−
−=
zez
ze
z T
T
16. 16
( )
( )1
1
1
1
−−
−−
−
−
=
ze
ze
T
T
End of example.
A simple, yet popular and effective, controller is the proportional plus integral plus derivative
(PID) controller. If we have one reference, r(k), and the output, y(k), is fed back to the system,
then we define the error signal e(k) as:
e(k)=r(k)-y(k)
and )(
)(
)(
zG
ze
zu
PID=
The z transform of the control u(k) input to the plant or system is now given as:
( ) ( ) ( )
( )1
211
1
1
1
11
1
1
)(
)(
)(
−
−−
−
−
−
−++−
=−+
−
+==
z
zKKzK
zK
z
K
KzG
ze
zu DIP
D
I
PPID
( ) ( )( ) ( )
( )1
21
1
2
−
−−
−
++−++
=
z
zKzKKKKK DDPDIP
Where PK , IK , and DK are to be determined from the desired system response. The above formula
is named positional form of PID. There is, however, another popular form named velocity form. The z
transform of the input to the plant u(z) is given as:
( ) ( )( ) ( ) )(1
1
)()( 1
1
zyzKzyzr
z
K
zyKzu D
I
P
−
−
−−−
−
+−=
Steady State Error:
We need to find the limit value of the tracking error e(k). We use the limit value theory as:
17. 17
( ) )(1)( 1
1
limlim zezke
zk
−
→→
−=
Obviously, the error e(z) depends on the reference value r(z) and the fedback output y(k). Thus,
we get different vallues for each shape of reference, step function, ramp, sinusoida, .. etc.
Effectively we look for the transfer function between e(z) and r(z).
Example: PID controller and simple plant. Assume that the plant transfer function G(s) is given
as:
as
sG
+
=
1
)( , then akTat
eesG −−−
==)(1
L , ( ) 1
1
1
1
)()( −−
−−
−
===
ze
esGzG aT
akT
ZLZ . The
new transfer function between the error and the output is now )()(
)(
)(
)(
)(
)(
)(
zGzG
zu
zy
ze
zu
ze
zy
PID== ,
and the input output relation is now: ( ))()()()()( zGzGzyzrzy PID−= which yields
( ) ( ))()()()()(1)( zGzGzrzGzGzy PIDPID =+ i.e.
)()(1
)()(
)(
)(
zGzG
zGzG
zr
zy
PID
PID
+
= . To find a relation
between the error e(k) and the reference input r(k) we substitute e(k)=r(k)-y(k) which yields:
)()(1
1
)(
)()(1
)()(
)()()(
zGzG
zr
zGzG
zGzG
zrzrze
PIDPID
PID
+
=
+
−= . We now need to find the limits as:
( ) ( )
+
−=−= −
→
−
→→ )()(1
1
)(1)(1)( 1
1
1
1
limlimlim zGzG
zrzzezke
PIDzzk
.
For reference step function 1
1
1
)( −
−
=
z
zr , we get:
( )
+
=
+−
−=
→
−
−
→→ )()(1
1
)()(1
1
1
1
1)( limlimlim 1
1
1
1 zGzGzGzGz
zke
PIDzPIDzk
19. 19
( )
( )( )
( )( ) ( ) ( )( ) ( )
++−+++−−
−−
−
= −−−−−
−−−
−
−
→
2111
11
1
1
1 211
11
1lim zKzKKKKKzez
zez
z
Tz
DDPDIP
aT
aT
z
( )
( )( ) ( ) ( )( ) ( )
++−+++−−
−
= −−−−−
−−−
→
2111
11
1 211
1
lim zKzKKKKKzez
zeTz
DDPDIP
aT
aT
z
( )
I
aT
K
eT −
−
=
1
For large values of IK , we would be able to reduce the limit error.
End of example.
The Diophantine Equation for Pole Placement Design:
As we mentioned before, in the feedback system we design a controller that has two inputs, y(k)
and r(k). Where r(k) is a reference/external input. In polynomial format we have:
( ) ( ) ( ) )()()( 111
kyqSkrqTkuqR −−−
−=
Where ( ) R
RqrqrqrqR deg
deg
2
2
1
1
1
...1 −−−−
++++=
( ) S
SqsqsqssqS deg
deg
2
2
1
10
1
... −−−−
++++=
( ) S
SqtqtqttqT deg
deg
2
2
1
10
1
... −−−−
++++=
Thus,
( )
( )
( )
( ) )()()( 1
1
1
1
ky
qR
qS
kr
qR
qT
ku −
−
−
−
−=
20. 20
( ) ( ) )()( 11
kyqGkrqG yr
−−
−=
Substituting, we get the closed loop output y(k):
( ) ( )
( ) ( ) ( ) ( )
( ) ( )
( ) ( ) ( ) ( ) )()()( 1111
11
1111
11
k
qSqBqRqA
qCqR
kr
qSqBqRqA
qTqB
ky −−−−
−−
−−−−
−−
+
+
+
=
The polynomial ( ) ( ) ( ) ( ) ( )11111 −−−−−
+= qSqBqRqAqAc
is called the characteristic polynomial. It has the shape of what is known as the Diophantine
equation.
Usually we know/assume the desired shape of ( )1−
qAc and we need to find the polynomials
( )1−
qR and ( )1−
qS that satisfy the characteristic equation/polynomial. The polynomial ( )1−
qT is
obtained through the impulse response and the steady state error for a reference input.
There are sufficient (not necessary) conditions to find a unique solution to the Diophantine
equation; namely: (1) deg S = deg A – 1, (2) deg R = deg B -1, (3) deg
( ) ( )1degdeg1
−+−
BAqAc , where deg stands for the degree or order.
We notice that the noise term appears both in the output y(k) and the control u(k). There is a
need to reduce or eliminate the noise effects from the output and the control. We will,
extensively, talk about this issue and others in the next sections. For now, assume that the noise,
)(k , has constant value. In order to eliminate the noise effect from the output y(k):
( ) ( )
( ) ( ) ( ) ( )
( ) ( )
( ) ( ) ( ) ( ) )()()( 1111
11
1111
11
k
qSqBqRqA
qCqR
kr
qSqBqRqA
qTqB
ky −−−−
−−
−−−−
−−
+
+
+
=
21. 21
we put a term in R(k) such that the noise is eliminated. Specifically; let ( ) ( ) ( )11
1
1 −−−
= qRqRqR f ,
and choose ( ) 11
1 −−
−= qqRf . In this case ( ) ( ) 0)1()()(1)( 11
=−−=−= −−
kkkqkqRf .
Sometimes we need to eliminate the noise from the input control u(k):
( ) ( )
( )
( ) ( )
( ) )()()( 1
11
1
11
k
qA
qCqS
kr
qA
qTqA
ku
cc
−
−−
−
−−
−=
If the noise term )(k is oscillating i.e. )1()( −−= kk , then we design
( ) ( ) ( )11
1
1 −−−
= qSqSqS f , with ( ) 11
1 −−
+= qqSf . Thus
( ) ( ) 0)1()()(1)( 11
=−+=+= −−
kkkqkqSf . Notice that the choice of ( )1−
qRf and ( )1−
qSf
depends on the noise.
The chosen factors, to eliminate the noise, are included in the Diophantine equation as elements
of the matrices A and B. Specifically, the new Diophantine equation becomes:
( ) ( ) ( ) ( ) ( )1
1
11
1
11
'' −−−−−
+= qSqBqRqAqAc
where ( ) ( ) ( )111
' −−−
= qRqAqA f , and ( ) ( ) ( )111
' −−−
= qSqBqB f
Example: Assume that the system is given as )()1()( kkbuky +−= , and the noise
tconsk tan)( = . Thus, the systems dynamics ( ) ( ) ( ) )()()( 111
kqCkuqBkyqA −−−
+= with
( ) 11
=−
qA , ( ) 11 −−
= bqqB , and ( ) 11
=−
qC . We need to eliminate the noise effects from the output.
( ) 11
1 −−
−= qqRf . In this case ( ) ( ) 0)1()()(1)( 11
=−−=−= −−
kkkqkqRf . If we need to
eliminate the noise from the controller, u(k), we could choose ( ) 11
1 −−
−= qqSf . Instead, we will
22. 22
choose ( )1−
qS to satisfy the Diophantine equation as follows: ( ) ( ) ( ) ( )1111
1' −−−−
−== qqRqAqA f
, and we need to solve ( ) ( ) ( ) ( ) ( )111
1
11
' −−−−−
+= qSqBqRqAqAc . Following the sufficient
conditions rules we get: namely: (1) deg S = deg A’ – 1= 0, (2) deg 1R = deg B -1 = 0, (3) deg
( ) ( )1deg'deg1
−+−
BAqAc = 1. Thus, ( ) 0
1
sqS =−
, ( ) 10
1
1 RqR =−
, and choose a stable
( ) ( )11
1 −−
−= qqAc . Substituting in the equation ( ) ( ) ( ) ( ) ( )111
1
11
' −−−−−
+= qSqBqRqAqAc , we get:
( ) ( ) 0
1
10
11
11 sbqRqq −−−
+−=− . This yields the independent equations: 101 R= , and
010 bsR +−=− . Thus, ( ) bs /10 −= and ( ) ( ) ( ) ( )111
1
1
1 −−−−
−== qqRqRqR f . We need to find
an expression for ( )1−
qT . In this example, we assume that the reference r(k) = 0r = constant and
we need the output, y(k), to follow the reference r(k). After the elimination of noise, by choosing
( ) 11
1 −−
−= qqRf ,
( ) ( )
( ) )()( 1
11
kr
qA
qTqB
ky
C
−
−−
= . From the final value theory
( ) ( ) ( ) ( )
( )
−=−= −
−−
−
→
−
→→
)(1)(1)( 1
11
1
1
1
1
limlimlim zr
zA
zTzB
zzyzky
Czzk
, and since
( )1
0
1
)( −
−
=
z
r
zr ,
then
( )
( )
( )
( ) 001
11
1 1
1
1
)(
0 limlim r
bT
r
z
zTbz
ky
zk
r −
=
−
= −
−−
→→
= , then
( )
b
T
−
=
1
)1( . One could choose
( ) ( )
b
TqT
−
==− 1
0
1
. In this case,
( )
( )
( )
( ) ( )1
00
1
1
1
1
1
)()(
)()()( −−
−
−
−
−
−
=−=
q
kyskrT
ky
qR
qS
kr
qR
qT
ku
And since ( ) ( )
00
1 1
s
b
TqT =
−
==−
, then
( )
( ) ( ) )(
11
)()(
)( 1
0
1
0
ke
q
s
q
kykrs
ku −−
−
=
−
−
= . Thus, we have
an integral controller.
23. 23
In order to study the transient response, we set the disturbance to zero and we write the system
equation with advances not delays i.e. )()1()( kkbuky +−= is written as: )()1( kbuky =+ .
Using the Z transform we get: )()0()( zbuzyzzy =− . This yields )()0()( zu
z
b
yzy += . For a
unit step function, u(k)=1 and
( )1
1
1
)( −
−
=
z
zu . Thus,
( )1
1
1
)0()( −
−
+=
zz
b
yzy
( )1
)0(
−
+=
z
b
y .
Using the inverse Z transform we get: ( ) ,...3,2,1,0,)()0(1)()0()( =+=+= kbkybkyky
k
Example: Feedback control of heart rate during jogging
The speed of jogging was controlled to maintain a prescribed hear rate. The method proposed
here for feedback control of heart rate is based on the idea of comparing the current,
measured heart rate with a target heart rate and on this basis calculating a target speed
for the runner. The system dynamics (relation between speed u(k) and heart rate y(k)) is
modeled as
11)(
)(
1
1
1
−+
=
−
za
zb
zu
zy
. The continuous model is:
s
k
su
sy
1)(
)(
+
= and the sampling
interval was taken to be T = 5 seconds. Using sampling and hold before the plant we were able to
get from the continuous model to the discrete model.
Thus,
( ) 1
1
1
1 −−
+= qaqA , and ( ) 1
1
1 −−
= qbqB
The control unit yields the velocity u(k) as:
( ) ( ) ( ) )()()( 111
kyqSkrqTkuqR −−−
−=
24. 24
i.e.
( ) ( ) ( ) )()(
1
)( 11
1
kyqSkrqT
qR
ku −−
−
−=
Where r(k) is the desired heart rate.
It is sometimes desired to have integral action, which has z transform ( )1
1 −
− z , in the feedback
polynomial R. Integral usually reduces the effect of noise. In this case ( ) ( ) ( )111
'1 −−−
−= zRzzR or
( ) ( ) ( )111
'1 −−−
−= qRqqR . The Diophantine equation cABSAR =+ becomes:
( ) ( ) ( ) ( ) ( ) ( )111111
'1 −−−−−−
=+− qAqSqBqRqAq c
Or
( ) ( ) ( ) ( ) ( )11111
'' −−−−−
=+ qAqSqBqRqA c
Where
( ) ( ) ( )111
1' −−−
−= qAqqA
There are sufficient (not necessary) conditions to find a unique solution to the Diophantine
equation; namely: (1) deg S = deg A’ – 1, (2) deg R = deg B -1, (3) deg
( ) ( )1deg'deg1
−+−
BAqAc , where deg stands for the degree or order.
The degree of ( )1−
qAc is 2, the degree of ( )1−
qS is 1, and the degree of ( )1
' −
qR is zero. Thus,
( ) ( )1
0
1
1 −−
−= qrqR , ( ) 1
10
1 −−
+= qssqS , and ( ) 2
2
1
1
1
1 −−−
++= qaqaqA ccc
In the Diophantine equation, equating the powers on both sides of the equation and setting 0r =1,
we get:
25. 25
( )
1
11
0
1
b
aa
s c +−
= ,
( )
1
12
1
b
aa
s c +
=
The two poles of ( ) 2
2
1
1
1
1 −−−
++= qaqaqA ccc , were chosen such that the rise time and the
damping of the continuous time transfer function is acceptable. This yields:
( ) 2212
2
1
1
1
211 −−−−−−−
+−=++= qeqeqaqaqA snsn TT
ccc
Where rn t/35.3= is the natural frequency and rt is the rise time and it is chosen by the
designer is around 120-180 seconds.
The other feedback polynomial ( )1−
qT was chosen to be a constant i.e. ( ) 0
1
tqT =−
and its value is
obtained from step function response or others. The desired heart rate (r(k)) could be a constant
value around 140 beats per minute. We need to find an expression for ( )1−
qT . In this example, we
assume that the reference r(k) = 0r = 140 beats per minute, and we need the output, y(k), to
follow the reference r(k). Setting the noise to zero,
( ) ( )
( ) )()( 1
11
kr
qA
qTqB
ky
C
−
−−
= . From the final
value theory ( ) ( ) ( ) ( )
( )
−=−= −
−−
−
→
−
→→
)(1)(1)( 1
11
1
1
1
1
limlimlim zr
zA
zTzB
zzyzky
Czzk
, and since
( )1
0
1
)( −
−
=
z
r
zr , then
( )
( )
( )
( ) 0
21
02
2
1
1
11
1 1
1
1
)(
0 limlim r
aa
bT
r
zaza
zTbz
ky
cccczk
r ++
=
++
= −−
−−
→→
= ,
End of example.
27. 27
Disturbance Rejection and Tracking
Annihilation is used to remove undesired signals or disturbances from the output. We shall first
explain the annihilation concept and then move to see its applications.
Consider the signal S(k) which is modeled as:
( ) ( ) )()( 11
kqNkSq −−
=
with zero initial conditions i.e. S(-1)=0=S(-2)=…=S(-deg ).
Where, as before, )(k is the pulse function i.e. 1)0( = and zero elsewhere, ( )1−
q and
( )1−
qN are polynomials in the delay operator ( )1−
q . It is usually assumed that the degree of
polynomial N is less than the degree of polynomial i.e. Ndeg < deg .
Taking the Z transform of both sides we obtain:
( ) ( ) ( )zNkZzNzSz == )()(
Rearrange we get:
( )
( )z
zN
zS
=)(
Define ( ) −
−−−
++++= deg
deg
2
2
1
1
1
...1 qfqfqfq
( ) N
NqnqnqnnqN deg
deg
2
2
1
10
1
... −−−−
++++= Ndeg <deg
In the time domain, the equation ( ) ( ) )()( 11
kqNkSq −−
= could be written as:
28. 28
( ) ( ) )(...)(...1 deg
deg
2
2
1
10
deg
deg
2
2
1
1 kqnqnqnnkSqfqfqf N
N −−−−
−−
++++=++++
i.e. )deg(...)2()1()(
)deg(...)2()1()(
deg210
deg21
Nknknknkn
kSfkSfkSfkS
N −++−+−+=
−++−+−+
We study the above equation at different time instants.
k=0: )deg(...)2()1()0(
)deg(...)2()1()0(
deg210
deg21
Nnnnn
SfSfSfS
N −++−+−+=
−++−+−+
Since the initial conditions are zeros i.e.S(-1)=0=S(-2)=…=S(-deg ), and )(k is the pulse
function i.e. 1)0( = and zero elsewhere, then the above equation is reduced to:
0)0( nS =
k=1: )1deg(...)1()0()1(
)1deg(...)1()0()1(
deg210
deg21
+−++−++=
+−++−++
Nnnnn
SfSfSfS
N
which is reduced to:
11 )0()1( nSfS =+
k=2: )deg2(...)0()1()2(
)deg2(...)0()1()2(
deg210
deg21
Nnnnn
SfSfSfS
N −++++=
−++++
which is reduced to:
221 )0()1()2( nSfSfS =++
k=l> deg :
)deg(...)2()1()(
)deg(...)2()1()(
deg210
deg21
Nlnlnlnln
lSflSflSflS
N −++−+−+=
−++−+−+
29. 29
which is reduced to:
0)deg(...)2()1()( deg21 =−++−+−+ lSflSflSflS
i.e. ( ) 0)(1
= −
kSq ,k > deg
This result is independent of the shape of the polynomial ( )1−
qN as long as Ndeg <deg .Thus,
there is a polynomial ( )1−
q that when applied to the signal S(k), the output ( ) 0)(1
= −
kSq after
a transient period k > deg .This polynomial is called the annihilation polynomial. Notice that
this polynomial is nothing but the denominator of the Z transform of the signal S(k).
Example: Assume that the signal is a constant quantity i.e. S(k)=a, and “a” is unknown. The Z
transform of S(k) is given as: ( )
( ) 1
1
)( −
−
=
=
z
a
z
zN
kSZ . Thus, the annihilation polynomial
( )1−
q is deduced as: ( ) ( ) ( )111
111
−
=
−−
−== −−
qzq
qz
.
Thus, ( ) ( ) 0)1()()(1)( 11
=−=−−=−= −−
aakSkSkSqkSq .
Example: Assume that the signal is a ramp i.e. S(k)=a+b k, “a and b” are unknown. The Z
transform of S(k) is given as: ( )
( ) ( )
( )
( )21
11
21
1
1
1
1
11
)(
−
−−
−
−
−
−
+−
=
−
+
−
=
=
z
bzza
z
bz
z
a
z
zN
kSZ . Thus, the
annihilation polynomial ( )1−
q is deduced as: ( ) ( ) ( ) ( )212111
21111
−−−
=
−−
+−=−== −−
qqqzq
qz
.
Thus, ( ) ( ) )2()1(2)()(21)( 211
−+−−=+−= −−−
kSkSkSkSqqkSq
aS == )0( , k=0
30. 30
)(2)()0(2)1( baabaSS +−=−+=−= , k=1
( ) ( ) 0)(22)0()1(2)2( =++−+=+−= ababaSSS , k=2
( ) ( ) 212 −++−+−+= kbakbakba
( ) ( ) ( ) 2,02222 =−++−++−= kbbkkkbaaa
In some applications, the polynomial ( ) )(1
kSq−
is multiplied by another polynomial ( )1−
q with
finite number of elements. In this case, the above argument is still valid and we get:
( ) ( ) ( ) ( ) )()( 1111
kqNqkSqq −−−
=
−
The annihilation will occur now at:
( ) ( ) ( )= −−
deg,0)(11
kkSqq
Example: Assume that the signal is a constant quantity i.e. S(k)=a, and “a” is unknown. Assume
that ( ) ( )11
1 −−
−= bqq which is of order 1 i.e. 1deg = . The Z transform of S(k) is given as:
( )
( ) 1
1
)( −
−
=
=
z
a
z
zN
kSZ . Thus, the annihilation polynomial ( )1−
q is deduced as:
( ) ( ) ( )111
111
−
=
−−
−== −−
qzq
qz
, and 1deg =
Thus, ( ) ( ) 0)1()()(1)( 11
=−=−−=−= −−
aakSkSkSqkSq .
( ) ( ) ( )( ) ( ) )(11)(11)( 211111
kSbqqbkSqbqkSqq −−−−−
++−=−−=
−
( ) ( ) ( ) ( ) )(1)(1)( 1111
kbqakabqkqNq −−−−
−=−=
31. 31
Equating both sides we get:
( ) ( ) )(1)(11 121
kbqakSbqqb −−−
−=++−
i.e. )1()()2()1()1()( −−=−+−+− kabkakbSkSbkS
k=0: )1()0()2()1()1()0( −−=−+−+− ababSSbS
which yields aS =)0(
k=1: )0()1()1()0()1()1( ababSSbS −=−++−
which yields abSbS −=+− )0()1()1(
k=2: )1()2()0()1()1()2( ababSSbS −=++−
which yields 0)0()1()1()2( =++− bSSbS
Thus, for ( ) degk , ( ) ( ) 0)(11
= −−
kSqq .
Binomial Expansion Formula:
In some situations, the denominator ( )1−
q of some transfer function is multiplied by the
polynomial ( ) )(1
kSq−
. In this case, we expand the inverse of the denominator using the
Binomial expansion formula for n fraction (positive or negative) and 1x .
Thus, ( ) 1...,
3!2
)1(
11 32
+
+
−
++=+ xx
n
x
nn
nxx
n
32. 32
1,
0
=
=
xx
l
n
l
l
Which could be approximated as:
( ) 1,1
0
=+ =
xx
l
n
x
L
l
ln
Example: ( ) L
xxxx ....11 21
+++=−
−
Thus, ( ) )(1
kSq−
is multiplied by another polynomial ( )1
/1 −
q with finite number of elements.
In this case, the above argument is still valid and we get:
( ) ( ) ( ) ( ) )(
1
)(
1 1
1
1
1 kqN
q
kSq
q
−
−
−
=
−
The annihilation will occur now at:
( ) ( ) ( )=
−
−
deg,0)(
1 1
1
kkSq
q
Example: Assume that the signal is a constant quantity i.e. S(k)=a, and “a” is unknown. Assume
that ( ) ( ) 1,1 111
−= −−−
bqbqq . The inverse could be approximated as:
( ) ( ) ( ) ( ) ( ) ( ) 1,...1
1
1
1 1
0
1211111
1
++++=
−
=−=
−
=
−−−−−−
− bqbqbqbqbq
l
bq
q
L
l
Ll
33. 33
which is of order L i.e. L=
1
deg . The Z transform of S(k) is given as: ( )
( ) 1
1
)( −
−
=
=
z
a
z
zN
kSZ
. Thus, the annihilation polynomial ( )1−
q is deduced as: ( ) ( ) ( )111
111
−
=
−−
−== −−
qzq
qz
, and
1deg =
Thus, ( ) ( ) 0)1()()(1)( 11
=−=−−=−= −−
aakSkSkSqkSq .
( ) ( ) ( ) ( ) ( ) ( ) )(
1
1)(11)(
1
0
111111
1 kSbq
l
qkSqbqkSq
q
L
l
l
−
−=−−=
=
−−−−−−
−
( ) ( ) ( ) ( ) )(
1
)(1)(
1
0
1111
1 kbq
l
akabqkqN
q
L
l
l
−
=−=
=
−−−−
−
Thus, for ( ) degk ,
( ) ( ) 0)(
1 1
1 =
−
− kSq
q
.
Example: Assume that ( ) ( ) 1,1 1
1
11
−= −
=
−−
qbqbq i
I
i
i . The inverse could be approximated as:
( ) ( ) ( ) 1,
1
1
1 1
1 0
1
1
11
1
−
=−
−
= =
−
=
−−
− qbqb
l
qb
q
i
I
i
L
l
i
I
i
i
i l
which is of order =
I
i
iL
1
i.e. =
=
I
i
iL
1
1
deg .
Internal model principle and annihilation:
The system ( ) ( ) ( ) )()()( 111
kqCkuqBkyqA −−−
+=
has noise )(k as input. When designing the feedback loop
34. 34
( ) ( ) ( ) )()()( 111
krqTkyqSkuqR −−−
+−=
with unknown R, S, and T, the closed loop dynamics become:
The output
( ) ( )
( )
( ) ( )
( ) )()()( 1
11
1
11
k
qA
qRqC
kr
qA
qTqB
ky
cc
−
−−
−
−−
+=
and the input
( ) ( )
( )
( ) ( )
( ) )()()( 1
11
1
11
k
qA
qCqS
kr
qA
qTqA
ku
cc
−
−−
−
−−
−=
where ( ) ( ) ( ) ( ) ( )11111 −−−−−
+= qSqBqRqAqAc
Notice that the disturbance )(k appears in both the output, y(k), and the input to the system,
u(k). We need to reduce or eliminate the effect of the disturbance. If the feedback system is
stable, then the inverse of )( 1−
qAc will have a finite number of elements i.e. ( )1
1
)(
1 −
−
q
qAc
,
where ( ) ( ) ( ) 1,
1
1 1
1 0
1
1
111
−
=− −
= =
−
=
−−−
qq
l
qq i
I
i
L
l
i
I
i
i
i l
Assume that the disturbance, )(k , could be modeled as:
( ) ( ) )()( 11
kqNkq −−
=
then ( ) ( )= −
deg,0)(1
kkq
We want to, asymptotically, eliminate the disturbance from the output y(k). In order to do that
we choose )( 1−
qR such that it contains the polynomial )( 1−
q
.
35. 35
i.e. ( ) ( )11
1
1
)( −−−
= qqRqR
Substitute the expressions for R and ( )1
1
)(
1 −
−
q
qAc
, we get:
( ) ( )
( ) ( ) ( ) ( ) ( ) )(
1
)()( 1
1 0
11
1
1
1
11
kqq
l
qRqCkr
qA
qTqB
ky
I
i
L
l
i
c
i l
−
= =
−−−
−
−−
−
+=
For large values of k we get:
( ) ( )
( ) )()( 1
11
kr
qA
qTqB
ky
c
−
−−
= , k is very large.
Tracking:
In the tracking problem, we need the output y(k) to follow some known reference value r(k).
Since we usually have “d” steps delay in the system, we simply advance the reference value by
"d" steps. Assume that the feedback controller has the shape:
( ) ( ) ( ) )()()( 111
dkrqTkyqSkuqR ++−= −−−
Define ( ) ( )11 −−
= qBqqB d
d
Then for zero noise,
( ) ( )
( )
( ) ( )
( ) )()()( 1
11
1
11
kr
qA
qTqB
dkr
qA
qTqB
ky
c
d
c
−
−−
−
−−
=+=
Assume that the reference r((k) is given by: ( ) ( ) )()( 11
kqNkrq rr −−
=
Define the tracking error e(k) as:
36. 36
( ) ( )
( ) )()()()()( 1
11
kr
qA
qTqB
krkykrke
c
d
−
−−
−=−=
( ) ( )
( ) )(1 1
11
kr
qA
qTqB
c
d
−= −
−−
( ) ( ) ( )
( ) )(1
111
kr
qA
qTqBqA
c
dc
−
= −
−−−
We need to design ( )1−
qT and ( )1−
qAc such that ( ) ( ) ( ) () ( )1111
. −−−−
=− qqTqBqA rdc . This way, the
error e(k) will asymptotically go to zero.
Remember that: ( ) ( ) ( ) ( ) ( )11111 −−−−−
+= qSqBqRqAqAc
where we obtain the values of R and S through Diophantie equation with:
(1) deg S = deg A – 1, (2) deg R = deg B -1, (3) deg ( ) ( )1degdeg1
−+−
BAqAc .
Let ( ) ( ) ( )11
1
1
1
−−−
= qAqTqT c , ( ) ( ) ( )111
1
−−−
= qAqAqA cmc
Substitute for the expression of e(k) we get:
( ) ( ) ( ) ( ) ( )
( ) ( ) )()( 11
11
1
111
1
11
kr
qAqA
qAqTqBqAqA
ke
cm
cdcm
−
= −−
−−−−−
( ) ( ) ( )
( ) )(1
1
1
11
kr
qA
qTqBqA
m
dm
−
= −
−−−
Assume ( ) ( ) ( ) ( ) ( )111
1
11 −−−−−
=− qqMqTqBqA rdm
37. 37
Then
( ) ( )
( ) )()( 1
11
kr
qA
qqM
ke
m
r
−
−−
=
The error will asymptotically go to zero as we explained in the previous section.
Example: Assume that the system is described by the equation
)2()2()1()( 221 −=−+−+ kubkyakyaky
Thus, ( ) 2
2
1
1
1
1 −−−
++= qaqaqA , ( ) 2
2
1 −−
= qbqB , the delay d=2 and ( ) ( ) 2
121
bqBqqBd == −−
. The
reference input r(k) is chosen to be a constant value i.e. 1
1
1
1
1
)(,
1
1
)( −
−
−
−
=
−
=
q
qr
z
zr . Since
( ) ( ) )()( 11
kqNkrq rr −−
= , then ( ) ( ) ( ) 1,1 111
=−= −−−
qNqq rr . The feedback system is chosen
such that it is of second order and the poles are inside the unit circle i.e.
( ) ( )( )1
2
1
1
2
2
1
1
1
111 −−−−−
−−=++= qqqaqaqA ccc . From Diophantine equation, and to have a
unique solution, we choose ( ) 1
10
1 −−
+= qrrqR , ( ) 1
10
1 −−
+= qssqS .
We need to design ( )1−
qT and ( )1−
qAc such that ( ) ( ) ( ) () ( )1111
. −−−−
=− qqTqBqA rdc . For zero
delay, ( ) ( ) 2
11
bqBqBd == −−
. Choose ( ) ( ) ( ) ( )( )1
2
1
1
111
111
−−−−−
−−== qqqAqAqA cmc . i.e.
( ) ( )1
1
1
1 −−
−= qqAm , ( ) ( )1
2
1
11
−−
−= qqAc . Choose ( ) ( ) ( ) ( )1
20
11
1
1
11
−−−−
−== qtqAqTqT c
Substitute into ( ) ( ) ( ) () ( )1111
. −−−−
=− qqTqBqA rdc ,
we get:
( )( ) ( ) ()( )11
202
1
2
1
1 1.111 −−−−
−=−−−− qqtbqq
which is reduced to: ( )( ) ( )( ) ()( )11
102
1
202
1
1
1
2 1.1111 −−−−−
−=−−−=−−− qqtbqtbqq
38. 38
Choose “ 0t ” such that ( ) ( )
( )1
1
1
1
02
1
1
102 1
1
1 −−−
−=
−
−
=−− qq
tb
qtb
i.e.
( )
1
1
1
02
=
−
tb
which yields
2
1
0
1
b
t
−
= .
In summary, we choose the following values for the feedback polynomials:
( ) 1
10
1 −−
+= qrrqR , ( ) 1
10
1 −−
+= qssqS
( ) ( )( )1
2
1
1
2
2
1
1
1
111 −−−−−
−−=++= qqqaqaqA ccc = ( ) ( ) ( )( )1
2
1
1
11
111
−−−−
−−= qqqAqA cm
( ) ( )1
1
1
1 −−
−= qqAm , ( ) ( )1
2
1
11
−−
−= qqAc
( ) ( ) ( ) ( )1
20
11
1
1
11
−−−−
−== qtqAqTqT c ,
2
1
0
1
b
t
−
=
Robust Tracking:
The system dynamics, ( )1−
qA and ( )1−
qB ,are usually estimated from real data. The feedback
signals y(k) are obtained from the real system. The tracking design, however, uses estimated
model. This results in error due to model mismatch. This error will be included in the design
using the annihilation principle as explained next.
Let the true system dynamics, assuming zero external noise, be given by the equation:
( ) ( ) )()( 1*1*
kuqBkyqA −−
=
The estimated model used for the design is:
39. 39
( ) ( ) )()()( 11
kkuqBkyqA += −−
Notice the presence of the noise or disturbance term )(k that is obtained by subtracting the two
above equations as:
( ) ( ) ( ) ( ) )()()( 1*11*1
kuqBqBkyqAqAk −−−−
−−−=
As before, the output, y(k), and the input, u(k), for the closed loop system, assuming perfect
knowledge of the system, are given as:
( ) ( )
( ) )()( 1*
11*
kr
qA
qTqB
ky
c
d
−
−−
=
( ) ( )
( ) )()( 1*
11*
kr
qA
qTqA
ku
c
d
−
−−
=
Where ( ) ( ) ( ) ( ) ( )11*11*1* −−−−−
+= qSqBqRqAqAc
and ( ) ( )1*1* −−
= qAqAq d
d
Substituting for the derived expressions for y(k) and u(k), the disturbance could be expressed as
function of the reference signal r(k) as:
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
( ) )()()( 1*
11*
1*1
1*
11*
1*1
kr
qA
qTqA
qBqBkr
qA
qTqB
qAqAk
c
d
c
d
−
−−
−−
−
−−
−−
−−−=
( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) )(1
1*
1*1*11*1*1
krqT
qA
qAqBqBqBqAqA
c
dd −
−
−−−−−−
−−−
=
40. 40
( )
( ) ( ) )(1
1*
1
krqT
qA
qD
c
−
−
−
=
Where ( ) ( ) ( ) ( ) ( ) ( ) ( ) 1*1*11*1*11 −−−−−−−
−−−= qAqBqBqBqAqAqD dd
Assuming that there is error in the estimated system dynamics, we could find another expression
for y(k) as follows:
Since ( ) ( ) )()()( 11
kkuqBkyqA += −−
The closed loop output y(k) will be:
( ) ( )
( )
( )
( ) )()()( 1
1
1
11
k
qA
qR
kr
qA
qTqB
ky
cc
d
−
−
−
−−
+=
and the input
( ) ( )
( )
( )
( ) )()()( 1
1
1
11
k
qA
qS
kr
qA
qTqA
ku
cc
d
−
−
−
−−
−=
where ( ) ( ) ( ) ( ) ( )11111 −−−−−
+= qSqBqRqAqAc
Assume that the reference r(k) is given by: ( ) ( ) )()( 11
kqNkrq rr −−
=
Define the tracking error e(k) as:
( ) ( )
( ) )()()()()( 1*
11*
kr
qA
qTqB
krkykrke
c
d
−
−−
−=−=
( ) ( )
( ) )(1 1*
11*
kr
qA
qTqB
c
d
−= −
−−
41. 41
( ) ( ) ( )
( ) )(1*
11*1*
kr
qA
qTqBqA
c
dc
−
= −
−−−
This formula is function of the unknown real quantities, ( )1* −
qAc and ( )1* −
qB , and will be difficult
to use.
On the other hand, if we use the expression
( ) ( )
( )
( )
( ) )()()( 1
1
1
11
k
qA
qR
kr
qA
qTqB
ky
cc
d
−
−
−
−−
+= , we get:
( ) ( )
( )
( )
( ) )()()()()()( 1
1
1
11
k
qA
qR
kr
qA
qTqB
krkykrke
cc
d
−
−
−
−−
−−=−=
Substitute
( )
( ) ( ) )()( 1
1*
1
krqT
qA
qD
k
c
−
−
−
=
We get
( ) ( )
( )
( )
( )
( )
( ) ( ) )()()()( 1
1*
1
1
1
1
11
krqT
qA
qD
qA
qR
kr
qA
qTqB
krke
ccc
d −
−
−
−
−
−
−−
−−=
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) )(11*
111111*11*
kr
qAqA
qTqDqRqTqBqAqAqA
cc
dccc
−−
= −−
−−−−−−−−
We need to design ( )1−
qT , ( )1−
qR and ( )1−
qAc such that
( ) ( ) ( ) ( ) ( ) ( ) ( ) () ( )11111111*
. −−−−−−−−
=−− qqTqDqRqTqBqAqA rdcc . This way, the error e(k) will
asymptotically go to zero.
Let ( ) ( ) ( )111
1
−−−
= qAqAqA mcc
( ) ( ) ( )1
1
11
1
−−−
= qTqAqT c
43. 43
zero delay, d=2, ( ) ( ) 2
11
bqBqqB d
d == −−
. The reference input r(k) is chosen to be a constant
value i.e. 1
1
1
1
1
)(,
1
1
)( −
−
−
−
=
−
=
q
qr
z
zr .
Since ( ) ( ) )()( 11
kqNkrq rr −−
= , then ( ) ( ) ( ) 1,1 111
=−= −−−
qNqq rr .
We need to find the polynomials R, S, T such that the tracking error asymptotically goes to zero
even though the estimated values of A and B are not the correct values ( )1* −
qB and ( )1* −
qA .
The feedback system is chosen such that it is of second order and the poles are inside the unit
circle i.e. ( ) ( )( )1
2
1
1
2
2
1
1
1
111 −−−−−
−−=++= qqqaqaqA ccc . From Diophantine equation, and to
have a unique solution, we choose ( ) 1
10
1 −−
+= qrrqR , ( ) 1
10
1 −−
+= qssqS .
Since ( ) ( ) ( ) ( )( )11111
10
1
111
−−−−−−
−==+= qqRqqRqrrqR r ,
then choose 01 rr −= . and ( ) 0
1
1
rqR =−
. Thus, ( ) ( )1
0
1
1 −−
−= qrqR
Let ( ) ( ) ( ) ( )( )1
2
1
1
111
111
−−−−−
−−== qqqAqAqA mcc
e.g. ( ) ( )1
1
1
1 −−
−= qqAm , ( ) ( )1
2
1
11
−−
−= qqAc
choose ( ) ( ) ( ) ( )1
20
1
1
11
11
−−−−
−== qtqTqAqT c , i.e. ( ) 0
1
1 tqT =−
then ( ) ( ) ( ) ( ) ( ) ( ) ( ) 1
1
111111
1
−−−−−−−
−=− qTqBqAqAqTqBqA dmcdc
( )( ) ( ) ( ) 1
012
1
0
1
1
1
2
1
11 11
−−−−−
+−=−−= qtbqAtqbqqA cc
44. 44
Choose ( ) ( ) ( ) ( ) ( )111
1
11 −−−−−
=− qqMqTqBqA rdm
i.e.
( ) ( )( )111
102 11 −−−
−=−− qqMqtb
which yields ( ) 1
1
=−
qM ,
( )
1
1
1
02
=
−
tb
, i.e.
2
1
0
1
b
t
−
=
In summary, the values, not unique, for the R, S, T polynomials, to have asymptotic zero
tracking, are:
( ) ( )( )1
2
1
1
1
11 −−−
−−= qqqAc Assumed
( ) ( )1
0
1
1 −−
−= qrqR Obtained from Diophantine equation
( ) 1
10
1 −−
+= qssqS Obtained from Diophantine equation
( ) ( )1
2
2
11
1
1 −−
−
−
= q
b
qT
45. 45
Blind Signal Separation and the Aortic Pressure
In this problem, there is one unknown pressure source (the Aorta pressure u(t)) and several
unknown paths or channels )(thi that generate several known pressures )(tyi at remote sites
from the Aorta. Thus the measured output is the convolution "*" of the input with the channel,
)(*)()( thtuty ii =
i.e. )()()( zhzuzy ii =
Convolving channel j with )(tyi and channel i with )(tyj , we get:
)(*)(*)()(*)( ththtuthty jiji =
)(*)(*)()(*)( ththtuthty ijij =
The right hand sides of both equations are equal. Thus,
)(*)()(*)( thtythty jiij =
i.e. )()()()( zhzyzhzy jiij =
The channels could be estimated from this equation. This is a special case of Multi-Channel
Blind Deconvolution.
One unknown input and two known outputs:
46. 46
Assume that there are only two known outputs, )(),( 21 tyty ; the pressure at the iliac and femoral
arteries respectively. Assume further that the unknown channel is modeled as a first order linear
channel i.e.
1
11011 )( −
+= zhhzh and
1
12022 )( −
+= zhhzh . The measured pressures are assumed to
have the Z transform 2
21
1
1101
1
1101
1 )( −−
−
++
+
=
zbzbb
zaa
zy and 2
22
1
1202
1
1202
2 )( −−
−
++
+
=
zbzbb
zaa
zy . Since
)()()()( 2112 zhzyzhzy =
Then ( ) ( )1
12022
21
1
1101
1
11011
11012
22
1
1202
1
1202 −
−−
−
−
−−
−
+
++
+
=+
++
+
zhh
zbzbb
zaa
zhh
zbzbb
zaa
We need to find an estimate for the channels and the source (the Aortic pressure u(t)).
Rearrange the above equation we get:
( )( )( ) ( )( )( )2
22
1
1202
1
1202
1
1101
2
21
1
1101
1
1101
1
1202
−−−−−−−−
++++=++++ zbzbbzhhzaazbzbbzhhzaa
Equating the coefficients of equal powers we get 5 independent equations:
( )( )( ) ( )( )( )020201010102 bhabha = or
=
0102
0201
0201
ba
ba
hh
For :1−
z ( ) ( )020211021201120201010112011102110102 bhabhabhabhabhabha ++=++
i.e. ( ) ( ) ( ) ( ) 12020102021112011101020101121102 hbahbabahbahbaba ++=++
Substituting
=
0102
0201
0201
ba
ba
hh and
=
2112
2211
1211
ba
ba
hh we get:
47. 47
( ) ( ) ( ) ( ) 120201020211120112
2112
2211
010202
0102
0201
01121102 hbahbabah
ba
ba
bah
ba
ba
baba ++=
+
+
For :2−
z ( ) ( )021212120211121201220201011112110112111102210102 bhabhabhabhabhabhabhabha +++=+++
i.e. ( ) ( ) ( ) ( ) 1202121201021211220111011211020111122102 hbabahbabahbabahbaba +++=+++
Substitute
=
2112
2211
1211
ba
ba
hh and
=
0102
0201
0201
ba
ba
hh we get:
( ) ( ) ( ) ( ) 1202121201021211220112
2112
2211
0112110202
0102
0201
11122102 hbabahbabah
ba
ba
babah
ba
ba
baba +++=
++
+
For :3−
z ( ) ( )121211220211221201111112210112211102 bhabhabhabhabhabha ++=++
i.e. ( ) ( ) ( ) ( ) 12121122010222111111122102012112 hbabahbahbabahba ++=++
Substitute
=
2112
2211
1211
ba
ba
hh and
=
0102
0201
0201
ba
ba
hh we get:
( ) ( ) ( ) ( ) 121211220102221112
2112
2211
1112210202
0102
0201
2112 hbabahbah
ba
ba
babah
ba
ba
ba ++=
++
For :4−
z ( ) ( )221211211112 bhabha = or
=
2112
2211
1211
ba
ba
hh
Solving these nonlinear coupled equation, one would be able to get an estimate for the unknown
channel parameters.
The Aortic pressure, u(t), is obtained from the equation:
48. 48
)(
)(
)(
zy
zh
zu
i
i
=
The above equations are approximate because we have ignored the presence of noise. Instead, we
use regression analysis to find an estimate of the channels as follows:
)()()()( 2112 zhzyzhzy =
i.e. ( ) ( ) )()( 1
1
12022
1
1101 zyzhhzyzhh −−
+=+
In the time domain the above equation is written as:
)1()()1()( 112102211201 −+=−+ kyhkyhkyhkyh
In a matrix format, and for k=1 till N, we get:
0
)1()()1()(
............
)1()2()1()2(
)0()1()0()1(
12
02
11
01
1122
1122
1122
=
−−−−
−−
−−
h
h
h
h
NyNyNyNy
yyyy
yyyy
If we choose, for example, 01h , as the numeraire i.e. it is known say 1, we get:
)()1()()1( 201112102211 kyhkyhkyhkyh =−−−−
Which has the matrix format:
=
−−−−
−−
−−
)(
)2(
)1(
)1()()1(
)1()2()1(
)0()1()0(
2
2
2
01
12
02
11
112
112
112
Ny
y
y
h
h
h
h
NyNyNy
yyy
yyy
49. 49
Solving, we get an estimate of 11h , 02h and 12h in terms of 01h .
One source and two known outputs and the channels have numerator and denominator:
Assume as before, that we need to get an estimate of the pressure at the root of the Aorta u(t). We
have two known measurements, )(1 ty and )(2 ty where 2
21
1
1101
1
1101
1 )( −−
−
++
+
=
zbzbb
zaa
zy and
2
22
1
1202
1
1202
2 )( −−
−
++
+
=
zbzbb
zaa
zy . It happened that both the unknown channels could be better modeled
as numerator and denominator i.e.: 1
1101
1
1101
1 )( −
−
+
+
=
z
z
zh
and 1
1202
1
1202
1 )( −
−
+
+
=
z
z
zh
We need to find an estimate for the channels and the Aortic pressure.
Two unknown inputs and three known outputs:
For exposition purposes assume that we have two unknown sources )(),( 21 tutu and three
measurements )(),(),( 321 tytyty that are the convolution of the sources with unknown linear
time invariant finite impulse response (FIR) filters. This could be represented by the equation:
+
=
)(
)(
)(
)(
)(
*
)()(
)()(
)()(
)(
)(
)(
3
2
1
2
1
3231
2221
1211
3
2
1
t
t
t
tu
tu
thth
thth
thth
ty
ty
ty
Where "*" is the convolution operation, )(ti is the ith error or noise.
The objective is to find an estimate of the source signals )(),( 21 tutu .
The above equation could be written in the Z domain as:
51. 51
zhzhzhzh
zyzhzyzh
zu
zhzhzhzh
zyzhzyzh
()()()(
)()()()(
)(
)()()()(
)()()()(
32111231
311131
2
22111221
211121
−
−
−
−
i.e.
)()()()()()()()(
)()()()(()()()(
31113122111221
21112132111231
zyzhzyzhzhzhzhzh
zyzhzyzhzhzhzhzh
−−
−−
Through regression analysis, one could find an estimate for )()()()( 31222132 zhzhzhzh +− ,
)()()()( 32111231 zhzhzhzh +− , and consequently an estimate for )(2 zu is obtained using, for
example, )()()()()()()()()( 222111221211121 zuzhzhzhzhzyzhzyzh −−
The above steps could be repeated for )(1 zu . Thus, the two sources are obtained.
Example: To further simplify the analysis, assume that the filters are first order i.e.
1
11)( −
+= zhzh ijij i=1,2,3 , j=1,2
Since
)()()()()()()()(
)()()()(()()()(
31113122111221
21112132111231
zyzhzyzhzhzhzhzh
zyzhzyzhzhzhzhzh
−−
−−
Expanding we get:
)()()()()()()()()()()()(
)()(()()()()()(()()()(
1312211122131122111221
1213211123121132111231
zyzhzhzhzhzhzyzhzhzhzhzh
zyzhzhzhzhzhzyzhzhzhzhzh
−+−−
−+−−
Collecting terms we get:
)()()()()()(
)()()()()()()(()()()(
)()(()()()(
31122111221
131221112212132111231
21132111231
zyzhzhzhzhzh
zyzhzhzhzhzhzhzhzhzhzh
zyzhzhzhzhzh
−−
−−−+
−−
Substituting the expressions for the filters we get:
( )( ) ( )( ) ( )
( ) ( ) ( )
( ) ( ) ( ) )(1)()(
)(1)()(
)(1)(
3
1
111
2
221111121211
1
221111121211
1
1
311
2
311221321211
1
311221211321
2
1
111
2
321111121311
1
321111311121
zyzhzhhhhzhhhh
zyzhzhhhhzhhhh
zyzhzhhhhzhhhh
−−−
−−−
−−−
++−++++−
++−++++−+
++−++++−
52. 52
Define: ( )( ))( 3211113111211 hhhh +++−=
( )( )3211111213112 hhhh +−=
( ))()( 3112212113213 hhhh +++−=
( )3112213212114 hhhh +−=
( ))()( 2211111212115 hhhh +++−=
( )2211111212116 hhhh +−=
Then 2
6
1
522111221 )()()()( −−
−−=− zzzhzhzhzh
And )()()()()( 2
2
6
1
5211121 zuzzzyzhzyzh −−
−−−
Thus the above equation could be written compactly as:
( ) ( ) ( ) )(1)(1)(1 3
1
111
2
6
1
51
1
311
2
4
1
32
1
111
2
2
1
1 zyzhzzzyzhzzzyzhzz −−−−−−−−−
+++++++
and for )(2 zu we have:
)()()()()()()()()( 222111221211121 zuzhzhzhzhzyzhzyzh −−
i.e. )()()()()()()()()( 222111221211121 zuzhzhzhzhzyzhzyzh −−
Collecting terms we get:
( ) ( )
( ) )(
)()(
3
3
1116
2
61115
1
5
1
3
3114
2
43113
1
32
3
1112
2
21111
1
1
zyzhzhz
zyzhzhzzyzhzhz
−−−
−−−−−−
+++
+++++++
In the time domain we get:
( ) ( )
( ) )3()2()1(
)3()2()1()3()2()1(
3111636111535
13114143113132111222111121
−+−++−
−+−++−+−+−++−
kyhkyhky
kyhkyhkykyhkyhky
Shifting time by one we get:
53. 53
( ) ( )
( ) )2()1()(
)32()1()()2()1()(
3111636111535
13114143113132111222111121
−+−++
−+−+++−+−++
kyhkyhky
kyhkyhkykyhkyhky
Through regression analysis one should be able to find an estimate for only five of the six
unknown coefficients that represent the transfer functions. The fifth coefficient
( ))()( 2211111212115 hhhh +++−= will be taken as the numeraire. Specifically:
( ) ( )
( )
−+−
+
+
−+−
+
++
−+−
+
+
)2()1()(
)2()1()()2()1()(
3
5
1116
3
5
61115
3
1
5
3114
1
5
43113
1
5
3
2
5
1112
2
5
21111
2
5
1
ky
h
ky
h
ky
ky
h
ky
h
kyky
h
ky
h
ky
Rearrange in the regression format, we get:
( ) ( )
( )
−+−
+
++
−+−
+
++−−−
+
−
)2()1()(
)2()1()()2()1()(
1
5
3114
1
5
43113
1
5
3
2
5
1112
2
5
21111
2
5
1
3
5
1116
3
5
61115
3
ky
h
ky
h
ky
ky
h
ky
h
kyky
h
ky
h
ky
Another two similar equations could be obtained and from which we could get estimates for all
the six parameters. The filter coefficients 1ijh are then estimated from the estimated i . Once
estimated, we use these filter coefficients to find an estimate for the unknown sources using:
zhzhzhzh
zyzhzyzh
zu
zhzhzhzh
zyzhzyzh
()()()(
)()()()(
)(
)()()()(
)()()()(
32111231
311131
2
22111221
211121
−
−
−
−
Which yields
)()()()()( 2
2
6
1
5211121 zuzzzyzhzyzh −−
−−−
5
2111121121
2
5
6
2
)1()1()()(
)2()1(
−+−−+−
+−
−
−
kyhkyhkyky
kuku
54. 54
or
5
2111121121
2
5
6
2
)()()1()1(
)1()(
kyhkyhkyky
kuku
+−+++−
+−
−
In matrix format and for N data points we have:
121212 += UHY
Where
−−−+−−−
−+−
−+−
=
)2()2(13()1((
.
.
.
)2()2()3()3((
)1()1()2()2((
2111121121
2111121121
2111121121
12
NyhNyhNyNy
yhyhyy
yhyhyy
Y ,
2U =,
− )1(
.
.
.
)1(
)0(
2
2
2
Nu
u
u
, 1 =
− )3(
.
.
.
)1(
)0(
1
1
1
N
, and 12H =
−−
−−
−−
56
56
56
...0
...........
00
...0
Once the coefficients of the FIR filters are estimated, we use inverse filtering to find and
estimate 2
ˆU for the source signal 2U as follows:
( ) 12
1
1212122
ˆˆˆˆ YHHHU TT −
=
Where “T” stands for transpose, and ”^” on top of the variable symbol means the estimate of that
variable.
55. 55
Adaptive Control
Adaptive Control covers a set of techniques which provide a systematic approach for automatic
adjustment of controllers in real time, in order to achieve or to maintain a desired level of control
system performance when the parameters of the plant dynamic model are unknown and/or
change in time. Consider the case when the parameters of the dynamic model of the plant change
unpredictably in time. These situations occur either because the environmental conditions change
(e.g. the dynamical characteristics of the left ventricle of the heart depend upon the load) or
because we have considered simplified linear models for nonlinear systems (a change in
operation condition will lead to a different linearized model). These situations may also occur
simply because the parameters of the system are slowly time-varying. In order to achieve and to
maintain an acceptable level of control system performance when large and unknown changes in
model parameters occur, an adaptive control approach has to be considered. In such cases, the
adaptation will operate most of the time and the term non-vanishing adaptation fully
characterizes this type of operation (also called continuous adaptation).
In order to design and tune a good controller, one needs to:
(1) Specify the desired control loop performances.
(2) Know the dynamic model of the plant to be controlled.
(3) Possess a suitable controller design method making it possible to achieve the desired
performance for the corresponding plant model.
An adaptive control system measures a certain performance index (IP) of the control system
using the inputs, the states, the outputs and the known disturbances. From the comparison of the
measured performance index and a set of given ones, the adaptation mechanism modifies the
56. 56
parameters of the adjustable controller and/or generates an auxiliary control in order to maintain
the performance index of the control system close to the set of given ones (i.e., within the set of
acceptable ones).
Parameter Adaptation Algorithm:
The parameter adaptation algorithm(PAA) forms the essence of the adaptation mechanism used
to adapt either the parameter of the controller directly (in direct adaptive control), or the
parameters of the adjustable predictor of the plant output.
The development of the PAA schemes assumes that the “models are linear in parameters”, i.e.,
one assumes that the plant model admits a representation of the form:
)()1( kky
T
=+
Where is the vector of unknown parameters, and )(k is the vector of measurements. This
form is also known as a “linear regression”. The objective will be to estimate the unknown
parameter vector given in real time y(k+1) and )(k . Then, the estimated parameter vector
denoted ˆ will be used for controller redesign in indirect adaptive control. The parameter
adaptation algorithms will be derived with the objective of minimizing a criterion on the error
between the plant and the model, or between the desired output and the true output of the closed-
loop system.
The parameter adaptation algorithms have a recursive structure, i.e., the new value of the
estimated parameters is equal to the previous value plus a correcting term which will depend on
the most recent measurements. The general structure of the parameter adaptation algorithm is as
follows:
57. 57
)1()()()(ˆ)1(ˆ ++=+ kvkkFkk
Where )(kF denotes the adaptation gain, and )1( +kv denotes the adaptation error which is the
function of the plant-model error.
This structure corresponds to the so-called integral type adaptation algorithms(the algorithm has
memory and therefore maintains the estimated value of the parameters when the correcting terms
become null). The algorithm can be viewed as a discrete time integrator fed at each instant by the
correcting term. The measurement function vector is generally called the observation vector. The
prediction error function is generally called the adaptation error.
As will be shown, there are more general structures where the integrator is replaced by other
types of dynamics, i.e., the new value of the estimated parameters will be equal to a function of
the previous parameter estimates (eventually over a certain horizon) plus the correcting term.
The adaptation gain plays an important role in the performances of the parameter adaptation
algorithm and it may be constant or time-varying. The problem addressed is the synthesis and
analysis of parameter adaptation algorithms in a deterministic environment.
Parameter Adaptation Algorithms (PAA)—Examples
Several approaches can be considered for deriving parameter adaptation algorithms:
•heuristic approach;
•gradient technique;
•least squares minimization;
58. 58
•stability;
•rapprochement with Kalman filter.
Gradient Algorithm:
The aim of the gradient parameter adaptation algorithm is to minimize a quadratic
criterion in terms of the prediction error. Consider the discrete-time model of a plant described
by:
)()()()1( 11 kkubkyaky
T
=+−=+
Where T
kukyk )()()( −= , T
bak 11)( = .
The adjustable prediction model will be described in this case by:
)()(ˆ)()(ˆ)()(ˆ)1(ˆ 11 kkkukbkykaky
To
=+−=+
Where )1(ˆ +kyo
is termed the a priori predicted output depending on the values of the estimated
parameters at instant k.
and T
kbkak )(ˆ)(ˆ)(ˆ
11=
is the estimated parameter vector at instant k.
As it will be shown later, it is very useful to consider also the a posteriori predicted output computed on
the basis of the new estimated parameter vector at k+1, )1(ˆ + k , which will be available somewhere
between k +1 and k +2. The a posteriori predicted output will be given by:
59. 59
)()1(ˆ)()1(ˆ)()1(ˆ)1(ˆ 11 kkkukbkykaky
T
+=+++−=+
One defines an a priori prediction error as:
)()(ˆ)1()1(ˆ)1()1( kkkykykyk
Too
−+=+−+=+
and an a posteriori prediction error as:
)()1(ˆ)1()1(ˆ)1()1( kkkykykyk
T
+−+=+−+=+
Where )(ky is the desired output (for tracking).
The objective is to find a recursive parameter adaptation algorithm with memory. The structure
of such an algorithm is:
( ))1(),(),(ˆ)(ˆ)(ˆ)(ˆ)1(ˆ ++=+=+ kkkfkkkk o
The correction term ( ))1(),(),(ˆ + kkkf o
must depend solely on the information available at
the instant (k+1) when y(k+1) is acquired (last measurement y(t+1), )(ˆ k , and a finite amount
of information at times k, k-1, k-2,..., k-n). The correction term must enable the following
criterion to be minimized at each step:
2
)(ˆ)(ˆ
)1()1( minmin +=+
kkJ o
kk
A solution can be provided by the gradient technique.
If the iso-criterion curves (J=const) are represented in the plane of the parameters 1a , 1b ,
concentric closed curves are obtained around the minimum value of the criterion, which is
60. 60
reduced to the point ( 1a , 1b ) corresponding to the parameters of the plant model. As the value of
J= constant increases, the iso-criterion curves move further and further away from the minimum.
In order to minimize the value of the criterion, one moves in the opposite direction of the
gradient to the corresponding iso-criterion curve. This will lead to a curve corresponding to J=
constant, of a lesser value. The corresponding parametric adaptation algorithm will have the
form:
)(ˆ
)1(
)(ˆ)1(ˆ
k
kJ
Fkk
+
−=+
Where F=αI (α >0) is the matrix adaptation gain (I—unitary diagonal matrix) and
)(ˆ
)1(
k
kJ
+
is the
gradient of the criterion with respect to )(ˆ k . Thus, one obtains:
)1(
)(ˆ
)1(
2
)(ˆ
)1(
+
+
=
+
k
k
k
k
kJ o
o
Since )(
)(ˆ
)1(
k
k
ko
−=
+
, and )()(ˆ)1()1(ˆ)1()1( kkkykykyk
Too
−+=+−+=+ , then
)1()(2
)(ˆ
)1(
+−=
+
kk
k
kJ o
and )1()(2)(ˆ)1(ˆ ++=+ kkFkk o
where F is the matrix adaptation gain. There are two possible choices:
1. F=αI; α>0
61. 61
2. F>0 (positive definite matrix)
The parameter adaptation algorithm presents instability risks if a large adaptation gain
(respectively a large α) is used. If the adaptation gain is large near the optimum, one can move
away from this minimum instead of getting closer.
Improved Gradient Algorithm:
In order to assure the stability of the PAA for any value of the adaptation gain α (or of the
eigenvalues of the gain matrix F) the same gradient approach is used but a different criterion is
considered:
2
)1(ˆ)1(ˆ
)1()1( minmin +=+
++
kkJ
kk
and )1(
)1(ˆ
)1(
2
)1(ˆ
)1(
+
+
+
=
+
+
k
k
k
k
kJ
Since )(
)1(ˆ
)1(
k
k
k
−=
+
+
, and )()1(ˆ)1()1(ˆ)1()1( kkkykykyk
T
+−+=+−+=+ , then
)1()(2
)1(ˆ
)1(
+−=
+
+
kk
k
kJ
and )1()(2)(ˆ)1(ˆ ++=+ kkFkk
This algorithm depends on ε(k+1), which is a function of )1(ˆ + k . For implementing this
algorithm, ε(k+1) must be expressed as a function of )1( +ko
,i.e.
62. 62
( ))1(),(),(ˆ)1( +=+ kkkfk o
i.e. )()1(ˆ)1()1(ˆ)1()1( kkkykykyk
T
+−+=+−+=+
Adding and subtracting )()(ˆ kk
T
we get:
)()(ˆ)1(ˆ)()(ˆ)1()1(ˆ)1()1( kkkkkkykykyk
TT
−+−−+=+−+=+
We know that: )()(ˆ)1()1(ˆ)1()1( kkkykykyk
Too
−+=+−+=+
and )1()(2)(ˆ)1(ˆ ++=+ kkFkk
Substitute we get:
)()(ˆ)1(ˆ)()(ˆ)1()1(ˆ)1()1( kkkkkkykykyk
TT
−+−−+=+−+=+
)1()()(2)1( +−+= kkFkk To
from which the desired relation between ε(t+1)and )1( +ko
is obtained as:
)()(21
)1(
)1(
kFk
k
k T
o
+
+
=+
and )1()(2)(ˆ)1(ˆ ++=+ kkFkk
)1(
)()(21
)(2
)(ˆ +
+
+= k
kFk
kF
k o
T
which is a stable algorithm irrespective of the value of the gain matrix F(positive definite).
63. 63
Recursive Least Squares Algorithm:
When using the Gradient Algorithm, )1(2
+k is minimized at each step or, to be more precise, one
moves in the quickest decreasing direction of the criterion, with a step depending on F. The
minimization of )1(2
+k at each step does not necessarily lead to the minimization of:
+
k
k )1(2
On the other hand, in order to obtain a satisfactory convergence speed at the beginning when the
optimum is far away, a high adaptation gain is preferable. In fact, the least squares algorithm offers such
a variation profile for the adaptation gain. The same equations as in the gradient algorithm are
considered for the plant, the prediction model, and the prediction errors. The aim is to find a recursive
algorithm which minimizes the least squares criterion:
=
−−=
k
i
T
k
ikiykJ
1
2
)(ˆ
)1()(ˆ)()(min
Where )1()(ˆ)1()(ˆ)1()(ˆ
11 −+−−=− iukbiykaikT
Therefore, this is the prediction of the output at instant i (i≤k) based on the parameter estimate at
instant k obtained using k measurements. We need to estimate the parameter vector )(ˆ kT
at
instant k so that it minimizes the sum of the squares of the differences between the output of the
plant and the output of the prediction model on a horizon oft measurements. The value ofˆ
)(ˆ kT
, which minimizes the error criterion, is obtained by seeking the value that cancels
δJ (t)/δ )(ˆ kT
:
64. 64
i.e. =
−−−−==
k
i
T
iikiy
k
kJ
1
)1()1()(ˆ)(20
)(ˆ
)(
which yields ==
−=
−−
k
i
k
i
T
iiykii
11
)1()()(ˆ)1()1(
Rearrange we get:
=
−
=
−
−−=
k
i
k
i
T
iiyiik
1
1
1
)1()()1()1()(ˆ
=
−=
k
i
iiykF
1
)1()()(
Where
−−= =
−
k
i
T
iikF
1
1
)1()1()(
This estimation algorithm is not recursive. In order to obtain a recursive algorithm, the
estimation of )1(ˆ + k is written as:
+
=
−+=+
1
1
)1()()1()1(ˆ
k
i
iiykFk
Where
)()()()()()1()1()1()1()1( 1
1
1
1
1
kkkFkkiiiikF TT
k
i
T
k
i
T
+=+
−−=
−−=+ −
=
+
=
−
Which yields )()()1()( 11
kkkFkF T
−+= −−
We now find an expression for )1(ˆ + k as function of )(ˆ k :
65. 65
)1(ˆ)(ˆ)1(ˆ ++=+ kkk
We know that:
++−+=−+=+ =
+
=
)()1()1()()1()1()()1()1(ˆ
1
1
1
kkyiiykFiiykFk
k
i
k
i
)()1()(ˆ)()1( 1
kkykkFkF +++= −
Substituting )()()1()( 11
kkkFkF T
−+= −−
we get:
( ) )()(ˆ)1()()(ˆ)1()1()1(ˆ 1
kkkykkkFkFk T
−++++=+ −
Since )()(ˆ)1()1(ˆ)1()1( kkkykykyk
Too
−+=+−+=+
Then )1()()1()(ˆ)1(ˆ +++=+ kkkFkk o
The adaptation algorithm above has a recursive form similar to the gradient algorithm given
before except that the gain matrix F(t+1) is now time-varying since it depends on the
measurements (it automatically corrects the gradient direction and the step length). A recursive
formula for F(t+1) remains to be given from the recursive formula of )1(1
+−
kF . This is
obtained by using the matrix
Inversion lemma which states that:
( ) ( ) FHFHHRFHFHHRF TTT 1111 −−−−
+−=+
In our case, )(kH = , R=I, and we obtain:
66. 66
)()()(1
)()()()(
)()1(
kkFk
kFkkkF
kFkF T
T
+
−=+
The initial values are given as:
3.1,)0( −= eIF
The recursive least squares algorithm in fact gives less and less weight to the new prediction
errors and thus to the new measurements. Consequently, this type of variation of the adaptation
gain is not suitable for the estimation of time-varying parameters, and other variation profiles for
the adaptation gain must therefore be considered. Under certain conditions, the adaptation gain is
a measure of the evolution of the covariance of the parameter estimation error.
The least squares algorithm presented up to now for )(ˆ k of dimension 2 may be generalized
for any dimensions resulting from the description of discrete time systems of the form:
( )
( ) )()( 1
1
ku
qA
qBq
ky
d
−
−−
=
Where ( ) A
A
n
n qaqaqA −−−
+++= ...1 1
1
1
( ) B
B
n
n qbqbqB −−−
+++= ...1 1
1
1
And could be written as:
)()1()1()1(
11
kidkubikyaky T
n
i
i
n
i
i
BA
=+−−+−+−=+ ==
Where BA nn
T
bbaa ,...,,,..., 11=
67. 67
and )1(),...,(),1(),...()( +−−−+−−−= BA ndkudkunkykyk
The a priori adjustable predictor is given in the general case by:
)()(ˆ)1()(ˆ)1()(ˆ)1(ˆ
11
kkidkukbikykaky T
n
i
i
n
i
i
o
BA
=+−−+−+−=+ ==
And the error is: )()(ˆ)1()1(ˆ)1()1( kkkykykyk
Too
−+=+−+=+
Adaptive Tracking:
In the adaptive tracking, the system dynamics has unknown parameters and we are interested in
making the output y(k) follows a desired output )(*
ky , also r(k) is known .
The plant model (with unknown parameters) is assumed to be described by:
( ) ( ) ( ) )()()( 1*111
kuqBqkuqBqkyqA dd −−−−−−
==
Notice that we could use the desired output y*(k) or the estimated output )(ˆ kyo
in the above equation.
)()(ˆ)1()1(ˆ)1()1( kkkykykyk
Too
−+=+−+=+
Define the error term )1(ˆ)1(*)1( ++−++=++ dkydkydk oo
It desired to find the control u(k):
68. 68
)(ˆ),...,2(),1(),...,1(),()( kkukukykyfku u −−−=
such that: 0)1(ˆ)1(*)1(lim =++−++=++
→
dkydkydk oo
k
The next step toward the design of an adaptive control scheme is to replace the fixed controller
by an adjustable controller. Since the performance error for a certain value of plant model
parameters will be caused by the misalignment of the controller parameters values, it is natural to
consider an adjustable controller which has the same structure as in the linear case with known
plant parameters and where the fixed parameters will be replaced by adjustable ones. It will be
the task of the adaptation algorithm to drive the controller parameters towards the values
assuring that 0)1(ˆ)1(*)1(lim =++−++=++
→
dkydkydk oo
k
. Therefore, the control law
in the adaptive case will be chosen as:
( ) )(ˆ)(),(ˆ)(),(ˆ 1*11
krqTkyqkSkuqkR −−−
=+ , r(k) is given
The Diophantine equation now becomes:
( ) ( ) ( )11111
),(ˆˆ),(ˆˆ −−−−−
=+ qAqkSqBqkRqA c
Where ( )1−
qAc is assumed by the designer.
Thus, for a given estimated values of ( )1ˆ −
qA and ( )1ˆ −
qB , we find ),(ˆ 1−
qkR and ),(ˆ 1−
qkS as we did
before, and from ( ) )(ˆ)(),(ˆ)(),(ˆ 1*11
krqTkyqkSkuqkR −−−
=+ , we get an estimate for u(k). Notice
that r(k) and y*(k) are given and we estimate u(k).
69. 69
Example: ADAPTIVE CONTROL OF THE HUMAN GLUCOSE-REGULATORY SYSTEM
The human blood-glucose metabolism is a nonlinear system whose structure and parameters are
imperfectly known. However, such a model is too complex to be useful for control purposes. A simple
linear stochastic model of the glucose system is assumed, and provision is made for time variation of the
parameters, corresponding to real-system nonlinearities. The adaptive control algorithm is used to
maintain a constant predetermined glucose concentration in a human subject.
A simple 2nd-order discrete time linear model of the glucose system will be considered. Model
parameters may be estimated online using a recursive least-squares estimator. The system parameters
are used in the minimum-variance control strategy which contains implicit prediction of the output.
Modelling: Many models of varying degrees of complexity exist for the glucose metabolic system. The
requirements that the model parameters must be identified online and that the model must be suitable
for design of a control strategy eliminate the possibility of using any of the available nonlinear models.
Offline identification experiments indicated that a 2nd-order linear model was sufficient to represent
the major characteristics, for control purposes, of the system. The 2nd-order linear model used is given
below:
)()()( 32211
1
tuktxktxk
dt
dx
+−−=
)()( 2514
2
txktxk
dt
dx
−=
Where )(1 tx represents the deviation of plasma-glucose concentration in mg/100 ml from the fasting
level, )(2 tx is a measure of hormone (insulin) deviation from the fasting level, u(t) is the glucose-
infusion rate in gm/min and is unknown to be estimated, 1k ... 5k are positive rate constants.
70. 70
A discrete-time version of the above equations, reflecting the presence of the delay and disturbances, is
given by:
)()2()1()2()1()( 2121 nednubdnubnyanyany +−−+−−=−+−+
where n = discrete-time index, d = number of sampling intervals in transport delay = 18, y(n)= measured
glucose concentration at interval n, and e(n) = disturbance at interval n.
In the following, let 1−
z be the unit-delay operator, and let ( ) 2
2
1
1
1 −−−
+= zazazA ,
( ) 2
2
1
1
1 −−−
+= zbzbzB , ( ) 2
2
1
1
1 −−−
+= zczczC . The disturbance e(n) is assumed to be colored noise of
the form ( )( ) )(1)( 1
nzCne −
+= where )(n is a sample of a stationary independent Gaussian zero-
mean unit variance sequence.
Identification: System identification implies the estimation of the parameter set 212121 ,,,,, ccbbaa .
Initially, a priori estimates of the parameters set 212121 ,,,,, ccbbaa are chosen. Provided that data are
available over at least six intervals, a sequence of four values of e(n) can be estimated from the
equation:
)()2()1()2()1()( 2121 nednubdnubnyanyany +−−+−−=−+−+
Eliminating the noise we get:
( )
( ) )()( 1
1
ku
qA
qBq
ky
d
−
−−
=
which could be written as:
)()1()1()1(
2
1
2
1
kidkubikyaky T
i
i
i
i =+−−+−+−=+ ==
71. 71
Where 2121 ,,, bbaaT
=
and )1(),(),1(),()( −−−−−−= dkudkukykyk
The a priori adjustable predictor is given by:
)()(ˆ)1()(ˆ)1()(ˆ)1(ˆ
2
1
2
1
kkidkukbikykaky T
i
i
i
i
o
=+−−+−+−=+ ==
)()(ˆ)1(*)1(ˆ)1(*)1( kkkykykyk
Too
−+=+−+=+ , )1(* +ky is given (set point)
and )1()(2)(ˆ)1(ˆ ++=+ kkFkk o
where F is the matrix adaptation gain, F=αI; α>0, I is the unity matrix, and α is in the order of
3
10−
. The other feedback polynomials are obtained from the Diophantine equation:
( ) ( ) ( )11111
),(ˆˆ),(ˆˆ −−−−−
=+ qAqkSqBqkRqA c , ( )1−
qAc is given
The algorithm proceeds as follows: (a) at interval k, calculate )(k , (b) calculate )1(ˆ +kyo
and
)1( +ko
(c) calculate )1(ˆ + k , (d) calculate ),(ˆ 1−
qkR and ),(ˆ 1−
qkS , (e) calculate u(k) from the
equation
( ) )(*
),(ˆ
),(ˆ
)(
),(ˆ
)( 1
1
1
1
ky
qkR
qkS
kr
qkR
qT
ku −
−
−
−
−= where ( )1−
qT , r(k) and y*(k) are given, (f) increase
the count by 1 and go to step (a).
A simple expression for the input u(k):
For MRAC, where we have a reference model and reference input r(k) and reference output y*(k), there
is a nice formula for the input u(k).
72. 72
The input/output relation (y*(k) and r(k))is assumed to be known and has the form:
( ) ( ) )()(* 11
krqBqkyqA m
d
m
−−−
=
If the output plant value y(k) is equal to the referenced value y*(k), then
m
m
A
B
BSAR
BT
=
+
Setting mBT = , we get the simplified Diophantine equation:
BABSAR m=+
The RST feedback control is given by the equation:
( ) ( ) ( ) )()()( 111
kyqSkrqTkuqR −−−
−=
and the input to the plant becomes:
( ) )deg()...1()()deg(...)(deg...)1(
1
)( 1deg101deg0deg1
0
SkyskyskysTkrTkrTRkuRkuR
R
ku STR −−−−−−+++−−−−−= −−