---
title: High-Order Control Barrier Functions
url: https://www.emergentmind.com/topics/high-order-control-barrier-function-hocbf
type: topic
---

# High-Order Control Barrier Functions

High-Order Control Barrier Functions (HOCBFs) are an advanced formalism for synthesizing safety filters in real-time control systems, enabling provable safety guarantees for systems with control-affine dynamics and safety constraints that exhibit higher relative degree. HOCBFs extend classical Control Barrier Functions (CBFs) to settings where the control action does not directly influence the first-time derivative of a safety function, and instead manipulates higher-order derivatives. This approach is instrumental in domains such as autonomous driving, multi-agent coordination, and complex robotics, where guaranteeing collision avoidance and invariant set constraints under dynamic and geometric uncertainty is critical.

## 1. Mathematical Formulation of HOCBFs

In systems with control-affine dynamics,
\[
\dot{x} = f(x,t) + g(x,t)u,
\]
a time-varying safety set is specified via a continuously differentiable function $h(x,t)$, with the safe set defined as $\mathcal{C}(t)=\{x: h(x,t)\ge 0\}$. When $h$ has relative degree $m \geq 2$, direct control input $u$ only manifests at the $m$-th derivative level.

HOCBF methodology constructs a sequence of auxiliary functions:
\[
\psi_0 = h, \quad \psi_k = \frac{d}{dt}\psi_{k-1} + \alpha_k(\psi_{k-1}),\quad k=1,\dots,m,
\]
where $\alpha_k(\cdot)$ are extended class-$\mathcal{K}$ functions (typically linear for QP tractability). The crucial safety condition is then
\[
\psi_m(x,u,t) = L_f^m h + L_g L_f^{m-1} h\;u + S(h) + \alpha_m(\psi_{m-1}) \geq 0,
\]
with $L_f^k$ denoting the $k$-th order Lie derivative along $f$ and $L_g$ for $g$. When applied, this constraint set is enforced within each control cycle.

## 2. Flexible HOCBF (F-HOCBF) Instantiations

Flexible HOCBFs (F-HOCBFs) refine the base methodology to handle time-varying safety margins and irregularly shaped obstacles. In intersection control for connected and automated vehicles (CAVs) [2511.05886], the safety function is constructed from geometric primitives:
\[
h(X,t) = d_{\min}(t) - d_{\rm safe},
\]
where $d_{\min}(t)$ is the minimum distance from the ego position $p(t)$ to the perimeter $e(\sigma,t)$ of all dynamic obstacles (vehicles treated as adaptive ellipses),
\[
d_{\min}(t) = \min_{\sigma \in [0,2\pi]} \left\| p(t) - e(\sigma,t) \right\|.
\]
This formulation allows real-time adaptability under non-convex and time-variant geometry.

## 3. Real-Time Safety Filter: Quadratic Programming Integration

The enforcement of HOCBF constraints is operationalized via Quadratic Programming (QP). For each control loop, the nominal control ($u_1$) produced by trajectory tracking (e.g., LQR/PD controller) is corrected by a minimal adjustment $u_2$ to satisfy the HOCBF constraint:
\[
\begin{aligned}
&\min_{u_2,\beta}  && \|u_2\|^2 + Q(\beta - \beta_0)^2 \\
&\text{s.t.} && A(x)(u_1 + u_2) + b(x) + \beta \geq 0\\
&&& u_{\min} \leq u_1 + u_2 \leq u_{\max},\quad \beta \geq 0
\end{aligned}
\]
Here, $\beta$ is a slack variable for soft feasibility, $A(x)$ and $b(x)$ are derived from the Lie derivatives, and $Q$ modulates constraint violation penalty. This structure enables high-frequency execution (>100 Hz) on embedded hardware using standard QP solvers due to the low dimensionality (2 controls + 1 slack).

## 4. Coupling With Hierarchical Control and Trajectory Tracking

In hierarchical control architectures for intersection management, the HOCBF filter operates at the bottom execution layer, downstream of discrete-time trajectory planning (offline via differential dynamic programming and online via LQR/PD tracking). The nominal controller tracks a reference trajectory,
\[
x_{k+1} = A_k x_k + B_k \delta_k,
\]
while the HOCBF-based QP ensures all outputs $u$ keep the system inside dynamically evolving safe sets. The LQR update is performed through Riccati recursion, and feed-forward terms such as $\delta_{\rm ff}(v,\kappa_{\rm ref})$ account for curvature and velocity slip in high-fidelity vehicle models.

## 5. Computational Complexity and Scalability

The computational burden is dominated by per-cycle QP and geometric search (for $d_{\min}$), plus discrete Riccati updates for tracking. Per the simulation data [2511.05886],
- Each vehicle executes one 3-variable QP, geometric collision search (5–8 golden-section grid points), and controller update in under 1 ms.
- Achievable control loop frequency is routinely in the 150–200 Hz range for up to a few dozen vehicles.
- The top-layer fairness allocator operates in $O(N^2)$ per cycle, with $N \lesssim 50$ yielding sub-millisecond allocation runtimes.

This suggests the F-HOCBF approach is compatible with stringent real-time and scalability requirements in dense multi-agent environments characteristic of urban intersections.

## 6. Empirical Performance and Safety Guarantees

In simulation, HOCBF-based safety filtering—integrated into fairness-aware hierarchical control—produces:
- Zero collision occurrences across all tested scenarios
- Minimum inter-vehicular distance tightly controlled (≈0.14 m in dense traffic, never violating $d_{\rm safe}=2$ m)
- High fairness (Jain’s index $J \approx 0.98$, Gini ≈ 0.05 under heavy unbalanced demand)
- Efficiency improvements: throughput up to 3,480 veh/hr (vs. baseline 1,440 veh/hr), reduced average delay (3.92 s vs. 5.06 s), and lower delay variance (1.28 s vs. 1.90 s)
- Real-time feasibility with 10th–90th percentile loop rates in [100 Hz, 250 Hz]

## 7. Limitations, Extensions, and Broader Applicability

Current HOCBF instantiations in intersection control authorize only a single vehicle per cycle; multi-slot allocation (with concurrent non-conflicting agents) remains a potential extension. The general HOCBF methodology is suitable for other domains requiring the enforcement of safety constraints with higher relative degree, including aerial robotics, multi-agent racing games (where discrete rules are tracked by continuous HOCBF-based controllers), and swarms under dynamic obstacle fields.

Further research avenues include learning-based parameter tuning for the class-$\mathcal{K}$ functions, hardware-in-the-loop validation under stochastic sensor delays, and expansion to mixed-autonomy settings with heterogeneous agent behaviors.

---

In summary, High-Order Control Barrier Functions form a mathematically rigorous and practically scalable foundation for enforcing complex safety constraints in real-time hierarchical control systems. Their integration into fairness-aware control architectures demonstrates that strict safety and fairness guarantees are achievable simultaneously, at real-time control rates, under adversarial dynamic conditions [2511.05886].

Source: https://www.emergentmind.com/topics/high-order-control-barrier-function-hocbf