Papers
Topics
Authors
Recent
Search
2000 character limit reached

Amortized Nonlinear Model Predictive Control

Published 4 Jun 2026 in eess.SY and cs.RO | (2606.05840v1)

Abstract: Nonlinear Model Predictive Control requires solving a constrained nonlinear program (NLP) in real-time at every sampling instant, a computational bottleneck that limits deployment on resource-constrained hardware or at high sampling rates. We address this challenge for the broad class of input-affine nonlinear systems to show that the optimal control move can be approximated by a state-dependent quadratic program (QP) whose cost parameters depend on the current state and reference. We propose a single-network residual-corrector architecture: a state-dependent analytic baseline provides initial QP parameters, and the network learns only the corrections needed to match the full NLP solution; the QP is solved by a differentiable interior-point layer, guaranteeing constraint satisfaction for the first control action. The network is trained offline on data generated by an NLP solver using a hybrid loss that combines supervised imitation and KKT-residual penalties. We validate the approach on a three-link planar robotic arm with Cartesian end-effector tracking, demonstrating orders-of-magnitude speedup over the NLP solver while maintaining comparable tracking performance.

Summary

  • The paper introduces an amortized MPC framework using a residual-corrector architecture to approximate nonlinear programs with a tractable QP surrogate.
  • It employs a hybrid analytic-learning strategy with a differentiable QP layer, achieving over 21× faster solution times and near-optimal performance within 4.7% of IPOPT.
  • The method guarantees strict constraint satisfaction in input-affine systems, making it ideal for high-frequency and embedded real-time control applications.

Amortized Nonlinear Model Predictive Control: An Expert Analysis

Introduction and Motivation

Model Predictive Control (MPC) is a standard paradigm for handling constrained optimal control problems by solving a finite-horizon optimal control program at each time step. While convex parametric cases are computationally tractable, the high on-line computational overhead of nonlinear programs (NLPs) for nonlinear MPC remains a fundamental limitation, especially for high-frequency or embedded applications. Traditional approaches—including real-time iteration (RTI) schemes—employ Newton-type methods but can still be prohibitive for systems with tight real-time or hardware constraints.

This paper introduces an amortized approach leveraging the input-affine structure prevalent in many robotics and engineering systems. It proposes a hybrid analytic-learning architecture that predicts a quadratic program (QP) approximating the NLP at each time step, balancing the need for computational efficiency and constraint satisfaction.

Residual-Corrector QP Architecture

The central innovation is a residual-corrector architecture, which combines a state-dependent analytic baseline with a neural network that learns only residual corrections to the QP parameters. For input-affine models,

xk+1=f(xk)+G(xk)uk,x_{k+1} = f(x_k) + G(x_k)u_k,

the first control input of the optimal sequence can be approximated as the solution to a QP whose cost and constraint matrices are parametric in the state and reference. The analytic baseline is derived from a first-order linearization of the cost-to-go, while the neural correction captures nonlinear, horizon, and modeling effects that are not accounted for by the local approximation. Figure 1

Figure 1: Residual-corrector architecture for amortized input-affine MPC, where a network predicts corrections to an analytic baseline, and a differentiable QP layer ensures constraint satisfaction for the first control action.

The architecture feeds the current state and reference into a multi-layer perceptron (MLP), which outputs residual updates to the Cholesky decomposition of the cost matrix and linear term. These corrected parameters define the QP, which is solved by a differentiable interior-point layer. Crucially, this separation ensures that state and input constraints are strictly enforced, while the learning is focused on fitting the projection of the horizon cost-to-go into the QP form.

Training via Hybrid KKT Loss

The network is trained offline on data generated from full NLP solutions, minimizing a composite loss comprising four components:

  • Supervised Loss: Direct imitation of the first optimal control computed by an NLP solver.
  • KKT Stationarity Residual: Penalizes violations of first-order optimality on the full NLP induced by the predicted QP solution.
  • Fischer–Burmeister Complementarity: Enforces feasibility and complementarity residuals for active constraints.
  • Regularization: Penalizes deviation from the analytic baseline, promoting stability and generalization.

The KKT and FB residuals are evaluated at a mixed solution, where the first input and next state are taken from the network, and the remainder from the NLP. This first-order consistency strategy efficiently regularizes the network around the analytic approximation and physical constraints of the true system.

Experimental Validation

A comprehensive case study is performed on a three-link planar robotic arm with nonlinear dynamics subjected to various physical constraints. The cost incorporates Cartesian end-effector tracking and quadratic penalties on states and inputs. The resulting input-affine system is used to derive both the analytic baseline and constraints for the amortized QP.

Closed-loop evaluations compare the proposed amortized QP controller to state-of-the-art RTI (acados), full-horizon IPOPT NLP (ground truth), and a direct MLP policy with no QP layer (pure data-driven). Figure 2

Figure 2: End-effector trajectories in the workspace for amortized QP, RTI, IPOPT, and direct MLP policies; only amortized QP closely matches the optimal IPOPT trajectory.

The amortized QP policy achieves:

  • A mean solution time per control step of $0.116$ ms, which is approximately 21×21\times faster than RTI and over 1800×1800\times faster than IPOPT.
  • Near-optimal closed-loop performance: the mean cost is within 4.7%4.7\% of IPOPT, compared to 17.5%17.5\% for RTI and 12.0%12.0\% for direct MLP.
  • Strict satisfaction of hard constraints (joint torque, acceleration) to numerical precision, a property not matched by the unconstrained direct MLP.
  • Robust convergence: 100%100\% of scenarios succeed, versus 88%88\% for RTI and 73%73\% for direct MLP, highlighting the importance of explicit constraint handling. Figure 3

    Figure 3: Per-step solve time distributions across methods, demonstrating an order-of-magnitude reduction for the amortized approach relative to established baselines.

Theoretical and Practical Implications

The approach demonstrates that, for input-affine nonlinear systems, the computational burden of nonlinear MPC can be shifted predominantly offline. By leveraging a physically-motivated analytic baseline and only learning residuals, the burden on the neural network is reduced, improving data efficiency and reliability under extrapolation. Embedding a QP layer enforces hard constraints exactly—something unattainable with standard black-box neural policies.

The hybrid KKT training strategy regularizes the solution to honor first-order optimality and feasibility, providing a degree of physical correctness unmatched by pure data-fitting. The small QP size (in state/input dimension) means the online computation is highly predictable and amenable to hardware acceleration in embedded environments.

This method contrasts with warm-starting and explicit MPC approaches [chen2018approximating, vaupel2020accelerating, masti2019learning]. Whereas warm-start networks provide initial guesses to iterative solvers, the amortized residual-corrector approach directly parameterizes a tractable surrogate QP, and uses a differentiable solver to close the loop. While differentiable MPC and neural convex layers have been previously explored [amos2017optnet, amos2018differentiable], those works typically address the convex case or require full end-to-end gradient flow through the entire NL solver, whereas here the learning is regularized with hybrid physics-informed loss without the prohibitive computational cost of differentiating through large-scale NLP solvers.

Future Directions

This strategy can be extended beyond input-affine systems via embedding richer parametrizations or by augmenting the analytic baseline to capture more structure. Generalization to underactuated or uncertain systems, as well as the incorporation of learning-based model uncertainties in the QP formulation, are promising areas. Extensions to MPC with safety filters [wabersich2021predictive] or explicit stability/contraction constraints are immediate next steps.

Further investigation is warranted into regularizing the network and loss composition to guarantee closed-loop stability and recursive feasibility, especially in the presence of modeling mismatch or non-stationary references.

Conclusion

The amortized nonlinear MPC framework provides a practical approach for combining first-principles modeling with learning-based residual correction in input-affine nonlinear systems. Superior computational efficiency and reliable constraint satisfaction are achieved by embedding a state- and reference-dependent QP parameterized by a residual-corrector network. Offline training with a hybrid physics-informed loss captures both imitation and feasibility objectives, yielding fast, high-quality control in nonlinear, constrained settings. The results indicate that amortized MPC strategies with constrained optimization layers offer a highly promising solution for real-time nonlinear control tasks.

(2606.05840)

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.