TL;DR
Controlling complex robots in real time usually means choosing between rich, accurate dynamics models and fast, lightweight solvers. $\mu$MPC breaks this tradeoff by lifting nonlinear dynamics into a linear latent space and "precompiling" the heavy math offline, shrinking online control down to microsecond-scale matrix-vector multiplications. Whether it is running onboard a tiny drone microcontroller or planning from pixels with a 16-million-parameter world model, $\mu$MPC makes optimal control up to $108\times$—and visual planning up to $1907\times$—faster than existing methods.
What Problem Does This Paper Address?
Model Predictive Control (MPC) is the gold standard for robot control: at every millisecond, the robot simulates future actions over a horizon, checks constraints (like "don't hit that wall" or "don't exceed motor torque"), and picks the best action sequence.
The catch? Real-world physics—and especially learned visual "world models"—are deeply nonlinear and high-dimensional. Solving nonlinear MPC online requires repeatedly linearizing dynamics and refactorizing massive matrices from scratch at every control step. That is brutally slow on a desktop GPU and flat-out impossible on a resource-starved drone microcontroller.
Prior work used Koopman operator theory—a mathematical trick that encodes nonlinear states into a higher-dimensional "lifted" space where dynamics behave linearly. However, handling nonlinear obstacles still forced expensive online matrix refactorizations. Furthermore, models trained solely to predict future states often fail when placed inside a closed-loop controller, because tiny prediction errors compound in directions that matter for control, and the controller inevitably drives the system into unfamiliar states.
Methods
$\mu$MPC tackles both the online speed bottleneck and the offline learning mismatch in four clever stages:
- Koopman Lifting: A neural network encodes physical states (or camera images) into a high-dimensional latent space where time-stepping is globally linear ($z_{k+1} = Az_k + Bu_k$), paired with an affine decoder back to task outputs.
- Action-Only Precompilation (KC-QP): Because the latent dynamics are linear, the entire future state trajectory is purely an affine function of the initial latent state and the control actions. The authors analytically eliminate all future state variables offline. This yields a Koopman-Compiled Quadratic Program (KC-QP) whose decision size depends only on the horizon length and number of actuators ($Hn_u$), completely independent of whether the latent space has 32 dimensions or 4,096!
- Fixed-Operator Primal-Dual Solver: To handle changing goals and relinearized obstacle constraints online, $\mu$MPC uses a custom primal-dual solver. Crucially, the matrix that needs to be inverted (the regularized primal Hessian) depends only on the fixed dynamics and cost weights—never on the constraints or goals. $\mu$MPC precomputes this inverse offline, turning online constrained optimization into blazing-fast matrix-vector products and simple projections.
- Control-Aware Training (DiffQP + DAgger): Because KC-QPs are tiny and parallelizable, the authors place an unconstrained tracking QP directly inside the neural network training loop (DiffQP), differentiating through it so the dynamics learn to output the right controls, not just pretty state predictions. They pair this with batched DAgger (executing the learned controller in simulation and adding visited states to the replay buffer) to squash distribution shift.
Datasets
Rather than relying on static external datasets, the authors generate expert trajectory demonstrations and on-policy simulation rollouts across a diverse suite of robotic benchmarks and hardware platforms:
- Simulated & Analytical Benchmarks: Dubins car, 2D and 3D quadcopters (up to 200 agents), a 61-state Unitree Go2 quadruped (distilling a PPO locomotion policy for gait references), and pixel-based Reacher and Bi-Manual Rope Manipulation environments. Notably, for visual tasks, they evaluate on random workspace start–goal pairs rather than the easier 25-step same-trajectory goal sampling used by prior world models.
- Real-World Hardware: A Crazyflie nano-quadcopter (168 MHz Cortex-M4F MCU), seven differential-drive robots on the Robotarium, and a Kuka iiwa robot arm performing visual cube manipulation.
Key Insights and Ideas
- Decoupling model capacity from solver latency: Once compiled into a KC-QP, scaling a world model to 4,096 latent dimensions (~16M parameters) doesn't add a single extra decision variable to the online optimizer. You get massive representation power at linear-MPC speeds.
- Accurate state prediction $\neq$ good control: In ablations on a 3D quadcopter, a standard prediction-trained Koopman model achieved a dismal 3.7% goal-reaching success rate. Adding DiffQP boosted success to 97.7% by making the control-to-state matrix numerically well-conditioned—meaning the model learned clean, non-degenerate control authority (like lifting a cube vertically on the real Kuka arm, where standard training stayed stuck on the table).
- CPU beats GPU on small problems; GPU shines at swarm scale: Because a single condensed KC-QP is so compact, GPU kernel launch overhead actually makes single-robot solves slower on a GPU than on a CPU. Flip the script to 200 collision-avoiding drones solved in a single batch, however, and GPU parallelism shines.
Key Results
- Microsecond Desktop Solves: Achieves median CPU solve times as low as $23\text{ }\mu\text{s}$ (2D quadcopter / unconstrained 3D quadcopter) and $58\text{–}128\text{ }\mu\text{s}$ for control-constrained 3D quadcopters—up to $108\times$ faster than GPU-ADMM SQP and $19\times$ faster than OSQP running on the exact same condensed problem.
- Tiny Microcontroller Deployment: Runs long-horizon ($H=75$) nonlinear Koopman MPC directly onboard a Crazyflie MCU in ~24 ms using under 9 kB of runtime RAM.
- 4096D Whole-Body Legged Control: Controls a Unitree Go2 quadruped in 4.47 ms ($H=25$) on desktop and 24–38 ms on a Jetson Orin Nano, filtering out unsafe obstacle collisions in real time.
- Sub-Millisecond Visual World Models: Plans directly from pixels using 2048D linear world models in 0.43 ms (Reacher) and 0.73 ms (Bi-Manual Rope)—up to $1907\times$ faster than LeWorldModel (~820 ms), while jumping rope-manipulation success from 24% (LeWM) and 46% (Fast-LeWM) to 94%.
- Swarm Scalability: Plans collision-aware trajectories for 200 quadrotors simultaneously in 32.1 ms (>30 Hz) on a single GPU with 98.4% goal completion, and runs 7 real Robotarium cars in 18.2 ms using pure NumPy on a CPU.
Limitations and Future Work
- Empirical Tuning: Network sizes, lifted dimensions, and training horizons were chosen via trial and error; establishing principled scaling laws is left for future work.
- Unconstrained Training Loop: DiffQP currently supervises control using an unconstrained tracking QP. Teaching the model about hard constraints during training could help the solver converge in even fewer iterations online.
- Residual Collisions Under Strict Budgets: Under tight real-time iteration caps (e.g., 200 dense quadrotors), the solver trades exact convergence for speed, leaving a 2.58% collision rate.
- Empirical Safety Margins: The safety buffers used to tighten obstacle constraints against model errors were tuned by hand rather than formally calibrated with probabilistic guarantees (such as conformal prediction).
Summary updated