CHE3162.Lecture10 Tuning Stability

35
CHE3162 Lecture 10 PID Controller Tuning & Stability

description

Lecture note

Transcript of CHE3162.Lecture10 Tuning Stability

Page 1: CHE3162.Lecture10 Tuning Stability

CHE3162 Lecture 10

PID Controller Tuning & Stability

Page 2: CHE3162.Lecture10 Tuning Stability

Learning Objectives

• Understand how to tune feedback PID loops to find optimal values for K, TI and τd by: – two experimental methods (Zeigler-Nichols ult

sensitivity and ¼ decay) – Three calculatation methods (Zeigler-Nichols, Cohen

Coon, Direct Synthesis) • Awareness of alternate tuning criteria • Understand meaning of “stability” in control

loops • Be able to select appropriate tuning parametes

to ensure a stable control loop

Page 3: CHE3162.Lecture10 Tuning Stability

What is “perfect control” ? • For all systems:

– A load disturbance (D) has NO effect on the controlled variable (Y)

– The controlled variable (Y) follows its set point Ys EXACTLY

• For multiple loop systems: – A change to one variable does not affect other

controlled variables. i.e., NO INTERACTION • For real systems:

– Control has the ability to handle CONSTRAINTS

1st Performance

Page 4: CHE3162.Lecture10 Tuning Stability

Some Control Quality Criteria - 1

• Minimum total error (deviation from set point) until new steady state. eg: – Integral of absolute value of error (IAE) – Integral of time-multiplied absolute

value of error (ITAE) – Integral of error squared (ISE) – Integral of time-multiplied error

squared (ITSE) • Quantifiable in simulations, usually not in practice

– but some modern systems can – Theoretical tunings : Zeigler Nichols, Cohen Coon

∫ dte

∫ dtet∫ dte2

∫ dtte2

Page 5: CHE3162.Lecture10 Tuning Stability

Some Control Quality Criteria -2

• Quarter decay ratio between first 2 peaks – "It looks right"

0 5 10 15 20Time

0

0.5

1

1.5

Res

pons

e

Response for a set-point change

Response has some damped oscillation, but not “too much”

Trades off speed of response with stability

A B B/A = 0.25

Page 6: CHE3162.Lecture10 Tuning Stability

Controller Tuning Methods

Trial and error using one of the criteria as a guide, or empirical “rules of thumb”

1. Cohen-Coon Method (Open Loop)

2. Ziegler-Nichols Ultimate Sensitivity Method (Closed Loop)

3. Ziegler-Nichols Quarter Decay Method (Closed Loop)

4. Ziegler-Nichols BODE stability method

Page 7: CHE3162.Lecture10 Tuning Stability

The Cohen-Coon Tuning Method

Gp

T Fs Gv

U

Km = 1 Tm

+

Response

Open-loop step response

The open loop (valve + process + sensor) is modelled as first order + dead time (FODT)

Step input

δ

Page 8: CHE3162.Lecture10 Tuning Stability

Finding FODT Model

• Use 28% & 63% points to calculate τ & θ

0 5 10 15 20 25 30 35 40 0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Time

Res

pons

e t63

t28

1s

sKe+τ

θ−

τ−=θ−=τ

%63

%28%63 )(5.1t

tt

• Also calculate K = ∆/δ

Page 9: CHE3162.Lecture10 Tuning Stability

Cohen-Coon Recommended Tuning Parameters

R = θ/τ (Beware θ ≈ 0 [R ≈ 0] – case)

MODE: P P + I P + D P + I + D GAIN (1+R/3)

---------- KR

(0.9+R/12) -------------

KR

(1.25+R/6) -------------

KR

(1.33+R/4) -------------

KR INTEGRAL

TIME θ(30+3R)

----------- (9+20R)

θ(32+6R) ------------- (13+8R)

DERIVATIVE TIME

θ(6-2R) ---------- (22+3R)

4θ ----------- (11+2R)

Page 10: CHE3162.Lecture10 Tuning Stability

Zeigler Nichols tuning

• Set of parameters to give ¼ decay ratio response

• Determined by one of two experimental methods: 1. Quarter decay tuning experiment 2. Ultimate sensitivity experiment (also called

“continuous cycling” method) • Can also work out theoretically from TF

– Decay ratio equation, or frequency response to find ultimate gain

Page 11: CHE3162.Lecture10 Tuning Stability

Ziegler-Nichols Quarter Decay Method -- Experimental

• Make control action Proportional only – Switch off, or minimise Integral & Derivative actions

• Iteratively find proportional gain (Kc) to give damped oscillation with quarter decay ratio

• Note this value = Kq • Note oscillation period = Pq (time units) • Apply rules: P P + I PID

Kc Kq Kq/1.05 Kq

Ti - Pq Pq/1.5 τd - - Pq/6

Page 12: CHE3162.Lecture10 Tuning Stability

Quarter decay responses

Page 13: CHE3162.Lecture10 Tuning Stability

Ziegler-Nichols Ultimate Sensitivity Method -- Experimental

• Make control action Proportional only – Switch off, or minimise Integral & Derivative actions

• Iteratively find proportional gain (Kc) to give constant amplitude oscillation

• Note this value = Ku (Ultimate sensitivity or gain) • Note oscillation period = Pu (ultimate period as a time) • Apply rules: P P + I PID

Kc 0.5Ku 0.45Ku 0.6Ku

Ti - Pu/1.2 Pu/2

τd - - Pu/8

Page 14: CHE3162.Lecture10 Tuning Stability

At ultimate gain, system oscillates

• Damping coefficient = 0 • “undamped” system

Seborg

Page 15: CHE3162.Lecture10 Tuning Stability

Seborg

0<ξ<1

ξ=0

ξ<0 IF an exact 2nd order system:

Effect of gain on controller response Kc<Ku

Kc = Ku

Kc > Ku

Closed loop responses for different values of the controller gain Kc compared to the ultimate gain Ku

Page 16: CHE3162.Lecture10 Tuning Stability

C-C and Z-N Tuning parameters are close, but not identical!

Modes Cohen-Coon Ziegler-Nichols

PI Kc 2.7 2.4

PI Ti 6.2 7.8

PID Kc 4.1 3.2

PID Ti 5.8 4.67

PID τd 0.9 1.17

Page 17: CHE3162.Lecture10 Tuning Stability

Disturbance step: effect Kc

y

Seborg

Page 18: CHE3162.Lecture10 Tuning Stability

ZN continuous cycling disadvantages

The continuous cycling method is frequently recommended by control system vendors. Even so, the continuous cycling method has several major disadvantages:

1. It can be quite time-consuming if several trials are required and the process dynamics are slow. The long experimental tests may result in reduced production or poor product quality.

2. In many applications, continuous cycling is objectionable because the process is pushed to the stability limits.

3. This tuning procedure is not applicable to integrating or open-loop unstable processes because their control loops typically are unstable at both high and low values of Kc, while being stable for intermediate values.

4. For first-order and second-order models without time delays, the ultimate gain does not exist because the closed-loop system is stable for all values of Kc, providing that its sign is correct. However, in practice, it is unusual for a control loop not to have an ultimate gain.

Seborg

Page 19: CHE3162.Lecture10 Tuning Stability

Tuning & Stability • Zn and CC methods are excellent places to start • Further optimization is possible

– May be required in high performance situations on critical control loops

• Tuning the control loops also can affect the “stability” of the control loop

• A loop is considered to be “stable” if it reaches a new steady state value – Does not climb/fall indefinately – Does not have increasing oscillations

Page 20: CHE3162.Lecture10 Tuning Stability

Controller Tuning:Choose wisely!

23 Fig. 12.1. Unit-step disturbance responses for the candidate controllers (FOPTD Model: K = 1, PI Contoller θ 4, τ 20).= = Seborg

Page 21: CHE3162.Lecture10 Tuning Stability

Direct Synthesis tuning • Not always trial and error if you know the loop transfer functions. • Can solve directly for desired response

• Let so:

(12-1)1

m c v p

sp c v p m

K G G GYY G G G G

=+

(12-2)1

c

sp c

G GYY G G

=+

v p mG G G G

Seborg

Rearranging and solving for Gc gives an expression for the feedback controller:

/1 (12-3a)1 /

spc

sp

Y YG

G Y Y

= −

Page 22: CHE3162.Lecture10 Tuning Stability

Direct Synthesis example

4

15s+1 T F

s 1 Kc U

Km = 1 Tm

1e-s

1+5s TD

+ +

Ts E +

-

Valve

Disturbance Example block diagram

Define that we want: ( )12

1+

=sT

T

SP

=SP

SPc YY

YYG

G/1

/1

( ) ( )

( )ss

sG

ss

s

ssG

c

c

81

815

8115

1121

4115

)12(11

)12(1

4115

+=+

=

−++

=

+−

++=

)11(sT

KGi

cc +=

For a PI controller:

So we need a PI controller:

)15

11(8

15s

Gc +=

Page 23: CHE3162.Lecture10 Tuning Stability

Direct synthesis Tuning: P control of 2nd Order process

For step in SP

• System is still second order but Kc affects time constant τ AND damping coeff ξ

11

21

11

121

22

22

+

++

+

+=

+++=

sKK

sKK

KKKK

sY

KKssKK

sY

pcpc

pc

pc

pc

pc

ξττ

ξττ(Assuming Kv=Km=1)

Page 24: CHE3162.Lecture10 Tuning Stability

Direct synthesis Tuning: P control of 2nd Order process

pccontrol KK1+

τ=τ

pccontrol KK1+

ξ=ξ

11

21

11

22

+

++

+

+=

sKK

sKK

KKKK

sY

pcpc

pc

pc

ξττ K values affect ξ Underdamped? Overdamped? Stability?

Choose value of Kc to set damping coefficient value to give response you want

Page 25: CHE3162.Lecture10 Tuning Stability

Underdamped Overdamped

2nd order responses

0 -1 1

ξ r1,r2 are –ve

r1,r2 =p+iw where p is -ve

r1,r2 =p+iw where p is +ve

r1,r2 are +ve

1s2sK

XY

22 +ξτ+τ=

UNSTABLE STABLE

Page 26: CHE3162.Lecture10 Tuning Stability

Dead Time De-stabilises Control loops

+

- G c G p

Y s

d

+ +

G D

U Y E e -θs

A process with some dead time

Page 27: CHE3162.Lecture10 Tuning Stability

Plot

Time (sec)0 5 10 15 20 25 30

-20

-15

-10

-5

0

5

10

15

20

Effect of dead time

• First order systems (no deadtime) are always stable • Add deadtime and response is very different • Example - P control of:

• Set Kc = 2 • Make a SP change

132 2

+=

se

XY s

UNSTABLE!

Page 28: CHE3162.Lecture10 Tuning Stability

Ziegler-Nichols Ultimate Sensitivity Method – From Frequency Response

4e-2s

1 + 15s T Fs 0.5

1 +0.5s Kc U

Km = 1 Tm

1e-s

1+5s TD

+ +

Ts E +

-

Valve

Disturbance Example block diagram

Page 29: CHE3162.Lecture10 Tuning Stability

The Bode Stability Criterion

• For stability, the total dynamic loop gain (AR) must be < 1 at the frequency where the open-loop phase shift = -180o (-π radians)

• This frequency is called the ultimate frequency (ωu)

Page 30: CHE3162.Lecture10 Tuning Stability

Ziegler-Nichols Ultimate Sensitivity Open Loop Frequency Response

4e-2s

1 + 15s T Fs 0.5

1 +0.5s U

Km = 1 Tm

+

Input a sine wave, frequency ω rad/time

Response is a sine wave, same frequency, different amplitude and phase

A Bode plot of amplitude ratio and phase vs frequency is the OPEN-LOOP FREQUENCY

RESPONSE

Q: What kind of system would produce a response of different frequency?

Page 31: CHE3162.Lecture10 Tuning Stability

Stability and the Open Loop Frequency Response

• Suppose input sine wave frequency such that the phase shift through the O/L = -180o exactly

• i.e. Ym is a sinewave that is 180 degrees out of phase with input • The error detector introduces another -180o for the feedback signal

– E=SP-Ym, where SP is constant but Ym is a sinewave, so E is now a sine wave but another 180 degrees out of phase

• Hence signal returns in phase • If total loop gain (KOL*Kc) = 1 signal continues on

– System will oscillate with constant amplitude – “standing wave” is set up

• If total loop gain < 1, oscillations die out each cycle – loop will be stable (damped)

• If total loop gain > 1, system has growing oscillations – each cycle will increase the oscillations: unstable

Page 32: CHE3162.Lecture10 Tuning Stability

Z-N Ultimate Sensitivity Method From BODE/Frequency Response

• Find ultimate frequency (ωu) when φ = -180o (-π radians) (calculation or graph)

– This also gives Pu (= 2π/ ωu) • Find open-loop dynamic gain (AR or KOL) at ωu

– Use calcs or graph, – For stability, overall K around open loop must be ≤1 – Overall open loop gain: Ku*AR ≤1

• Therefore Z-N Ultimate Sensitivity Ku = 1/ AR – Use the std Z-N rules table to tune controller

Page 33: CHE3162.Lecture10 Tuning Stability

Bode Plot of Open Loop Frequency Response

10 -3 10 -2

10 -1 10 0 10 -3

10 -2

10 -1

10 0

w, rad/time

AR

10 -3 10 -2

10 -1

10 0 -200

-150

-100

-50

0

w, rad/time

phas

e, d

eg

-180 ω = 0.673

0.187

AR=0.187 Ku*AR≤1 (stability limit)

Hence: Ku ≤ 1/0.187 ≤ 5.34 Z-N Kc =0.5Ku So set Kc=2.67

Page 34: CHE3162.Lecture10 Tuning Stability

The Bode Stability Criterion

• For stability, the total dynamic loop gain (AR) must be < 1 at the frequency where the open-loop phase shift = -180o (-π radians)

• This is the ultimate frequency (ωu) • The Ziegler-Nichols Ultimate Period

Pu = 2π/ ωu

Page 35: CHE3162.Lecture10 Tuning Stability

Summary – Tuning & Stability

• Can select values for control loop using – Direct Synthesis or calculation methods, – Zeigler-Nichols ultimate sensitivity/cycling methods – Cohen-Coon method (FODT processes only) – Many more methods available..

• Loop can become unstable if using: – High values of Kc – Small values of integral time Ti – Large values of derivative time – Sinusoidal inputs at ultimate frequency