lecture4 pid

21
EE392m - Winter 2003 Control Engineering 4-1 Lecture 4 - PID Control 90% (or more) of control loops in industry are PID Simple control design model simple controller

Upload: sandro-morero

Post on 13-May-2017

236 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-1

Lecture 4 - PID Control

• 90% (or more) of control loops in industry are PID• Simple control design model → simple controller

Page 2: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-2

Example:Utilization control in a video server

P control• Integrator plant:

duy +=&

)( dP yyku −−=

• P controller:

admission rate

CPU

u(t)

completion rate

server utilization-u(t)

y(t)

d(t)

y(t)

yd(t)

-d(t)

Video stream i– processing time c[i], period p[i]– CPU utilization: U[i]=c[i]/p[i]

tUnew

∆∆=

tUdone

∆∆=

Page 3: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-3

P control• Closed-loop dynamics

dks

yks

kyP

dP

P

++

+= 1

dykyky dPP +=+&

• Steady-state (s = 0)

• Transient

• Frequency-domain (bandwidth)

SSP

dSS dk

yy 1+=

( )

P

TtSS

Pd

Tt

kT

edk

yeyty

/1

11)0()( //

=

−⋅

++= −−

( ) 1/

/)(ˆ)(ˆ)(ˆ

2 +

+=

P

Pd

k

kidiyiy

ω

ωωω

0.01 0.1 1 10-20-15-10-5

0

0 2 400.20.40.60.8

1

y(t)

|y(iω)|ti

tidd

eidtd

eiytyω

ω

ω

ω

)(ˆ)(

)(ˆ)(

=

=

Page 4: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-4

Example:• Servosystem command

• More:– stepper motor– flow through a valve– motor torque ...

I control

• Introduce integrator into control

• Closed-loop dynamics

)(,

dI yykvvu

−−==&

,dugy +⋅=

dgkssy

gksgky

Id

I

I

++

+=

y(t)

u(t)

Page 5: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-5

Sampled time I control

• Step to step update:

• Closed-loop dynamics

• Deadbeat control:

[ ]dI ytyktvtvtututdtugty

−=−+−=

+⋅=

)()()1()1()(

)()()(

[ ]dI yy

zku

dugy

−−

=

+⋅=

1

dgkz

zygkz

gkyI

dI

I

+−−+

+−=

11

1

sampled timeintegrator

1=Igk ( )dzyzy d11 1 −− −+=

Page 6: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-6

Run-to-run (R2R) control• Main APC (Advanced

Process Control) approach insemiconductor processes

• Modification of a productrecipe between tool "runs"

Tool

Run-to-run control

Cell controller

Process

Runtimecontroller Metrology

system

Tunable

recipe

parameters

• Processes:– vapor phase epitaxy– lithography– chemical mechanical

planarization (CMP)– plasma etch

[ ]dI ytyktututdtugty

−+−=+⋅=

)()1()()()()(

Page 7: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-7

ekvkuev

yye

PI

d

−−==

−=&

;

duyy ++−=&τ

PI control• First-order system:

• P control + integrator forcancelling steady state error

Example:• WDM laser-diode temperature control

• Other applications• ATE• EDFA optical amplifiers• Fiber optic laser modules• Fiber optic network equipment

duyy ++−=&τ

heat loss to environment

heat capacity

y(t) = temperature - ambient temperaturepumped

heatproduced

heat

TemperatureController

Peltier Heatpump

Page 8: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-8

Cascade loop interpretation:

PI control• P Control + Integrator for

cancelling steady state error

• Velocity form of the controller

{)(

;

vkekekvkuev

yye

P

Ikk

iPPI

d

−=−−==

−=&

Inner loop

Plant

kP

e(t)u(t)

ki∫

y-yd

PiI kkk ⋅=ekeku PI && −−=[ ])1()()()()1( −−−−=+ tetektektutu PI

Page 9: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-9

PI control• Closed-loop dynamics

• Steady state (s = 0): .No steady-state error!

• Transient dynamics: look at thecharacteristic equation

• Disturbance rejection

dSS yy =

0)1(2 =+++ IP kk λτλ

)(ˆ)()(ˆ ωωω idiHiy d ⋅=

dkskss

sykskss

kskyIP

dIP

IP

++++

++++=

)1()1( ττ

0

0.2

0.4y(t)

Frequency (rad/sec)

DISTURBANCE REJECTION

MA

GN

ITU

DE

(dB

)10 -2 100 102

-40

-30

-20

-10

0

)( ωiHd

Page 10: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-10

PLL Example• Phase-locked loop is arguably a

most prolific feedback system

PLL

VoltageControlledOscillator

Hi-freqLPF

Loop Filter(controller)

reference signal

signal phase-locked to reference

uK

ttAKettAK

vrKe

ooo

odom

oodm

m

=∆=

−+−≈+×+=

×=

ωθθθωω

θωθω

&

)sin()cos()sin(LPF2

LPF2e

u

Page 11: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-11

PLL Loop Model• Small-signal model:

PLL

VCO

Kd C(s)

reference error

phase

{o

uK

KKe

o

d

do

dd

θ

θωωθθθ

−+−=

≈=

43421&&

)sin(e

u

1<<−+−= odott θθωωθ

odott θθωωθ −+−=

sKo−

∫ ⋅+=

=−=

dtekeku

KeuKd

IP

d

o

θθ&

d

dkskKKs

sIPdo ++

= 2θ

• Loop dynamics:

Page 12: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-12

PD control• 2-nd order dynamics

• PD control

• Closed-loop dynamics

• Optimal gains (critical damping)

Example:• Disk read-write controlduy +=&&

ekekuyye

PD

d

−−=−=&

DISTURBVCM TTJ +=ϕ&&

VoiceCoilMotor

dekeke PD =++ &&&

dksks

ePD ++

= 21

2;2 ττ == PD kk

Page 13: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-13

es

eesse

D

D

DD 1/11

1 ++=

+≈

ττ

ττ&

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

• Modified PD controller:eke

ssku P

DD −

+−=

Page 14: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-14

PD control performance• The performance seems to be infinitely improving for

• 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, carefulapplication of more advanced control approaches might help

∞→== τττ ;;2 2PD kk

Page 15: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-15

Plant Type

• Constant gain - I control• Integrator - P control• Double integrator - PD control• Generic second order dynamics - PID control

Page 16: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-16

PID Control• Generalization of P, PI, PD• Early motivation: control of first

order processes with deadtime

Example:•

us

geysTD

1+=

τ

Papermachinecontrol

DT

τ

g

Page 17: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-17

PID Control

• PID: three-term control

• Sampled-time PID

• Velocity form– bumpless transfer between

manual and automatic

∫ ⋅−−−=

−=

dtekekeku

yye

IPD

d

&

( ) ez

kekezku IPD 11

111 −

−++−−=

future present past

( )( ))2()1(2)(

)1()()()()1(−+−−−

−−−−=+tetetek

tetektektutu

D

PI

independent sensor or an estimate

1

2

1 −−=∆

−∆−∆−=∆

zekekeku IPD

Page 18: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-18

sim

Tuning PID Control

• Model-based tuning• Look at the closed-loop poles• Numerical optimization

– For given parameters run a sim,compute performance parametersand a performance index

– Optimize the performance indexover the three PID gains usinggrid search or Nelder method.

eskksku I

PD

++−=

Plant model

Optimizer

IPD kkk ,, Performance

Page 19: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-19

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:

• 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.

kP kI kDP 0.5kC

______ ______

PI 0.45kC 1.2kP/TC______

PID 0.5kC 2kP/TC kPTC/8

Page 20: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-20

Integrator anti wind-up• In practice, control authority is

always limited:– uMIN ≤ u(t) ≤ uMAX

• Wind up of the integrator:– if the integral v

will keep growing while the controlis constant. This results in a heavyovershoot later

• Anti wind-up:– switch the integrator off if the

control has saturated

<≤≤

>=

−−==

MINcMIN

MAXcMINc

MAXcMAX

PIc

uuuuuuu

uuuu

ekvkuev

,,

,

&

MAXc uu >

<>≤≤

=MINcMAXc

MAXcMIN

uuuuuuue

vor if0,

for ,&

Page 21: Lecture4 PID

EE392m - Winter 2003 Control Engineering 4-21

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