Sie sind auf Seite 1von 14

CHEE 6367 – Advanced Process Control Michael Nikolaou

Linear and Quadratic Programming


Examples

Linear Programming Example1


A refinery has available two crude oils that have the yields shown in the following table.

Volume percent yields Maximum allowable


Product
Crude #1 Crude #2 product rate (bbl/day)
Gasoline 70 31 24000
Kerosene 6 9 2400
Fuel oil 24 60 12000

Because of equipment and storage limitations, production of gasoline, kerosene, and fuel oil must be
limited as also shown in this table. There are no plant limitations on the production of other products
such as gas oils. The profit on processing crude #1 is $1.00/bbl and on crude #2 it is $0.70/bbl. What
are the optimal daily feed rates of the two crudes?

- First thoughts

Because crude #1 brings higher profit than crude #2, one might be inclined to use crude #1 only.
However, one could use up to

24000 2400 12000


min{ , , } min{34286, 40000, 50000} 34286 bbl/day
0.70 0.06 0.24

of crude #1 (and no crude #2), because product sales are limited. In particular, the sale of gasoline (with
70% yield from crude #1) is limited to 24000 bbl/day. The resulting profit from production using crude
#1 alone would be

34286(bbl/d) 1($/bbl) 34286($/d) (1)

Using a little less crude #1 and some crude #2 would drastically reduce gasoline production and
would significantly increase production of fuel oil (which has the highest yield for crude #2, and of which
up to 12000 bbl/day can be sold). Would this increase profit? If so, what is the combination of crude #1
and #2 that would maximize profit?

1
Adapted from Edgar and Himmelblau, Optimization of Chemical Processes, McGraw-Hill, 2001.

-1-
CHEE 6367 – Advanced Process Control Michael Nikolaou

- Mathematical problem formulation

Crude #1: x bbl/day

Crude #2: y bbl/day

Profit: x 0.7y

Optimization problem:

max(x 0.7y) (2)


x ,y

subject to

0.70x 0.31y 24000


0.06x 0.09y 2400
0.24x 0.60y 12000 (3)
x 0
y 0

- Graphical solution

Figure 1. Graphical solution of the linear programming problem in eqns. (2) and (3). Optimum is at
(31891.9, 5405.41) with optimal profit 35676.

Optimal profit:

31892(bbl/d) 1($/bbl)+5405.4(bbl/d) 0.70($/bbl) 35676($/d) (4)

Compare to eqn. (1).

-2-
CHEE 6367 – Advanced Process Control Michael Nikolaou

- Numerical solution

Figure 2. Excel sheet to solve the linear programming problem in eqns. (2) and (3). Optimum is at
(31891.9, 5405.41) with an optimal profit 35676.

-3-
CHEE 6367 – Advanced Process Control Michael Nikolaou

Figure 3. Excel Solver for solution of the linear programming problem in eqns. (2) and (3).

Linear Programming in General


max cT x (5)
x

subject to

Ax b (6)

or, in detail,

max(c1x1 ... cn x n ) (7)


x1 ,...,xn

subject to

a11x 1 ... a1n x n b1


(8)
am 1x 1 ... amn x n bm

- Easy to solve numerically via the Simplex method or others.


- Software readily available.

-4-
CHEE 6367 – Advanced Process Control Michael Nikolaou

Quadratic Programming Example

Reflux Condenser
Feed yD
L Distillate, D
Boil-up
Reboiler
V
xB
Bottoms, B

Figure 4. Low-purity distillation column.

For the low-purity binary distillation column shown in Figure 4, the following model captures the effect
of the reflux and boil-up flow rates on the top and bottom concentrations.

yD 0.7 0.9 L
(9)
xB 1.0 0.9 V
y G m

(All variables are shown in deviation from the normal operation steady state). It is desired to select
values for the reflux and boil-up flow rates L and V , respectively, such that the vector
y ˆ [ yD x B ]T of top and bottom concentrations approaches the setpoint vector ySP [1 1]T
as close as possible. Eqn. (9) 

1 0.7 0.9 L L 6.67


(10)
1 1.0 0.9 V V 6.30

ySP G m

-5-
CHEE 6367 – Advanced Process Control Michael Nikolaou

Case 1
The flow rates L and V cannot be moved arbitrarily, but must satisfy the constraints

5 L 20
(11)
20 V 10

Unfortunately, the above L and V in eqn. (10) do not satisfy the constraints, eqn. (11). What is
the best that can be achieved in this case?

- Mathematical problem formulation

min f ( yD , x B ) ˆ min( y ySP )2 min (y1 y1SP )2 (y2 y2SP )2 (12)2


L, V y 2 y1 ,y2

subject to the constraints in eqn. (16).

Using eqn. (9), write f ( yD , x B ) in terms of m ˆ [ L V ]T to write eqn. (17) as

min g( L, V ) min(mT Hm 2mT f c) (13)


L, V m

where

1.49 1.53
H ˆ GT G (14)
1.53 1.62

0.3
f ˆ GT ySP (15)
0.

(Why? Hint:

(y ySP )2 (y ySP )T (y ySP )


2
(Gm ySP )T (Gm ySP )
(mT GT (ySP )T )(Gm ySP )
mT GT Gm 2mT GT ySP (ySP )T ySP

2
The 2-norm of a vector x in n
is defined as x x12 ... x n2 xT x ,
2

-6-
CHEE 6367 – Advanced Process Control Michael Nikolaou

- Graphical solution

Figure 5. Surface plot of g( L, V) mT Hm 2mT f c.

Figure 6. Contour plot of g( L, V) mT Hm 2mT f c and graphical solution for


m1 ˆ Lopt
5 and m2 ˆ V opt
4.7222 , resulting in y1opt 0.75 (instead of 1) and
y1opt 0.75 (instead of -1).

-7-
CHEE 6367 – Advanced Process Control Michael Nikolaou

- Numerical solution using Excel Solver

Figure 7. Excel sheet to solve the quadratic programming problem. Optimum is at


m1 ˆ Lopt 5 and m2 ˆ V opt 4.7222 , resulting in y1opt 0.75 (instead of 1) and
y1opt 0.75 (instead of -1).

-8-
CHEE 6367 – Advanced Process Control Michael Nikolaou

Figure 8. Excel Solver for solution of the quadratic programming problem.

-9-
CHEE 6367 – Advanced Process Control Michael Nikolaou

Case 2
The flow rates L and V cannot be moved arbitrarily, but must satisfy the constraints

10 L 20
(16)
20 V 10

Luckily, the above L and V satisfy the constraints, eqn. (16).

- Mathematical problem formulation

The same formulation as in Case 1 can be used again:

2
min f ( yD , x B ) ˆ min y ySP min (y1 y1SP )2 (y2 y2SP )2 (17)
L, V y 2 y1 ,y2

subject to the constraints in eqn. (16).

Using eqn. (9), write f ( yD , x B ) in terms of m ˆ [ L V ]T to write eqn. (17) as

min g( L, V ) min(mT Hm 2mT f c) (18)


L, V m

where

1.49 1.53
H ˆ GT G (19)
1.53 1.62

0.3
f ˆ GT ySP (20)
0.

-10-
CHEE 6367 – Advanced Process Control Michael Nikolaou

- Graphical solution

Figure 9. Surface plot of g( L, V) mT Hm 2mT f c . Same as in Figure 5.

Figure 10. Contour plot of g( L, V) mT Hm 2mT f c and graphical solution for Lopt and
V opt . Optimum is at m1 ˆ Lopt 6.6667 and m2 ˆ V opt 6.2963 , resulting in
y1opt 1 and y1opt 1 as desired. Note similarities with and differences from Figure 6.

-11-
CHEE 6367 – Advanced Process Control Michael Nikolaou

- Numerical solution using Excel Solver

Figure 11. Excel sheet to solve the quadratic programming problem. Optimum is at Optimum is at
m1 ˆ Lopt 6.6669 and m2 ˆ V opt 6.2965 , resulting in y1opt 1 and y1opt 1 as
desired. Note similarities with and differences from Figure 7.

-12-
CHEE 6367 – Advanced Process Control Michael Nikolaou

Figure 12. Excel Solver for solution of the quadratic programming problem. Note similarities with and
differences from Figure 8.

-13-
CHEE 6367 – Advanced Process Control Michael Nikolaou

Quadratic Programming in General


min(xT Hx 2xT f ) (21)
x

subject to

Ax b (22)

or, in detail,

min(h11x12 ... hnn x n2 2h21x 2x1 ... 2hn,n 1x n x n 1


2f1x1 ... 2fnx n ) (23)
x1 ,...,xn

subject to

a11x 1 ... a1n x n b1


(24)
am 1x 1 ... amn x n bm

- Easy to solve numerically when all eigenvalues of the symmetric matrix H are non-negative.
- General numerical solution via a number of methods.
- Software readily available.

-14-

Das könnte Ihnen auch gefallen