---
title: Matrix Control Barrier Functions
url: https://www.emergentmind.com/topics/matrix-control-barrier-functions
type: topic
---

# Matrix Control Barrier Functions

Matrix Control Barrier Functions (MCBFs) generalize control barrier functions by replacing scalar barrier functions with matrix-valued functions \(H:\mathbb{R}^n\to\mathbb{S}^p\). Safe sets are then defined by matrix inequalities, most commonly \(H(x)\succeq 0\), and safety is enforced through Loewner-order differential or difference inequalities rather than scalar superlevel conditions. This framework was introduced to represent safe sets that are naturally semidefinite, indefinite, spectral, Boolean-composed, or nonsmooth, and it has since been extended to discrete-time systems, sampled-data zero-order-hold control, adversarial multi-agent settings, and high-relative-degree matrix constraints [2508.11795] [2510.09925] [2603.18307] [2604.03450].

## 1. Formalism and invariance conditions

For a control-affine system
\[
\dot x=f(x)+g(x)u,
\]
with \(x\in\mathbb{R}^n\) and \(u\in\mathbb{R}^m\), an MCBF is built from a symmetric matrix-valued map \(H:\mathbb{R}^n\to\mathbb{S}^p\). The entrywise Lie derivative is defined by
\[
[L_FH]_{ij}(x)=L_FH_{ij}(x),
\]
and for control-affine dynamics,
\[
\dot H(x,u)=L_fH(x)+\sum_{i=1}^m L_{g_i}H(x)u_i.
\]
The foundational continuous-time theory distinguishes three closely related formulations. In the semidefinite case, the safe set is
\[
C=\{x\in\mathbb{R}^n\mid H(x)\succeq 0\},
\]
and an exponential MCBF requires
\[
\dot H(x,u)\succ -c_\alpha H(x)
\]
for some \(c_\alpha>0\). In the indefinite case, the safe set is
\[
C=\{x\in\mathbb{R}^n\mid H(x)\not\prec 0\}=\{x\in\mathbb{R}^n\mid \lambda_p(x)\ge 0\},
\]
and the barrier condition is
\[
\dot H(x,u)\succ -\alpha(\lambda_p(x))I_{p\times p}-c_\perp\big(\lambda_p(x)I_{p\times p}-H(x)\big).
\]
The general semidefinite formulation applies a class-\(\mathcal K_{\rm ext}\) function spectrally:
\[
H(x)=V(x)\Lambda(x)V(x)^\top,\qquad
\bar\alpha(H(x))=V(x)\Lambda_\alpha(x)V(x)^\top,
\]
with \(\Lambda_\alpha(x)=\operatorname{diag}(\alpha(\lambda_1(x)),\dots,\alpha(\lambda_p(x)))\), and requires
\[
\dot H(x,u)\succ -\bar\alpha(H(x)).
\]
These matrix inequalities are sufficient for control invariance, and the corresponding autonomous matrix barrier conditions imply eigenvalue comparison results such as
\[
\lambda_i(x(t))\ge \lambda_i(x_0)e^{-c_\alpha t}
\]
in the exponential semidefinite case [2508.11795].

## 2. Safe-set geometry and logical expressiveness

The principal representational advantage of MCBFs is that matrix inequalities describe a richer class of safe sets than scalar inequalities. Semidefinite constraints \(H(x)\succeq 0\) include spectrahedra and direct eigenvalue lower bounds, while indefinite constraints \(H(x)\not\prec 0\) encode sets defined by nonnegativity of the largest eigenvalue. In the foundational formulation, diagonal semidefinite matrices recover conjunctions of scalar CBF constraints, and diagonal indefinite matrices recover disjunctions. This is the basis for the claim that the matrix framework naturally provides a continuous safety filter for Boolean-based control barrier functions, notably disjunctions (OR), without relaxing the safe set. The cylinder example is representative: “outside the cylinder” is expressed as a disjunction and then written as an indefinite matrix inequality rather than through a soft-max or nonsmooth scalar surrogate [2508.11795].

The same geometric viewpoint appears in later multi-agent formulations. In sampled-data MCBFs for heterogeneous agents, the safe set is
\[
\mathcal S=\{\vec x\in\mathbb{R}^n:H(\vec x)\succeq 0\},
\]
with \(H:\mathbb{R}^n\to\mathbb{S}^p\), so collective safety can be encoded directly in the aggregate state rather than through pairwise scalar barriers. The paper explicitly motivates MCBFs by their ability to encode direct eigenvalue constraints, spectrahedra, and combinatorial \(p\)-choose-\(r\) constraints. This suggests that MCBFs are not merely a compact notation for stacked scalar inequalities; they are a distinct cone-valued safety formalism whose native objects are symmetric matrices and Loewner-order inequalities [2603.18307].

## 3. Optimization-based synthesis in continuous, discrete, and sampled-data time

In continuous time, the standard implementation is a semidefinite-program safety filter. For the exponential semidefinite case, the controller is obtained from
\[
k(x)=\arg\min_{u\in\mathbb{R}^m}\|u-k_d(x)\|^2
\quad\text{s.t.}\quad
\dot H(x,u)\succeq -c_\alpha H(x),
\]
with analogous CBF-SDPs for indefinite and general spectral-class-\(\mathcal K\) MCBFs. A central theoretical result is continuity of these safety filters on a neighborhood of the safe set, derived from strict feasibility, continuity of the matrix inequality data, convexity of the feasible set in \(u\), and lower semicontinuity of the feasible-set map. The same paper also proves a non-constructive existence result: if \(H\) is an exponential MCBF, then there exists a smooth controller satisfying the strict matrix inequality on a neighborhood of the safe set [2508.11795].

In discrete time, the direct analogue is the Discrete-Time Exponential Matrix Control Barrier Function (DTE-MCBF), defined for
\[
x_{k+1}=f(x_k)+g(x_k)u_k
\]
through
\[
H(f(x)+g(x)u)\succeq (1-\gamma)H(x),\qquad 0<\gamma\le 1.
\]
The associated safe-input set is
\[
K_H(x)=\{u\in\mathbb{R}^m:H(f(x)+g(x)u)\succeq (1-\gamma)H(x)\},
\]
and the theory includes a zeroing property:
\[
\lambda_1(H_k)\ge (1-\gamma)^k\lambda_1(H_0).
\]
Because \(H(f(x)+g(x)u)\) is generally nonconvex in \(u\), the paper introduces safe subset functions \(H(z,x)\) and the Subset-based DTE-MCBF (SDTE-MCBF), then constructs a projection-based convex reformulation using supporting halfspaces of convex unsafe components. The resulting online method uses two sequential convex optimization problems per time step: projections onto convex unsafe components, followed by a quadratic program / constrained linear least-squares problem for the control correction. In the bicopter study, the reported average runtimes per iteration were \(5.251\times 10^{-6}\ {\rm s}\) for PDTE-MCBF with `lsqlin`, \(3.113\times 10^{-5}\ {\rm s}\) for a nonconvex CBF solved with `fmincon`, and \(9.414\times 10^{-1}\ {\rm s}\) for a nonconvex CBF solved with YALMIP/MOSEK via `bmibnb` [2510.09925].

For sampled-data zero-order-hold control, the continuous-time matrix inequality must remain valid over each inter-sample interval while the control remains frozen. The Zero-order-hold Exponential Matrix Control Barrier Function (ZE-MCBF) therefore strengthens the sample-time condition by the conservative margin
\[
\delta(\Delta_t,c_\alpha)=\Delta_t\bigl(L_{FH}+L_{GH}b_u+c_\alpha L_H\bigr)(b_F+b_Gb_u),
\]
yielding
\[
\mathcal{L}_F H(\vec x)+(\mathcal{L}_G H(\vec x))(\vec u)\succeq -c_\alpha H(\vec x)+\delta(\Delta_t,c_\alpha)I.
\]
The corresponding feasible set is
\[
K(\vec x)=\{\vec u\in\mathcal U:\Psi(\vec x,\vec u)\succeq \delta(\Delta_t,c_\alpha)I\},
\]
and the forward-invariance proof combines the inter-sample norm bound with Weyl’s inequality. The online synthesis problem is a convex conic / semidefinite program that minimally modifies a nominal control and is centralized in the aggregate control vector \(\vec u\) [2603.18307].

## 4. High-order MCBFs and matrix relative degree

When the control does not appear in the first derivative of the matrix safety function, first-order MCBFs are insufficient. High-Order Matrix Control Barrier Functions (HOMCBFs) address this by defining
\[
\psi_1(x)=H(x),\qquad
\psi_{i+1}(x)=L_f\psi_i(x)+\alpha_i(\psi_i(x)),\quad i\in[r-1],
\]
and associated sets
\[
C_i=\{x\in\mathbb{R}^n:\psi_i(x)\succeq 0\}.
\]
The high-order barrier condition is imposed at the first level \(r\) where the control enters:
\[
\dot\psi_r(x,u)=L_f\psi_r(x)+\sum_{j=1}^m L_{g_j}\psi_r(x)u_j \succ -\alpha_r(\psi_r(x)).
\]
Forward invariance is then proved for
\[
\bigcap_{i\in[r]}C_i.
\]
The key conceptual advance is matrix relative degree. A smooth \(H\) has matrix relative degree \(r\) at \(x\) if \(L_{g_j}L_f^kH(x)=0\) for every \(j\in[m]\) and \(k\in\{0,\dots,r-2\}\), and if there exists \(u\in\mathbb{R}^m\) such that
\[
V_r(x)^\top\left(\sum_{j=1}^m L_{g_j}L_f^{r-1}H(x)\,u_j\right)V_r(x)\succ 0,
\]
where \(V_r(x)\) spans the minimum eigenspace of \(\psi_r(x)\). This replaces the scalar nonvanishing Lie-derivative condition with controllability of the directions in which semidefiniteness is first lost. The same paper also defines well-posedness for single-integrator matrix safe sets through an inward-pointing condition on the minimum eigenspace and introduces the optimal-decay formulation
\[
\dot\psi_r(x,u)\succ -\omega \alpha_r(\psi_r(x)),\qquad \omega\in\mathbb{R}_{\ge 0},
\]
which yields forward invariance while requiring control only over the minimum eigenspace [2604.03450].

A sampled-data counterpart appears in the adversarial multi-agent setting. There the recursive quantities are
\[
\Psi_0(\vec x)=H(\vec x),\qquad
\Psi_q(\vec x)=\dot\Psi_{q-1}(\vec x)+c_{\alpha_q}(\Psi_{q-1}(\vec x)),\quad 1\le q\le r-1,
\]
with the first control-dependent matrix quantity \(\Psi_r\) incorporating both normal and adversarial inputs. The safe-set hierarchy
\[
S_q=\{\vec x\in\mathbb{R}^n:\Psi_{q-1}(\vec x)\succeq 0\},\qquad
S_Q=\bigcap_{q=1}^r S_q
\]
parallels scalar high-order CBF constructions, but the invariance proof is carried out through recursive matrix inequalities and Loewner positivity. This formulation underlies the High-Order ARZE-MCBF theorem for adversarially robust sampled-data invariance [2603.18307].

## 5. Applications and empirical demonstrations

The first major application area is connectivity maintenance in multi-UAV networks. In the continuous-time foundational paper, five planar single-integrator UAVs are controlled with a centralized CBF-SDP that combines a Laplacian-based MCBF
\[
H(x)=L(x)+\frac{\varepsilon}{p}\mathbf 1_p\mathbf 1_p^\top-\varepsilon I_{p\times p}
\]
with pairwise collision-avoidance scalar CBFs. In simulation and hardware, the reported outcome is that the network remains connected, collision avoidance is preserved, and the control inputs remain continuous even when Laplacian eigenvalues merge or cross. The hardware experiment used five Crazyflie 2.1+ quadrotors, OptiTrack localization at \(240\) Hz, an offboard centralized controller, Clarabel as the SDP solver, solve times around \(1\)–\(2\) ms, and onboard low-level attitude control at \(1000\) Hz [2508.11795].

Discrete-time nonconvex safety filtering is illustrated on a bicopter in a vertical plane. The example combines a circular obstacle centered at
\[
p_{\mathfrak C}=\begin{bmatrix}2\\-0.75\end{bmatrix}\ {\rm m},\qquad r_{\mathfrak C}=1\ {\rm m},
\]
velocity bounds, and reference-tilt bounds. The controller computes safe outer-loop accelerations by solving the projection-based DTE-MCBF program with \(Q=1\), \(\gamma=0.1\), and \(\epsilon=0.2\). The numerical comparison reports that PDTE-MCBF and the YALMIP-based nonconvex method recover from entering the buffer and return to the safe set, while the `fmincon` nonconvex method fails to recover and enters the unsafe set in the shown simulation [2510.09925].

High-order matrix safety is demonstrated on a localization problem for a double integrator with a nonlinear measurement model. The safe set is defined by
\[
S=\left\{x\in\mathbb{R}^n:H(x)\triangleq \nabla_{\hat x}^2J(x)+\lambda_s I\succeq 0\right\},
\]
so safety corresponds to maintaining sufficient positive definiteness of the Hessian of a nonlinear least-squares objective. Because the Hessian depends on position but not velocity, the matrix constraint has relative degree two and is handled with the OD-HOMCBF construction. The paper presents both range-only and bearing-only measurement models, and the safety filter modifies a nominal LQR controller while state estimation is performed by solving the nonlinear least-squares problem via gradient descent [2604.03450].

## 6. Related formulations, misconceptions, and limitations

A recurrent source of confusion is that not every CBF method built from matrix data is a matrix-valued barrier theory in the strict sense. One nearby line of work addresses task-space singularity avoidance by constructing scalar barriers from eigenvalues or singular values of a state-dependent matrix. There the central matrix object is
\[
\phi(x)=J(x)g(x),
\]
or its Gram matrix \(M(x)=\phi(x)\phi(x)^\top\) or \(\phi(x)^\top\phi(x)\), and the barrier is of the form
\[
h_i(x)=\lambda_i(x)-\epsilon.
\]
This is a scalar CBF built from a matrix-derived spectral certificate, not a direct matrix inequality preserved through a matrix differential inequality. The distinction matters because direct MCBFs avoid explicit eigenvalue differentiation and support semidefinite-program constraints in the control input, whereas spectral scalarizations inherit smoothness issues at repeated eigenvalues [2603.23753].

Two other neighboring theories are often grouped with MCBFs because they produce structured vector or matrix-like control constraints while remaining scalar at the barrier level. The first is the compatibility theory for multiple ECBFs on vector-valued outputs under box constraints. There the output has vector relative degree, the decoupling matrix
\[
B(x)=
\begin{bmatrix}
b_1(x)^\top\\
\vdots\\
b_m(x)^\top
\end{bmatrix}
\]
is invertible, the \(2m\) scalar ECBF inequalities are automatically compatible, and choosing \(G(x)=B(x)^\top B(x)\) yields a closed-form controller with
\[
b_i(x)^\top G^{-1}(x)b_j(x)=\delta_{ij}.
\]
The second is the multi-input HOCBF literature for scalar barriers with vector controls, where a relative degree set records the derivative order at which each control channel first appears, and integral augmentation or barrier transformation is used to recover affine inequalities in a control vector. Both frameworks are structurally relevant to stacked or matrix-shaped safety constraints, but neither introduces a genuine matrix-valued barrier object or Loewner-order invariance condition [2509.04220] [2203.07978].

The current MCBF literature also has clear limitations. Continuous-time MCBF safety filters are proved continuous, but local Lipschitz continuity remains open; semidefinite programs are computationally heavier than quadratic programs; sampled-data margins such as \(\delta(\Delta_t,c_\alpha)I\) are conservative and become stricter as \(\Delta_t\) increases; multi-agent sampled-data synthesis is centralized in aggregate coordinates; and high-order matrix theory certifies invariance of the recursive intersection \(\bigcap_i C_i\), which may be smaller than the original safe set. In addition, matrix-relative-degree verification is pointwise and can be difficult globally, and the high-order theory presently assumes smooth symmetric matrix maps for control-affine systems [2508.11795] [2603.18307] [2604.03450].

In this sense, Matrix Control Barrier Functions now comprise a distinct branch of barrier-based safety analysis: one centered on cone-valued safety objects, spectral geometry, and semidefinite optimization, rather than on scalar superlevel sets alone. The resulting theory unifies continuous-time semidefinite barriers, exact Boolean disjunctions, discrete-time subset-based convexification, sampled-data robustness margins, and high-order minimum-eigenspace control within a common matrix-inequality framework.

Source: https://www.emergentmind.com/topics/matrix-control-barrier-functions