lecture slides: lecture optimization

39
1 Challenge the future G-L-5: Optimisation Advanced Modelling Prof. Dr. Christos Spitas Dr. Y. Song (Wolf) Faculty of Industrial Design Engineering Delft University of Technology

Upload: tu-delft-opencourseware

Post on 20-Jun-2015

393 views

Category:

Education


6 download

DESCRIPTION

The lecture slides of lecture Optimization of the Modelling Course of Industrial Design of the TU Delft

TRANSCRIPT

Page 1: Lecture Slides: Lecture Optimization

1Challenge the future

G-L-5:

OptimisationAdvanced Modelling

Prof. Dr. Christos SpitasDr. Y. Song (Wolf)

Faculty of Industrial Design EngineeringDelft University of Technology

Page 2: Lecture Slides: Lecture Optimization

2Challenge the future

Contents

• Why optimisation?

• A case study

• The gradient descent method

• Discussions

• What did we learn today?

Page 3: Lecture Slides: Lecture Optimization

3Challenge the future

Optimisation@Modelling

Case brief

System

Experiment

Build abstract model

choices

choices choices

choices

do you need more insights/ data?

‘touch’ your thoughts

what are you studying?

what exactly...?

what do you foresee?

what does your model foresee?

did you both agree?everything you did/ saw/ felt/

remember to be true...

Finish!

Revisit choices

Compare

Acceptable?

Experience

Thought simulation Solve/ simulate

Courtesy of centech.com.pl and http://www.clipsahoy.com/webgraphics4/as5814.htm

Page 4: Lecture Slides: Lecture Optimization

4Challenge the future

Why Optimisation?

Learn

Identify, choose Modelling

Solve

Evaluation

System

Product optimisation

In mathematics, Optimisation refers to choosing the element from some set of available alternatives that maximises/minimises a specified metric.

Product Optimisation is not just making a product better in some respect (a criterion / metric), but making it the BEST (optimal) in this respect.

Page 5: Lecture Slides: Lecture Optimization

5Challenge the future

A case study: The coffee cups

Fictional case study, for education only.Douwe Egbert® are resisted trademarks.

Courtesy of http://www.douweegbertscoffeesystems.com/dg/OutOfHome/OurProducts/Coffee/Cafitesse/Machines/

In the new generation of Douwe Egberts® coffee machine, the preheat coffee cup feature is introduced. In the preheating process, water steam from the nozzle preheats the cup to a certain temperature before the coffee is served.

Experiments indicate that: 1. if the cup is preheated to 92°C , the best coffee can be served; 2. 80% of water steam is condensed inside the cup, the rest is absorbed by the air.

Besides, Douwe Egberts® also manufactures its own coffee cups with different sizes and materials, for example, the Hollandsche series and the Standard series.

You are asked to find the initial steam temperature and the amount of steam that should be produced in order to preheat either of the two types of cups as close as possible to 92°C (minimise the deviation).

Page 6: Lecture Slides: Lecture Optimization

6Challenge the future

System identification

Standardcup

Steam

Hollandschecup

Fiction case study, for education only.Douwe Egbert® are resisted trademarks.

Courtesy of http://www.douweegbertscoffeesystems.com/dg/OutOfHome/OurProducts/Coffee/Cafitesse/Machines/

Page 7: Lecture Slides: Lecture Optimization

7Challenge the future

Cause-effect

Fiction case study, for education only.Douwe Egbert® are resisted trademarks.

Courtesy of http://www.douweegbertscoffeesystems.com/dg/OutOfHome/OurProducts/Coffee/Cafitesse/Machines/

Superheated steamCondensingCondensed

Page 8: Lecture Slides: Lecture Optimization

8Challenge the future

Modelling

min holland holland( 100) (100 ) 80% ( )steam steam stea itial steam steam steam water Hfinal Hfinal initialm c T m L m c T m c T T

Hollandsche cup

Standard cup

min standard standard( 100) (100 ) 80% ( )steam steam stea itial steam steam steam water Sfinal Sfinal initialm c T m L m c T m c T T

Cup is heated

Latent heat

Condensed water cools

downSteam cools

down

Courtesy of http://www.douweegbertscoffeesystems.com/dg/OutOfHome/OurProducts/Coffee/Cafitesse/Machines/

Page 9: Lecture Slides: Lecture Optimization

9Challenge the future

Modelling - Choices

min holland holland( 100) (100 ) 80% ( )steam steam stea itial steam steam steam water Hfinal Hfinal initialm c T m L m c T m c T T

Hollandsche cup

Standard cup

min standard standard( 100) (100 ) 80% ( )steam steam stea itial steam steam steam water Sfinal Sfinal initialm c T m L m c T m c T T

We chooseThe density of water is 1000 kg/m3;

The latent heat of water vaporization is 2,260,000 J/kg;

The specific heat of water steam is 2080 J/(kg·K);

The specific heat of water is 4181 J/(kg·K);

The initial temperatures of both cups are 20 °C;

The weight of the Hollandsche cup is 0.20 kg, the specific heat is 750 J/(kg·K);

The weight of the Standard cup is 0.13 kg, the specific heat is 1070 J/(kg·K);

The steam temperature doesn’t change before it reaches the cup;

The complete process happens in a very short time;

Page 10: Lecture Slides: Lecture Optimization

10Challenge the future

Solving/Simulation

Hollandsche cup final temperature

Standard cup final temperature

6steaminitial

steaminitial8320 9.8804 10 15000( , )

16724 750steam steam

Hfinal steamsteam

m T mT m Tm

6steaminitial

steaminitial8320 9.8804 10 13910( , )

16724 695.5steam steam

Sfinal steamsteam

m T mT m Tm

Design parameters steaminitial( , )steamm T

Page 11: Lecture Slides: Lecture Optimization

11Challenge the future

Our wishes

Make the deviation

as small as possible

Make the deviation

as small as possible

In the new generation of Douwe Egberts® coffee machine, the preheat coffee cup feature is introduced. In the preheating process, water steam from the nozzle preheats the cup to a certain temperature before the coffee is served.

Experiments indicate that: 1. if the cup is preheated to 92°C , the best coffee can be served; 2. 80% of water steam is condensed inside the cup, the rest is absorbed by the air.

Besides, Douwe Egberts® also manufactures its own coffee cups with different sizes and materials, for example, the Hollandsche series and the Standard series.

You are asked to find the initial temperature and the amount of steam that should be produced in order to preheat either of the two types of cups as close as possible to 92°C (minimize the deviation).

steaminitial( , ) 92Hfinal steamT m T

steaminitial( , ) 92Sfinal steamT m T

Design briefDesign brief

ANDWishesWishes

Page 12: Lecture Slides: Lecture Optimization

12Challenge the future

The metrics

21 steaminitial( ( , ) 92)Hfinal steamM T m T

ExampleThe differences

22 steaminitial( ( , ) 92)Sfinal steamM T m T

( ) 5y x x 2( ) 5y x x

Page 13: Lecture Slides: Lecture Optimization

13Challenge the future

Formulate the objective function based on metrics

2

steaminitial1

( , )steam i ii

f m T W M

Non-dimensional

We want to minimise

2

steaminitial steaminitial1

min ( , ) where ( , )steam steam i ii

f m T f m T W M

The objective function

Page 14: Lecture Slides: Lecture Optimization

14Challenge the future

Formulate the objective function based on metrics

2 2steaminitial Hfinal steaminitial Sfinal steaminitialmin ( , ) 0.5( ( , ) 92) 0.5( ( , ) 92)steam steam steamf m T T m T T m T

0.5iW

In our case study, we choose

Page 15: Lecture Slides: Lecture Optimization

15Challenge the future

Start from a 1D problem: Finding the minimum of a function

( )f x

Page 16: Lecture Slides: Lecture Optimization

16Challenge the future

The gradient descent method

Start with a point (guess)

Repeat•Determine a decent direction•Choose a step•Update

Until stopping criterion is satisfied

( )Guess

f x( )f x

Page 17: Lecture Slides: Lecture Optimization

17Challenge the future

The gradient descent method

Start with a point (guess)

Repeat•Determine a decent direction•Choose a step•Update

Until stopping criterion is satisfied

( )Guess

f x

Guess

( )f x

1

Page 18: Lecture Slides: Lecture Optimization

18Challenge the future

The gradient descent method

Start with a point (guess)

Repeat•Determine a decent direction•Choose a step•Update

Until stopping criterion is satisfied

( )Guess

Step f x

Guess

Next Step

( )f x

2

1

( )NextSep Guess Guessx x Step f x

Page 19: Lecture Slides: Lecture Optimization

19Challenge the future

The gradient descent method

Start with a point (guess)

Repeat•Determine a decent direction•Choose a step•Update

Until stopping criterion is satisfied

1( )

Heref x

Now we are here

( )f x

2

Page 20: Lecture Slides: Lecture Optimization

20Challenge the future

The gradient descent method

Start with a point (guess)

Repeat•Determine a decent direction•Choose a step•Update

Until stopping criterion is satisfied

1

2

( )f x

3

45

6

f

Page 21: Lecture Slides: Lecture Optimization

21Challenge the future

2D gradient descent method

x

y

22

),( yxxeyxf ),( yxf

Page 22: Lecture Slides: Lecture Optimization

22Challenge the future

2D gradient descent method

),( yxfx

)),(),,((

),(

yxfy

yxfx

yxf

),( yxfy

Page 23: Lecture Slides: Lecture Optimization

23Challenge the future

2D gradient descent method

Start

Minima

Start with a point (guess)

Repeat•Determine a decent direction•Choose a step•Update

Until stopping criterion is satisfied

Page 24: Lecture Slides: Lecture Optimization

24Challenge the future

Solving our design problem:The coffee cups

GuessMsteam = 0.003 Tsteaminitial=110

The minimum value of the objective function is 6

It is a compromise

Gradient decent path

Page 25: Lecture Slides: Lecture Optimization

25Challenge the future

Wishes vs Designs

In the new generation of Douwe Egberts® coffee machine, the preheat coffee cup feature is introduced. In the preheating process, water steam from the nozzle preheats the cup to a certain temperature before the coffee is served.

Experiments indicate that: 1. if the cup is preheated to 92°C , the best coffee can be served; 2. 80% of water steam is condensed inside the cup, the rest is absorbed by the air.

Besides, Douwe Egberts® also manufactures its own coffee cups with different sizes and materials, for example, the Hollandsche series and the Standard series.

You are asked to find the initial temperature and the amount of steam that should be produced in order to preheat either of the two types of cups as close as possible to 92°C (minimize the deviation).

Design briefDesign brief

steaminitial( , ) 89.5Hfinal steamT m T C

steaminitial( , ) 94.3Sfinal steamT m T C

Hollandsche cup final temperature

Standard cup final temperature

Output of the optimised

design

Put real optimal parameters in side

Page 26: Lecture Slides: Lecture Optimization

26Challenge the future

Generalised form

Start with a point (guess)

Repeat•Determine a decent direction•Choose a step•Update

Until stopping criterion is satisfied

),...,( 21mn

mm pppf

1 2min ( , ,... )nf p p pTo optimise a function:

),...,( 002

01 nppp

)(),...,(

),...,(

,...,21

112

11

21mn

mm pppmmn

mm

mn

mm

fstepppp

ppp

mstep

112

11 ,..., m

nmm ppp

f

Page 27: Lecture Slides: Lecture Optimization

27Challenge the future

Question! Weights in the objective function

The market share

We can emphasisea wish by increasing

Its relative weight

Page 28: Lecture Slides: Lecture Optimization

28Challenge the future

Question! Weights in the objective function

steaminitial

2 2steaminitial 1 Hfinal steaminitial 2 Sfinal steaminitial

min ( , )where

min ( , ) ( ( , ) 92) ( ( , ) 92)

steam

steam steam steam

f m T

f m T W T m T W T m T

Weight Value = 0.75

Weight Value = 0.25

steaminitial( , ) 88.4Hfinal steamT m T C steaminitial( , ) 93.1Sfinal steamT m T C

Hollandsche cup final temperature Standard cup final temperature

Output of the optimised

design

Put real optimal parameters in side

And compare to previous

Page 29: Lecture Slides: Lecture Optimization

29Challenge the future

Question! Square in the metrics

21 steaminitial( ( , ) 92)Hfinal steamM T m T

Why square insteadof absolute value?

22 steaminitial( ( , ) 92)Sfinal steamM T m T

( ) 5y x x

( ) 5y x x

2( ) 5y x x

Page 30: Lecture Slides: Lecture Optimization

30Challenge the future

Problem: find the maxima

Original function f(x)

With a minus in front –f(x)

Or

Gradient ascent

Function f(x)

Guess

Page 31: Lecture Slides: Lecture Optimization

31Challenge the future

Problems: Guess the starting point

The starting point is not good

Page 32: Lecture Slides: Lecture Optimization

32Challenge the future

Problems: Choice of the sizes of steps

Small steps: inefficient Large steps: potential risks

The starting

point

The starting point

Page 33: Lecture Slides: Lecture Optimization

33Challenge the future

Advanced: Dynamic steps

),...,(

),...,(

21

21

mn

mm

mn

mm

ppp

ppp

f

f

Acquire the direction

Assign the initial step

If the step is too large, reduce the step to

a certain percentage

Page 34: Lecture Slides: Lecture Optimization

34Challenge the future

Problems: The stopping criterion

),...,(),...,( 2111

21

1mn

mmmn

mm pppppp

f

Intuitive criterion

Other criteria

Example 1

Example 2

),...,(),...,( 2111

21

1mn

mmmn

mm pppfpppf

2 22 2

1 1 2

N

i i N

f f f ffx x x x

Page 35: Lecture Slides: Lecture Optimization

35Challenge the future

Fundamental problems: Local minima

Local minima

Global minima

x

y )(1.0),(

22)cos()sin( yxeyxf

yx

),( yxf

Top view

Page 36: Lecture Slides: Lecture Optimization

36Challenge the future

Fundamental problems: Local minima

Local minimum

Global minimum

Guess

Page 37: Lecture Slides: Lecture Optimization

37Challenge the future

The world is much larger

Tools forOptimisation

Quasi-Newton / conjugate gradient methods

Box (complex) / Hook-Jeeves

Genetic algorithms (Evolution Strategy)

and many more

Page 38: Lecture Slides: Lecture Optimization

38Challenge the future

What did we learn today?

Formulate the objective function (metric) of your design

An optimum is (almost) always a compromise (competing metrics!)

Gradient descent methodis a possible way to find the minimum

of your objective function

Optimisation methods have limitations

Page 39: Lecture Slides: Lecture Optimization

39Challenge the future

Success!

Prof. Dr. Christos SpitasDr. Y. Song (Wolf)

Faculty of Industrial Design EngineeringDelft University of Technology