1 / 24

Example : Optimal blending of gasoline

Stream 1. Stream 2. Product 1 kg/s. Stream 3. Stream 4. Example : Optimal blending of gasoline. m 1 = ? ( · 0.4). m 2 = ?. m 3 = ?. m 4 = ?. Disturbance. Optimization problem. Degrees of freedom u o = (m 1 m 2 m 3 m 4 ) T Optimization problem:

angelh
Download Presentation

Example : Optimal blending of gasoline

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Stream 1 Stream 2 Product 1 kg/s Stream 3 Stream 4 Example : Optimal blending of gasoline m1 = ? (· 0.4) m2 = ? m3 = ? m4 = ? Disturbance

  2. Optimization problem • Degrees of freedom uo = (m1 m2 m3 m4 )T • Optimization problem: min J = i pi mi = 0.1(1 + m1) m1 + 0.2 m2 + 0.12 m3 + 0.185 m4 subject to m1 + m2 + m3 + m4 = 1 m1¸ 0; m2¸ 0; m3¸ 0; m4¸ 0 m1· 0.4 99 m1 + 105 m2 + 95 m3 + 99 m4¸ 98 (octane constraint) 2 m4· 1 (benzene constraint)

  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?

  4. Optimal solution • 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.1260 $ m1 + m2 + m3 + m4 = 1 m1¸ 0; m2¸ 0; m3¸ 0; m4¸ 0 m1· 0.4 99 m1 + 105 m2 +95 m3 + 99 m4¸ 98 (octane constraint) 2 m4· 1 (benzene constraint) • 3 active constraints) 1 unconstrained degree of freedom

  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

  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 freedom • c=m1 is constant at 0.26 ) Loss = 0.00036 $ • c=m2 is constant at 0.196 ) Infeasible (cannot satisfy octane = 98) • c=m3 is constant at 0.544 ) Loss = 0.00582 $ • Easily implemented in control system

  7. Exercise 2: Maximum gain rule • 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 • Optimal combination of m1 and m2 constant (use Null space method for finding optimal combination)

  8. Maximum gain rule: Details • c = m2 • Need “gain” and “span” • Can use any of m1, m2 and m3 as remaining d.o.f.(use m1) m1 + m2 + m3 = 1 99m1 + 105 m2 + 95 m3 = 98 ) 99m1 + 105 m2 + 95 (1 - m1 - m2) = 98 ) 4m1 + 10m2 = 3 ) Gain = - 0.4 Span is simply the difference of optimal values for d = 95 and d = 97

  9. 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)

  10. Optimal combination c = h1 m1 + h2 m2 Requirement: HF = 0 From optimization:  mopt = F  d sensitivity matrix F = (-0.03 -0.06)T ) – 0.03 h1 – 0.06 h2 = 0 This has infinite number of solutions Fix h1 = 1 to get h2 = 0.5 ) Loss = 0

  11. Singular value rule

  12. m1 = cs + 0.5 m2 cs = 0.162 0.5 m2 OC Octanes = 98 m3 FC mtot.s = 1 kg/s Stream 1 Octane mtot Stream 2 Stream 3 Octane varies Stream 4 m4 = 0 kg/s 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)!

  13. Dynamic simulations m1 m3 m2 m4 mtot

  14. Details of dynamics • 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)

  15. Exercise 3: Linear model • Derive the linear model for the different control policies: • m1 constant • m2 constant • m3 constant • m1 - 0.5 m2 constant

  16. Linear Model • Recall m1 + m2 + m3 = m = y1 99m1 + 105 m2 + 95 m3 = X m = y2 y1 Linearize second equation 99m1 + 105 m2 + 95 m3 = y2*y1 +y2 y1* ) 99m1 + 105 m2 + 95 m3 = 98y1 +y2 ) = 98(m1 + m2 + m3)+y2 ) m1 + 7 m2 - 3 m3 = y2

  17. 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: c = m1 c = m2 c = m3 c = m1 - 0.5m2

  18. Flow controller: G(s) = 1/((1000s+1)*(10s+1)) k = 1 τ1 = 1000+10/2 = 1005 θ = 10/2 = 5 K = τ1/(2 θ k) = 100.5 τI = min(τ1, 8θ) = 40 Octane controller G(s) = k'*e-60s/((1000s+1)*(10s+1)) k = 7, 1, -3 depending on pairing τ1 = 1000+10/2 = 1005 θ = 60 + 10/2 = 65 K = τ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 Controller tuning: SIMC tuning rules

  19. 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 price - raw material price - TV)/amount of product • TV is a function of controller usage • Product price = 0.2 when octane > 97.9 0.15 when octane < 97.9 • Simulation time is 10 000 s

  20. c = m1: Profit/kg = 0.0683

  21. c = m2: Infeasible

  22. c = m3: Profit/kg = 0.0640

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

  24. 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?

More Related