Upcoming SlideShare
×

# Lecture Slides: Lecture Optimization

677 views

Published on

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

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
677
On SlideShare
0
From Embeds
0
Number of Embeds
188
Actions
Shares
0
11
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Lecture Slides: Lecture Optimization

1. 1. G-L-5: Optimisation Advanced Modelling Prof. Dr. Christos Spitas Dr. Y. Song (Wolf) Faculty of Industrial Design Engineering Delft University of Technology Challenge the future 1
2. 2. Contents • Why optimisation? • A case study • The gradient descent method • Discussions • What did we learn today? Challenge the future 2
3. 3. Optimisation@Modelling what are you studying? Case brief ‘touch’ your thoughts choices what exactly...? what do you foresee? Build abstract model System choices choices what does your model foresee? Thought simulation Experience Solve/ simulate choices Compare did you both agree? everything you did/ saw/ felt/ remember to be true... Finish! Acceptable ? Revisit choices do you need more insights/ data? Experiment Courtesy of centech.com.pl and http://www.clipsahoy.com/webgraphics4/as5814.htm Challenge the future 3
4. 4. Why Optimisation? Product optimisation Product Optimisation is not just making a product better in some respect (a criterion / metric), but making it the BEST (optimal) in this respect. In mathematics, Optimisation refers to choosing the element from some set of available alternatives that maximises/minimises a specified metric. Identify, choose Learn Modelling System Solve Evaluation Challenge the future 4
5. 5. A case study: The coffee cups 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). Fictional case study, for education only. Douwe Egbert® are resisted trademarks. Courtesy of http://www.douweegbertscoffeesystems.com/dg/OutOfHome/OurProducts/Coffee/Cafitesse/Machines/ Challenge the future 5
6. 6. System identification Steam Hollandsche cup Standard cup Fiction case study, for education only. Douwe Egbert® are resisted trademarks. Courtesy of http://www.douweegbertscoffeesystems.com/dg/OutOfHome/OurProducts/Coffee/Cafitesse/Machines/ Challenge the future 6
7. 7. Cause-effect Superheated steam Condensing Condensed Fiction case study, for education only. Douwe Egbert® are resisted trademarks. Courtesy of http://www.douweegbertscoffeesystems.com/dg/OutOfHome/OurProducts/Coffee/Cafitesse/Machines/ Challenge the future 7
8. 8. Modelling Hollandsche cup m c steam steam (Tstea min itial  100)  m steam Lsteam  m steam c water (100  THfinal )   80%  mholland cholland (THfinal  Tinitial ) Steam cools down m c steam steam Latent heat Condensed water cools down Cup is heated (Tstea min itial  100)  m steam Lsteam  m steam c water (100  TSfinal )   80%  mstandard cstandard (TSfinal  Tinitial ) Standard cup Courtesy of http://www.douweegbertscoffeesystems.com/dg/OutOfHome/OurProducts/Coffee/Cafitesse/Machines/ Challenge the future 8
9. 9. Modelling - Choices Hollandsche cup m c steam steam (Tstea min itial  100)  m steam Lsteam  m steam cwater (100  THfinal )   80%  mholland cholland (THfinal  Tinitial ) Standard cup m c steam steam (Tstea min itial  100)  m steam Lsteam  m steam c water (100  TSfinal )   80%  mstandard cstandard (TSfinal  Tinitial ) We choose The 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; Challenge the future 9
10. 10. Solving/Simulation Hollandsche cup final temperature 8320msteamTsteaminitial  9.8804 106 msteam  15000 THfinal (msteam , Tsteaminitial )  16724msteam  750 Design parameters ( msteam , Tsteaminitial ) 8320msteamTsteaminitial  9.8804 106 msteam  13910 TSfinal (msteam , Tsteaminitial )  16724msteam  695.5 Standard cup final temperature Challenge the future 10
11. 11. Our wishes Design brief 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. Make the deviation THfinal (msteam , Tsteaminitial )  92 as small as possible Experiments indicate that: 1. if the cup is preheated to 92°C , the best coffee can be served; Wishes 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). AND Make the deviation TSfinal (msteam , Tsteaminitial )  92 as small as possible Challenge the future 11
12. 12. The metrics Example The differences M 1  (THfinal (msteam , Tsteaminitial )  92) 2 M 2  (TSfinal (msteam , Tsteaminitial )  92) 2 y ( x)    x  5  2 y ( x)   x  5 Challenge the future 12
13. 13. Formulate the objective function based on metrics 2 f (msteam , Tsteaminitial )   Wi M i i 1 The objective function Non-dimensional We want to minimise min f ( m steam , Tsteaminitial ) where f ( m steam , Tsteaminitial )  2 W M i i 1 Challenge the future 13 i
14. 14. Formulate the objective function based on metrics In our case study, we choose Wi  0.5 min f (msteam , Tsteaminitial )  0.5(THfinal (msteam , Tsteaminitial )  92) 2  0.5(TSfinal (msteam , Tsteaminitial )  92) 2 Challenge the future 14
15. 15. Start from a 1D problem: Finding the minimum of a function f ( x) Challenge the future 15
16. 16. The gradient descent method f ( x) f ( x) Guess Start with a point (guess) Repeat •Determine a decent direction •Choose a step •Update Until stopping criterion is satisfied Challenge the future 16
17. 17. The gradient descent method f ( x) f ( x) Guess Start with a point (guess) 1 Guess Repeat •Determine a decent direction •Choose a step •Update Until stopping criterion is satisfied Challenge the future 17
18. 18. The gradient descent method Step  f ( x) Guess Start with a point (guess) f ( x) 1 Guess Repeat 2 Next Step •Determine a decent direction •Choose a step •Update Until stopping criterion is satisfied xNextSep  xGuess  Step   f ( x) Guess  Challenge the future 18
19. 19. The gradient descent method Start with a point (guess) f ( x) f ( x) Here 1 Repeat 2 Now we •Determine a decent direction •Choose a step •Update are here Until stopping criterion is satisfied Challenge the future 19
20. 20. The gradient descent method Start with a point (guess) f ( x) 1 Repeat 2 •Determine a decent direction •Choose a step •Update 3 4 6 5 Until stopping criterion is satisfied f   Challenge the future 20
21. 21. 2D gradient descent method x y f ( x, y )  xe  x2  y2 f ( x, y ) Challenge the future 21
22. 22. 2D gradient descent method  f ( x, y ) x  f ( x, y ) y  f ( x, y )  (   f ( x, y ), f ( x, y )) x y Challenge the future 22
23. 23. 2D gradient descent method Start Start with a point (guess) Repeat •Determine a decent direction •Choose a step •Update Until stopping criterion is satisfied Minima Challenge the future 23
24. 24. Solving our design problem: The coffee cups Guess Msteam = 0.003 Tsteaminitial=110 Gradient decent path It is a compromise The minimum value of the objective function is 6 Challenge the future 24
25. 25. Wishes vs Designs Put real optimal parameters in side Design brief 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). Hollandsche cup final temperature THfinal (msteam , Tsteaminitial )  89.5C Output of the optimised design TSfinal ( msteam , Tsteaminitial )  94.3C Standard cup final temperature Challenge the future 25
26. 26. Generalised form To optimise a function: min f ( p1 , p2 ,... pn ) 0 0 ( p10 , p 2 ,... p n )  f m m m ( p1 , p2 ,... pn ) stepm m m ( p1m 1 , p 2 1 ,... p n 1 )  m m ( p1m , p 2 ,... p n )  step m (   f f Start with a point (guess) m m m p1 , p 2 ,... p n m m m p1 1 , p 2 1 ,... p n 1 Repeat •Determine a decent direction •Choose a step •Update )  Until stopping criterion is satisfied Challenge the future 26
27. 27. Question! Weights in the objective function The market share We can emphasise a wish by increasing Its relative weight Challenge the future 27
28. 28. Question! Weights in the objective function Put real optimal parameters in side min f (msteam , Tsteaminitial ) where And compare to previous min f (msteam , Tsteaminitial )  W1 (THfinal (msteam , Tsteaminitial )  92) 2  W2 (TSfinal (msteam , Tsteaminitial )  92) 2 Weight Value = 0.25 Weight Value = 0.75 Output of the optimised design Hollandsche cup final temperature Standard cup final temperature THfinal (msteam , Tsteaminitial )  88.4C TSfinal ( msteam , Tsteaminitial )  93.1C Challenge the future 28
29. 29. Question! Square in the metrics y ( x)   x  5 M 1  (THfinal (msteam , Tsteaminitial )  92) 2 Why square instead of absolute value? M 2  (TSfinal (msteam , Tsteaminitial )  92) 2 y ( x)    x  5  2 y ( x)   x  5 Challenge the future 29
30. 30. Problem: find the maxima With a minus in front –f(x) Gradient ascent Original function f(x) Or Function f(x) Guess Challenge the future 30
31. 31. Problems: Guess the starting point The starting point is not good Challenge the future 31
32. 32. Problems: Choice of the sizes of steps Small steps: inefficient Large steps: potential risks The starting point The starting point Challenge the future 32
33. 33. Advanced: Dynamic steps  f f m m m ( p1 , p 2 ,... pn ) Acquire the direction m m m ( p1 , p 2 ,... pn ) Assign the initial step If the step is too large, reduce the step to a certain percentage Challenge the future 33
34. 34. Problems: The stopping criterion Intuitive criterion f   f  2  f    x   i 1  i  N 2 2 2  f   f   f           x1   x2   x N  Other criteria Example 1 Example 2 m m m m ( p1m 1 , p 2 1 ,... p n 1 )  ( p1m , p 2 ,... p n )   m m m m f ( p1m 1 , p 2 1 ,... p n 1 )  f ( p1m , p 2 ,... p n )   … Challenge the future 34
35. 35. Fundamental problems: Local minima x f ( x, y )  y  esin( x )  cos( y )  0.1( x 2  y 2 ) f ( x, y) Local minima Global minima Top view Challenge the future 35
36. 36. Fundamental problems: Local minima Local minimum Guess Global minimum Challenge the future 36
37. 37. The world is much larger Quasi-Newton / conjugate gradient methods Box (complex) / Hook-Jeeves Tools for Optimisation Genetic algorithms (Evolution Strategy) and many more Challenge the future 37
38. 38. What did we learn today? Formulate the objective function (metric) of your design Gradient descent method is a possible way to find the minimum of your objective function An optimum is (almost) always a compromise (competing metrics!) Optimisation methods have limitations Challenge the future 38
39. 39. Success! Prof. Dr. Christos Spitas Dr. Y. Song (Wolf) Faculty of Industrial Design Engineering Delft University of Technology Challenge the future 39