Fast Non-Episodic Adaptive Tuning of Robot Controllers with Online Policy Optimization

James A. Preiss, Fengze Xie, Yiheng Lin, Adam Wierman, Yisong YuearXiv 2025 · DOI

Introduction

In real-world applications, robots frequently encounter unpredictable environmental changes. A drone might face sudden wind gusts or pick up a heavy payload, instantly altering its dynamics. Traditional approaches to this problem typically fall into two categories: mathematically rigorous adaptive control, which is often limited to simple controller structures, and reinforcement learning (RL), which is flexible but typically requires "episodes"—repeatedly resetting the robot to a starting state to learn from failure.

The critical challenge lies in the non-episodic, online setting: a robot must adapt immediately while continuing its trajectory. This paper addresses this gap by introducing M-GAPS (Model-based Gradient-based Adaptive Policy Selection), an algorithm designed for continuous, real-time adaptation.

The M-GAPS Approach

M-GAPS leverages a differentiable dynamics model to compute how changes in controller parameters (e.g., gains) affect future costs. Unlike black-box RL methods, M-GAPS uses the internal structure of the robot's physics to guide optimization.

Key Technical Innovations

  • Sensitivity Tracking: The algorithm maintains an internal "sensitivity state" that approximates the gradient of the cost function with respect to controller parameters. This allows for parameter updates at every timestep (e.g., 500Hz) without the need to re-simulate past states.
  • Logarithmic Reparameterization: By optimizing the logarithm of controller gains, M-GAPS flattens the optimization landscape, leading to more stable gradient descent across multiple orders of magnitude.
  • Hardware Efficiency: The entire pipeline is implemented onboard a Bitcraze Crazyflie microcontroller, utilizing symbolic differentiation for high-speed execution.
M-GAPS trajectory tracking performance over time, showing rapid convergence to the target figure-8 path.

Experimental Evaluation

The performance of M-GAPS was evaluated across several challenging hardware scenarios:

  1. Detuned Initialization: Starting with suboptimal parameters to test adaptation speed.
  2. Time-Varying Wind: Navigating wind disturbances from fans toggled every 12 seconds.
  3. Heavy Payload: Managing a 60% increase in mass (23g added to a 39g drone) without prior knowledge of the change.
  4. Cross-Platform Validation: Testing on a 1:6-scale Ackermann-steered car to demonstrate generalizability.

Results and Discussion

M-GAPS demonstrated remarkable adaptation speed, reaching near-expert performance in just 15 seconds (approximately 3-4 laps of a figure-8 trajectory). Notably, in wind disturbance tests, M-GAPS achieved lower tracking error than a hand-tuned expert controller by adapting to the specific airflow patterns of the environment.

Comparison of trajectory tracking across different tuning methods. M-GAPS shows superior adaptation compared to episodic methods like DiffTune and OPRF.

The "episode trap" is a significant finding: imposing artificial episodes on continuous tasks can lead to unstable updates if the episode length is mismatched with the system's rhythm. M-GAPS avoids this by being truly non-episodic. Furthermore, the results show that even imperfect dynamics models provide sufficient gradient information to guide parameters toward stable, high-performance solutions.

Conclusion

M-GAPS provides a robust and efficient solution for online controller tuning in non-episodic environments. By combining differentiable models with sensitivity tracking, it enables robots to adapt to significant physical changes in seconds. Future work will explore extending this method to systems with contact discontinuities, such as legged robots, and incorporating full manifold-based states for more extreme maneuvers.

Summary updated

BibTeX
@misc{preiss2025fast,
  author = {James A. Preiss and Fengze Xie and Yiheng Lin and Adam Wierman and Yisong Yue},
  title = {{Fast Non-Episodic Adaptive Tuning of Robot Controllers with Online Policy Optimization}},
  year = {2025},
  eprint = {2507.10914},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.10914},
}
Figure