Chemical Process Controls: PID control, part II Tuning By Peter Woolf (pwoolf@umich.edu) University...

Post on 22-Dec-2015

245 views 0 download

Transcript of Chemical Process Controls: PID control, part II Tuning By Peter Woolf (pwoolf@umich.edu) University...

Chemical Process Controls:PID control, part IITuning

By Peter Woolf (pwoolf@umich.edu)University of Michigan

Michigan Chemical Process Dynamics and Controls Open Textbook

version 1.0

Creative commons

F, Tin

F, T

Heater Example from last classGoal: Heat the output stream to a desired set point temperature, Tset

Assumptions: • All liquid in lines and tank, thus Fin=Fout=F• Flow is constant• Fluid does not boil• No reactions• Tank is well stirred• Heater has no lag• Heater has finite range

Question: How do we choose PID control parameters?

idealized behavior

100

105

110

115

120

125

130

135

0 0.5 1 1.5 2 2.5 3 3.5

time

temperature

idealized response

Tfeed

limited action

Case: Heated CSTR Starting at 120, and Tset=130. Tfeed=100.

(see PID.example.xls)

idealized behavior

100

105

110

115

120

125

130

135

140

0 1 2 3 4 5 6 7

time

temperature

idealized response

Tfeed

limited action

Case: Heated CSTR Starting at 120, and Tset=130. Tfeed=100.

(see PID.example.xls)

Here we use a smaller to show integrator windup

idealized behavior

100

105

110

115

120

125

130

135

140

145

0 1 2 3 4 5 6 7

time

temperature

idealized response

Tfeed

limited action

Case: Heated CSTR Starting at 120, and Tset=130. Tfeed=100.

(see PID.example.xls)

Here and Kc are smaller.

What happened??

idealized behavior

100

105

110

115

120

125

130

135

140

145

0 1 2 3 4 5 6 7

time

temperature

idealized response

Tfeed

limited action

Case: Heated CSTR Starting at 120, and Tset=130. Tfeed=100.

(see PID.example.xls)

Here and Kc are even smaller.

What happened??

Possible Tuning Strategies

1. Perturb system, see what happens and use this response to choose PID parameters

2. Adjust PID parameters until something bad happens and then back off

3. Numerical optimization based on data

Reaction Curve Tuning (=Open Loop)

• Based on a First Order Plus Dead Time (FOPDT) process model assumption

time

dT(t)

dt= k1T(t) + k2v t −θ( )

First order process delayed response to signal v

Example from http://www.controlguru.com

• Change set point from 39 to 42% CO•Observe delay (0.8)• Observe max slopeof response at T=27

Slope=

Kmax= output change/Input change=k1/k2€

(140 −139)

(26.2 − 27.5)= −0.77

−0.77

3= −0.26

Units? %? Relative to what?

Max slope

Zeigler-Nichols Open Loop control Type of controller Kc Ti Td P only 1/( Kmax) PI 0.9/( Kmax) 3.3* PID 1.2/( Kmax) 2* 0.5*

Aside: intuition•If slope is high (Kmax big) then want a small gain (Kc), as the system is sensitive•If large dead time, then want a small gain because response is delayed, thus aggressive control could be dangerous.•Large dead time also reduces the effect of integration, but increases derivative. Integration can cause oscillations, and with a large delay could be a problem. Derivative can still work with time delay, in most cases.

i d

Zeigler-Nichols Open Loop control Type of controller Kc Ti Td P only 1/( Kmax) PI 0.9/( Kmax) 3.3* PID 1.2/( Kmax) 2* 0.5* Advantages of open loop tuning:• fast: the experiment takes just one run• does not introduce oscillations: Oscillations can be could be dangerous in a large plant, so best avoided.• Can be done before controller is installed

Disadvantages of open loop tuning:• can be inaccurate: does not take into account control dynamics or dynamics of other processes• can be difficult to implement: max slope is not always easy to find.• Terms can be ambiguous

i d

Closed Loop Tuning

Type of controller Kc Ti Td P 0.5 Ku PI 0.45 Ku Pu/1.2 PID 0.6 Ku Pu/2 Pu/8 Zeigler-Nichols (Z-N) Tuning parameters for closed loop

i d

Closed Loop Tuning

Advantages of closed loop tuning1)Easy experiment2)Incorporates in closed loop dynamics

Disadvantages of closed loop tuning1)this experiment can be slow2)Oscillations could be dangerous in some cases, or if not at least wasteful

Model Based Tuning

• FOPDT is okay for a first approximation, but we know what the process is doing.

• Given a model and normal operating data, we can create a good model of the process.

• PID parameters can then be optimally selected based on this model using regression!

Model Based Tuning

time

temp

Set points

Predicted model response for a given Kc, i, and d.

Goal: Use solver to find optimal values of Kc, i, and d that minimize

Tset (i) −Tmodel(i)( )2

i= 0

t

Model Based TuningAdvantages of model based tuning

1) Incorporates in knowledge about the physical system2)Incorporates in closed loop dynamics3) Incorporates in physical limitations in valves and sensors4) Includes inherent noise in system

Disadvantages of model based tuning1) Requires a good model that takes time to produce2) Requires significant data describing a range of operating behaviors3) Optimization for large systems can be difficult.4) Overkill for simple systems that are FOPD like

Light bulb control system

a little bit of real data…

Fan(=pump)

inlet

Light bulb(=heater) Temperature

sensors

Purgevalve

FLOW

open closed

Note: valves don’t always look like valves!

RTD

Thermocouple

Sample Response Curve(closed loop)

30

32

34

36

38

40

42

0 50 100 150 200 250 300 350 400 450 500

Thermocouple

RTD

Set Point

Time (sec)

tem

p

Closed loop tuning?

39

39.2

39.4

39.6

39.8

40

40.2

40.4

40.6

40.8

41

0 50 100 150 200 250 300 350 400 450 500

Thermocouple

RTD

Set Point

Time (sec)

tem

p

Difficult to define as we have (1) Limited control action, thus Ku tops out quickly.(2) The oscillation frequency is only somewhat stable.

Different PID tuning parameters

30

32

34

36

38

40

42

0 200 400 600 800 1000 1200 1400 1600 1800 2000

Thermocouple

RTD

Set Point

Small i, large Kc

Change set point

tem

p

Time (sec)

Open recycleAll derivative control

30

32

34

36

38

40

42

0 200 400 600 800 1000 1200 1400 1600 1800 2000

Thermocouple

RTD

Set Point

tem

p

Time (sec)

Model based tuning? 1. Create a model2. Parameterize the model based on

historical data3. If fit is poor, adjust model in step 1

and repeat.4. Fit PID tuning parameters to

optimize performance.

Model based tuning? 1. Create a model2. Parameterize the model based on

historical data3. If fit is poor, adjust model in step 1

and repeat.4. Fit PID tuning parameters to

optimize performance.

F, Tin

F, T

What if this did not fit?What might be a better model?

One idea… 4 CSTRs, each with different functions.

heater

TC2

TC1 RTD

thermocouple

Flow due to recycle

Flow in due to pressure balance

(Look to your reactors text for many more examples of such lumped models of multiple CSTRs)

Take Home Messages

• PID tuning parameters can be estimated from data using a variety of methods

• PID tuning can be difficult and time consuming

• Complex physical processes can often be broken down into smaller, more familiar systems