You are on page 1of 13

Adaptive PID, Adaptive Phase-Lead Control

Daniel Wiese
Department of Mechanical Engineering
Massachusetts Institute of Technology
February 27, 2014

Introduction
Adaptive PID
Original Design
Better Design
Adaptive Phse-Lead
The goal of this section is to design an adaptive PID controller for the following second order plant.
Gp (s) =

1
s(Js + B)

where J, B, , and k are all positive. This is the same motor control problem that we used for the adaptive
PI controller, but we note now that the output x is the motor position instead of velocity. This control
architecture is represented by the following block diagram. The tracking error is
e = xd x
In addition, we again assume both x and x are available for measurement.
Controller
r

er

Plant

Gc (s)

1
s(Js+B)

Again we begin with the algebraic part: the solution for J, B known. This time we use a PID controller,
given in general by
Ki
+ Kd s
s
Kp s + Ki + Kd s2
=
s

Gc (s) = Kp +

Adaptive PID Controller: Original Design

We can reduce number of control parameters from three to two by requiring both of the controller zeros
lie at the same place
K(s + )2
Gc (s) =
s
We find the closed-loop transfer function Wcl from r to x to see under what conditions the system will be
stable.
Wcl (s) =

Gc Gp
x
=
r
1 + Gc Gp
=
1
=

K(s+)2
1
s
s(Js+B)
2
1
+ K(s+)
s
s(Js+B)
K(s + )2

s2 (Js + B) + K(s + )2

Looking at the closed-loop characteristic equation, and using the Routh-Hurwitz stability criterion, the system will be stable for
J
B
2
>0

K<

Now that stability can be met, we want to figure out what r should be based on xd so that x xd . This is
the goal of tracking. In the same way as with the PI controller, we consider a feed-forward controller which
will, assuming all of the plant parameters are known exactly, cancel out the plant dynamics, allowing x to
perfectly track xd after transients.
Controller
xd

Wcl1 (s)

r +

er

Gc (s)

Plant

where
1 + Gc Gp
Gc Gp
1
=
+1
Gc Gp

Wcl1 (s) =

= 1 + s(Js + B)G1
c
and r is given by
r = Wcl1 (s)xd
= xd + [s(Js + B)Gc (s)1 ]xd
= xd + BGc (s)1 sxd + JGc (s)1 s2 xd
2

1
s(Js+B)

using
d = Gc (s)1 xd
the reference can be written as
r = xd + B d + K
d

Adaptive PID Controller: Better Design

Before we proceed with the PID control design, we again want to improve our design as we did in the
case of the PI controller by using positive rate feedback, as shown in the following block diagram.
Controller
er

Plant
+

Gc (s)

1
s(Js+B)

+
B

er

3.1

Controller

Plant

Gc (s)

1
Js2

Algebraic Part

Now if we call the transfer function from r to x as Wcl (s), we have


Gc (s) Js1 2

Wcl (s) =

1 + Gc (s) Js1 2
Gc
=
2
Js + Gc
So now we put the feed-forward control on the block diagram above as
Controller
xd

Wcl1 (s)

r +

er

Plant
+

Gc (s)

1
s(Js+B)

+
B

where
Js2 + Gc
Gc
= 1 + Js2 G1
c

Wcl1 (s) =

characteristic polynomial stable B, J SHOW THIS HERE WITH ROUTH-HURWITZ


r = Wcl1 (s)xd
= xd + JG1
xd
c (s)
4

which is represented in the block diagram below


x
d

JG1
c
xd

Controller

er

Plant
+

Gc (s)

1
s(Js+B)

+
B

which can be again redrawn as


x
d

J
Controller
xd

Gc (s)

Plant

1
s(Js+B)

+
B

Reparameterize the controller as


(K + 2J)s2 + (2K + 2 J)s + K2
s
1
= (K + 2J)s + (2K + 2 J) + K2
s

Gc (s) =

and then
2

Gc e = (K + 2J)e + (2K + J)e + K

Z
edt

With structure of Gc (s)


= B x + J x
d + Gc e
2

= B x + J x
d + (K + 2J)e + (2K + J)e + K
edt
Z
= B x + J x
d + K e + 2J e + 2Ke + 2 Je + K2 edt


Z
2
2
= J(
xd + 2e + e) + B x + K e + 2e +
edt

using the following errors


e1 = x
d + 2e + 2 e
Z
2
e2 = e + 2e +
edt
the total control input is
= Je1 + B x + Ke2
This completes the nominal PID design, or algebraic part.

3.2

Analytic Part

We now proceed with the analytic part by first replacing the plant parameter values in the control law
with their estimates.
1+B
x + Ke2
= Je
closed-loop
x
=
=
=
=
=

1
(B x + )
J
1
1+B
x + Ke2 )
(B x + Je
J
1
1 + Ke2 )
((B B)x + Je
J
1
1 + Ke2 )
(B x + Je
J

1 
K
x
e2 +
Je1 + B
J
J

where
=B
B
B
and
e = x
d x


K
1 
x
=x
d e2
Je1 + B
J
J
use definition of e2
e 2 = e + 2e + 2 e

1 
K
x + 2e + 2 e
=x
d e2
Je1 + B
J
J

K
1 
x
= e1 e2
Je1 + B
J
J
!

K
J
J
B
= e2 +

e1 x
J
J
J
J
=

K
J
B
e2 e1 x
J
J
J
6

where
J = J J
and then some stuff dont really know why this is here


e1
=
x
and

 
J
=
B

Propose the following


V =


1 2
2
Je2 + J2 + B
2

Time differentiating
B

V = Je2 e 2 + JJ + B
V = Je2

J
B
K
e2 e1 x
J
J
J

+ JJ + B

1 e2 B
xe
B

= Ke22 Je
2 + JJ + B
And we can see that if we choose the following adaptive laws
J = e2 e1
= e x
B
2

and substitute them into the V equation


V = Ke22
3rd order error model

3.3

Summary

PI was velocity control, PID was position control.


1+B
x + Ke2
= Je
Z t

J = 1
e2 ( )e1 ( )d
0

= 2
B

e2 ( )x(
)d
0

e1 = x
d + 2e + 2 e
Z
2
e2 = e + 2e +
ed

Adaptive Phase-Lead Control

The goal of this section is to design an adaptive phase-lead controller for the following second order
plant.
1
Gm (s) =
s(Js + B)
where J, B, are the motor inertia and damping, respectively, so we know they are positive. This is the same
motor control problem that we used for the adaptive PID controller, where the output x is the motor position.
This control architecture is represented by the following block diagram, where the controller is given by
Gc (s) =

k(s + zc )
s + pc

where 0 < zc < pc . In addition, we again assume both x and x are available for measurement.
Gc (s)
r

Gm (s)

k(s+zc )
s+pc

1
s(Js+B)

x, x

Because we assumed that x and x are measurable, we can take as the output
y = x + ax
where a > 0 and express the system block diagram as follows, where we define Gp (s) as
Gp (s) =

s+a
s(Js + B)

giving the following block diagram


Gp (s)

Gc (s)
r

k(s+zc )
s+pc

s+a
s(Js+B)

Now put a gain in the feedback path, to allow us to have additional control over the closed-loop system.
Gp (s)

Gc (s)
r

k(s+zc )
s+pc

s+a
s(Js+B)

ROOT LOCUS
CLP locations depend on B and J
stable J > 0 B > 0 k > 0 0 < zc < pc 0 > 0 phase margin depend on J, B.
8

For desired pole-locations 0 depends on J, B


k > 0 0 < zc < pc a > 0
Tracking: Goal: y yd . The closed-loop transfer function from r to y is

Wcl (s) =

Gc (s)Gp (s)
1 + 0 Gc (s)Gp (s)

Assuming all the plant parameters are known, we want to design a feed-forward controller Wcl1 (s) to
give the appropriate reference signal r so that the transfer function from yd to y is unity. In block diagram
this is
Gp (s)

Gc (s)
yd

Wcl1 (s)

r +

k(s+zc )
s+pc

we want

r y
y
=
=1
yd
yd r

so
Wcl1 (s) =

1 + 0 Gc (s)Gp (s)
Gc (s)Gp (s)

and then
1 + 0 Gc (s)Gp (s)
r
=
yd
Gc (s)Gp (s)
1
=
+ 0
Gc (s)Gp (s)



s(Js + B)
G1
(s)
+ 0
=
c
s+a
giving



s(Js + B)
1
r=
Gc (s) yd + 0 yd
s+a
defining
G1
d
c (s)yd =
and

d = d
s+a

the reference signal r becomes


r = 0 yd + [s(Js + B)]d
= 0 yd + J
d + B d
9

s+a
s(Js+B)

Fixed phase-lead design will be:

k(s+zc )
s+pc

+
yd

Gp (s)

Gc (s)
er

s+a
s(Js+B)

To get the reference model, we assume the plant parameters are known, and replace 0 with a nominal
value 0 such that the resulting closed-loop system as shown below is SPR, and when 0 = 0 then we have
y = yd .

Wm (s)

+
+

yd

Gp (s)

Gc (s)
r

er

k(s+zc )
s+pc

s+a
s(Js+B)

yd

0 desired control parameter which produces desired closed-loop pole locations. If B and J are unknown
this implies 0 is unknown. So the output yd from the reference model is given as
yd = Wm (s)> D
where

= J
and

B 0

>


>
d d yd
D =
WHAT TO DO WHEN 0 is unknown??????
So the transfer function Wm (s) from r to y is given by

10

Wm (s) =
=

Gc (s)Gp (s)
1 + 0 Gc (s)Gp (s)
k(s+zc ) s+a
s+pc s(Js+B)
c)
s+a
1 + 0 k(s+z
s+pc s(Js+B)
k(s+zc )(s+a)
(s+pc )(s(Js+B)
0 k(s+zc )(s+a)
(s+pc )s(Js+B)
(s+pc )s(Js+B) + (s+pc )s(Js+B)

k(s+zc )(s+a)
(s+pc )(s(Js+B)
(s+pc )s(Js+B)+0 k(s+zc )(s+a)
(s+pc )s(Js+B)

k(s + zc )(s + a)
(s + pc )s(Js + B) + 0 k(s + zc )(s + a)

To get the adaptive phase-lead block diagram, instead of using known and nominal values, we have to
use estimates of the plant parameters (since they are not known) and a time varying parameter 0 .

Gp (s)

Gc (s)
er

k(s+zc )
s+pc

s+a
s(Js+B)

+
yd

Gp (s)

Gc (s)
er

k(s+zc )
s+pc

s+a
s(Js+B)

+
e

Using the following parameter error definitions, we split the parameter estimates into the actual and

11

error
0 = 0 0
J = J J
=B
B
B
This gives the following block diagram representation

+
e

k(s+zc )
s+pc

s+a
s(Js+B)

Gp (s)

Gc (s)

+
e = yd y

Also, recognizing that e = yd y, we can re-absorb a portion of the signal e which goes through 0 ,
giving the following block diagram

12

+
e

Wm (s)

Gp (s)

Gc (s)

k(s+zc )
s+pc

s+a
s(Js+B)

0
+

+
yd

So at this point, we can simplify the above plant representation as the following.

y = Wm (s) > + > D
where



0 >
= J B

and


>
d d e
=

Defining the error as


e y = y yd
and evaluating this error we get
ey = Wm (s)(> + > D ) Wm (s)> D
= Wm (s)>
use nominal phase-lead controlled nominal plant model to use as reference model.
|phaseWm (s)| < 90deg
positive correlation of u and y where u is input to y... if you were to take an integral (parsevals theorem)
integrate uy from 0 to t will be lower bounded by some number...

13

You might also like