---
title: Reciprocal Barrier Functions in Safety Control
url: https://www.emergentmind.com/topics/reciprocal-barrier-functions-rbfs
type: topic
---

# Reciprocal Barrier Functions in Safety Control

A Reciprocal Barrier Function (RBF) is a mathematical construct used in safety-critical control to encode forward invariance of a prescribed safe set. The fundamental operation is the reciprocity transform: given a continuously differentiable function $h:\mathbb{R}^n\to\mathbb{R}$ defining the safe set $\mathcal{C} = \{x\mid h(x)\ge0\}$, the reciprocal barrier is defined as $B(x) = 1/h(x)$ on $\mathrm{Int}(\mathcal{C}) = \{x\mid h(x)>0\}$. RBFs—and their controlled, stochastic, and neural network-parameterized extensions—play a central role in real-time safety-critical control, including deterministic, stochastic, and disturbance-affected systems. RBF-based safety constraints are frequently integrated into quadratic program (QP) formulations, allowing joint mediation of safety and performance objectives [1609.06408, 2003.03498, 2209.08728, 2504.11045, 2507.18888, 2312.02430].

## 1. Core Definition and Deterministic Invariance Guarantees

Let $h:\mathbb{R}^n \rightarrow \mathbb{R}$ be $C^1$. The safe set is
\[
\mathcal{C} = \{x \in \mathbb{R}^n : h(x) \geq 0\}, \quad \mathrm{Int}(\mathcal{C}) = \{h(x) > 0\}.
\]
Define $B(x) = 1/h(x)$ on $\mathrm{Int}(\mathcal{C})$.

For the control-affine dynamics
\[
\dot{x} = f(x) + g(x)u, \quad x \in \mathbb{R}^n, \ u \in U \subset \mathbb{R}^m,
\]
a **reciprocal control barrier function** satisfies that for all $x \in \mathrm{Int}(\mathcal{C})$ there exists $u \in U$ so that
\[
L_f B(x) + L_g B(x) u \leq \alpha B(x), \qquad \alpha > 0,
\]
where $L_f B = \nabla B(x)f(x)$, $L_g B = \nabla B(x)g(x)$. If $u$ can always be chosen to satisfy this constraint, $\mathrm{Int}(\mathcal{C})$ is forward invariant: trajectories initialized in $\mathcal{C}$ remain in $\mathcal{C}$ for all future time [1609.06408]. As $x$ approaches the boundary $h(x) \to 0^+$, $B(x) \to +\infty$, and the constraint asymptotically relaxes, which ensures a strong "repulsive" behavior away from unsafe states.

## 2. Quadratic Program Synthesis and Integration with Control Lyapunov Functions

RBF constraints are linear (affine) in $u$, allowing their seamless integration with other affine objectives, such as those derived from equilibrium-stabilizing Control Lyapunov Functions (CLFs), in pointwise quadratic programs [1609.06408, 2504.11045]. A typical QP-based control law is:
\[
\begin{array}{rl}
    u^*(x) = \underset{u \in U}{\arg\min} & \|u - u_{\text{des}}\|^2 \\
    \text{s.t.} & L_f V(x) + L_g V(x) u \leq -\gamma V(x), \\
                & L_f B(x) + L_g B(x) u \leq \alpha B(x)
\end{array}
\]
where $V$ is a CLF, and $B$ is a RBF. The safety constraint is enforced as a hard barrier, while the CLF may be relaxed to mediate safety and performance, as in adaptive cruise control and lane keeping [1609.06408].

## 3. Stochastic Reciprocal Barrier Functions (RCBFs)

Stochastic extensions of RBFs are critical for safety-critical systems subject to diffusion-type noise, often represented by Itô SDEs:
\[
dX_t = [f(X_t) + g(X_t)u_t]\,dt + \sigma(X_t)\,dW_t
\]
with $h$ and $B$ as above. A **stochastic reciprocal CBF** $B$ satisfies for all $x$ in the interior of the safe set:
\[
\mathcal{L}_{f,g,\sigma}(u_o(x),u,B(x)) \leq \gamma B(x)
\]
where $\mathcal{L}$ is the extended generator:
\[
\mathcal{L}_{f,g,\sigma}(u_o,u,B) = \nabla B\,f + \nabla B\,g(u_o+u) + \frac{1}{2}\operatorname{tr}[\sigma\sigma^\top D^2B].
\]
Enforcing this constraint almost surely guarantees invariance of the safe set under stochastic trajectories [2003.03498, 2209.08728].

A distinctive property of stochastic RCBFs, established via maximal inequality and Tanaka's formula, is that if the control $u$ satisfies the generator inequality at all times, then $\Pr[X_t\in \mathcal{C},\ \forall t\ge0]=1$ [2312.02430]. The generator condition imposes that the ratio of drift to diffusion in the Itô dynamics must diverge faster than $1/h(x)$ as $h\to0$, or safety fails with nonzero probability, regardless of unbounded drift [2312.02430].

## 4. Extensions: High-Order, Disturbance-Robust, and Observer-Based RBFs

Expansion of RBF theory encompasses several advanced formulations:

- **High-order RBFs** address safe sets defined by functions with higher relative degree. They recursively define additional variables to reduce the effective relative degree to one, generalizing the invariance result with affine-in-$u$ constraints [2003.03498, 2507.18888].
- **Reciprocal Resistance–based Barrier Functions (RRBFs)** introduce a resistance-like correction, replacing standard ZBF conditions with
  \[
  \Lie_f h(x) + \alpha(h(x)) - \beta(1/h(x)) \geq 0
  \]
  and, for systems with control,
  \[
  \Lie_f h(x) + \Lie_g h(x) u + \alpha(h(x)) - \beta(1/h(x)) \geq 0
  \]
  Here, $\beta(1/h(x))$ diverges near the safe set boundary, robustly dominating disturbances. RRBFs naturally create an interior "robust safe set" $\mathcal{S} = \{h(x) \ge h_s\}$, and exhibit superior resilience near $\partial\mathcal{C}$ compared to both classic RBFs and ZBFs [2507.18888].
- **Disturbance observer–based RRCBFs (DO-RRCBF)** further admit additive unmodeled disturbance estimates $\hat{d}(x)$. Their admissible input sets remain valid for any bounded disturbance, without explicit knowledge of its bound [2507.18888].
- **Observer-based RBF synthesis** addresses uncertain state measurement, with RBF constraints designed on state estimates (e.g., via Extended Kalman Filtering), and additional terms to bound estimation error [2003.03498].

## 5. Comparisons with Zeroing Barrier Functions (ZBFs) and Related Notions

Zeroing Barrier Functions (ZBFs), which enforce the constraint
\[
L_f h(x) + L_g h(x) u \geq -\beta(h(x)),
\]
provide an alternative certificate for set invariance. Under suitable assumptions, RBF (`$B=1/h$') and ZBF (`$h$') formulations are dual: each can be constructed from the other and both guarantee forward invariance [1609.06408, 2504.11045]. However, in stochastic settings, sufficient conditions for ZBF almost-sure invariance were shown to be invalid in general, while RCBFs retain almost-sure guarantees if the aforementioned drift/diffusion ratio diverges sufficiently fast [2312.02430]. RBF-based constraints are numerically convenient (affine in $u$), whereas ZBFs avoid the unboundedness of $B$ near the boundary, which can introduce ill-conditioning in computation [1609.06408].

RRBFs, by introducing a reciprocal resistance term $\beta(1/h(x))$, claim both improved disturbance robustness and inner "buffer sets" that ZBF and standard RBF approaches lack [2507.18888].

## 6. Neural Synthesis of Reciprocal CBFs

Physics-informed neural networks (PINNs) enable the direct data-driven synthesis of neural RBFs for complex, high-dimensional, or hard-to-parameterize systems. The neural RBF is defined as $B(x)=1/h(x)$, with a bounded transformation $W_N(x)=\beta(B(x))$ (e.g., $\tanh$), enforced via a loss function incorporating the Zubov PDE, boundary, and supervised-safe/unsafe sample sets. This approach enables scalable specification of flexible safe sets, which can be smoothly tuned in training via the choice of $h(x)$ and the sample set [2504.11045].

A case study on the inverted pendulum shows that trained neural RBFs provide forward-invariant sublevel sets, whose boundary can be adjusted post hoc, and which can be incorporated into QP-based controllers analogously to analytic RBFs [2504.11045].

## 7. Representative Applications, Limitations, and Research Directions

RBFs and their variants have been applied in diverse contexts:
- **Automotive Safety**: Adaptive cruise control (ACC) and lane keeping, leveraging QP-based mediation of safety vs. performance—even under actuator constraints [1609.06408, 2507.18888].
- **Stochastic Multi-agent Collision Avoidance**: Ensuring almost-sure safety in noisy, decentralized robotic systems via RCBF-based safety constraints [2003.03498].
- **Disturbed and Unmodeled Systems**: Reciprocal resistance-based RBFs enforce safety under unknown or time-varying disturbances, outperforming standard RBF and ZBF approaches in numerical studies [2507.18888].

**Limitations** include the potential for control input (and thus actuator commands) to diverge near the safe set boundary due to $B(x)\rightarrow\infty$, as well as challenges in digital (sample-and-hold) realization. ZBF-based and RRBF-based formulations can mitigate certain numerical issues and further extend robustness. The stochastic RCBF framework in particular exposes subtle requirements on the drift/diffusion scaling for effectiveness; insufficient drift divergence will not prevent stochastic exit from the safe set.

Ongoing research areas include stochastic generalizations (e.g., relaxing constant gain to class-$\mathcal{K}_\infty$), unified stochastic QP integration of safety and performance, hybrid and time-varying systems, robustification to model uncertainties, and efficient data-driven neural synthesis for high-dimensional systems [2209.08728, 2312.02430, 2504.11045, 2507.18888].

---
**Key references**: [1609.06408], [2003.03498], [2209.08728], [2312.02430], [2504.11045], [2507.18888]

Source: https://www.emergentmind.com/topics/reciprocal-barrier-functions-rbfs