1 unconstrained degrees of freedom: c. optimal measurement combination (alstad, 2002) basis: want...

20
1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances ) c opt = 0 ¢ d Find optimal solution as a function of d: u opt (d), y opt (d) Linearize this relationship: y opt = F d F – sensitivity matrix Want: To achieve this for all values of d: Always possible if Optimal when we disregard implementation error (n)

Upload: amy-tucker

Post on 18-Jan-2018

215 views

Category:

Documents


0 download

DESCRIPTION

3 Exercise 1: Optimal operation The Matlab function quadprog will be used to find optimal operation Calculate the optimal operating point for the nominal values (octane in stream 3 equal 95) Calculate the optimal operating point with disturbance (octane in stream 3 equal 97) Report value of objective function and flowrates for both cases How many degrees of freedom, active constraints and unconstrained degrees of freedom are there?

TRANSCRIPT

Page 1: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

1

Unconstrained degrees of freedom:

C. Optimal measurement combination (Alstad, 2002)

Basis: Want optimal value of c independent of disturbances ) copt = 0 ¢ d

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

• Linearize this relationship: yopt = F d • F – sensitivity matrix

• Want:

• To achieve this for all values of d:

• Always possible if

• Optimal when we disregard implementation error (n)

Page 2: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

2

Example C (measurement combination): Optimal blending of gasoline

Stream 1

Stream 2

Stream 3

Stream 4

Product 1 kg/s

Stream 1 99 octane 0 % benzene p1 = 0.1 (1 + m1) $/kg

Stream 2 105 octane 0 % benzene p2 = 0.200 $/kg

Stream 3 95 → 97 octane 0 % benzene p3 = 0.120 $/kg

Stream 4 99 octane 2 % benzene p4 = 0.185 $/kg

Product > 98 octane < 1 % benzene

Disturbance

m1 = ? (· 0.4)

m2 = ?

m3 = ?

m4 = ?

Page 3: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

3

Exercise 1: Optimal operation

The Matlab function quadprog will be used to find optimal operation

• Calculate the optimal operating point for the nominal values (octane in stream 3 equal 95)

• Calculate the optimal operating point with disturbance (octane in stream 3 equal 97)

• Report value of objective function and flowrates for both cases• How many degrees of freedom, active constraints and unconstrained

degrees of freedom are there?

Page 4: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

4

Optimal solution• Degrees of freedom

uo = (m m2 m3 m4 )T

• Optimization problem: MinimizeJ = i pi mi = 0.1(1 + m1) m1 + 0.2 m2 + 0.12 m3 + 0.185 m4

subject tom1 + m2 + m3 + m4 = 1m1 ¸ 0; m2 ¸ 0; m3 ¸ 0; m4 ¸ 0m1 · 0.499 m1 + 105 m2 + 95 m3 + 99 m4 ¸ 98 (octane constraint)2 m4 · 1 (benzene constraint)

• Nominal optimal solution (d* = 95):u0,opt = (0.26 0.196 0.544 0)T ) Jopt=0.13724 $

• Optimal solution with d=octane stream 3=97:u0,opt = (0.20 0.075 0.725 0)T ) Jopt=0.13724 $

• 3 active constraints ) 1 unconstrained degree of freedom

Page 5: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

5

Exercise 1 cont.: Optimal operation

• There is one unconstrained degree of freedom, which can be used to optimize operation

• What is the loss of using this unconstrained DOF to maintain the following constant at nominal set point:– m1

– m2

– m3

• Find a linear combination of two variables that will give zero loss.

Page 6: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

6

Implementation of optimal solution• Available ”measurements”: y = (m1 m2 m3 m4)T

• Control active constraints:– Keep m4 = 0– Adjust one (or more) flow such that m1+m2+m3+m4 = 1– Adjust one (or more) flow such that product octane = 98

• Remaining unconstrained degree of freedom1. c=m1 is constant at 0.26 ) Loss = 0.00036 $2. c=m2 is constant at 0.196 ) Infeasible (cannot satisfy octane = 98)3. c=m3 is constant at 0.544 ) Loss = 0.00582 $

• Optimal combination of measurementsc = h1 m1 + h2 m2 + h3 ma

From optimization: mopt = F d where sensitivity matrix F = (-0.03 -0.06 0.09)T

Requirement: HF = 0 ) -0.03 h1 – 0.06 h2 + 0.09 h3 = 0

This has infinite number of solutions (since we have 3 measurements and only ned 2):c = m1 – 0.5 m2 is constant at 0.162 ) Loss = 0c = 3 m1 + m3 is constant at 1.32 ) Loss = 0c = 1.5 m2 + m3 is constant at 0.83 ) Loss = 0

• Easily implemented in control system

Page 7: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

7

Blending: Example of implementation of ”self-optimizing” constant setpoint policy

• Selected ”self-optimizing” variable: c = m1 – 0.5 m2 • Changes in feed octane (stream 3) detected by octane controller (OC)• Implementation is optimal provided active constraints do not change • Price changes can be included as corrections on setpoint cs

• Comment: Example is for illustration. Use MPC in practice (changing constraints)!

FC

OC

mtot.s = 1 kg/s

mtot

m3

m4 = 0 kg/s

Octanes = 98

Octane

m2

Stream 2

Stream 1

Stream 3

Stream 4

cs = 0.162

0.5

m1 = cs + 0.5 m2

Octane varies

Page 8: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

8

Exercise 2: Singular value

• Assume that there is an implementation error of 0.01 kg/s in flowrates

• Use the singular value rule to find the approximate losses for the following cases:– m1 constant

– m2 constant

– m3 constant

– m1 - 0.5 m2 constant

Page 9: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

9

Singular value rule

CVc

span c G |Gs| Loss factor1/|Gs|2

m1 0.0700 1.000 14.29 0.0049

m2 0.1310 -0.400 3.053 0.1073

m3 0.1910 -0.600 3.141 0.1013

m1-0.5m2 0.0155 1.200 77.41 1.668e-4

Page 10: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

10

Exercise 3: Dynamic simulations

m1

m2

m3

m4

mtot

Page 11: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

11

Exercise 3: Dynamic simulations• P-control of tank level: m = Kc M with Kc=0.001

– The tank has a variable mass M of 1000m (where m is the total flowrate)• Time constant in valves are 10s• Octane measurement has a delay of 60 s• Each flow may vary between 0 and two times nominal value• m4 is not used so inputs are [m1, m2, m3]' = Flowrates• Output:

– y1 = Product flowrate

– y2 = Octane number in product

– y3 = c (a selected measurement, or a combination of two measurements)

• The linear model from m to y (for the case c = m1) is:

G = 1/(1000s + 1)(10s + 1) [ 1 1 1; 1e-60s 7e-60s -3e-60s; 1 0 0]

Page 12: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

12

Exercise 3: Dynamic simulations

• Derive the linear model for the different control policies:– m1 constant

– m2 constant

– m3 constant

– m1 - 0.5 m2 constant

• Use steady state RGA to select controller pairing for the above cases

• Simulate the process in Simulink with different the control structures

• Compare results from the different approaches and choose the best control policy

Page 13: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

13

Linear analysis• Linear model with controlled variable c = m1 - 0.5 m2 constant:

G = 1/(1000s + 1)(10s + 1) [ 1 1 1; 1e-60s 7e-60s -3e-60s; 1 -0.5 0]

• Steady state RGA:

0 0.3000 0.70000 0.7000 0.3000

1.0000 0.0000 0.0000

1.1667 -0.1667 0.0000

-0.1667 1.1667 0.0000

0.0000 0.0000 1.0000

0.7500 0.0000 0.2500

0.2500 0.0000 0.75000.0000 1.0000 0.0000

0.1250 0.2500 0.62500.0417 0.5833 0.3750

0.8333 0.1667 0.0000

c = m1 c = m2

c = m3 c = m1 - 0.5m2

Page 14: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

14

Controller tuning: SIMC tuning rules

• Flow controller: G(s) = 1/((1000s+1)*(10s+1))k = 1τ1 = 1000+10/2 = 1005

θ = 10/2 = 5K = τ1/(2 θ k) = 100.5

τI = min(τ1, 8θ) = 40

• Octane controllerG(s) = k'*e-60s/((1000s+1)*(10s+1))k = 7, 1, -3 depending on pairing

τ1 = 1000+10/2 = 1005

θ = 60 + 10/2 = 65K = τ1/(2 θ k) = 7.73/k

τI = min(τ1 , 8 θ) = 520

K = 1.10 if m1 controls octane

K = 7.73 if m2 controls octane

K = -2.58 if m3 controls octane

Page 15: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

15

Dynamic simulations

• Disturbance– Octane of stream 3 steps from 95 to 94 at t=0– Octane of stream 3 steps from 94 to 97 at t=3000

• Profit/kg = (product prize - raw material prize - TV)/amount of product– TV is a function of controller usage– Product prize = 0.2 when octane > 97.9

0.15 when octane < 97.9

• Simulation time is 10 000 s

Page 16: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

16

c = m1: Profit/kg = 0.0683

Page 17: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

17

c = m2: Infeasible

Page 18: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

18

c = m3: Profit/kg = 0.0640

Page 19: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

19

c = m1 - 0.5m2: Profit/kg = 0.0680

Page 20: 1 Unconstrained degrees of freedom: C. Optimal measurement combination (Alstad, 2002) Basis: Want optimal value of c independent of disturbances )

20

Selecting control structure

• Loss calculations shows zero losses for linear combinations of two measurements (m1 - 0.5 m2 constant)

• Singular value rule shows a small loss factor for linear combination of two measurements (m1 - 0.5 m2 constant)

• Steady state RGA indicates interactions when using the linear combination m1 - 0.5 m2 constant. Are other combinations better?

• Dynamic simulations shows that there is better to keep m3 constant than m1 - 0.5m2 constant, but is it possible to overcome this by re-tuning the controllers?