This paper presents Residual Koopman MPC (RK-MPC), a Koopman-based, data-driven model predictive control framework for quadruped locomotion that improves prediction fidelity while preserving real-time tractability. RK-MPC augments a nominal template model with a compact linear residual predictor learned from data in lifted coordinates, enabling systematic correction of model mismatch induced by contact variability and terrain disturbances with provable bounds on multi-step prediction error. The learned residual model is embedded within a convex quadratic-program MPC formulation, yielding a receding-horizon controller that runs onboard at 500 Hz and retains the structure and constraint-handling advantages of optimization-based control. We evaluate RK-MPC in both Gazebo simulation and Unitree Go1 hardware experiments, demonstrating reliable blind locomotion across contact disturbances, multiple gait schedules, and challenging off-road terrains including grass, gravel, snow, and ice. We further compare against Koopman/EDMD baselines using alternative observable dictionaries, including monomial and SE(3)-structured bases, and show that the residual correction improves multi-step prediction and closed-loop performance while reducing sensitivity to the choice of observables. Overall, RK-MPC provides a practical, hardware-validated pathway for data-driven predictive control of quadrupeds in unstructured environments. See https://sriram-2502.github.io/rk-mpc for implementation videos.
Figures & tables
Fig. 1: Single rigid-body (SRB) model. The floating base evolves under stance ground reaction forces fi applied at the contact points with moment arms ri , generating the net centroidal wrench that propels the robot forward.
Parameter
Value
Mass m [kg]
12.75
Inertia IB [kg m 2 ]
10−3×1600.12−160.12470−0.03−16−0.03520
TABLE I: SRB physical parameters for Unitree Go1
Fig. 2: RK-MPC locomotion stack. A hierarchical pipeline converts high-level velocity commands into joint-level torque/position commands. A state estimator provides the feedback state to the finite-state machine and the convex residual Koopman MPC, which generates optimal ground reaction forces. The resulting commands are tracked by the joint controller and executed on hardware.
Parameter
Trot
Crawl
T [s]
0.45
1.10
β
0.5
0.75
Tst [s]
0.225
0.825
Tsw [s]
0.225
0.275
Freq. [Hz]
2.22
0.91
Phase bias (LF,LH,RF,RH)
[0,0.5,0.5,0]
[0,0.25,0.5,0.75]
TABLE II: Gait and footstep parameters.
Parameter name
Symbol
Value
Swing Cartesian P gain
Kpsw
diag(400,400,400)
Swing Cartesian D gain
Kdsw
diag(10,10,10)
Joint PD gains (swing)
(kpsw,kdsw)
(3,2)
Joint PD gains (stance)
(kpst,kdst)
(0.8,0.8)
Torque saturation limit [Nm]
τmax
50
TABLE III: Torque control parameters.
Fig. 3: Residual Koopman modeling framework
Fig. 4: Dataset generation for Koopman residual learning. Left: body-velocity samples (vx,vy) with marginal histograms, colored by yaw rate ωz , illustrating excitation coverage. Middle: Gazebo simulation setup with randomized off-road terrain with per-episode friction μ . Right: representative episode time histories of base linear velocity v , angular velocity ω , vertical contact forces fz , and trot gait phase.
State
SRB
EDMD (mono)
EDMD-SE(3)
Res-Koopman
Linear velocity (m/s)
vx
0.007±0.003
4.05±1.92
0.003±0.001
0.003±0.001
vy
0.008±0.002
3.19±1.63
0.003±0.001
0.003±0.001
vz
0.016±0.003
1.22±0.55
0.009±0.002
0.007±0.002
Angular velocity (rad/s)
ωx
0.091±0.018
3.16±1.91
0.070±0.022
0.064±0.017
TABLE IV: Open-loop prediction RMSE (mean ± std).
Fig. 5: Prediction performance: Comparison of the proposed residual Koopman model (orange) against a nonlinear SRB (blue dashed), EDMD with monomials (green dashed) and EDMD with SE(3) basis (purple dashed against a test trajectory (black). (a) prediction of x−y trajectory over 100 time steps. (b–c) Per-channel RMSE box plots for linear velocities (vx,vy,vz) and angular velocities (ωx,ωy,ωz) , (d) Mean SO(3) geodesic attitude error of EDMD- SE(3) over multi-step rollout horizon, (e) Overall residual Koopman RMSE versus the number of training samples used and (f) Overall RMSE error against monomial degree sweep for the residual Koopman model.
Fig. 6: MPC tracking performance (sim): Comparison of the proposed RK-MPC framework (orange) against a nonlinear SRB-MPC (blue) and SE3-KMPC (purple) on a circular tracking task over 10 laps. (a)–(b) Executed base x – y trajectory of the SRB-MPC and the RK-MPC respectively. (c)–(d) Phase portraits for attitude stability where SE3-KMPC exhibits a failure mode with excursions away from the near-origin region. (e)–(f) Per-axis tracking RMSE distributions for linear velocities and angular rates across 10 laps of the circle. (g) MPC solve-time distributions (ms) for each controller. (h) Closed-loop SO(3) drift of the SE3-KMPC internal rotation state. (i)–(k) Tracking performance of RK-MPC for (vx,vy,ωz) , showing close agreement with the commanded signals. (l) Cross-track error for RKMPC and SRB-MPC over time.
Metric
SRB-MPC
SE3-KMPC
RK-MPC
Linear velocity RMSE (m/s)
vx
0.0229±0.0201
0.0686±0.0949
0.0232±0.0201
vy
0.0196±0.0167
0.0877±0.1237
0.0195±0.0165
vz
0.0172±0.0126
0.1374±0.2109
0.0177±0.0129
Angular-rate RMSE (rad/s)
ωx
0.0910±0.0695
1.0646±2.1215
0.0925±0.0713
TABLE V: Closed-loop tracking RMSE and MPC solve-time statistics on a 10-lap circular task in simulation.
Fig. 7: Experiment 1: Velocity tracking on flat ground. (a) Executed base x – y trajectory during randomized planar commands (start/end annotated). (b) Executed base x – y trajectory during smooth loop commands (start/end annotated). (c) Randomized segment: commanded (black dashed) and measured (solid) (vx,vy,ωz) . (d) Loop segment: commanded (black dashed) and measured (solid) (vx,vy,ωz) .
Fig. 8: Experiment 2: Debris traversal and push recovery. (a) Representative snapshots of blind locomotion over a debris field. (b)–(c) Attitude phase portraits comparing debris (orange) and flat ground (blue): roll versus ωx and pitch versus ωy . (d) External push trial with recovery during steady walking. (e) Measured planar velocities (vx,vy) during the push sequence (push instants annotated). (f) Measured base angles (roll, pitch) during the push sequence (push instants annotated).
Fig. 9: Experiment 3: Gait generalization. RK-MPC trained on trot data is executed on hardware under both trot and crawl gait schedules. representative snapshots (a-b). and measured per-foot ground reaction forces fx , fy , and fz for trot (c) and crawl (d). Bottom: corresponding gait phase/contact schedule for each leg (FR, FL, RR, RL), showing consistency between stance phases and force generation.
Fig. 10: Experiment 4: Off-road generalization. (a)–(d) Representative snapshots of blind locomotion on grass, gravel, ice, and snow. (e)–(f) Attitude phase portraits (roll versus ωx and pitch versus ωy ) across terrains. (g) Ice: measured vertical ground-reaction forces fz approaching the stance limit during slip onset. (h) Snow: commanded (dashed) and measured (solid) planar velocities (vx,vy) during a turning trial. (i)–(j) Grass and gravel: commanded (dashed) and measured (solid) (vx,vy) time histories. (k) Ice contact schedule for the shown segment. (l) Snow: commanded (dashed) and measured (solid) yaw rate ωz .
This paper presents dynamics-relaxed model predictive control (DR-MPC), a novel MPC formulation for legged locomotion, and a tailored interior-point method (IPM) solver. The formulation combines online optimization feasibility by construction with a contact-aware input parameterization. DR-MPC moves the dynamics equality and affine input constraints into quadratic penalties and retains only nonempty box constraints. The resulting box-constrained quadratic program (QP) has a block-arrow Hessian that enables the state and affine-output directions to be eliminated through a Schur complement. The solver factors only the reduced control system after swing-force elimination and contact-aligned move blocking. For the evaluated implementations using the same DR-MPC formulation, our method achieves median end-to-end MPC speedups of 16.0× over HPIPM and 4.4× over OSQP, with comparable locomotion performance in simulation. DR-MPC achieves a median onboard MPC end-to-end time of 4.4 ms and is validated on a Unitree Go1 quadruped. Open-source code will be made available after publication.
Run Wang, Alapati Tuerxun, Shuo Liu +4
Department of Automation, Tsinghua University, Beijing, China · Department of Mechanical Engineering, Boston University, Brookline, MA, USA · School of Electrical and Electronic Engineering, Nanyang Technological University, Singapore +1
This paper presents a multi-phase whole-body model predictive control (MPC) approach for bipedal walking, combining a detailed whole-body model in the near horizon with a simplified single-rigid-body model in the later prediction steps. This reduces computational complexity while retaining prediction capabilities. The resulting nonlinear optimal control problem is solved entirely within the general-purpose, off-the-shelf nonlinear MPC framework acados, using sequential quadratic programming (SQP). Given a contact schedule and a target walking speed, the controller optimizes joint torques without depending on preselected footstep locations. The controller is validated in MuJoCo simulation on the 18-DoF bipedal robot HyPer-2.
Franek Stark, Felix Wiebe, Shubham Vyas +2
Robotics Innovation Center at the German Research Center for Artificial Intelligence (DFKI), Bremen, Germany · University Bremen, Germany
We present RACER, a hierarchical control framework for wheel-based quadruped racing that combines an MPPI planner with a learned residual dynamics model and a low-level RL velocity tracker. The planner augments a nominal unicycle kinematic model with a neural residual term to capture the closed-loop tracking behavior of the RL policy. To train this residual model under limited real-world data, we propose Low-Rank Residual Adaptation (LoRRA), a two-stage approach that pre-trains on large-scale simulation data for broad coverage and then fine-tunes on a small real-world dataset with a low-rank constraint. In simulation, we empirically validate our engineering choices by showing (A) Residual dynamics improve the overall performance of our pipeline by capturing the tracking error of RL velocity tracker at high-speed cornering. (B) Residual dynamics trained with both source-domain and target-domain data gives racing performance significantly better than the residual dynamics trained with only target-domain data. (C) Low-rank constraint at target-domain adaptation gives higher success rates and higher performance than full-tune and from-scratch when domain gap in ground coefficient or joint gain increases.
Yuxiang Liu, Marla Eisman, Lizhi Yang +2
University of California, Berkeley, CA, USA. · California Institute of Technology, Pasadena, CA, USA.