| name | amortized-nonlinear-mpc |
| description | Amortized Nonlinear Model Predictive Control using state-dependent quadratic programs (QPs) with single-network residual-corrector architecture. Replaces expensive real-time NLP solving with differentiable interior-point QP layer, enabling deployment on resource-constrained hardware. Achieves orders-of-magnitude speedup while maintaining constraint satisfaction. Applications: robotics, autonomous systems, high-frequency control. Activation: amortized MPC, nonlinear MPC acceleration, QP-based MPC, differentiable optimization, interior-point layer, real-time control, robotics control. |
Context
From arXiv:2606.05840 (June 2026) - "Amortized Nonlinear Model Predictive Control" by Francesco Pillitteri, Alberto Bemporad.
Addresses computational bottleneck of real-time Nonlinear MPC by approximating optimal control moves with state-dependent QPs. Uses residual-corrector network architecture trained offline with hybrid loss combining imitation and KKT-residual penalties.
Core Methodology
1. Problem Formulation
Standard NMPC bottleneck:
- Solve constrained nonlinear program (NLP) at each sampling instant
- Computational cost limits deployment on resource-constrained hardware
- High sampling rate applications infeasible
Key insight: For input-affine nonlinear systems, optimal control can be approximated by state-dependent QP whose parameters depend on current state and reference.
2. Architecture Design
Single-network residual-corrector:
- State-dependent analytic baseline: Provides initial QP parameters (cost matrix H, gradient h, constraint bounds)
- Neural network correction: Learns only the residual corrections needed to match full NLP solution
- Differentiable interior-point layer: Solves resulting QP, guaranteeing constraint satisfaction
Why residual learning:
- Baseline captures problem structure
- Network focuses on refinement
- Faster training, better generalization
- Smaller network capacity needed
3. Training Procedure
Offline data generation:
- Run full NLP solver over representative state-reference scenarios
- Record optimal control inputs and QP parameters
- Build training dataset
Hybrid loss function:
Loss = L_imitation + λ * L_KKT
L_imitation = ||u_network - u_NLP||²
L_KKT = ||KKT_residual||²
Training steps:
- Collect NLP solutions across state space
- Compute analytic baseline QP parameters
- Train network to predict corrections
- Enforce KKT conditions via loss penalty
- Validate on held-out scenarios
4. Input-Affine System Structure
System model: x_dot = f(x) + g(x) * u
State-dependent QP approximation:
minimize: 0.5 * u^T H(x, r) u + h(x, r)^T u
subject to: A(x) u ≤ b(x)
u_min ≤ u ≤ u_max
Parameters H(x,r), h(x,r) depend on current state x and reference r.
5. Implementation Architecture
class AmortizedNMPC:
def __init__(self, baseline_policy, correction_network):
self.baseline = baseline_policy
self.network = correction_network
self.qp_solver = DifferentiableInteriorPointLayer()
def compute_control(self, x, r):
"""
Real-time control computation
Steps:
1. Analytic baseline → H0, h0, A0, b0
2. Network correction → ΔH, Δh, ΔA, Δb
3. QP parameters → H = H0 + ΔH, etc.
4. Solve QP → optimal u
"""
H0, h0, A0, b0 = self.baseline(x, r)
delta_params = self.network(x, r)
H = H0 + delta_params['H']
h = h0 + delta_params['h']
A = A0 + delta_params['A']
b = b0 + delta_params['b']
u_opt = self.qp_solver.solve(H, h, A, b)
return u_opt
6. Differentiable Interior-Point Layer
Key requirement: QP solver must be differentiable for gradient flow through training
Interior-point method characteristics:
- Handles inequality constraints
- Iterative optimization with barrier function
- Backpropagation through iterations possible
Implementation:
- Use custom autograd function
- Fixed iteration count for consistent computation time
- Warm start from previous solution
Pitfalls
-
Baseline inadequacy: If analytic baseline is too far from NLP solution, network correction may be insufficient. Ensure baseline captures essential problem structure.
-
Constraint violation: Differentiable QP layer must guarantee feasibility. Interior-point methods handle this better than projected gradient.
-
Training distribution mismatch: Dataset must cover operational state-reference space. Missing regions lead to poor extrapolation.
-
Non-input-affine systems: Method assumes input-affine structure. General nonlinear systems require different approach.
-
KKT condition weighting: λ parameter for KKT loss must balance imitation vs optimality. Too high → ignores data; too low → violates constraints.
-
Real-time constraint: Must guarantee fixed computation time. Interior-point iterations must be bounded.
-
Reference prediction horizon: QP approximation assumes first control action. Long horizons require recursive approach.
Verification
- Speedup validation: Compare wall-clock time vs NLP solver. Expected orders-of-magnitude improvement.
- Tracking performance: Compare closed-loop tracking error vs full NMPC.
- Constraint satisfaction: Verify that QP solution respects constraints for ALL tested scenarios.
- Training convergence: Monitor imitation loss and KKT residual during training.
- Generalization test: Evaluate on held-out state-reference combinations.
- Hardware deployment: Test on target platform (embedded system, robot controller).
Key Applications
- Robotic manipulation: High-frequency end-effector tracking (validated on 3-link planar arm)
- Autonomous vehicles: Real-time path planning and control
- Process control: Chemical process regulation with nonlinear dynamics
- Power systems: Grid voltage/frequency regulation
- Aerospace: Flight control with aerodynamic nonlinearities
Algorithm Comparison
| Method | Computation | Constraints | Accuracy |
|---|
| Full NMPC | Slow (NLP solve) | Exact | Optimal |
| Linear MPC | Fast (QP) | Approximate | Approximate |
| Amortized NMPC | Fast (QP + net) | Exact (QP layer) | Near-optimal |
Key Innovation
Residual-corrector architecture: Instead of learning full QP parameters from scratch, network only learns corrections to analytic baseline. This:
- Reduces network size
- Improves generalization
- Preserves problem structure
- Enables faster training
Differentiable optimization layer: Guarantees constraint satisfaction by solving actual QP, not predicting solution. Differentiability enables end-to-end training with backprop through solver.
Mathematical Details
Input-affine system: dx/dt = f(x) + g(x)u
NMPC problem (horizon N):
minimize Σ_{k=0}^{N-1} [l(x_k, u_k) + l_f(x_N)]
subject to: x_{k+1} = f(x_k) + g(x_k)u_k
x_k ∈ X, u_k ∈ U
x_0 = current state
QP approximation (first step only):
minimize 0.5*u^T H(x,r) u + h(x,r)^T u
subject to: A(x) u ≤ b(x)
u_min ≤ u ≤ u_max
Network correction: ΔH, Δh, ΔA, Δb = NN(x,r)
Training loss: L = ||u_NN - u_NLP||² + λ||KKT(u_NN)||²
Experimental Validation (Paper)
Test case: 3-link planar robotic arm, Cartesian end-effector tracking
Results:
- Orders-of-magnitude speedup over NLP
- Comparable tracking performance
- Constraint satisfaction verified
- Robust to parameter variations
Computation time: ~1ms vs ~100ms for full NLP (100x speedup)
Connection to Prior Work
- Linear MPC: Fast but inaccurate for nonlinear systems
- Real-time iteration scheme: Sequential QP approximations (slower convergence)
- Explicit MPC: Offline solution enumeration (limited complexity)
- Learning-based MPC: Direct policy learning (constraint violations)
- This paper: Differentiable optimization + residual learning (fast + feasible)
Practical Deployment
- Offline training phase: Generate data, train network (hours)
- Online inference: QP solve + network forward pass (milliseconds)
- Hardware: Embedded processors, FPGA, GPU inference
- Safety: Constraint satisfaction guaranteed by QP layer
Activation: amortized MPC, real-time nonlinear control, QP approximation, differentiable optimization, interior-point solver, robotics control, constraint satisfaction, MPC acceleration, learning-based control