Controlling robots with strongly nonlinear, high-dimensional dynamics remains challenging, as direct nonlinear optimization with safety constraints is often intractable in real time. The Koopman operator offers a way to represent nonlinear systems linearly in a lifted space, enabling the use of efficient linear control. We propose a data-driven framework that learns a Koopman embedding and operator from data, and integrates the resulting linear model with the Safe Set Algorithm (SSA). This allows the tracking and safety constraints to be solved in a single quadratic program (QP), ensuring feasibility and optimality without a separate safety filter. We validate the method on a Kinova Gen3 manipulator and a Go2 quadruped, showing accurate tracking and obstacle avoidance.
Figures & tables
Fig. 1 : Left: Kinova Gen3 safely moving from START (red) to GOAL (green) while avoiding the collision volume (yellow); collision avoidance is enforced using the learned Koopman dynamics within our unified Koopman–SSA MPC. Middle: Floating-base safe control in Isaac simulation (Unitree Go2). The learned Koopman-MPC tracks the reference while actively avoiding the obstacle-induced unsafe region; collision avoidance is enforced using the learned Koopman dynamics within the MPC rollout. Right: We use the learned Koopman lifted space and its linear dynamics (blue) to predict motion in MPC and evaluate the safety constraints, which enables the collision avoidance shown in the left and middle panels.
Fig. 3 : Overview of training framework for Koopman Safe Control. Neural embedding function and Koopman Operators are first trained, safety index is adapted to the learned dynamics via adversarial fine tuning, and the model is migrated to real environment.
Scenario
# Infeasible / Texp
Single Obstacle (Untrained)
108/4000
Multi Obstacle (Untrained)
632/4000
Single Obstacle ( Trained )
42/4000
Multi Obstacle ( Trained )
113/4000
TABLE I : QP infeasibility counts comparison. Single Obstacle includes one dynamic obstacle chasing one of Kinova’s links, whereas Multi Obstacle includes seven extra static obstacles placed at random positions. This experiment is conducted without slack relaxation. Each entry reports the number of infeasible QP solves among the total control steps in the experiment ( Texp=4000 ).
Fig. 4 : Prediction Error Comparison. The analytic baselines (LTI and LTV), KDM, and NNDM are compared against PyBullet ground truth. KDM maintains the lowest long-horizon error growth, while the analytic model is competitive in short horizons but diverges.
Single Obstacle
Multi Obstacle (6 total)
Avg. Distance to Target [m]
Avg. Max ϕ Over Links
Avg. Mean ϕ Over Links
Avg. Min Dist. to Obstacle [m]
Cumulative Cost
Avg. Comp. Time [s]
Avg. Comp. Time [s]
KMPC (Ours)
9.66e-3 ± 0.15e-3
1.496e-2 ± 0.23e-3
0.071860
-0.03828
-0.21492
0.21913
13154
LTIMPC
5.19e-3 ± 0.43e-3
0.629e-2 ± 0.79e-3
0.572857
-0.15237
-0.33137
0.32237
307378578
LTVMPC
14.98e-3 ± 0.12e-3
0.629e-2 ± 0.79e-3
0.144116
-0.09723
-0.18294
0.26745
93292
NMPC-10
40.49e-3 ± 0.96e-3
5.299e-2 ± 3.06e-3
0.116499
-0.16023
-0.25239
-
81261
NMPC-100
412.59e-3 ± 227.05e-3
1.04704 ± 0.03220
0.009787
-0.12234
-0.25224
-
160
TABLE II : Computation Time and Performance Comparison for an episode length of 4000 control steps. The two left columns report average computation time for safe control, while the remaining columns summarize tracking performance and safety in the 3D space. Cumulative cost reflects tracking performance. For safety, Avg. Max ϕ denotes the maximum ϕ over all links at each time step, averaged over the episode, and Avg. Mean ϕ denotes the mean ϕ over links at each time step, averaged over the episode; in both cases, lower values indicate safer behavior. Avg. Min Dist. to Obstacle reports the minimum link-to-obstacle distance averaged over the episode, where larger values indicate safer separation. The symbol “–” indicates that the robot collided with the obstacle during the experiment. Across these complementary metrics, KMPC achieves the best performance–safety trade-off , attaining low tracking cost while making only necessary evasion, thereby maintaining moderately low ϕ (both Avg. Max and Avg. Mean).
Fig. 5 : Safe Tracking Comparison. NMPC-10 is nonlinear MPC with 10 times shooting, values in parentheses represent slack weight for safety filter relaxation. Linear counterparts, including KMPC did not require slack relaxation for this experiment. KMPC outperforms NMPC-10 both in tracking and safety constraint satisfaction.
Fig. 6 : Histogram of single-step joint-angle prediction error norms (radians) over five hardware trajectories (rectangle, sin, star, triangle, spiral), comparing the original Koopman model (blue) against the fine-tuned Koopman model (orange). Fine-tuning shifts the error distributions toward smaller values across all trajectories, yielding a mean joint-angle error of 0.140 rad (maximum 0.546 rad) and a mean end-effector position error of 0.031 m (maximum 0.143 m) on the evaluated hardware dataset.
Fig. 7 : Prediction error comparison for Kinova-Gen3 before and after fine-tuning. (Left) Scatter plot of original versus fine-tuned model errors, where nearly all points lie below the y=x line (red), indicating consistent improvement; (Right) Average prediction error across horizons (log 10 scale), showing that fine-tuned Koopman dynamics maintain significantly lower error over multiple steps.
Fig. 8 : Go2 base trajectories over five runs. The reference (black) passes through the unsafe region (red), whereas Koopman Safe MPC produces evasive behavior and steers the robot back toward safety. Run-to-run variation is primarily due to omitting globally-referenced base translation (x,y) from the predictive state, so the controller does not explicitly regulate absolute global position.
Fig. 9 : Linkwise safety index ϕ across five runs. Dots indicate the mean linkwise ϕ per link, with whiskers showing min/max across runs. Positive values correspond to temporary unsafe-set violations induced by the reference; nevertheless, the overall trend shows rapid recovery back toward ϕ≤0 after avoidance maneuvers.
This paper presents a model-based reinforcement learning (RL) framework for optimal closed-loop control of nonlinear robotic systems. The proposed approach learns linear lifted dynamics through Koopman operator theory and integrates the resulting model into an actor-critic architecture for policy optimization, where the policy represents a parameterized closed-loop controller. To reduce computational cost and mitigate model rollout errors, policy gradients are estimated using one-step predictions of the learned dynamics rather than multi-step propagation. This leads to an online mini-batch policy gradient framework that enables policy improvement from streamed interaction data. The proposed framework is evaluated on several simulated nonlinear control benchmarks and two real-world hardware platforms, including a Kinova Gen3 robotic arm and a Unitree Go1 quadruped. Experimental results demonstrate improved sample efficiency over model-free RL baselines, superior control performance relative to model-based RL baselines, and control performance comparable to classical model-based methods that rely on exact system dynamics.
Wenjian Hao, Yuxuan Fang, Zehui Lu +1
School of Aeronautics and Astronautics, Purdue University, West Lafayette, IN 47907, USA · independent researcher
We propose a fully data-driven, Koopman-based framework for statistically robust control of discrete-time nonlinear systems with linear embeddings. Establishing a connection between the Koopman operator and contraction theory, it offers distribution-free probabilistic bounds on the state tracking error under Koopman modeling uncertainty. Conformal prediction is employed here to rigorously derive a bound on the state-dependent modeling uncertainty throughout the trajectory, ensuring safety and robustness without assuming a specific error prediction structure or distribution. Unlike prior approaches that merely combine conformal prediction with Koopman-based control in an open-loop setting, our method establishes a closed-loop control architecture with formal guarantees that explicitly account for both forward and inverse modeling errors. Also, by expressing the tracking error bound in terms of the control parameters and the modeling errors, our framework offers a quantitative means to formally enhance the performance of arbitrary Koopman-based control. We validate our method both in numerical simulations with the Dubins car and in real-world experiments with a highly nonlinear flapping-wing drone. The results demonstrate that our method indeed provides formal safety guarantees while maintaining accurate tracking performance under Koopman modeling uncertainty.
Koki Hirano, Hiroyasu Tsukamoto
Department of Aerospace Engineering, The Grainger College of Engineering, University of Illinois Urbana-Champaign, Urbana, Illinois 61801
Koopman operator theory provides a powerful framework for representing nonlinear dynamics through a linear operator acting on lifted observables, enabling the use of linear control techniques for nonlinear systems. However, Koopman models are typically learned from data and often degrade in performance under model uncertainty and distributional shifts between training and deployment. Although several works have explored online adaptation to address this issue, many rely on neural network-based updates that introduce significant computational overhead and lack formal safety guarantees, limiting their suitability for real-time and safety-critical robotic applications. In this work, we propose a unified framework for continual adaptive Koopman learning that enables safe and efficient online refinement of learned models during task execution. An autoencoder-based Koopman model is first learned offline and subsequently refined online through a contractive adaptation law, which provides theoretical convergence guarantees under distributional shifts and model uncertainty. To improve data efficiency and accelerate model refinement, the adaptation mechanism is integrated with an active learning strategy that drives the system to collect informative data while accomplishing task objectives. The resulting control problem is formulated as a nonconvex optimization problem incorporating both active learning objectives and safety constraints. We further derive theoretical bounds on model approximation error and show how these bounds can be incorporated within a robust Model Predictive Control (MPC) framework to provide formal safety guarantees. The proposed approach unifies learning, excitation, and safety within a single control framework without sacrificing real-time feasibility. Extensive simulation and experimental studies demonstrate superior performance compared to state-of-the-art baselines.
Chandan Kumar Sah, Rajpal Singh, Jishnu Keshavan
Department of Mechanical Engineering, Indian Institute of Science, Bangalore, Karnataka 560012, India