# Differentiable Nonlinear Model Predictive Control

arXiv: https://arxiv.org/abs/2505.01353 · HTML: https://mlsanity.com/paper/2505.01353/

## Key facts

- Cited by 6 papers in the map (data through 14 Oct 2026).
- Builds on 32 of its 90 references that are in the map.
- First posted on arXiv 2 May 2025.

## Builds on (most cited first, 30 of 32)

- [OptNet: Differentiable Optimization as a Layer in Neural Networks](https://mlsanity.com/paper/1703.00443/) (2017)
- [Differentiable Convex Optimization Layers](https://mlsanity.com/paper/1910.12430/) (2019)
- [Meta-Learning with Differentiable Convex Optimization](https://mlsanity.com/paper/1904.03758/) (2019)
- [Differentiable MPC for End-to-end Planning and Control](https://mlsanity.com/paper/1810.13400/) (2018)
- [OSQP: An Operator Splitting Solver for Quadratic Programs](https://mlsanity.com/paper/1711.08013/) (2017)
- [Stochastic subgradient method converges on tame functions](https://mlsanity.com/paper/1804.07795/) (2018)
- [Interior Point Solving for LP-based prediction+optimisation](https://mlsanity.com/paper/2010.13943/) (2020)
- [Data-driven Economic NMPC using Reinforcement Learning](https://mlsanity.com/paper/1904.04152/) (2019)
- [acados: a modular open-source framework for fast embedded optimal control](https://mlsanity.com/paper/1910.13753/) (2019)
- [Theseus: A Library for Differentiable Nonlinear Optimization](https://mlsanity.com/paper/2207.09442/) (2022)
- [Pontryagin Differentiable Programming: An End-to-End Learning and Control Framework](https://mlsanity.com/paper/1912.12970/) (2019)
- [Clarabel: An interior-point solver for conic programs with quadratic objectives](https://mlsanity.com/paper/2405.12762/) (2024)
- [Nonsmooth Implicit Differentiation for Machine Learning and Optimization](https://mlsanity.com/paper/2106.04350/) (2021)
- [Synthesis of Model Predictive Control and Reinforcement Learning: Survey and Classification](https://mlsanity.com/paper/2502.02133/) (2025)
- [HPIPM: a high-performance quadratic programming framework for model predictive control](https://mlsanity.com/paper/2003.02547/) (2020)
- [Learning for MPC with Stability & Safety Guarantees](https://mlsanity.com/paper/2012.07369/) (2020)
- [Reinforcement Learning-based Model Predictive Control for Greenhouse Climate Control](https://mlsanity.com/paper/2409.12789/) (2024)
- [MPC-based Reinforcement Learning for Economic Problems with Application to Battery Storage](https://mlsanity.com/paper/2104.02411/) (2021)
- [AC4MPC: Actor-Critic Reinforcement Learning for Nonlinear Model Predictive Control](https://mlsanity.com/paper/2406.03995/) (2024)
- [FATROP : A Fast Constrained Optimal Control Problem Solver for Robot Trajectory Optimization and Control](https://mlsanity.com/paper/2303.16746/) (2023)
- [Imitation Learning from Nonlinear MPC via the Exact Q-Loss and its Gauss-Newton Approximation](https://mlsanity.com/paper/2304.01782/) (2023)
- [A Dual Active-Set Solver for Embedded Quadratic Programming Using Recursive LDL' Updates](https://mlsanity.com/paper/2103.16236/) (2021)
- [Fast integrators with sensitivity propagation for use in CasADi](https://mlsanity.com/paper/2211.01982/) (2022)
- [Embedded Code Generation with CVXPY](https://mlsanity.com/paper/2203.11419/) (2022)
- [Equivalence of Optimality Criteria for Markov Decision Process and Model Predictive Control](https://mlsanity.com/paper/2210.04302/) (2022)
- [BP-MPC: Optimizing the Closed-Loop Performance of MPC using BackPropagation](https://mlsanity.com/paper/2312.15521/) (2023)
- [Code generation for solving and differentiating through convex optimization problems](https://mlsanity.com/paper/2504.14099/) (2025)
- [Controlling the level of sparsity in MPC](https://mlsanity.com/paper/1401.1369/) (2014)
- [MPC4RL -- A Software Package for Reinforcement Learning based on Model Predictive Control](https://mlsanity.com/paper/2501.15897/) (2025)
- [Gauss-Newton Runge-Kutta Integration for Efficient Discretization of Optimal Control Problems with Long Horizons and Least-Squares Costs](https://mlsanity.com/paper/2310.20390/) (2023)

## Built on by (most cited first, 6 of 6)

- [Differentiable Model Predictive Control on the GPU](https://mlsanity.com/paper/2510.06179/) (2025)
- [Safe Reinforcement Learning using Action Projection: Safeguard the Policy or the Environment?](https://mlsanity.com/paper/2509.12833/) (2025)
- [TurboMPC: Fast, Scalable, and Differentiable Model Predictive Control on the GPU](https://mlsanity.com/paper/2606.24039/) (2026)
- [Accelerating Reinforcement Learning via MPC Solver-Gradient Guidance for Weights-varying MPC](https://mlsanity.com/paper/2609.01061/) (2026)
- [lapanda: A Matrix-Free Differentiable Solver for Nonconvex Constrained Optimization Layers](https://mlsanity.com/paper/2609.33630/) (2026)
- [Scalable Identification of Physics-Based and Neural Dynamics from Partial Measurements](https://mlsanity.com/paper/2610.16559/) (2026)

## Abstract (arXiv)

The efficient computation of parametric solution sensitivities is a key challenge in the integration of learning-enhanced methods with nonlinear model predictive control (MPC), as their availability is crucial for many learning algorithms. This paper discusses the computation of solution sensitivities of general nonlinear programs (NLPs) using the implicit function theorem (IFT) and smoothed optimality conditions treated in interior-point methods (IPM). We detail sensitivity computation within a sequential quadratic programming (SQP) method which employs an IPM for the quadratic subproblems. Previous works presented in the machine learning community are limited to convex or unconstrained formulations, or lack an implementation for efficient sensitivity evaluation. The publication is accompanied by an efficient open-source implementation within the acados framework, providing both forward and adjoint sensitivities for general optimal control problems, achieving speedups exceeding 3x over the state-of-the-art solvers mpc.pytorch and cvxpygen.
