Nonlinear MPC (NMPC): Multiple Shooting, Warm Starts and Real-Time Iteration

A concept guide to nonlinear MPC using a runnable CasADi cart-pole swing-up: multiple shooting, why warm starts decide whether the controller commits, and how truncated iterations trade accuracy for a deadline.

In this article

  • Key idea and when to use this guide
  • Concept 1: NMPC is a nonconvex problem solved every cycle
  • Concept 2: multiple shooting keeps the problem well-conditioned
  • Concept 3: the solver is a Newton method on the constraints
  • The experiment: cart-pole swing-up
  • Concept 4: warm starting decides whether the controller commits
  • Concept 5: real-time iteration trades accuracy for a deadline
  • Concept 6: when NMPC earns its cost
  • How much to trust these numbers