# On the Stability of Undesirable Equilibria in the Quadratic Program
Framework for Safety-Critical Control

Matheus F. Reis and A. Pedro Aguiar
Matheus F. Reis and A. Pedro Aguiar are with the Department of Electrical and
Computer Engineering from FEUP (Faculty of Engineering of University of
Porto), Portugal<EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

Control Lyapunov functions (CLFs) and Control Barrier Functions (CBFs) have
been used to develop provably safe controllers by means of quadratic programs
(QPs). This framework guarantees safety in the form of trajectory invariance
with respect to a given set, but it can introduce undesirable equilibrium
points to the closed loop system, which can be asymptotically stable. In this
work, we present a detailed study of the formation and stability of
equilibrium points with the QP framework for a class of nonlinear systems. We
introduce the useful concept of compatibility between a CLF and a family of
CBFs, regarding the number of stable equilibrium points other than the CLF
minimum. Using this concept, we derive a set of compatibility conditions on
the parameters of a quadratic CLF and a family of quadratic CBFs that
guarantee that all undesirable equilibrium points are not attractive.
Furthermore, we propose an extension to the QP-based controller that
dynamically modifies the CLF geometry in order to satisfy the compatibility
conditions, guaranteeing safety and quasi-global convergence of the system
state to the CLF minimum. Numeric simulations illustrate the applicability of
the proposed method for safety-critical, deadlock-free robotic navigation
tasks.

###### Index Terms:

Lyapunov methods, Control barrier functions

##  I Introduction

The engineering of safety-critical systems is a fruitful and rich topic
receiving a growing amount of attention nowadays. Safety-critical systems are
of crucial importance for many industrial sectors and production lines, where
the stability of feedback-controlled systems is just so important as their
capacity of providing safe behaviour under a wide variety of operational
circunstances. Furthermore, safety is also a mandatory property for systems
with high levels of interoperability, cooperation or coordination with humans.

The notion of safety was first introduced in 1977 in the context of program
correctness by [1] and later formalized in [2], which also introduced the
concept of liveness. Intuitively, one can describe these two contrasting
system properties as: (i) the requirement of avoiding undesired situations
while (ii) guaranteeing the eventual achievement of a desired configuration,
respectively. As pointed out by [3], in the context of control systems,
liveness can be identified as an asymptotic stability requirement with respect
to a certain set of desired or objective states, while safety can be defined
as the invariance of the system trajectories to some set, defined as the set
of safe states. While the design of asymptotically stabilizing controllers has
been extensively studied in control Lyapunov theory [4], the design of
controllers capable of enforcing invariance to a particular set of states has
been the subject of study in the topic of Control Barrier Functions (CBFs)
[5]. Additionally, [5] also introduced the idea of unifying CBFs with Control
Lyapunov Functions (CLFs) through the use of quadratic programs (QPs),
effectively combining safety and stabilization requirements in a single and
elegant control framework.

However, the study of controllers combining the two desirable properties of
stability and safety is still in early stages. In [6], it is shown that the
QP-based framework proposed by [5] can introduce undesirable equilibrium
points other the CLF minimum into the closed-loop system (see Fig. 1 that
illustrates the problem). The fact that some of these undesirable equilibrium
points can be asymptotically stable and are located on the boundary of the
safe set is an important practical limitation, since the system trajectories
can converge directly to a neighborhood of the unsafe set. Therefore, the QP-
based framework for unifying CLFs and CBFs is able to guarantee safety in the
form of trajectory invariance with respect to a certain (safe) set, but not
liveness and practical reliability, since the closed-loop system trajectories
can be attracted towards undesirable stable equilibria which are arbitrarily
close to the set of unsafe states. This is an undesirable characteristic for
pratical applications, since it could result in system deadlocks and expose
the system to close-to-failure situations, forcing the designer to opt for
highly conservative safety margins when designing the system safety
specifications.

In [7], an optimization-based method was proposed in which safety is ensured
without introducing undesired equilibria into the closed-loop system, even in
presence of multiple non-convex unsafe sets. Although representing an
important step towards solving the issue of undesirable equilibria in CLF-CBF-
based controllers, the method is dependent on the computation of a nonlinear
“convexification” function for the unsafe sets, which can be highly dependent
on the obstacle geometry and computationally hard to solve.

The present work contributes to the theory of safety-critical systems in the
following ways:

  1. 1.

We present an in-depth study of the conditions for existence and stability of
equilibrium points on the closed-loop system with the minimum-norm QP-based
controller proposed by [5], for the class of driftless nonlinear systems.

  2. 2.

We derive an insightful geometric condition for determining the stability
properties of boundary equilibrium points, and show that, for driftless
nonlinear systems, this stability condition is independent on the system
model, depending only on the geometry of the CLF and the corresponding CBF.

  3. 3.

We introduce the property of compatibility between a CLF and a family of CBFs,
regarding the number of stable equilibrium points of the closed-loop system
other than the CLF minimum.

  4. 4.

We show, for the first time, how the theory of Linear Matrix Pencils can be
explored to derive sufficient compatibility conditions for the class of
quadratic CLFs and CBFs.

  5. 5.

A novel QP-based controller is proposed, aiming to adaptively modify the shape
of a parametric quadratic CLF, in order to guarantee compatibility with a
family of given quadratic CBFs, thus guaranteeing safety and quasi-global
convergence of the closed-loop system trajectories to the CLF minimum.

  6. 6.

Throughout the paper, we provide numerical examples aiming to illustrate the
presented results and the proposed control design methodology.

Figure 1: System trajectories for the QP-based control of the integrator with
a circular obstacle. The undesirable asymptotically stable equilibrium is
shown in red.

##  II Analysis of the Quadratic Program Based Control for Safety Critical
Systems

In this section, we briefly present the notation used throughout this paper,
followed by a detailed analysis of the closed-loop system formed by the
controller proposed by [5] with a CLF and $N$ distinct CBFs.

###  II-A Notation

A function $f$ is said to be of (differentiability) class $C^{k}$ if its
derivatives $f^{{}^{\prime}},f^{{}^{\prime\prime}},\cdots,f^{k}$ exist and are
continuous. For a scalar-valued differentiable function
$f:\mathbb{R}^{n}\rightarrow\mathbb{R}$, the operator
$\nabla\\!:C^{1}(\mathbb{R}^{n})\rightarrow\mathbb{R}^{n}$ is defined as the
gradient $\frac{\partial f}{\partial x}$, and the self-adjoint operator
$H\\!:C^{2}(\mathbb{R}^{n})\rightarrow\mathbb{R}^{n\times n}$ is defined as
the Hessian, with entries $(Hf)_{i,j}=\frac{\partial^{2}f}{\partial
x_{i}\partial x_{j}}$.

The notation $\langle u,v\rangle$ denotes the usual inner product between two
vectors $u,v\in\mathbb{R}^{n}$, while $L_{g}f$ denotes the Lie derivative of
$f$ along the vector field $g:\mathbb{R}^{n}\rightarrow\mathbb{R}^{n\times
m}$, that is, $L_{g}f=\nabla f^{\mathsf{T}}g\in\mathbb{R}^{m}$, respectively.
The set $\text{span}\\{v_{1},\cdots,v_{p}\\}$ is the linear span of a finite
set of vectors $v_{1},\cdots,v_{p}\in\mathbb{R}^{n}$, that is, the set of all
linear combinations of these vectors. The orthogonal complement of a subspace
$W$ is denoted by $W^{\perp}$.

The group of real symmetric matrices is denoted by $\mathcal{S}^{n}$, while
the positive and negative semidefinite cones of the set of symmetric matrices
are denoted by $\mathcal{S}^{n}_{+}$ and $\mathcal{S}^{n}_{-}$, respectively.
The null space and spectrum of a real square matrix $A\in\mathbb{R}^{n\times
n}$ are given by $\mathcal{N}(A)\subset\mathbb{R}^{n}$ and
$\sigma(A)\subset\mathbb{R}$, respectively. Given two arbitrary nonzero
vectors $v,w\in\mathbb{R}^{n}$, we define $\mathcal{P}_{vw}\coloneqq
I_{n}-\frac{v\,w^{\mathsf{T}}}{v^{\mathsf{T}}w}\in\mathbb{R}^{n\times n}$,
which is an oblique projection matrix defined over $\mathbb{R}^{n}$. It has
the following useful properties: (i)
$\mathcal{P}_{vw}^{\mathsf{T}}=\mathcal{P}_{wv}$; (ii) the spectrum of
$\mathcal{P}_{vw}$ is composed of $0$ and $1$’s with algebraic multiplicity 1
and $n-1$, respectively; (iii)
$\mathcal{N}(\mathcal{P}_{vw})=\\{z\in\mathbb{R}^{n}\,|\,z=\alpha
v,\forall\alpha\in\mathbb{R}\\}$; (iv)
$\mathcal{N}(\mathcal{P}_{vw}^{\mathsf{T}})=\\{z\in\mathbb{R}^{n}\,|\,z=\alpha
w,\forall\alpha\in\mathbb{R}\\}$; (v) $\mathcal{P}_{vw}\,z=z$ for all
$z\in\mathbb{R}^{n}$ s.t. $z^{\mathsf{T}}w=0$; (vi)
$z^{\mathsf{T}}\mathcal{P}_{vw}=z^{\mathsf{T}}$ for all $z\in\mathbb{R}^{n}$
s.t. $z^{\mathsf{T}}v=0$. Additionally, we define
$\mathcal{P}_{vv}=\mathcal{P}_{v}=I_{n}-\hat{v}\,\hat{v}^{\mathsf{T}}$ as the
orthogonal projection matrix defined over $\mathbb{R}^{n}$.

The set $\mathcal{SO}(n)$ is the special orthogonal group of dimension $n$,
consisting of all orthogonal matrices $R$, i.e., $R^{\mathsf{T}}R=I_{n}$ of
determinant $1$, and the set $\mathfrak{so}(n)$ consists of the corresponding
Lie algebra of $\mathcal{SO}(n)$. Lastly, the cardinality of a set
$\mathcal{S}$ is the number of elements on $\mathcal{S}$, and is denoted by
$|\mathcal{S}|$.

###  II-B QP-based Controller with Multiple CBFs

Consider now the driftless, affine nonlinear control system

$\displaystyle\dot{x}\\!=\\!g(x)u$ (1)

where $x\in\mathbb{R}^{n}$ is the system state and $u\in\mathbb{R}^{m}$ is the
control input. The vector field
$g:\mathbb{R}^{n}\rightarrow\mathbb{R}^{n\times m}$ is locally Lipschitz. In
particular, $g(x)$ is full rank for all values of $x\in\mathbb{R}^{n}$.

######  Definition II.1 (CLFs).

A positive definite function $V$ is a control Lyapunov function (CLF) for
system (1) if it satisfies:

$\displaystyle\inf_{u\in\mathbb{R}^{m}}\left[\langle
L_{g}V(x),u\rangle\right]\leq-\gamma(V(x))$

where $\gamma:\mathbb{R}_{\geq 0}\rightarrow\mathbb{R}_{\geq 0}$ is a class
$\mathcal{K}$ function [8].

For a given $V$, this definition implies that there exists a set of
stabilizing controls that makes the CLF strictly decreasing everywhere outside
its global minimum $x_{0}\in\mathbb{R}^{n}$. This set is defined by

$\displaystyle\mathcal{K}_{clf}(x)\\!=\\!\\{u\\!\in\\!\mathbb{R}^{m}:\langle
L_{g}V(x),u\rangle\leq-\gamma(V(x))\\}\,.$

Let $u^{\star}(x)$ be a feedback controller such that the closed-loop system

$\displaystyle\dot{x}=f_{cl}(x):=g(x)u^{\star}(x)$ (2)

is locally Lipschitz. Then, for any initial condition $x(0)\in\mathbb{R}^{n}$
there exists a maximum interval of existence $I(x(0))=[0,\tau_{max})$ such
that $x(t)$ is the unique solution to (2) on $I(x(0))$ (if $f_{cl}(x)$ is
forward complete, $\tau_{max}=\infty$). A set $\mathcal{C}$ is forward
invariant  if, for every $x(0)\in\mathcal{C}$, $x(t)\in\mathcal{C}$ for all
$t\in I(x(0))$.

######  Definition II.2 (Safety).

The trajectories of the closed-loop system (2) are safe with respect to a set
$\mathcal{C}$ if $\mathcal{C}$ is forward invariant.

Then, consider $N$ subsets
$\mathcal{C}_{1},\dots,\mathcal{C}_{N}\subset\mathbb{R}^{n}$ defined by the
superlevel set of a continuously differentiable function
$h_{i}:\mathbb{R}^{n}\rightarrow\mathbb{R}$:

$\displaystyle\mathcal{C}_{i}$
$\displaystyle=\\{x\in\mathbb{R}^{n}:h_{i}(x)\geq 0\\}$ (3)

######  Definition II.3 (CBFs).

Let $\mathcal{C}_{i}\in\mathbb{R}^{n}$ be defined by one of the functions (3).
Then $h_{i}(x)$ is a (zeroing) Control Barrier Function (CBF) for (1) if there
exists a locally Lipschitz extended class $\mathcal{K}_{\infty}$ function111An
extended class $\mathcal{K}_{\infty}$ function
$\alpha:\mathbb{R}\rightarrow\mathbb{R}$ is strictly increasing with
$\alpha(0)\\!=\\!0$. $\alpha$ such that

$\displaystyle\sup_{u\in\mathbb{R}^{m}}\left[\langle
L_{g}h_{i}(x),u\rangle\right]\geq-\alpha(h_{i}(x))\quad\forall
x\in\mathbb{R}^{n}\,.$

The definition simply means that the CBFs $h_{i}(x)$ are only allowed to
decrease in the interior of their respective safe sets
$\text{int}(\mathcal{C}_{i})$, but not on their boundaries
$\partial\mathcal{C}_{i}$. Then, the set of control values that render the
safe set $\mathcal{C}=\cap^{N}_{i=1}\mathcal{C}_{i}$ forward invariant can be
defined as:

$\displaystyle\mathcal{K}_{cbf}(x)$
$\displaystyle=\cap^{N}_{i=1}\mathcal{K}_{cbf_{i}}(x)\,,$
$\displaystyle\mathcal{K}_{cbf_{i}}(x)$
$\displaystyle=\\{u\in\mathbb{R}^{m}:\langle L_{g}h_{i}(x),u\rangle+\alpha
h_{i}(x)\geq 0\\}\,.$ (4)

A proposed minimum-norm controller based on [5] with $N$ CBFs is given by

$\displaystyle\min_{(u,\delta)\in\mathbb{R}^{m+1}}\frac{1}{2}\lVert
u\rVert^{2}+\frac{1}{2}p\delta^{2}\qquad$ (5) $\displaystyle s.t.\quad\langle
L_{g}V(x),u\rangle+\gamma V(x)$ $\displaystyle\leq\delta$
$\displaystyle\langle L_{g}h_{1}(x),u\rangle+\alpha h_{1}(x)$
$\displaystyle\geq 0$ $\displaystyle\,\,\,\vdots$ $\displaystyle\langle
L_{g}h_{N}(x),u\rangle+\alpha h_{N}(x)$ $\displaystyle\geq 0$

where $p,\gamma,\alpha>0$. The objective is to minimize the norm of the
control signal and of an auxiliary relaxation variable $\delta$ while
satisfying the CLF and CBF constraints. The CBF constraints guarantee that
$u\in K_{cbf}(x)$, keeping the system trajectories safe with respect to the
safe set $\mathcal{C}=\cap^{N}_{i=1}\mathcal{C}_{i}$.

######  Assumption II.1.

The initial state $x(0)\in\mathbb{R}^{n}$ is contained in the safe set, that
is, $x(0)\in\mathcal{C}=\cap^{N}_{i=1}\mathcal{C}_{i}$.

######  Theorem 1.

The QP (5) is feasible under Assumption II.1.

###### Proof.

Under Assumption II.1, $h_{i}(x(0))\geq 0$ for all $i=1,\dots,N$. Then, all
the half-planes defined by $\mathcal{K}_{cbf_{i}}(x(0))\subset\mathbb{R}^{m}$
in (4) contain the origin $u=0$ (due to the fact that $h_{i}(x(0))\geq 0$).
Then, their intersection $\cap^{N}_{i=1}\mathcal{K}_{cbf_{i}}(x(0))$ is always
non-empty and forms a convex polytope in $\mathbb{R}^{m}$ containing the
origin $u=0$.

In the QP decision space $\mathbb{R}^{m+1}$, due to the independence of the
CBF constraints on $\delta$, they form an unbounded convex polytope in
$\mathbb{R}^{m+1}$ containing the $\delta$-axis: that is, every point on the
QP decision space of the form $(u,\delta)=(0,d)\,\,\forall d\in\mathbb{R}$ in
contained within $\cap^{N}_{i=1}\mathcal{K}_{cbf_{i}}(x(0))\times\mathbb{R}$.
Since the CLF constraint defines a half-space in $\mathbb{R}^{m+1}$ that
always intersects this unbounded polytope, we conclude that the QP (5) is
initially feasible under Assumption II.1, since the feasible region is always
non-empty.

Since the CBF constraints guarantee the invariance of $x(t)$ with respect to
the safe set $\mathcal{C}=\cap^{N}_{i=1}\mathcal{C}_{i}$, the same reasoning
can be applied for any time $t\geq 0$, and we can conclude that the QP (5) is
always feasible under Assumption II.1. ∎

###  II-C Existence of Equilibrium Points

We now extend an important result from [6], regarding the existence of
equilibrium points in the case with multiple CBF constraints. Particularly,
Theorem 2 shows that the driftless, affine closed-loop system with the QP-
based controller can have undesirable equilibrium points other than the CLF
global minimum, and all of them are located on the boundaries of the safe
sets. In this work, for generality purposes, we assume the CLF global minimum
to be located at an arbitrary point $x_{0}\in\mathbb{R}^{n}$ such that
$V(x_{0})=0$.

######  Assumption II.2.

The CLF global minimum $x_{0}\in\mathbb{R}^{n}$ is contained in the safe set:
$x_{0}\in\mathcal{C}=\cap^{N}_{i=1}\mathcal{C}_{i}\subset\mathbb{R}^{n}$.
Furthermore, the boundaries of the safe sets are disjoint, that is,
$\partial\mathcal{C}_{i}\cap\partial\mathcal{C}_{j}=\emptyset\,\forall i\neq
j$, $i=1,\cdots,N$.

Notice that the first part of Assumption II.2 is naturally required, since it
is impossible to achieve asymptotic stability of the CLF minimum with
controller (5) if $x_{0}\notin\mathcal{C}$, since in that case the CLF minimum
$x_{0}$ would be contained in the unreachable unsafe set. The second part of
the assumption is reasonable for obstacle-scattered environments, where each
CBF models one particular convex obstacle.

######  Theorem 2.

Under Assumption II.2, the set $\mathcal{E}$ of equilibrium points of the
closed-loop system resulting from the application of the control law (5) into
(2) is given by

$\displaystyle\mathcal{E}$
$\displaystyle=(\cup^{N}_{i=1}\mathcal{E}_{i})\cup\\{x_{0}\\}\,,\qquad\qquad\qquad
i=1,\cdots,N$ (6) $\displaystyle\mathcal{E}_{i}$
$\displaystyle=\left\\{x\in\partial\mathcal{C}_{i}\,\,|\,\,\nabla
V=\lambda_{i}\nabla h_{i}\,,\,\,\lambda_{i}=\frac{\langle
L_{g}V,L_{g}h_{i}\rangle}{\langle L_{g}h_{i},L_{g}h_{i}\rangle}>0\right\\}$

In particular, (6) implies that equilibria other than $x_{0}$ are located on
the boundaries $\partial\mathcal{C}_{1},\cdots,\partial\mathcal{C}_{N}$.

###### Proof.

Define the Lagrange multipliers of the optimization problem (5) as
$\lambda_{0},\bar{\lambda}_{1},\cdots,\bar{\lambda}_{N}$, where $\lambda_{0}$
refers to the multiplier of the CLF constraint and $\bar{\lambda}_{i}$ refers
to the multiplier of the $i$-th CBF constraint. Let
$\lambda_{i}=\bar{\lambda}_{i}/\lambda_{0}$ be a normalized version of the
Lagrange multiplier $\bar{\lambda}_{i}$, defined when the CLF constraint is
active, that is, $\lambda_{0}>0$. The Lagrangian associated to QP (5) is given
by

$\displaystyle\mathcal{L}$ $\displaystyle=\frac{1}{2}\lVert
u\rVert^{2}+\frac{1}{2}p\delta^{2}+\lambda_{0}(\langle L_{g}V,u\rangle+\gamma
V-\delta)$ (7) $\displaystyle-\sum^{N}_{j=1}\bar{\lambda}_{j}(\langle
L_{g}h_{j},u\rangle+\alpha h_{j})$

The KKT (Karush-Kuhn-Tucker) optimality conditions yield the following
conditions

$\displaystyle\frac{\partial\mathcal{L}}{\partial u}$
$\displaystyle=u+\lambda_{0}L_{g}V-\lambda_{0}\sum^{N}_{j=1}\lambda_{j}L_{g}h_{j}=0$
(8) $\displaystyle\frac{\partial\mathcal{L}}{\partial\delta}$
$\displaystyle=p\delta-\lambda_{0}=0$ (9) $\displaystyle\lambda_{0}$
$\displaystyle(\langle L_{g}V,u\rangle+\gamma V-\delta)=0$ (10)
$\displaystyle\bar{\lambda}_{j}$ $\displaystyle(\langle
L_{g}h_{j},u\rangle+\alpha h_{j})=0$ (11)

with $j=1,\cdots,N$ in (11), and $\lambda_{j}\geq 0$. Equation (8) yields an
analytical expression for the feedback controller

$\displaystyle
u^{\star}(x)=\lambda_{0}\left(-L_{g}V+\sum^{N}_{j=1}\lambda_{j}L_{g}h_{j}\right)$
(12)

Equation (9) yields $\lambda_{0}=p\delta$. Next, assume that the CLF
constraint is inactive at some region: in this case, $\dot{V}+\gamma
V=\langle\nabla V,f_{cl}\rangle+\gamma V<\delta$ and using (10),
$\lambda_{0}=0$, implying that $\delta=0$. Since $f_{cl}(x^{\star})=0$ at an
equilibrium point $x^{\star}$, we conclude that $\gamma V<0$, which is a
contradiction since $V(x)$ is a positive definite function. Therefore, we
conclude that equilibrium points can only occur when the CLF constraint is
active.

Therefore, at an equilibrium point $x^{\star}$, the following equation always
holds

$\displaystyle\underbrace{\langle\nabla
V(x^{\star}),f_{cl}(x^{\star})\rangle}_{0}+\gamma V(x^{\star})$
$\displaystyle=\delta$

Then, $\lambda^{\star}_{0}=p\delta=p\gamma V(x^{\star})$ at the equilibrium
point. Notice that the global minimum of the CLF $x_{0}\in\mathcal{C}$ is a
trivial equilibrium solution, since $h_{i}(x_{0})\geq 0$ and $V(x_{0})=0$,
with $\delta=0$.

Now, assume that the $i$-th CBF constraint is active. In this case, we have
$\dot{h}_{i}+\alpha h_{i}=0$. At an equilibrium point $x^{\star}$, we have
$\dot{h}_{i}=\langle\nabla
h_{i}(x^{\star}),f_{cl}(x^{\star})\rangle=\langle\nabla
h_{i}(x^{\star}),0\rangle=0$, implying that $h_{i}(x^{\star})=0$. This shows
that $x^{\star}\in\partial\mathcal{C}_{i}$.

Next, we show that, under Assumption II.2, these equilibrium points can only
occur when one and only one of the CBF constraints are active. Assume that an
equilibrium point $x^{\star}$ occurs when two or more CBF constraints are
active: then, we have $\dot{h}_{i}+\alpha h_{i}(x^{\star})=0$ and
$\dot{h}_{j}+\alpha h_{j}(x^{\star})=0$, for $i\neq j$. In equilibrium,
$\dot{h}_{i}=\langle L_{g}h_{i}(x^{\star}),u\rangle=0$ and
$\dot{h}_{j}=\langle L_{g}h_{j}(x^{\star}),u\rangle=0$, which means that
$h_{i}(x^{\star})=h_{j}(x^{\star})=0$. However, by the second part of
Assumption II.2, this is a contradiction since
$\partial\mathcal{C}_{i}\cap\partial\mathcal{C}_{j}=\emptyset$, and therefore
$x^{\star}\notin\partial\mathcal{C}_{i}\cap\partial\mathcal{C}_{j}$. The
conclusion is that boundary equilibrium points can only occur when one and
only one of the CBF constraints are active.

Combining (12) with the closed-loop system (2) yields

$\displaystyle\dot{x}=f_{cl}(x)=\lambda_{0}G(x)\left(-\nabla
V+\sum^{N}_{j=1}\lambda_{j}\nabla h_{j}\right)$ (13)

where $G(x)=g(x)g(x)^{\mathsf{T}}$. Notice that since $G(x)$ is full rank by
assumption. Therefore, using (13), at an equilibrium point, the following
condition must be satisfied:

$\displaystyle\nabla V(x^{\star})=\sum^{N}_{j=1}\lambda_{j}\nabla
h_{j}(x^{\star})\,.$ (14)

In (14), assume that the equilibrium point
$x^{\star}\in\partial\mathcal{C}_{i}$ is located at the $i$-th boundary. Since
the only active constraints are the CLF and the $i$-th CBF constraint, we have
$\lambda_{j}=0\,,\forall j\neq i$, simplifying the equilibrium condition (14)
to $\nabla V(x^{\star})=\lambda_{i}\nabla h_{i}(x^{\star})$. Furthermore, the
control expression (12) simplifies to
$u(x^{\star})=\lambda^{\star}_{0}g^{\mathsf{T}}(-\nabla V+\lambda_{i}\nabla
h_{i})$. Replacing $u(x^{\star})$ on the expression for the $i$-th active CBF
constraint yields

$\displaystyle-\lambda^{\star}_{0}\langle
L_{g}V,L_{g}h_{i}\rangle+\lambda^{\star}_{0}\lambda_{i}\langle
L_{g}h_{i},L_{g}h_{i}\rangle=\alpha h_{i}(x^{\star})=0$ (15)

Dividing (15) by $\lambda^{\star}_{0}>0$, we conclude that

$\lambda_{i}=\frac{\langle L_{g}V,L_{g}h_{i}\rangle}{\langle
L_{g}h_{i},L_{g}h_{i}\rangle}\,,$

which formally justifies the definition of set
$\mathcal{E}_{i}\subset\partial\mathcal{C}_{i}$. ∎

###  II-D Stability of Equilibrium Points

In this section, we study the stability properties for the boundary
equilibrium points from Theorem 2. We start with the following result.

######  Lemma 1.

The Jacobian matrix of the closed-loop system (2) with $u^{\star}$ from (5) at
an equilibrium point $x^{\star}\in\mathcal{E}_{i}$ is given by

$\displaystyle J_{cl}(x^{\star})$
$\displaystyle\\!=\\!\lambda^{\star}_{0}\mathcal{P}_{i}GH_{i}\\!-\\!\frac{\alpha}{\lVert\nabla
h_{i}\rVert_{G}^{2}}G\nabla h_{i}\nabla h_{i}^{\mathsf{T}}\,,$ (16)

where $\mathcal{P}_{i}=\mathcal{P}_{G\nabla h_{i}\nabla h_{i}}$ is an oblique
projection matrix and $H_{i}=\lambda^{\star}_{i}H_{h,i}-H_{V}$, with

$\displaystyle\lambda^{\star}_{0}=p\gamma
V(x^{\star})\,,\quad\lambda^{\star}_{i}=\frac{\langle
L_{g}V(x^{\star}),L_{g}h_{i}(x^{\star})\rangle}{\langle
L_{g}h_{i}(x^{\star}),L_{g}h_{i}(x^{\star})\rangle}\,.$

Furthermore, $H_{V}$ and $H_{h,i}$ are the Hessian matrices of $V$ and
$h_{i}$, respectively.

###### Proof.

Taking the partial derivative of the closed-loop system (13) with respect to
the $k$-th state variable yields:

$\displaystyle\frac{\partial f_{cl}}{\partial x_{k}}$
$\displaystyle=\frac{\partial(\lambda_{0}G(x))}{\partial x_{k}}\left(-\nabla
V+\sum^{N}_{j=1}\lambda_{j}\nabla h_{j}\right)$ (17)
$\displaystyle+\lambda_{0}G(x)\left(\sum^{N}_{j=1}\left(\lambda_{j}\frac{\partial\nabla
h_{j}}{\partial x_{k}}+\frac{\partial\lambda_{j}}{\partial x_{k}}\nabla
h_{j}\right)-\frac{\partial\nabla V}{\partial x_{k}}\right)$

From the equilibrium conditions valid on $x^{\star}\in\mathcal{E}_{i}$, the
first term in parenthesis vanishes. Furthermore, on the second sum on (17), we
know that $\lambda_{j}=0$, $\forall j\neq i$. Then, define the open set of
points where only the $i$-th CBF constraint is active as

$\displaystyle\mathcal{S}_{i}=\\{x\in\mathbb{R}^{n}\,|\,$
$\displaystyle\langle L_{g}h_{i}(x),u^{\star}(x)\rangle+\alpha h_{i}(x)=0\,,$
(18) $\displaystyle\langle L_{g}h_{j}(x),u^{\star}(x)\rangle+\alpha
h_{j}(x)>0\,,\,\forall j\neq i\\}\,,$

where $u^{\star}(x)$ is given by the QP solution (12). Notice that
$\lambda_{i}(x)>0$ and $\lambda_{j}(x)=0\,(j\neq i)$ for all
$x\in\mathcal{S}_{i}$. Therefore, $\mathcal{S}_{i}$ contains the equilibrium
point $x^{\star}\in\mathcal{E}_{i}$, since only the $i$-th CBF constraint is
active (that is, $\lambda_{i}(x^{\star})>0,\lambda_{j}(x^{\star})=0,\forall
j\neq i$). Therefore, on $x^{\star}\in\mathcal{E}_{i}$,
$\frac{\partial\lambda_{j}}{\partial x_{k}}=0$, $\forall j\neq i$ on the
second sum of (17). Then, (17) reduces to

$\displaystyle\frac{\partial f_{cl}}{\partial x_{k}}^{\star}\\!\\!$
$\displaystyle=\lambda^{\star}_{0}G(x^{\star})\left([H_{i}]_{k}+\frac{\partial\lambda_{i}}{\partial
x_{k}}\nabla h_{i}\right)\,,$ (19) $\displaystyle[H_{i}]_{k}$
$\displaystyle=\lambda_{i}\frac{\partial\nabla h_{i}}{\partial
x_{k}}-\frac{\partial\nabla V}{\partial x_{k}}$

Notice that (19) is the $k$-th column of the Jacobian matrix at the
equilibrium point. Besides, this expression shows that on
$x^{\star}\in\mathcal{E}_{i}$, the Jacobian $J_{cl}(x^{\star})$ is not
dependent on the other CBFs $h_{j}(x)$, $j\neq i$. Similarly, the partial
derivatives of $\nabla h_{i}$ and $\nabla V$ with respect to $x_{k}$ are the
columns of the Hessian matrices of $h_{i}$ and $V$, respectively. Then,
$[H_{i}]_{k}$ is the $k$-th column of matrix
$H_{i}=\lambda^{\star}_{i}H_{h,i}-H_{V}$.

Next, taking the partial derivative of (15) with respect to $x_{k}$ and
applying the equilibrium condition $\nabla V=\lambda_{i}\nabla h_{i}$ yields

$\displaystyle\frac{\partial\lambda_{i}}{\partial
x_{k}}=-\frac{1}{\lambda^{\star}_{0}\lVert\nabla
h_{i}\rVert^{2}}\left(\lambda^{\star}_{0}\nabla
h_{i}^{\mathsf{T}}G[H_{i}]_{k}-\alpha\frac{\partial h_{i}}{\partial
x_{k}}\right)$ (20)

Substituting (20) into (19) yields:

$\displaystyle\frac{\partial f_{cl}}{\partial x_{k}}^{\star}\\!\\!$
$\displaystyle=\lambda^{\star}_{0}\mathcal{P}_{G\nabla h_{i},\nabla
h_{i}}G[H_{i}]_{k}\\!-\\!\frac{\alpha}{\lVert\nabla
h_{i}\rVert_{G}^{2}}[\nabla h_{i}]_{k}G\nabla h_{i}$

where $[\nabla h_{i}]_{k}$ denotes the $k$-th component of $\nabla h_{i}$. The
expression above is simply the $k$-th column of (16), thus concluding the
demonstration. ∎

In [6, Theorem 2], it was shown that some of these boundary equilibria can be
asymptotically stable even for a simple integrator system. Here, we generalize
that result for the driftless nonlinear closed-loop system (2) with control
$u^{\star}(x)$ from (5). Specifically, we derive a necessary and sufficient
condition under which the boundary equilibria is unstable.

######  Theorem 3.

Consider the system (1) with $u=u^{\star}(x)$ given by (5), and assume that
the CLF minimum $x_{0}\in\text{int}(\mathcal{C})$. A boundary equilibrium
point $x^{\star}\in\mathcal{E}_{i}$ is unstable if and only if there exists a
direction $z\in\text{span}\\{\nabla
V(x^{\star})\\}^{\perp}\equiv\text{span}\\{\nabla h_{i}(x^{\star})\\}^{\perp}$
such that

$\displaystyle\lambda^{\star}_{i}\,\mathcal{D}^{2}_{z}h_{i}(x^{\star})-\,\mathcal{D}^{2}_{z}V(x^{\star})>0\,,$
(21)

where $\mathcal{D}^{2}_{z}V(x^{\star})=z^{\mathsf{T}}H_{V}z$ and
$\mathcal{D}^{2}_{z}h_{i}(x^{\star})=z^{\mathsf{T}}H_{h,i}z$ are the second
directional derivatives of $V$ and $h_{i}$ evaluated at
$x^{\star}\in\mathcal{E}_{i}$, respectively.

###### Proof.

Using the expression for the Jacobian matrix in the equilibrium point (16) and
computing the inner product between the eigenvalue equation
$J_{cl}(x^{\star})v_{k}=\sigma_{k}v_{k}$ and $\nabla h_{i}(x^{\star})$ yields

$\displaystyle\nabla
h_{i}^{\mathsf{T}}\\!J_{cl}(x^{\star})\,v_{k}=-\alpha\nabla
h_{i}^{\mathsf{T}}v_{k}=\sigma_{k}\nabla h_{i}^{\mathsf{T}}v_{k}\,,$

where the property (iv) of the oblique projection matrix was used. The
equation above shows that the eigenvalues associated to eigenvectors that are
not perpendicular to $\nabla h_{i}$ are $\sigma_{k}=-\alpha<0$, due to the
fact that $\alpha>0$. Then, the corresponding eigenvalue equation
$J_{cl}(x^{\star})v_{k}=-\alpha v_{k}$ can be rewritten as

$\displaystyle\mathcal{P}_{i}\left(\lambda^{\star}_{0}GH_{i}+\alpha
I_{n}\right)v_{k}\\!=\\!0$ (22)

From (22), two conclusions can be drawn:

  1. 1)

$(-\alpha,v_{k})$ is an eigenpair of $\lambda^{\star}_{0}GH_{i}$: if $-\alpha$
is an eigenvalue of $\lambda^{\star}_{0}GH_{i}$ with geometric multiplicity
$\mathsf{s}$, then the corresponding eigenvectors $v_{k}$ of
$\lambda^{\star}_{0}GH_{i}$ associated to $-\alpha$ satisfy (22), and are also
eigenvectors of $J_{cl}(x^{\star})$, with associated eigenvalue $-\alpha$.

  2. 2)

$-\alpha$ is not an eigenvalue of $\lambda^{\star}_{0}GH_{i}$: in this case,
$\lambda^{\star}_{0}GH_{i}+\alpha I_{n}$ is nonsingular. By property (iii) of
the oblique projection matrix, the null space of $\mathcal{P}_{G\nabla
h_{i},\nabla h_{i}}$ is a one dimensional subspace generated by $G\nabla
h_{i}$. Therefore, the unique solution for (22) is

$\displaystyle v_{k}=\beta(\lambda^{\star}_{0}GH_{i}+\alpha I_{n})^{-1}G\nabla
h_{i}\,,\quad\beta\in\mathbb{R}\,,$

describing the corresponding (unique) eigenvector associated to eigenvalue
$-\alpha$.

From the above, we conclude the following: $J_{cl}(x^{\star})$ has between $1$
and $\mathsf{s}$ stable eigenvalues equal to $-\alpha$, with corresponding
eigenvectors satisfying $\nabla h_{i}^{\mathsf{T}}v_{k}\neq 0$. In this case,
all the remaining $n-\mathsf{s}$ to $n-1$ eigenvalues of $J_{cl}(x^{\star})$
must be associated to corresponding eigenvectors $v_{k}\in\mathbb{R}^{n}$
lying on the orthogonal complement of $\nabla h_{i}(x^{\star})$, that is,
$\nabla h_{i}(x^{\star})^{\mathsf{T}}v_{k}=0$. Therefore, the stability of
$x^{\star}\in\mathcal{E}_{i}$ is fully characterized by the eigenpairs
$(\sigma_{k},v_{k})\in\mathbb{R}\times\mathbb{R}^{n}$ such that
$v_{k}\in\text{span}\\{\nabla h_{i}(x^{\star})\\}^{\perp}$.

Using (16), the corresponding eigenvalue equation for these eigenpairs is
given by $J_{cl}(x^{\star})v_{k}=G_{i}H_{i}v_{k}=\sigma_{k}v_{k}$, where
$G_{i}=\mathcal{P}_{i}G$. This eigenvalue equation can also be rewritten as

$\displaystyle G_{i}H_{i}v_{k}=\sigma_{k}v_{k}$ (23)

Therefore, we can use (23) to draw conclusions on the stability properties of
$x^{\star}\in\mathcal{E}_{i}$. This can be done by analysing the spectrum of
$G_{i}H_{i}$: since $G_{i}=G_{i}^{\mathsf{T}}\geq 0$, it can be written as
$G_{i}=G_{i}^{\frac{1}{2}}G_{i}^{\frac{1}{2}}$, where $G_{i}^{\frac{1}{2}}$ is
the symmetric positive semidefinite square root of $G_{i}$. Define matrix
$G_{i}^{\frac{1}{2}}H_{i}G_{i}^{\frac{1}{2}}$, which has the following
eigenvalue equation:

$\displaystyle
G_{i}^{\frac{1}{2}}H_{i}G_{i}^{\frac{1}{2}}w_{k}=\sigma^{\star}_{k}w_{k}\,,$
(24)

where $(\sigma^{\star}_{k},w_{k})\in\mathbb{R}\times\mathbb{R}^{n}$ are
eigenpairs of $G_{i}^{\frac{1}{2}}H_{i}G_{i}^{\frac{1}{2}}$. Since
$G_{i}^{\frac{1}{2}}H_{i}G_{i}^{\frac{1}{2}}$ is symmetric, its $n$
eigenvectors form an orthonormal basis for $\mathbb{R}^{n}$, i.e.
$w_{k}^{\mathsf{T}}w_{j}=\delta_{kj}$ ($\delta_{kj}$ is the Kronecker delta).
Left-multiplying both sides of (24) by $G_{i}^{\frac{1}{2}}$ yields

$\displaystyle
G_{i}^{\frac{1}{2}}G_{i}^{\frac{1}{2}}H_{i}G_{i}^{\frac{1}{2}}w_{k}$
$\displaystyle=G_{i}H_{i}\underbrace{G_{i}^{\frac{1}{2}}w_{k}}_{v_{k}}=\sigma^{\star}_{k}\underbrace{G_{i}^{\frac{1}{2}}w_{k}}_{v_{k}}$
(25)

Note that (25) and (23) are the same eigenvalue equation for
$\sigma^{\star}_{k}\neq 0$, revealing that $G_{i}H_{i}$ and
$G_{i}^{\frac{1}{2}}H_{i}G_{i}^{\frac{1}{2}}$ share the same nonzero
eigenvalues ($\sigma_{k}=\sigma^{\star}_{k}\neq 0$). Furthermore, the
corresponding eigenvectors of $G_{i}H_{i}$ are given by
$v_{k}=G_{i}^{\frac{1}{2}}w_{k}$. Then, left-multiplying (24) by
$w_{j}^{\mathsf{T}}$ yields

$\displaystyle v_{j}^{\mathsf{T}}H_{i}v_{k}=\sigma_{k}\delta_{kj}$ (26)

One can now conclude the following. Consider first that
$x^{\star}\in\mathcal{E}_{i}$ is unstable. Then, some of the eigenvalues of
$G_{i}H_{i}$ must be strictly positive, that is, $\exists\,\sigma_{k}>0$ for
some $k$. Using (26):

$\displaystyle\sigma_{k}=v_{k}^{\mathsf{T}}H_{i}v_{k}$
$\displaystyle=\lambda^{\star}_{i}\,v_{k}^{\mathsf{T}}H_{h,i}v_{k}-v_{k}^{\mathsf{T}}H_{V}v_{k}$
$\displaystyle=\lambda^{\star}_{i}\,\mathcal{D}^{2}_{v_{k}}h_{i}(x^{\star})-\mathcal{D}^{2}_{v_{k}}V(x^{\star})>0$

which shows that $z=v_{k}\in\text{span}\\{\nabla h_{i}(x^{\star})\\}^{\perp}$
represents a direction s.t. condition (21) is true. Thus, sufficiency of the
condition in Theorem 3 is proven.

Now consider that $\exists\,z\in\text{span}\\{\nabla
h_{i}(x^{\star})\\}^{\perp}$ s.t. (21) is true. Note that condition (21) is
equivalent to $z^{\mathsf{T}}H_{i}z>0$. Since $z\in\text{span}\\{\nabla
h_{i}(x^{\star})\\}^{\perp}$, it can be expanded in terms of the eigenvectors
of $G_{i}H_{i}$, as $z=\sum_{k=1}\beta_{k}v_{k}$, where
$\beta_{k}\in\mathbb{R}$. Using this expansion and (26),
$z^{\mathsf{T}}H_{i}z$ yields

$\displaystyle
z^{\mathsf{T}}H_{i}z=\sum_{k,j}\beta_{k}\beta_{j}v_{k}^{\mathsf{T}}H_{i}v_{j}=\sum_{k}\beta_{k}^{2}\sigma_{k}>0\,,$

which means that there exists at least one $\sigma_{k}>0$. Then,
$x^{\star}\in\mathcal{E}_{i}$ is unstable. Thus, necessity of the condition in
Theorem 3 is proven. ∎

######  Remark II.1.

Theorem 3 has the following geometric meaning. At any equilibrium point
$x^{\star}\in\mathcal{E}_{i}$, the orthogonal complements
$\text{span}\\{\nabla V(x^{\star})\\}^{\perp}$ and $\text{span}\\{\nabla
h_{i}(x^{\star})\\}^{\perp}$ are equivalent vector spaces. Thus, one can
define the sectional curvatures of $V$ and $h_{i}$ at some direction
$z\in\text{span}\\{\nabla V(x^{\star})\\}^{\perp}\equiv\text{span}\\{\nabla
h_{i}(x^{\star})\\}^{\perp}$ as

$\displaystyle\kappa_{v}(x^{\star}\\!,z)$ $\displaystyle=\frac{1}{\lVert\nabla
V\rVert}\langle\hat{z},H_{V}\hat{z}\rangle\,,$
$\displaystyle\kappa_{h,i}(x^{\star}\\!,z)$
$\displaystyle=\frac{1}{\lVert\nabla
h_{i}\rVert}\langle\hat{z},H_{h,i}\hat{z}\rangle\,.$

Then, condition (21) can be precisely rewritten as a difference of sectional
curvatures at the orthogonal complements, that is,

$\displaystyle\Delta\kappa_{i}(x^{\star},z)$
$\displaystyle=\kappa_{h,i}(x^{\star}\\!,z)-\kappa_{v}(x^{\star}\\!,z)$ (27)
$\displaystyle=\frac{1}{\lVert\nabla
h_{i}\rVert}\langle\hat{z},H_{h,i}\hat{z}\rangle-\frac{1}{\lVert\nabla
V\rVert}\langle\hat{z},H_{V}\hat{z}\rangle$
$\displaystyle=\frac{1}{|\lambda^{\star}_{i}|\,\lVert\nabla h_{i}\rVert\lVert
z\rVert^{2}}\left(|\lambda^{\star}_{i}|\,\mathcal{D}^{2}_{z}h_{i}-\mathcal{D}^{2}_{z}V\right)>0$

Therefore, since $\lambda^{\star}_{i}>0$, conditions (21) and (27) are
equivalent: if there exists a direction $\hat{z}\in\text{span}\\{\nabla
V(x^{\star})\\}^{\perp}\equiv\text{span}\\{\nabla h_{i}(x^{\star})\\}^{\perp}$
such that the sectional curvature of $V$ is smaller than the sectional
curvature of $h_{i}$, then $x^{\star}\in\mathcal{E}_{i}$ is unstable. The
reason lies in geometry: $\hat{z}$ represents a direction under which the
trajectories of the closed-loop system (2) under control (5) cause the CLF $V$
to decrease, while still remaining inside of the safe set $\mathcal{C}_{i}$.

In light of Theorem 3, we now define the concept of compatibility between a
CLF and a family of CBFs.

######  Definition II.4 (Compatibility).

The CLF $V$ is compatible with the family of CBFs
$\\{h_{1},h_{2},\cdots,h_{N}\\}$ if the CLF global minimum
$x_{0}\in\mathbb{R}^{n}$ is the only stable equilibrium point of the closed-
loop system (2) with controller (5).

######  Corollary 1.

The CLF $V$ is compatible with the family of CBFs
$\\{h_{1},h_{2},\cdots,h_{N}\\}$ if and only if:

  1. (i)

$x_{0}\in\mathcal{C}=\cap^{N}_{i=1}\mathcal{C}_{i}$

  2. (ii)

$\forall x^{\star}\in\mathcal{E}_{i}$, there always exists a direction
$z\in\mathcal{T}_{x^{\star}}V\equiv\mathcal{T}_{x^{\star}}h_{i}$ such that
$\Delta\kappa_{i}(x^{\star},z)>0$, $i=1,\cdots,N$.

###### Proof.

Theorem 2 shows that the set of equilibrium points of the closed-loop system
(2) with controller (5) is given by
$(\cup^{N}_{i=1}\mathcal{E}_{i})\cup\\{x_{0}\\}$. Therefore, if condition
$\Delta\kappa_{i}(x^{\star},z)>0$ holds for some
$z\in\mathcal{T}_{x^{\star}}V\equiv\mathcal{T}_{x^{\star}}h_{i}$ and for every
equilibrium point $x^{\star}\in\mathcal{E}_{i}$, then the set of stable
equilibria of (2) reduce to $\\{x_{0}\\}$, since equilibria in
$\cup^{N}_{i=1}\mathcal{E}_{i}$ are all guaranteed to be unstable. ∎

##  III Analysis for Quadratic CLF-CBF Pairs

Due to the geometric complexity that can be involved in the level set of
general pairs of multivariate functions, it can be very difficult to guarantee
compatibility for general CLF-CBF pairs. For the case that the CLF-CBF pair is
a general $\mathcal{C}^{2}$ function, the quadratic approximation is the
simplest function that encodes information about the local curvature of the
level sets, which according to Theorem 3 is paramount to determine stability
of the resulting closed-loop equilibrium points.

In this section, we present key results regarding the analytical solutions for
the boundary equilibria in (6) and present sufficient conditions for
compatibility, in the case of quadratic CLF-CBF pairs. To this end, we first
present a brief introduction to Matrix Pencil Theory, which is of central
importance on the theoretical developments that follow thereafter.

###  III-A Matrix Pencil Theory

A real symmetric linear matrix pencil is a matrix-valued operator
$P:\mathbb{R}\rightarrow\mathcal{S}^{n}$, where $P(\lambda)=\lambda A-B$, with
$A,B\in\mathcal{S}^{n}$ [9]. The solutions of the generalized eigenvalue
problem

$\displaystyle P(\lambda_{i})z_{i}=0\,,\quad i=1,\cdots,n$ (28)

are the $n$ eigenpairs $(\lambda_{i},z_{i})$, composed of $n$ eigenvalues
$\lambda_{i}\in\mathbb{C}$ and $n$ eigenvectors $z_{i}\in\mathbb{R}^{n}$ of
the real, symmetric matrix pencil $P(\lambda)$. These pencil eigenvalues
define the pencil spectrum
$S_{P}=\\{\lambda\in\mathbb{C}:\det(P(\lambda))=0\\}\subset\mathbb{C}$. In
general, pencil eigenvalues are complex numbers. However, if either $A$ or $B$
are definite matrices, then $S_{P}\subset\mathbb{R}$ (see [10]).

######  Definition III.1.

Let $P(\lambda)=\lambda A-B$ be a real symmetric matrix pencil with $A$
invertible and real spectrum $S_{P}$. An eigenvalue of $P(\lambda)$ of
positive type is an eigenvalue $\lambda_{i}$ such that
$z_{i}^{\mathsf{T}}Az_{i}>0$ for the corresponding eigenvector $z_{i}$.
Similarly, an eigenvalue of $P(\lambda)$ of negative type is an eigenvalue
$\lambda_{i}$ such that $z_{i}^{\mathsf{T}}Az_{i}<0$ for the corresponding
eigenvector $z_{i}$. The sets of eigenvalues of $P(\lambda)$ of positive and
negative type are denoted by $S^{+}_{P}$ and $S^{-}_{P}$, respectively.
Moreover, $S_{P}=S^{+}_{P}\cup S^{-}_{P}$.

######  Remark III.1.

By definition, if $A>0$, $S_{P}=S^{+}_{P}$, $S^{-}_{P}=\emptyset$ (all pencil
eigenvalues of positive type). Similarly, if $A<0$, $S_{P}=S^{-}_{P}$,
$S^{+}_{P}=\emptyset$ (all pencil eigenvalues of negative type).

######  Lemma 2 (Matrix Pencil Diagonalization).

Let $P(\lambda)=\lambda A-B\in\mathcal{S}^{n}$ be a real symmetric matrix
pencil with an invertible matrix $A$ and real spectrum $S_{P}$. Then, the
matrix
$Z=\begin{bmatrix}\,z_{1}\\!\\!&\\!\\!\cdots\\!\\!&\\!\\!z_{n}\,\end{bmatrix}\in\mathbb{R}^{n\times
n}$ is nonsingular and

$\displaystyle Z^{\mathsf{T}}AZ=\begin{bmatrix}I_{p}\\!\\!&\\!\\!0\\\
0\\!\\!&\\!\\!-I_{n-p}\end{bmatrix},\quad
Z^{\mathsf{T}}BZ=\begin{bmatrix}\Lambda^{+}_{P}\\!\\!&\\!\\!0\\\
0\\!\\!&\\!\\!-\Lambda^{-}_{P}\end{bmatrix}\,,$ (29)

where $\Lambda^{+}_{P}=\text{diag}\\{\lambda_{1},\cdots,\lambda_{p}\\}$,
$\Lambda^{-}_{P}=\text{diag}\\{\lambda_{p+1},\cdots,\lambda_{n}\\}$ are
diagonal matrices with the $p$ pencil eigenvalues of positive type and the
$n-p$ eigenvalues of negative type, respectively. The columns of $Z$ are the
pencil eigenvectors of $P(\lambda)$.

###### Proof.

See [9, Lemma 1.1]. ∎

######  Lemma 3.

Let $P(\lambda)=\lambda A-B\in\mathcal{S}^{n}$ be a real symmetric matrix
pencil with an invertible matrix $A$ and real spectrum $S_{P}$.

  1. 1)

If $A>0$, then:

$\displaystyle P(\lambda)$
$\displaystyle>0\,,\quad\forall\lambda>\max{S_{P}}\,,$ (30) $\displaystyle
P(\lambda)$ $\displaystyle<0\,,\quad\forall\lambda<\min{S_{P}}\,.$ (31)

  2. 2)

If $A$ is indefinite, but the pencil eigenvalues of positive and negative type
are separated, then there exists an interval where $P(\lambda)$ is definite.
In particular, if $\max{S^{+}_{P}}<\min{S^{-}_{P}}$, $P(\lambda)>0$ in the
open interval $\lambda\in(\max{S^{+}_{P}},\min{S^{-}_{P}})$.

###### Proof.

The proof of this interesting and important result in Matrix Pencil Theory can
be found in [9, Theorem 1.2]. ∎

###  III-B Equilibrium Solutions with Quadratic CLF-CBFs

Consider that the CLF and the family of CBFs are given by the following
irreducible quadratic polynomials on $\mathbb{R}^{n}$, respectively:

$\displaystyle 2\,V(x,\Pi_{V})$ $\displaystyle=\Delta
x_{0}^{\mathsf{T}}H_{V}\Delta x_{0}\geq 0\,,\\!\\!\\!\\!\\!\\!$
$\displaystyle\Delta x_{0}=x-x_{0}$ (32) $\displaystyle 2\,h(x,\Pi_{h,i})$
$\displaystyle=\Delta x_{i}^{\mathsf{T}}H_{h,i}\Delta
x_{i}-1\,,\\!\\!\\!\\!\\!\\!$ $\displaystyle\Delta x_{i}=x-x_{i}$ (33)

where $\Pi_{V}=\\{x_{0},H_{V}\\}$, $\Pi_{h,i}=\\{x_{i},H_{h,i}\\}$ are
parameters: the critical points $x_{i}\in\mathbb{R}^{n}$, $i=0,1,\cdots,N$ and
the symmetric, positive definite Hessian matrices
$H_{V},H_{h,i}\in\mathcal{S}^{n}$, $i=1,\cdots,N$. Notice that the level sets
of irreducible quadratic polynomials with positive definite Hessians are
$n$-dimensional ellipses. From (33), the boundary set
$\partial\mathcal{C}_{i}$ is defined by

$\displaystyle\partial\mathcal{C}_{i}$
$\displaystyle=\\{\,x\in\mathbb{R}^{n}\,|\,\Delta
x_{i}^{\mathsf{T}}H_{h,i}\Delta x_{i}=1\\}\,.$ (34)

From Theorem 2, substituting the gradients of (32)-(33) into the equation
$\nabla V=\lambda\nabla h_{i}$ with the transformation $v_{i}=\Delta x_{i}$
and using (34), the equilibrium solutions are given by the following system of
$n+1$ nonlinear equations in $n+1$ variables:

$\displaystyle H_{i}(\lambda)v_{i}$ $\displaystyle=w_{i}\,,\quad\lambda_{i}>0$
(35) $\displaystyle v^{\mathsf{T}}_{i}H_{h,i}v_{i}$ $\displaystyle=1\,,$ (36)

where $H_{i}=\lambda H_{h,i}-H_{V}$ is a real symmetric matrix pencil on
variable $\lambda$ and $w_{i}=H_{V}(x_{i}-x_{0})\in\mathbb{R}^{n}$. For
$\lambda\notin S_{H_{i}}$, the pencil $H_{i}(\lambda)$ is invertible and (35)
can be immediately solved, yielding $v_{i}(\lambda)=H_{i}(\lambda)^{-1}w_{i}$.
In this case, one can define the following scalar function:

$\displaystyle q_{i}(\lambda)$
$\displaystyle=v_{i}(\lambda)^{\mathsf{T}}H_{h,i}v_{i}(\lambda)$
$\displaystyle=w^{\mathsf{T}}_{i}H_{i}(\lambda)^{-1}H_{h,i}H_{i}(\lambda)^{-1}w_{i}$
(37)

As will be clear in the sequel, the properties of this function
$q_{i}(\lambda)$, which will be called $i$-th q-function (associated to the
$i$-th barrier), play a key role in our analysis. Note also that every
positive $\lambda^{\star}\notin S_{H_{i}}$ satisfying
$q_{i}(\lambda^{\star})=1$ corresponds to a non-degenerate solution, with
corresponding equilibrium point given by
$x^{\star}=v_{i}(\lambda^{\star})+x_{i}$.

######  Theorem 4 (Properties of the q-function.).

Let $q_{i}(\lambda)$ be given by (37), where $H_{i}(\lambda)=\lambda
H_{h,i}-H_{v}$ is a real symmetric matrix pencil with real spectrum
$S_{H_{i}}$, associated to the $i$-th barrier $h(x,\Pi_{h,i})$. Then:

  1. 4.1)

If the CLF global minimum $x_{0}\in\mathbb{R}^{n}$ is contained in the safe
set, that is,
$x_{0}\in\mathcal{C}=\cap^{N}_{i=1}\mathcal{C}_{i}\subset\mathbb{R}^{n}$
(Assumption II.2), then $q_{i}(0)\geq 1$.

  2. 4.2)

If $H_{h,i}$ is invertible, then

$\displaystyle\lim_{\lambda\rightarrow\pm\infty}q_{i}(\lambda)=0\,.$ (38)

  3. 4.3)

If $z_{i,k}^{\mathsf{T}}w_{i}\neq 0$ for all pencil eigenvectors
$z_{i,k}\in\mathbb{R}^{n}$, we have

$\displaystyle(i)\lim_{\lambda\rightarrow\lambda_{k}}q_{i}(\lambda)$
$\displaystyle=+\infty\quad\forall\lambda_{k}\in S^{+}_{H_{i}}\,,$ (39)
$\displaystyle(ii)\lim_{\lambda\rightarrow\lambda_{k}}q_{i}(\lambda)$
$\displaystyle=-\infty\quad\forall\lambda_{k}\in S^{-}_{H_{i}}\,.$ (40)

  4. 4.4)

If $H_{i}(\lambda)$ is positive (negative) definite at some interval, then
$q_{i}(\lambda)$ is strictly decreasing (increasing) on that interval.

  5. 4.5)

If $H_{h,i}>0$ ($H_{h,i}<0$), $q_{i}(\lambda)$ is convex (concave) on the
$n-1$ intervals separating two successive real pencil eigenvalues of positive
(negative) type.

###### Proof.

4.1) Evaluating (37) at $\lambda=0$ yields

$\displaystyle q_{i}(0)$
$\displaystyle=w_{i}^{\mathsf{T}}H_{i}(0)^{-1}H_{h,i}H_{i}(0)^{-1}w_{i}$
$\displaystyle=(x_{0}-x_{i})^{\mathsf{T}}H_{h,i}(x_{0}-x_{i})$ (41)

Notice that, using (33), (41) can be written as
$q_{i}(0)=2h_{i}(x_{0},\Pi_{h,i})+1$. Then, $q_{i}(0)\geq 1$ implies
$h_{i}(x_{0},\Pi_{h,i})\geq 0$, which means that $x_{0}\in\mathcal{C}_{i}$.
Then, we conclude that if and only if $q_{i}(0)\geq 1$ $\forall i=1,\cdots,N$,
then the first part of Assumption II.2 holds, since
$x_{0}\in\mathcal{C}=\cap^{N}_{i=1}\mathcal{C}_{i}$.

4.2) If $H_{h,i}$ is invertible, there are no pencil eigenvalues at infinity,
and therefore $v_{i}(\lambda)=H_{i}(\lambda)^{-1}w_{i}\rightarrow 0$ as
$\lambda\rightarrow\pm\infty$. Then, the expression for $q_{i}(\lambda)$ at
(37) proves (38).

4.3) If the spectrum $S_{H_{i}}$ is real, then $q_{i}(\lambda)$ admits the
diagonalization as presented in Lemma 2. Then, using (37), $q_{i}(\lambda)$
can be written as:

$\displaystyle q_{i}(\lambda)$
$\displaystyle=(Z_{i}^{\mathsf{T}}w_{i})^{\mathsf{T}}\\!\begin{bmatrix}(\lambda
I_{p}-\Lambda^{+}_{H_{i}})^{-2}\\!\\!\\!\\!&\\!\\!\\!\\!0\\\
0\\!\\!\\!\\!&\\!\\!\\!\\!-(\lambda
I_{n-p}-\Lambda^{-}_{H_{i}})^{-2}\end{bmatrix}\\!Z_{i}^{\mathsf{T}}w_{i}$
$\displaystyle=\sum_{\lambda_{i,k}\in
S^{+}_{H_{i}}}\frac{(z_{i,k}^{\mathsf{T}}w_{i})^{2}}{(\lambda-\lambda_{i,k})^{2}}-\\!\\!\\!\\!\\!\sum_{\lambda_{i,k}\in
S^{-}_{H_{i}}}\frac{(z_{i,k}^{\mathsf{T}}w_{i})^{2}}{(\lambda-\lambda_{i,k})^{2}}\,,$
(42)

where matrix
$Z_{i}=\begin{bmatrix}\,z_{i,1}\\!\\!&\\!\\!\cdots\\!\\!&\\!\\!z_{i,n}\,\end{bmatrix}\in\mathbb{R}^{n\times
n}$ collects the pencil eigenvectors $z_{i,k}\in\mathbb{R}^{n}$ associated to
$H_{i}(\lambda)$. The first and second sums on the right-hand side of (42)
collect the $p$ eigenvalues of positive type and the $n-p$ eigenvalues of
negative type of $H_{i}(\lambda)$, respectively. If
$z_{i,k}^{\mathsf{T}}w_{i}\neq 0$ for all terms,
$q_{i}(\lambda)\rightarrow+\infty$ as $\lambda$ approaches any eigenvalue of
positive type, proving (39). Similarly, $q_{i}(\lambda)\rightarrow-\infty$ as
$\lambda$ approaches any eigenvalue of negative type, proving (40).

4.4) The first derivative of $q_{i}(\lambda)$ with respect to $\lambda$ is:

$\displaystyle q_{i}^{\prime}(\lambda)$
$\displaystyle=-2\,v_{h,i}(\lambda)^{\mathsf{T}}H_{i}(\lambda)^{-1}v_{h,i}(\lambda)\,,$
(43)

where $v_{h,i}(\lambda)=H_{h,i}v_{i}(\lambda)\in\mathbb{R}^{n}$. To derive
(43), we have used the first derivative of (35), yielding
$H_{i}(\lambda)v_{i}^{\prime}(\lambda)\\!=\\!-H_{h,i}v_{i}(\lambda)$, and then
the derivative of (37). If the pencil $H_{i}(\lambda)$ is positive (negative)
definite at some interval $\mathcal{I}\subset\mathbb{R}$, then the inverse
$H_{i}(\lambda)^{-1}$ is also positive (negative) definite on $\mathcal{I}$.
In this case, from (43), $q_{i}^{\prime}(\lambda)$ is strictly negative
(positive), which makes $q_{i}(\lambda)$ strictly decreasing (increasing) on
$\mathcal{I}$.

4.5) Differentiating (43), the second derivative of $q_{i}(\lambda)$ is:

$\displaystyle q_{i}^{\prime\prime}(\lambda)$
$\displaystyle=6\,v_{h,i}(\lambda)^{\mathsf{T}}H_{i}^{-1}(\lambda)H_{h,i}H_{i}^{-1}(\lambda)v_{h,i}(\lambda)\,.$
(44)

To derive (44), we have used the second derivative of (35), yielding
$2H_{h,i}v_{i}^{\prime}(\lambda)+H_{i}(\lambda)v_{i}^{\prime\prime}(\lambda)=0$,
and then the second derivative of (37). Similarly to (37), (44) shows that
$q_{i}^{\prime\prime}(\lambda)$ has a similar form than $q_{i}(\lambda)$, with
$H_{i}^{-1}(\lambda)w_{i}$ replaced by
$\sqrt{6}H_{i}^{-1}(\lambda)v_{h,i}(\lambda)$. Therefore, one can use the
canonical form as in (42) to write:

$\displaystyle q_{i}^{\prime\prime}(\lambda)$
$\displaystyle=\sum_{\lambda_{k}\in
S^{+}_{H_{i}}}\frac{(z_{i,k}^{\mathsf{T}}w_{i})^{2}}{(\lambda-\lambda_{k})^{4}}-\sum_{\lambda_{k}\in
S^{-}_{H_{i}}}\frac{(z_{i,k}^{\mathsf{T}}w_{i})^{2}}{(\lambda-\lambda_{k})^{4}}\,,$
(45)

Since $H_{h,i}>0$, there are no pencil eigenvalues of the negative type, and
therefore the second sum on the right-hand side of (45) vanishes. Therefore,
$q_{i}^{\prime\prime}(\lambda)$ is strictly positive on its domain, which is
$\mathbb{R}\setminus S_{H_{i}}$. Then, $q_{i}(\lambda)$ must be convex on the
$n-1$ intervals separating two successive pairs of pencil eigenvalues of
positive type. A similar argument can be used to show that $q_{i}(\lambda)$
must be concave on the $n-1$ intervals separating two successive pairs of
pencil eigenvalues of negative type, if $H_{h,i}<0$. ∎

######  Remark III.2.

From Theorem 4.4), $q_{i}^{\prime}(\lambda)\neq 0$ for any $\lambda$ at
intervals where $H_{i}(\lambda)$ is a definite matrix (that is, no critical
points of $q_{i}$ exist on these intervals). These intervals were described in
Lemma 3.

Next, we present a corollary of Theorem 3 for the specific family of quadratic
CLFs and CBFs that we are considering in this section.

######  Corollary 2.

Let the CLF and CBFs be defined by the family of quadratic polynomials
(32)-(33), respectively. Then, any boundary equilibrium point
$x^{\star}\in\mathcal{E}_{i}$ that satisfies the matrix pencil strict
inequality $H_{i}(\lambda^{\star}_{i})=\lambda^{\star}_{i}H_{h,i}-H_{V}>0$ is
unstable, where $\lambda^{\star}_{i}>0$ is the scaling between the two
collinear gradients on that equilibrium point, as defined in (6).

###### Proof.

This result follows immediately from Theorem 3 and from the fact that the
Hessians of the quadratic CLF and the $i$-th quadratic CBF are constant
positive definite matrices. If the pencil $H_{i}(\lambda^{\star}_{i})$ is
positive definite at $\lambda^{\star}_{i}$, that is,
$H_{i}(\lambda^{\star}_{i})=\lambda^{\star}_{i}H_{h,i}-H_{V}>0$, then
$z^{\mathsf{T}}H_{i}(\lambda^{\star}_{i})z=z^{\mathsf{T}}(\lambda^{\star}_{i}H_{h,i}-H_{V})z>0$
for all $z\in\mathbb{R}^{n}$, yielding
$\lambda^{\star}_{i}z^{\mathsf{T}}H_{h,i}z-z^{\mathsf{T}}H_{V}z>0$, or
$\lambda^{\star}_{i}\mathcal{D}^{2}_{z}h_{i}(x^{\star})-\mathcal{D}^{2}_{z}V(x^{\star})>0$
for all $z\in\mathbb{R}^{n}$. Then, by Theorem 3, the corresponding
equilibrium point is unstable. ∎

Next, we present the main result of this section, relating the property of
compatibility between a quadratic CLF $V$ and a family of quadratic CBFs
$\\{h_{1},h_{2},\cdots,h_{N}\\}$ to the number of existing equilibrium
solutions and properties of the spectrum of the matrix pencils
$H_{i}(\lambda^{\star}_{i})$.

######  Theorem 5.

Consider Assumption II.2 and let the CLF and CBFs be defined by the family of
quadratic polynomials (32)-(33), respectively. Then, the CLF $V$ is compatible
with the family of CBFs $\\{h_{1},h_{2},\cdots,h_{N}\\}$ if the cardinality of
each $\mathcal{E}_{i}$ defined in (6) is not greater than $1$:

$\displaystyle|\mathcal{E}_{i}|\leq 1\,,\quad\forall i=1,\cdots,N$ (46)

###### Proof.

First, note that the pencil eigenvalues are real, since
$H_{V}\in\mathcal{S}^{n}_{+}$. Since $H_{h,i}\in\mathcal{S}^{n}_{+}$, we have
$q_{i}(\lambda)>0\,,\forall\lambda\in\mathbb{R}$. Also, statement 1) from
Lemma 3 shows that $H_{i}(\lambda)>0$ for $\lambda>\max{S_{H_{i}}}$. From
Theorem 4.4) and (38), $q_{i}(\lambda)$ is strictly decreasing for
$\lambda>\max{S_{H_{i}}}$, going from $+\infty$ to $0$, which means that, if
Assumption II.2 holds, a single equilibrium solution
$q_{i}(\lambda^{\star})=1$ satisfying $\lambda^{\star}_{i}>\max{S_{H_{i}}}$,
$\lambda^{\star}_{i}>0$ must exist. Then, since $H_{i}(\lambda^{\star})>0$,
the corresponding boundary equilibrium point is unstable from Corollary 2. If
other boundary equilibrium solutions exist, they can only exist in the
intervals between pairs of sucessive pencil eigenvalues. On these regions, the
pencil $H_{i}(\lambda)$ is not definite, and therefore no conclusions can be
drawn about the stability of the equilibrium point using Theorem 3. Therefore,
condition (46) is sufficient to show that no stable boundary equilibria
exists. Therefore, by Definition II.4, the CLF $V$ and the CBF family
$\\{h_{1},h_{2},\cdots,h_{N}\\}$ are compatible if condition (46) is
satisfied.

∎

###  III-C A Numerical Example

In this section, we present a numerical example with a three dimensional
quadratic CLF-CBF pair that illustrates the theoretical developments of the
last sections. Consider the following CLF-CBF pair in $\mathbb{R}^{3}$:

$\displaystyle 2V(x,\Pi_{V})$
$\displaystyle=\sum^{3}_{j=1}\sigma_{j}x_{j}^{2}\,,$ (47) $\displaystyle
2h(x,\Pi_{h,i})$
$\displaystyle=\frac{1}{r^{2}}\sum^{3}_{j=1}(x_{j}-x_{i_{j}})^{2}-1\,.$ (48)

The CLF (47) is a quadratic form with parameters $\sigma_{1}$, $\sigma_{2}$
and $\sigma_{3}$. The CLF level sets are paraboloids in three dimensions
aligned with the main axis of the state space and centered on the origin,
while the unsafe set defined by the CBF (48) defines an open ball of radius
$r>0$ centered on
$x_{i}^{\mathsf{T}}=\begin{bmatrix}\,x_{i_{1}}\\!\\!&\\!\\!x_{i_{2}}\\!\\!&\\!\\!x_{i_{3}}\,\end{bmatrix}$.
In this particular example, we use the values $\sigma_{1}=1.0$,
$\sigma_{2}=3.0$, $\sigma_{3}=5.0$, $r=1$,
$x_{i}^{\mathsf{T}}=\begin{bmatrix}\,1.0\\!\\!&\\!\\!1.0\\!\\!&\\!\\!0.5\,\end{bmatrix}$.

Figure 2: Example of $q_{i}(\lambda)$ for $n=3$: all three pencil eigenvalues
are of positive type, there exist two critical points and one unstable
equilibrium point.

Figure 2(a) shows the CBF boundary (in green) modeling the circular obstacle
and the geometry of the CLF level set (in blue) on a particular equilibrium
point (in red) of the closed-loop system formed by a general driftless
nonlinear system with controller (5). Notice that the gradients $\nabla V$ and
$\nabla h$ are positively collinear on the equilibrium point $x^{\star}$,
defining the orthogonal complement $\text{span}\\{\nabla
V(x^{\star},\Pi_{V})\\}^{\perp}$ (or $\text{span}\\{\nabla
h(x^{\star},\Pi_{h,i})\\}^{\perp}$) at that point. This set is also a tangent
plane to the CLF and CBF level sets. Geometrically, the differences of
sectional curvatures $\Delta\kappa_{i}(x^{\star}\\!,z)$ on every direction
$z\in\text{span}\\{\nabla
V(x^{\star},\Pi_{V})\\}^{\perp}\equiv\text{span}\\{\nabla
h(x^{\star},\Pi_{h,i})\\}^{\perp}$ are positive, which by Theorem 3 implies
that $x^{\star}$ is unstable.

Using (47)-(48), (35) yields

$\displaystyle\underbrace{\begin{bmatrix}\lambda-r^{2}\sigma_{1}\\!&\\!0\\!&\\!0\\\
0\\!&\\!\lambda-r^{2}\sigma_{2}\\!&\\!0\\\
0\\!&\\!0\\!&\\!\lambda-r^{2}\sigma_{3}\end{bmatrix}}_{H_{i}(\lambda)}\underbrace{\begin{bmatrix}\,v_{i_{1}}\\\
v_{i_{2}}\\\ v_{i_{3}}\,\end{bmatrix}}_{v_{i}}$
$\displaystyle=r^{2}\underbrace{\begin{bmatrix}\,\sigma_{1}x_{i_{1}}\\\
\sigma_{2}x_{i_{2}}\\\ \sigma_{3}x_{i_{3}}\,\end{bmatrix}}_{w_{i}}\,,$

Notice that the pencil eigenvalues of $H(\lambda)$ are
$\lambda_{j}=r^{2}\sigma_{j}$, $j=1,2,3$. Furthermore, (36) gives the
corresponding $q_{i}$-function explicitly as:

$\displaystyle q_{i}(\lambda)=\frac{\lVert
v_{i}(\lambda)\rVert^{2}}{r^{2}}=\sum^{3}_{j=1}\frac{(r\sigma_{j}x_{i_{j}})^{2}}{(\lambda-r^{2}\sigma_{j})^{2}}$
(49)

Figure 2(b) illustrates the graph of (49) for the given parameters of the
example. Notice that the three pencil eigenvalues are given by
$\lambda_{1}=1.0$, $\lambda_{2}=3.0$ and $\lambda_{3}=5.0$ (vertical red
dashed lines), as expected. Notice also that they are all of positive type,
due to the positive definiteness of both $H_{V}$ and $H_{h,i}$. These
eigenvalues create a partition of the domain of $q_{i}(\lambda)$ composed of
$n+1$ open intervals: $\mathcal{I}_{1}=(-\infty,\lambda_{1})$,
$\mathcal{I}_{2}=(\lambda_{1},\lambda_{2})$,
$\mathcal{I}_{3}=(\lambda_{2},\lambda_{3})$ and
$\mathcal{I}_{4}=(\lambda_{3},+\infty)$. Notice that $q_{i}(\lambda)$ is
strictly increasing in $\mathcal{I}_{1}$ and strictly decreasing in
$\mathcal{I}_{4}$, due to the fact that the pencil $H_{i}(\lambda)<0$ for
$\lambda\in\mathcal{I}_{1}$ and $H_{i}(\lambda)>0$ for
$\lambda\in\mathcal{I}_{4}$, respectively (due to statement 4) of Theorem 4).
Therefore, there exist no critical points of $q_{i}(\lambda)$ in
$\mathcal{I}_{1}$ and $\mathcal{I}_{4}$. Since $q_{i}(\lambda)$ is convex in
$\mathcal{I}_{2}$ and $\mathcal{I}_{3}$, there exists a single critical point
in each one of these intervals.

From (49), notice that $q_{i}(0)=\lVert x_{i}\rVert^{2}/r^{2}$. By Theorem
4.1), the condition $q_{i}(0)\geq 1$ implies that the origin is contained in
the safe set defined by the barrier. Using (49), this condition is equivalent
to $\lVert x_{i}\rVert\geq r$, which geometrically means that the origin is
not contained inside the ball of radius $r$ that defines the obstacle
geometry. From Fig. 2(b), notice that $q_{i}(0)>1$ (black point), implying
that in fact the obstacle does not enclose the origin for the given parameters
of this example.

In general, equilibrium points are computed from
$x^{\star}=v(\lambda^{\star})+x_{i}$, where $\lambda^{\star}$ are the positive
solutions of $q_{i}(\lambda^{\star})=1$. From (49), these solutions can be
computed by finding the roots of a $6n$-degree polynomial. In Fig. 2(b), only
one solution exists (red point) on the interval $\mathcal{I}_{4}$. Since
$H_{i}(\lambda)>0\,\,\forall\lambda\in\mathcal{I}_{4}$, the corresponding
equilibrium point $x^{\star}=v_{i}(\lambda^{\star})+x_{i}$ is unstable
according to Corollary 2. This is precisely the equilibrium point showed in
Fig. 2(a). Furthermore, according to Theorem 5, the global minimum of $V$ is
the only stable equilibrium point of the closed-loop system resulting from the
QP controller (5) with $V$ and $h(x,\Pi_{h,i})$. Therefore, $V$ and barrier
$h_{i}$ are compatible.

In summary, from this example one can see that there is an interesting
relation between the geometry of the quadratic CLF-CBF pair and the properties
of the q-function. Moreover, the stability analysis of boundary equilibrium
points can be simplified considerably by the q-function: in general, using
Theorem 5, an $n$-dimensional quadratic CLF-CBF pair can be proved to be
compatible by studying a simple scalar function instead of analysing the
spectra of the closed-loop system Jacobian.

##  IV Lyapunov Shaping for QP-based Controllers

In this section, we seek to design a controller $u^{\star}(x)$ based on the QP
formulation (5) that guarantees both stabilization and safety of the
trajectories of the feedback system (2), but also ensuring that the CLF $V$
and CBF family $\\{h_{1},h_{2},\cdots,h_{N}\\}$ are rendered compatible by
using the conditions from Theorem 5.

To this end, we first present the necessary conditions to derive a controller
guaranteeing compatibility between a quadratic parametric CLF and the
quadratic CBFs. Our objective is to control the CLF parameters in order to
guarantee compatibility on the regions where equilibrium points occur in the
closed-loop system with controller (5). Finally, the main result of this paper
is presented: the design of a controller that dynamically modifies the CLF
parameters in (32) in order to guarantee compatibility between the parametric
CLF and the CBF family.

###  IV-A Guaranteeing Compatibility with Barrier Functions

Assume a given quadratic reference CLF $V(x,\Pi_{V_{r}})$ and a CBF family
$\\{h_{1},\cdots,h_{N}\\}$, both drawn from (32)-(33), respectively. Next,
define a quadratic CLF $V(x,\Pi_{v})$ with Hessian matrix parameterized by

$\displaystyle
H_{V}(\pi_{v})=L(\pi_{v})^{\mathsf{T}}L(\pi_{v})+\epsilon_{V}I_{n}\in\mathcal{S}^{n}\,,$
(50)

where $L:\mathbb{R}^{n(n+1)/2}\rightarrow\mathcal{T}(n)$ is a map from
$\mathbb{R}^{n(n+1)/2}$ to the vector space of upper triangular matrices of
order $n$ (denoted by $\mathcal{T}(n)$), with dimension
$\dim\mathcal{T}(n)=n(n+1)/2$. The parameter vector
$\pi_{v}^{\mathsf{T}}=\begin{bmatrix}\,\pi_{v_{1}}\\!\\!&\\!\\!\cdots\\!\\!&\\!\\!\pi_{v_{\dim\mathcal{T}(n)}}\,\end{bmatrix}\mathbb{R}^{\dim\mathcal{T}(n)}$
and a small positive constant $\epsilon_{V}>0$ uniquely determine the CLF
Hessian matrix $H_{V}$, which is positive-definite by construction. Then, the
dynamics of (50) is given by:

$\displaystyle\dot{H}_{V}(t)$
$\displaystyle=\sum^{\dim\mathcal{T}(n)}_{j,k=1}(\mathcal{T}^{\mathsf{T}}_{j}\mathcal{T}_{k}+\mathcal{T}^{\mathsf{T}}_{k}\mathcal{T}_{j})\pi_{v_{k}}\dot{\pi}_{v_{j}}\in\mathcal{S}^{n}$
(51) $\displaystyle=\sum^{\dim\mathcal{T}(n)}_{j=1}\frac{\partial
H_{V}}{\partial\pi_{v_{j}}}\dot{\pi}_{v_{j}}$

where the $\mathcal{T}_{j}$ are canonical basis vectors of $\mathcal{T}(n)$.
We set
$u_{v}^{\mathsf{T}}=\dot{\pi}_{v}^{\mathsf{T}}=\begin{bmatrix}\,\dot{\pi}_{v_{1}}\\!\\!&\\!\\!\cdots\\!\\!&\\!\\!\dot{\pi}_{v_{\dim\mathcal{T}(n)}}\,\end{bmatrix}\in\mathbb{R}^{\dim\mathcal{T}(n)}$
as a control signal designed to control the Hessian matrix $H_{V}$.

Considering the $i$-th barrier $h_{i}$, from Lemma (2), the following
expressions

$\displaystyle Z_{i}^{\mathsf{T}}H_{h,i}Z_{i}=I_{n}$ (52) $\displaystyle
Z_{i}^{\mathsf{T}}H_{V}Z_{i}=\Lambda_{H_{i}}^{+}$ (53)

hold for $H_{V}$, $H_{h,i}$ and the corresponding pencil eigenvectors of
$H_{i}(\lambda)$. In order to understand the dynamics of the pencil
eigenvalues with dynamic changes in the hessian matrices $H_{V}$ and
$H_{h,i}$, we now derive the dynamics of (52)-(53). Taking the time derivative
of (52)-(53) and multiplying both sides by $Z_{i}^{-\mathsf{T}}$ to the left
and by $Z_{i}^{-1}$ to the right yields:

$\displaystyle H_{h,i}W_{i}+(H_{h,i}W_{i})^{\mathsf{T}}$
$\displaystyle=-\dot{H}_{h,i}$ (54) $\displaystyle
H_{V}W_{i}+(H_{V}W_{i})^{\mathsf{T}}$
$\displaystyle=-\dot{H}_{V}+Z_{i}^{-\mathsf{T}}\dot{\Lambda}_{H_{i}}Z_{i}^{-1}$
(55)

where $W_{i}=\dot{Z}_{i}Z_{i}^{-1}$. Then, matrix $W_{i}$ maps the pencil
eigenvectors $z_{i,k}$ to their respective time derivatives
$\dot{z}_{i,k}=W_{i}z_{i,k}$, ($k=1,\cdots,n-1$). From (55), if $W_{i}=0$, the
pencil eigenvectors remain constant, yielding
$\dot{\Lambda}_{H_{i}}=Z_{i}^{\mathsf{T}}\dot{H}_{V}Z_{i}$. Therefore, if and
only if $W_{i}=0$, the off-diagonal terms of
$Z_{i}^{\mathsf{T}}\dot{H}_{V}Z_{i}$ are zero, which by using (51) yields the
following scalar equations

$\displaystyle\sum^{\dim\mathcal{T}(n)}_{l=1}\left[Z_{i}^{\mathsf{T}}\frac{\partial
H_{V}}{\partial\pi_{v_{l}}}Z_{i}\right]_{(j,k)}\dot{\pi}_{v_{l}}=0\,.\quad
j<k\,.$ (56)

Equations (56) expresses $\dim\mathcal{SO}(n)=n(n-1)/2$ linear homogeneous
equations in the time derivatives of the CLF parameters. They can be written
in matrix form by

$\displaystyle A_{r,i}(\pi_{v})\,\dot{\pi}_{v}=0\,,$ (57)

where
$A_{r,i}:\mathbb{R}^{p}\rightarrow\mathbb{R}^{\dim\mathcal{SO}(n)\times\dim\mathcal{T}(n)}$
is a square matrix. Then, if (57) is satisfied, the pencil eigenvectors of
$H_{i}(\lambda)$ remain constant while the geometry of the CLF changes.

Our objective is to control $\pi_{v}$ in order to guarantee that the CLF and
the CBF family are compatible on the regions where equilibrium points occur.

######  Corollary 3.

Consider Assumption II.2 and let the CLF $V$ be defined by (32) and the CBF
family $\\{h_{1},h_{2},\cdots,h_{N}\\}$ be defined by (33), for
$i=1,\cdots,N$, with the $i$-th barrier $h_{i}=h(x,\Pi_{h,i})$. Let
$\\{\lambda_{i,k},\lambda_{i,k+1}\\}$ be a pair of sucessive pencil
eigenvalues of $H_{i}(\lambda)=\lambda H_{h,i}-H_{V}$. The CLF $V$ and the CBF
family $\\{h_{1},h_{2},\cdots,h_{N}\\}$ are guaranteed to be compatible if:

$\displaystyle\log(\sigma_{i,k}^{2})-\log(\Delta\lambda_{i,k}^{2})>0\,,$ (58)

for all $i=1,\cdots,N$ and $k=1,\cdots,n-1$, where
$\sigma_{i,k}^{2}=\max\left[(z_{i,k}^{\mathsf{T}}w_{i})^{2},(z_{i,k+1}^{\mathsf{T}}w_{i})^{2}\right]$,
and $\Delta\lambda_{i,k}=\lambda_{i,k+1}-\lambda_{i,k}$.

###### Proof.

From Theorem 5, the CLF $V$ and the family of CBFs $\\{h_{1},\cdots,h_{N}\\}$
are compatible if only one equilibrium point exists in each one of the $N$
boundaries. Therefore, if no equilibrium solutions $q_{i}(\lambda^{\star})=1$
exist in the intervals $\mathcal{I}_{k}=(\lambda_{i,k},\lambda_{i,k+1})$
($k=1,\cdots,n-1$), for all $i=1,\cdots,N$, then the CLF and the CBF family
are compatible. Since the $i$-th q-function is convex in each interval
$I_{k}$, that means that if $q_{i}(\lambda)>1$ for $\lambda\in\mathcal{I}_{k}$
($k=1,\cdots,n-1$), for all $i=1,\cdots,N$, then the CLF and the CBF family
are compatible. In particular, since $q_{i}(\lambda)$ can be written as (42)
(excluding the negative type eigenvalues), where each term is non-negative,
one can show that:

$\displaystyle\frac{(z_{i,k}^{\mathsf{T}}w_{i})^{2}}{(\Delta\lambda_{i,k})^{2}}\leq\min_{\lambda\in\mathcal{I}_{k}}q_{i}(\lambda)\,,\quad\frac{(z_{i,k+1}^{\mathsf{T}}w_{i})^{2}}{(\Delta\lambda_{i,k})^{2}}\leq\min_{\lambda\in\mathcal{I}_{k}}q_{i}(\lambda)$

Then, if the following condition is met:

$\displaystyle\max\left[\frac{(z_{i,k}^{\mathsf{T}}w_{i})^{2}}{\Delta\lambda_{i,k}^{2}},\frac{(z_{i,k+1}^{\mathsf{T}}w_{i})^{2}}{\Delta\lambda_{i,k}^{2}}\right]=\frac{\sigma_{i,k}^{2}}{\Delta\lambda_{i,k}^{2}}>1$
(59)

for $k=1,\cdots,n-1$ and $i=1,\cdots,N$, then $q_{i}(\lambda)>1$ in the
intervals $\lambda\in\mathcal{I}_{k}$, and therefore compatibility is
guaranteed. Finally, notice that (58) is simply condition (59) rewritten by
taking the natural logarithm on both left-hand and right-hand sides. ∎

The next theorem answers the following question: given a family of quadratic
CBFs, can some of the CLF parameters in (32) be dynamically modified to
satisfy the conditions for compatibility of Corollary 3?

######  Theorem 6 (Compatible CLF-CBF Controller).

Consider the closed-loop system (2), a known reference quadratic CLF
$V(x,H_{V_{r}})$ and a quadratic CLF $V(x,H_{V})$, both drawn from (32).
Additionally, consider $N$ CBFs $\\{h_{1},\cdots,h_{N}\\}$, each drawn from
(33), $i=1,\cdots,N$. Define a Lyapunov function candidate
$V_{\pi}(\pi_{v})=\frac{1}{2}\lVert H_{V}-H_{V_{r}}\rVert^{2}_{\mathcal{F}}$,
where $\lVert\cdot\rVert_{\mathcal{F}}$ denotes the Frobenius norm, and
$N(n-1)$ barrier candidates for compatibility as

$\displaystyle h_{\pi_{i,k}}(\Pi_{V},\Pi_{h,i})$
$\displaystyle=\log(\sigma_{i,k}^{2})-\log(\Delta\lambda_{i,k}^{2})-\epsilon$
(60)

drawn from condition (58), with $\epsilon>0$ defined as a small constant.
Then, define two QP-based controllers: the first QP is given by (5). The
second QP is defined as:

$\displaystyle u_{v}^{\star}$
$\displaystyle=\operatorname*{argmin}_{(u_{v},\delta_{v})\in\mathbb{R}^{p+1}}\lVert
u_{v}\rVert^{2}+p_{\pi}\delta_{v}^{2}$ (61) $\displaystyle\quad\quad\quad
s.t.\,\,\langle\nabla_{\\!\pi_{v}}V_{\pi}(\pi_{v}),u_{v}\rangle+\gamma_{\pi}V_{\pi}(\pi_{v})\leq\delta_{v}$
(rCLF) $\displaystyle\text{if
}x\in\mathcal{S}_{i}\begin{cases}\dot{h}_{\pi_{i,1}}(\pi_{v},u_{v})+\alpha_{\pi}h_{\pi_{i,1}}(\pi_{v})\geq
0\\\ \quad\quad\quad\vdots\\\
\dot{h}_{\pi_{i,n-1}}(\pi_{v},u_{v})+\alpha_{\pi}h_{\pi_{i,n-1}}(u_{v})\geq
0\\\ A_{r,i}(\pi_{v})\,u_{v}=0\end{cases}$

where $p_{\pi},\gamma_{\pi},\alpha_{\pi}>0$, and the set $\mathcal{S}_{i}$ is
defined as in (18).

The closed-loop system (2) with control (5) and CLF dynamics (51) with control
(61) is safe with respect to $\mathcal{C}$, and the CLF-CBF pair
$\\{V,h_{i}\\}$ is rendered compatible in the region $\mathcal{S}_{i}$.
Furthermore, the CLF $V(x,H_{V})$ converges to the reference CLF
$V(x,H_{V_{r}})$ in the region
$\overline{\cup_{i}\mathcal{S}_{i}}=\cap_{i}\overline{\mathcal{S}}_{i}$.

###### Proof.

Initially, by Theorem 1, the first QP-based controller (5) acting on (2) is
guaranteed to be feasible on Assumption II.1. Furthermore, it also guarantees
that the trajectories are safe with respect to $\mathcal{C}$. By (61), at any
time $t_{1}$, the cCBF constraints are implemented if
$x(t_{1})\in\mathcal{S}_{i}$. Therefore, there exists a time $t_{2}\geq t_{1}$
such that $h_{\pi_{i,k}}(t_{2})\geq 0$, $k=1,\cdots,n-1$, $i=1,\cdots,N$,
which means that eventually the conditions (58) of Corollary 3 are guaranteed
to be satisfied. Then, the CLF-CBF pair $\\{V,h_{i}\\}$ will be rendered
compatible at time $t_{2}$: the trajectories will converge towards the CLF
minimum, which is guaranteed to be the only stable equilibrium point of the
closed-loop system. If the trajectory $x(t)\notin\mathcal{S}_{i}$ for some
$t$, the only constraint implemented on (61) is the rCLF constraint. Then, the
trajectories of the closed-loop system $\dot{\pi}_{v}=u^{\star}_{v}$ with
controller (61) converge to the state $\pi_{v_{r}}$, which is equivalent to
$H_{V}(\pi_{v_{r}})=H_{V_{r}}$, corresponding to the global minimum of the
Lyapunov function $V_{\pi}(\pi_{v_{r}})=\frac{1}{2}\lVert
H_{V_{r}}-H_{V_{r}}\rVert^{2}_{\mathcal{F}}=0$. ∎

######  Remark IV.1.

The controller proposed in Theorem 6 effectively controls the curvature of the
CLF level sets (through the conditions of Theorem 5), in order to achieve
compatibility for the CLF-CBF pairs.

###  IV-B Compatibility Barrier Dynamics

In (60), the quantities $\sigma_{i,k}^{2}$ and $\Delta\lambda_{i,k}$ driven
from the corresponding q-function $q_{i}(\lambda)$ are dependent on the CLF
and CBF parameters. Therefore, the total time derivative of the compatibility
barriers $h_{\pi_{i,k}}(\Pi_{V},\Pi_{h,i})$ is dependent on the rate of change
of the CLF and CBF parameters. The time derivative of (60) is given by

$\displaystyle\dot{h}_{\pi_{i,k}}=\frac{\partial h_{\pi_{i,k}}}{\partial
t}+\\!\\!\\!\sum^{\dim\mathcal{T}(n)}_{j=1}\frac{\partial
h_{\pi_{i,k}}}{\partial\pi_{v_{j}}}u_{v_{j}}\,,$ (62)
$\displaystyle\frac{\partial h_{\pi_{i,k}}}{\partial
t}=\frac{2}{\sigma_{i,k}}z_{i,l}^{\mathsf{T}}H_{V}(\dot{x}_{i}-\dot{x}_{0})\,,$
(63) $\displaystyle\frac{\partial
h_{\pi_{i,k}}}{\partial\pi_{v_{j}}}=\frac{2}{\sigma^{\star}_{i,k}}\bigg{[}z_{i,l}^{\mathsf{T}}\frac{\partial
H_{V}}{\partial\pi_{v_{j}}}(x_{i}-x_{0})$ (64)
$\displaystyle\\!\\!\\!-\frac{\sigma^{\star}_{i,k}}{\Delta\lambda_{i,k}}\left(z_{i,k+1}^{\mathsf{T}}\frac{\partial
H_{V}}{\partial\pi_{v_{j}}}z_{i,k+1}-z_{i,k}^{\mathsf{T}}\frac{\partial
H_{V}}{\partial\pi_{v_{j}}}z_{i,k}\right)\bigg{]}$

where the $l$ index on $z_{i,l}\in\mathbb{R}^{n}$ is defined appropriately as
$l=\operatorname*{argmax}_{k,k+1}\left[(z_{i,k}^{\mathsf{T}}w_{i})^{2},(z_{i,k+1}^{\mathsf{T}}w_{i})^{2}\right]$
($l$ is either $k$ or $k+1$). Equation (62) allows for the computation of the
compatibility constraints $\dot{h}_{\pi_{i,k}}+\alpha_{\pi}h_{\pi_{i,k}}$ in
(61).

##  V Simulation Results

In this section, we present simulation results with the proposed controller
for a two-dimensional system, that is,
$x=\begin{bmatrix}\,x_{1}\\!\\!&\\!\\!x_{2}\,\end{bmatrix}^{\mathsf{T}}$. The
proposed CLF is given by

$\displaystyle V(x,H_{V})=\frac{1}{2}\begin{bmatrix}x_{1}-x_{0_{1}}\\\
x_{2}-x_{0_{2}}\end{bmatrix}^{\mathsf{T}}\underbrace{\begin{bmatrix}\pi_{v_{1}}&\pi_{v_{2}}\\\
\pi_{v_{2}}&\pi_{v_{3}}\end{bmatrix}}_{H_{V}}\begin{bmatrix}x_{1}-x_{0_{1}}\\\
x_{2}-x_{0_{2}}\end{bmatrix}$ (65)

where $\pi_{v_{j}}$ are the controlled parameters of the Hessian $H_{V}$ and
$x_{0}^{\mathsf{T}}=\begin{bmatrix}\,x_{0_{1}}\\!\\!&\\!\\!x_{0_{2}}\,\end{bmatrix}$
is the CLF minimum. The reference Hessian matrix is given by a positive
definite matrix $H_{V_{r}}$. In these simulations, we proposed three distinct
elliptical CBFs with non-intersecting boundaries, each one given by the
expression

$\displaystyle 2\,h_{i}(x)\\!=\\!\begin{bmatrix}x_{1}-x_{i_{1}}\\\
x_{2}-x_{i_{2}}\end{bmatrix}^{\mathsf{T}}\\!\\!\begin{bmatrix}q^{i}_{11}&q^{i}_{12}\\\
q^{i}_{12}&q^{i}_{22}\end{bmatrix}\\!\\!\begin{bmatrix}x_{1}-x_{i_{1}}\\\
x_{2}-x_{i_{2}}\end{bmatrix}-1$ (66)

with fixed parameters $q^{i}_{jk}$ for the Hessian $H_{h,i}$ and with
$x_{i}^{\mathsf{T}}=\begin{bmatrix}\,x_{i_{1}}\\!\\!&\\!\\!x_{i_{2}}\,\end{bmatrix}$
as their centers.

###  V-A Integrator System

In this section, we present the results obtained for the following integrator
system $\dot{x}=u$, where
$u=\begin{bmatrix}\,u_{1}\\!\\!&\\!\\!u_{2}\,\end{bmatrix}^{\mathsf{T}}\in\mathbb{R}^{2}$.
Each of the quadratic barrier functions corresponds to an “obstacle”
represented by the CBF boundaries in Figs. 3-4 (the green ellipses). The CLF
level set at some specific given instant is represented by the blue ellipse
centered on the CLF minimum, which in this case is the origin
($x_{0}=0\in\mathbb{R}^{2}$).

Figure 3: Results for the nominal QP-based controller proposed by [11]. The
ellipses are the CBF boundaries (in green) and the current CLF level set (in
light blue), the system trajectory is the light blue curve starting from the
dark blue point (initial condition), and the equilibrium points are
represented by red circles.

In Fig. 3, we show the results obtained by controller (5). Notice the presence
of equilibrium points (red circles) on the obstacle boundaries, computed using
the q-functions $q_{1}(\lambda)$, $q_{2}(\lambda)$ and $q_{3}(\lambda)$, each
one corresponding to one of the CLF-CBF pairs. Figure 3 also shows the state
trajectories and control signal obtained from the simulation: for the given
initial condition, the state converges asymptotically to an equilibrium point
at the boundary of the rightmost obstacle, modeled by $h_{3}$. In this case,
the local curvature
$\Delta\kappa_{3}(x^{\star},z)=\kappa_{h,3}(x^{\star}\\!,z)-\kappa_{v}(x^{\star}\\!,z)$
at the equilibrium point $x^{\star}$ is negative for all
$z\in\text{span}\\{\nabla h_{3}(x^{\star})\\}^{\perp}$, which by Theorem 3
means that $x^{\star}$ must be stable. Other simulations with different
initial states also show the formation and stability of boundary equilibrium
points at the top and leftmost obstacles.

Figure 4: Results for the proposed controller with compatibility guarantees.
The CLF curvature changes dynamically as the trajectory evolves in time,
rendering compatibility on the CLF-CBF pairs.

In Fig. 4, the results for the proposed compatible CLF-CBF controller
presented in Theorem 6 are shown. Here, the reference CLF
$V_{r}=V(x,H_{V_{r}})$ is the same as the CLF used in the previous simulation.
However, the active CLF is given by (65), where the Hessian matrix $H_{V}$ is
controlled by (61), as explained in Theorem 6. By comparing the geometry of
the CLF level set in Fig. 4 at $t=0.2s$ with the one showed in Fig. 3, notice
how the proposed controller actively modifies the CLF shape. During this time
interval, the third CBF constraint (relative to the rightmost obstacle) in the
first QP (5) is the only active CBF constraint ($x(t)\in\mathcal{S}_{3}$).
Therefore, the second QP (61) is implementing the compatibility barrier
constraints relative to CBF $h_{3}$, that is,
$\dot{h}_{\pi_{3,k}}+\alpha_{\pi}h_{\pi_{3,k}}$, $k=1,\cdots,n-1$.
Furthermore, the constraint for pencil eigenvector invariance
$A_{r,3}\,u_{v}=0$ is also implemented. Therefore, $V(x,\Pi_{V})$ and
$h_{3}(x)$ are eventually rendered compatible, thus guaranteeing that the
trajectory is not attracted towards the boundary of the rightmost obstacle. In
fact, instead it converges to the origin, under the same initial conditions.

After approximately $t=1.0s$ of simulation, $x(t)\notin\mathcal{S}_{i}$,
$i=1,2,3$ (no CBF constraint is exclusively active in the first QP), and
therefore the CLF shape converges back to the shape of the reference CLF
$V_{r}$.

###  V-B Path Following with Collision Avoidance

Next, we present the problem of path following (PF) control with collision
avoidance guarantees. PF control has many of practical applications, such as
convoy protection and coordination of robotic swarms, and can be employed with
a variety of vehicles such as mobile robots, quadrotors, Underwater Autonomous
Vehicles (UAVs), among others [12, 13].

In this proof-of-concept simulation, we consider the application of a drone
moving in a plane of constant height, whose navigation objective is to follow
a spline-based path while avoiding collisions against three elliptical
obstacles intersecting the path, each one modeled by a quadratic barrier
function such as (66).

As in the previous simulation, the vehicle model is an integrator $\dot{x}=u$.
The proposed quadratic CLF is given by

$\displaystyle V(x_{1},x_{2})=\frac{1}{2}e^{\mathsf{T}}H_{V}(\pi_{v})e\,,$

where we define the path following error as $e=x-x_{0}(\gamma)$, where
$x_{0}:\mathbb{R}\rightarrow\mathbb{R}^{2}$ is a desired parametric spline
function of a variable $\gamma$, defining a virtual point
$x_{0}(\gamma)\in\mathbb{R}^{2}$ that moves along the path. Notice that
$x_{0}(\gamma)$ is the CLF global minimum.

######  Assumption V.1.

The norm of the path gradient $\frac{\partial x_{0}}{\partial\gamma}$ does not
vanish, that is, $\left\|{\frac{\partial x_{0}}{\partial\gamma}}\right\|>0$.

Using Assumption V.1, the dynamics of the path variable is given by:

$\displaystyle\dot{\gamma}=\left\|{\frac{\partial
x_{0}}{\partial\gamma}}\right\|^{-1}\\!\\!\gamma_{d}\,,$ (67)

which in turn defines the dynamics of the virtual point, as

$\displaystyle\dot{x}_{0}=\underbrace{\left\|{\frac{\partial
x_{0}}{\partial\gamma}}\right\|^{-1}\frac{\partial
x_{0}}{\partial\gamma}}_{\hat{\nabla}x_{0}}\,\gamma_{d}\,,$

where $\hat{\nabla}x_{0}$ is the normalized gradient of $x_{0}(\gamma)$. Then,
the speed of the virtual point is given by
$\lVert\dot{x}_{0}\rVert=\lVert\hat{\nabla}x_{0}\rVert|\gamma_{d}|=|\gamma_{d}|$,
showing that $\gamma_{d}$ defines the desired speed of the drone along the
path.

Figure 5: PF trajectory using the proposed compatible CLF-CBF controller.
Figure 6: Path following error using the proposed compatible CLF-CBF
controller.

Figures 5-6 shows the results for path following control with the proposed
compatible CLF-CBF controller. Observing the trajectory at $t=1.92s$ in Fig.
5, the active CLF was initialized in such a way that an stable equilibrium
point would form at the boundary of the first obstacle (from left to right) by
using the nominal controller (5), without compatibilization. Therefore, with
the nominal controller, the trajectory asymptotically converges to that
equilibrium point, and the robot gets stuck in a deadlock configuration as
soon as it approaches the leftmost obstacle. Once again, this happens due to
the curvature condition (21) not being satisfied on the equilibrium point.

With the proposed compatible CLF-CBF controller, the CLF curvature is
dynamically modified by the compatibility barriers in such a way that the
stability of this boundary equilibrium point is modified. This way, the
trajectory is able to avoid entering the unsafe set while eventually
converging back to the virtual point, as it can be seen from Fig. 5 in
$t=3.1s$.

Since the obstacles intersect the path, this process happens three times:
every time the robot approaches one of the obstacles. The moments when the CLF
is being reshaped by the second QP in (61) are captured in Fig. 5, at times
$t=1.92s$, $t=3.1s$ and $t=4.1s$. After $t=5s$ of simulation, the robot
follows the rest of the path with very small error.

Figure 6 shows the path following errors. Notice how the signal peaks three
times, precisely at the times when the trajectory is diverging from the path
to avoid the obstacles.

Finally, using the proposed compatible CLF-CBF controller from Theorem 6, we
were able to design a safe navigation method for a mobile robot that
guarantees: (i) quasi-global convergence to the path (deadlock free) and (ii)
obstacle avoidance, by using quadratic CLFs and CBFs and the proposed concept
of CLF-CBF compatibility.

##  VI Conclusion

In this work, we have studied the existence and stability of undesirable
boundary equilibrium points in the QP framework for safety critical control,
for the special class of driftless nonlinear systems and using multiple
barrier functions. These equilibrium points arise from gradient collinearity
conditions between the CLF and the CBFs used for combining the objectives of
(i) stabilization and (ii) safety.

We have shown that, for driftless nonlinear systems, the stability of a
boundary equilibrium point is completely determined by the difference of
sectional curvatures between the CLF and the corresponding CBF at the
equilibrium point. This fact leads to the important concept of compatibility
between a CLF and a CBF, regarding the number of stable equilibrium points
other than the CLF minimum. When applied to the special case of quadratic CLF
and CBFs, we have shown that the derived stability condition for boundary
equilibrium points can be combined with Matrix Pencil Theory to derive
explicit conditions for compatibility between CLF-CBF pairs.

Backed by this theoretical framework, we were able to design a controller that
dynamically modifies the shape of the CLF, enforcing these compatibility
conditions at the regions of the state space where the undesirable equilibrium
points occur. Therefore, the proposed controller is able to achieve: (i)
multiple safety guarantees by means of the family of CBFs and (ii) quasi-
global convergence of the state trajectories to the CLF minimum, by
dynamically reshaping the CLF parameters in order to satisfy the compatibility
conditions. Numerical simulations have illustrated these theoretical
developments by means of examples and have shown the reliability of the
proposed method and its applicability for real engineering applications.

## References

  * [1] L. Lamport, “Proving the correctness of multiprocess programs,” _IEEE transactions on software engineering_ , no. 2, pp. 125–143, 1977.
  * [2] B. Alpern and F. B. Schneider, “Defining liveness,” _Information processing letters_ , vol. 21, no. 4, pp. 181–185, 1985.
  * [3] A. D. Ames, S. Coogan, M. Egerstedt, G. Notomista, K. Sreenath, and P. Tabuada, “Control barrier functions: Theory and applications,” _arXiv preprint arXiv:1903.11199_ , 2019.
  * [4] H. K. Khalil and J. W. Grizzle, _Nonlinear systems_. Prentice hall Upper Saddle River, NJ, 2002, vol. 3.
  * [5] A. D. Ames, J. W. Grizzle, and P. Tabuada, “Control barrier function based quadratic programs with application to adaptive cruise control,” in _53rd IEEE Conference on Decision and Control_. IEEE, 2014, pp. 6271–6278.
  * [6] M. F. Reis, A. P. Aguiar, and P. Tabuada, “Control barrier function-based quadratic programs introduce undesirable asymptotically stable equilibria,” _IEEE Control Systems Letters_ , vol. 5, no. 2, pp. 731–736, 2021.
  * [7] G. Notomista and M. Saveriano, “Safety of dynamical systems with multiple non-convex unsafe sets using control barrier functions,” _IEEE Control Systems Letters_ , vol. 6, pp. 1136–1141, 2022.
  * [8] H. K. Khalil, _Nonlinear systems; 3rd ed._ Upper Saddle River, NJ: Prentice-Hall, 2002.
  * [9] P. Lancaster and Q. Ye, “Variational properties and rayleigh quotient algorithms for symmetric matrix pencils,” in _The Gohberg Anniversary Collection_. Springer, 1989, pp. 247–278.
  * [10] B. N. Parlett, “Symmetric matrix pencils,” _Journal of Computational and Applied Mathematics_ , vol. 38, no. 1-3, pp. 373–385, 1991.
  * [11] A. D. Ames, X. Xu, J. W. Grizzle, and P. Tabuada, “Control barrier function based quadratic programs for safety critical systems,” _IEEE Transactions on Automatic Control_ , vol. 62, no. 8, pp. 3861–3876, Aug 2017.
  * [12] R. P. Jain, A. P. Aguiar, and J. B. de Sousa, “Cooperative path following of robotic vehicles using an event-based control and communication strategy,” _IEEE Robotics and Automation Letters_ , vol. 3, no. 3, pp. 1941–1948, July 2018.
  * [13] M. Reis, R. P. Jain, A. P. Aguiar, and J. Sousa, “Robust moving path following control for robotic vehicles: Theory and experiments,” _IEEE Robotics and Automation Letters_ , pp. 1–1, 2019.