---
title: Residual Koopman MPC
url: https://www.emergentmind.com/topics/residual-koopman-model-predictive-control-rkmpc
type: topic
---

# Residual Koopman MPC

Searching arXiv for Residual Koopman MPC and closely related Koopman MPC variants to ground the article in the cited literature.
Residual Koopman Model Predictive Control (RKMPC) denotes a family of data-driven predictive-control formulations in which Koopman-based lifted linear models are used to represent residual dynamics, residual prediction error, or residual control corrections inside a receding-horizon controller. In the literature, closely related labels include robust tube-based Koopman MPC or r-KMPC, RK-MPC, and RKMPC. Across these variants, the common objective is to improve prediction fidelity while preserving linear MPC or convex optimization structure, or to recover formal robustness and stability guarantees that are not automatic for finite-dimensional Koopman approximations [2108.13011], [2604.04221], [2504.15805], [2507.18396], [2605.16754]. This suggests that RKMPC is best understood as a methodological family rather than a single canonical construction.

## 1. Conceptual development and scope

The 2021 robust tube-based formulation introduced r-KMPC for nonlinear discrete-time dynamical systems with additive disturbances and explicitly identified robustness of the closed-loop Koopman MPC under modeling approximation errors and possible exogenous disturbances as a crucial issue to be resolved. Its controller is composed of a nominal MPC using a lifted Koopman model and an off-line nonlinear feedback policy, and the approach does not assume the convergence of the approximated Koopman operator, which allows using a Koopman model with a limited order for controller design [2108.13011].

Subsequent work broadened the meaning of “residual” within Koopman MPC. One direction treats the residual as a learned correction to a nominal mechanistic predictor. In quadruped locomotion, 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 [2604.04221]. In vehicle trajectory tracking, RKMPC uses two linear MPC architecture to calculate control inputs: a Linear Model Predictive Control computes the baseline control input based on the vehicle kinematic model, and a neural network-based RKMPC calculates the compensation input [2507.18396].

A second direction treats residuals as online decision variables or online learned unknown dynamics. The adaptive Koopman-MPC methodology develops a convex MPC formulation in which residual terms are incorporated directly in the lifted dynamics and regulated by quadratic penalties, while model parameters are adapted online through soft update of target networks [2412.02972]. The no-regret formulation studies simultaneous system identification and model predictive control for nonlinear systems with unknown residual dynamics that can be expressed by Koopman operators and proves sublinear dynamic regret [2504.15805].

A third direction integrates residual dynamics into certified latent models. Stable Fiber-Koopman Residual Dynamics constructs an environment-conditioned Koopman operator for the dominant linear evolution and a contraction-constrained residual neural network for unmodeled nonlinear effects, then embeds the predictor in a sampling-based MPPI controller with an explicit input-to-state stability certificate [2605.16754].

## 2. Residual quantities and lifted models

The literature places the residual at different levels of the prediction stack: as aggregated disturbance in lifted coordinates, as one-step nominal-model error, as unknown additive dynamics, as a compensation control channel, or as a latent nonlinear correction. The following table organizes the principal formulations.

| Formulation | Residual quantity | Lifted or corrected model |
|---|---|---|
| r-KMPC [2108.13011] | Approximation error, disturbance, and reconstruction residual | $z_{k+1}=A z_k+B u_k+w_k,\; x_k=C z_k+v_k$ |
| RK-MPC for quadrupeds [2604.04221] | One-step nominal error, in practice centroidal twist error | $z_{k+1}=A^{res} z_k+B^{res}u_k,\; \hat e_k=C^{res} z_k$ |
| Adaptive Koopman MPC [2412.02972] | Embedded-space residual $r_k$ | $\phi_{k+i+1}=K\phi_{k+i}+B u_{k+i}+r_{k+i}$ |
| No-regret RKMPC [2504.15805] | Unknown residual dynamics $w_t$ | $z_{t+1}=A_* z_t+B_* u_t+\epsilon_t$ |
| Vehicle RKMPC [2507.18396] | Residual control $\Delta U:=U_r-U_p$ | $z_{t+1}=A z_t+B\Delta u_t,\; x_t=C z_t$ |
| SFKD [2605.16754] | Residual neural correction $r_\theta$ | $\hat z_{k+1}=A(e_k)\hat z_k+B(e_k)u_k+r_\theta(\hat z_k,u_k,e_k)$ |

In the robust tube-based setting, the starting point is a nonlinear, discrete-time system with additive disturbance,
$$
x_{k+1}=f(x_k,u_k)+w_k^o,\quad w_k^o\in\mathcal W_o,
$$
together with a lifting map $\Phi:\mathcal X\to\mathbb R^q$ and lifted state $z_k=\Phi(x_k)$. After identifying $(A,B)$, the perturbed linear predictor is
$$
z_{k+1}=A z_k+B u_k+w_k,\qquad x_k=C z_k+v_k,
$$
where $w_k$ collects all approximation errors: the truncation of the true infinite-dimensional Koopman operator, the unknown disturbance $w_k^o$, and any model-reconstruction residual [2108.13011].

In quadruped locomotion, the nominal reduced-order physics template is a linearized single-rigid-body predictor
$$
x_{k+1}^{nom}=A_k^{nom}x_k+B_k^{nom}u_k,
$$
and the residual is the one-step nominal error
$$
e_k=x_k-x_k^{nom}.
$$
In practice RK-MPC corrects only the centroidal twist, so
$$
e_k=[\Delta v_k^\top,\Delta\omega_k^\top]^\top\in\mathbb R^6.
$$
With a lifted residual state $z_k=\psi(e_k)$, the learned residual dynamics are
$$
z_{k+1}=A^{res}z_k+B^{res}u_k,\qquad \hat e_k=C^{res}z_k,
$$
and the combined predictor becomes
$$
\hat y_{k+1}=A^{nom}x_k+B^{nom}u_k+C^{res}(A^{res}z_k+B^{res}u_k)
$$
[2604.04221].

In the adaptive Koopman-operator formulation, the embedding model is
$$
\phi(x_{k+1})\approx K\phi(x_k)+Bu_k,\qquad x_{k+1}\approx C\phi(x_{k+1}),
$$
and the true residual in embedded space is
$$
r_k:=\phi(x_{k+1})-\bigl(K\phi(x_k)+Bu_k\bigr).
$$
Over a horizon $N$, the one-step dynamics with residual correction are written as
$$
\phi_{k+i+1}=K\phi_{k+i}+Bu_{k+i}+r_{k+i}
$$
[2412.02972].

The no-regret formulation begins from
$$
x_{t+1}=f(x_t)+g(x_t)u_t+w_t,
$$
defines the nominal step $x_{t+1}^0=f(x_t)+g(x_t)u_t$, and treats
$$
w_t=x_{t+1}-x_{t+1}^0
$$
as unknown residual dynamics. With observables $\Phi$ and $\Psi$, the lifted residual evolves approximately as
$$
z_{t+1}=A_* z_t+B_* u_t+\epsilon_t
$$
[2504.15805].

In the vehicle-tracking formulation, the residual is not the state prediction error but the control compensation,
$$
\Delta U:=U_r-U_p,
$$
where $U_p$ is the LMPC’s predicted input and $U_r$ the “true” input needed on-track. The lifted state is generated by a DNN,
$$
z_t=\psi(x_t)=[x_t,\;y_t,\;\theta_t,\;z_{1,t},\dots,z_{n,t}]^\top,
$$
and the Koopman linear residual system is
$$
z_{t+1}=A z_t+B\Delta u_t,\qquad x_t=C z_t
$$
[2507.18396].

In SFKD, the residual is a contraction-constrained neural network added to an environment-conditioned Koopman backbone:
$$
\hat z_{k+1}=A(e_k)\hat z_k+B(e_k)u_k+r_\theta(\hat z_k,u_k,e_k).
$$
Here the encoder maps $(x,e)$ onto a fiber bundle latent manifold, and different environments occupy disjoint or smoothly separated submanifolds in the latent space [2605.16754].

## 3. MPC embeddings and computational structure

A central feature of RKMPC is that the residual model is inserted into a receding-horizon optimization without discarding the computational advantages of linear or convex predictive control. In the robust tube-based formulation, ignoring $w_k$ and $v_k$ yields the nominal lifted model
$$
\hat z_{i+1}=A\hat z_i+B\hat u_i,\qquad \hat x_i=C\hat z_i,
$$
and the nominal MPC solves
$$
\min_{\{\hat u_i\}_{i=0}^{N-1},\,\hat z_0}
\sum_{i=0}^{N-1}\bigl(\|\hat z_i\|_Q^2+\|\hat u_i\|_R^2\bigr)+\|\hat z_N\|_P^2
$$
subject to dynamics, tightened constraints, and a terminal set. The actual control law is
$$
u_k=\hat u_k+K e_k,\qquad e_k=z_k-\hat z_k,
$$
so the online problem remains a nominal MPC, while residual robustness is handled by the tube and offline feedback [2108.13011].

In quadruped locomotion, the finite-horizon controller is a convex Quadratic Program. The optimization minimizes a quadratic tracking-and-effort objective over the horizon subject to affine dynamics,
$$
x_{k+i+1}=A^{nom}x_{k+i}+B^{nom}u_{k+i}+C^{res}[A^{res}z_{k+i}+B^{res}u_{k+i}],
$$
with
$$
z_{k+i}=\psi(e_{k+i}),\qquad e_{k+i}=[v_{k+i}-v_{k+i}^{nom};\omega_{k+i}-\omega_{k+i}^{nom}],
$$
and inequality constraints
$$
A_{ineq}(\sigma_{k+i})u_{k+i}\le b_{ineq}(\sigma_{k+i}).
$$
Because all dynamics and constraints are affine in the decision variables, this is a convex Quadratic Program. The inequality constraints select only the contact forces of feet in stance and enforce a linearized friction pyramid plus unilaterality [2604.04221].

The adaptive Koopman-MPC formulation makes the residual itself a decision variable. The stacked lifted-state constraints are
$$
\Phi_0=\phi(x_k),\qquad \Phi_{i+1}=K\Phi_i+B u_i+r_i,
$$
and the quadratic cost is
$$
J=\sum_{i=0}^{N-1}\bigl[\Phi_i^\top Q\Phi_i+u_i^\top R u_i\bigr]+\lambda\sum_{i=0}^{N-1}\|r_i\|^2.
$$
Input bounds, state constraints via $C\Phi_i\in\mathcal X$, and optional residual bounds $\|r_i\|\le r_{max}$ preserve convexity, so the optimization is a convex QP in $(u,r)$ [2412.02972].

The no-regret setting also uses finite-horizon receding-horizon MPC, but the residual dynamics are predicted by the currently learned Koopman model of the unknown disturbance. At each time $t$, the controller solves
$$
\min_{u_{t:t+N-1}}\sum_{k=0}^{N-1}\ell(x_{t+k},u_{t+k})
$$
subject to
$$
x_{t+k+1}=f(x_{t+k})+g(x_{t+k})u_{t+k}+\hat w_{t+k|t},
$$
then applies $u_t=u^*_{t|t}$, observes the next state, computes the realized residual, and updates the Koopman estimate [2504.15805].

Vehicle RKMPC uses a dual-LMPC architecture. The baseline LMPC computes
$$
U_b=\{v_{b,k},\delta_{b,k}\}_{k=0}^{N-1}
$$
from a linearized kinematic bicycle model, while the residual Koopman MPC computes
$$
\Delta U=\{\Delta v_k,\Delta\delta_k\}
$$
subject to lifted residual dynamics. The total control is
$$
u=u_b+\Delta u.
$$
The paper describes this as a design that preserves the reliability and interpretability of traditional mechanistic model while achieving performance optimization through residual modeling [2507.18396].

SFKD departs from the QP paradigm and embeds the residual Koopman predictor in a sampling-based MPPI controller. For each rollout, the latent state is propagated via the SFKD one-step map, decoded, and evaluated under a path-integral cost. This is still an RKMPC construction in the sense that the predictive model consists of an environment-conditioned Koopman linear part plus a residual correction, but the control optimizer is sampling-based rather than quadratic-program based [2605.16754].

## 4. Robustness, convergence, regret, and stability guarantees

The strongest formal robustness results in the cited literature appear in the tube-based r-KMPC formulation. With
$$
u_k=\hat u_k+K e_k,\qquad F=A+BK,
$$
the error dynamics are
$$
e_{k+1}=F e_k+w_k,\qquad w_k\in\mathcal W.
$$
Choosing a robust positively invariant set $\mathcal E$ such that $F\mathcal E\oplus\mathcal W\subseteq\mathcal E$ yields $e_k\in\mathcal E$ for all $k$. Tightened sets
$$
\mathcal X_t:=\mathcal X\ominus(C\mathcal E\oplus V),\qquad \mathcal U_t:=\mathcal U\ominus K\mathcal E
$$
guarantee hard constraint satisfaction. Under standard assumptions, the paper derives stabilizability and observability of the Koopman model and proves recursive feasibility, closed-loop robustness, and nominal point-wise convergence. The optimal value satisfies
$$
V^*(k+1)-V^*(k)\le -\|\hat z_k\|_Q^2-\|\hat u_k\|_R^2,
$$
so the nominal state and input converge to zero. If $w_k^o\equiv0$ and the net gain
$$
G=(L_z I+L_u K^\prime K)\sum_{i=0}^\infty F^i
$$
is Schur, then $e_k\to0$, coupled with $\hat z_k\to0$, $x_k\to0$, and $u_k\to0$ [2108.13011].

The quadruped formulation provides a multi-step prediction-error bound for the combined nominal-plus-residual predictor. Under mild Lipschitz assumptions on $F$ and a uniform bound $\epsilon$ on the residual-model one-step error,
$$
\|\tilde x_{k+1}\|\le 2L\|\tilde x_k\|+\epsilon,
$$
and over $N$ steps,
$$
\|\tilde x_{k+N}\|\le (2L)^N\|\tilde x_k\|+\sum_{i=0}^{N-1}(2L)^{N-1-i}\epsilon.
$$
Because $\epsilon$ is small, the paper states that multi-step error remains well-behaved [2604.04221].

The online adaptive Koopman-operator methodology emphasizes stabilization of model learning. It uses a “main” network and a “target” network and updates the target parameters by soft update,
$$
\theta^t\leftarrow \tau\theta+(1-\tau)\theta^t,\qquad K^t\leftarrow \tau K+(1-\tau)K^t,
$$
with $\tau\in(0,1)$ small. The stated stability remarks are that the target network in the QP prevents large swings in the controller and that one can choose to only adapt a subset of parameters online, such as only $B$ and $\theta$, to further improve numerical stability and reduce computation [2412.02972].

The no-regret formulation provides a different type of guarantee. The Koopman matrices are updated online by ordinary least squares or online gradient descent on the per-step loss
$$
\ell_s(A,B)=\|z_{s+1}-A z_s-B u_s\|^2.
$$
Dynamic regret is defined against the clairvoyant non-causal controller,
$$
\mathrm{Regret}(T)=\sum_{t=0}^{T-1}\ell(x_t,u_t)-\sum_{t=0}^{T-1}\ell(x_t^*,u_t^*),
$$
and Theorem 1 gives
$$
\mathrm{Regret}(T)\le O(T^{3/4}),
$$
hence $\mathrm{Regret}(T)/T\to0$ as $T\to\infty$. The paper interprets this as asymptotic convergence to the optimal non-causal controller [2504.15805].

SFKD provides an explicit ISS certificate in latent space. With latent error $e_k^z=z_k-\hat z_k$, contraction bound
$$
\left\|\frac{\partial r_\theta}{\partial z}\right\|_2\le \beta,
$$
and combined gain
$$
\alpha=\|A(e_k)\|_2+\beta<1,
$$
the one-step bound is
$$
\|e_{k+1}^z\|\le \alpha\|e_k^z\|+\bar d,
$$
which yields
$$
\|e_k^z\|\le c_1\alpha^k\|e_0^z\|+\frac{c_2\bar d}{1-\alpha}.
$$
The corresponding ultimate bound is
$$
\limsup_{k\to\infty}\|e_k^z\|\le \frac{c_2\bar d}{1-\alpha}.
$$
The paper further states a closed-loop tracking bound in physical coordinates when the nominal MPPI tracking error in latent space is $\epsilon_{MPPI}$ [2605.16754].

## 5. Reported implementations and empirical results

The empirical literature spans cart-pole stabilization, quadruped locomotion, vehicle trajectory tracking, and environment-switching autonomous vehicle path tracking. Reported metrics indicate that the residual construction is used either to recover performance lost by model mismatch or to reduce sensitivity to the choice of observables.

| Domain | Configuration | Reported outcome |
|---|---|---|
| Cart-pole [2412.02972] | Adaptive Koopman MPC | $\sim0.52$ s per 6 s rollout vs 0.70 s nominal MPC, 1.12 s RFF-MPC, 5.11 s GP-MPC |
| Cart-pole [2504.15805] | Online learned residual Koopman MPC | Under 45% mismatch, only RKMPC succeeds in all trials |
| Quadruped locomotion [2604.04221] | Gazebo and Unitree Go1, 500 Hz | RK-MPC: 0.020 m/s linear-velocity RMSE, 0.095 rad/s angular-rate RMSE, 0.89 ms average QP solve time |
| Vehicle trajectory tracking [2507.18396] | Carsim–MATLAB and F1TENTH | Requires only 20% of KMPC training data; lateral error reduced by 11.7%-22.1% |
| Environment switching [2605.16754] | MPPI with SFKD | 0.120 m RMSE in scenario S3 and 44% improvement in control smoothness |

For quadruped locomotion, the open-loop comparison over 100-step rollouts on held-out data shows one-step RMSE for linear velocity $v_x$ of SRB $=0.007\pm0.003$, EDMD-mono $=4.05\pm1.92$, EDMD-$SE(3)=0.003\pm0.001$, and Res-Koopman $=0.003\pm0.001$; for angular velocity $\omega_x$, SRB $=0.091\pm0.018$, EDMD-mono $=3.16\pm1.91$, EDMD-$SE(3)=0.070\pm0.022$, and Res-Koopman $=0.064\pm0.017$. The paper states that $SE(3)$ EDMD exhibits drift in the $SO(3)$ geodesic error over horizon, while monomial EDMD blows up [2604.04221]. In closed-loop simulation for a circular reference under randomized friction and rough terrain, linear-velocity RMSE is SRB $=0.020$ m/s, SE3-KMPC $=0.098$ m/s, and RK-MPC $=0.020$ m/s; angular-rate RMSE is SRB $=0.174$ rad/s, SE3-KMPC $=0.700$ rad/s, and RK-MPC $=0.095$ rad/s. Average QP solve times are SRB-MPC $\sim1.57$ ms, SE3-KMPC $\sim1.40$ ms, and RK-MPC $\sim0.89$ ms. On Unitree Go1 hardware with onboard NVIDIA Xavier NX, the controller runs at 500 Hz, achieves 9/10 successes over loose obstacles in debris traversal and push recovery, transfers from trot to crawl by simply changing contact-schedule $\sigma_k$, and is reported stable on grass, gravel, snow, and ice, with slip on ice beginning when the controller pushes normal forces to limit [2604.04221].

For vehicle dynamics, the simulation study on the Carsim–MATLAB platform reports the following table entries: LMPC lateral error $0.1115$ m, heading error $0.0475$ rad, steer-rate $0.1570$ rad/s, computation time mean $2.38$ ms and max $13.30$ ms; NMPC lateral error $0.0808$ m, heading error $0.0443$ rad, steer-rate $0.2414$ rad/s, computation time $13.68/66.38$ ms; KMPC lateral error $0.1650$ m, heading error $0.0436$ rad, steer-rate $0.1794$ rad/s, computation time $3.78/17.58$ ms; and RKMPC lateral error $0.0990$ m, heading error $0.0434$ rad, steer-rate $0.1175$ rad/s, computation time $6.73/16.14$ ms. The paper states that RKMPC reduces lateral error by 11.2%, heading by 8.6%, steering jitter by 27.6% versus LMPC, while running well within a 50 ms cycle, and that KMPC’s performance suffers under small datasets while NMPC cannot meet real-time budgets [2507.18396]. In physical 1:10 F1TENTH tests, LMPC yields lateral error $0.284$ m and heading error $0.1441$ rad, KMPC is reported as uncontrollable, and RKMPC yields lateral error $0.2213$ m and heading error $0.1213$ rad with computation time $8.55$ ms. The same paper states that RKMPC requires only 20% of the training data needed by traditional KMPC while delivering superior tracking performance [2507.18396].

For the adaptive cart-pole study, nominal MPC without residual or adaptation fails to stabilize quickly, whereas GP-MPC and RFF-MPC do stabilize but are 2–10× slower. The reported solve times are $\sim0.52$ s per 6 s rollout for RKMPC, 0.70 s for nominal MPC, 1.12 s for RFF-MPC, and 5.11 s for GP-MPC [2412.02972]. In the no-regret cart-pole study, the system has 4D state $x=[p,\dot p,\theta,\dot\theta]$, scalar input $F$, is discretized at 15 Hz with horizon $N=20$, and uses cost weights $Q=\mathrm{diag}[5,0.1,5,0.1]$, $R=0.1$. Under 25% mismatch, RKMPC stabilizes fastest and outperforms nominal-MPC, GP-MPC, and RFF-MPC; under 45% mismatch, only RKMPC succeeds in all trials; and the estimation error in the Koopman fit decays quickly [2504.15805].

For environment-constrained robust control, SFKD is evaluated on a bicycle model with varying road friction $\mu\in[0.3,0.9]$ and lateral wind $w\le 8$ m/s. In scenario S3, mean $\pm$ std over 200 runs gives Koopman MPC RMSE $0.243$ m, Neural ODE RMSE $0.218$ m, ICODE-MPPI RMSE $0.174$ m, and SFKD RMSE $0.120$ m. Control smoothness, measured as mean $|\Delta\delta|/\Delta t$, is $0.134$ rad/s for ICODE-MPPI and $0.101$ rad/s for SFKD. The latent-stability violation study reports that uncertified baselines exceed the theoretical bound in 40–60% of trials, whereas SFKD stays within bound $>95\%$ of the time [2605.16754].

## 6. Interpretation, misconceptions, and active directions

A common misconception is that Residual Koopman MPC refers to one fixed algorithmic template. The literature does not support that reading. The label covers at least the following constructions: a tube-based lifted MPC with offline residual feedback [2108.13011]; a compact residual predictor correcting a nominal reduced-order model [2604.04221]; a convex lifted QP with explicit residual decision variables and online parameter adaptation [2412.02972]; an online least-squares or OGD scheme for unknown residual dynamics with dynamic-regret guarantees [2504.15805]; a dual-MPC compensation architecture for vehicle tracking [2507.18396]; and an environment-conditioned latent Koopman model with contraction-constrained residual network inside MPPI [2605.16754]. This suggests that the defining feature is not one optimizer or one notion of residual, but the explicit insertion of a residual Koopman mechanism into predictive control.

A second misconception is that a Koopman lift alone yields robustness. The 2021 tube-based work states the opposite problem formulation: robustness of the closed-loop Koopman MPC under modeling approximation errors and possible exogenous disturbances is still a crucial issue to be resolved, and its solution requires tube-based robustification, tightened constraints, and offline feedback design [2108.13011]. The environment-conditioned SFKD results make a related point from a different angle: latent stability is enforced by spectral-norm constraints on $A(e)$ and a contraction constraint on the residual network, not by lifting alone [2605.16754].

A third misconception is that RKMPC is necessarily fully data-driven. Several implementations are explicitly hybrid. The quadruped controller combines a physics-based SRB template with a compact Koopman-learned residual [2604.04221]. The vehicle controller keeps the well-understood kinematic baseline intact and uses the residual Koopman block only to correct unmodeled nonlinearities, which the paper presents as preserving interpretability and reliability [2507.18396].

Active directions are stated directly in the cited papers. For quadruped RK-MPC, future work includes online adaptation of residual operator by incremental least-squares or recursive EDMD, robust or tube-MPC extensions using residual uncertainty bounds, and application to other legged platforms and full-body hybrid dynamics [2604.04221]. The adaptive Koopman-operator methodology discusses choosing only a subset of parameters as online updated parameters to improve numerical stability and reduce computation [2412.02972]. The no-regret formulation points toward continued integration of online identification and predictive control under explicit performance guarantees [2504.15805]. The SFKD formulation extends the residual Koopman paradigm toward environment-aware geometric consistency, latent-space stability certification, and bounded residual perturbation propagation under environment switching [2605.16754].

Source: https://www.emergentmind.com/topics/residual-koopman-model-predictive-control-rkmpc