Real-Time Online Learning for Model Predictive Control using a Spatio-Temporal Gaussian Process Approximation

Lars Erik Bartels, Amon Lahr, Andrea Carron, Melanie N. ZeilingerarXiv 2026 · DOI

Abstract: Learning-based model predictive control (MPC) can enhance control performance by correcting for model inaccuracies, enabling more precise state trajectory predictions than traditional MPC. A common approach is to model unknown residual dynamics as a Gaussian process (GP), which leverages data and also provides an estimate of the associated uncertainty. However, the high computational cost of online learning poses a major challenge for real-time GP-MPC applications. This work presents an efficient implementation of an approximate spatio-temporal GP model, offering online learning at constant computational complexity. It is optimized for GP-MPC, where it enables improved control performance by learning more accurate system dynamics online in real-time, even for time-varying systems. The performance of the proposed method is demonstrated by simulations and hardware experiments in the exemplary application of autonomous miniature racing.

Introduction

Model Predictive Control (MPC) is a cornerstone of complex robotic tasks, relying on its ability to plan future actions by predicting system behavior. However, its effectiveness is intrinsically tied to the accuracy of its underlying model. In dynamic environments—such as a drone navigating wind gusts or a car on a track with varying grip—nominal models often fail. Researchers at ETH Zürich have addressed this by developing a spatio-temporal Gaussian Process (GP) approximation that allows MPC to adapt to changing system dynamics in real-time with constant computational complexity.

The Challenge of Online Learning

Gaussian Processes are powerful tools for learning model errors (residual dynamics) from data. However, standard GPs scale cubically ($O(n^3)$) with the number of data points. In an online setting, as a robot continuously collects data, the controller eventually becomes too slow for real-time application. Furthermore, most GP methods struggle with time-varying systems, as they either forget historical data too quickly or fail to distinguish between spatial noise and temporal shifts in dynamics.

Methodology

The proposed framework treats space and time as distinct but integrated dimensions to maintain efficiency:

  1. Spatio-Temporal Kernel: The model utilizes a separable kernel, where correlation is a product of spatial and temporal components.
  2. Spatial Inducing Points: To bound spatial complexity, the GP summarizes the environment at a fixed set of "inducing points" rather than storing every raw data point.
  3. Temporal State-Space Model: The temporal component of the GP is transformed into a linear state-space model using stochastic differential equations (SDEs). This allows the values at the inducing points to evolve over time.
  4. Square-Root Kalman Filtering: By treating the GP as a state-space system, the authors use recursive Kalman filtering to update the mean and covariance. A square-root implementation ensures numerical stability over long durations.
  5. Real-Time Integration: The method is implemented within the L4acados framework, using zero-order Sequential Quadratic Programming (SQP) to solve the MPC problem within millisecond constraints.

Experimental Results

The approach was evaluated using the Cyber-Physical Racing System (CRS) platform, featuring 1:43 scale autonomous miniature race cars. To test adaptation, a dynamic steering offset was introduced as a time-varying perturbation.

Computational Efficiency

A critical achievement of this work is maintaining constant computational overhead. While exact GP solve times explode as data accumulates, the proposed approximate spatio-temporal GP maintains a flat solve time of approximately 25–30ms, staying safely within the 33ms (30Hz) real-time limit required for the racing platform.

Comparison of solve times: the exact GP's complexity grows with the number of solves, while the proposed spatio-temporal GP maintains constant computational time.

Adaptation and Performance

When faced with steering perturbations, nominal MPC controllers without learning exhibited significant prediction errors and inconsistent performance. The spatio-temporal GP-MPC successfully identified these shifts. In hardware tests, cars equipped with the proposed model maintained stable racing lines and stayed within track boundaries, whereas baseline methods showed undulating trajectories.

Angular velocity error comparison: the proposed spatio-temporal GP (blue) significantly reduces error and variance compared to a controller without GP learning (red) under dynamic perturbations.

Conclusion and Future Work

This research demonstrates that spatio-temporal GP approximations can make learning-based MPC practical for high-speed robotics by providing constant computational complexity and robust adaptation to time-varying disturbances. Future work aims to enable online hyperparameter tuning and dynamic placement of inducing points to further enhance accuracy in unmapped environments.

Summary updated

Abstract

Learning-based model predictive control (MPC) can enhance control performance by correcting for model inaccuracies, enabling more precise state trajectory predictions than traditional MPC. A common approach is to model unknown residual dynamics as a Gaussian process (GP), which leverages data and also provides an estimate of the associated uncertainty. However, the high computational cost of online learning poses a major challenge for real-time GP-MPC applications. This work presents an efficient implementation of an approximate spatio-temporal GP model, offering online learning at constant computational complexity. It is optimized for GP-MPC, where it enables improved control performance by learning more accurate system dynamics online in real-time, even for time-varying systems. The performance of the proposed method is demonstrated by simulations and hardware experiments in the exemplary application of autonomous miniature racing.
BibTeX
@misc{bartels2026real,
  author = {Lars Erik Bartels and Amon Lahr and Andrea Carron and Melanie N. Zeilinger},
  title = {{Real-Time Online Learning for Model Predictive Control using a Spatio-Temporal Gaussian Process Approximation}},
  year = {2026},
  eprint = {2603.17632},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.17632},
}
Figure