# Control Synthesis for Stability and Safety by Differential Complementarity
Problem

Yinzhuang Yi  Shumon Koga  Bogdan Gavrea  Nikolay Atanasov We gratefully
acknowledge support from NSF RI IIS-2007141.Y. Yi, S. Koga, and N. Atanasov
are with the Department of Electrical and Computer Engineering, UC San Diego,
9500 Gilman Drive, La Jolla, CA, 92093, USA (e-mails:
{yiyi,skoga,natanasov}@ucsd.edu).B. Gavrea is with the Deparment of
Mathematics, Technical University of Cluj-Napoca, Cluj-Napoca, 400114, Romania
(e-mail: bogdan.gavrea@math.utcluj.ro).

###### Abstract

This paper develops a novel control synthesis method for safe stabilization of
control-affine systems as a Differential Complementarity Problem (DCP). Our
design uses a control Lyapunov function (CLF) and a control barrier function
(CBF) to define complementarity constraints in the DCP formulation to certify
stability and safety, respectively. The CLF-CBF-DCP controller imposes
stability as a soft constraint, which is automatically relaxed when the safety
constraint is active, without the need for parameter tuning or optimization.
We study the closed-loop system behavior with the CLF-CBF-DCP controller and
identify conditions on the existence of local equilibria. Although in certain
cases the controller yields undesirable local equilibria, those can be
confined to a small subset of the safe set boundary by proper choice of the
control parameters. Then, our method can avoid undesirable equilibria that
CLF-CBF quadratic programming techniques encounter.

##  I Introduction

Stability verification and stabilizing control design are fundamental problems
in control theory that have impacted numerous industrial systems. One of the
main tools for constructing feedback control laws that stabilize nonlinear
systems is a control Lyapunov function (CLF) [1, 2]. As automatic control
systems are increasingly deployed in less structured, yet safety-critical
settings, in addition to stability, control designs need to guarantee safety.
Inspired by the property of CLFs to yield invariant level sets, control
barrier functions (CBFs) [3] have been developed to enforce that a desired
safe subset of the state space is invariant. While various techniques for
guaranteeing safety and stability exist, important challenges remain when both
requirements are considered simultaneously. These challenges include
conditions under which it is possible to obtain a single control policy that
guarantees CLF stability and CBF safety simultaneously (compatibility [4]),
existence and uniqueness of the closed-loop system trajectories (well-
posedness), convergence to points other than the origin (undesired
equilibria), identification of initial conditions that ensure joint stability
and safety (region of attraction).

Figure 1: Comparison of the closed-loop trajectories resulting from our CLF-
CBF-DCP control approach (orange) and two recent CLF-CBF-QP techniques (blue
[4] and red [5]) with a concave obstacle (green) for three initial conditions
(black dots). Existing techniques converge to an undesired equilibrium on the
obstacle boundary (black cross), while our approach stabilizes the system at
the origin.

The design of stabilizing control with guaranteed safety is studied in [6].
The authors define a Control Lyapunov Barrier Function (CLBF), whose existence
enables joint stabilization and safety. However, constructing a CLBF may be
challenging and may require modification of the safe set. A comprehensive
overview of CBF techniques and their use as safety constraints in quadratic
programs (QPs) for control synthesis is provided in [3]. Garg and Panagou [7]
propose a fixed-time CLF and analyze conditions for finite-time stabilization
to a region of interest with safety guarantees. Local asymptotic stability for
a particular CLF-CBF QP was proven in [8]. Reis et al. [9] show that the usual
CLF-CBF-QP controller introduces equilibria other than the origin. The authors
develop a new CLF-CBF-QP formulation by introducing a new parameter in the CLF
constraint and an additional CBF constraint, aimed at avoiding undesired
equilibria on the boundary of the safe set. In [5], it is shown that
minimizing the distance to a nominal controller satisfying the CLF condition
as the objective of a CLF-CBF QP ensures local stability of the origin,
without any additional assumptions. However, the region of attraction of this
relative QP controller has not be characterized yet. Compatibility between CLF
and CBF constraints is considered in [10]. The authors define a CBF-
stabilizable sublevel set of the CLF and characterize the conditions under
which the closed-loop system is asymptotically stable with respect to the
origin. Mestres and Cortés [4] develop a penalty method to incorporate the CLF
condition as a soft constraint in a QP, identify conditions on the penalty
parameter that eliminate undesired equilibria, and provide an inner
approximation of the region of attraction, where joint stability and safety is
ensured. As illustrated in Fig. 1, however, the regions of attraction
guaranteed by recent CLF-CBF-QP techniques remain conservative, and initial
conditions inside the safe set may still converge to undesired equilibria.

Our first contribution is a formulation of control synthesis with CLF
stability and CBF safety constraints as a _Differential Complementarity
Problem_ (DCP). A DCP is composed of an ODE subject to complementarity
constraints:

$\displaystyle\dot{\mathbf{y}}=\mathbf{f}(\mathbf{y},\mathbf{z})$ (1)
$\displaystyle\mathrm{s.t.}$ $\displaystyle
0\leq\mathbf{z}\perp\mathbf{C}(\mathbf{y},\mathbf{z})\geq 0,$

where $\mathbf{a}\perp\mathbf{b}$ means that $\mathbf{a}$ and $\mathbf{b}$ are
orthogonal vectors, i.e., $\mathbf{a}^{\top}\mathbf{b}=0$. DCPs belong to a
broader class of problems, known as differential variational inequalities
[11]. Complementarity problems have been utilized to model combinatorial
constraints in nonlinear optimization [12] or hybrid dynamics in mechanical
systems with contact [13]. We formulate a DCP in which the closed-loop
dynamics are subject to constraints that certain control terms are activated
only when the state may violate the CLF or CBF conditions.

Our second contribution is an analysis of the closed-loop system equilibria,
showing that our CLF-CBF-DCP controller can eliminate undesired equilibria on
the safe set boundary that CLF-CBF-QP methods encounter (see Fig. 1). We prove
that our controller is Lipschitz continuous, ensuring existence and uniqueness
of solutions, and show that the set of undesired equilibria can be restricted
to a small subset of the safe set boundary by choosing a sufficiently large
control gain parameter. A related work in the DCP literature is Camlibel et
al. [14], which derives conditions for Lyapunov stability of linear DCP.
Hybrid model predictive control for multi-contact systems, modeled as a
discrete-time variant of DCP called a linear complementarity system, was
developed by [15]. While DCP formulations have strong potential to capture
switching behavior in dynamical systems, they have not yet been used for safe
control design. This paper introduces a new idea to model the mode switch
between stability and safety satisfaction as a DCP.

##  II Preliminaries

Consider a nonlinear control-affine system:

$\dot{\mathbf{x}}=\mathbf{f}(\mathbf{x})+\mathbf{G}(\mathbf{x})\mathbf{u}$ (2)

with state $\mathbf{x}\in\mathbb{R}^{n}$ and control input
$\mathbf{u}\in\mathbb{R}^{m}$, where
$\mathbf{f}:\mathbb{R}^{n}\to\mathbb{R}^{n}$ and
$\mathbf{G}:\mathbb{R}^{n}\to\mathbb{R}^{n\times m}$ are locally Lipschitz
continuous. Assume that $\mathbf{f}(\mathbf{0})=\mathbf{0}$ so that the origin
$\mathbf{x}=\bf 0$ is the desired equilibrium of the unforced system. A
typical objective is to design a stabilizing controller for the system.
Stability of the closed-loop system is often verified by a Lyapunov function,
while a stabilizing controller can be obtained using a control Lyapunov
function.

######  Definition 1.

Given an open and connected set ${\cal D}\subseteq\mathbb{R}^{n}$ with
$\mathbf{0}\in{\cal D}$, a continuously differentiable positive-definite
function $V:\mathbb{R}^{n}\to\mathbb{R}$ is a _control Lyapunov function_
(CLF) on ${\cal D}$ for system (2) if for each $\mathbf{x}\in{\cal
D}\setminus\\{\mathbf{0}\\}$ it satisfies:

$\inf_{\mathbf{u}\in\mathbb{R}^{m}}[{\cal L}_{\mathbf{f}}V(\mathbf{x})+{\cal
L}_{\mathbf{G}}V(\mathbf{x})\mathbf{u}]\leq-\alpha_{l}(V(\mathbf{x})),$ (3)

where $\alpha_{l}:\mathbb{R}_{\geq 0}\to\mathbb{R}_{\geq 0}$ is a class ${\cal
K}$ function [16].

The set of stabilizing control inputs at state $\mathbf{x}\in{\cal
D}\setminus\\{\mathbf{0}\\}$, corresponding to a valid CLF $V$ on ${\cal D}$,
is:

$K_{\textrm{clf}}(\mathbf{x})=\\{\mathbf{u}\in\mathbb{R}^{m}:{\cal
L}_{\mathbf{f}}V(\mathbf{x})+{\cal
L}_{\mathbf{G}}V(\mathbf{x})\mathbf{u}\leq-\alpha_{l}(V(\mathbf{x}))\\},$

in the sense that any Lipschitz continuous control law $\mathbf{r}:{\cal
D}\mapsto\mathbb{R}^{m}$ such that $\mathbf{r}(\mathbf{x})\in
K_{\textrm{clf}}(\mathbf{x})$ makes the origin of the closed-loop system
asymptotically stable [17].

Beyond stability, it is often necessary to ensure that the system trajectories
remain within a safe set ${\cal C}\subset{\cal D}$, in the sense that ${\cal
C}$ is forward invariant [18]. We consider a closed set ${\cal
C}:=\\{\mathbf{x}\in\mathbb{R}^{n}|h(\mathbf{x})\geq 0\\}$, defined as the
zero-superlevel set of a continuously differentiable function
$h:\mathbb{R}^{n}\to\mathbb{R}$. One way to guarantee that ${\cal C}$ is
forward invariant is to require that $h$ is a control barrier function.
Details can be found in the comprehensive work by Ames at el. [18].

######  Definition 2.

A continuously differentiable function
$h(\mathbf{x}):\mathbb{R}^{n}\to\mathbb{R}$ is a _control barrier function_
(CBF) of ${\cal C}$ on ${\cal D}$ for system (2) if it satisfies:

$\sup_{\mathbf{u}\in\mathbb{R}^{m}}[{\cal L}_{\mathbf{f}}h(\mathbf{x})+{\cal
L}_{\mathbf{G}}h(\mathbf{x})\mathbf{u}]\geq-\alpha_{h}(h(\mathbf{x})),\
\forall\mathbf{x}\in{\cal D},$ (4)

where $\alpha_{h}:\mathbb{R}\to\mathbb{R}$ is an extended class ${\cal K}$
function.

The set of safe control inputs at state $\mathbf{x}$, corresponding to a valid
CBF $h$ on ${\cal D}$, is:

$K_{\textrm{cbf}}(\mathbf{x})=\\{\mathbf{u}\in\mathbb{R}^{m}:{\cal
L}_{\mathbf{f}}h(\mathbf{x})+{\cal
L}_{\mathbf{G}}h(\mathbf{x})\mathbf{u}\geq-\alpha_{h}(h(\mathbf{x}))\\},$

in the sense that any Lipschitz control law $\mathbf{r}:{\cal
D}\mapsto\mathbb{R}^{m}$ such that $\mathbf{r}(\mathbf{x})\in
K_{\textrm{cbf}}(\mathbf{x})$ renders the set ${\cal C}$ forward invariant
[19].

Finding a single control input $\mathbf{u}$ achieving both stability and
safety may be infeasible. In order to guarantee safety when (3) and (4) are
not compatible [20], a popular approach is to modify a stabilizing controller
minimally so as to guarantee safety [18]. Given a locally Lipschitz
stabilizing control law $\mathbf{r}(\mathbf{x})\in
K_{\textrm{clf}}(\mathbf{x})$, the following CBF QP obtains the minimum
control perturbation to guarantee safety:

$\displaystyle\min_{\mathbf{u}\in\mathbb{R}^{m}}$
$\displaystyle\,\|\mathbf{u}-\mathbf{r}(\mathbf{x})\|_{2}^{2}$ (5)
$\displaystyle\mathrm{s.t.}$ $\displaystyle\,{\cal
L}_{\mathbf{f}}h(\mathbf{x})+{\cal
L}_{\mathbf{G}}h(\mathbf{x})\mathbf{u}\geq-\alpha_{h}(h(\mathbf{x})).$

##  III Problem Statement

In agreement with the results in [9, 10, 4, 5], we note that a control law
synthesized by the CBF QP in (5) introduces undesired local equilibria on the
boundary of the safe set ${\cal C}$ for the system in (2). Hence, our
objective is to design a new control synthesis method, which simultaneously
guarantees safety and prevents undesired local equilibria for the closed-loop
system.

Suppose the assumption below holds throughout the paper.

######  Assumption 1.

The safety requirements for system (2) are specified by a set ${\cal
C}=\\{\mathbf{x}\in\mathbb{R}^{n}|h(\mathbf{x})\geq 0\\}\subset{\cal D}$ such
that $h$ is a CBF of ${\cal C}$ with $h(\mathbf{0})>0$ and ${\cal
L}_{\mathbf{G}}h(\mathbf{x})\neq\mathbf{0}$, $\forall\mathbf{x}\in{\cal D}$.

Assumption 1 requires that the safe set ${\cal C}$ is defined by a CBF with
relative degree $1$ and the origin is in the interior of ${\cal C}$. Under
this assumption, the CBF-QP control law in (5) can be obtained in closed-form
using the KKT conditions.

######  Proposition 1 ([10, Thm. 1]).

Consider system (2) with CLF $V$ on ${\cal D}$ and CBF $h$ that satisfies
Assumption 1. Then, the CBF QP in (5) has a unique closed-form solution:

$\mathbf{u}^{*}(\mathbf{x})=\left\\{\begin{aligned} &\mathbf{r}(\mathbf{x}),\
&\nabla
h(\mathbf{x})^{\top}\mathbf{e}(\mathbf{x})+\alpha_{h}(h(\mathbf{x}))\geq 0,\\\
&\bar{\mathbf{u}}(\mathbf{x}),\ &\nabla
h(\mathbf{x})^{\top}\mathbf{e}(\mathbf{x})+\alpha_{h}(h(\mathbf{x}))<0,\end{aligned}\right.$
(6)

where
$\mathbf{e}(\mathbf{x}):=\mathbf{f}(\mathbf{x})+\mathbf{G}(\mathbf{x})\mathbf{r}(\mathbf{x})$
and

$\bar{\mathbf{u}}(\mathbf{x})=\mathbf{r}(\mathbf{x})-\frac{\nabla
h(\mathbf{x})^{\top}\mathbf{e}(\mathbf{x})+\alpha_{h}(h(\mathbf{x}))}{\|{\cal
L}_{\mathbf{G}}h(\mathbf{x})\|_{2}^{2}}{\cal
L}_{\mathbf{G}}h(\mathbf{x})^{\top}.$ (7)

While the control law $\mathbf{u}^{*}(\mathbf{x})$ in (6) guarantees safety by
design, it might not asymptotically stabilize the system in (2) to the origin.
There exist other local equilibria for the closed-loop system, characterized
by the following proposition.

######  Proposition 2.

Consider the system in (2) with control law $\mathbf{u}^{*}(\mathbf{x})$ in
(6). The equilibria of the closed-loop system are $\mathbf{0}$ or points
$\mathbf{x}^{*}\in\partial{\cal C}$ such that $\nabla
h(\mathbf{x}^{*})^{\top}\mathbf{e}(\mathbf{x}^{*})<0$ and

$\mathbf{e}(\mathbf{x}^{*})=\frac{\nabla
h(\mathbf{x}^{*})^{\top}\mathbf{e}(\mathbf{x}^{*})}{\|{\cal
L}_{\mathbf{G}}h(\mathbf{x}^{*})\|_{2}^{2}}\mathbf{G}(\mathbf{x}^{*}){\cal
L}_{\mathbf{G}}h(\mathbf{x}^{*})^{\top}.$ (8)

###### Proof.

The result follows by replacing $\frac{1}{\epsilon}{\cal L}_{g}V(x)$ in [4,
Propostion 5.1] with $-\mathbf{r}(\mathbf{x})$. ∎

We focus on designing an alternative control law to (6), which guarantees
safety and eliminates the undesired local equilibria noted in Proposition 2.

######  Problem.

Consider the system in (2) with given CLF $V$ on ${\cal D}$ and safe set
${\cal C}=\\{\mathbf{x}\in\mathbb{R}^{n}|h(\mathbf{x})\geq 0\\}\subset{\cal
D}$, defined by a CBF $h$. Design a feedback control law that asymptotically
stabilizes (2) to the origin while guaranteeing that ${\cal C}$ is forward
invariant.

##  IV Differential Complementarity Problem

Our key idea is to introduce the CLF and CBF conditions as complementarity
constraints in a DCP. We first review results in DCP theory, which will serve
as the foundation of our CLF-CBF-DCP method.

We say that the DCP in (1) has index $0$ if it is equivalent to a system of
ODEs. Recall that $\mathbf{C}(\mathbf{y},\mathbf{z})$ is strongly monotone in
$\mathbf{z}$, if there exists $c>0$, such that:

$\left|\left|\mathbf{C}(\mathbf{y},\mathbf{z}_{1})-\mathbf{C}(\mathbf{y},\mathbf{z}_{2})\right|\right|\geq
c\left|\left|\mathbf{z}_{1}-\mathbf{z}_{2}\right|\right|,\;\;\forall\mathbf{z}_{1},\mathbf{z}_{2}.$
(9)

If $\mathbf{C}(\mathbf{y},\mathbf{z})$ is Lispchitz in $\mathbf{y}$ and
strongly monotone in $\mathbf{z}$, then the DCP in (1) has index $0$ and is
equivalent to a Lipschitz ODE [21].

Consider the case when $\mathbf{C}(\mathbf{y},\mathbf{z})$ is an affine
function of $\mathbf{z}$. The corresponding initial-value DCP takes the form:

$\displaystyle\dot{\mathbf{y}}=\mathbf{f}(\mathbf{y},\mathbf{z})$ (10)
$\displaystyle\mathrm{s.t.}$ $\displaystyle
0\leq\mathbf{z}\perp\mathbf{A}(\mathbf{y})\mathbf{z}+\mathbf{q}(\mathbf{y})\geq
0,$ $\displaystyle\mathbf{y}(0)=\mathbf{y}_{0}.$

Denote the complementarity constraints of (10) by
$\mathrm{LCP}(\mathbf{q}(\mathbf{y}),\mathbf{A}(\mathbf{y}))$, where
$\mathrm{LCP}$ stands for linear complementarity problem. We are interested in
assumptions on $\mathbf{A}(\mathbf{y})$ under which
$\mathrm{LCP}(\mathbf{q}(\mathbf{y}),\mathbf{A}(\mathbf{y}))$ has a unique
solution $\mathbf{z}(\mathbf{y})$ for any choice of $\mathbf{q}(\mathbf{y})$.
The class of matrices for which this holds are $P$ matrices [22, Thm. 3.3.7].
A matrix is said to be a $P$ matrix when all of its principle minors are
positive.

The next result considers a particular form for the matrix
$\mathbf{A}(\mathbf{y})$, which we will use to specify safety and stability
constraints, and gives sufficient conditions for the DCP (10) to be equivalent
to a Lipschitz ODE.

######  Proposition 3.

Consider the DCP in (10). Assume that the functions $\mathbf{A}(\mathbf{y})$,
$\mathbf{q}(\mathbf{y})$ and $\mathbf{f}(\mathbf{y},\mathbf{z})$ are locally
Lipschitz continuous at $\mathbf{y}_{0}$ and that $\mathbf{A}(\mathbf{y})$ has
the form:

$\mathbf{A}(\mathbf{y})=\left[\begin{matrix}a(\mathbf{y})&0\\\ c(\mathbf{y})\
&d(\mathbf{y})\end{matrix}\right]\in{\mathbb{R}}^{2\times 2},$ (11)

with elements satisfying either:

  1. i)

$a(\mathbf{y}_{0})>0$ and $d(\mathbf{y}_{0})>0$, or

  2. ii)

$a(\mathbf{y}_{0})=0$, $d(\mathbf{y}_{0})>0$, and $q_{1}(\mathbf{y}_{0})>0$.

If either i) or ii) holds, then in a neighborhood of $\mathbf{y}_{0}$ the
solution $\mathbf{z}(\mathbf{y})$ of
$\mathrm{LCP}(\mathbf{q}(\mathbf{y}),\mathbf{A}(\mathbf{y}))$ is unique,
locally Lipschitz continuous, and has a closed-form expression:

$\displaystyle
z_{1}(\mathbf{y})=\begin{cases}\frac{(-q_{1}(\mathbf{y}))_{+}}{a(\mathbf{y})},&a(\mathbf{y})>0,\\\
0,&a(\mathbf{y})=0,\end{cases}$ (12) $\displaystyle
z_{2}(\mathbf{y})=\frac{(-c(\mathbf{y})z_{1}(\mathbf{y})-q_{2}(\mathbf{y}))_{+}}{d(\mathbf{y})},$

where $(\cdot)_{+}$ denotes $\max(\cdot,0)$. Hence, DCP (10) is equivalent to
an ODE with a locally Lipschitz right-hand side.

###### Proof.

We prove the result under assumption i) first. From (11) and the continuity
assumptions on the problem data, it follows that $\mathbf{A}(\mathbf{y})$ is a
$P$ matrix in a neighborhood $\mathcal{V}$ of $\mathbf{y}_{0}$. This implies
that the solution $\mathbf{z}(\mathbf{y})$ of
$\mathrm{LCP}(\mathbf{q}(\mathbf{y}),\mathbf{A}(\mathbf{y}))$ is unique for
all $\mathbf{y}\in\mathcal{V}$. To derive the closed-form solution, consider
the scalar $\mathrm{LCP}(\widetilde{b},\widetilde{a})$: $0\leq
t\perp\widetilde{a}t+\widetilde{b}\geq 0$ with $\widetilde{a}>0$. The scalar
LCP has a unique solution: $t=\frac{(-\widetilde{b})_{+}}{\widetilde{a}}$. Due
to the triangular form of the matrix $\mathbf{A}(\mathbf{y})$, we can
determine $z_{1}(\mathbf{y})$ first by solving
$\mathrm{LCP}(q_{1}(\mathbf{y}),a(\mathbf{y}))$. This gives
$z_{1}(\mathbf{y})=\frac{(-q_{1}(\mathbf{y}))_{+}}{a(\mathbf{y})}$ for
$\mathbf{y}\in{\cal V}$. Substituting $z_{1}(\mathbf{y})$ in the second
complementarity constraint leads to another scalar
$\mathrm{LCP}(c(\mathbf{y})z_{1}(\mathbf{y})+q_{2}(\mathbf{y}),d(\mathbf{y}))$
with $d(\mathbf{y})>0$ for $\mathbf{y}\in{\cal C}$. Thus,
$z_{2}(\mathbf{y})=\frac{(-c(\mathbf{y})z_{1}(\mathbf{y})-q_{2}(\mathbf{y}))_{+}}{d(\mathbf{y})}$.
To prove that $\mathbf{z}(\mathbf{y})$ is locally Lipshitz, we note that since
$\mathbf{A}(\mathbf{y})$ is a $P$ matrix in $\mathcal{V}$, we must have
$a(\mathbf{y}),d(\mathbf{y})>0$ for all $\mathbf{y}\in{\cal V}$ which implies
that $1/a(\mathbf{y})$, $1/d(\mathbf{y})$ are locally Lipschitz. The function
$(r)_{+}$ with $r\in\mathbb{R}$ is locally Lipschitz and the composition
$(f_{2}(x))_{+}$ satisfies the same property, whenever $f_{2}(x)$ is locally
Lipschitz. Since the sum or product of two locally Lipschitz continuous
functions are each locally Lipschitz, we can conclude that
$\mathbf{z}(\mathbf{y})$ is locally Lipschitz. This completes the proof under
assumption i).

Now, we consider assumption ii). Due to the continuity assumptions, we have
$q_{1}(\mathbf{y})>0$, for all $\mathbf{y}$ in a neighborhood $\tilde{{\cal
V}}$ of $\mathbf{y}_{0}$. To satisfy the complementarity constraint, we need
$z_{1}(\mathbf{y})q_{1}(\mathbf{y})=0$. Since $q_{1}(\mathbf{y})>0$ for all
$\mathbf{y}\in\tilde{{\cal V}}$ it follows that $z_{1}(\mathbf{y})=0$,
$\mathbf{y}\in\tilde{{\cal V}}$ and therefore $z_{1}(\mathbf{y})$ is locally
Lipschitz. The other component of $\mathbf{z}(\mathbf{y})$,
$z_{2}(\mathbf{y})$, is the solution to the scalar
$\mathrm{LCP}(q_{2}(\mathbf{y}),d(\mathbf{y}))$ with $d(\mathbf{y})>0$ and we
can use the result under assumption i) to conclude that $z_{2}(\mathbf{y})$ is
Lipschitz in a neighborhood of $\mathbf{y}_{0}$.∎

##  V CLF-CBF-DCP Control Design

This section presents our DCP formulation for control synthesis with CLF
stability and CBF safety constraints.

###  V-A DCP Formulation and Uniqueness of Solutions

Consider the system in (2) and parameterize its input as:

$\mathbf{u}=\mathbf{w}_{l}\bar{u}_{l}+\mathbf{w}_{h}\bar{u}_{h}.$ (13)

We will use the vectors $\mathbf{w}_{l},\mathbf{w}_{h}\in\mathbb{R}^{m}$ to
determine the directions of stability and safety satisfaction and the scalars
$\bar{u}_{l},\bar{u}_{h}\in\mathbb{R}$ to determine the control input
magnitude. Consider the following DCP with CLF stability and CBF safety
complementarity constraints:

$\displaystyle\dot{\mathbf{x}}=\mathbf{f}(\mathbf{x})+\mathbf{G}(\mathbf{x})[\mathbf{w}_{l}\bar{u}_{l}+\mathbf{w}_{h}\bar{u}_{h}]$
(14a) $\displaystyle\mathrm{s.t.}\,\,$ $\displaystyle 0\leq\bar{u}_{l}\perp-
F_{l}(\mathbf{x})-\mathcal{L}_{\mathbf{G}}V(\mathbf{x})\mathbf{w}_{l}\bar{u}_{l}\geq
0,$ (14b) $\displaystyle 0\leq\bar{u}_{h}\perp
F_{h}(\mathbf{x})+\mathcal{L}_{\mathbf{G}}h(\mathbf{x})[\mathbf{w}_{l}\bar{u}_{l}+\mathbf{w}_{h}\bar{u}_{h}]\geq
0,$ (14c)

where $F_{l}(\mathbf{x}):=\mathcal{L}_{\mathbf{f}}V(\mathbf{x})+\alpha_{l}(V)$
and $F_{h}(\mathbf{x}):=\mathcal{L}_{\mathbf{f}}h(\mathbf{x})+\alpha_{h}(h)$.
The constraint (14b) requires that the magnitude term $\bar{u}_{l}$
responsible for ensuring stability is zero unless the CLF condition in Def. 1
is endangered. The constraint (14c) requires that the magnitude term
$\bar{u}_{h}$ responsible for ensuring safety is zero unless the CBF condition
in Def. 2 is endangered. Since safety is required at all times while stability
is pursued asymptotically, the CBF constraint (14c) considers $\bar{u}_{l}$
generated by the CLF constraint. We show that under additional regularity
assumptions, the control law resulting from the DCP in (14) is unique and
locally Lipschitz continuous and, hence, ensures the existence and uniqueness
of the closed-loop system trajectories.

######  Assumption 2.

$\nabla V(\mathbf{x})$ and $\nabla h(\mathbf{x})$ are locally Lipschitz
continuous for all $\mathbf{x}\in{\cal D}\setminus\\{\mathbf{0}\\}$. The
functions $\alpha_{l}$ in Def. 1 and $\alpha_{h}$ in Def. 2 are locally
Lipschitz continuous.

######  Theorem 1.

Assume ${\cal L}_{\mathbf{G}}V(\mathbf{x})\neq\mathbf{0}$,
$\forall\mathbf{x}\in{\cal E}\coloneqq\\{\mathbf{x}\in{\cal
D}\setminus\\{\mathbf{0}\\}\mid F_{l}(\mathbf{x})=0\\}$. Assume
$\mathbf{w}_{l}$ satisfies $-{\cal
L}_{\mathbf{G}}V(\mathbf{x})\mathbf{w}_{l}>0$ for all $\mathbf{x}\in{\cal
D}\setminus\\{\mathbf{0}\\}$ such that ${\cal
L}_{\mathbf{G}}V(\mathbf{x})\neq\mathbf{0}$. Assume $\mathbf{w}_{h}$ satisfies
$\mathcal{L}_{\mathbf{G}}h(\mathbf{x})\mathbf{w}_{h}>0$ for all
$\mathbf{x}\in{\cal D}\setminus\\{\mathbf{0}\\}$. Then, for all
$\mathbf{x}\in{\cal D}\setminus\\{\mathbf{0}\\}$, the solution of the LCP in
(14b)-(14c) is unique and has a closed-form:

$\displaystyle\bar{u}_{l}=\begin{cases}-\frac{F_{l}(\mathbf{x})}{\mathcal{L}_{\mathbf{G}}V(\mathbf{x})\mathbf{w}_{l}},&F_{l}(\mathbf{x})\geq
0,\\\ 0,&F_{l}(\mathbf{x})<0,\end{cases}$ (15)
$\displaystyle\bar{u}_{h}=\left(-\frac{F_{h}(\mathbf{x})+\mathcal{L}_{\mathbf{G}}h(\mathbf{x})\mathbf{w}_{l}\bar{u}_{l}}{\mathcal{L}_{\mathbf{G}}h(\mathbf{x})\mathbf{w}_{h}}\right)_{+}.$

If Assumption 2 holds, then $\bar{u}_{l}$ and $\bar{u}_{h}$ are locally
Lipschitz continuous for all $\mathbf{x}\in{\cal D}\setminus\\{\mathbf{0}\\}$.

###### Proof.

Rewrite (14b)-(14c) as follows
$0\leq\mathbf{z}\perp\mathbf{A}(\mathbf{x})\mathbf{z}+\mathbf{q}(\mathbf{x})\geq
0$ with $\mathbf{q}(\mathbf{x})=[-F_{l}(\mathbf{x}),F_{h}(\mathbf{x})]^{\top}$
and
$\mathbf{A}(\mathbf{x})=\left[\begin{matrix}-\mathcal{L}_{\mathbf{G}}V(\mathbf{x})\mathbf{w}_{l}&0\\\
\mathcal{L}_{\mathbf{G}}h(\mathbf{x})\mathbf{w}_{l}&\mathcal{L}_{\mathbf{G}}h(\mathbf{x})\mathbf{w}_{h}\end{matrix}\right]$
to reflect (10). When ${\cal L}_{\mathbf{G}}V(\mathbf{x})\neq\mathbf{0}$, we
have $a(\mathbf{x})=-\mathcal{L}_{\mathbf{G}}V(\mathbf{x})\mathbf{w}_{l}>0$
and $d(\mathbf{x})=\mathcal{L}_{\mathbf{G}}h(\mathbf{x})\mathbf{w}_{h}>0$,
which satisfies assumption i) in Proposition 3. When ${\cal
L}_{\mathbf{G}}V(\mathbf{x})=\mathbf{0}$, we must have
$q_{1}(\mathbf{x})=-F_{l}(\mathbf{x})>0$ by our assumption on ${\cal
L}_{\mathbf{G}}V(\mathbf{x})$ and Def. 1. Thus, the LCP in (14b)-(14c)
satisfies assumption ii) in Proposition 3. In both cases, by Proposition 3,
the solution $\bar{u}_{l}$, $\bar{u}_{h}$ of
$\mathrm{LCP}(\mathbf{q}(\mathbf{x}),\mathbf{A}(\mathbf{x}))$ is unique,
locally Lipschitz continuous, and available in closed-form. ∎

A _naïve choice_ of $\mathbf{w}_{l}$ and $\mathbf{w}_{h}$ that satisfies the
requirements of Thm. 1 is
$\mathbf{w}_{l}=-\mathcal{L}_{\mathbf{G}}V(\mathbf{x})^{\top}$ and
$\mathbf{w}_{h}=\mathcal{L}_{\mathbf{G}}h(\mathbf{x})^{\top}$. It is also
possible to avoid the extra assumption ${\cal
L}_{\mathbf{G}}V(\mathbf{x})\neq\mathbf{0}$, $\forall\mathbf{x}\in{\cal E}$ in
Thm. 1. If both ${\cal L}_{\mathbf{G}}V(\mathbf{x})=\mathbf{0}$ and
$F_{l}(\mathbf{x})=0$, then $\bar{u}_{l}$ is not unique but, since stability
is not endangered, we can choose $\bar{u}_{l}=0$ to obtain the CLF-CBF-DCP
controller:

$\displaystyle\bar{u}_{l}=\begin{cases}-\frac{F_{l}(\mathbf{x})}{\mathcal{L}_{\mathbf{G}}V(\mathbf{x})\mathbf{w}_{l}},&F_{l}(\mathbf{x})>0,\\\
0,&F_{l}(\mathbf{x})\leq 0,\end{cases}$ (16)
$\displaystyle\bar{u}_{h}=\left(-\frac{F_{h}(\mathbf{x})+\mathcal{L}_{\mathbf{G}}h(\mathbf{x})\mathbf{w}_{l}\bar{u}_{l}}{\mathcal{L}_{\mathbf{G}}h(\mathbf{x})\mathbf{w}_{h}}\right)_{+}.$

We propose an alternative choice of $\mathbf{w}_{h}$ for our control law and
study the equilibria of the closed-loop system next.

###  V-B Control Modification to Remove Undesired Equilibria

As noted in Proposition 2, QP-based methods introduce undesired equilibria
satisfying condition (8). We analyze the equilibria under the CLF-CBF-DCP
controller in (16) and attempt to remove undesired ones using the degrees of
freedom allowed by $\mathbf{w}_{l}$ and $\mathbf{w}_{h}$ in (13). Since
$\mathbf{w}_{h}$ multiplies ${\cal L}_{\mathbf{G}}h(\mathbf{x})$ in the CBF
constraint, introducing a component from the null space of ${\cal
L}_{\mathbf{G}}h(\mathbf{x})$ to $\mathbf{w}_{h}$ will not change the safety
condition but may be used to modify the control input. This motivates a
modification of the naïve choice of $\mathbf{w}_{h}$:

$\mathbf{w}_{l}=-\mathcal{L}_{\mathbf{G}}V(\mathbf{x})^{\top},\quad\mathbf{w}_{h}=\mathcal{L}_{\mathbf{G}}h(\mathbf{x})^{\top}+k\mathbf{w}_{p}(\mathbf{x}),$
(17)

where $k\in\mathbb{R}$ and $\mathbf{w}_{p}(\mathbf{x})$ is locally Lipschitz
and satisfies:

$\displaystyle\mathcal{L}_{\mathbf{G}}h(\mathbf{x})\mathbf{w}_{p}(\mathbf{x})=0,\;\mathbf{G}(\mathbf{x})\mathbf{w}_{p}(\mathbf{x})\neq\mathbf{0},\;\forall\mathbf{x}\\!\in\\!{\cal
D}\\!\setminus\\!\\{\mathbf{0}\\}.$ (18)

The former requirement in (18) ensures that $\mathbf{w}_{p}(\mathbf{x})$ does
not affect the safety condition, while the latter that
$\mathbf{w}_{p}(\mathbf{x})$ affects the closed-loop dynamics. A sufficient
condition for the latter requirement that $\mathbf{w}_{p}(\mathbf{x})$ is not
in the null space of $\mathbf{G}(\mathbf{x})$ is
$\mathbf{N}(\mathbf{x})^{\top}\mathbf{w}_{p}(\mathbf{x})=0$, where
$\mathbf{N}(\mathbf{x})\in\mathbb{R}^{m\times(m-\operatorname*{rank}(\mathbf{G}(x)))}$
is a null-space basis. Hence, (18) is satisfied if the following system has a
non-zero solution:

$\begin{bmatrix}\nabla h(\mathbf{x})^{\top}\mathbf{G}(\mathbf{x})\\\
\mathbf{N}(\mathbf{x})^{\top}\end{bmatrix}\mathbf{w}_{p}(\mathbf{x})=\mathbf{0}.$
(19)

Since the matrix in (19) has $m+1-\operatorname*{rank}(\mathbf{G}(x))$ rows, a
sufficient condition for the existence of non-zero
$\mathbf{w}_{p}(\mathbf{x})$ satisfying (18) is
$\operatorname*{rank}(\mathbf{G}(x))\geq 2$.

######  Assumption 3.

$\mathbf{G}(\mathbf{x})\in\mathbb{R}^{n\times m}$ satisfies
$\operatorname*{rank}(\mathbf{G}(\mathbf{x}))\geq 2$.

To highlight the role of $\mathbf{w}_{p}(\mathbf{x})$ in the closed-loop
system and simplify the notation, define
$\mathbf{F}_{u}(\mathbf{x}):=\mathbf{f}(\mathbf{x})+\mathbf{G}(\mathbf{x})[-\mathcal{L}_{\mathbf{G}}V^{\top}(\mathbf{x})\bar{u}_{l}+\mathcal{L}_{\mathbf{G}}h^{\top}(\mathbf{x})\bar{u}_{h}]$
with $\bar{u}_{l}$, $\bar{u}_{h}$ given in (16). Then, the closed-loop system
becomes:

$\dot{\mathbf{x}}=\mathbf{F}_{u}(\mathbf{x})+\bar{u}_{h}k\mathbf{G}(\mathbf{x})\mathbf{w}_{p}(\mathbf{x}).$
(20)

######  Proposition 4.

Consider the system in (2) with the CLF-CBF-DCP control law in (13), (16), and
(17). There are no equilibria of the closed-loop system in $\textrm{Int}({\cal
C})$ except $\mathbf{0}$.

###### Proof.

Any non-zero equilibrium $\mathbf{x}^{*}$ of (20) satisfies:

$\displaystyle-\mathbf{F}_{u}(\mathbf{x}^{*})=\bar{u}_{h}(\mathbf{x}^{*})k\mathbf{G}(\mathbf{x}^{*})\mathbf{w}_{p}(\mathbf{x}^{*}).$
(21)

Suppose that $\mathbf{x}^{*}\in\textrm{Int}({\cal
C})\setminus\\{\mathbf{0}\\}$ and consider two cases.

(i): If $\bar{u}_{h}=0$, from (21):

$-\mathbf{F}_{u}(\mathbf{x}^{*})=-\mathbf{f}(\mathbf{x}^{*})+\mathbf{G}(\mathbf{x}^{*}){\cal
L}_{\mathbf{G}}V(\mathbf{x}^{*})^{\top}\bar{u}_{l}=\mathbf{0}.$ (22)

However, the CLF condition in (14b) implies that $\nabla
V(\mathbf{x}^{*})^{\top}\mathbf{F}_{u}(\mathbf{x}^{*})\leq-\alpha_{l}(V(\mathbf{x}^{*}))$.
Since $\alpha_{l}(V(\mathbf{x}))=0$ only when $\mathbf{x}=\mathbf{0}$, the CLF
condition yields $\mathbf{F}_{u}(\mathbf{x})\neq\mathbf{0}$ for all
$\mathbf{x}\in{\cal D}\setminus\\{\mathbf{0}\\}$ and hence $\mathbf{x}^{*}$
cannot be an equilibrium.

(ii): If $\bar{u}_{h}>0$, the CBF constraint in (14c) implies:

${\cal L}_{\mathbf{F}_{u}}h(\mathbf{x}^{*})+\bar{u}_{h}k{\cal
L}_{\mathbf{G}}h(\mathbf{x}^{*})\mathbf{w}_{p}(\mathbf{x}^{*})+\alpha_{h}(h(\mathbf{x}^{*}))=0.$
(23)

From (18), (23) becomes $\nabla
h(\mathbf{x}^{*})^{\top}\mathbf{F}_{u}(\mathbf{x}^{*})=-\alpha_{h}(h(\mathbf{x}^{*}))$.
For all $\mathbf{x}\in\textrm{Int}({\cal C})$, it holds that $h(\mathbf{x})>0$
and $\alpha_{h}(h(\mathbf{x}))>0$. As a result, $\nabla
h(\mathbf{x}^{*})^{\top}\mathbf{F}_{u}(\mathbf{x}^{*})\neq 0$ but, from (18),
$\nabla
h(\mathbf{x}^{*})^{\top}\mathbf{G}(\mathbf{x}^{*})\mathbf{w}_{p}(\mathbf{x}^{*})=0$,
indicating that $\mathbf{F}_{u}(\mathbf{x}^{*})$ and
$\mathbf{G}(\mathbf{x}^{*})\mathbf{w}_{p}(\mathbf{x}^{*})$ are linearly
independent. Since $\mathbf{F}_{u}(\mathbf{x}^{*})$ and
$\mathbf{G}(\mathbf{x}^{*})\mathbf{w}_{p}(\mathbf{x}^{*})$ are independent,
they cannot be collinear as required by (21), and $\mathbf{x}^{*}$ cannot be
an equilibrium.

Hence, by contradiction, there are no equilibria of the closed-loop system in
$\textrm{Int}({\cal C})\setminus\\{\mathbf{0}\\}$. ∎

As shown in Proposition 4, equilibria besides $\mathbf{0}$ occur only on
$\partial{\cal C}$ with $\bar{u}_{h}>0$, which implies
$\mathbf{F}_{u}(\mathbf{x})\neq\mathbf{0}$ if (21) holds. To eliminate an
undesired equilibrium $\mathbf{x}^{*}\in\partial{\cal C}$, we consider how to
choose $k\in\mathbb{R}$ such that (21) does not hold. Let
$\mathbf{a}\parallel\mathbf{b}$ indicate that vectors $\mathbf{a}$ and
$\mathbf{b}$ are linearly dependent and in the same direction. Define the
following sets:

$\displaystyle\Omega$ $\displaystyle\coloneqq\\{\mathbf{x}\in\partial{\cal
C}\mid-\mathbf{F}_{u}(\mathbf{x})\parallel\mathbf{G}(\mathbf{x})\mathbf{w}_{p}(\mathbf{x}),\;\mathbf{F}_{u}(\mathbf{x})\neq\mathbf{0}\\},$
$\displaystyle{\cal X}$
$\displaystyle\coloneqq\\{\mathbf{x}\in\Omega\mid\bar{u}_{h}>0\\},$

where ${\cal X}$ is the set inside which undesired equilibria might occur. If
${\cal X}\equiv\emptyset$, then it is clear that (21) does not hold and no
undesired equilibria occur. Consider $\cal X\neq\emptyset$ hereafter. Since
${\cal X}\subseteq\partial{\cal C}\subset{\cal D}$, the requirement on
$\mathbf{w}_{p}(\mathbf{x})$ in (18) implies that $\inf_{\mathbf{x}\in{\cal
X}}\|\mathbf{G}(\mathbf{x})\mathbf{w}_{p}(\mathbf{x})\|>0$. If
$\inf_{\mathbf{x}\in{\cal X}}\bar{u}_{h}>0$, then choosing

$k>\frac{\sup_{\mathbf{x}\in{\cal
X}}\|\mathbf{F}_{u}(\mathbf{x})\|}{\inf_{\mathbf{x}\in{\cal
X}}\bar{u}_{h}\|\mathbf{G}(\mathbf{x})\mathbf{w}_{p}\|}$ (24)

ensures that every equilibrium satisfying (21) would be removed. However, such
a $k$ may not exist if $\inf_{\mathbf{x}\in{\cal X}}\bar{u}_{h}=0$, which may
be attained for some $\mathbf{x}\in{\cal
S}\coloneqq\\{\mathbf{x}\in\Omega\mid\bar{u}_{h}=0,\;{\cal
B}_{\epsilon}(\mathbf{x})\cap{\cal X}\neq\emptyset,\;\forall\epsilon>0\\}$
where ${\cal B}_{\epsilon}(\mathbf{x})$ is a Euclidean ball of radius
$\epsilon$ centered at $\mathbf{x}$. Instead, suppose that:

$k>\frac{\sup_{\mathbf{x}\in{\cal
X}}\|\mathbf{F}_{u}(\mathbf{x})\|}{\nu\inf_{\mathbf{x}\in{\cal
X}}\|\mathbf{G}(\mathbf{x})\mathbf{w}_{p}\|}$ (25)

where $\nu>0$ is a user-specified constant.

######  Proposition 5.

Consider the system in (2) with the CLF-CBF-DCP control law in (13), (16),
(17), and parameter $k$ satisfying (25). Then, the closed-loop system
eqilibria $\mathbf{x}^{*}\in{\cal D}\setminus\\{\mathbf{0}\\}$ exist only in
${\cal Q}\coloneqq\\{\mathbf{x}\in\Omega\mid
0<\bar{u}_{h}<\nu\\}\subset\partial{\cal C}$ and satisfy (21).

###### Proof.

For all $\mathbf{x}\in{\cal X}$, (25) implies
$k\nu\|\mathbf{G}(\mathbf{x})\mathbf{w}_{p}\|\geq k\nu\inf_{\mathbf{x}\in{\cal
X}}\|\mathbf{G}(\mathbf{x})\mathbf{w}_{p}\|>\sup_{\mathbf{x}\in{\cal
X}}\|\mathbf{F}_{u}(\mathbf{x})\|\geq\|\mathbf{F}_{u}(\mathbf{x})\|$. Thus,
for $\mathbf{x}\in{\cal X}$ such that $\bar{u}_{h}\geq\nu$, the inequality
$k\bar{u}_{h}\|\mathbf{G}(\mathbf{x})\mathbf{w}_{p}\|>\|\mathbf{F}_{u}(\mathbf{x})\|$
holds and implies that (21) does not hold. From this and Proposition 4, non-
zero eqilibria may only occur in ${\cal Q}={\cal
X}\setminus\\{\mathbf{x}\in\Omega\mid\bar{u}_{h}\geq\nu\\}$. ∎

Proposition 5 suggests that the set ${\cal Q}$ of potential equilibria on
$\partial{\cal C}$ can be shrunk towards a small set ${\cal S}$, defined above
(25), by decreasing $\nu$, or equivalently, increasing $k$ in (17). Hence, our
CLF-CBF-DCP controller can avoid all undesirable equilibria in
$\textrm{Int}({\cal C})$ and some on $\partial{\cal C}$.

##  VI Evaluation

We compare our _CLF-CBF DCP_ with the _relative CLF-CBF QP_ introduced in [5],
which computes a relative perturbation to a nominal stabilizing controller,
and the _adaptive CLF-CBF QP_ introduced in [4], which uses a CBF QP with an
adaptive CLF penalty. To make a clear comparison, we use the same planar fully
actuated system in our evaluation, $\dot{\mathbf{x}}=\mathbf{x}+\mathbf{u}$
with $\mathbf{x},\mathbf{u}\in\mathbb{R}^{2}$. We consider two scenarios.

  * Case 1

: _Convex obstacle with poorly constructed CLF_ : We use CBF
$h(\mathbf{x})=x_{1}^{2}+(x_{2}-4)^{2}-4$ with $\alpha_{h}(h)=h$ and CLF
$V(\mathbf{x})=\frac{1}{2}(6x_{1}^{2}+x_{2}^{2})$ with $\alpha_{l}(V)=V$.

  * Case 2

: _Concave obstacle with well constructed CLF_ : We use CBF
$h(\mathbf{x})=\big{(}(x_{1}-2)^{2}+(x_{2}-3)^{2}\big{)}\big{(}(x_{1}+2)^{2}+(x_{2}-3)^{2}\big{)}-2.1^{4}$
with $\alpha_{h}(h)=h$ and CLF
$V(\mathbf{x})=\frac{1}{2}(x_{1}^{2}+x_{2}^{2})$ with $\alpha_{l}(V)=V$.

Figure 2: Comparison of CLF-CBF-DCP controller to the relative CLF-CBF-QP
controller by [5] and the adaptive CLF-CBF-QP controller by [4] with a
circular obstacle (green) and various initial conditions (black dots). Both
QP-based methods converge to an undesired local equilibrium $(0,6)$ on the
safe set boundary with initial conditions satisfying $x_{2}(0)>4$. In
contrast, the CLF-CBF-DCP controller achieves both safety and stability at the
origin.

Figure 3: Comparison results with a concave obstacle (green). Both the
relative CLF-CBF-QP and the adaptive CLF-CBF-QP controllers get stuck at a
boundary equilibrium $(0,3.65)$ under initial conditions $(\pm 0.5,4)$ and
$(0,5.3)$. In contrast, the CLF-CBF-DCP controller achieves both safety and
asymptotic stability at the origin.

(a) $k=14.6$ at the plus point (b) $k=15$ at the plus point

Figure 4: The CLF-CBF-DCP controller with different choices of $k$ initialized
at the black plus point $(-5,4)$. Fig. 3(a) shows that if $k$ is not
sufficiently large, a local equilibrium exists on the obstacle boundary at the
orange star point. Fig. 3(b) shows that this equilibrium can be eliminated by
increasing $k$.

In both cases, since $\mathbf{G}(\mathbf{x})=\mathbf{I}_{2}$,
$\mathbf{w}_{p}(\mathbf{x})$ satisfying (18) can be chosen as $\nabla
h(\mathbf{x})^{\top}\mathbf{w}_{p}(\mathbf{x})=0$ with
$\|\mathbf{w}_{p}(\mathbf{x})\|_{2}=1$. There are two choices for such
$\mathbf{w}_{p}$ with opposite signs. In the simulations, for some interesting
initial conditions, we show the closed-loop CLF-CBF-DCP trajectory for both
choices.

The trajectories generated by the three controllers for Cases 1 and 2 are
shown in Fig. 2 and Fig. 4, respectively. Both QP-based methods converge to
undesirable equilibria for some initial conditions, depending on the shape of
the safe set. In these cases, our CLF-CBF-DPC controller achieves both safety
and asymptotic stability at the origin for all tested initial conditions. The
diamond and square points in the figures depict the locations of the set
${\cal S}$, which is determined by $\mathbf{w}_{p}(\mathbf{x})$. If the system
trajectory passes through the _diamond_ point, then only the _square_ point
belongs to ${\cal S}$, and vice versa. Thus, in these examples the closed-loop
trajectory does not pass through the set ${\cal S}$.

Fig. 4 shows the effect of the term $k$ in (17) on the DCP controller. For
small values of $k$ in Fig. 4(a), the trajectory gets stuck at an undesired
local equilibrium, while for larger $k$, shown in Fig. 4(b), it converges to
the origin. Interestingly, we observe that $\inf_{\mathbf{x}\in{\cal
X}}\bar{u}_{h}=0$ in this scenario, which lets us conjecture that even when
$\inf_{\mathbf{x}\in{\cal X}}\bar{u}_{h}=0$, for sufficiently large $k>0$ and
depending on $\mathbf{w}_{p}(\mathbf{x})$, the closed-loop trajectory may
avoid the undesired equilibria in ${\cal Q}$ and stabilize the system at the
origin.

##  VII Conclusion

We formulated control synthesis with CLF stability and CBF safety constraints
as a DCP. We proved that the CLF-CBF-DCP control law is Lipschitz continuous
and characterized the closed-loop system equilibria. We demonstrated how an
extra forcing term may eliminate undesired equilibria that CLF-CBF-QP
techniques encounter.

## References

  * [1] Z. Artstein, “Stabilization with relaxed controls,” _Nonlinear Analysis: Theory, Methods & Applications_, vol. 7, no. 11, pp. 1163–1173, 1983\.
  * [2] E. D. Sontag, “A ‘universal’ construction of Artstein’s theorem on nonlinear stabilization,” _Systems & control letters_, vol. 13, no. 2, pp. 117–123, 1989.
  * [3] A. D. Ames, X. Xu, J. W. Grizzle, and P. Tabuada, “Control barrier function based quadratic programs for safety critical systems,” _IEEE Trans. on Automatic Control_ , vol. 62, no. 8, pp. 3861–3876, 2017.
  * [4] P. Mestres and J. Cortés, “Optimization-Based Safe Stabilizing Feedback with Guaranteed Region of Attraction,” _IEEE Control Systems Letters_ , vol. 7, pp. 367–372, 2023.
  * [5] X. Tan and D. V. Dimarogonas, “On the undesired equilibria induced by control barrier function based quadratic programs,” _arXiv:2104.14895_ , 2021.
  * [6] M. Z. Romdlony and B. Jayawardhana, “Stabilization with guaranteed safety using Control Lyapunov–Barrier Function,” _Automatica_ , vol. 66, pp. 39–47, 2016.
  * [7] K. Garg and D. Panagou, “Robust control barrier and control Lyapunov functions with fixed-time convergence guarantees,” in _American Control Conference (ACC)_ , 2021, pp. 2292–2297.
  * [8] M. Jankovic, “Robust control barrier functions for constrained stabilization of nonlinear systems,” _Automatica_ , vol. 96, pp. 359–367, 2018.
  * [9] M. F. Reis, A. P. Aguiar, and P. Tabuada, “Control barrier function-based quadratic programs introduce undesirable asymptotically stable equilibria,” _IEEE Control Syst. Lett._ , vol. 5, no. 2, pp. 731–736, 2020.
  * [10] W. S. Cortez and D. V. Dimarogonas, “On Compatibility and Region of Attraction for Safe, Stabilizing Control Laws,” _IEEE Transactions on Automatic Control_ , vol. 67, no. 9, pp. 4924–4931, 2022.
  * [11] J.-S. Pang and D. E. Stewart, “Differential variational inequalities,” _Mathematical programming_ , vol. 113, no. 2, pp. 345–424, 2008.
  * [12] H. Scheel and S. Scholtes, “Mathematical programs with complementarity constraints: Stationarity, optimality, and sensitivity,” _Mathematics of Operations Research_ , vol. 25, no. 1, pp. 1–22, 2000.
  * [13] M. Posa, C. Cantu, and R. Tedrake, “A direct method for trajectory optimization of rigid bodies through contact,” _The International Journal of Robotics Research_ , vol. 33, no. 1, pp. 69–81, 2014.
  * [14] M. K. Camlibel, J.-S. Pang, and J. Shen, “Lyapunov stability of complementarity and extended systems,” _SIAM Journal on Optimization_ , vol. 17, no. 4, pp. 1056–1101, 2007.
  * [15] A. Aydinoglu and M. Posa, “Real-time multi-contact model predictive control via admm,” in _2022 International Conference on Robotics and Automation (ICRA)_. IEEE, 2022, pp. 3414–3421.
  * [16] H. Khalil, _Nonlinear Systems_. Prentice Hall, 1996.
  * [17] E. D. Sontag, _Mathematical control theory: deterministic finite dimensional systems_. Springer Science and Business Media, 2013, vol. 6.
  * [18] A. D. Ames, S. Coogan, M. Egerstedt, G. Notomista, K. Sreenath, and P. Tabuada, “Control Barrier Functions: Theory and Applications,” in _European Control Conference (ECC)_ , 2019, pp. 3420–3431.
  * [19] X. Xu, P. Tabuada, J. W. Grizzle, and A. D. Ames, “Robustness of control barrier functions for safety critical control,” _IFAC-PapersOnLine_ , vol. 48, no. 27, pp. 54–61, 2015.
  * [20] P. Ong and J. Cortés, “Universal Formula for Smooth Safe Stabilization,” in _IEEE Conf. Decision and Control_ , 2019, pp. 2373–2378.
  * [21] D. E. Stewart, “Uniqueness for index-one differential variational inequalities,” _Nonlinear Analysis: Hybrid Systems_ , vol. 2, no. 3, pp. 812–818, 2008.
  * [22] R. W. Cottle, J.-S. Pang, and R. E. Stone, _The Linear Complementarity Problem_. Academic Press, 1992.