# Primal-Dual iLQR for GPU-Accelerated Learning and Control in Legged Robots

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

## Key facts

- Cited by 8 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 9 Jun 2025.

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

- [Differentiable Model Predictive Control on the GPU](https://mlsanity.com/paper/2510.06179/) (2025)
- [Safe Large-Scale Robust Nonlinear MPC in Milliseconds via Reachability-Constrained System Level Synthesis on the GPU](https://mlsanity.com/paper/2604.07644/) (2026)
- [TurboMPC: Fast, Scalable, and Differentiable Model Predictive Control on the GPU](https://mlsanity.com/paper/2606.24039/) (2026)
- [MPC-Injection: Biasing Off-Policy Locomotion RL Toward Controller-Induced Behavior Basins](https://mlsanity.com/paper/2606.26392/) (2026)
- [CA-AC-MPC: CUDA-Accelerated Actor-Critic Model Predictive Control](https://mlsanity.com/paper/2605.29155/) (2026)
- [Stable Transformer-Actor-Critic Model Predictive Control: A Contraction Analysis Approach](https://mlsanity.com/paper/2606.20197/) (2026)
- [Amortising Trajectory Optimisation for Residual MPC via Implicit Contact Differentiation](https://mlsanity.com/paper/2607.24959/) (2026)
- [Guided Riemannian Optimization (GuRO): Bridging Model Predictive Control and Decision Transformers](https://mlsanity.com/paper/2608.23204/) (2026)

## Abstract (arXiv)

This paper introduces a novel Model Predictive Control (MPC) implementation for legged robot locomotion that leverages GPU parallelization. Our approach enables both temporal and state-space parallelization by incorporating a parallel associative scan to solve the primal-dual Karush-Kuhn-Tucker (KKT) system. In this way, the optimal control problem is solved in O(log2(n)logN + log2(m)) complexity, instead of O(N(n + m)3), where n, m, and N are the dimension of the system state, control vector, and the length of the prediction horizon. We demonstrate the advantages of this implementation over two state-of-the-art solvers (acados and crocoddyl), achieving up to a 60% improvement in runtime for Whole Body Dynamics (WB)-MPC and a 700% improvement for Single Rigid Body Dynamics (SRBD)-MPC when varying the prediction horizon length. The presented formulation scales efficiently with the problem state dimensions as well, enabling the definition of a centralized controller for up to 16 legged robots that can be computed in less than 25 ms. Furthermore, thanks to the JAX implementation, the solver supports large-scale parallelization across multiple environments, allowing the possibility of performing learning with the MPC in the loop directly in GPU. The code associated with this work can be found at https://github.com/iit-DLSLab/mpx.
