NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A predictive safety filter for learning-based control of constrained nonlinear dynamical systems

Kim Peter Wabersich, Melanie N. Zeilinger

Introduction

Reinforcement Learning (RL) has demonstrated remarkable potential in complex simulation environments. However, transitioning these algorithms to real-world physical systems remains a significant challenge due to the lack of inherent safety guarantees. Standard RL agents learn through trial and error, often violating critical physical constraints—such as velocity limits or structural boundaries—during the exploration phase.

Existing approaches to safe RL often result in overly conservative behavior or require intrusive modifications to the learning algorithm. This paper proposes a modular Predictive Safety Filter (PSF) that serves as a safety wrapper, allowing unconstrained RL methods to be deployed safely "out-of-the-box" on nonlinear systems.

The Predictive Safety Filter Framework

The PSF is based on a receding-horizon Model Predictive Control (MPC) formulation. It acts as an intermediary between the RL controller and the physical system, ensuring that every action taken is part of a verifiable "backup plan."

The Predictive Safety Filter architecture: the RL controller proposes an action $u_{\mathcal{L}}$, which is filtered by the PSF to ensure system safety before being applied to the physical system.

The filter operates in a modular loop where the RL controller is treated as a "black box." At each time step, the PSF receives the RL's proposed input and the current system state. It then attempts to find a sequence of future inputs that would keep the system safe and eventually lead it to a known "terminal safe set" (like a stable hover or a parked position). If the RL's proposed input is part of a valid backup plan, the PSF lets it through unchanged. If not, the PSF solves an optimization problem to find the input closest to the RL's proposal that maintains safety.

Safe Exploration and Uncertainty

A key innovation of this approach is how it handles model mismatch. By using a data-driven probabilistic model (e.g., Bayesian regression), the PSF employs constraint tightening. As the system collects more data and the model becomes more certain, the filter becomes less restrictive.

Visualization of safe trajectories and constraint tightening. The PSF ensures that trajectories avoid "unconfident model" regions and stay within the safe set $\mathcal{S}^t$ by maintaining valid backup plans $\mu_{i|k}$.

As shown in the figure above, the PSF maintains a sequence of nominal states ($\mu_{i|k}$) that lead to a terminal safe set $\mathcal{S}^t$. The system naturally balances exploration and safety by "knowing what it doesn't know." It stays away from high-uncertainty regions (the "unconfident model" area) until it has enough data to venture there safely. This effectively transforms a constrained, dangerous system into an unconstrained, "inherently safe" system from the perspective of the RL agent.

Experimental Results

The PSF was evaluated on two challenging nonlinear control tasks:

  • Inverted Pendulum Swing-up: The filter enabled safe exploration with as few as 10 initial data points, preventing the pendulum from tipping over while the model was being refined until a full swing-up was achieved safely.
  • Quadrotor Landing: In a high-dimensional simulation using the Bullet Physics SDK, a standard RL agent crashed repeatedly. In contrast, the PSF-equipped agent completed 240 learning episodes with zero ground contacts and zero velocity limit violations. Despite the safety constraints, the agent eventually learned an optimal trajectory nearly identical to what an unconstrained agent would achieve.

Conclusion and Future Work

The Predictive Safety Filter provides a robust, modular solution for safe reinforcement learning. By providing safety guarantees through backup trajectories, it enables the use of powerful, unconstrained learning algorithms on real-world hardware.

Future work will address the computational overhead of solving nonlinear optimization problems at every time step, which currently limits the PSF's use in very high-frequency systems. Additionally, researchers aim to improve robustness in "out-of-distribution" scenarios where the model's initial uncertainty estimates might fail.

Summary updated

BibTeX
@article{wabersich2021predictive,
  author = {Kim Peter Wabersich and Melanie N. Zeilinger},
  title = {{A predictive safety filter for learning-based control of constrained nonlinear dynamical systems}},
  journal = {Automatica},
  year = {2021},
  doi = {10.1016/j.automatica.2021.109597},
}
Figure