Sei sulla pagina 1di 4

Process Optimization

Solution 1

Summer Semester 2012


Department of Chemical Engineering
Malte Behrens, Sergio Lucia
Chair of Process Dynamics and Operations,
Prof. Sebastian Engell

1.1 Questions
An optimization problem could be formulated as:
min f ( x)
x

s.t. : g ( x) 0
h( x ) = 0

Several classes of optimization problems:

Linear problem: f, g, and h are linear

Quadratic problem: f is quadratic, g and h are linear

Convex: f and g are convex, h is linear

Non-linear problems: f, g, or h are non-linear

Non-convex problems: f and/ or the feasible region is non-convex

Mixed-integer problems: Some variables must be integers

1.2 Scalar Optimization


a. Determine a minimum numerically
Golden Cut Interval Reduction method:

i
0
1
2
3

a
-2.0
-2.0
-2.0
-0.94

b
5.0
2.27
0.73
0.73

x1
0.73
-0.33
-0.94
-0.33

x2
2.27
0.73
-0.33
0.08

f(x1)
3.50
0.93
7.18
0.93

f(x2)
11.13
3.50
0.93
0.05

f(x2)>f(x1)
Y
Y
N
N

Computations in Matlab
step
0
(initiali
sation)

Matlab commands

f=inline('1/5*x.^5 a=-2;
b=5;
x1=a+(1-0.61)*(b-a)
x2=b-(1-0.61)*(b-a)
f(x1)
f(x2)
b=x2
x2=x1
x1=a+(1-0.61)*(b-a)
f(x1)
b=x2
x2=x1

x.^4 - 4/3*x.^3 +8*x.^2');

x1 = 0.73
x2 = 2.27
3.5020
11.12

b = 2.27
x2 = 0.73
x1 = -0.3347
0.9328

b = 0.73
x2 = -0.3347

1/4

f(x2) > f(x1)

f(x2) > f(x1)

Process Optimization

Solution 1

x1=a+(1-0.61)*(b-a)
f(x1)
a=x1
x1=x2
x2=b-(1-0.61)*(b-a)
f(x2)

x1 = -0.9353
7.1808

a = -0.9353
x1 = -0.3347
x2 = 0.0805
0.0511
[

f(x2) < f(x1)

f(x2) < f(x1)]

Newton method, start from x=0.5.


f1=inline('x.^4 - 4*x.^3 - 4*x.^2 +16*x');
f2=inline('4*x.^3 - 12*x.^2 - 8*x +16');
x=0.5;
x=x-f1(x)/f2(x)

x = -0.1908
x=x-f1(x)/f2(x)

x = -0.0050
x=x-f1(x)/f2(x)

x = -6.2818e-006

b. Determine the minimum analytically


In order to determine the global minimum, we first determinate the values for a local
minimum by the necessary and the sufficient condition. From the necessary condition
f
=0
x
x 4 4 x 3 4 x 2 + 16 x = 0

x( x 4)( x 2 4) = 0
The candidate values for a local minimum are: x1=0, x2=4, x3=-2 and x4=2.
Check the sufficient condition
2 f (4)
2 f (2)
2 f (0)
2 f (2)
=
>
48
0
= 16 < 0
16
0
48
0
=
>
=

<
,
,
,
x 2
x 2
x 2
x 2
x1=0 and x2=4 satisfy the sufficient condition. f(0)=0, f(4)=-8.53.
For the global minimum, calculate the values at bounds f(-3)=-21, f(5)=33.33. Therefore x*=3 is the global minimum.
c. Conclusion

40

30

20

10

-10

-20

-30
-3

-2

-1

Fig.1
Both numerical methods require that the function is unimodular, but this is not the case here.
We should have checked the unimodularity of the function, before, but that can be quite
difficult in more complex cases. Hence, we have always to be careful, when interpreting
numerical results!
The global minimum could be found with the Interval Reduction method, but it would take a
lot of iterations. The Newton method is much faster, but it finds only local extrema. In this
case the global minimum is not a local minimum, because the derivative is not zero.

2/4

Process Optimization

Solution 1

1.3 Scalar Optimization


a. Enclosure of the minimum
Use the enclosure of the minimum procedure to bound the negative root. Take s=1. Since the
roots of the polynomial are the points at which the polynomial crosses the abscissa, they will
be the minima of the absolute polynomial |P(x)|. This is clear in Fig.2.

Fig.2
The task now is to bound the negative root of P(x) which in the same time is a minimum of
|P(x)|. Algorithm 1 describes the procedure.
Algorithm 1 Enclosure of the Minimum
F(x) = |P(x)|
x (1) = x ( 0 ) + s
if F ( x (1) ) > F ( x ( 0 ) ) then
= -s
else
= s
end if
while F ( x (i ) + ) < F ( x (i ) ) do
x (i +1) = x (i ) +
end while
xLow = min( x (i +1) , x (i 1) )

xUp = max( x (i +1) , x (i 1) )


Since a negative root is sought, it makes sense to take x ( 0 ) to be negative. Say for example
x ( 0 ) = -5. If this assumed value does not give the proper interval a different value of x ( 0 ) will
have to be chosen. The results of the given algorithm for the case x ( 0 ) = -5 are given in Table
Tab. 1 and depicted graphically in Fig.3.
It is clear from the values in Tab.1 and from Fig.3 that a minimum exists in the range [-3 -1].
b. Reduction of the interval
The algorithm of the interval reduction method is given in the lecture notes and the task 1.2.
Following this algorithm the values given in Tab.2 are obtained. Thus, the root of the
polynomial P(x) that lies between [-3,-1] has the value -2.532.
c. Numerically determine the other roots

3/4

Process Optimization

Solution 1

To determine the values of the other minima one has to start from different initial values and
follow the same procedure described above.
Tab. 1: Application of the enclosure of the minimum procedure
i
x
x+

F(x)
F(x+)
0
-5
(=s) 1
168.10
76.60
1
-4
-4
168.10
76.60
2
-3
-3
76.60
17.9
3
-2
-2
17.9
14.0
4
-1
-1
14.0
25.1

F(x+)<F(x)
Yes
Yes
Yes
Yes
No

Fig.3

Tab. 2 Application of the interval reduction method


i

x1

x2

F(x1)

F(x2)

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

-3.0000
-3.0000
-3.0000
-2.7082
-2.7082
-2.5967
-2.5967
-2.5541
-2.5541
-2.5379
-2.5379
-2.5379
-2.534
-2.534
-2.5326
-2.5326
-2.5326

-1.000
-1.7640
-2.2360
-2.2360
-2.4164
-2.4164
-2.4852
-2.4852
-2.5116
-2.5116
-2.5216
-2.5278
-2.5278
-2.5302
-2.5302
-2.5311
-2.5316

-2.2360
-2.5278
-2.7082
-2.5278
-2.5967
-2.5278
-2.5541
-2.5278
-2.5379
-2.5278
-2.5316
-2.534
-2.5316
-2.5326
-2.5316
-2.532
-2.5322

-1.7640
-2.2360
-2.5278
-2.4164
-2.5278
-2.4852
-2.5278
-2.5116
-2.5278
-2.5216
-2.5278
-2.5316
-2.5302
-2.5316
-2.5311
-2.5316
-2.532

8.5696
0.1344
6.0876
0.1344
2.1473
0.1344
0.7228
0.1344
0.1903
0.1344
0.0114
0.066
0.0114
0.0186
0.0114
0.0005
0.0072

18.2719
8.5696
0.1344
3.5895
0.1344
1.4894
0.1344
0.6577
0.1344
0.3357
0.1344
0.0114
0.0579
0.0114
0.0287
0.0114
0.0005

4/4

F(x2)>F(x1)

Yes
Yes
No
Yes
No
Yes
No
Yes
No
Yes
Yes
No
Yes
No
Yes
Yes
No

Potrebbero piacerti anche