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: Example:
Utilization control in a video server
y& = u + d
Video stream i
– processing time c[i], period p[i]
d(t)
– CPU utilization: U[i]=c[i]/p[i]

y(t) u(t) ∆U new


admission rate =
yd(t) ∆t
-u(t) server utilization
y(t)
• P controller: CPU

u = − k P ( y − yd ) ∆U done
-d(t) completion rate =
∆t
EE392m - Winter 2003 Control Engineering 4-2
P control
• Closed-loop dynamics
kP 1
y& + k P y = k P yd + d y= yd + d
s + kP s + kP
1
• Steady-state (s = 0) y SS = yd + d SS
kP
 
• Transient y (t ) = y (0)e −t / T +  yd + d SS  ⋅ (1 − e −t / T )
1 1
0.8
 kP  0.6
y(t)
T = 1 / kP 0.4
0.2
0 0 2 4
• Frequency-domain (bandwidth)
0
yd (t ) = yˆ d (iω )eiωt yˆ d (iω ) + dˆ (iω ) / k P -5
yˆ (iω ) = |y(iω)|
(ω / kP )2 + 1
iωt
d (t ) = d (iω )e
ˆ -10
-15
-20
0.01 0.1 1 10
EE392m - Winter 2003 Control Engineering 4-3
I control
y = g ⋅u + d, Example:
• Servosystem command
• Introduce integrator into control
u& = v, u(t)

v = − k I ( y − yd )
• Closed-loop dynamics
y(t)
gk I s • More:
y= yd + d
s + gk I s + gk I – stepper motor
– flow through a valve
– motor torque ...
EE392m - Winter 2003 Control Engineering 4-4
Sampled time I control
• Step to step update: sampled time
y (t ) = g ⋅ u (t ) + d (t ) integrator
u (t ) = u (t − 1) + v (t − 1)
v ( t ) = k I [ y ( t ) − yd ]
• Closed-loop dynamics
y = g ⋅u + d gk I z −1
y= yd + d
z − 1 + gk I z − 1 + gk I
u=
kI
[ y − yd ]
z −1

• Deadbeat control: gk I = 1 y = z −1 yd + (1 − z −1 )d

EE392m - Winter 2003 Control Engineering 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: y (t ) = g ⋅ u (t ) + d ( t )
– vapor phase epitaxy u(t ) = u (t − 1) + k I [ y (t ) − yd ] Run-to-run control
– lithography Cell controller
– chemical mechanical
planarization (CMP) Runtime
Tunable
– plasma etch controller Metrology
recipe
system
parameters Process
Tool
EE392m - Winter 2003 Control Engineering 4-6
PI control
Example:
• First-order system: • WDM laser-diode temperature control

τy& = − y + u + d
• P control + integrator for
cancelling steady state error
Peltier Heatpump Temperature
Controller

e = y − yd ; y(t) = temperature - ambient temperature


pumped produced
v& = e
heat loss to
heat capacity heat heat
environment

τy& = − y + u + d
u = −k I v − kP e • Other applications
• 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 Cascade loop interpretation:
cancelling steady state error
e = y − yd ; Inner loop

v& = e ∫ ki kP
u(t)
u = − k I v − k P e = k P ( e − ki v )
{ e(t) y
kI
yd - Plant
kP
• Velocity form of the controller
u& = −k I e − k P e& 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
y= yd + d
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
0.4
characteristic equation 0.2
y(t)
τλ2 + (1 + k P )λ + k I = 0 0
DISTURBANCE REJECTION
• Disturbance rejection

MAGNITUDE (dB)
0
-10

yˆ (iω ) = H d (iω ) ⋅ dˆ (iω ) -20


H d (iω )
-30

-40
10 -2 10 0 102
EE392m - Winter 2003 Control Engineering 4-9
Frequency (rad/sec)
PLL Example
• Phase-locked loop is arguably a reference signal
most prolific feedback system
Hi-freq e Loop Filter
LPF (controller)
e = 2 K m LPF r × v
= 2 K m LPF A sin(ωt + θ d ) × cos(ωot + θ o ) Voltage
Controlled
e ≈ AK m sin(ωt − ωot + θ d − θ o ) Oscillator u
θ& = ∆ω = K u
o o o signal phase-locked
to reference PLL

EE392m - Winter 2003 Control Engineering 4-10


PLL Loop Model
• Small-signal model: d reference error
θ = ωt − ωot + θ d − θo << 1
e
Kd C(s)
e = K d sin(θ ) ≈ K dθ
θ& = ω − ωo + θ&d − K ou Ko
14243 { VCO −
d θo
s u
θ = ωt − ωot + θ d − θ o
• Loop dynamics: phase
PLL
θ& = d − K u o

e = K dθ s
θ= d
u = k P e + k I ∫ e ⋅ dt s + Ko K d k P s + k I
2

EE392m - Winter 2003 Control Engineering 4-11


PD control
• 2-nd order dynamics Example:
• 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 Jϕ&& = TVCM + TDISTURB
1
e= 2 d Voice
s + kD s + kP Coil
• Optimal gains (critical damping) 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
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 g
ge −TD s
y= u
τs + 1 TD

Example:
• Paper
machine
control

EE392m - Winter 2003 Control Engineering 4-16


PID Control
independent sensor
• PID: three-term control e = y − yd or an estimate
u = − k D e& − k P e − k I ∫ e ⋅ dt

u = − k D (1 − z )e + k P e + k I
−1 1
• Sampled-time PID −1
e
1− z
future present past

• Velocity form ∆u = − k D ∆2 e − k P ∆e − k I e
– bumpless transfer between
manual and automatic ∆ = 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 Optimizer
• Numerical optimization kD , kP , kI Performance

– For given parameters run a sim,


compute performance parameters
and a performance index
 kI 
– Optimize the performance index u = − k D s + k P + e
over the three PID gains using  s
grid search or Nelder method.
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
______ ______
P 0.5kC
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
v& = e
always limited:
uc = −k I v − k P e
– uMIN ≤ u(t) ≤ uMAX
• Wind up of the integrator: uMAX , uc > uMAX

– if uc > uMAX the integral v u =  uc , uMIN ≤ uc ≤ uMAX
u , uc < uMIN
will keep growing while the control  MIN
is constant. This results in a heavy
overshoot later
• Anti wind-up:
– switch the integrator off if the
control has saturated  e, for uMIN ≤ uc ≤ uMAX
v& = 
0, if uc > uMAX or uc < uMIN
EE392m - Winter 2003 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