Upload
others
View
18
Download
0
Embed Size (px)
Citation preview
Min Soo KIM
Department of Mechanical and Aerospace EngineeringSeoul National University
Optimal Design of Energy Systems (M2794.003400)
Chapter 8. Lagrange Multipliers
Chapter 8. Lagrange Multipliers
8.1 Calculus Methods of optimization
- Differentiable function
- Equality constraints
Using calculus Using the other methods
2/18
- Inequaility constraints
- Not continuous function
Chapter 8. Lagrange Multipliers
8.2 Lagrange Multiplier equations
3/18
Function : ๐ฆ = ๐ฆ ๐ฅ1, ๐ฅ2, โฏ , ๐ฅ๐
Constraints : ๐1 ๐ฅ1, ๐ฅ2, โฏ , ๐ฅ๐ = 0
๐2 ๐ฅ1, ๐ฅ2, โฏ , ๐ฅ๐ = 0
๐๐ ๐ฅ1, ๐ฅ2, โฏ , ๐ฅ๐ = 0
โโโโโโโโโโโโโโโโโโโโโโโ
How to optimize the function subject to the constraints?
Chapter 8. Lagrange Multipliers
8.2 Lagrange Multiplier equations
4/18
For an optimized point function f(x,y) and g(x,y) are parallel, which meansgradient of f(x,y) is tangent to that of g(x,y)
Thus, for a certain constant ฮป, equation below is established
For multiple m constraints
๐ป๐ ๐ฅ, ๐ฆ = ๐๐ป๐ ๐ฅ, ๐ฆ
๐ป๐ =
๐=1
๐
๐๐๐ป๐๐ = 0
Chapter 8. Lagrange Multipliers
8.3 The gradient vector
Gradient of scalar
๐ป๐ฆ =๐๐ฆ
๐๐ฅ1 ๐1 +
๐๐ฆ
๐๐ฅ2 ๐2 +โฏ+
๐๐ฆ
๐๐ฅ๐ ๐๐
๐ป = ๐๐๐๐๐๐๐๐ก ๐ฃ๐๐๐ก๐๐ ๐ = ๐ข๐๐๐ก ๐ฃ๐๐๐ก๐๐ โถ โ๐๐ฃ๐ ๐๐๐๐๐๐ก๐๐๐, ๐ข๐๐๐ก ๐๐๐๐๐๐ก๐ข๐๐
( ๐1, ๐2 , ๐3 ๐๐๐ ๐กโ๐ ๐ข๐๐๐ก ๐ฃ๐๐๐ก๐๐ ๐๐ ๐กโ๐ ๐ฅ1, ๐ฅ2, ๐ฅ3 ๐๐๐๐๐๐ก๐๐๐)
5/18
* *
1 1,m nx x
at optimum point
unknowns
m
n
m n
m nif fixed values of xโs(no optimization)
Chapter 8. Lagrange Multipliers
8.4 Further explanation of Lagrange multiplier equations
n scalar equations
๐1:๐๐ฆ
๐๐ฅ1โ ๐1
๐๐1
๐๐ฅ1โ ๐๐
๐๐๐
๐๐ฅ1= 0
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐๐:๐๐ฆ
๐๐ฅ๐โ ๐1
๐๐1
๐๐ฅ๐โ ๐๐
๐๐๐
๐๐ฅ๐= 0
+ m constraint equations m+n simultaneous equations
6/18
optimum point can be found
8.5 Unconstrained optimization
Chapter 8. Lagrange Multipliers
๐ฆ = ๐ฆ ๐ฅ1, ๐ฅ2,โฏ , ๐ฅ๐
โ ๐ป๐ฆ = 0 no ฯโฒ๐ ๐๐๐๐ฆ
๐๐ฅ1=
๐๐ฆ
๐๐ฅ2= โฏ =
๐๐ฆ
๐๐ฅ๐= 0
The state point where the derivatives are zero = critical point
โmay be max, min, saddle point, ridge, valley
7/18
From (1),
Example 8.1 :
Chapter 8. Lagrange Multipliers
Find minimum value of z for a given constraint
(Solution)
8/18
๐ง = ๐ฅ2 + ๐ฆ2 1 = ๐ฅ2 + ๐ฅ๐ฆ + ๐ฆ2
๐ป๐ ๐ฅ, ๐ฆ = ๐๐ป๐ ๐ฅ, ๐ฆ
2๐ฅ โ ๐ 2๐ฅ + ๐ฆ = 0
๐ ๐ฅ, ๐ฆ โ 1 = 0
ยทยทยทยทยท(1)
ยทยทยทยทยท(2)
2๐ฆ โ ๐ 2๐ฆ + ๐ฅ = 0๐ฆ = ๐ฅ ๐๐ ๐ฆ = โ๐ฅ
Substituting (2) from the result
1 = 3๐ฅ2 or 1 = ๐ฅ2
Thus, minimum value z is at ๐ฅ, ๐ฆ =1
3,ยฑ
1
3
2
3
Chapter 8. Lagrange Multipliers
Example 8.2,3 : Constrained/Unconstrained optimization
A total length of 100 m of tubes must be installed in a shell-and-tube heat
exchanger.
๐๐๐ก๐๐ ๐๐๐ ๐ก = 900 + 1100๐ท2.5๐ฟ + 320๐ท๐ฟ (๐)
where L is the length of the heat exchanger and D is the diameter of the shell,
both in meters. 200 tubes will fit in a cross-sectional area of 1 m2 in the shell.
Determine the D and L of the heat exchanger for minimum first cost.
9/18
Chapter 8. Lagrange Multipliers
(Solution) โ Unconstrained Optimization
Have to put 100m tubes in the shell
: ๐๐ท2
4m2 200 tubes/m2 โ ๐ฟ m = 100 m
โ 50๐๐ท2๐ฟ = 100 ๐
Substitute (b) into (a)
โ ๐๐๐ก๐๐ ๐๐๐ ๐ก = 900 +2200
๐๐ท0.5 +
640
๐๐ท
๐(๐๐๐ก๐๐ ๐๐๐ ๐ก)
๐(๐ท)=1100
๐๐ท0.5โ640
๐๐ท2
๐ทโ = 0.7 m, ๐ฟโ = 1.3 m, ๐๐๐ก๐๐ ๐๐๐ ๐กโ = $1777.45
10/18
Chapter 8. Lagrange Multipliers
(Solution) โ Constrained Optimization
๐๐๐ก๐๐ ๐๐๐ ๐ก = 900 + 1100๐ท2.5๐ฟ + 320๐ท๐ฟ (๐)
50๐๐ท2๐ฟ = 100 ๐
๐ปy = 2.5 1100 ๐ท1.5๐ฟ + 320๐ฟ ๐1 + 1100๐ท2.5 + 320๐ท ๐2
๐ป๐ = 100๐๐ท๐ฟ ๐1 + 50๐๐ท2 ๐2
๐1: 2750๐ท1.5๐ฟ + 320๐ฟ โ ๐100๐๐ท๐ฟ = 0 (๐)
๐2: 1100๐ท2.5 + 320๐ท โ ๐50๐๐ท2 = 0 ๐
Using (b), (c), (d), find ๐ทโ, ๐ฟโ, ๐
Result is the same as unconstrained optimization
11/18
2x
1x
3y y
2y y
1y y
1dx
2dx
Chapter 8. Lagrange Multipliers
8.7 Gradient vector
- gradient vector is normal to contour line
๐ฆ = ๐ฆ ๐ฅ1, ๐ฅ2
๐๐ฆ =๐๐ฆ
๐๐ฅ1๐๐ฅ1 +
๐๐ฆ
๐๐ฅ2๐๐ฅ2
Along the line of ๐ฆ = ๐๐๐๐ ๐ก.
๐๐ฆ = 0 โ ๐๐ฅ1 = โ๐๐ฅ2๐๐ฆ/๐๐ฅ2๐๐ฆ/๐๐ฅ1
Substitution into arbitrary unit vector
๐๐ฅ1 ๐ + ๐๐ฅ2 ๐
(๐๐ฅ1)2 + (๐๐ฅ2)
2
12/18
Tangent vector
Gradient vector
0T G
Chapter 8. Lagrange Multipliers
8.7 Gradient vector
๐ =๐๐ฅ1 ๐ + ๐๐ฅ2 ๐
(๐๐ฅ1)2 + (๐๐ฅ2)
2=
๐2 โ๐๐ฆ/๐๐ฅ2๐๐ฆ/๐๐ฅ1
๐1
๐๐ฆ/๐๐ฅ2๐๐ฆ/๐๐ฅ1
2
+ 1
=โ
๐๐ฆ๐๐ฅ2
๐1 +๐๐ฆ๐๐ฅ1
๐2
๐๐ฆ๐๐ฅ2
2
+๐๐ฆ๐๐ฅ1
2
๐บ =๐ป๐ฆ
๐ป๐ฆ=
๐๐ฆ/๐๐ฅ1 ๐1 + ๐๐ฆ/๐๐ฅ2 ๐2
๐๐ฆ/๐๐ฅ12 + ๐๐ฆ/๐๐ฅ2
2
13/18
saddle pointridge & valley point
ridge
valley
Chapter 8. Lagrange Multipliers
8.9 Test for maximum or minimum
decide whether the point is a maximum, minimum, saddle point, ridge, or valley
14/18
minimum
maximum
a1x2x
a
1x2x
Chapter 8. Lagrange Multipliers
8.9 Test for maximum or minimum
๐ฅ = ๐ โถ ๐กโ๐ ๐๐๐๐๐๐ข๐ ๐๐ ๐๐ฅ๐๐๐๐ก๐๐ ๐ก๐ ๐๐๐๐ข๐
๐ฆ ๐ฅ = ๐ฆ ๐ +๐๐ฆ
๐๐ฅ๐ฅ โ ๐ +
1
2
๐2๐ฆ
๐๐ฅ2(๐ฅ โ ๐)2 +โฏ Taylor series expansion near ๐ฅ = ๐
If ๐๐ฆ
๐๐ฅ> 0 ๐๐
๐๐ฆ
๐๐ฅ< 0 ๐กโ๐๐๐ ๐๐ ๐๐ ๐๐๐๐๐๐ข๐
โ๐๐ฆ
๐๐ฅ= 0
If๐2๐ฆ
๐๐ฅ2> 0
If๐2๐ฆ
๐๐ฅ2< 0
๐ฆ ๐ฅ1 > ๐ฆ ๐ ๐คโ๐๐ ๐ฅ1 > ๐๐ฆ ๐ฅ2 > ๐ฆ ๐ ๐คโ๐๐ ๐ฅ2 < ๐
๐ฆ ๐ฅ1 < ๐ฆ ๐ ๐คโ๐๐ ๐ฅ1 > ๐๐ฆ ๐ฅ2 < ๐ฆ ๐ ๐คโ๐๐ ๐ฅ2 < ๐
15/18
min
11 12
21 22
2
11 22 12
y yD
y y
y y y
max
Chapter 8. Lagrange Multipliers
8.9 Test for maximum or minimum
๐1, ๐2 : ๐กโ๐ ๐๐๐๐๐๐ข๐ ๐๐ ๐ฆ ๐ฅ1, ๐ฅ2 ๐๐ ๐๐ฅ๐๐๐๐ก๐๐ ๐ก๐ ๐๐๐๐ข๐
๐ฆ ๐ฅ1, ๐ฅ2 = ๐ฆ ๐1, ๐2 +๐๐ฆ
๐๐ฅ1๐ฅ1 โ ๐1 +
๐๐ฆ
๐๐ฅ2๐ฅ2 โ ๐2 +
1
2๐ฆ11โฒโฒ (๐ฅ1 โ ๐1)
2 +
๐ฆ12โฒโฒ ๐ฅ1 โ ๐1 ๐ฅ2 โ ๐2 +
1
2๐ฆ22โฒโฒ (๐ฅ2 โ ๐2)
2 +โฏ
๐ท > 0 ๐๐๐ ๐ฆ11โฒโฒ > 0 (๐ฆ22
โฒโฒ > 0)
๐ท > 0 ๐๐๐ ๐ฆ11โฒโฒ < 0 (๐ฆ22
โฒโฒ < 0)
๐ท < 0 ๐๐๐ ๐ฆ11โฒโฒ < 0 (๐ฆ22
โฒโฒ < 0)
16/18
Chapter 8. Lagrange Multipliers
Example 8.4 : Test for maximum or minimum
Optimal values of ๐ฅ1 and ๐ฅ2, test max, min
๐ฆ =๐ฅ12
4+
2
๐ฅ1๐ฅ2+ 4๐ฅ2
(Solution)
๐๐ฆ
๐๐ฅ1=๐ฅ12โ
2
๐ฅ12๐ฅ2
๐๐ฆ
๐๐ฅ2= โ
2
๐ฅ1๐ฅ22 + 4
๐ฅ1โ = 2, ๐ฅ2
โ =1
2
๐2๐ฆ
๐๐ฅ12 =
3
2,๐2๐ฆ
๐๐ฅ22 = 16,
๐2๐ฆ
๐๐ฅ1๐๐ฅ2= 2
At ๐ฅ1 and ๐ฅ2
โ3
22
2 16> 0 ๐๐๐ ๐ฆ11
โฒโฒ > 0 minimum
17/18
In example 8.3, if the total length of the tube increases from 100m torandom value โHโ, what would be the increase in minimum cost ?
Extra meter of tube for the heat exchanger would cost additional $8.78
Chapter 8. Lagrange Multipliers
8.10 Sensitivity coefficients
- represents the effect on the optimal value of slightlyrelaxing the constraints
- variation of optimized objective function ๐ฆโ
50๐๐ท2๐ฟ = ๐ป โ ๐ทโ = 0.7๐, ๐ฟโ = 0.013๐ป
๐๐๐ก๐๐ ๐๐๐ ๐กโ = 900 + 1100๐ทโ2.5๐ฟโ + 320๐ทโ๐ฟโ = 900 + 8.78๐ป
๐๐ถ =๐(๐๐๐ก๐๐ ๐๐๐ ๐กโ)
๐๐ป= 8.78 = ๐
18/18