Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session...

117
The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics Fast MPC: Fundamentals for breaking trough the speed barrier Fast NMPC: A Reality-Steered Paradigm Mazen Alamir CNRS, University of Grenoble, France. M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 0 / 28

Transcript of Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session...

Page 1: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Fast MPC: Fundamentals forbreaking trough the speed barrier

Fast NMPC: A Reality-Steered Paradigm

Mazen Alamir

CNRS, University of Grenoble, France.

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 0 / 28

Page 2: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Overview of the tutorial session

Fast MPC, a reality-steered paradigm (M. Alamir)

Nonlinear MPC algorithms (M. Diehl)

Exact penalty methods for fast MPC (V. Zavala)

Splitting methods for embeddedoptimization and control (C. Jones)

Co-Design of hardware and algorithmsfor embedded optimization (E. Kerrigan)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 1 / 28

Page 3: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Overview of this talk

1 Ideal NMPC

2 Fast NMPC

3 Advanced Topics

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 2 / 28

Page 4: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Agenda

1 Ideal NMPCDefinition & Stability

2 Fast NMPC

3 Advanced Topics

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 2 / 28

Page 5: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 6: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 7: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints /

Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 8: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost /

Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 9: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control /

Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 10: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control /

Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 11: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control /

Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 12: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control /

Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 13: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 14: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 15: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 16: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 17: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 18: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 19: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 20: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 21: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 22: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 23: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 24: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 25: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Informal Definition

Constraints / Cost / Control / Disturbances

Current state

Desired state

Current state

Desired state

Current state

Desired state

Constraints

Current state

Desired state

Current state

Desired state

Control input(d.o.f)

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Current state

Desired state

Closed-loop

Open-loop

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 3 / 28

Page 26: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

time

Present

Prediction Horizon Beyond Prediction

Present

Prediction Horizon Beyond Prediction

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 4 / 28

Page 27: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

time

Present

Prediction Horizon Beyond Prediction

Present

Prediction Horizon Beyond Prediction

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 4 / 28

Page 28: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Instability may arise

In general

Closed-loop trajectory 6= Initial open-loop trajectory

and

Stability is not guaranteed for arbitrary choices offinite-horizon MPC ingredients

even with a perfectundisturbed model.

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 5 / 28

Page 29: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Instability may arise

In general

Closed-loop trajectory 6= Initial open-loop trajectory

and

Stability is not guaranteed for arbitrary choices offinite-horizon MPC ingredients even with a perfectundisturbed model.

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 5 / 28

Page 30: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Genesis of instability

time

Present

Prediction Horizon Beyond Prediction

Present

Prediction Horizon Beyond Prediction

?

Stability assessment is based on the characterization of the terminal regionthat must be reached at the end of the finite prediction horizon.

[Mayne et al. Automatica 2000]

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 6 / 28

Page 31: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Genesis of instability

time

Present

Prediction Horizon Beyond Prediction

Present

Prediction Horizon Beyond Prediction

?

Stability assessment is based on the characterization of the terminal regionthat must be reached at the end of the finite prediction horizon.

[Mayne et al. Automatica 2000]

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 6 / 28

Page 32: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Genesis of instability

time

Present

Prediction Horizon Beyond Prediction

Present

Prediction Horizon Beyond Prediction

?

Stability assessment is based on the characterization of the terminal regionthat must be reached at the end of the finite prediction horizon.

[Mayne et al. Automatica 2000]

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 6 / 28

Page 33: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Genesis of instability

time

Present

Prediction Horizon Beyond Prediction

Present

Prediction Horizon Beyond Prediction

?

Stability assessment is based on the characterization of the terminal regionthat must be reached at the end of the finite prediction horizon.

[Mayne et al. Automatica 2000]

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 6 / 28

Page 34: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Formal Definition

Solve a NLP problem,

p∗(x(k)) ← minp

J(p | x(k)

)

under C (p | x(k)) ≤ 0

Apply the first control

u(k) = U(0, p∗(x(k))

)

over the updating period [k , k + 1].

Optimal cost

J∗(x(k)) := J(p∗(x(k)) | x(k))

At each decision instant k

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example)

k =1

p1

p2

k =2

p1

p2

k =3

p1

p2

k =4

p1

p2

k =5

p1

p2

k =6

p1

p2

k =7

p1

p2

p1

p2

p⇤�x(·)

�p⇤�x(·)

� U

⇣0,p⇤(x(·))

p1

p2

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 7 / 28

Page 35: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Formal Definition

Solve a NLP problem,

p∗(x(k)) ← minp

J(p | x(k)

)

under C (p | x(k)) ≤ 0

Apply the first control

u(k) = U(0, p∗(x(k))

)

over the updating period [k , k + 1].

Optimal cost

J∗(x(k)) := J(p∗(x(k)) | x(k))

At each decision instant k

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example) k =1

p1

p2

k =2

p1

p2

k =3

p1

p2

k =4

p1

p2

k =5

p1

p2

k =6

p1

p2

k =7

p1

p2

p1

p2

p⇤�x(·)

�p⇤�x(·)

� U

⇣0,p⇤(x(·))

p1

p2

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 7 / 28

Page 36: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Formal Definition

Solve a NLP problem,

p∗(x(k)) ← minp

J(p | x(k)

)

under C (p | x(k)) ≤ 0

Apply the first control

u(k) = U(0, p∗(x(k))

)

over the updating period [k , k + 1].

Optimal cost

J∗(x(k)) := J(p∗(x(k)) | x(k))

At each decision instant k

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example) k =1

p1

p2

k =2

p1

p2

k =3

p1

p2

k =4

p1

p2

k =5

p1

p2

k =6

p1

p2

k =7

p1

p2

p1

p2

p⇤�x(·)

�p⇤�x(·)

� U

⇣0,p⇤(x(·))

p1

p2

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 7 / 28

Page 37: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Formal Definition

Solve a NLP problem,

p∗(x(k)) ← minp

J(p | x(k)

)

under C (p | x(k)) ≤ 0

Apply the first control

u(k) = U(0, p∗(x(k))

)

over the updating period [k , k + 1].

Optimal cost

J∗(x(k)) := J(p∗(x(k)) | x(k))

At each decision instant k

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example) k =1

p1

p2

k =2

p1

p2

k =3

p1

p2

k =4

p1

p2

k =5

p1

p2

k =6

p1

p2

k =7

p1

p2

p1

p2

p⇤�x(·)

�p⇤�x(·)

� U

⇣0,p⇤(x(·))

p1

p2

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 7 / 28

Page 38: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Formal Definition

Solve a NLP problem,

p∗(x(k)) ← minp

J(p | x(k)

)

under C (p | x(k)) ≤ 0

Apply the first control

u(k) = U(0, p∗(x(k))

)

over the updating period [k , k + 1].

Optimal cost

J∗(x(k)) := J(p∗(x(k)) | x(k))

At each decision instant k

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example) k =1

p1

p2

k =2

p1

p2

k =3

p1

p2

k =4

p1

p2

k =5

p1

p2

k =6

p1

p2

k =7

p1

p2

p1

p2

p⇤�x(·)

�p⇤�x(·)

� U

⇣0,p⇤(x(·))

p1

p2

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 7 / 28

Page 39: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Formal Definition

Solve a NLP problem,

p∗(x(k)) ← minp

J(p | x(k)

)

under C (p | x(k)) ≤ 0

Apply the first control

u(k) = U(0, p∗(x(k))

)

over the updating period [k , k + 1].

Optimal cost

J∗(x(k)) := J(p∗(x(k)) | x(k))

At each decision instant k

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example) k =1

p1

p2

k =2

p1

p2

k =3

p1

p2

k =4

p1

p2

k =5

p1

p2

k =6

p1

p2

k =7

p1

p2

p1

p2

p⇤�x(·)

�p⇤�x(·)

� U

⇣0,p⇤(x(·))

p1

p2

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 7 / 28

Page 40: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Formal Definition

Solve a NLP problem,

p∗(x(k)) ← minp

J(p | x(k)

)

under C (p | x(k)) ≤ 0

Apply the first control

u(k) = U(0, p∗(x(k))

)

over the updating period [k , k + 1].

Optimal cost

J∗(x(k)) := J(p∗(x(k)) | x(k))

At each decision instant k

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example) k =1

p1

p2

k =2

p1

p2

k =3

p1

p2

k =4

p1

p2

k =5

p1

p2

k =6

p1

p2

k =7

p1

p2

p1

p2

p⇤�x(·)

�p⇤�x(·)

� U

⇣0,p⇤(x(·))

p1

p2

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 7 / 28

Page 41: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Formal Definition

Solve a NLP problem,

p∗(x(k)) ← minp

J(p | x(k)

)

under C (p | x(k)) ≤ 0

Apply the first control

u(k) = U(0, p∗(x(k))

)

over the updating period [k , k + 1].

Optimal cost

J∗(x(k)) := J(p∗(x(k)) | x(k))

At each decision instant k

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example) k =1

p1

p2

k =2

p1

p2

k =3

p1

p2

k =4

p1

p2

k =5

p1

p2

k =6

p1

p2

k =7

p1

p2

p1

p2

p⇤�x(·)

�p⇤�x(·)

� U

⇣0,p⇤(x(·))

p1

p2

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 7 / 28

Page 42: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Formal Definition

Solve a NLP problem,

p∗(x(k)) ← minp

J(p | x(k)

)

under C (p | x(k)) ≤ 0

Apply the first control

u(k) = U(0, p∗(x(k))

)

over the updating period [k , k + 1].

Optimal cost

J∗(x(k)) := J(p∗(x(k)) | x(k))

At each decision instant k

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example) k =1

p1

p2

k =2

p1

p2

k =3

p1

p2

k =4

p1

p2

k =5

p1

p2

k =6

p1

p2

k =7

p1

p2

p1

p2

p⇤�x(·)

p⇤�x(·)

� U

⇣0,p⇤(x(·))

p1

p2

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 7 / 28

Page 43: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Formal Definition

Solve a NLP problem,

p∗(x(k)) ← minp

J(p | x(k)

)

under C (p | x(k)) ≤ 0

Apply the first control

u(k) = U(0, p∗(x(k))

)

over the updating period [k , k + 1].

Optimal cost

J∗(x(k)) := J(p∗(x(k)) | x(k))

At each decision instant k

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example) k =1

p1

p2

k =2

p1

p2

k =3

p1

p2

k =4

p1

p2

k =5

p1

p2

k =6

p1

p2

k =7

p1

p2

p1

p2

p⇤�x(·)

�p⇤�x(·)

� U

⇣0,p⇤(x(·))

p1

p2

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 7 / 28

Page 44: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal MPC: Common Control Parametrization

Reduced → u(k) = U(k , p(k)), [np < Nnu]

Trivial → p(k) := u(k) := (u(k), . . . ,u(k + N − 1))T ∈ RNnu

Extended→ p(k) =

u(k)x(k)µ(k)

, [np = N(nu + nx + nc)]

µ(k) : KKT conditions-relatedmultiplier’s profile

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 8 / 28

Page 45: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal MPC: Common Control Parametrization

Reduced → u(k) = U(k , p(k)), [np < Nnu]

Trivial → p(k) := u(k) := (u(k), . . . ,u(k + N − 1))T ∈ RNnu

Extended→ p(k) =

u(k)x(k)µ(k)

, [np = N(nu + nx + nc)]

µ(k) : KKT conditions-relatedmultiplier’s profile

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 8 / 28

Page 46: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal MPC: Common Control Parametrization

Reduced → u(k) = U(k , p(k)), [np < Nnu]

Trivial → p(k) := u(k) := (u(k), . . . ,u(k + N − 1))T ∈ RNnu

Extended→ p(k) =

u(k)x(k)µ(k)

, [np = N(nu + nx + nc)]

µ(k) : KKT conditions-relatedmultiplier’s profile

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 8 / 28

Page 47: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal MPC: Common Control Parametrization

Reduced → u(k) = U(k , p(k)), [np < Nnu]

Trivial → p(k) := u(k) := (u(k), . . . ,u(k + N − 1))T ∈ RNnu

Extended→ p(k) =

u(k)x(k)µ(k)

, [np = N(nu + nx + nc)]

µ(k) : KKT conditions-relatedmultiplier’s profile

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 8 / 28

Page 48: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Formal Definition

Solve a NLP problem,

p∗(x(k)) ← minp

J(p | x(k)

)

under C (p | x(k)) ≤ 0

Apply the first control

u(k) = U(0, p∗(x(k))

)

over the updating period [k , k + 1].

Optimal cost

J∗(x(k)) := J(p∗(x(k)) | x(k))

At each decision instant k

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example) k =1

p1

p2

k =2

p1

p2

k =3

p1

p2

k =4

p1

p2

k =5

p1

p2

k =6

p1

p2

k =7

p1

p2

p1

p2

p⇤�x(·)

�p⇤�x(·)

� U

⇣0,p⇤(x(·))

p1

p2

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 9 / 28

Page 49: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Closed-Loop Stability

Provided that:

1. The formulation includes appropriate terminal assessment

2. The optimal solution p∗(x(k)) is obtained

⇐ IDEAL !!!

3. The corresponding MPC control u(k) = U(0, p∗(x(k))

)is applied

Stability can be proved based on:

J∗(x(k + 1)) ≤ J∗(x(k))− `(x(k))

[Mayne et al. Automatica 2000]

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 10 / 28

Page 50: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Closed-Loop Stability

Provided that:

1. The formulation includes appropriate terminal assessment

2. The optimal solution p∗(x(k)) is obtained

⇐ IDEAL !!!

3. The corresponding MPC control u(k) = U(0, p∗(x(k))

)is applied

Stability can be proved based on:

J∗(x(k + 1))− J∗(x(k)) ≤ −`(x(k))

[Mayne et al. Automatica 2000]

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 10 / 28

Page 51: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Closed-Loop Stability

Provided that:

1. The formulation includes appropriate terminal assessment

2. The optimal solution p∗(x(k)) is obtained ⇐ IDEAL !!!

3. The corresponding MPC control u(k) = U(0, p∗(x(k))

)is applied

Stability can be proved based on:

J∗(x(k + 1)) ≤ J∗(x(k))− `(x(k))

[Mayne et al. Automatica 2000]

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 10 / 28

Page 52: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal MPC: key assumption

k

k + 1

x u

k + 1

k + 2

U(0, p∗(x(k))

)

U(0, p∗(x(k + 1))

)

x(k)

x(k + 1)

SolveNLP(x(k))

SolveNLP(x(k + 1))

τu

The time needed to get p∗(x(k)) by solvingNLP(x(k)) is negligible w.r.t the updating period τu.

Implicit assumption of ideal MPC

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 11 / 28

Page 53: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal MPC: key assumption

k

k + 1

x u

k + 1

k + 2

U(0, p∗(x(k))

)

U(0, p∗(x(k + 1))

)

x(k)

x(k + 1)

SolveNLP(x(k))

SolveNLP(x(k + 1))

τu

The time needed to get p∗(x(k)) by solvingNLP(x(k)) is negligible w.r.t the updating period τu.

Implicit assumption of ideal MPC

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 11 / 28

Page 54: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal MPC: key assumption

k

k + 1

x u

k + 1

k + 2

U(0, p∗(x(k))

)

U(0, p∗(x(k + 1))

)

x(k)

x(k + 1)

SolveNLP(x(k))

SolveNLP(x(k + 1))

τu

The time needed to get p∗(x(k)) by solvingNLP(x(k)) is negligible w.r.t the updating period τu.

Implicit assumption of ideal MPC

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 11 / 28

Page 55: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal MPC: key assumption

k

k + 1

x u

k + 1

k + 2

U(0, p∗(x(k))

)

U(0, p∗(x(k + 1))

)

x(k)

x(k + 1)

SolveNLP(x(k))

SolveNLP(x(k + 1))

τu

The time needed to get p∗(x(k)) by solvingNLP(x(k)) is negligible w.r.t the updating period τu.

Implicit assumption of ideal MPC

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 11 / 28

Page 56: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Agenda

1 Ideal NMPC

2 Fast NMPCWhat is it about?

3 Advanced Topics

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 11 / 28

Page 57: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Quasi-Ideal MPC

k − 1

x(k − 1)

k k + 1

x u

U(0, p∗(x(k))

)

U(0, p∗(x(k))+S · δx(k)

)x(k)

x(k)

SolveNLP(x(k))

SolveNLP(x(k))

& Sensitivity

τu τu

The time needed to get p∗(x(k)) by solvingNLP(x(k)) is lower than the updating period τu.

Implicit assumption of quasi-ideal MPC

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 12 / 28

Page 58: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Quasi-Ideal MPC

k − 1

x(k − 1)

k k + 1

x u

U(0, p∗(x(k))

)

U(0, p∗(x(k))+S · δx(k)

)x(k)

x(k)

SolveNLP(x(k))

SolveNLP(x(k))

& Sensitivity

τu τu

The time needed to get p∗(x(k)) by solvingNLP(x(k)) is lower than the updating period τu.

Implicit assumption of quasi-ideal MPC

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 12 / 28

Page 59: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Quasi-Ideal MPC

k − 1

x(k − 1)

k k + 1

x u

U(0, p∗(x(k))

)

U(0, p∗(x(k))+S · δx(k)

)x(k)x(k)

SolveNLP(x(k))

SolveNLP(x(k))

& Sensitivity

τu τu

The time needed to get p∗(x(k)) by solvingNLP(x(k)) is lower than the updating period τu.

Implicit assumption of quasi-ideal MPC

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 12 / 28

Page 60: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Quasi-Ideal MPC

k − 1

x(k − 1)

k k + 1

x u

U(0, p∗(x(k))

)

U(0, p∗(x(k))+S · δx(k)

)x(k)x(k)

SolveNLP(x(k))

SolveNLP(x(k))

& Sensitivity

τu τu

The time needed to get p∗(x(k)) by solvingNLP(x(k)) is lower than the updating period τu.

Implicit assumption of quasi-ideal MPC

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 12 / 28

Page 61: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Definition of a fast system

• τu is the time between two updating of the strategy

• τu it is the time during which there is no feedback

• ⇒ there is a system-dependent τmaxu s.t. τ must satisfy

Fast systems are those for which:

τsolve(NLP(x)

)is greater than τmax

u

Fast Systems

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 13 / 28

Page 62: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Definition of a fast system

• τu is the time between two updating of the strategy

• τu it is the time during which there is no feedback

• ⇒ there is a system-dependent τmaxu s.t. τ must satisfy

Fast systems are those for which:

τsolve(NLP(x)

)is greater than τmax

u

Fast Systems

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 13 / 28

Page 63: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Definition of a fast system

• τu is the time between two updating of the strategy

• τu it is the time during which there is no feedback

• ⇒ there is a system-dependent τmaxu s.t. τ must satisfy

Quasi-ideal MPC ⇒ τsolve(NLP(x)) ≤ τu ≤ τmaxu

Fast systems are those for which:

τsolve(NLP(x)

)is greater than τmax

u

Fast Systems

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 13 / 28

Page 64: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Definition of a fast system

• τu is the time between two updating of the strategy

• τu it is the time during which there is no feedback

• ⇒ there is a system-dependent τmaxu s.t. τ must satisfy

Quasi-Ideal MPC ⇒ τsolve(NLP(x)) ≤ τu ≤ τmaxu

Fast systems are those for which:

τsolve(NLP(x)

)is greater than τmax

u

Fast Systems

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 13 / 28

Page 65: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Definition of a fast system

• τu is the time between two updating of the strategy

• τu it is the time during which there is no feedback

• ⇒ there is a system-dependent τmaxu s.t. τ must satisfy

Quasi-Ideal MPC ⇒ τsolve(NLP(x)) ≤ τu ≤ τmaxu

Fast systems are those for which:

τsolve(NLP(x)

)is greater than τmax

u

Fast Systems

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 13 / 28

Page 66: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Did you say Fast systems?

τsolve(NLP(x)) ≥ τmaxu

τsolve NLP(x) τmaxu

Algorithm Hardware MPC formulation System & Model

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 14 / 28

Page 67: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Did you say Fast systems?

τsolve(NLP(x)) ≥ τmaxu

τsolve NLP(x) τmaxu

Algorithm Hardware MPC formulation System & Model

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 14 / 28

Page 68: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Did you say Fast systems?

τsolve(NLP(x)) ≥ τmaxu

τsolve NLP(x) τmaxu

Algorithm Hardware MPC formulation System & Model

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 14 / 28

Page 69: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Fast MPC problems are those for which:

τsolve(NLP(x)

)is greater than τmax

u

Fast MPC problems

What happens in this case?

1. Updating is still necessary (≤ τmaxu )

2. Optimal solution p∗(x(k)) cannot be obtained.

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 15 / 28

Page 70: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Fast MPC problems are those for which:

τsolve(NLP(x)

)is greater than τmax

u

Fast MPC problems

What happens in this case?

1. Updating is still necessary (≤ τmaxu )

2. Optimal solution p∗(x(k)) cannot be obtained.

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 15 / 28

Page 71: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Implication of Fast MPC: p(k) is a dynamic state

• p∗(x(k)) is obtained through an iterative process:

p(i) ← S(p(i−1), x(k)

)

⇒ [p(q) ← S(q)(p(0), x(k))]

• Assume that a single iteration needs τ1 time unit.

q ≤ qmax := E(τmax

u

τ1

)p(k) = S(q)(p+(k − 1), x(k))

• p(k) 6= p∗(x(k)) but rather an dynamic internal state of thecontroller.

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 16 / 28

Page 72: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Implication of Fast MPC: p(k) is a dynamic state

• p∗(x(k)) is obtained through an iterative process:

p(i) ← S(p(i−1), x(k)

)⇒ [p(q) ← S(q)(p(0), x(k))]

• Assume that a single iteration needs τ1 time unit.

q ≤ qmax := E(τmax

u

τ1

)p(k) = S(q)(p+(k − 1), x(k))

• p(k) 6= p∗(x(k)) but rather an dynamic internal state of thecontroller.

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 16 / 28

Page 73: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Implication of Fast MPC: p(k) is a dynamic state

• p∗(x(k)) is obtained through an iterative process:

p(i) ← S(p(i−1), x(k)

)⇒ [p(q) ← S(q)(p(0), x(k))]

• Assume that a single iteration needs τ1 time unit.

q ≤ qmax := E(τmax

u

τ1

)p(k) = S(q)(p+(k − 1), x(k))

• p(k) 6= p∗(x(k)) but rather an dynamic internal state of thecontroller.

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 16 / 28

Page 74: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Implication of Fast MPC: p(k) is a dynamic state

• p∗(x(k)) is obtained through an iterative process:

p(i) ← S(p(i−1), x(k)

)⇒ [p(q) ← S(q)(p(0), x(k))]

• Assume that a single iteration needs τ1 time unit.

q ≤ qmax := E(τmax

u

τ1

)

p(k) = S(q)(p+(k − 1), x(k))

• p(k) 6= p∗(x(k)) but rather an dynamic internal state of thecontroller.

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 16 / 28

Page 75: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Implication of Fast MPC: p(k) is a dynamic state

• p∗(x(k)) is obtained through an iterative process:

p(i) ← S(p(i−1), x(k)

)⇒ [p(q) ← S(q)(p(0), x(k))]

• Assume that a single iteration needs τ1 time unit.

q ≤ qmax := E(τmax

u

τ1

)p(k) = S(q)(p+(k − 1), x(k))

• p(k) 6= p∗(x(k)) but rather an dynamic internal state of thecontroller.

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 16 / 28

Page 76: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Implication of Fast MPC: p(k) is a dynamic state

• p∗(x(k)) is obtained through an iterative process:

p(i) ← S(p(i−1), x(k)

)⇒ [p(q) ← S(q)(p(0), x(k))]

• Assume that a single iteration needs τ1 time unit.

q ≤ qmax := E(τmax

u

τ1

)p(k) = S(q)(p+(k − 1), x(k))

• p(k) 6= p∗(x(k)) but rather an dynamic internal state of thecontroller.

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 16 / 28

Page 77: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Implication of Fast MPC: The Extended System

At updating instants, the system is described by:

x(k + 1) = f(x(k),

u(k)︷ ︸︸ ︷U(0, p(k))

)

p(k + 1) = S(q)(p+(k), x(k)

)

Fast MPC Extended System

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 17 / 28

Page 78: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Implication of Fast MPC: The Extended System

At updating instants, the system is described by:

x(k + 1) = f(x(k),

u(k)︷ ︸︸ ︷U(0, p(k))

)

p(k + 1) = S(q)(p+(k), x(k)

)

Fast MPC Extended System

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 17 / 28

Page 79: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Ideal NMPC: Formal Definition

Solve a NLP problem,

p∗(x(k)) ← minp

J(p | x(k)

)

under C (p | x(k)) ≤ 0

Apply the first control

u(k) = U(0, p∗(x(k))

)

over the updating period [k , k + 1].

Optimal cost

J∗(x(k)) := J(p∗(x(k)) | x(k))

At each decision instant k

time

U(·, p)U(t, p) :=

P3i=1 pie

�it

U(0, p)

(example) k =1

p1

p2

k =2

p1

p2

k =3

p1

p2

k =4

p1

p2

k =5

p1

p2

k =6

p1

p2

k =7

p1

p2

p1

p2

p⇤�x(·)

p⇤�x(·)

� U

⇣0,p⇤(x(·))

p1

p2

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 18 / 28

Page 80: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Optimal p∗(x(k)) vs achievable p(k)

p2

p1

p∗(x(k))

p∗(x(k + 1))

p∗(x(k + 5))

p(k)

p(k + 1)

p(k + 5)

timek

J(p∗)

??J(p)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 19 / 28

Page 81: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Optimal p∗(x(k)) vs achievable p(k)

p2

p1

p∗(x(k))

p∗(x(k + 1))

p∗(x(k + 5))

p(k)

p(k + 1)

p(k + 5)

timek

J(p∗)

??J(p)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 19 / 28

Page 82: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Optimal p∗(x(k)) vs achievable p(k)

p2

p1

p∗(x(k))

p∗(x(k + 1))

p∗(x(k + 5))

p(k)

p(k + 1)

p(k + 5)

timek

J(p∗)

??J(p)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 19 / 28

Page 83: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Closed-Loop Evolution of the Cost Function

J(p)

p

p⇤(x(k))

p+(k � 1)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 20 / 28

Page 84: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Closed-Loop Evolution of the Cost Function

p

p⇤(x(k))

p+(k � 1)

p(k)

S(2)(p+(k � 1),x(k))

J(p)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 20 / 28

Page 85: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Closed-Loop Evolution of the Cost Function

p

J(p)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 20 / 28

Page 86: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Closed-Loop Evolution of the Cost Function

p

J(p)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 20 / 28

Page 87: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Closed-Loop Evolution of the Cost Function

p

J(p)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 20 / 28

Page 88: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Closed-Loop Evolution of the Cost Function

p

J(p)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 20 / 28

Page 89: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Closed-Loop Evolution of the Cost Function

p

J(p)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 20 / 28

Page 90: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Closed-Loop Evolution of the Cost Function

p

J(p)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 20 / 28

Page 91: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Closed-Loop Evolution of the Cost Function

p

J(p)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 20 / 28

Page 92: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Closed-Loop Evolution of the Cost Function

p

J(p)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 20 / 28

Page 93: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Closed-Loop Evolution of the Cost Function

minimum trackingp

J(p)

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 20 / 28

Page 94: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Closed-Loop Evolution of the Cost Function

minimum trackingp

J(p)

Fast MPC

Ideal MPC

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 20 / 28

Page 95: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Closed-Loop Evolution of the Cost Function

p

J(p)

Fast MPC

Ideal MPC

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 20 / 28

Page 96: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Fast MPC: A Competition

Fast MPC: a competition:

Cost J(p, x)Good guy Optimizer managing pBad guy Reality a managing x

afast dynamic, model mismatch, disturbance, set-point changes, controlparametrization, bad MPC formulations, etc.

Game view of Fast MPC

p

J(p)

Fast MPC

Ideal MPC

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 21 / 28

Page 97: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Fast MPC: Intuitive Set of Success Conditions

1. No finite escape time.

2. Efficient iteration vs not sofast dynamics

3. Stabilizing NMPC formulation(in the ideal case)

Success Conditions

p

J(p)

Fast MPC

Ideal MPC

[Diehl et al. IEE Proc. Control Theory Appl. (2005)]

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 22 / 28

Page 98: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Agenda

1 Ideal NMPC

2 Fast NMPC

3 Advanced TopicsMonitoring the updating periodQuantum of ComputationMiscellaneous

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 22 / 28

Page 99: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

The Controlled Extended System

At updating instants, the system is described by:

x(k + 1) = f(x(k),U(0, p(k))

)

p(k + 1) = S(q)(p+(k), x(k)

)

Fast MPC Extended System

z+ = F (z, q,w)y(z) = J(z)

w

qy

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 23 / 28

Page 100: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

The Controlled Extended System

At updating instants, the system is described by:

z(k + 1) = F (z(k), q)

z := (p, x)

Fast MPC Extended System

z+ = F (z, q,w)y(z) = J(z)

w

qy

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 23 / 28

Page 101: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

The Controlled Extended System

At updating instants, the system is described by:

z(k + 1) = F (z(k), q)

y(k) = J(z(k))

z := (p, x)

Fast MPC Extended System

z+ = F (z, q,w)y(z) = J(z)

w

qy

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 23 / 28

Page 102: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

The Controlled Extended System

At updating instants, the system is described by:

z(k + 1) = F (z(k), q,w)

y(k) = J(z(k))

z := (p, x)

Fast MPC Extended System

z+ = F (z, q,w)y(z) = J(z)

w

qy

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 23 / 28

Page 103: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

The Controlled Extended System

At updating instants, the system is described by:

z(k + 1) = F (z(k), q,w)

y(k) = J(z(k))

z := (p, x)

Fast MPC Extended System

z+ = F (z, q,w)y(z) = J(z)

w

qy

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 23 / 28

Page 104: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Updating the Number of Iterations

z+ = F (z, q,w)y(z) = J(z)

w

qy

Monitoring q

[MA, ECC2013, Zurich.]

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 24 / 28

Page 105: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Updating the Number of Iterations

z+ = F (z, q,w)y(z) = J(z)

w

qy

Monitoring q

[MA, ECC2013, Zurich.]

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 24 / 28

Page 106: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Example

[MA, ECC2013, Zurich.]

q = 2 without adaptation

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 25 / 28

Page 107: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Example

[MA, ECC2013, Zurich.]

q = 100 without adaptation

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 25 / 28

Page 108: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Example

[MA, ECC2013, Zurich.]

q(0) = 2 with adaptation

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 25 / 28

Page 109: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Example

[MA, ECC2013, Zurich.]

q(0) = 100 with adaptation

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 25 / 28

Page 110: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Agenda

1 Ideal NMPC

2 Fast NMPC

3 Advanced TopicsMonitoring the updating periodQuantum of ComputationMiscellaneous

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 25 / 28

Page 111: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

The Quantum amount of Interruptible Computation

τu = q × τ1

τu Updating period

q Number of iterations

τ1 Time for a single iteration.

z+ = F (z, τu,w)y(z) = J(z)

w

τuy

Monitoring τu

(Newton-like, gradient, partial gradient, parametrization, etc.) does notshow the same τ1 and hence enable different updating periods.

[Semi-Plenary, ECC2014]

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 26 / 28

Page 112: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

The Quantum amount of Interruptible Computation

τu = q × τ1

τu Updating period

q Number of iterations

τ1 Time for a single iteration.

z+ = F (z, τu,w)y(z) = J(z)

w

τuy

Monitoring τu

(Newton-like, gradient, partial gradient, parametrization, etc.) does notshow the same τ1 and hence enable different updating periods.

[Semi-Plenary, ECC2014]

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 26 / 28

Page 113: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

The Quantum amount of Interruptible Computation

τu = q × τ1

τu Updating period

q Number of iterations

τ1 Time for a single iteration.

z+ = F (z, τu,w)y(z) = J(z)

w

τuy

Monitoring τu

(Newton-like, gradient, partial gradient, parametrization, etc.) does notshow the same τ1 and hence enable different updating periods.

[Semi-Plenary, ECC2014]

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 26 / 28

Page 114: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

The Quantum amount of Interruptible Computation

τu = q × τ1

τu Updating period

q Number of iterations

τ1 Time for a single iteration.

z+ = F (z, τu,w)y(z) = J(z)

w

τuy

Monitoring τu

(Newton-like, gradient, partial gradient, parametrization, etc.) does notshow the same τ1 and hence enable different updating periods.

[Semi-Plenary, ECC2014]

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 26 / 28

Page 115: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Agenda

1 Ideal NMPC

2 Fast NMPC

3 Advanced TopicsMonitoring the updating periodQuantum of ComputationMiscellaneous

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 26 / 28

Page 116: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

Other Topics . . .

Some Facts

• Many ready-to-use and user friendly software are available.

• Parallel computing on multi-core processors coming soon.

• Transposition to Moving-Horizon-Observers implementation

Some open issues

• Explicit NMPC vs on-line Fast MPC?

• Fast robust min/max frameworks?

• Automatic tuning?

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 27 / 28

Page 117: Fast MPC: Fundamentals for breaking trough the speed ...€¦ · Overview of the tutorial session Fast MPC, a reality-steered paradigm(M. Alamir) Nonlinear MPC algorithms(M. Diehl)

The Tutorial Session Ideal NMPC Fast NMPC Advanced Topics

M. Alamir (ECC’14 Tutorial session) Fast NMPC: A Reality-Steered Paradigm 28 / 28