pid tuning and controllability sigurd skogestad ntnu, trondheim, norway

57
PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Upload: khalil-bowring

Post on 30-Mar-2015

244 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

PID Tuning and Controllability

Sigurd SkogestadNTNU, Trondheim, Norway

Page 2: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Tuning of PID controllers SIMC tuning rules (“Skogestad IMC”)(*)

Main message: Can usually do much better by taking a systematic approach

One tuning rule! Easily memorized

References: (1) S. Skogestad, “Simple analytic rules for model reduction and PID controller design”, J.Proc.Control, Vol. 13, 291-309, 2003(2) S. Skogestad, ``Tuning for smooth PID control with acceptable disturbance rejection'', Ind.Eng.Chem.Res, 45 (23), 7817-7822

(2006).

(*) “Probably the best simple PID tuning rules in the world”

• k’ = k/τ1 = initial slope step response c ≥ 0: desired closed-loop response time (tuning parameter)

For robustness select (1) : c ¸ (gives Kc ≤ Kc,max) For acceptable disturbance rejection select (2) : Kc ≥ Kc,min = ud0/ymax

Page 3: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Need a model for tuning

Model: Dynamic effect of change in input u (MV) on output y (CV)

First-order + delay model for PI-control

Second-order model for PID-control

Page 4: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Step response experiment Make step change in one u (MV) at a time Record the output (s) y (CV)

Page 5: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

First-order plus delay process

Step response experiment

k’=k/1

STEP IN INPUT u (MV)

RESULTING OUTPUT y (CV)

Delay - Time where output does not change1: Time constant - Additional time to reach 63% of final changek : steady-state gain = y(1)/ u k’ : slope after response “takes off” = k/1

Page 6: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Model reduction of more complicated model

Start with complicated stable model on the form

Want to get a simplified model on the form

Most important parameter is usually the “effective” delay

Page 7: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway
Page 8: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway
Page 9: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

half rule

Page 10: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Approximation of zeros

Page 11: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Derivation of SIMC-PID tuning rules PI-controller (based on first-order model)

For second-order model add D-action.For our purposes it becomes simplest with the “series” (cascade)

PID-form:

Page 12: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Basis: Direct synthesis (IMC)

Closed-loop response to setpoint change

Idea: Specify desired response T = (y/ys)desired

and from this get the controller. Algebra:

Page 13: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

IMC Tuning = Direct Synthesis

Page 14: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Integral time Found: Integral time = dominant time constant (I = 1) Works well for setpoint changes Needs to be modified (reduced) for integrating

disturbances

Example. “Almost-integrating process” with disturbance at input:G(s) = e-s/(30s+1)

Original integral time I = 30 gives poor disturbance responseTry reducing it!

gc

d

yu

Page 15: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Example: Integral time for “slow”/integrating process

IMC rule:I = 1 =30

Reduce I to improve performance. This valuejust avoids slow oscillations:I = 4 (c+) = 8

(see derivation next page)

Page 16: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Derivation integral time: Avoiding slow oscillations for integrating process. Integrating process: 1 large Assume 1 large and neglect delay

G(s) = k e- s /(1 s + 1) ¼ k/(1s) = k’/s PI-control: C(s) = Kc (1 + 1/I s) Poles (and oscillations) are given by roots of closed-loop polynomial

1+GC = 1 + k’/s ¢ Kc ¢ (1+1/Is) = 0 or I s2 + k’ Kc I s + k’ Kc = 0 Can be written on standard form (0

2 s2 + 2 0 s + 1) with

To avoid oscillations must require ||¸ 1: Kc ¢ k’ ¢ I ¸ 4 or I ¸ 4 / (Kc k’) With choice Kc = (1/k’) (1/(c+)) this gives I ¸ 4 (c+)

Conclusion integrating process: Want I small to improve performance, but must be larger than 4 (c+) to avoid slow oscillations

Page 17: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Summary: SIMC-PID Tuning Rules

One tuning parameter: c

Page 18: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Some special cases

One tuning parameter: c

Page 19: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Note: Derivative action is commonly used for temperature control loops. Select D equal to time constant of temperature sensor

Page 20: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway
Page 21: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Selection of tuning parameter cTwo cases

1. Tight control: Want “fastest possible control” subject to having good robustness

• (1) S. Skogestad, “Simple analytic rules for model reduction and PID controller design”, J.Proc.Control, Vol. 13, 291-309, 2003

2. Smooth control: Want “slowest possible control” subject to having acceptable disturbance rejection

• (2) S. Skogestad, ``Tuning for smooth PID control with acceptable disturbance rejection'', Ind.Eng.Chem.Res, 45 (23), 7817-7822 (2006).

Page 22: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

(1) TIGHT CONTROL

Page 23: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Example. Integrating process with delay=1. G(s) = e-s/s. Model: k’=1, =1, 1=1 SIMC-tunings with c with ==1:

IMC has I=1

Ziegler-Nichols is usually a bit aggressive

Setpoint change at t=0 Input disturbance at t=20

TIGHT CONTROL

Page 24: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

1. Approximate as first-order model with k=1, 1 = 1+0.1=1.1, =0.1+0.04+0.008 = 0.148Get SIMC PI-tunings (c=): Kc = 1 ¢ 1.1/(2¢ 0.148) = 3.71, I=min(1.1,8¢ 0.148) = 1.1

2. Approximate as second-order model with k=1, 1 = 1, 2=0.2+0.02=0.22, =0.02+0.008 = 0.028Get SIMC PID-tunings (c=): Kc = 1 ¢ 1/(2¢ 0.028) = 17.9, I=min(1,8¢ 0.028) = 0.224, D=0.22

TIGHT CONTROL

Page 25: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Tuning for smooth control

(2) Will derive Kc,min. From this we can get c,max using SIMC tuning rule

(2) SMOOTH CONTROL

Tuning parameter: c = desired closed-loop response time

(1) Selecting c= (“tight control”) is reasonable for cases with a relatively large effective delay

Other cases: Select c > for slower control smoother input usage

less disturbing effect on rest of the plant less sensitivity to measurement noise better robustness

Question: Given that we require some disturbance rejection. What is the largest possible value for c ? Or equivalently: The smallest possible value for Kc?

Page 26: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Closed-loop disturbance rejection d0

ymax

-d0

-ymax

SMOOTH CONTROL

Page 27: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Kc

u

Minimum controller gain for PI-and PID-control:Kc ¸ Kc,min = |ud0|/|ymax|

|ud0|: Input magnitude required for disturbance rejection|ymax|: Allowed output deviation

SMOOTH CONTROL

Page 28: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Minimum controller gain:

Industrial practice: Variables (instrument ranges) often scaled such that

Minimum controller gain is then

Minimum gain for smooth control )Common default factory setting Kc=1 is reasonable !

SMOOTH CONTROL

(span)

Page 29: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Example

Does not quite reach 1 because d isstep disturbance (not not sinusoid)

Response to disturbance = 1 at input

c is much larger than =0.25

SMOOTH CONTROL

Page 30: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Application of smooth control Averaging level control

VqLC

Reason for having tank is to smoothen disturbances in concentration and flow. Tight level control is not desired: gives no “smoothening” of flow disturbances.

Derivation of tunings:Minimum controller gain for acceptable disturbance rejection:

Kc ¸≥ Kc,min = |ud0|/|ymax|Where in our case

|ud0| = |q0| - expected flow change [m3/s] (input disturbance) |ymax| = |Vmax| - largest allowed variation in level [m3]

Integral time:From the material balance (dV/dt = q – qout), the model is g(s)=k’/s with k’=1.

Select Kc=Kc,min = |q0| |Vmax| . SIMC-Integral time for integrating process:

I = 4 / (k’ Kc) = 4 |Vmax| / |q0| = 4 ¢ residence time

provided tank is nominally half full (so |Vmax| = V) and q0 is equal to the nominal flow.

SMOOTH CONTROL LEVEL CONTROL

If you insist on integral actionthen this value avoids cycling

Page 31: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Rule: Kc ¸ |ud0|/|ymax| ( ~1 in scaled variables) Exception to rule: Can have even smaller Kc (< 1)

if disturbances are handled by the integral action. Happens when c > I = 1

Applies to: Process with short time constant (1 is small)

For example, flow control

SMOOTH CONTROL

Kc: Assume variables are scaled with respect to their span

Page 32: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Summary: Tuning of easy loops Easy loops: Small effective delay ( ¼ 0), so closed-

loop response time c (>> ) is selected for “smooth control”

Flow control: Kc=0.5, I = 1 = time constant valve (typically, 10s to 30s)

Level control: Kc=2 (and no integral action) Other easy loops (e.g. pressure control): Kc = 2, I =

min(4c, 1) Note: Often want a tight pressure control loop (so may have

Kc=10 or larger)

SMOOTH CONTROL

Kc: Assume variables are scaled with respect to their span

Page 33: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

More on level control

Level control often causes problems Typical story:

Level loop starts oscillating Operator detunes by decreasing controller gain Level loop oscillates even more ......

??? Explanation: Level is by itself unstable and

requires control.

LEVEL CONTROL

Page 34: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Integrating process: Level control

LEVEL CONTROL

• Level control problem has– y = V, u = qout, d=q

• Model of level: V(s) = (q - qout)/s– G(s)=k’/s, Gd(s)= -k’/s (with k’=1)

• Apply PI-control: u = c(s) (ys-y); c(s) = Kc(1+1/Is) • Closed-loop response to input disturbance:

y/d = gd / (1+gc) = I s / (I/k’ s2 + Kc I s + Kc)• The denominator can be rewritten on standard form

– (02 s2 + 2 0 s + 1) with 0

2 = I/k’¢Kc and 2 0 = I

– Algebra gives:

– To avoid oscillations we must require 1, or Kc¢k’ ¢I > 4• The controller gain Kc must be large to avoid oscillations!

VqLC

VqLC

qLC

This is the basis for the SIMC-rule for the minimumintegral time

Page 35: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

How avoid oscillating levels?

LEVEL CONTROL

• Simplest: Use P-control only (no integral action)• If you insist on integral action, then make sure

the controller gain is sufficiently large• If you have a level loop that is oscillating then

use Sigurds rule (can be derived):

To avoid oscillations, increase Kc ¢I by factor f=0.1¢(P0/I0)2

where P0 = period of oscillations [s]I0 = original integral time [s]

Actually, 0.1 = 1/π2

Page 36: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Case study oscillating level We were called upon to solve a problem with

oscillations in a distillation column Closer analysis: Problem was oscillating reboiler

level in upstream column Use of Sigurd’s rule solved the problem

LEVEL CONTROL

Page 37: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

LEVEL CONTROL

Page 38: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Identifying the model

Page 39: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Model identification from step response General: Need 3 parameters:

Delay 2 of the following: k, k’, 1

(Note relationship k’ = k/1)

Two approaches for obtaining 1:

1. Initial response: ( + 1) is where initial slope crosses final steady-state

2. (+1)= 63% of final steady state If disagree: Initial response is

usually best, but to be safe use smallest value for 1 (“fast response”) as this gives more conservative PID-tunings 1 = 16 min for this case

0 50 100 150 200 250 3000.095

0.1

0.105

0.11

0.115

0.12

0.125

0.13

0.135

0.14

BOTTOM V: -0.5

xB

1=16 min / 19 min

63%

k

k’

Page 40: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Model identification from step response

Generally need 3 parameters

BUT For control: Dynamics at “control time scale” (c) are important

“Slow” (integrating) process (c< 1/5): May neglect and use only 2 parameters: k’ and

g(s) = k’ e- s / s

“Delay-free” process (c > 5θ): Need only 2 parameters: k and 1

g(s) = k / (1 s+1)

0 10 20 30 40 50 600.9949

0.995

0.995

0.9951

0.9951

0.9952

0.9952

0.9953

0.9953

0.9954

c > 5θ = 5: “Delay-free” (neglect θ)

1 ¼ 200, 1

time

c = desired response time

c

c < τ1/5 = 40: “Integrating” (neglect τ1)

Page 41: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

“Integrating” process (c < 1/5): Need only two parameters: k’ and From step response:

0 2 4 6 8 102.1

2.2

2.3

2.4

2.5

2.6

2.7

2.8Response on stage 70 to step in L

7.5 min

2.62-2.19

Example.

Step change in u: u = 0.1Initial value for y: y(0) = 2.19Observed delay: = 2.5 minAt T=10 min: y(T)=2.62Initial slope:

y(t)

t [min]

Page 42: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

“Delay-free” process (c > 5 )

Example:

First-order model: = 0 k= (0.134-0.1)/(-0.5) = -0.068 (steady-state gain) 1= 16 min (63% of change)

0 50 100 150 200 250 3000.095

0.1

0.105

0.11

0.115

0.12

0.125

0.13

0.135

0.14

BOTTOM V: -0.5

xB

16 min

63%

Page 43: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Step response experiment: How long do we need to wait?

NORMALLY NO NEED TO RUN THE STEP EXPERIMENT FOR LONGER THAN ABOUT 10 TIMES THE EFFECTIVE DELAY ()

Page 44: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Conclusion PID tuningSIMC tuning rules

1. Tight control: Select c= corresponding to

2. Smooth control. Select Kc ¸

Note: Having selected Kc (or c), the integral time I should be selected as given above

Page 45: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway
Page 46: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Cascade control

CC

TCTs

xB

CC: Primary controller (“slow”): y1 = xB (“original” CV), u1 = y2s (MV)TC: Secondary controller (“fast”): y2 = T (CV), u2 = V (“original” MV)

Tuning: 1. First tune TC (based on response from V to T)2. Close TC and tune CC(based on response from Ts to xB)

Primary controller (CC)sets setpoint to secondary controller (TC).

Page 47: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Tuning of cascade controllers• Want to control y1 (primary CV), but have “extra” measurement y2

• Idea: Secondary variable (y2) may be tightly controlled and this helps control of y1.

• Implemented using cascade control: Input (MV) of “primary” controller (1) is setpoint (SP) for “secondary” controller (2)

• Tuning simple: Start with inner secondary loops (fast) and move upwards

• Must usually identify new model experimentally after closing each loop.

• One exception: Serial process with “original” input (u) and outputs (y1) at opposite ends of the process, and y2 in the middle.– Inner (secondary-2) loop may be modelled with gain=1 and effective

delay=(c+

Page 48: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Cascade control serial process(“exception”) d=6

G1u2

y1

K1

ys G2K2

y2y2s

Page 49: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Cascade control serial process d=6

Without cascade

With cascade

G1u

y1

K1

ys G2K2

y2y2s

Page 50: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Tuning cascade control: serial process Inner fast (secondary) loop:

P or PI-control Local disturbance rejection Much smaller effective delay (0.2 s)

Outer slower primary loop: Reduced effective delay (2 s instead of 6 s)

Time scale separation Inner loop can be modelled as gain=1 + 2*effective delay (0.4s)

Very effective for control of large-scale systems

Page 51: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Controllability

(Input-Output) “Controllability” is the ability to achieve acceptable control performance (with any controller)

“Controllability” is a property of the process itself Analyze controllability by looking at model G(s) What limits controllability?

CONTROLLABILITY

Page 52: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Recall SIMC tuning rules

1. Tight control: Select c= corresponding to

2. Smooth control. Select Kc ¸

Must require Kc,max > Kc.min for controllability

)

Controllability

initial effect of “input” disturbance

max. output deviation

y reaches k’ ¢ |d0|¢ t after time ty reaches ymax after t= |ymax|/ k’ ¢ |d0|

CONTROLLABILITY

Page 53: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

ControllabilityCONTROLLABILITY

• More general disturbances. Requirement becomes (for c=):

• Conclusion: The main factors limiting controllability are – large effective delay from u to y ( large)– large disturbances (k’d |d0| / ymax large)

• Can generalize using “frequency domain”: |Gd(j¢0.5/max)| ¢|d0| = |ymax|

Following step disturbance d0:Time it takes for output yto reach max. deviation

Page 54: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Example: Distillation column

CONTROLLABILITY

0 1 2 3 4 5 6 7 8 9 10-2

0

2

4

6

8

10

12

14

16x 10

-3

time [min]

Response to 20% increase in feed rate (disturbance) with no control

xB(t)

xD(t)

ymax=0.005

time to exceed bound = ymax/k’d |d| = 3 min

Controllability: Must close a loop with time constant (c) faster than 1.5 min toavoid that bottom composition xB exceeds max. deviationIf this is not possible: May add tank (feed tank?, larger reboiler volume?) to smooth disturbances

Data for “column A”Product purities:xD = 0.99 § 0.002, xB=0.01 § 0.005(mole fraction light component)Small reboiler holdup, MB/F = 0.5 min

Max. delay in feedbackloop, max = 3/2 = 1.5 min

Page 55: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Example: Distillation column

CONTROLLABILITY

0 1 2 3 4 5 6 7 8 9 10-2

0

2

4

6

8

10

12

14

16x 10

-3

0 1 2 3 4 5 6 7 8 9 10-2

0

2

4

6

8

10

12

14

16x 10

-3

time [min]

Increase reboiler holdup to MB/F = 10 min

xB(t)

3 min 5.8 min

xB(t)

Original holdup Larger holdup

With increased holdup: Max. delay in feedback loop: = 2.9 min

Page 56: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Distillation example: Frequency domain analysis

CONTROLLABILITY

10-3

10-2

10-1

100

101

10-1

100

101

Effect of F on xB

max

Frequency where |Gd(j)| for feed disturbance crosses 0.5 (max): d = 0.3 min-1

) Need response time c · max = 0.5/d = 1.7 min

Agrees with previous result (1.5 min)

Frequency-dependent gains |Gd(j)|Column A with small reboiler holdup.LV-configuration

zF on xB

Page 57: PID Tuning and Controllability Sigurd Skogestad NTNU, Trondheim, Norway

Other factors limiting controllability

CONTROLLABILITY

Input limitations (saturation or “slow valve”): Can sometimes limit achievable speed of response

Unstable process (including levels): Need feedback control for stabilization ) Makes sure inputs do not saturate in stabilizing loops