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: ! =u+d y d(t) y(t) yd(t) -u(t) P controller:
u = k P ( y yd )
EE392m - Winter 2003

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]

u(t)

admission rate =

U new t

y(t)
CPU

server utilization

-d(t)
Control Engineering

completion rate =

U done t
4-2

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

1 d SS Steady-state (s = 0) y SS = yd + kP
t / T Transient y (t ) = y (0)e t / T + $ ! (1 e ) $ yd + k d SS ! P " %

&

T = 1 / kP

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

y(t)
0 2 4

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


EE392m - Winter 2003 Control Engineering

|y(i)|
0.1 1 4-3 10

I control
y = g u + d,
Introduce integrator into control Example: Servosystem command u(t)

! = v, u v = k I ( y yd )
Closed-loop dynamics

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

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

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 y = g u + d kI [ y yd ] u= z 1 Deadbeat control: gk I = 1
EE392m - Winter 2003 Control Engineering

sampled time integrator

gk I z 1 y= yd + d z 1 + gk I z 1 + gk I
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 ]

Run-to-run control Cell controller

Tunable recipe parameters

Runtime controller Process Tool

Metrology system
4-6

EE392m - Winter 2003

Control Engineering

PI control
First-order system:
Example: WDM laser-diode temperature control

! = y +u + d y
P control + integrator for cancelling steady state error
Peltier Heatpump Temperature Controller

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

y(t) = temperature - ambient temperature


heat capacity heat loss to environment pumped heat produced heat

Other applications

! = y + u + d y
ATE EDFA optical amplifiers Fiber optic laser modules Fiber optic network equipment

EE392m - Winter 2003

Control Engineering

4-7

PI control
P Control + Integrator for cancelling steady state error Cascade loop interpretation:
Inner loop

e = y yd ; !=e v u = k I v k P e = k P ( e ki v ) "
Velocity form of the controller ! = k I e k P e ! u
kI kP

' ki e(t) yd y

kP

u(t)

- Plant

k I = ki k P

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


Control Engineering 4-8

EE392m - Winter 2003

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 0.2 0 MAGNITUDE (dB) 0 -10 -20 -30 -40 10 -2


Frequency (rad/sec)

y(t)
DISTURBANCE REJECTION

2 + (1 + k P ) + k I = 0
Disturbance rejection
( i ) (i ) = H d (i ) d y
EE392m - Winter 2003 Control Engineering

H d (i )
10 0

4-9

102

PLL Example
Phase-locked loop is arguably a most prolific feedback system
reference signal 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 o o

Loop Filter (controller)

Voltage Controlled Oscillator signal phase-locked to reference

PLL

EE392m - Winter 2003

Control Engineering

4-10

PLL Loop Model


Small-signal model:
= t ot + d o << 1

reference error

e = K d sin( ) K d ! = o + !d K ou &# %# $ "


d

Kd
VCO

C(s)

Ko s

Loop dynamics: ! = d K u
o

= t ot + d o phase PLL

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
4-11

Control Engineering

PD control
2-nd order dynamics

Example:
Disk read-write control

! !=u+d y
PD control

Closed-loop dynamics

e = y yd ! kPe u = kD e

Optimal gains (critical damping)

!! + k D e ! + kPe = d e 1 e= 2 d s + kD s + kP

!! = TVCM + TDISTURB J
Voice Coil Motor

k D = 2 ;

kP = 2

EE392m - Winter 2003

Control Engineering

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
Control Engineering 4-13

EE392m - Winter 2003

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

! k P e k I ' e dt u = k D e
Sampled-time PID
1 u = k D (1 z )e + k P e + k I e 1 1 z
1

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 k D (e(t ) 2e(t 1) + e(t 2) )

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


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

!=e v 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

for uMIN uc uMAX + e, !=* v )0, if uc > uMAX or uc < uMIN


4-20

EE392m - Winter 2003

Control Engineering

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