---
title: Control Barrier Function (CBF) Theory
url: https://www.emergentmind.com/topics/control-barrier-function-cbf-theory
type: topic
---

# Control Barrier Function (CBF) Theory

Control Barrier Function (CBF) theory formalizes safety constraints in control systems as set-invariance conditions enforced through affine constraints on the control input. Developed to address state and input constraints, CBFs rigorously transform the problem of set invariance into real-time controller synthesis, particularly well-suited to modern optimization-based safety-critical control.

## 1. Formal Definition and Invariance Guarantees

A control-affine system is modeled as
\[
\dot x = f(x) + g(x) u,\quad x \in \mathbb{R}^n,\, u \in \mathcal{U} \subset \mathbb{R}^m
\]
where $f$ and $g$ are locally Lipschitz and $\mathcal{U}$ encodes control limits. The desired safe set is typically specified as a zero-superlevel set of $N$ continuously differentiable barrier functions:
\[
C = \{ x \in \mathbb{R}^n : h_i(x) \ge 0,\; i = 1, \dots, N \}
\]
A $C^1$ function $h(x)$ is a control barrier function (CBF) on a domain $D \supset C$ if there exists an extended class–$\mathcal{K}$ function $\alpha$ such that
\[
\forall x \in D,\, \exists u \in \mathcal{U} : \quad L_f h(x) + L_g h(x)\, u + \alpha(h(x)) \ge 0
\]
with $L_f h(x) = \nabla h(x)^\top f(x),\, L_g h(x) = \nabla h(x)^\top g(x)$. For multiple constraints, the input set is determined by the intersection:
\[
K(x) = \Big\{ u \in \mathcal{U} : A(x) u + b(x) \ge 0 \Big\}
\]
where $A(x)$ stacks the $L_g h_i(x)$ row vectors and $b(x)$ stacks $L_f h_i(x) + \alpha_i(h_i(x))$. Forward invariance of $C$ is guaranteed for all $u(x) \in K(x)$ via Nagumo’s set invariance theorem [2209.02284].

## 2. Multiple Barriers and Compatibility

When multiple CBF constraints are imposed, their compatibility may not be automatic, particularly under input bounds. Compatibility holds if $K(x) \neq \emptyset$ for all $x \in D$. If not, the associated quadratic program (QP) for real-time controller synthesis is infeasible, and safety cannot be enforced.

Robust compatibility strengthens each barrier inequality to
\[
L_f h_i(x) + L_g h_i(x) u + \alpha_i(h_i(x)) \ge \eta
\]
where $\eta > 0$ is a margin ensuring invariance against additive state disturbances with worst-case Lie derivative bounded by $\eta$. The maximal attainable uniform slack $c(x)$, defined as
\[
c(x) = \max_{u \in \mathcal{U},\, t \in \mathbb{R}} t \;\; \text{s.t.}\;\; A(x) u + b(x) \ge t \mathbf{1}
\]
quantifies the compatibility at each $x$ [2209.02284].

## 3. Quadratic Program (QP) Controller Synthesis

CBF-based controllers are commonly synthesized via an online QP:
\[
u^*(x) = \arg\min_{u \in \mathbb{R}^m} \frac{1}{2} \|u - u_{\rm nom}(x)\|^2
\]
subject to
\[
A(x) u + b(x) \ge 0,\quad u_{\min} \leq u \leq u_{\max}
\]
where $u_{\rm nom}(x)$ is a performance-oriented nominal controller, and actuator limits are explicit. The QP’s feasibility directly depends on CBF compatibility [2209.02284].

Certified feasibility is essential; otherwise, some states may violate safety constraints. If the QP admits a solution at each $x \in C$, the closed-loop system is provably forward-invariant in $C$.

## 4. Algorithmic Verification of Compatibility

A rigorous grid-based offline certification algorithm establishes robust compatibility or finds counterexamples. The procedure exploits global Lipschitz bounds of $A(x)$ and $b(x)$:
\[
\|A(x) - A(y)\|_\infty \le L_A \|x - y\|_\infty,\quad \|b(x) - b(y)\|_\infty \le L_b \|x - y\|_\infty
\]
At each lattice center $x_k$, calculate $c_k = c(x_k)$ and optimizer $u_k^*$. The cube $B(x_k,\rho_k)$, with radius
\[
\rho_k = \frac{2 c_k}{L_A \|u_k^*\|_\infty + L_b}
\]
is certified compatible. Shells where $\rho_k < r$ are recursively refined. The algorithm terminates finitely under a uniform robustness margin $\eta > 0$, providing either a compatibility certificate or an upper bound $\eta'$ [2209.02284].

## 5. Numerical Illustration and Complexity

Representative examples use 2-dimensional control-affine dynamics with box-bounded inputs and annular safety regions. Key parameters (grid size $r_0$, refinement factor $\lambda$, Lipschitz constants $L_A$, $L_b$) determine computational cost. Compatible and incompatible input bounds yield respectively (i) finite certification time—three iterations with $U_{\max}=3$, (ii) immediate detection of incompatibility with $U_{\max}=2$. Robust margin bounds are empirically validated.

The algorithm is restricted by the curse of dimensionality; practical application is limited to $n \leq 4$. Local Lipschitz estimations and boundary-only certification can mitigate computational burden [2209.02284].

## 6. Extensions and Limitations

Further improvements include:
- Restricting verification to neighborhoods of $\partial C$ (boundary-only certification)
- Employing non-cube coverings or adaptive tessellations
- Generalizing to time-varying systems and sets by state-space augmentation with time
- Utilizing local Lipschitz constants for reduced conservatism

Limitations center on dimensionality and conservatism. Grid refinement scales exponentially with state dimension. Over-conservatism may occur due to global Lipschitz bounds and can be reduced by employing local analysis.

The presented grid-based certification framework guarantees offline verification of feasibility for multiple CBF constraints under input bounds, ensuring QP-based controller synthesis can be conducted with provable online feasibility [2209.02284]. This is fundamental for robust safety-critical control design in input-constrained, multi-barrier control systems.

Source: https://www.emergentmind.com/topics/control-barrier-function-cbf-theory