Download presentation
Presentation is loading. Please wait.
1
Example : Optimal blending of gasoline
Stream 1 Stream 2 Stream 3 Stream 4 Product 1 kg/s m2 = ? m3 = ? m4 = ? Stream 1 99 octane 0 % benzene p1 = 0.1 (1 + m1) $/kg Stream 2 105 octane p2 = $/kg Stream 3 95 → 97 octane p3 = $/kg Stream 4 2 % benzene p4 = $/kg Product > 98 octane < 1 % benzene Disturbance
2
Optimization problem Degrees of freedom uo = (m1 m2 m3 m4 )T
min J = i pi mi = 0.1(1 + m1) m m m m4 subject to m1 + m2 + m3 + m4 = 1 m1 ¸ 0; m2 ¸ 0; m3 ¸ 0; m4 ¸ 0 m1 · 0.4 99 m m m m4 ¸ 98 (octane constraint) 2 m4 · (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 = ( )T ) Jopt= $ Optimal solution with d=octane stream 3=97: u0,opt = ( )T ) Jopt= $ m1 + m2 + m3 + m4 = 1 m1 ¸ 0; m2 ¸ 0; m3 ¸ 0; m4 ¸ 0 m1 · 0.4 99 m m m m4 ¸ 98 (octane constraint) 2 m4 · (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 ) Loss = $ c=m2 is constant at ) Infeasible (cannot satisfy octane = 98) c=m3 is constant at ) Loss = $ 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 99m m m3 = 98 ) 99m m (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
Basis: Want optimal value of c independent of disturbances )
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 = ( )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 CV c span c G |Gs| Loss factor 1/|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.015 1.200 77.41 1.558e-4
12
Blending: Example of implementation of ”self-optimizing” constant setpoint policy
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.5 m1 = cs m2 Octane varies 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 m3 m1 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 m m2 constant
16
Linear Model Recall ) 99m1 + 105 m2 + 95 m3 = 98 y1 + y2
m1 + m2 + m3 = m = y1 99m m m3 = X m = y2 y1 Linearize second equation 99m m m3 = y2* y1 + y2 y1* ) 99m m m3 = 98 y1 + y2 ) = 98 (m1 + m2 + m3) + y2 ) m1 + 7 m2 - 3 m3 = y2
17
Linear analysis Linear model with controlled variable c = m m2 constant: G = 1/(1000s + 1)(10s + 1) [ ; 1e-60s 7e-60s e-60s; ] Steady state RGA: c = m1 c = m2 0.3000 0.7000 1.0000 0.0000 0.7500 0.0000 0.2500 1.0000 c = m3 c = m m2 1.1667 0.0000 1.0000 0.1250 0.2500 0.6250 0.0417 0.5833 0.3750 0.8333 0.1667 0.0000
18
Controller tuning: SIMC tuning rules
Flow controller: G(s) = 1/((1000s+1)*(10s+1)) k = 1 τ1 = /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 = /2 = 1005 θ = /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 = if m3 controls octane
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 s
20
c = m1: Profit/kg =
21
c = m2: Infeasible
22
c = m3: Profit/kg =
23
c = m m2: Profit/kg =
24
Selecting control structure
Loss calculations shows zero losses for linear combinations of two measurements (m m2 constant) Singular value rule shows a small loss factor for linear combination of two measurements (m m2 constant) Steady state RGA indicates interactions when using the linear combination m m2 constant. Are other combinations better? Dynamic simulations shows that there is better to keep m3 constant than m m2 constant, but is it possible to overcome this by re-tuning the controllers?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.