Table of Contents
Fetching ...

Safety on the Fly: Constructing Robust Safety Filters via Policy Control Barrier Functions at Runtime

Luzia Knoedler, Oswin So, Ji Yin, Mitchell Black, Zachary Serlin, Panagiotis Tsiotras, Javier Alonso-Mora, Chuchu Fan

TL;DR

The paper tackles safe control synthesis for nonlinear systems under disturbances and input constraints by introducing Robust Policy CBF (RPCBF), a runtime method that builds robust control barrier functions from the policy value function. RPCBF uses finite-horizon policy rollouts and cubic-spline time discretization to approximate $V^{h,\pi}_T$ and its gradient, enabling a CBF-QP safety filter that remains valid under bounded disturbances; a sampling-based robust extension $V^{h,\pi}_{T,N}$ further guards against worst-case disturbances. The authors prove that the finite-horizon approximation can be a valid CBF under suitable conditions and demonstrate, through simulations on high-relative-degree systems and hardware experiments on a quadcopter, that RPCBF improves safety and robustness relative to non-robust and heuristic baselines, while maintaining real-time feasibility. The work provides practical guidance on horizon length, disturbance sampling, and time-discretization to balance safety guarantees with computational efficiency, highlighting the potential for runtime-safe control in complex robotic systems. Overall, RPCBF offers a scalable path to robust safety filters that can adapt to system dynamics and disturbance bounds without retraining.

Abstract

Control Barrier Functions (CBFs) have proven to be an effective tool for performing safe control synthesis for nonlinear systems. However, guaranteeing safety in the presence of disturbances and input constraints for high relative degree systems is a difficult problem. In this work, we propose the Robust Policy CBF (RPCBF), a practical approach for constructing robust CBF approximations online via the estimation of a value function. We establish conditions under which the approximation qualifies as a valid CBF and demonstrate the effectiveness of the RPCBF-safety filter in simulation on a variety of high relative degree input-constrained systems. Finally, we demonstrate the benefits of our method in compensating for model errors on a hardware quadcopter platform by treating the model errors as disturbances. Website including code: www.oswinso.xyz/rpcbf/

Safety on the Fly: Constructing Robust Safety Filters via Policy Control Barrier Functions at Runtime

TL;DR

The paper tackles safe control synthesis for nonlinear systems under disturbances and input constraints by introducing Robust Policy CBF (RPCBF), a runtime method that builds robust control barrier functions from the policy value function. RPCBF uses finite-horizon policy rollouts and cubic-spline time discretization to approximate and its gradient, enabling a CBF-QP safety filter that remains valid under bounded disturbances; a sampling-based robust extension further guards against worst-case disturbances. The authors prove that the finite-horizon approximation can be a valid CBF under suitable conditions and demonstrate, through simulations on high-relative-degree systems and hardware experiments on a quadcopter, that RPCBF improves safety and robustness relative to non-robust and heuristic baselines, while maintaining real-time feasibility. The work provides practical guidance on horizon length, disturbance sampling, and time-discretization to balance safety guarantees with computational efficiency, highlighting the potential for runtime-safe control in complex robotic systems. Overall, RPCBF offers a scalable path to robust safety filters that can adapt to system dynamics and disturbance bounds without retraining.

Abstract

Control Barrier Functions (CBFs) have proven to be an effective tool for performing safe control synthesis for nonlinear systems. However, guaranteeing safety in the presence of disturbances and input constraints for high relative degree systems is a difficult problem. In this work, we propose the Robust Policy CBF (RPCBF), a practical approach for constructing robust CBF approximations online via the estimation of a value function. We establish conditions under which the approximation qualifies as a valid CBF and demonstrate the effectiveness of the RPCBF-safety filter in simulation on a variety of high relative degree input-constrained systems. Finally, we demonstrate the benefits of our method in compensating for model errors on a hardware quadcopter platform by treating the model errors as disturbances. Website including code: www.oswinso.xyz/rpcbf/

Paper Structure

This paper contains 16 sections, 2 theorems, 20 equations, 10 figures, 1 table, 1 algorithm.

Key Result

Theorem 1

Suppose that for all $\mathbf{x}_0 \in \mathcal{X}$, Then, $V^{h,\pi}_T$ is a .

Figures (10)

  • Figure 1: We propose the rpcbf, which approximates the robust value function $V^{h,\pi}$ of a system under bounded disturbances for policy $\pi$at runtime. The zero sublevel set of $V^{h,\pi}$ is a robust controlled-invariant (CI) set. We apply a rpcbf-sf to ensure safety for any unsafe nominal policy, demonstrating superior performance over the non-robust PCBF- on a quadcopter with model errors treated as disturbances.
  • Figure 2: Value Function Gradient Error for Discrete-Time Double Integrator. We highlight the discretized trajectory (top) and corresponding gradient error (bottom) for three different choices of $\Delta t$ (yellow, purple, red). The gradient of the naive discrete-time approximation has large errors and varies with the choice of $\Delta t$. Taking the maximum of the cubic spline leads to much smaller errors.
  • Figure 3: Summary of RPCBF Algorithm. Given a policy $\pi$, we sample disturbance trajectories, then compute the maximum $h$ with cubic splines to obtain $V^{h,\pi}$ and $\nabla V^{h,\pi}$ (using automatic differentiation). This is used in \ref{['eq:cbf-qp']} to obtain a robust .
  • Figure 4: Filter Boundary and Safe Region for - with varying Horizon $\boldsymbol{T}$ on the Undisturbed Segway. We plot where the nominal policy affects the 's output (Filter Boundary) and the states where the ensures safety over $\bar{T} =30s$ (Safe Region). Trajectories from an initial state within the filter boundary (black dot, $\bullet$) are color-coded by horizon length of the -. A too-short horizon overapproximates the filter boundary, causing unsafe trajectories.
  • Figure 5: Comparison of Filter Boundary and Safe Region on DI (a) and Segway (b). The true unsafe region for the undisturbed is shaded in gray. (R) use horizon $T$ and $N$ samples to derive the value function. The safe region is determined for $\bar{T}$. Trajectories from selected initial states are shown for $\bar{N}=25$ sampled $\mathbf{d}$ trajectories. Red dotted and green solid lines indicate unsafe and safe trajectories, respectively, with the nominal trajectory in black.
  • ...and 5 more figures

Theorems & Definitions (7)

  • Theorem 1
  • proof
  • Corollary 1
  • proof
  • Remark : Connections to Backup Controller /
  • Remark : Connections to
  • Remark : Connections to wabersich2021predictive