You are on page 1of 21

Lecture 4 - PID Control

90% (or more) of control loops in industry are PID


Simple control design model simple controller

EE392m - Winter 2003

Control Engineering

4-1

P control
Integrator plant:
y& = u + d

Example:
Utilization control in a video server
Video stream i
processing time c[i], period p[i]
CPU utilization: U[i]=c[i]/p[i]

d(t)
y(t)

u(t)
yd(t)

-u(t)

EE392m - Winter 2003

U new
t

server utilization

y(t)
CPU

P controller:
u = k P ( y yd )

admission rate =

-d(t)
Control Engineering

completion rate =

U done
t
4-2

P control
Closed-loop dynamics
1
kP
yd +
d
y=
s + kP
s + kP

y& + k P y = k P yd + d

1
d SS
Steady-state (s = 0) y SS = yd +
kP

Transient y (t ) = y (0)e t / T + yd + d SS (1 e t / T )
kP

T = 1 / kP

Frequency-domain (bandwidth)
y d (i ) + d (i ) / k P
yd (t ) = y d (i )eit
y (i ) =
it

d (t ) = d (i )e
( / kP )2 + 1
EE392m - Winter 2003

Control Engineering

1
0.8
0.6
0.4
0.2
0
0
-5
-10
-15
-20
0.01

y(t)
0

|y(i)|
0.1

10
4-3

I control
y = g u + d,
Introduce integrator into control

Example:
Servosystem command

u& = v,
v = k I ( y yd )

u(t)

Closed-loop dynamics

gk I
s
y=
yd +
d
s + gk I
s + gk I
EE392m - Winter 2003

Control Engineering

y(t)
More:
stepper motor
flow through a valve
motor torque ...
4-4

Sampled time I control


Step to step update:
y (t ) = g u (t ) + d (t )
u (t ) = u (t 1) + v (t 1)
v ( t ) = k I [ y ( t ) yd ]
Closed-loop dynamics

gk I
z 1
y=
yd +
d
z 1 + gk I
z 1 + gk I

y = g u + d
kI
[ y yd ]
u=
z 1
Deadbeat control: gk I = 1
EE392m - Winter 2003

sampled time
integrator

Control Engineering

y = z 1 yd + (1 z 1 )d
4-5

Run-to-run (R2R) control


Main APC (Advanced
Process Control) approach in
semiconductor processes
Modification of a product
recipe between tool "runs"
Processes:
vapor phase epitaxy
lithography
chemical mechanical
planarization (CMP)
plasma etch

y (t ) = g u (t ) + d ( t )
u(t ) = u (t 1) + k I [ y (t ) yd ]

Cell controller
Tunable
recipe
parameters

EE392m - Winter 2003

Run-to-run control

Control Engineering

Runtime
controller

Metrology
system

Process

Tool
4-6

PI control
Example:
WDM laser-diode temperature control

First-order system:

y& = y + u + d
P control + integrator for
cancelling steady state error

e = y yd ;
v& = e
u = k I v kP e

EE392m - Winter 2003

Temperature
Controller

Peltier Heatpump

y(t) = temperature - ambient temperature


heat capacity

heat loss to
environment

pumped
heat

produced
heat

y& = y + u + d

Other applications

Control Engineering

ATE
EDFA optical amplifiers
Fiber optic laser modules
Fiber optic network equipment

4-7

PI control
Cascade loop interpretation:

P Control + Integrator for


cancelling steady state error

e = y yd ;
v& = e

Inner loop

ki

u = k I v k P e = k P ( e ki v )
{
kI
kP

Velocity form of the controller


u& = k I e k P e&

kP

e(t)
yd

u(t)

- Plant

k I = ki k P

u(t + 1) = u(t ) k I e(t ) k P [e(t ) e(t 1)]

EE392m - Winter 2003

Control Engineering

4-8

PI control
Closed-loop dynamics
sk P + k I
s
yd +
d
y=
s(s + 1) + sk P + k I
s(s + 1) + sk P + k I
Steady state (s = 0): y SS = yd .
No steady-state error!
Transient dynamics: look at the
characteristic equation

0.4

2 + (1 + k P ) + k I = 0
y (i ) = H d (i ) d (i )

0
MAGNITUDE (dB)

Disturbance rejection

Control Engineering

DISTURBANCE REJECTION

-10

H d (i )

-20
-30
-40

EE392m - Winter 2003

y(t)

0.2

10 -2
Frequency (rad/sec)

10 0

4-9

102

PLL Example
Phase-locked loop is arguably a
most prolific feedback system

Hi-freq
LPF

e = 2 K m LPF r v
= 2 K m LPF A sin(t + d ) cos(ot + o )
e AK m sin(t ot + d o )
& = = K u
o

EE392m - Winter 2003

reference signal

Control Engineering

Loop Filter
(controller)

Voltage
Controlled
Oscillator

signal phase-locked
to reference

PLL

4-10

PLL Loop Model


Small-signal model:

= t ot + d o << 1

Kd

e = K d sin( ) K d
& = o + &d K
ou
14243 {
d

reference error

VCO

C(s)

Ko

= t ot + d o
phase
PLL

Loop dynamics:
& = d K u
o

e = K d
u = k P e + k I e dt
EE392m - Winter 2003

s
d
2
s + Ko K d k P s + k I

Control Engineering

4-11

PD control
Example:

2-nd order dynamics

Disk read-write control

&y& = u + d
PD control

e = y yd
u = k D e& k P e

Closed-loop dynamics

e&& + k D e& + k P e = d
1
e= 2
d
s + kD s + kP

Optimal gains (critical damping)

k D = 2 ;

EE392m - Winter 2003

kP = 2

Control Engineering

J&& = TVCM + TDISTURB


Voice
Coil
Motor

4-12

PD control
Derivative (rate of e) can be obtained
speed sensor (tachometer)
low-level estimation logic

Signal differentiation
is noncausal
amplifies high-frequency noise

Causal (low-pass filtered) estimate of the derivative

s
1
1 / D
e&
e=
e+
e
Ds + 1
D
Ds + 1

Modified PD controller:

s
u = k D
e kPe
Ds + 1

EE392m - Winter 2003

Control Engineering

4-13

PD control performance
The performance seems to be infinitely improving for

k D = 2 ; k P = 2 ;

This was a simple design model, remember?


Performance is limited by
system being different from the model
flexible modes, friction, VCM inductance

sampling in a digital controller


rate estimation would amplify noise if too aggressive
actuator saturation
you might really find after you have tried to push the performance

If high performance is really that important, careful


application of more advanced control approaches might help
EE392m - Winter 2003

Control Engineering

4-14

Plant Type

Constant gain - I control


Integrator - P control
Double integrator - PD control
Generic second order dynamics - PID control

EE392m - Winter 2003

Control Engineering

4-15

PID Control
Generalization of P, PI, PD
Early motivation: control of first
order processes with deadtime
ge TD s
y=
u
s + 1

g
TD

Example:
Paper
machine
control

EE392m - Winter 2003

Control Engineering

4-16

PID Control
PID: three-term control

e = y yd

independent sensor
or an estimate

u = k D e& k P e k I e dt
1
u = k D (1 z )e + k P e + k I
e
1
1 z
1

Sampled-time PID

future
Velocity form
bumpless transfer between
manual and automatic

present

past

u = k D 2 e k P e k I e
= 1 z 1

u (t + 1) = u (t ) k I e(t ) k P (e(t ) e(t 1) )


k D (e(t ) 2e(t 1) + e(t 2) )

EE392m - Winter 2003

Control Engineering

4-17

Tuning PID Control


Model-based tuning
Look at the closed-loop poles
Numerical optimization
For given parameters run a sim,
compute performance parameters
and a performance index
Optimize the performance index
over the three PID gains using
grid search or Nelder method.

Optimizer

kD , kP , kI

Performance

kI

u = k D s + k P + e
s

Plant model
sim

EE392m - Winter 2003

Control Engineering

4-18

Zeigler-Nichols tuning rule


Explore the plant:
set the plant under P control and start increasing the gain till the
loop oscillates
note the critical gain kC and oscillation period TC

Tune the controller:

kP

kI

kD

______
______
0.5kC
P
PI 0.45kC 1.2kP/TC ______
PID 0.5kC 2kP/TC kPTC/8

Z and N used a Monte Carlo method to develop the rule


Z-N rule enables tuning if a model and a computer are both
unavailable, only the controller and the plant are.
EE392m - Winter 2003

Control Engineering

4-19

Integrator anti wind-up


In practice, control authority is
always limited:
uMIN u(t) uMAX
Wind up of the integrator:
if
uc > uMAX the integral v

v& = e
uc = k I v k P e

uc > uMAX
uMAX ,

u = uc , uMIN uc uMAX
u ,
will keep growing while the control
uc < uMIN
MIN
is constant. This results in a heavy
overshoot later

Anti wind-up:
switch the integrator off if the
control has saturated

EE392m - Winter 2003

for uMIN uc uMAX


e,
v& =
0, if uc > uMAX or uc < uMIN

Control Engineering

4-20

Industrial PID Controller


A box, not an algorithm
Auto-tuning functionality:
pre-tune
self-tune

Manual/cascade mode switch


Bumpless transfer between
different modes, setpoint ramp
Loop alarms
Networked or serial port

EE392m - Winter 2003

Control Engineering

4-21

You might also like