Amortized Nonlinear Model Predictive Control
Amortized Nonlinear Model Predictive Control
Francesco Pillitteri, Alberto Bemporad
IMT School for Advanced Studies Lucca
[arXiv:2606.05840]
Nonlinear MPC is a remarkably general way to control constrained systems—and often too slow to deploy. Solving a nonlinear program (NLP) at every sampling instant can take orders of magnitude longer than the sampling period allows, especially on embedded hardware.
Our recent paper1 asks a simple question: can we replace the online NLP with something much smaller, without giving up constraint satisfaction?
The idea: shrink the NLP to a tiny QP
For input-affine systems
the one-step-ahead state is affine in the first control move . This structure means that input bounds, torque limits, and (softened) state bounds all become linear constraints on , and a quadratic stage cost becomes a quadratic objective. In other words: for fixed , a small, always-feasible QP in just and a few slack variables—regardless of the prediction horizon.
The catch is that a one-step QP knows nothing about the rest of the horizon. So we let a neural network fill that gap: it predicts a residual correction to the QP’s analytically derived cost, so that solving the small QP reproduces the first control move of the full -step NMPC problem. A differentiable interior-point solver sits in the loop, which means the QP is part of the network during training—and constraints are enforced exactly at inference, by construction rather than by hope.

The network is trained offline on precomputed NLP solutions, with a loss that mixes direct imitation of the optimal control with penalties on the KKT optimality conditions of the original problem. Details—and why the KKT terms matter near constraint boundaries—are in the paper.
Does it work?
We tested it on a three-link planar robot arm with a deliberately mismatched prediction model, against full-horizon IPOPT, real-time iteration SQP (acados RTI), and a plain MLP trained on the same data without the QP layer.

| Amortized QP | RTI | IPOPT | Direct MLP | |
|---|---|---|---|---|
| Solve time (ms) | 0.116 | 2.45 | 211.8 | 0.095 |
| Convergence | 100/100 | 88/100 | 100/100 | 73/100 |
| Closed-loop cost vs. IPOPT | +4.7% | +17.5% | — | +12.0% |
| Hard constraint violations | none | ~0 | ~0 | large |
The amortized controller runs in 0.116 ms—over 1800× faster than IPOPT—while staying within 5% of its closed-loop cost and converging in every test scenario. The comparison with the direct MLP is the instructive one: same architecture, same data, nearly the same speed, but without the QP layer it violates torque limits by up to 46 N·m and fails on a quarter of the scenarios. The optimization layer is what makes the learned policy trustworthy.
Takeaway
For input-affine systems, near-optimal NMPC doesn’t require solving an NLP online. A small QP with learned, state-dependent parameters gets within a few percent of the optimum at sub-millisecond rates, with hard constraints satisfied exactly.
If this sounds useful for your application, the full derivation, training procedure, and experiments are in the paper.
Footnotes
-
F. Pillitteri and A. Bemporad, “Amortized Nonlinear Model Predictive Control,” arXiv preprint arXiv:2606.05840 [eess.SY], 2026. https://arxiv.org/abs/2606.05840 ↩