Top Banner
AA203 Optimal and Learning-based Control Constrained optimization
18

AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Mar 17, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

AA203Optimal and Learning-based Control

Constrained optimization

Page 2: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Preliminaries

• constrained set usually specified in terms of equality and inequality constraints• sophisticated collections of optimality conditions, involving some

auxiliary variables, called Lagrange multipliers

Viewpoints:• penalty viewpoint: we disregard the constraints and we add to the

cost a high penalty for violating them • feasibility direction viewpoint: it relies on the fact that at a local

minimum there can be no cost improvement when traveling a small distance along a direction that leads to feasibile points

AA 203 | Lecture 24/28/19 2

Page 3: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Outline

1. Optimization with equality constraints2. Optimization with inequality constraints

AA 203 | Lecture 24/28/19 3

Page 4: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Outline

1. Optimization with equality constraints2. Optimization with inequality constraints

AA 203 | Lecture 24/28/19 4

Page 5: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Optimization with equality constraints

• 𝑓:ℝ$ → ℝ and ℎ': ℝ$ → ℝ are 𝐶)

• notation: 𝐡 ≔ (ℎ), … , ℎ/)

AA 203 | Lecture 24/28/19 5

Page 6: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Lagrange multipliers

• Basic Lagrange multiplier theorem: for a given local minimum 𝐱∗there exist scalars 𝜆), … , 𝜆/ called Lagrange multipliers such that

• Example

AA 203 | Lecture 2

Solution: 𝐱∗= (-1, -1)

4/28/19 6

Page 7: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Lagrange multipliersInterpretations:1. The cost gradient ∇𝑓(𝐱∗) belongs to the subspace spanned by the constraint

gradients at 𝐱∗. That is, the constrained solution will be at a point of tangency of the constrained cost curves and the constraint function

2. The cost gradient ∇𝑓(𝐱∗) is orthogonal to the subspace of first order feasible variations

This is the subspace of variations Δ𝐱 for which the vector 𝐱 = 𝐱∗ + Δ𝐱 satisfies the constraint 𝐡 𝐱 = 0 up to first order. Hence, at a local minimum, the first order cost variation ∇𝑓 𝐱∗ 9Δ𝒙 is zero for all variations Δ𝐱 in this subspace

AA 203 | Lecture 24/28/19 7

Page 8: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

NOC

Theorem: NOCLet 𝐱∗ be a local minimum of 𝑓 subject to 𝐡 𝐱 = 0 and assume that the constraint gradients ∇ℎ)(𝐱∗), … , ∇ℎ/(𝐱∗) are linearly independent. Then there exists a unique vector (𝜆), … , 𝜆/), called a Lagrange multiplier vector, such that

AA 203 | Lecture 2

2nd order NOC and SOC are provided in the lecture notes 4/28/19 8

Page 9: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Discussion

• A feasible vector 𝐱 for which ∇ℎ' 𝐱 ' are linearly independent is called regular• Proof relies on transforming the constrained problem into an

unconstrained one1. penalty approach: we disregard the constraint while adding to the cost a

high penalty for violating them → extends to inequality constraints2. elimination approach: we view the constraints as a system of 𝑚

equations with 𝑛 unknowns, and we express 𝑚 of the variables in terms of the remaining 𝑛 −𝑚, thereby reducing the problem to an unconstrained problem

• There may not exist a Lagrange multiplier for a local minimum that is not regular

AA 203 | Lecture 24/28/19 9

Page 10: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

The Lagrangian function

• It is often convenient to write the necessary conditions in terms of the Lagrangian function 𝐿:ℝ$?/ → ℝ

• Then, if 𝐱∗ is a local minimum which is regular, the NOC conditions are compactly written

AA 203 | Lecture 2

System of 𝑛 +𝑚 equations with 𝑛 +𝑚 unknowns

4/28/19 10

Page 11: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Outline

1. Optimization with equality constraints2. Optimization with inequality constraints

AA 203 | Lecture 24/28/19 11

Page 12: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Optimization with inequality constraints

• 𝑓, ℎ', 𝑔A are 𝐶)

• In compact form (ICP problem)

AA 203 | Lecture 24/28/19 12

Page 13: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Active constraints

For any feasible point, the set of active inequality constraints is denoted

If 𝑗 ∉ 𝐴(𝐱), then the constraint is inactive at 𝐱.

Key points• if 𝐱∗ is a local minimum of the ICP, then 𝐱∗ is also a local minimum for the

identical ICP without the inactive constraints• at a local minimum, active inequality constraints can be treated to a

large extent as equalities

AA 203 | Lecture 24/28/19 13

Page 14: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Active constraints

• Hence, if 𝐱∗is a local minimum of ICP, then 𝐱∗ is also a local minimum for the equality constrained problem

AA 203 | Lecture 24/28/19 14

Page 15: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Active constraints

• Thus if 𝐱∗ is regular, there exist Lagrange multipliers (𝜆), … , 𝜆/) and 𝜇A∗, 𝑗 ∈ 𝐴(𝐱∗), such that

• or equivalently

AA 203 | Lecture 24/28/19 15

Page 16: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Karush-Kuhn-Tucker NOCDefine the Lagrangian function

Theorem: KKT NOCLet 𝐱∗ be a local minimum for ICP where 𝑓, ℎ', 𝑔A are 𝐶) and assume 𝐱∗ is regular (equality + active inequality constraints gradients are linearly independent). Then, there exist unique Lagrange multiplier vectors (𝜆)∗ , … , 𝜆/∗ ), 𝜇)∗, … , 𝜇/∗ such that

AA 203 | Lecture 24/28/19 16

Page 17: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Example

AA 203 | Lecture 2

Solution: (0,0)

4/28/19 17

Page 18: AA203 Optimal and Learning-based Control - Stanford ASLasl.stanford.edu/aa203/pdfs/lecture/lecture_2.pdf · Lagrange multipliers Interpretations: 1. The cost gradient ∇!(1∗)belongs

Next time

AA 203 | Lecture 2

Dynamic programming

4/28/19 18