Skip to content

Instantly share code, notes, and snippets.

@jaskiratsingh2000
Created October 7, 2025 14:24
Show Gist options
  • Save jaskiratsingh2000/598e3467085008a63df4096fbf3941ba to your computer and use it in GitHub Desktop.
Save jaskiratsingh2000/598e3467085008a63df4096fbf3941ba to your computer and use it in GitHub Desktop.

Heat Potential Vector-Field CBFs for Multi-Robot Navigation

Rohan Chandra

Abstract—This paper develops a comprehensive and selfcontained background on control barrier functions (CBFs), covering fundamental notions of forward invariance, Nagumo's viability theorem, Lie derivatives, zeroing and reciprocal CBFs, high relative degree and higher-order CBFs, robustness to disturbances, sampled-data and discrete-time variants, and CLF-CBF quadratic programs with feasibility guarantees. Building on this foundation, we introduce Vector-Field Control Barrier Functions (VFCBFs), where the barrier is a vector object rather than a scalar function. We present two complementary formulations. The first enforces directional safety by constraining the system velocity relative to a prescribed barrier vector field. The second enforces evolutionary safety via Lie-bracket constraints that regulate how the barrier field itself evolves under the closed-loop flow. We also give a third formulation for vector-valued barrier functions that enforces a tangentcone condition in the barrier codomain. Each formulation yields convex constraints in the control for control-affine systems and admits integration in standard QP frameworks. The paper provides derivations, geometric interpretations, and worked examples.

I. NOTATION AND PRELIMINARIES

Let $x \in \mathbb{R}^n$ be the state and $u \in \mathbb{R}^m$ the control. Consider a control-affine system

$$\dot{x} = f(x) + g(x)u, \qquad f: \mathbb{R}^n \to \mathbb{R}^n, \quad g: \mathbb{R}^n \to \mathbb{R}^{n \times m}.$$ (1)

We assume f and g are locally Lipschitz so that Carathéodory solutions exist and are unique on some interval for measurable, essentially bounded inputs.

  • a) Class- $\mathcal{K}$ functions.: A function $\alpha:[0,a)\to[0,\infty)$ is class- $\mathcal{K}$ if it is continuous, strictly increasing, and $\alpha(0)=0$ . An extended class- $\mathcal{K}$ function is defined on an interval of the form (-b,a), strictly increasing, and satisfies $\alpha(0)=0$ .
  • b) Lie derivatives.: For a differentiable scalar function $h: \mathbb{R}^n \to \mathbb{R}$ , the Lie derivatives along f and g are

$$L_f h(x) := \nabla h(x)^\top f(x), \ L_g h(x) := \nabla h(x)^\top g(x) \in \mathbb{R}^{1 \times m}.$$

For a vector field $X: \mathbb{R}^n \to \mathbb{R}^n$ and a scalar function h, the Lie derivative is $L_X h = \nabla h^\top X$ . For two vector fields $X,Y: \mathbb{R}^n \to \mathbb{R}^n$ , the Lie bracket [X,Y] is the vector field with components

$$[X,Y]^{i}(x) = \sum_{j=1}^{n} \left( X^{j}(x) \frac{\partial Y^{i}}{\partial x_{j}}(x) - Y^{j}(x) \frac{\partial X^{i}}{\partial x_{j}}(x) \right).$$

If $x(\cdot)$ solves $\dot{x} = X(x)$ , then the rate of change of a vector field Y along x(t) is the Lie derivative $\frac{d}{dt}Y(x(t)) = \mathcal{L}_X Y(x(t)) = X, Y$ .

c) Tangent and normal cones.: For a closed set $K \subset \mathbb{R}^n$ and a point $z \in K$ , the Bouligand (contingent) tangent cone is

$$\mathbf{T}_K(z) := \left{ v \in \mathbb{R}^n ,\middle|, \exists , t_k \downarrow 0, , z_k \to z, , z_k \in K, , \frac{z_k - z}{t_k} \to v \right}.$$

When K is convex, the (polar) normal cone is $N_K(z) := { \eta \in \mathbb{R}^n \mid \langle \eta, v \rangle \leq 0 \ \forall v \in T_K(z) }$ , and one has $v \in T_K(z)$ iff $\langle v, \eta \rangle \leq 0$ for all $\eta \in N_K(z)$ .

d) Nagumo's theorem (viability).: Let $K \subset \mathbb{R}^n$ be closed, and $\dot{x} = F(x)$ be a locally Lipschitz vector field. If $F(x) \in \mathcal{T}_K(x)$ for all $x \in \mathrm{bd}K$ with outward pointing normal understood in $\mathcal{T}_K$ , then K is forward invariant under the flow of F.

II. BACKGROUND ON SCALAR CONTROL BARRIER FUNCTIONS

This section gathers commonly used CBF constructions with careful details.

A. Forward invariance via scalar CBFs

Let $h:\mathbb{R}^n \to \mathbb{R}$ be continuously differentiable and define the safe set

$$\mathcal{C} := { x \in \mathbb{R}^n \mid h(x) \ge 0 }.$$

A sufficient condition for forward invariance of C for (1) is the existence of a control input u that enforces

$$\dot{h}(x,u) = L_f h(x) + L_g h(x) u \ge -\alpha(h(x)), \qquad (2)$$

for some extended class- $\mathcal{K}$ function $\alpha$ . This ensures that on the boundary h(x)=0 one has $\dot{h}\geq 0$ , which combined with Nagumo's theorem implies $\mathcal{C}$ is forward invariant. Inside $\mathcal{C}$ , (2) permits $\dot{h}$ to be negative but no faster than $-\alpha(h)$ .

B. Zeroing and reciprocal CBFs

Two canonical parameterizations are widely used.

a) Zeroing CBF (ZCBF).: h is a ZCBF if there exists an extended class- $\mathcal K$ function $\alpha$ such that

$$\sup_{u \in \mathbb{R}^m} (L_f h(x) + L_g h(x) u) \ge -\alpha(h(x)), \quad \forall x.$$

In implementation, one enforces the affine inequality (2) directly as a constraint in a OP.

b) Reciprocal CBF (RCBF).: Assume h(x) > 0 in the interior and h(x) = 0 on the boundary of $\mathcal{C}$ . A reciprocal barrier uses B(x) := 1/h(x) or $-\log h(x)$ , and enforces a condition of the form

$$\dot{B}(x,u) \le \beta(B(x)),$$

for some class-K function $\beta$ , which implies h does not hit zero in finite time. RCBFs are convenient when h is strictly positive on the interior and decays as the boundary is approached.

C. Higher relative degree and HOCBFs

If $L_gh(x) \equiv 0$ but $L_gL_fh(x) \not\equiv 0$ (relative degree r=2), one augments with a higher-order CBF (HOCBF). For relative degree r, define the sequence

$$h_1 := h, \quad h_2 := \dot{h}_1 + \alpha_1(h_1), \dots, h_r := \dot{h}_{r-1} + \alpha_{r-1}(h_{r-1}),$$

with class-K functions $\alpha_i$ . The HOCBF constraint enforces

$$\dot{h}_r(x,u) + \alpha_r(h_r(x)) \ge 0, \tag{3}$$

which is affine in u when r-th derivatives contain u linearly. This recovers a relative-degree-r version of the ZCBF logic.

D. Multiple constraints and set operations

For multiple constraints $h_i(x) \geq 0$ , i = 1, ..., k, one can enforce the intersection $\mathcal{C} = \cap_i {h_i \geq 0}$ by stacking the inequalities (2). For unions, smooth approximations such as log-sum-exp or smooth min can be used to conservatively encode $\cup_i {h_i \geq 0}$ with a single scalar barrier.

E. Robust CBFs with disturbances and input bounds

Consider $\dot{x} = f(x) + g(x)u + d(x,t)$ with $||d(x,t)|| \le \bar{d}(x)$ . A robust ZCBF enforces

$$L_f h(x) + L_g h(x) u \ge -\alpha(h(x)) + \delta(x), \tag{4}$$

where $\underline{\delta}(x)$ lower-bounds the worst-case effect of d on $\dot{h}$ , e.g., via $-\sup_{|d| \leq \bar{d}} \nabla h^{\top} d = -|\nabla h| \ \bar{d}$ . If u is bounded in a convex compact set $\mathcal{U}$ , feasibility of (4) must be checked against $\mathcal{U}$ ; if needed, a slack $\epsilon \geq 0$ with large penalty in the QP provides soft robustness:

$$L_f h + L_g h u > -\alpha(h) - \epsilon, \qquad \epsilon > 0.$$

F. Sampled-data and discrete-time CBFs

With sample-and-hold control of period $\Delta t$ , a first-order hold yields

$$h(x(t + \Delta t)) \approx h(x) + \Delta t \left(L_f h(x) + L_g h(x) u\right).$$

A one-step forward invariance condition becomes

$$h(x) + \Delta t \left( L_f h(x) + L_a h(x) u \right) > \left( 1 - \lambda \Delta t \right) h(x)$$

for some $\lambda>0$ , which simplifies to $L_fh+L_gh,u\geq -\lambda h$ . Discrete-time systems $x_{k+1}=\phi(x_k,u_k)$ admit $h(\phi(x,u))-h(x)\geq -\alpha(h(x))$ as a direct analog.

G. CLF-CBF QPs and feasibility

A standard controller solves at each time

$$\min_{u \in \mathbb{R}} \quad \frac{1}{2} \left| u - u_{\text{des}} \right|^2 + c , \epsilon^2$$

s.t. $$L_f h(x) + L_g h(x) u \ge -\alpha(h(x)) - \epsilon$$ ,
(optional CLF) $L_f V(x) + L_g V(x) u \le -\lambda V(x) + \epsilon$ ,

with large c. Feasibility is guaranteed if either constraint set is nonempty and c is sufficiently large; in practice, both constraints are affine in u and the problem is a strictly convex QP.

III. VECTOR-VALUED BARRIER Functions AND TANGENT-CONES IN THE CODOMAIN

Before moving to vector fields, we formalize the case when the barrier is a vector-valued function

$$h: \mathbb{R}^n \to \mathbb{R}^k, \qquad h(x) = \begin{bmatrix} h_1(x) \ \vdots \ h_k(x) \end{bmatrix}.$$

Define the safe set as the preimage of a closed target set $K \subset \mathbb{R}^k$ :

$$\mathcal{C} := { x \in \mathbb{R}^n \mid h(x) \in K }.$$

Let z = h(x). The chain rule gives

$$\dot{z} = \dot{h}(x, u) = \nabla h(x) \left( f(x) + g(x)u \right) \in \mathbb{R}^k,$$

where $\nabla h(x) \in \mathbb{R}^{k \times n}$ is the Jacobian. By Nagumo's theorem applied in the codomain, a sufficient condition for forward invariance of $\mathcal C$ is

$$\dot{z} \in T_K(z)$$ for all $z = h(x) \in bdK$ , (5)

that is,

$$\nabla h(x) \left( f(x) + g(x)u \right) \in T_K(h(x)). \tag{6}$$

For convex K, (5) is equivalent to

$$\langle \nabla h(x) (f(x) + g(x)u), \eta \rangle \le 0 \quad \forall \eta \in N_K(h(x)).$$

A practically important special case is $K = \mathbb{R}^k_{\geq 0}$ , the nonnegative orthant. Then

$$T_K(z) = {v \in \mathbb{R}^k \mid v_i > 0 \text{ whenever } z_i = 0},$$

so (6) reduces to the componentwise affine inequalities

$$L_f h_i(x) + L_g h_i(x) u , \geq , 0 \quad \text{for all $i$ such that $h_i(x) = 0$},$$

with no constraint on indices i with $h_i(x) > 0$ . This yields a stack of linear inequalities in u, i.e., a convex polyhedron of safe controls.

IV. VECTOR-FIELD CONTROL BARRIER FUNCTIONS (VFCBFs)

We now pass from vector-valued functions to vector fields. Here the barrier object assigns to each state a direction in the state tangent space.

Definition 1 (Barrier vector field). A barrier vector field is a smooth map $h: \mathbb{R}^n \to T\mathbb{R}^n$ with $h(x) \in T_x\mathbb{R}^n \simeq \mathbb{R}^n$ . We view h as encoding, at each x, a cone of admissible instantaneous directions relative to h(x) and its evolution.

We develop two complementary constraint families, directional and evolutionary, and a third, energy construction that reduces to a scalar CBF built from h.

A. Directional VFCBF: instantaneous alignment constraint

Let F(x,u) := f(x) + g(x)u be the closed-loop vector field. The most immediate requirement is that the system not move against the barrier direction:

$$\langle F(x,u), h(x) \rangle \ge \sigma(x),$$ (7)

for some design function $\sigma(x) \leq 0$ (often $\sigma \equiv 0$ ). This says the instantaneous velocity lies in the half-space ${v \in \mathbb{R}^n \mid \langle v, h(x) \rangle \geq \sigma(x)}$ , which is a convex cone when $\sigma = 0$ . For control-affine systems (1), (7) is an affine inequality in u:

$$\langle g(x)u, h(x)\rangle \ge -\langle f(x), h(x)\rangle + \sigma(x).$$

Geometrically, (7) restricts motion to not have a negative projection on h(x). This is useful when h(x) is constructed as a repulsive or guidance field around obstacles or sensitive regions.

B. Evolutionary VFCBF: regulating the change of the barrier field

The previous directional constraint only restricts the instantaneous projection of the system velocity onto the barrier field. However, because h is itself a vector field, its direction and magnitude evolve as the state x(t) moves through the space. If this evolution is not controlled, the barrier field can rotate or collapse in a way that undermines safety, even if the instantaneous projection constraint is satisfied. To capture and regulate this effect, we use the Lie bracket.

a) Where the condition comes from.: Let F(x,u)=f(x)+g(x)u be the closed-loop vector field. The rate of change of h along the trajectory x(t) of the system is

$$\frac{d}{dt}h(x(t)) = \mathcal{L}_F h(x) = F, h.$$

This object, the Lie derivative of h along F, tells us how the barrier field itself is being deformed by the system dynamics. It combines two effects:

  • the directional change induced by flowing along F, captured by Dh(x)F(x,u),
  • the counter-effect of how the system vector field F varies in the direction of h, captured by -DF(x,u)h(x).

Together these form the Lie bracket $[F, h] = Dh \cdot F - DF \cdot h$ .

b) The constraint.: We want to prevent the barrier field from rotating or collapsing in a way that eliminates the safety direction it provides. A natural way to encode this is to look at the inner product

$$\langle F, h, h(x) \rangle$$ .

This quantity measures the instantaneous rate of change of h along its own direction. If it is strongly negative, then h is decaying or being rotated away from itself, which means the safety direction provided by h is disappearing. To counteract this, we impose

$$\langle F, h, h(x) \rangle \ge -\gamma(|h(x)|), \tag{8}$$

where $\gamma$ is an extended class- $\mathcal{K}$ function. The right-hand side allows controlled decay: when $|h(x)|$ is large, a proportionally larger negative component is tolerable; when $|h(x)|$ is small, the constraint tightens to forbid collapse.

c) Why it works.: Inequality (8) guarantees that the self-alignment of the barrier field is never destroyed too quickly. In other words, the component of h in its own direction cannot decrease faster than $-\gamma(|h|)$ . This ensures that the barrier field retains enough "strength" in the safety direction for the controller to exploit. If $\gamma$ is chosen as $\gamma(r)=cr$ with c>0, the condition enforces an exponential-type bound on how fast h can shrink.

d) Intuition.:

  • Imagine h(x) as a repulsive arrow pointing away from an obstacle. As the robot moves, both its velocity F(x,u) and the repulsive arrow h(x) are changing. The directional constraint only forbids the robot from going against the arrow at one instant. But what if the arrow itself is rotating inward as the robot moves? The robot might still drift toward the obstacle because the arrow has twisted unfavorably. The evolutionary constraint prevents such twisting.
  • Another way to see it: ( [F, h], h ) is analogous to a derivative of "field energy" along the flow. If it is nonnegative, h is at least reinforcing itself; if it is too negative, the barrier weakens. The constraint keeps the barrier from eroding under the very dynamics it is supposed to safeguard.
  • e) Affine dependence on control.: Since $F = f + \sum_{i} g_i u_i$ , we expand

$$F,h = Dh(x)f(x) + Dh(x)g(x)u$$ $$-Df(x)h(x) - \sum_{i} u_i Dg_i(x)h(x). \tag{9}$$

This is affine in u, so the inequality (8) is an affine constraint in u. It can therefore be placed directly in the quadratic program alongside other CBF and CLF constraints.

C. QP implementation

Any of (7), (8), (??) yields an affine inequality in u, hence a convex half-space. A typical controller solves

$$\min_{u,e} \frac{1}{2} ||u - u_{des}||^2 + c e^2$$ s.t.

$$\langle g(x)u, h(x) \rangle \geq - \langle f(x), h(x) \rangle + \sigma(x) - \epsilon$$ (Directional VFCBF)

$$F,h, h(x) \rangle \geq - \gamma(||h(x)||) - \epsilon$$ (Evolutionary VFCBF)

$$\langle Dh(x) g(x)u, h(x) \rangle \geq - \langle Dh(x) f(x), h(x) \rangle - \alpha(B(x)$$ (Energy VFCBF)

$$u \in U,$$

with input bounds $\mathcal{U}$ convex and compact, and $c \gg 1$ to discourage violation.

V. WORKED EXAMPLE: PLANAR SINGLE-INTEGRATOR WITH A REPULSIVE FIELD

Consider $\dot{x} = u, x \in \mathbb{R}^2$ , and a point obstacle at the origin. Define the repulsive field

$$h(x) = \frac{x}{|x|^2}, \qquad x \neq 0.$$

At $$x = (1, 0.5)^{\top}$$ , $||x||^2 = 1.25$ , so $h(x) = (0.8, 0.4)^{\top}$ .

  • a) Directional VFCBF.: Constraint $\langle u, h(x) \rangle > 0$ gives $0.8u_1 + 0.4u_2 \ge 0$ . Any control satisfying this does not move toward the obstacle along h's direction.
  • b) Evolutionary VFCBF.: Here F = u and [F, h] =Dh(x) u since DF = 0. The Jacobian at (1, 0.5) is

$$Dh(x) = \frac{1}{(1.25)^2} \begin{bmatrix} 1.25 - 2(1)^2 & -2(1)(0.5) \ -2(0.5)(1) & 1.25 - 2(0.5)^2 \end{bmatrix}$$ $$= \begin{bmatrix} -0.48 & -0.64 \ -0.64 & 0.48 \end{bmatrix}.$$

Thus, [F, h] = Dh u and

$$\langle [F, h], h \rangle = h^{\top} Dh u$$

= $$(0.8, 0.4) \begin{bmatrix} -0.48 & -0.64 \ -0.64 & 0.48 \end{bmatrix} \begin{bmatrix} u_1 \ u_2 \end{bmatrix}$$

= $$\begin{bmatrix} -0.64 & -0.16 \end{bmatrix} \begin{bmatrix} u_1 \ u_2 \end{bmatrix}$$ .

The evolutionary constraint $\langle [F,h],h\rangle \geq -\gamma(|h|)$ is the affine inequality $-0.64u_1 - 0.16u_2 \ge -\gamma(\sqrt{0.8^2 + 0.4^2})$ . c) Energy VFCBF.: $B(x) = \frac{1}{2} |h(x)|^2 = \frac{1}{2}(0.8^2 + 0.4^2)$

$0.4^2$ ) = 0.4. Then

$$\dot{B} = h^{\top} Dh u = -0.64u_1 - 0.16u_2$$

and the ZCBF condition is $-0.64u_1 - 0.16u_2 \ge -\alpha(0.4)$ .

VI. CONNECTIONS, DESIGN GUIDELINES, AND PRACTICAL CONSIDERATIONS

A. Choosing h

For obstacle avoidance, h can be a superposition of repulsive fields centered at obstacles. For following or herding tasks, h can align with desired flow lines. For social navigation, h may encode directional preferences consistent with social conventions.

B. Feasibility and stacking

$\langle Dh(x) g(x)u, h(x) \rangle \ge -\langle Dh(x) f(x), h(x) \rangle - \alpha(B(x))$ Directional, evolutionary, and energy constraints can be stacked with classical scalar CBFs and CLFs. Because each is affine in u, the resulting QP remains convex. If feasibility is marginal, add a slack with large penalty or schedule gains in $\alpha, \gamma, \sigma$ .

C. Robustness

With additive disturbances d, directional VFCBF becomes $\langle gu, h \rangle \ge - \langle f, h \rangle - \sup_{|d| \le \bar{d}} \langle d, h \rangle$ . For bounded $|d| \le \bar{d}$ , one can use $-\bar{d} |h|$ as a conservative margin.

D. Discrete-time

A first-order discrete approximation for the evolutionary constraint uses

$$h(x_{k+1}) \approx h(x_k) + Dh(x_k) \left( f(x_k) + g(x_k) u_k \right) \Delta t,$$

and requires

$$\langle h(x_{k+1}) - h(x_k), h(x_k) \rangle > -\gamma(|h(x_k)|) \Delta t$$

which yields an affine inequality in $u_k$ .

E. Relation to classical CBFs

Energy VFCBFs reduce the vector-field barrier to a scalar CBF on $B = \frac{1}{2} |h|^2$ . Vector-valued functions with K = $\mathbb{R}^k_{\geq 0}$ reduce to stacked ZCBFs. Directional and evolutionary VFCBFs add geometric structure that has no direct scalar analog and can be more natural when h encodes local directionality rather than a signed distance.

VII. TAKEAWAYS

  • Scalar CBFs ensure forward invariance of $h(x) \geq 0$ via affine-in-u inequalities derived from Lie derivatives, with well-understood extensions to higher relative degree, robustness, and discrete time.
  • ullet Vector-valued functions $h:\mathbb{R}^n \to \mathbb{R}^k$ admit a principled codomain-tangent formulation: enforce $\dot{h} \in$ $\mathrm{T}K(h)$ ; for $K=\mathbb{R}^k{\geq 0}$ this is a stack of ZCBF-like
  • Vector fields $h: \mathbb{R}^n \to T\mathbb{R}^n$ enable two new families of constraints: instantaneous directional alignment and evolutionary regulation via Lie brackets, both yielding affine-in-u inequalities.
  • A scalar energy construction $B = \frac{1}{2} |h|^2$ bridges vector-field barriers with classical scalar CBFs and admits the full existing machinery.

VIII. HEAT-DIFFUSION VECTOR-FIELD CBFs WITH AN EVOLUTIONARY CONSTRAINT

We study a robot with control-affine dynamics

$$\dot{x} = f(x) + g(x)u, \qquad x \in \mathbb{R}^n, \ u \in \mathbb{R}^m.$$ (10)

An obstacle at the origin acts as a heat source. Let $\phi(x,t)$ solve the heat equation

$$\frac{\partial \phi}{\partial t} = \Delta \phi, \qquad \phi(x, 0) = \delta(x).$$ (11)

At any fixed diffusion time $\tau > 0$ , the heat kernel in $\mathbb{R}^n$ is

$$\phi(x;\tau) = \frac{1}{(4\pi\tau)^{n/2}} \exp\left(-\frac{|x|^2}{4\tau}\right). \tag{12}$$

The repulsive barrier vector field takes the outward form

$$h(x) \triangleq -\nabla \phi(x;\tau) = \frac{1}{2\tau} \phi(x;\tau) x \triangleq k(||x||) x, \quad (13)$$

where $k(r)=\beta \exp\left(-\frac{r^2}{4\tau}\right)$ with a positive gain $\beta=\frac{1}{2\tau}(4\pi\tau)^{-n/2}$ . The field h points away from the obstacle and its magnitude decays smoothly with distance.

A. Evolutionary vector-field CBF

Let $F(x,u) \triangleq f(x) + g(x)u$ . The evolutionary constraint controls how h itself changes along the closed-loop flow. The Lie bracket

$$F, h \triangleq Dh(x) F(x, u) - DF(x, u) h(x) \tag{14}$$

measures the first-order mismatch of flowing by F then h versus h then F. The evolutionary vector-field CBF inequality is

$$\langle F, h, h(x) \rangle \ge -\gamma(|h(x)|), \tag{15}$$

with an extended class-K function $\gamma$ . This inequality prevents the closed-loop evolution from rotating or collapsing the safety direction too quickly. For control-affine systems, (15) is affine in u. Indeed

$$F, h = Dh(x) f(x) + Dh(x) g(x)u - DF(x, u) h(x),$$ (16)

and for F(x,u) = f(x) + g(x)u we have $DF(\cdot,u) = Df(\cdot) + \sum_{i=1}^{m} u_i Dg_i(\cdot)$ , which is affine in u. Hence

$$\langle F, h, h(x) \rangle = a(x) + b(x)^{\top} u, \tag{17}$$

with computable a(x) and b(x).

B. Closed form for the heat field Jacobian

Write $r \triangleq ||x||$ and h(x) = k(r) x with $k(r) = \beta \exp(-\frac{r^2}{4\tau})$ . Since k depends on $s = r^2$ , the chain rule gives

$$\frac{\partial k}{\partial x_j} = \frac{\mathrm{d}k}{\mathrm{d}s} \frac{\partial s}{\partial x_j} = \left(-\frac{1}{4\tau}k\right)(2x_j) = -\frac{k}{2\tau}x_j. \tag{18}$$

For $h_i(x) = k x_i$ , we obtain

$$\frac{\partial h_i}{\partial x_j} = k ,\delta_{ij} + x_i ,\frac{\partial k}{\partial x_j} = k ,\delta_{ij} - \frac{k}{2\tau} ,x_i x_j. \tag{19}$$

Therefore

$$Dh(x) = k(r)I - \frac{k(r)}{2\tau} x x^{\top},$$ (20)

which is symmetric.

C. Specialization to a single integrator

Consider the planar single integrator

$$\dot{x} = u, \qquad x \in \mathbb{R}^2. \tag{21}$$

Here $f\equiv 0,\ g\equiv I,\ {\rm and}\ DF\equiv 0.$ Hence $F,h=Dh(x),u.$ The evolutionary constraint becomes

$$\langle Dh(x) u, h(x) \rangle \ge -\gamma(|h(x)|). \tag{22}$$

Using h(x) = kx and (20), we obtain a closed form:

$$Dh(x) h(x) = \left(kI - \frac{k}{2\tau}xx^{\top}\right)(kx)$$

$$(23)$$

$$= k^{2}x - \frac{k^{2}}{2\tau}x\underbrace{\left(x^{\top}x\right)}_{r^{2}} = k^{2}\left(1 - \frac{r^{2}}{2\tau}\right)x.$$

$$(24)$$

Hence (22) is the single linear inequality

$$\left\langle u, \ k^2 \left( 1 - \frac{r^2}{2\tau} \right) x \right\rangle \ge -\gamma \left( k(r) , r \right).$$ (25)

This is affine in u and can be imposed inside a standard control Lyapunov function and control barrier function quadratic program.

D. Numerical example

Take $\tau=1, n=2$ , and $\beta=1$ so that $k(r)=\exp(-r^2/4)$ . Let the robot be at

$$x = \begin{bmatrix} 1 \ 0.5 \end{bmatrix}$$ , $r^2 = 1^2 + 0.5^2 = 1.25$ , $r \approx 1.1180$ .

Then

$$k(r) = \exp(-r^2/4) = \exp(-0.3125) \approx 0.7310, k(r)^2 \approx 0.5343,$$ (26)

and

$$1 - \frac{r^2}{2\tau} = 1 - \frac{1.25}{2} = 0.375.$$

Therefore

$$v(x) \triangleq Dh(x) h(x)$$

$$= k(r)^{2} \left(1 - \frac{r^{2}}{2\tau}\right) x$$

$$\approx 0.5343 \times 0.375 \times \begin{bmatrix} 1\0.5 \end{bmatrix}$$

$$\approx \begin{bmatrix} 0.2003\0.1001 \end{bmatrix}.$$ (27)

Choose $\gamma(\rho)=c,\rho$ with c=0.1. Since $|h(x)|=k(r),r\approx 0.7310\times 1.1180\approx 0.8170$ , the right-hand side of (25) equals -0.0817. The evolutionary constraint is

$$0.2003 u_1 + 0.1001 u_2 \ge -0.0817.$$ (28)

Suppose a nominal goal-directed controller proposes $u_{\rm nom} = \begin{bmatrix} -0.5 \ 0 \end{bmatrix} \text{. Then}$

$$0.2003(-0.5) + 0.1001(0) \approx -0.1002 < -0.0817,$$

so $u_{\rm nom}$ violates (28). The smallest Euclidean correction that enforces (28) is the orthogonal projection onto the feasible

half-space. Let a ≜ 0.2003 0.1001 and b ≜ −0.0817. The projected control is

$$u^* = u_{\text{nom}} + \frac{b - a^\top u_{\text{nom}}}{|a|^2} a.$$ (29)

.

Compute

$$a^{\top}u_{\text{nom}} \approx -0.1002,$$

$b - a^{\top}u_{\text{nom}} \approx 0.0185,$
$||a||^2 \approx 0.2003^2 + 0.1001^2 \approx 0.0502.$

Thus the correction gain equals 0.0185/0.0502 ≈ 0.3685, and

$$u^{\star} \approx \begin{bmatrix} -0.5\0 \end{bmatrix} + 0.3685 \begin{bmatrix} 0.2003\0.1001 \end{bmatrix} \approx \begin{bmatrix} -0.4262\0.0369 \end{bmatrix}$$

This u ⋆ satisfies (28) with equality and is the minimal-norm modification of unom that enforces the evolutionary vectorfield CBF at the sample state.

E. Design notes

  • a) Singularity handling: The heat kernel is bounded and smooth for every τ > 0, and h(x) vanishes only at infinity. To avoid numerical issues near the exact source, exclude a small ball of radius rmin around the obstacle or saturate k(r) above a chosen ceiling.
  • b) Tuning: The factor 1 − r 2/(2τ ) modulates the strength and sign of v(x) = Dh(x)h(x). For r 2 < 2τ the vector v(x) aligns with x and strengthens the outward preference. For r 2 > 2τ the term becomes negative, which tightens the constraint by requiring larger γ or by combining the evolutionary constraint with an additional directional inequality when desired. Practical tuning sets τ on the order of the square of the safety radius so that r 2 ≲ 2τ across the region where strong repulsion is required.
  • c) QP embedding: Combine (25) with control objectives by solving, at each time,

$$\min_{\substack{u, \ \delta \ge 0}} \quad \frac{1}{2} |u - u_{\text{nom}}|^2 + \rho , \delta^2$$ s.t. $\langle F, h, h(x) \rangle \ge -\gamma(|h(x)|) - \delta, \quad (30)$

$$u \in \mathcal{U},$$

with a large weight ρ and admissible input set U. For the single integrator case this reduces to a single linear inequality of the form a u ≥ b − δ with a and b as in (25).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment