ETHZ Lecture8
ETHZ Lecture8
– Quasi-Newton Methods
● Conclusions:
– Non-quadratic functions
– Quasi-Newton methods y2
– 0th order
– 1st order
– 2nd order
– Minimize approximation
– Repeat
2
● First order sufficiency condition applied to approximation:
● Update: x k 1 x k s k sk
xk x k 1
● Note:
(Evaluated at u = 0)
● Update: x k 1 x k k s k -5
10
k sk
xk x k 1
-10
10
optimum: 2
x k 1 x* c x k x* Iteration
1 2 3 4
x 2
s.t. x Defines trust region
x1
● Trust region adjusted based on approximation quality:
f ( x ) f ( x x ) 1
r rk 0.25 k 1 x k
f (x) f (x) 4
Actual reduction
rk 0.75 k 1 2 x k
Predicted reduction else k 1 k
Engineering Optimization – Concepts and Applications
Trust region methods (2)
● Performance: robust, can also deal with neg. def. H
● Conclusions:
– Not robust!
● Robustness improvements:
f k 1 f k Hx k 1 x k
~
f k 1 f k H k 1 x k 1 x k
● Notation: f k 1 f k , x x k 1 x k
● Broyden’s update:
1
x B x B
T
B k
x B
T k k
k
T
B B
k
T
xx k
B k T
x T B k
● Broyden, Fletcher, Goldfarb, Shannon (BFGS):
1 0
Starting point: x1 (0,0) B1
0 1
1 4 x1 2 x2 1
f f1
1 2 x1 2 x2 1
1 Line search:
s1 B1f1 1
1 1 1 x 2 x1 1s1
1
Engineering Optimization – Concepts and Applications
BFGS example (2)
1 4 x1 2 x2 1
f f 2
1 2 x1 2 x2 1
1 1 1 1 1 1
BFGS: B1 B2
2 1 3 2 1 5
0 Line search:
s 2 B 2 f 2
2 1 1
1 x 3 x 2 2s 2
4 3 2
0
f 3 Solution found.
0
Engineering Optimization – Concepts and Applications
BFGS example (3)
2 2
Check: f ( x1 , x2 ) x1 x2 2 x1 2 x1 x2 x2
1 4 x1 2 x2 4 2 1 1 1
f H
1
BH
1 2 x1 2 x 2 2 2 2 1 2
1 0 0
BFGS: B 2
2 0 3
B 3 B 2 B 2
1 1 1 1 0 0 1 1 1
2 1 5 2 0 3 2 1 2
● BFGS: 53
● DFP: 260
● Newton: 18
● Levenberg-Marquardt: 29
– Not robust
– Quasi-Newton Methods
min f ( x) g1
x
s. t. g ( x) 0
h ( x) 0
Boundary
optima
x1
Engineering Optimization – Concepts and Applications
Feasible perturbations / directions
● Consider feasible space X
● Feasible perturbation: x | x x X , x X
● Feasible direction s: g2
x2
line in direction s remains y X g1
in X for some finite length: x
s | y s X
y X , 0, , 0
x1
f T s 0 s f
g2
x2
(no feasible direction exists g1
s
for which f decreases)
– Simplest case!
min f ( x) x n
x
s. t. hi (x) 0 i 1 m
● Assumptions:
y n :
T ( x)
h(x) T y x 0
Normal
hyperplane
x h2
x2
h1
h1 : x1 c1
x1 Tangent
hyperplane (line)
Engineering Optimization – Concepts and Applications
Optimality conditions
● Simplest approach:
s. t. hi (x) 0 i 1 m
n
f
f (x) f x
T
xi
i 1 xi
n h j
h j (x) h j x
T
xi 0 j 1 m
i 1 xi
m + 1 equations, n + 1 unknowns (f, xi), where n > m
n - m = p degrees of freedom
Engineering Optimization – Concepts and Applications
Local approximation (2)
● Divide design variables in two subsets:
– p decision/control variables d s
x
– m state/solution variables s d
p
f
n m
f f
f (x) xi si d i
i 1 xi i 1 si i 1 d i
n h j m h j p
h j
h j (x) xi 0 si d i
i 1 xi i 1 si i 1 d i
dependent independent
Engineering Optimization – Concepts and Applications
Dependent/independent variables
● Example: 2
h : x1 3 x2 x3 0
x3
x2
x1
2
x3 x1 2
x1 x3 3x2 x2 x3 x1 3x2
3
Engineering Optimization – Concepts and Applications
Local approximation (3)
● Eliminating solution variable perturbation (dependent):
p
m
f f f f
f si d i s d
i 1 si i 1 d i s d
m
h p
h j h h
h j si d i s d 0
j
i 1 si i 1 d i s d
1
h h h h
s d s d
s d s d
f f f f h 1 h
f s d f d
s d d s s d
1
h h Reduced / constrained
s d
s d gradient
x L x f λ T x h T
L 0
λ L ( λ λ )h
T
1
f T h T f h
s λ 0 T
λ
s s s
1
f λ T h 0T f f h h
0T
d d d s s d
Engineering Optimization – Concepts and Applications
Example
min f mgx2 , h L(1 cos x1 ) x2 0
x1 , x2
x1
L(x, λ ) f (x) λ T h( x) L
mgL sin x1 0
Equilibrium: x1 0, , 2 ,
Engineering Optimization – Concepts and Applications
Comparison
f (Often not
● Elimination: n – m variables, 0T
x possible)
● Reduced gradient: 1
f f h h
0T
m decision variables, d s s d
n - m solution variables (total n)
● Lagrange approach: h0
1
n design variables, T f h
λ
m multipliers (total m + n) s s
f T h
λ 0T
x x
Engineering Optimization – Concepts and Applications
Application in mechanics
● Lagrangian method widely used to enforce kinematic
constraints, e.g. multibody dynamics:
– Variational formulation of
equations of motion (planar case):
3n d T T
i qi
i 1 dt q
Qi qi 0
3 equations of Generalized
motion per body Total kinetic forces
energy Generalized
displacement
f h x2
f
0T
x x h
Meaning: h
f h
//
x x f
x1
Gradients parallel
tangents parallel h tangent to isolines
Engineering Optimization – Concepts and Applications