# On the similarities between Control Barrier Functions (CBFs)
and Behavior Control Lyapunov Functions (BCLFs)

Petter Ögren

###### Abstract

Control Barrier Functions (CBFs) is an important tool used to address
situations with multiple concurrent control objectives, such as safety and
goal convergence. In this paper we investigate the similarities between CBFs
and so-called Behavior Control Lyapunov Functions (BCLFs) that have been
proposed to address the same type of problems in the aeronautics domain.

The key results of both CBFs and BCLFs is the description of the set of
controls that render a given set invariant. We compare the corresponding
theorems, and show that if we restrict the general class K function in CBFs to
be the general linear function of BCLFs, and restrict the number of objectives
as well as the number of priority levels to be just one in BCLFs, the results
in terms of admissible control sets are equivalent. Furthermore, both papers
show that the invariant set is made asymptotically stable.

##  I Introduction

Many important control problems can be formulated in terms of two concurrent
objectives: the need to reach a given _goal_ point while staying inside some
_safe_ part of the statespace. This applies to autonomous cars, drones and
other unmanned vehicles, but also to e.g. a manipulator arm grasping an object
while staying away from joint limits as well as workspace obstacles.

Lyapunov theory [1] is a well known tool used to address the first of these
objectives, goal convergence (including stability). However, it turns out that
the same ideas of Lyapunov can also be used to address the second objective,
staying within a safe set. This is the key observation behind two approaches
that were developed independently, Behavior Control Lyapunov Functions (BCLFs)
[2] and Control Barrier Functions (CBFs) [3].

BCLFs [2], were inspired by the ideas of handling concurrent objectives in the
subsumption architecture [4] and the behavior based approach [5], but strived
to do so in a more formal way, with guarantees on performance. This was done
by applying the ideas of Control Lyapunov Functions (CLFs) [1], but having
several such functions in parallel, and placing bounds on the their time
derivatives that depended on the available margins.

Allowing for several concurrent objectives, BCLFs also include mechanisms for
different priority levels, and acceptable safety margins for each of these
levels and objectives. However, picking just one additional objective, and one
priority level, the key result of BCLFs are very similar to those of CBFs, as
will be shown in this paper.

CBFs were introduced in [6], and have since been applied to an ever increasing
number of applications [7, 8, 9, 10, 11, 12].

The main contribution of this paper is that we show that there are significant
similarities between the theory of CBFs and BCLFs. These similarities have not
been shown before. In fact, the control community has been largely unaware of
BCLFs, as can be seen from the detailed description of the history of CBFs
included in [3]. There it is stated that the first control version of a
barrier certificate was presented in 2007, [13], and that the notion of
extending $\dot{h}\geq 0$ at the boundary of the safe set to $\dot{h}\geq-h$
for the entire set was first done in 2009, [14]. As shown below, both of these
features were described in 2006, in [2], applying the constraint $\dot{h}\geq-
kh$ for some $k>0$, which is similar in spirit to the more general
$\dot{h}\geq-\alpha(h)$ that was introduced in [6, 9].

The outline of this paper is as follows. First we provide a background
description of the key results of CBFs and BCLFs in Section II. Then we show
the similarity of the two results in Section III, followed by conclusions in
Section IV.

##  II Background

In this section we will revise some key results on CBFs as well as BCLFs. For
a complete description we refer the reader to [3] and [2].

###  II-A Control Barrier Functions

In [3], we have the following definitions and results.

######  Definition 1 (From [3])

Let $C\subset D\subset\mathbb{R}^{n}$ be the superlevel set of a continuously
differentiable function $h:d\rightarrow\mathbb{R}$, then $h$ is a control
barrier function (CBF) if there exists an extended class $K_{\infty}$ function
$\alpha$ such that for $\dot{x}=f(x)+g(x)u$,

$\sup_{u}\in U[L_{f}h(x)+L_{g}h(x)u]\geq-\alpha(h(x))$ (1)

for all $x\in D$.

Let the set of control values that render the set $C$ safe be defined as

$K_{cbf}(x)=\\{u\in U:L_{f}h(x)+L_{g}h(x)u+\alpha(h(x))\geq 0\\}$ (2)

######  Theorem 1 (From [3])

Let $C\subset\mathbb{R}^{n}$ be a set defined as the superlevel set of a
continuously differentiable function
$h:D\subset\mathbb{R}^{n}\rightarrow\mathbb{R}$. If $h$ is a control barrier
function on $D$ and $\frac{\partial h}{\partial x}(x)\neq 0$ for all
$x\in\partial C$, then any Lipschits continuous controller $u(x)\in
K_{cbf}(x)$ renders the set $C$ safe. Additionally, the set C is
asymptotically stable in $D$.

###  II-B Behavior Control Lyapunov Functions

The ideas presented in [2] is to define not a single safe set
$\mathcal{C}=\\{x:h(x)\geq 0\\}$ as in [3] but a family (over $j$ and $i$) of
such sets $\\{x:V_{i}(x)\leq b_{ij}\forall i\\}$. Here $i$ indicates different
types of objectives, such as obstacle clearance or time at target, whereas $j$
indicates different levels of ambition, such as having an obstacle clearance
of 10 or 20 inches.

The initial definition of BCLFs is a bit different from Definition 1, since we
are aiming for systems that can achieve objectives that are not met as well as
keep those that are already met.

######  Definition 2 (III.1 in [2])

Given a system $\dot{x}=f(x,u)$, a bounded set of admissible controls
$U_{adm}$ a piecewise $C^{1}$ function
$V:\mathbb{R}^{n}\rightarrow\mathbb{R}$, and scalars $b,\epsilon>0$. Then $V$
is a BCLF for the bound $b$ and $\epsilon$ if

$\min_{u\in U_{adm}}\nabla V^{T}f(x,u)\leq-\epsilon,\forall x:V(x)\geq b.$ (3)

In order to keep track of the family of objectives, over $i,j$ and be able to
make informed tradeoffs between them, we need to define a priority level, as
illustrated in Table I and defined below.

TABLE I: Example of mission priorities captured by the CPL. Priority 0 is alway satisfied. First priority (CPL 1) is then to have an obstacle clearance of at least 10in. Second priority (CPL 2) is to arrive at the target within 60s from the start, while satisfying the 10in objective. Third priority is to keep the arrival time, but increase the obstacle margin, and adding some “other objective”. Note that all inequalities need to be $\leq$ but here the first row has been multiplied by $-1$ for readability. $b_{ij}$ |  | CPL 0 | CPL 1 | CPL 2 | CPL 3
---|---|---|---|---|---
Obstacle separation | $V_{1}\geq$ | $-\infty$ | 10in | 10in | 20in
Time at target | $V_{2}\leq$ | $\infty$ | $\infty$ | 60s | 60s
(other objective) | $V_{3}\leq$ | $\infty$ | $\infty$ | $\infty$ | 100

###### Definition 3

(III.3 in [2]) (CPL) Given a set of BCLFs, $V_{i}$, and bounds, $b_{ij}$, such
that $b_{i0}=\infty$, for all $i$. Let the Current Priority Level (CPL) or
$j_{CPL}(x)$, be given by

$j_{CPL}(x)=\max\\{j:V_{i}(x)\leq b_{ij},\forall i\\},$ (4)

i.e., $j_{CPL}(x)$ is the rightmost column of $\\{b_{ij}\\}$ (see Table I)
where all constraints are satisfied.

Note that demanding $b_{i0}=\infty$, for all $i$ guarantees that the CPL is
always defined. Next comes $U_{sat}$ the BCLF set corresponding to $K_{cbf}$
for CBFs.

######  Definition 4 (III.4 in [2])

Fix $k>0$ and let $\epsilon>0$ be the same as in Definition 2. Given a set of
BCLFs, $V_{i}$, with corresponding bounds, $b_{ij}$. Let

$U_{sat}(x)=\\{u:\dot{V}_{i}(x,u)\leq\frac{1}{k}(b_{ij}-V_{i}(x)),j=j_{CPL}(x),\forall
i\\}$ (5)

the set of controls satisfying the bounds of the CPL. Let furthermore

$I_{next}(x)=\\{i:V_{i}(x)\geq b_{i(j+1)},j=j_{CPL}(x)\\}$ (6)

the set of objectives to be focused on and

$U_{inc}(x)=\\{u:\dot{V}_{i}(x,u)\leq-\epsilon,\forall i\in I_{next}(x)\\}$
(7)

the set of controls aiming to increase the CPL.

Note that $U_{sat}(x)$ is the set of controls preserving the CPL,
$I_{next}(x)$ are the indices of the bounds that are not satisfied at the next
CPL, and $U_{inc}(x)$ is that set of controls that move the state towards
satisfy those bounds.

More formally, we characterize the sets that guarantee the satisfaction of the
CPL and the future increase in priority level as follows.

###### Lemma 1

(III.5 in [2]) If a system starts at $x(t_{0})=x_{0}$, and the chosen controls
u satisfy

$u\in U_{sat}(x),$ (8)

then $j_{CPL}(x_{0})\leq j_{CPL}(x),\forall t>t_{0}$ i.e. the CPL will not
decrease. If furthermore

$u\in U_{sat}(x)\cap U_{inc},$

then $j_{CPL}(x_{0})<j_{CPL}(x)$ will be satisfied in finite time, i.e. the
CPL will increase.

###### Proof:

See [2]. ∎

Finally, the asymptotical stability part of Theorem 1 has its counterpart
below.

###### Remark 1

(III.6 in [2]) The constant $k$ governs how fast a satisfied bound $b_{ij}$
can be approached. If the worst possible $u\in U_{sat}$ is chosen, then we
have equality in the constraints,
$\dot{V}_{i}(x,u)=\frac{1}{k}(b_{ij}-V_{i}(x))$, and $V_{i}$ approaches
$b_{ij}$ exponentially, with the time constant $k$.

##  III Similarity of Results

The key similartiy between [2] and [3] is the set of controls making the set
invariant, $K_{cbf}(x)$ in Equation (2) and $U_{sat}(x)$ in Equation (5).

###### Lemma 2

The key sets of control choices that guarantee satisfaction of the objective,
$K_{cbf}$ and $U_{sat}(x)$ are identical, if the class K function
$\alpha:\mathbb{R}\rightarrow\mathbb{R}$ is chosen to be a generic linear
function $\alpha(x)=x/k$ for some $k>0$, and the family of sets in (4) are
reduced to a single one, that is $i=1,j=1$, with $b_{ij}=b_{11}=0$.

###### Proof:

Having $\dot{x}=f(x)+g(x)u$, $V_{i}(x)=-h(x)$, the user defined bound
$b_{ij}=0$, and the class k function $\alpha(y)=\frac{1}{k}y$ for some user
defined constant $k>0$ we have that

$\displaystyle K_{cbf}(x)$ $\displaystyle=\\{u\in
U:L_{f}h(x)+L_{g}h(x)u+\alpha(h(x))\geq 0\\}$ $\displaystyle=\\{u\in
U:\dot{h}(x)+\alpha(h(x))\geq 0\\}$ $\displaystyle=\\{u\in
U:\dot{h}(x)\geq-\frac{1}{k}(h(x))\\}$ $\displaystyle=\\{u\in
U:-\dot{V}_{i}(x)\geq\frac{1}{k}(V_{i}(x))\\}$ $\displaystyle=\\{u\in
U:\dot{V}_{i}(x)\leq\frac{-1}{k}(V_{i}(x))\\}$ $\displaystyle=U_{sat}(x)$ (9)

∎

With this observation made, Lemma III.5 of [2] states that $u\in U_{sat}(x)$
implies that the CPL will not decrease, which means that $V_{i}(x)\leq
b_{ij},\forall i$ for a given $j$, which translates to $h(x)\geq 0$.

Therefore, Lemma III.5 is very similar to Theorem 2, stating that $u\in
K_{cbf}$ implies $h(x)\geq 0$. Finally, the asymptotic stability of the safe
set is also noted in Remark III.6.

##  IV Conclusion

In this paper we have shown the significant overlap between the CBF and the
BCLF. This is important not only for understanding how ideas have developed,
but also for future work on extending CBFs to domains where more than two
objectives are concurrently considered.

## References

  * [1] S. Sastry, Nonlinear systems: analysis, stability, and control, vol. 10.  Springer Science & Business Media, 2013.
  * [2] P. Ögren, A. Backlund, T. Harryson, L. Kristensson, and P. Stensson, “Autonomous ucav strike missions using behavior control lyapunov functions,” in AIAA Guidance, Navigation, and Control Conference and Exhibit, p. 6197, 2006.
  * [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] R. Brooks, “A robust layered control system for a mobile robot,” IEEE journal on robotics and automation, vol. 2, no. 1, pp. 14–23, 1986.
  * [5] R. C. Arkin, Behavior-based robotics.  MIT press, 1998.
  * [6] 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, pp. 6271–6278, IEEE, 2014.
  * [7] M. Z. Romdlony and B. Jayawardhana, “Uniting control lyapunov and control barrier functions,” in 53rd IEEE Conference on Decision and Control, pp. 2293–2298, IEEE, 2014.
  * [8] D. Pickem, P. Glotfelter, L. Wang, M. Mote, A. Ames, E. Feron, and M. Egerstedt, “The robotarium: A remotely accessible swarm robotics research testbed,” in 2017 IEEE International Conference on Robotics and Automation (ICRA), pp. 1699–1706, IEEE, 2017.
  * [9] 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, 2016.
  * [10] W. Xiao, C. Belta, and C. G. Cassandras, “Decentralized merging control in traffic networks: A control barrier function approach,” in Proceedings of the 10th ACM/IEEE International Conference on Cyber-Physical Systems, pp. 270–279, 2019.
  * [11] J. Choi, F. Castaneda, C. J. Tomlin, and K. Sreenath, “Reinforcement learning for safety-critical control under model uncertainty, using control lyapunov functions and control barrier functions,” arXiv preprint arXiv:2004.07584, 2020.
  * [12] L. Lindemann, G. J. Pappas, and D. V. Dimarogonas, “Control barrier functions for nonholonomic systems under risk signal temporal logic specifications,” in 2020 59th IEEE Conference on Decision and Control (CDC), pp. 1422–1428, IEEE, 2020.
  * [13] P. Wieland and F. Allgöwer, “Constructive safety using control barrier functions,” IFAC Proceedings Volumes, vol. 40, no. 12, pp. 462–467, 2007\.
  * [14] J.-P. Aubin, Viability theory.  Springer Science & Business Media, 2009.