Introduction
Model Predictive Control (MPC) is widely considered the "gold standard" for controlling systems with hard safety constraints, such as ensuring a robot avoids collisions. Recently, researchers have integrated MPC as a "differentiable layer" within neural networks to perform Imitation Learning—learning a control policy by observing an expert.
However, standard differentiable MPC suffers from two major flaws:
- Stability: To guarantee long-term system stability, an "infinite-horizon" cost is required, typically calculated via the Discrete-time Algebraic Riccati Equation (DARE). Until now, there was no clean way to differentiate through this equation during training.
- Feasibility: During the early stages of learning, a model's parameters are often inaccurate. This can make the MPC optimization problem impossible to solve (infeasible), which crashes the training loop.
This paper introduces a framework for Infinite-Horizon Differentiable Model Predictive Control, allowing researchers to bake long-term stability and safety constraints directly into gradient-based learning. By deriving the analytical derivative of the DARE, the authors enable a controller to learn system dynamics or cost functions from expert demonstrations while guaranteeing that the resulting policy remains stable and feasible.
Methods
The authors propose three key technical innovations to solve the stability and feasibility issues:
- Differentiating the DARE: The core contribution is an analytical derivative for the solution of the Discrete-time Algebraic Riccati Equation. This allows the "infinite-horizon" terminal cost to be part of the backpropagation chain.
- Pre-stabilized MPC: Instead of solving for the raw control input, the controller solves for a perturbation around a stabilizing baseline. This ensures the optimization problem remains well-conditioned even if the system being learned is naturally unstable.
- Augmented Lagrangian Constraints: The framework uses a penalty-based method for constraints. This ensures that the MPC problem is always feasible during training (eliminating "solver failed" errors), while still enforcing "hard" constraints once the model converges.
The training follows a standard loop: the Forward Pass solves the DARE and the MPC quadratic program (QP); the Backward Pass computes gradients through the QP and the DARE to update the model parameters (like the $A$ and $B$ dynamics matrices or $Q$ and $R$ cost matrices).
Datasets
The paper uses two simulated benchmarks to evaluate the framework:
- Mass-Spring-Damper Systems: A set of seven second-order systems ranging from highly stable to unstable. This was used to test if the agent could learn the underlying physics ($A$ matrix) of the system.
- Vehicle Platooning: A high-dimensional model of 10 vehicles following each other. The goal here was to learn the cost function ($Q$ and $R$ matrices) that an expert uses to maintain safe distances while minimizing effort.
Key Insights and Ideas
- The "Infinite" Advantage: By including the DARE in the loop, the learner understands that its current actions affect the system's stability indefinitely, not just for the next few steps. This allows the MPC to use much shorter prediction horizons ($N$) while still achieving optimal performance.
- Learning Unstable Systems: Most differentiable MPC methods struggle with unstable systems because the gradients explode. The "pre-stabilization" trick (using the LQR gain from the DARE) tames these gradients, making it possible to learn controllers for systems that would otherwise fail catastrophically during the first epoch.
- Safety as a Priority: Unlike pure neural network policies, this framework provides intrinsic robustness guarantees. If the model error is small, the controller is mathematically proven to be Input-to-State Stable (ISS).
Key Results
- Dynamics Learning: In the mass-spring-damper tests, the model successfully recovered the true physics of both stable and unstable systems. Interestingly, longer prediction horizons led to faster and more reliable convergence across the different systems.
- Constraint Satisfaction: In the vehicle platooning task, the learned controller successfully maintained the "safe separation distance" constraint across all vehicles, even when the learned cost matrices hadn't perfectly converged to the expert's exact values.
- Efficiency: Because the infinite-horizon cost is captured in the terminal cost, the authors showed that a very short horizon (e.g., $N=6$) could replicate the behavior of an expert using a much longer horizon.
Limitations and Future Work
- LTI Only: The current mathematics are strictly limited to Linear Time-Invariant (LTI) systems. Extending this to non-linear systems is non-trivial because the infinite-horizon cost (the Value Function) is much harder to compute and differentiate.
- Computational Scaling: The derivative of the DARE involves Kronecker products, resulting in $n^2 \times n^2$ matrices (where $n$ is the state dimension). This does not scale well to massive systems (e.g., thousands of states), though it remains highly practical for most robotics applications.
- Existence of Solution: The algorithm assumes a stabilizing solution to the DARE exists. If the system is not "stabilizable," the math breaks down. The authors suggest using a one-step-ahead prediction error in the loss function to help guide the model toward stabilizable regions of the parameter space during early training.
Summary updated