Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek...

22
Optimization of thermal processes 2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery Lecture 5

Transcript of Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek...

Page 1: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Optimization of thermal processes

Maciej Marek

Czestochowa University of TechnologyInstitute of Thermal Machinery

Lecture 5

Page 2: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Overview of the lecture

• Optimization with inequality constraints− Discussion of Kuhn-Tucker conditions

• Convex programming

• Example of problem with inequality constraints

• A design problem: optimal parameters for drying of sugar

Page 3: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Optimization with inequality constraints

Minimize ( )f X

subject to( ) 0 , 1, 2,...,jg j m X

1x

2x

1( ) 0g X

2 ( ) 0g X

3( ) 0g X

Feasible region

Constraint surfaces

Free stationary point

Bound sationary point

Active constraint

Page 4: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Kuhn-Tucker conditions for minimization problems(necesary conditions)

1

0 , 1, 2,...,m

jj

ji i i

gL fi n

x x x

0 , 1, 2,...,j jg j m

0 , 1, 2,...,jg j m

0 , 1, 2,...,j j m

1

( , ) ( ) ( )m

m mj

L f g

X λ X X Lagrange function

We can use constraintsthemselves instead ofthe slack variables

For minimization

These conditions are also sufficient forconvex programming problems.

Page 5: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Non-convex (concave)region

Optimization of thermal processes 2007/2008

Convex programming problem

• Optimization problem is called convex programming

problem if− the objective function is convex− and the constraint functions are convex

( )f X( )jg X

x

( )f x

1x 2x

For any x1 and x2 the lineis above the graph of thefunction

Convex region

• A given function f is convex if the Hessian matrix is positive

semidefinite 2 ( )( )

i j

fH

x x

XX

Page 6: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Convex programming problem

The matrix H is positive semidefinite when:

• each of the principle minors H1, H2, ..., Hn is non-negative

2 2 2

1 1 1 2 1

2 2 2

2 1 2 2 2

2 2 2

1 2

n

n

n n n n

f f f

x x x x x x

f f f

x x x x x x

f f f

x x x x x x

H

...2

11 1

fH

x x

2 2

1 1 1 22 2 2

2 1 2 2

f f

x x x xH

f f

x x x x

2 2 2

1 1 1 2 1

2 2 2

2 1 2 2 2

2 2 2

1 2

n

n n

n n n n

f f f

x x x x x x

f f f

H x x x x x x

f f f

x x x x x x

0jH for 1, 2,...,j n

Page 7: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Convex programming problem

Notes:

• If the constraint functions are linear then the feasible

region is convex (every component of the Hessian is

equal to zero)

• Linear programming problems (linear objective function

and linear constraints) are convex programming

problems

• It is very often difficult to ascertain whether the

objective and constraint functions involved in a practical

problem are convexFor convex functions:

relative extreme point = global extreme point

Page 8: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Kuhn-Tucker conditions (methodology)

0 , 1, 2,...,j jg j m

j-th constraint functionj-th Lagrange multiplier

Example: suppose we have two constraints

1 1 2 1 1 1 2 1 2( , ) 0, ( , ) 0g x x x g x x x x

• For each of the equations assume the constraint is

active

or inactive

• Try all possibilities, solve the equations and make sure

the constraints are satisfied in each case

( 0)jg ( 0, 0)j jg

active - inactive

case

1

2

3

4

1g 2g

-

-

- -

Then there are four cases.

Page 9: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Example of optimization with inequality constraintsFind the point in the area D described by inequalities

which is the nearest to the point A=[3,5].

1 2 1 20, 1 0, 2x x x x

First, transform the inequalities into the standard form:

1 2 1 20, 1 0, 2 0x x x x

1x

2x

3

5(3,5)A

2 1 0x

1 0x

1 2 2 0x x

Feasible region D

Page 10: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Example of optimization with inequality constraintsWhat is the objective function?

2 21 2 1 2( , ) ( 3) ( 5)f x x x x The distance from point A to 1 2[ , ]x x

This form is inconvenient. Let’s see if there is other objective function withthe same extreme point.

2 2

1 2 1 2 1 2

1min ( , ) min ( , ) min ( , )

2f x x f x x f x x

For non-negative function

So, finally we choose the following objective function:

2 21 2 1 2

1 1( , ) ( 3) ( 5)

2 2f x x x x

Is it convex function?

Page 11: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Example of optimization with inequality constraints

2 2

21 1 2

2 2

22 1 2

f f

x x xH

f f

x x x

The Hess matrix 2 21 2 1 2

1 1( , ) ( 3) ( 5)

2 2f x x x x

1 21 2

3, 5f f

x xx x

2

121 1

3 1f

xx x

2

222 2

5 1f

xx x

2 2

11 2 2 1 2

3 0f f

xx x x x x

1 0

0 1H

So, f is a convex function.

And the constraints are linear.Thus, the problem is convex.

1 1 1 0H

2

1 01 0

0 1H

Page 12: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Example of optimization with inequality constraints

2 21 2

1 1( , ) ( 3) ( 5)

2 2L x x X λ

1 1 2 2 3 1 2( 1) ( 2)x x x x Lagrange function

Constraint functions

Kuhn-Tucker conditions (in this case also sufficient):

1 1 31

3 0,L

xx

2 2 32

5 0L

xx

1 1 2 2 3 1 20, ( 1) 0, ( 2) 0x x x x

1 2 1 20, 1 0, 2 0x x x x Constraints

1 2 30, 0, 0 Minimum

Let’s make some order:

Page 13: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Example of optimization with inequality constraints

1 1 33 0x

2 2 35 0x

1 1 0x

2 2( 1) 0x

3 1 2( 2) 0x x

1 0x

2 1 0x

1 2 2 0x x

1 2 30, 0, 0

A1

A2

B2

B3

B4

C1

C2

C3

D1

C1 C1

Active constraint

Inactive constraint

Let’s employ the followingnotation:

Page 14: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Example of optimization with inequality constraints

C1 1 0x

2 1x (C2)

2 2x (C3)

2 1x Thus C2 is inactive

2 0

C2

2 32, 0x

2 5 0x (A2)

2 5x This violates (C2)

We reject C1 C2 C3

C3

C32 2x

32 5 0 (A2)

1 33 0 (A1)

1 4 which violates (D1)

We reject C1 C2 C3

Page 15: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Example of optimization with inequality constraints

C1 1 10, 0x

1 33 0x (A1)

3 13 0x 1 0x as

3 0 C3 has to be active

C31 2 2 0x x

2 21 0, 0x

1 33 0x (A1)

2 35 0x (A2)

1 2 2 0x x with

(A1) and (A2) give2 0x

Which violates (C2)

We reject C1 C2 C3

C2

C2 2 1 0x

We get:

1 2 1 2 31, 1, 0, 2, 4x x And all conditions are satisfied.

We accept C1 C2 C3

Solution: point [-1,-1]

Page 16: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Optimal parameters for drying of sugar

Sugar that leaves the dryer has temperature T [oC] and humidity W [kg/kg]. The sugar is then stored in a silo, where some amount of the sugar may lump, if the conditions (T,W) are not appropriate.

The total cost of: drying, storage and loss of sugar because of lumping (caking) is described by the function [PLN/kg]:

3 3 21 0.0005 0.0005 15 15

( , ) 10 2 2 1510 0.0005 0.0005 15 15

W W T Tf T W

The function takes large values for:•too large humidity (considerable lumping)•too large temperature (high cost of drying)

This is the objective function we want to minimize.

What are the constraints?

Page 17: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Optimal parameters for drying of sugar

The thermodynamic parameters of sugar (T,W) cannot be above the melting curve. It was experimentally verified that the following inequalityshould be fulfilled:

( 15)( 0.0005) 0.075T W

T

W

Lumped sugar

Loose sugar

Melting curve

The lowest humidity that can be achieved in a dryer and the lowest temperature of sugar are, respectively:

* *0.0005, 15W T

Find the optimum parameters of the sugar.

Page 18: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Optimal parameters for drying of sugar

Let’s introduce the following variables:

1 2

0.0005 15,

0.0005 15

W Tx x

Our optimization problem can be stated as:

3 2 31 2 1 1 2 2

1( , ) 10 2 2 15

10f x x x x x x Minimize

subject to

1 1 2 1 2( , ) 10 0g x x x x

2 1 2 1( , ) 0g x x x

2 1 2 2( , ) 0g x x x

Now, we can apply Kuhn-Tucker conditions.

Page 19: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Optimal parameters for drying of sugar

3 2 31 2 1 2 3 1 1 2 2 1 1 2 2 1 3 2

1( , , , , ) 10 2 2 15 ( 10) ( ) ( )

10L x x x x x x x x x x

21 1 2 2

1

0.3 1 0L

x xx

22 2 1 1 3

2

0.4 0.6 0L

x x xx

1 1 2 2 1 3 2( 10) 0, ( ) 0, ( ) 0x x x x

1 2 1 210 0, 0, 0x x x x

1 2 30, 0, 0

C1 C2 C3

Page 20: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Optimal parameters for drying of sugar

C1 1 2 110, 0x x

1 2, 0x x 2 30, 0

C2 C3

1 2 10x x

22 2 1 10.4 0.6 0x x x

21 1 20.3 1 0x x

1 22.6, 2.802x x +

1 0

So, we reject the case 1 0

C1 1 0

21 20.3 1 0x

22 2 30.4 0.6 0x x

C3 C3

2 0x

3 0

1 0x

2 1 0 2 0

We reject the case.

1 1.825x We take the positive value.

C2C2

1

2

1.825

0

x

x

Page 21: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Optimal parameters for drying of sugar

For values:

all conditions are satisfied. Thus, the solution is:

1

2

1.825

0

x

x

0.0005 1.825 0.005 0.00141 ( 0.14%)optW o15 0 15 optT C

The minimum cost is:

( , ) 0.283 PLN/kgopt optf W T

Page 22: Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.

Optimization of thermal processes 2007/2008

Thank you for your attention