CS 287 Advanced Robotics (Fall 2019) Lecture 7: Constrained - - PowerPoint PPT Presentation

cs 287 advanced robotics fall 2019 lecture 7 constrained
SMART_READER_LITE
LIVE PREVIEW

CS 287 Advanced Robotics (Fall 2019) Lecture 7: Constrained - - PowerPoint PPT Presentation

CS 287 Advanced Robotics (Fall 2019) Lecture 7: Constrained Optimization Pieter Abbeel UC Berkeley EECS [optional] Boyd and Vandenberghe, Convex Optimization, Chapters 9 11 [optional] Nocedal and Wright, Chapter 18 Outline n Constrained


slide-1
SLIDE 1

CS 287 Advanced Robotics (Fall 2019) Lecture 7: Constrained Optimization

Pieter Abbeel UC Berkeley EECS

[optional] Boyd and Vandenberghe, Convex Optimization, Chapters 9 – 11 [optional] Nocedal and Wright, Chapter 18

slide-2
SLIDE 2

n Constrained Optimization n Penalty Formulation n Convex Programs and Solvers n Dual Descent

Outline

slide-3
SLIDE 3

n Constrained Optimization n Penalty Formulation n Convex Programs and Solvers n Dual Descent

Outline

slide-4
SLIDE 4

Constrained Optimization

min

x

g0(x) s.t. gi(x) ≤ 0 ∀i hj(x) = 0 ∀j

slide-5
SLIDE 5

n Constrained Optimization n Penalty Formulation n Convex Programs and Solvers n Dual Descent

Outline

slide-6
SLIDE 6
slide-7
SLIDE 7

Penalty Formulation

min

x

g0(x) s.t. gi(x) ≤ 0 ∀i hj(x) = 0 ∀j

min

x

g0(x) + µ X

i

|gi(x)|+ + µ X

j

|hj(x)|

Original: Penalty Formulation:

  • now unconstrained
  • same solution for mu large enough
  • constrained
slide-8
SLIDE 8

n Inner loop: optimize merit function

and increase μ in an outer loop until the two sums equal zero.

n Inner loop optimization can be done by any of:

n Gradient descent n Newton or quasi-Newton method n Trust region method

Penalty Method

min

x

g0(x) + µ X

i

|gi(x)|+ + µ X

j

|hj(x)|

= min

x

fµ(x)

merit function

slide-9
SLIDE 9

n Inner loop: optimize merit function

and increase μ in an outer loop until the two sums equal zero.

n Trust region method repeatedly solves:

Penalty Method w/Trust Region Inner Loop

min

x

g0(x) + µ X

i

|gi(x)|+ + µ X

j

|hj(x)|

= min

x

fµ(x)

merit function : current point

¯ x

(trust region constraint)

min

x

g0(¯ x) + rxg0(¯ x)(x ¯ x) + µ X

i

|gi(¯ x) + rxgi(¯ x)(x ¯ x)|+ + µ X

j

|hj(¯ x) + rxhj(¯ x)(x ¯ x)| s.t. kx ¯ xk2  ε

slide-10
SLIDE 10

Inputs: WHILE ( AND ) // increase penalty coefficient for constraints; re-init trust region size WHILE (1) // [2] loop that optimizes Compute terms of first-order approximations: WHILE (1) // [3] loop that does trust-region size search Call convex program solver to solve: IF THEN: Update AND Update (Grow) trust region: AND BREAK out of while [3] ELSE: No update to AND Update (Shrink) trust region: IF below some threshold THEN: BREAK out of while [3] and while [2]

¯ x, µ = 1, ε0, α ∈ (0.5, 1), β ∈ (0, 1), t ∈ (1, ∞)

X

i

|gi(¯ x)|+ + X

j

|hj(¯ x)| ≥ δ

µ < µMAX µ ← tµ, ε ← ε0

g0(¯ x), rxg0(¯ x), gi(¯ x), rxgi(¯ x), hj(¯ x), rxhj(¯ x), 8i, j ¯ x ← ¯ xnext?

ε ← ε/β

ε

slide-11
SLIDE 11

Tweak: Retain Convex Terms Exactly

n Non-convex optimization with convex parts separated: n Retain convex parts and in inner loop solve:

with: fi convex gk non-convex hl nonlinear

min

x

f0(x) + g0(x) s.t. fi(x) ≤ 0 ∀i Ax − b = 0 ∀j gk(x) ≤ 0 ∀k hl(x) = 0 ∀l

min

x

f0(x) + g0(x) + µ X

k

|gk(x)|+ + µ X

l

|hl(x)| s.t. fi(x) ≤ 0 ∀i Ax − b = 0 ∀j

slide-12
SLIDE 12

n Constrained Optimization n Penalty Formulation n Convex Programs and Solvers n Dual Descent

Outline

slide-13
SLIDE 13

n Convex optimization problems are a special class of

  • ptimization problems, of the following form:

with fi(x) convex for i = 0, 1, …, n

Convex Optimization Problems

min

x∈Rnf0(x)

s.t. fi(x) ≤ 0 i = 1, . . . , n Ax = b

slide-14
SLIDE 14

n A function f is convex if and only if

Convex Functions

∀x1, x2 ∈ Domain(f), ∀t ∈ [0, 1] : f(tx1 + (1 − t)x2) ≤ tf(x1) + (1 − t)f(x2)

Image source: wikipedia

slide-15
SLIDE 15

Convex Functions

Source: Thomas Jungblut’s Blog

  • Unique minimum
  • Set of points for which f(x) <= a is convex
slide-16
SLIDE 16

n Constrained Optimization n Penalty Formulation n Convex Programs and Solvers

n Equality Constraints n Inequality Constraints

n Dual Descent

Outline

slide-17
SLIDE 17

n Problem to be solved: n We will cover three solution methods:

n Elimination n Newton’s method n Infeasible start Newton method

Convex Problems: Equality Constrained Minimization

slide-18
SLIDE 18

n

From linear algebra we know that there exist a matrix F (in fact infinitely many) such that: A way to find an F: compute SVD of A, A = U S V’, for A having k nonzero singular values, set F = U(:, k+1:end)

n

So we can solve the equality constrained minimization problem by solving an unconstrained minimization problem over a new variable z:

n

Potential cons: (i) need to first find a solution to Ax=b, (ii) need to find F, (iii) elimination might destroy sparsity in original problem structure

Method 1: Elimination

: any solution to Ax = b F: spans the null-space of A

slide-19
SLIDE 19

n Recall problem to be solved:

Methods 2 and 3 --- First Consider Optimality Condition

x* with Ax*=b is (local)

  • ptimum if and only if:

Equivalently:

slide-20
SLIDE 20

n Recall problem to be solved:

Methods 2 and 3 --- First Consider Optimality Condition

slide-21
SLIDE 21

n

Problem to be solved:

n n

Assume x is feasible, i.e., satisfies Ax = b, now use 2nd order approximation of f:

n

Optimality condition for 2nd order approximation:

Method 2: Newton’s Method

slide-22
SLIDE 22

With Newton step obtained by solving a linear system of equations: Feasible descent method:

Method 2: Newton’s Method

slide-23
SLIDE 23

n

Problem to be solved:

n n

Use 1st order approximation of the optimality conditions at current x:

n

Equivalently:

Method 3: Infeasible Start Newton Method

slide-24
SLIDE 24

n Constrained Optimization n Penalty Formulation n Convex Programs and Solvers

n Equality Constraints n Inequality Constraints: Barrier Method

n Dual Descent

Outline

slide-25
SLIDE 25

n Recall the problem to be solved:

Convex Problems: Equality and Inequality Constrained Minimization

slide-26
SLIDE 26

n

Approximation via logarithmic barrier:

* for t > 0, -(1/t) log(-u) is a smooth approximation of I_(u)

* approximation improves for t à infinity * better conditioned for smaller t

n

Problem to be solved:

Equality and Inequality Constrained Minimization

n

Reformulation via indicator function

à No inequality constraints anymore, but very poorly conditioned objective function

slide-27
SLIDE 27

Equality and Inequality Constrained Minimization

slide-28
SLIDE 28

n

Given: strictly feasible x, t=t(0) > 0, μ > 1, tolerance ε > 0

n

Repeat 1. Centering Step. Compute x*(t) by solving starting from x 2.

  • Update. x := x*(t).

3. Stopping Criterion. Quit if m/t < ε 4. Increase t. t := μt

Barrier Method

slide-29
SLIDE 29

Example 1: Inequality Form LP

slide-30
SLIDE 30

Example 2: Geometric Program

slide-31
SLIDE 31

Example 3: Standard LPs

slide-32
SLIDE 32

n

Basic phase I method: Initialize by first solving:

n

Easy to initialize above problem, pick some x such that Ax = b, and then simply set s = maxi fi(x)

n

Can stop early---whenever s < 0

Initialization

slide-33
SLIDE 33

n

Sum of infeasibilities phase I method:

n

Initialize by first solving:

n

Easy to initialize above problem, pick some x such that Ax = b, and then simply set si = max(0, fi(x))

n

For infeasible problems, produces a solution that satisfies many more inequalities than basic phase I method

Initialization

slide-34
SLIDE 34

n We have covered a primal interior point method / barrier method

n one of several optimization approaches

n Examples of others:

n Primal-dual interior point methods n Primal-dual infeasible interior point methods

Other methods for convex problems

slide-35
SLIDE 35

n Constrained Optimization n Penalty Formulation n Convex Programs and Solvers

n Equality Constraints n Inequality Constraints: Barrier Method

n Dual Descent

Outline

slide-36
SLIDE 36

Formulation

min

x

g0(x) s.t. gi(x) ≤ 0 ∀i hj(x) = 0 ∀j

min

x

g0(x) + µ X

i

|gi(x)|+ + µ X

j

|hj(x)|

Original: Penalty Formulation:

Penalty Method iterates:

  • Optimize over x
  • Increase mu as needed

Dual-Descent Formulation:

Dual Descent iterates:

  • Optimize over x
  • Gradient descent step for lambda and nu

New, equivalent problem with same solution:

Dual-Descent Formulation of new, equivalent problem almost identical to penalty formulation, but individual additive updates to lambda and nu, rather than scaling up of a single mu

slide-37
SLIDE 37

Optimization-based Optimal Control! J

Next Lecture