CONTROLLED VARIABLE AND MEASUREMENT SELECTION

32
1 CONTROLLED VARIABLE AND MEASUREMENT SELECTION Sigurd Skogestad Department of Chemical Engineering Norwegian University of Science and Technology (NTNU) Trondheim, Norway Bratislava, Jan. 2011

description

CONTROLLED VARIABLE AND MEASUREMENT SELECTION. Sigurd Skogestad Department of Chemical Engineering Norwegian University of Science and Technology (NTNU) Trondheim, Norway Bratislava, Jan. 2011. Outline. Plantwide control. The controlled variables (CVs) interconnect the layers. - PowerPoint PPT Presentation

Transcript of CONTROLLED VARIABLE AND MEASUREMENT SELECTION

Page 1: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

1

CONTROLLED VARIABLE AND MEASUREMENT SELECTION

Sigurd Skogestad

Department of Chemical EngineeringNorwegian University of Science and Technology (NTNU)Trondheim, Norway

Bratislava, Jan. 2011

Page 2: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

2

Outline

Page 3: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

3

cs = y1s

MPC

PID

y2s

RTO

u (valves)

Switch+Follow path (+ look after other variables)

CV=y1 (+ u); MV=y2s

Stabilize + avoid drift CV=y2; MV=u

Min J (economics); MV=y1s

OBJECTIVE

Plantwide control

Process control The controlled variables (CVs)interconnect the layers

MV = manipulated variableCV = controlled variable

Page 4: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

4

Need to find new “self-optimizing” CVs (c=Hy) in each region of active constraints

3

3 unconstrained degrees of freedom -> Find 3 CVs

2

2

1

1

Control 3 active constraints

Page 5: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

5

• Operational objective: Minimize cost function J(u,d)• The ideal “self-optimizing” variable is the gradient (first-order

optimality condition) (Halvorsen and Skogestad, 1997; Bonvin et al., 2001; Cao, 2003):

• Optimal setpoint = 0

• BUT: Gradient can not be measured in practice• Possible approach: Estimate gradient Ju based on measurements y

• Approach here: Look directly for c as a function of measurements y (c=Hy) without going via gradient

Ideal “Self-optimizing” variables

Unconstrained degrees of freedom:

I.J. Halvorsen and S. Skogestad, ``Optimizing control of Petlyuk distillation: Understanding the steady-state behavior'', Comp. Chem. Engng., 21, S249-S254 (1997)Ivar J. Halvorsen and Sigurd Skogestad, ``Indirect on-line optimization through setpoint control'', AIChE Annual Meeting, 16-21 Nov. 1997, Los Angeles, Paper 194h. .

Page 6: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

6

H

Page 7: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

7

H

Page 8: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

8

Optimal measurement combination

H

•Candidate measurements (y): Include also inputs u

Page 9: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

9

H

Loss method. Problem definition

Page 10: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

10

Nullspace method

No measurement noise (ny=0)

Page 11: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

11

Amazingly simple!

Sigurd is told how easy it is to find H

Proof nullspace methodBasis: Want optimal value of c to be independent of disturbances

• Find optimal solution as a function of d: uopt(d), yopt(d)

• Linearize this relationship: yopt = F d

• Want:

• To achieve this for all values of d:

• To find a F that satisfies HF=0 we must require

• Optimal when we disregard implementation error (n)

V. Alstad and S. Skogestad, ``Null Space Method for Selecting Optimal Measurement Combinations as Controlled Variables'', Ind.Eng.Chem.Res, 46 (3), 846-853 (2007).

No measurement noise (ny=0)

Page 12: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

12

( , ) ( , )opt optL J u d J u d

Ref: Halvorsen et al. I&ECR, 2003

Kariwala et al. I&ECR, 2008

Generalization (with measurement noise)

21/2 1( )yavg uu F

L J HG HYLoss with c=Hym=0 due to(i) Disturbances d(ii) Measurement noise ny

31( , ) ( , ) ( ) ( ) ( )

2T

opt u opt opt uu optJ u d J u d J u u u u J u u

1

[ ],d n

y yuu ud d

Y FW W

F G J J G

u

J

( )opt ou d

Loss

'd

Controlled variables,c yH

ydG

cs = constant +

+

+

+

+

- K

H

yG y

'yn

c

u

dW nW

d

optu

Page 13: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

13

1/2 1min ( )yuu FH

J HG HY Non-convex optimization problem

(Halvorsen et al., 2003)

Hmin HY F

st 1/ 2yuuHG J

Improvement 1 (Alstad et al. 2009)

st yHG Q

Improvement 2 (Yelchuru et al., 2010)

Hmin HY F

-1 -1 -1 1 -11 y 1 y y y (H G ) H = (DHG ) DH = (HG ) D DH = (HG ) H

1H DH D : any non-singular matrix

Have extra degrees of freedom

[ ]d nY FW W

Convex optimization

problem

Global solution

- Full H (not selection): Do not need Juu

- Q can be used as degrees of freedom for faster solution- Analytical solution when YYT has full rank (w/ meas. noise):

1/2 1 1 1( ( ) ) ( )yT T y yT TuuH J G Y Y G G Y Y

Page 14: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

14

Special cases

• No noise (ny=0, Wny=0):

Optimal is HF=0 (Nullspace method)• But: If many measurement then solution is not unique

• No disturbances (d=0; Wd=0) + same noise for all measurements (Wny=I):

Optimal is HT=Gy (“control sensitive measurements”)• Proof: Use analytic expression

'd

ydG

cs = constant +

+

+

+

+

- K

H

yG y

'yn

c

u

dW nW

Page 15: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

15

'd

ydG

cs = constant +

+

+

+

+

- K

H

yG y

'yn

c

u

dW nW

“Minimize” in Maximum gain rule( maximize S1 G Juu

-1/2 , G=HGy )

“Scaling” S1-1 for max.gain rule

“=0” in nullspace method (no noise)

Relationship to maximum gain rule

Page 16: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

16

Special case: Indirect control = Estimation using “Soft sensor”

• Indirect control: Control measurements c= Hy such that primary output y1 is constant

– Optimal sensitivity F = dyopt/dd = (dy/dd)y1

– Distillation: y=temperature measurements, y1= product composition

• Estimation: Estimate primary variables, y1=c=Hy

– y1 = G1 u, y = Gy u

– Same as indirect control if we use extra degrees of freedom (H1=DH) such that (H1Gy)=G1

Page 17: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

17

Current research:“Loss approach” can also be used for Y = data

• Alternative to “least squares” and extensions such as PCR and PLS (Chemiometrics)

• Why is least squares not optimal?– Fits data by minimizing ||Y1-HY||

– Does not consider how estimate y1=Hy is going to be used in the future.

• Why is the loss approach better?– Use the data to obtain Y, Gy and G1 (step 1).

– Step 2: obtain estimate y1=Hy that works best for the future expected disturbances and measurement noise (as indirectly given by the data in Y)

Page 18: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

18

Loss approach as a Data Regression Method

• Y1 – output to be estimated

• X – measurements (called y before)

Page 19: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

19

Page 20: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

20

Test 1. Gluten data

• 1 y1 (gluten), 100 x (NIR), 100 data sets (50+50).

Page 21: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

21

but....

Page 22: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

22

Test 2. Wheat data

• 2 y1, 701 x , 100 data sets (50+50).

Page 23: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

23

Test 3. Our own

• 2 y1, 7 x (generated by 2u + 2d),

• 8 or 32 data sets + noisefree as validation

Page 24: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

24

Conclusion ”Loss regression method”

• Works well but not always the winner– Not surprising, PLS and PCR are well-proven methods...

• Needs sufficent data to get estimate of noise

• If we have model: Very promising as ”soft sensor” (estimate y1)

Page 25: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

25

The end in Bratislava....

Page 26: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

26

Self-optimizing control vs. NCO-tracking

1. Find controlled variables c=Hy (inputs u are generated by PI-feedback to keep c=0)

2. c=Hy may be viewed as estimate of gradient Ju

3. Use model offline to find H• HF=0

4. Optimal for modelled (expected) disturbances

5. Fast time scale

1. Find input values , Δu=-β Juu-1 Ju

2. Measure gradient Ju (if possible) or estimate by perturbing u

3. No explicit model needed

4. Optimal also for “new” disturbances

5. Slow time scale

Page 27: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

27

Self-optimizing control and NCO-tracking

• Similar idea: Use measurements to drive gradient to zero

• Not competing but complementary

Page 28: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

28

Toy Example

Reference: I. J. Halvorsen, S. Skogestad, J. Morud and V. Alstad, “Optimal selection of controlled variables”, Industrial & Engineering Chemistry Research, 42 (14), 3273-3284 (2003).

Page 29: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

29

Toy Example: Single measurements

Want loss < 0.1: Consider variable combinations

Constant input, c = y4 = u

Page 30: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

30

Toy Example

Page 31: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

31

Conclusion

• Systematic approach for finding CVs, c=Hy

• Can also be used for estimation

S. Skogestad, ``Control structure design for complete chemical plants'', Computers and Chemical Engineering, 28 (1-2), 219-234 (2004).

V. Alstad and S. Skogestad, ``Null Space Method for Selecting Optimal Measurement Combinations as Controlled Variables'', Ind.Eng.Chem.Res, 46 (3), 846-853 (2007).

V. Alstad, S. Skogestad and E.S. Hori, ``Optimal measurement combinations as controlled variables'', Journal of Process Control, 19, 138-148 (2009)

Ramprasad Yelchuru, Sigurd Skogestad, Henrik Manum , MIQP formulation for Controlled Variable Selection in Self Optimizing Control IFAC symposium DYCOPS-9, Leuven, Belgium, 5-7 July 2010

Download papers: Google ”Skogestad”

Page 32: CONTROLLED VARIABLE AND MEASUREMENT SELECTION

32

Other issues

• C=Hy. Want to use as few measurements y as possible (RAMPRASAD)

• The c’s need to be controlled by some MV. Would like to use local measurements (RAMPRASAD)

• Simplify switching: Would like to use same H in several regions? (RAMPRASAD)

• Nonlinearity (JOHANNES)