18-660: numerical methods for engineering design and ...xinli/classes/cmu_18660/lec14.pdf ·...

30
Slide 1 18-660: Numerical Methods for Engineering Design and Optimization Xin Li Department of ECE Carnegie Mellon University Pittsburgh, PA 15213

Upload: others

Post on 09-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 1

18-660: Numerical Methods for Engineering Design and Optimization

Xin Li Department of ECE

Carnegie Mellon University Pittsburgh, PA 15213

Page 2: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 2

Overview

Geometric Problems Maximum inscribed ellipsoid Minimum circumscribed ellipsoid

Page 3: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 3

Geometric Problems

Many geometric problems can be solved by convex programming Consider maximum inscribed ellipsoid as an example Derive mathematical formulation as convex optimization

Maximum inscribed ellipsoid

Minimum circumscribed ellipsoid

Page 4: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 4

Maximum Inscribed Ellipsoid

Problem definition: Given a bounded polytope, find the inscribed ellipsoid that has

the maximal volume

Maximal inscribed ellipsoid

x2

x1

Polytope

Page 5: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 5

Maximum Inscribed Ellipsoid

Representation of an ellipsoid

W is symmetric and positive definite ||u||2 denotes the L2-norm of a vector

1|2≤+⋅==Ω uduWX A set of points inside the ellipsoid

uuu T=2

Length of the vector u

x2

x1

Page 6: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 6

Maximum Inscribed Ellipsoid

Representation of an ellipsoid

1|2≤+⋅==Ω uduWX

( )dXWu −⋅= −1

( )[ ] ( )[ ] 1112

2≤−⋅⋅−⋅== −− dXWdXWuuu TT

( ) ( ) 11 ≤−⋅⋅⋅− −− dXWWdX TT

Quadratic function of X

Page 7: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 7

Maximum Inscribed Ellipsoid

Two examples

-1 -0.5 0 0.5 1-1

-0.5

0

0.5

1

x1

x 2

01001

=

=

d

W

-4 -2 0 2 4-1.5

-1

-0.5

0

0.5

1

1.5

x1

x 2

01112

=

=

d

W

1|2≤+⋅==Ω uduWX

Page 8: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 8

Maximum Inscribed Ellipsoid

Given the ellipsoid

and the polytope

we require that any X in Ω satisfies the linear inequality

( )KkCXB kTk ,,2,10 =≤+

( )( )Kk

XCXB kTk

,,2,10=

Ω∈∀≤+

Basic condition for inscribed ellipsoid

1|2≤+⋅==Ω uduWX

Page 9: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 9

Maximum Inscribed Ellipsoid

x2

x1

( )( )Kk

XCXB kTk

,,2,10=

Ω∈∀≤+

1|2≤+⋅==Ω uduWX

0≤+ kTk CXB

Any X in Ω must satisfy the linear inequality

Page 10: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 10

Maximum Inscribed Ellipsoid

( )( )Kk

XCXB kTk

,,2,10=

Ω∈∀≤+ 1|2≤+⋅==Ω uduWX

( )( )Kk

uCdBuWB kTk

Tk

,,2,1

102

=

≤∀≤+⋅+⋅⋅

( ) ( )KkCdBuWB kTk

Tk

u,,2,10sup

12

=≤+⋅+⋅⋅≤

sup(•) denotes the supremum (i.e., the least upper bound) of a set

Page 11: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 11

Maximum Inscribed Ellipsoid

( ) 0sup12

≤+⋅+⋅⋅≤

kTk

Tk

uCdBuWB

( ) 0sup12

≤+⋅+⋅⋅≤

kTk

Tk

uCdBuWB

( ) 0sup12

≤+⋅+⋅≤

kTk

T

uCdBup

kT BWp =

Inner product of two vectors

Page 12: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 12

Maximum Inscribed Ellipsoid

Inner product of two vectors

θcos22

2211

⋅⋅=

++=⋅

upupupupT

( )22

10cos1sup

2

ppupT

u=⋅⋅=⋅

x2

x1

u p

θ

[ ][ ]T

T

uuu

ppp

21

21

=

=

Page 13: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 13

Maximum Inscribed Ellipsoid

( ) 0sup12

≤+⋅+⋅≤

kTk

T

uCdBup ( )

212

sup pupT

u=⋅

02

≤+⋅+ kTk CdBp

( )KkCdBBW kTkk

T ,,2,102

=≤+⋅+

kT BWp =

Inequality constraints

Page 14: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 14

Maximum Inscribed Ellipsoid

Given these inequality constraints, we want to maximize the ellipsoid volume

1|2≤+⋅==Ω uduWX

( )WVolume det∝

Why is volume proportional to the determinant of W?

Page 15: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 15

Maximum Inscribed Ellipsoid

If W is diagonal, we have

( )10

02

2

1

22

11

2

1 ≤

+⋅

=

u

dd

uW

WXX

10

00

0

2

1

2

11

22

111

122

111

2

1

2

1 ≤

dd

XX

WW

WW

dd

XX

T

( )1 2≤+⋅= uduWX

( ) ( ) 11 ≤−⋅⋅⋅− −− dXWWdX TT

Page 16: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 16

Maximum Inscribed Ellipsoid

If W is diagonal, we have

d1 and d2 determine the center of the ellipsoid W11 and W22 determine the semi-axes of the ellipsoid

10

00

0

2

1

2

11

22

111

122

111

2

1

2

1 ≤

dd

XX

WW

WW

dd

XX

T

( ) ( ) 12

22

222

211

211 ≤

−+

W

dX

W

dX

Page 17: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 17

Maximum Inscribed Ellipsoid

If W is diagonal, we have

x2

x1

( ) ( ) 12

22

222

211

211 ≤

−+

W

dX

W

dX

d1

d2

W11

W22

Page 18: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 18

Maximum Inscribed Ellipsoid

If W is diagonal, ellipsoid volume is proportional to

=⋅

22

112211 0

0det

WW

WW

x2

x1 d1

d2

W11

W22

Page 19: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 19

Maximum Inscribed Ellipsoid

If W is not diagonal, but is symmetric and positive definite

( )1 2≤⋅= uuWX

We assume d = 0, since d only changes the center of the ellipsoid (not its volume)

IVVVVW

T =

Σ⋅=⋅ (Eigenvalue decomposition)

( )1 2≤⋅⋅Σ⋅= uuVVX T

( )1 2≤⋅⋅Σ=⋅ uuVXV TT

Page 20: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 20

Maximum Inscribed Ellipsoid

If W is not diagonal, but is symmetric and positive definite

( )1 2≤⋅⋅Σ=⋅ uuVXV TT

uVqXVY

T

T

⋅=

⋅=

( )1 2≤⋅⋅Σ= qVqY

x2

x1

Orthogonal rotation y1

y2

( )1 2≤⋅Σ= qqY

22qVq =

Orthogonal rotation does not change the ellipsoid volume

Page 21: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 21

Maximum Inscribed Ellipsoid

If W is not diagonal, but is symmetric and positive definite

( )1 2≤⋅Σ= qqY

Σ is diagonal in the new coordinate system

( )Σ∝ detVolume

( ) ( ) ( ) ( ) ( )( ) ( ) ( ) ( ) ( )WVVVV

VVVVVolumedetdetdetdetdet

detdetdetdetdet11

11

=⋅Σ⋅=⋅Σ⋅=

⋅⋅Σ=⋅⋅Σ∝−−

−−

Similarity transformation preserves the determinant value

1−⋅Σ⋅=⋅Σ⋅= VVVVW T

Page 22: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 22

Maximum Inscribed Ellipsoid

Inequality constraints

Ellipsoid volume

The maximum inscribed ellipsoid (i.e., W and d) can be founded by solving the following optimization problem

( )KkCdBBW kTkk

T ,,2,102

=≤+⋅+

( )WVolume det∝

( )( )KkCdBBWTS

W

kTkk

TdW

,,2,10..

detmax

2

,

=≤+⋅+

Do we miss anything?

Page 23: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 23

Maximum Inscribed Ellipsoid

We need to add the constraint that W must be symmetric and positive definite

( )( )

0

,,2,10..

detmax

2

,

WWW

KkCdBBWTS

W

Tk

Tkk

TdW

=

=≤+⋅+

W is positive definite

W is symmetric

Is this optimization problem easy or difficult to solve?

Page 24: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 24

Maximum Inscribed Ellipsoid

This optimization problem can be converted to a convex programming and it can be solved efficiently

( )( )

0

,,2,10..

detmax

2

,

WWW

KkCdBBWTS

W

Tk

Tkk

TdW

=

=≤+⋅+

Page 25: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 25

Maximum Inscribed Ellipsoid

Cost function

log[det(W)] is concave – we maximize a concave cost function

( )Wdetmax

log(•) is monotonically increasing ( )[ ]Wdetlogmax

( )( )

0

,,2,10..

detmax

2

,

WWW

KkCdBBWTS

W

Tk

Tkk

TdW

=

=≤+⋅+

Page 26: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 26

Maximum Inscribed Ellipsoid

Constraint

Both ||WTBk||2 and BkTd are convex

The sum of two convex functions is convex This constraint set is convex

( )KkCdBBW kTkk

T ,,2,102

=≤+⋅+

( )( )

0

,,2,10..

detmax

2

,

WWW

KkCdBBWTS

W

Tk

Tkk

TdW

=

=≤+⋅+

Page 27: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 27

Maximum Inscribed Ellipsoid

Constraint

Linear equality constraint defines a convex set

TWW =

( )( )

0

,,2,10..

detmax

2

,

WWW

KkCdBBWTS

W

Tk

Tkk

TdW

=

=≤+⋅+

Page 28: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 28

Maximum Inscribed Ellipsoid

Constraint

The set of all positive definite matrices is convex If W1 and W2 are positive definite, their positive combination is

also positive definite

0W

( ) 01 21 WW ⋅−+⋅ αα

Positive coefficients

( )( )

0

,,2,10..

detmax

2

,

WWW

KkCdBBWTS

W

Tk

Tkk

TdW

=

=≤+⋅+

Page 29: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 29

Maximum Inscribed Ellipsoid

We maximize a concave function over a convex set – a convex programming problem

The optimization can be solved by a convex solver E.g., CVX (www.stanford.edu/~boyd/cvx/) We will discuss the optimization algorithm in future lectures...

( )( )

0

,,2,10..

detmax

2

,

WWW

KkCdBBWTS

W

Tk

Tkk

TdW

=

=≤+⋅+

Page 30: 18-660: Numerical Methods for Engineering Design and ...xinli/classes/cmu_18660/Lec14.pdf · Pittsburgh, PA 15213 . Slide 2 Overview ... B W u BT d C. k ) (k. K) k T k u sup 0 1,2,,

Slide 30

Summary

Geometric problems Maximum inscribed ellipsoid Minimum circumscribed ellipsoid