Bayesian model predictive control: Efficient model exploration and regret bounds using posterior sampling

Kim Peter Wabersich, Melanie N. Zeilinger

Abstract

This paper introduces a Bayesian Model Predictive Control (MPC) framework that leverages posterior sampling (Thompson sampling) to address the exploration-exploitation trade-off in learning-based control. By sampling model realizations from a posterior distribution and solving a nominal MPC problem, the method achieves computational efficiency compatible with standard solvers. We provide the first finite-time regret bounds for this class of controllers, demonstrating sub-linear regret growth of $O(\sqrt{N_E})$. The approach is validated on a complex, nonlinear car-trailer system, showing rapid convergence to optimal performance.

Introduction

Model Predictive Control (MPC) is a cornerstone of modern industrial automation, prized for its ability to handle complex constraints and optimize performance. However, the efficacy of MPC is fundamentally limited by the accuracy of the underlying mathematical model. In dynamic environments—such as autonomous flight or self-driving—systems must learn and refine their models from streaming data. This introduces a classic "exploration-exploitation" dilemma: the controller must decide between exploiting current knowledge to minimize cost and exploring new actions to improve model accuracy.

Existing "dual-MPC" strategies often suffer from high computational complexity and a lack of theoretical guarantees. This paper proposes a Bayesian MPC framework that is both mathematically rigorous and practically implementable.

Methodology: Bayesian MPC via Posterior Sampling

The core of the proposed method is the integration of Posterior Sampling (Thompson Sampling) into the MPC loop. The algorithm operates in an episodic fashion:

  1. Sampling: At the start of each episode, a single model realization $\theta$ is sampled from the current posterior belief $P(\theta|D)$.
  2. Nominal Control: For the duration of the episode, the controller treats the sampled model as the ground truth and solves a standard, "nominal" MPC problem. This allows the use of efficient, off-the-shelf solvers like ACADO or FORCES Pro.
  3. Posterior Update: At the end of the episode, the observed states, inputs, and costs are used to update the posterior distribution.

To bridge the gap between learning theory and control, the authors employ soft constraints. By penalizing constraint violations in the cost function using slack variables, model errors can be directly mapped to performance loss, or "regret."

Theoretical Regret Bounds

A key contribution is the derivation of finite-time regret bounds for learning-based MPC. By utilizing tools from Reinforcement Learning theory, such as Eluder and Kolmogorov dimensions, the authors prove that the cumulative regret grows at a rate of $O(\sqrt{N_E})$, where $N_E$ is the number of episodes. This sub-linear growth implies that the average regret vanishes over time, ensuring the controller converges to the performance of an optimal strategy with full model knowledge. Furthermore, the expected cumulative constraint violation is also bounded, providing a measure of safety during the learning process.

Experimental Evaluation: Car-Trailer System

The framework was evaluated using a numerical simulation of a highly nonlinear car-trailer system. The task involves steering a car and trailer backwards to a target position that is initially uncertain. This system is characterized by trigonometric nonlinearities and strict constraints, including steering limits and trailer jackknife avoidance.

Car-trailer system diagram showing the geometric parameters and state variables ($x_t, y_t, x_c, y_c, \kappa, a, b, c, \delta, \phi$) used in the simulation.

The simulation involved 200 different system realizations over 250 episodes each. The goal was to observe how quickly the controller could aggregate its belief around the true system parameters despite significant process and measurement noise.

Key Results

The experimental results confirm the theoretical predictions. The median regret dropped sharply within the first 15 episodes, indicating rapid model convergence.

Regret samples over 250 episodes. The black line represents the median regret, which shows a clear sub-linear trend and rapid convergence within the initial episodes.

Because the method relies on solving nominal MPC problems, it maintains the real-time feasibility required for physical systems. The combination of theoretical sub-linear regret and practical computational efficiency makes this a promising approach for real-world autonomous systems.

Conclusion and Future Work

This work successfully bridges the gap between theoretical Reinforcement Learning and practical Control Engineering. While the current framework assumes an episodic structure and soft constraints, future research will focus on extending these bounds to continual learning settings and incorporating "hard" safety guarantees through control barrier functions or reachability analysis.

Summary updated

BibTeX
@inproceedings{wabersich2020bayesian,
  author = {Kim Peter Wabersich and Melanie N. Zeilinger},
  title = {{Bayesian model predictive control: Efficient model exploration and regret bounds using posterior sampling}},
  booktitle = {L4DC},
  year = {2020},
}
Figure