of 8
arXiv:2204.00653v1 [eess.SY] 1 Apr 2022
Safe Backstepping with Control Barrier Functions
Andrew J. Taylor, Pio Ong, Tamas G. Molnar, and Aaron D. Ames
Abstract
—Complex control systems are often described in a
layered fashion, represented as
higher-order systems
where the
inputs appear after a chain of integrators. While Control Ba
rrier
Functions (CBFs) have proven to be powerful tools for safety
-
critical controller design of nonlinear systems, their app
lication to
higher-order systems adds complexity to the controller syn
thesis
process—it necessitates dynamically extending the CBF to i
nclude
higher order terms, which consequently modifies the safe set
in complex ways. We propose an alternative approach for
addressing safety of higher-order systems through
Control Barrier
Function Backstepping
. Drawing inspiration from the method of
Lyapunov backstepping, we provide a constructive framewor
k
for synthesizing safety-critical controllers and CBFs for
higher-
order systems from a top-level dynamics safety specificatio
n
and controller design. Furthermore, we integrate the propo
sed
method with Lyapunov backstepping, allowing the tasks of st
a-
bility and safety to be expressed individually but achieved
jointly.
We demonstrate the efficacy of this approach in simulation.
I. I
NTRODUCTION
Safety is becoming an ever more prevalent design consider-
ation in modern control systems as these systems are deploye
d
in real-world environments. Control Barrier Functions (CB
Fs)
have become a popular tool for constructively synthesizing
controllers that endow nonlinear systems with rigorous gua
r-
antees of safety [1], [2]. Originally posed such that the inp
ut
of the system directly impacted the time derivative of the CB
F,
recent work has sought to extend this to higher-order nonlin
ear
systems in which multiple time derivatives are required for
the
input to influence the evolution of the CBF [3]–[6]. While
these works allow for the safety-critical control of higher
-
order systems, they require verifying the feasibility of CB
F
conditions using the full system dynamics and change the
safe set in complex ways. Alternatively, the work in [7] has
explored designing CBFs for a top-level model, and using a
tracking controller that addresses the full system dynamic
s.
As the complexity of systems increase, it is often desirable
to approach the control design process with a simplified top-
level model that guides design for subsystems addressing
the full system dynamics. Backstepping is a well establishe
d
design technique for addressing the robust stabilization o
f
layered systems of this form, i.e., nonlinear systems with
higher-order dynamics
[8], [9]. It considers design for the top-
level model and recursively designs a controller using the f
ull
system dynamics, also allowing it to address the challenge o
f
mixed-relative degree
, where inputs enter the system dynamics
at different levels. Using backstepping to stabilize syste
ms
This research is supported in part by Ford, the National Scie
nce Foundation
(CPS Award #1932091, CMMI Award #1923239), Raytheon Techno
logies,
Aerovironment and Dow (#227027AT).
The authors are with the Department of Computing and Mathema
tical
Sciences and the Department of Mechanical and Civil Enginee
ring, Cali-
fornia Institute of Technology, Pasadena, CA 91125, USA,
{
ajtaylor,
pioong, tmolnar, ames
}
@caltech.edu
.
while meeting state constraints has been studied through le
ns
of non-overshooting control [10], and has recently been rel
ated
to CBFs [11], [12]. These works achieve safe behavior using a
structured controller that yields a linear dynamic relatio
nship
between sequential states in a cascade, such that a system do
es
not overshoot a setpoint as it stabilizes. Other work has use
d
backstepping in the context of Lyapunov-Barrier functions
to
ensure state constraints are met [13]–[15]. These approach
es
couple ensuring safety with ensuring stability, which may
impose strict structural requirements on safety constrain
ts. To
the best of our knowledge, decoupling stability and safety
and exploring backstepping purely with safety constraints
expressed through CBFs has not been considered.
A core challenge in combining CBF-based methods with
backstepping is finding smooth controllers that ensure safe
ty
as backstepping requires the differentiation of controlle
rs ap-
pearing higher in the integrator chain. From the conception
of CBFs, they have typically been used as constraints in
optimization-based controllers—either paired with CLFs [
1],
or filtering a desired stabilizing controller [2]—and there
fore
are inherently non-smooth. Additionally, typically one wi
shes
to design controllers that are not only safe, but are also
stabilizing, precluding smooth CBF controller instantiat
ions,
e.g., using Sontag’s Universal formula [16]. While it may be
possible to address these non-smooth challenges [17], [18]
,
we will consider the approach in [19] for synthesizing smoot
h
controllers meeting both CLF and CBF constraints.
The goal of this paper is to to unify backstepping with
CBFs, thereby enabling safe controller design at multiple
levels with varying degrees of model complexity. To this
end, after a review of CBFs and Lyapunov backstepping, we
begin in Section III by formulating a nonlinear controller t
hat
ensures safety of a system with a single cascade via Barrier
Functions and backstepping. A consequence of this result is
that we may constructively synthesize a CBF for the full
cascaded system using a CBF and smooth controller designed
only considering the top-level of the system, which is often
easier than directly finding a CBF for the full-order system.
Additionally, in Section IV, we demonstrate that this appro
ach
can be generalized to the multiple-cascade setting, and add
ress
the challenge of mixed relative-degree systems. The main
result of this paper, presented in Section V, is the unificati
on of
Lyapunov and Barrier backstepping, wherein we show that by
designing a controller that renders the top-level dynamics
both
stable and safe, we may use backstepping to achieve stabilit
y
and safety of the full cascaded system. Importantly, using
the techniques in [19], we are able to design a smooth top-
level controller amenable to backstepping. These results a
re
demonstrated in simulation in Section VI on multiple exampl
es
in the context of obstacle avoidance.
II. B
ACKGROUND
In this section we revisit Barrier Functions, Control Bar-
rier Functions and Lyapunov backstepping as a precursor to
introducing Control Barrier Function backstepping.
Consider a nonlinear control-affine system:
̇
x
=
f
(
x
) +
g
(
x
)
u
,
(1)
with state
x
R
n
, input
u
R
m
, and functions
f
:
R
n
R
n
and
g
:
R
n
R
n
×
m
assumed to be locally Lipschitz
continuous on
R
n
. A locally Lipschitz continuous controller
k
:
R
n
R
m
yields the closed loop system:
̇
x
=
f
(
x
) +
g
(
x
)
k
(
x
)
.
(2)
As the functions
f
,
g
, and
k
are locally Lipschitz continuous,
for any initial condition
x
0
R
n
, there exists a maximal
time interval
I
(
x
0
) = [0
,t
max
(
x
0
))
and a unique continuously
differentiable solution
φ
:
I
(
x
0
)
R
n
satisfying:
̇
φ
(
t
) =
f
(
φ
(
t
)) +
g
(
φ
(
t
))
k
(
φ
(
t
))
,
(3)
φ
(0) =
x
0
,
(4)
for all
t
I
(
x
0
)
[20].
A. Control Barrier Functions
We define the notion of safety in this context as forward
invariance of a set in the state space. Specifically, suppose
there exists a set
C ⊂
R
n
defined as the 0-superlevel set of a
continuously differentiable function
h
:
R
n
R
:
C
=
{
x
R
n
|
h
(
x
)
0
}
.
(5)
The set
C
is said to be
forward invariant
if for any initial
condition
x
0
∈C
, we have
φ
(
t
)
∈C
for all
t
I
(
x
0
)
. In this
case, we call the system (2)
safe
with respect to the set
C
, and
refer to
C
as the
safe set
.
Before defining Barrier Functions and Control Barrier Func-
tions, we recall the following definitions. A continuous fun
c-
tion
α
: [0
,
)
[0
,
)
is said to be
class
K
(
α
∈ K
)
if
α
is strictly monotonically increasing with
α
(0) = 0
and
lim
r
→∞
α
(
r
) =
, and a continuous function
α
:
R
R
is
said to be
extended class
K
(
α
∈K
e
) if it belongs to
K
and
lim
r
→−∞
α
(
r
) =
−∞
. We now define Barrier Functions:
Definition 1
(
Barrier Function (BF)
[21])
.
Let
C ⊂
R
n
be
the 0-superlevel set of a continuously differentiable func
tion
h
:
R
n
R
with
∂h
x
(
x
)
6
=
0
when
h
(
x
) = 0
. The function
h
is a
Barrier Function
(BF) for (2) on
C
if there exists
α
∈K
e
such that for all
x
R
n
:
∂h
x
(
x
)
f
(
x
)
︷︷
L
f
h
(
x
)
+
∂h
x
(
x
)
g
(
x
)
︷︷
L
g
h
(
x
)
k
(
x
)
≥−
α
(
h
(
x
))
.
(6)
We have the following result establishing the safety of a set
C
for the closed-loop system (2) through Barrier Functions:
Theorem 1
( [21], [22])
.
Let
C ⊂
R
n
be the
0
-superlevel set
of a continuously differentiable function
h
:
R
n
R
with
∂h
x
(
x
)
6
=
0
when
h
(
x
) = 0
. If
h
is a BF for
(2)
on
C
, then
the system
(2)
is safe with respect to the set
C
.
Control Barrier Functions provide a tool for synthesizing
controllers that enforce the safety of
C
:
Definition 2
(
Control Barrier Function (CBF)
[21])
.
Let
C ⊂
R
n
be the 0-superlevel set of a continuously differentiable
function
h
:
R
n
R
with
∂h
x
(
x
)
6
=
0
when
h
(
x
) = 0
. The
function
h
is a
Control Barrier Function
(CBF) for (1) on
C
if there exists
α
∈K
e
such that for all
x
R
n
:
sup
u
R
m
̇
h
(
x
,
u
)
,
sup
u
R
m
L
f
h
(
x
) +
L
g
h
(
x
)
u
>
α
(
h
(
x
))
.
(7)
Given a CBF
h
for (1) and a corresponding
α
∈K
e
, we define
the point-wise set of control values:
K
CBF
(
x
) =
{
u
R
m
̇
h
(
x
,
u
)
≥−
α
(
h
(
x
))
}
.
(8)
This yields the following result:
Theorem 2
([21])
.
Let
C ⊂
R
n
be the 0-superlevel set
of a continuously differentiable function
h
:
R
n
R
with
∂h
x
(
x
)
6
=
0
when
h
(
x
) = 0
. If
h
is a CBF for
(1)
on
C
, then the
set
K
CBF
(
x
)
is non-empty for all
x
R
n
, and for any locally
Lipschitz continuous controller
k
with
k
(
x
)
K
CBF
(
x
)
for
all
x
R
n
, the function
h
is a BF for
(2)
on
C
.
Remark
1
.
The strict inequality in (7) serves two purposes.
First, it ensures the set (8) is non-empty (as with a non-stri
ct
inequality in (6), the supremum may hold with equality, but
there may be no input such that the supremum is attained).
Second, strictness enables proving optimization-based co
n-
trollers using CBFs are locally Lipschitz continuous [23].
B. Lyapunov Backstepping
Consider now a nonlinear control-affine system of the form:
̇
x
=
f
0
(
x
) +
g
0
(
x
)
ξ
,
(9)
̇
ξ
=
f
1
(
x
,
ξ
) +
g
1
(
x
,
ξ
)
u
,
(10)
with
x
R
n
,
ξ
R
p
, and
u
R
m
, and functions
f
0
:
R
n
R
n
,
g
0
:
R
n
R
n
×
p
,
f
1
:
R
n
×
R
p
R
p
,
and
g
1
:
R
n
×
R
p
R
p
×
m
assumed to be locally Lipschitz
continuous on their respective domains. This system is refe
rred
to as being in
strict-feedback form
. We further assume that
f
0
(
0
) =
f
1
(
0
,
0
) =
0
and
g
1
is pseudo-invertible on
R
n
×
R
p
.
As before, given a locally Lipschitz continuous feedback
controller
k
:
R
n
×
R
p
R
m
yielding the closed-loop system:
̇
x
=
f
0
(
x
) +
g
0
(
x
)
ξ
,
(11)
̇
ξ
=
f
1
(
x
,
ξ
) +
g
1
(
x
,
ξ
)
k
(
x
,
ξ
)
,
(12)
for any initial condition
(
x
0
,
ξ
0
)
R
n
×
R
p
there exists a max-
imum time interval
I
((
x
0
,
ξ
0
))
R
0
and a unique solution
denoted by
φ
= (
φ
x
,
φ
ξ
)
satisfying (3)-(4)
t
I
((
x
0
,
ξ
0
))
.
Suppose there exist a function
V
0
:
R
n
R
0
and a func-
tion
k
0
(
x
) :
R
n
R
p
, both twice-continuously differentiable
on
R
n
, and
γ
1
2
3
∈K
such that
k
0
(
0
) =
0
and:
γ
1
(
k
x
k
2
)
V
0
(
x
)
γ
2
(
k
x
k
2
)
,
(13)
∂V
0
x
(
x
)(
f
0
(
x
) +
g
0
(
x
)
k
0
(
x
))
≤−
γ
3
(
k
x
k
2
)
,
(14)
for all
x
R
n
. The function
k
0
(
x
)
reflects a stabilizing
controller that we would implement for the system (9) if we
could directly control
ξ
. As we may only directly control
u
, we
must
backstep
through the state
ξ
to access
u
. More precisely,
consider a function
V
:
R
n
×
R
p
R
0
defined as:
V
(
x
,
ξ
) =
V
0
(
x
) +
1
2
μ
(
ξ
k
0
(
x
))
(
ξ
k
0
(
x
))
,
(15)
where
μ
R
>
0
. We note there exists
γ
1
2
∈K
such that:
γ
1
(
k
x
k
2
) +
γ
1
(
k
ξ
k
0
(
x
)
k
2
)
V
(
x
,
ξ
)
,
(16)
V
(
x
,
ξ
)
γ
2
(
k
x
k
2
) +
γ
2
(
k
ξ
k
0
(
x
)
k
2
)
,
(17)
for all
x
R
n
and
ξ
R
p
. The time derivative of
V
is:
̇
V
(
x
,
ξ
,
u
) =
∂V
0
x
(
x
)
(
f
0
(
x
) +
g
0
(
x
)
ξ
)
(18)
+
1
μ
(
ξ
k
0
(
x
))
(
f
1
(
x
,
ξ
) +
g
1
(
x
,
ξ
)
u
k
0
x
(
x
)
(
f
0
(
x
) +
g
0
(
x
)
ξ
)
)
.
Using a locally Lipschitz continuous feedback controller
k
:
R
n
×
R
p
R
m
defined as:
k
(
x
,
ξ
) =
g
1
(
x
,
ξ
)
(
f
1
(
x
,
ξ
) +
k
0
x
(
x
)
(
f
0
(
x
) +
g
0
(
x
)
ξ
)
μ
(
∂V
0
x
(
x
)
g
0
(
x
)
)
λ
2
(
ξ
k
0
(
x
))
)
,
(19)
with
λ
R
0
yields:
̇
V
(
x
,
ξ
,
k
(
x
,
ξ
)) =
∂V
0
x
(
x
)(
f
(
x
) +
g
(
x
)
k
0
(
x
))
(20)
λ
2
μ
(
ξ
k
0
(
x
))
(
ξ
k
0
(
x
))
,
≤ −
γ
3
(
k
x
k
2
)
γ
3
(
k
ξ
k
0
(
x
)
k
2
)
,
(21)
for
γ
3
∈ K
defined as
γ
3
(
s
)
,
λ/
(2
μ
)
s
2
. Hence
V
is
a Lyapunov function for (11)-(12), such that
I
((
x
0
,
ξ
0
)) =
[0
,
)
for all
(
x
0
,
ξ
0
)
R
n
×
R
p
, and
φ
x
(
t
)
0
and
φ
ξ
(
t
)
k
0
(
φ
x
(
t
))
0
as
t
→∞
. Furthermore, we have:
inf
u
R
m
̇
V
(
x
,
ξ
,
u
)
<
3
(
k
x
k
2
)
3
(
k
ξ
k
0
(
x
)
k
2
)
,
(22)
for all
x
6
=
0
and
ξ
6
=
k
0
(
x
)
, where
c
(0
,
1)
, such that
V
is a Control Lyapunov Function (CLF) [23]. This enables a
convex optimization-based controller defined as follows:
k
(
x
,
ξ
) = argmin
u
R
m
1
2
k
u
k
2
2
(23)
s.t.
̇
V
(
x
,
ξ
,
u
)
≤−
3
(
k
x
k
2
)
3
(
k
ξ
k
0
(
x
)
k
2
)
,
that stabilizes (11)-(12) and is locally Lipschitz continu
ous on
(
R
n
×
R
p
)
\{
0
}
if
γ
3
is locally Lipschitz continuous [23].
III. C
ONTROL
B
ARRIER
F
UNCTION
B
ACKSTEPPING
In this section we explore how Control Barrier Functions
can be used to achieve safety for the cascaded system in (9)-
(10) when one must backstep through the state
ξ
.
Suppose there exists a set
C
0
R
n
defined as the 0-
superlevel set of a twice-continuously differentiable fun
ction
h
0
:
R
n
R
:
C
0
=
{
x
R
n
|
h
0
(
x
)
0
}
,
(24)
that we wish to keep safe. We further assume that
∂h
0
x
(
x
)
6
=
0
when
h
0
(
x
) = 0
. As the input
u
does not show up in the time
derivative of
h
0
, we may not directly apply the Control Bar-
rier Function methodology established in Section II. Inste
ad,
motivated by the Lyapunov setting, we take a backstepping
approach using CBFs. In particular, suppose there exists a
twice-continuously differentiable function
k
0
(
x
) :
R
n
R
p
and a function
α
0
∈K
e
such that:
∂h
0
x
(
x
) (
f
0
(
x
) +
g
0
(
x
)
k
0
(
x
))
≥−
α
0
(
h
0
(
x
))
.
(25)
As before,
k
0
(
x
)
reflects a controller that renders
C
0
safe that
we would implement for the system (9) if we could directly
control
ξ
. Let us consider a twice-continuously differentiable
function
h
:
R
n
×
R
p
R
defined as:
h
(
x
,
ξ
) =
h
0
(
x
)
1
2
μ
(
ξ
k
0
(
x
))
(
ξ
k
0
(
x
))
,
(26)
with
μ
R
>
0
. We note that instead of adding the quadratic
error term as we did in (15), we have subtracted it. Let us
define the set
C ⊂
R
n
×
R
p
as the 0-superlevel set of the
function
h
:
C
=
{
(
x
,
ξ
)
R
n
×
R
p
|
h
(
x
,
ξ
)
0
}
,
(27)
noting that
C ⊂C
0
×
R
p
. This enables the following theorem:
Theorem 3.
Let
C
0
be the 0-superlevel set of a twice-
continuously differentiable function
h
0
:
R
n
R
with
∂h
0
x
(
x
)
6
=
0
when
h
0
(
x
) = 0
. If there exists a twice-
continuously differentiable function
k
0
(
x
) :
R
n
R
p
and
a globally Lipschitz
1
function
α
0
∈K
e
such that
(25)
holds,
then there exists a locally Lipschitz continuous controlle
r
k
:
R
n
×
R
p
R
p
such that the function
h
defined in
(26)
is a Barrier Function for the closed-loop system
(11)
-
(12)
on the set
C
defined in
(27)
. Moreover, if
(
x
0
,
ξ
0
)
∈ C
,
then
φ
x
(
t
)
∈C
0
for all
t
I
((
x
0
,
ξ
0
))
.
Proof.
We observe that:
[
∂h
x
(
x
,
ξ
)
∂h
ξ
(
x
,
ξ
)
]
=
[
∂h
0
x
(
x
) +
1
μ
(
ξ
k
0
(
x
))
k
0
x
(
x
)
1
μ
(
ξ
k
0
(
x
))
]
,
(28)
from which we may conclude that if
∂h
ξ
(
x
,
ξ
) =
0
and
h
(
x
,
ξ
) = 0
, we must have
h
0
(
x
) = 0
, and thus
∂h
x
(
x
,
ξ
) =
1
We note this assumption permits linear extended class
K
functions, i.e,
α
0
(
r
) =
kr
for some
k
R
>
0
, which are often used in practice
∂h
0
x
(
x
)
6
=
0
by assumption. Furthermore, taking the time
derivative of
h
yields:
̇
h
(
x
,
ξ
,
u
) =
∂h
0
x
(
x
)
(
f
0
(
x
) +
g
0
(
x
)
ξ
)
(29)
1
μ
(
ξ
k
0
(
x
))
(
f
1
(
x
,
ξ
) +
g
1
(
x
,
ξ
)
u
k
0
x
(
x
)
(
f
0
(
x
) +
g
0
(
x
)
ξ
)
)
.
Using a locally Lipschitz continuous feedback controller
k
:
R
n
×
R
p
R
m
defined as:
k
(
x
,
ξ
) =
g
1
(
x
,
ξ
)
(
f
1
(
x
,
ξ
) +
k
0
x
(
x
)
(
f
0
(
x
) +
g
0
(
x
)
ξ
)
+
μ
(
∂h
0
x
(
x
)
g
0
(
x
)
)
λ
2
(
ξ
k
0
(
x
))
)
,
(30)
with
λ
R
0
yields:
̇
h
(
x
,
ξ
,
k
(
x
,
ξ
)) =
∂h
0
x
(
x
)(
f
(
x
) +
g
(
x
)
k
0
(
x
))
(31)
+
λ
2
μ
(
ξ
k
0
(
x
))
(
ξ
k
0
(
x
))
,
≥ −
α
0
(
h
0
(
x
)) +
λ
2
μ
k
ξ
k
0
(
x
)
k
2
2
.
(32)
Let
L
be the Lipschitz constant of
α
0
. Choosing
λ
L
, we
have that:
̇
h
(
x
,
ξ
,
k
(
x
,
ξ
))
≥ −
α
0
(
h
0
(
x
)) +
L
2
μ
k
ξ
k
0
(
x
)
k
2
2
,
(33)
and the global Lipschitz property of
α
0
yields that:
α
0
(
h
0
(
x
)
1
2
μ
k
ξ
k
0
(
x
)
k
2
)
α
0
(
h
0
(
x
))
L
2
μ
k
ξ
k
0
(
x
)
k
2
2
.
(34)
Noting the definition of (26), we may rearrange (34) to yield:
α
0
(
h
(
x
,
ξ
))
α
0
(
h
0
(
x
))
L
2
μ
k
ξ
k
0
(
x
)
k
2
2
.
(35)
Negating both sides of this expression and combining with
(33) allows us to conclude that:
̇
h
(
x
,
ξ
,
k
(
x
,
ξ
))
≥−
α
0
(
h
(
x
,
ξ
))
.
(36)
Thus,
h
is a BF for the closed-loop system (11)-(12) on the
set
C
. Hence, by Theorem 1 we may conclude the set
C
is
safe, i.e.,
(
x
0
,
ξ
0
)
∈ C
=
φ
(
t
)
∈ C
=
φ
x
(
t
)
∈ C
0
for
all
t
I
((
x
0
,
ξ
0
))
.
Remark
2
.
The preceding result establishes the safety of the
set
C
, rather than the set
C
0
. We do not necessarily have that
x
0
∈ C
0
implies
φ
x
(
t
)
∈ C
0
for all
t
I
((
x
0
,
ξ
0
))
. The
further requirement on the initial condition
ξ
0
is expected,
and appears in other results studying safety for higher-ord
er
systems [3]–[5].
We now make the following observation. Suppose that
h
0
(
x
) = 0
,
ξ
=
k
0
(
x
)
and:
∂h
0
x
(
x
)(
f
0
(
x
) +
g
0
(
x
)
k
0
(
x
)) = 0
,
(37)
for some
x
∈C
0
. Then, we have that:
sup
u
R
m
̇
h
(
x
,
k
0
(
x
)
,
u
) = 0 =
α
(
h
(
x
,
k
0
(
x
)))
,
(38)
for any
α
∈ K
e
. Thus, we do not have that there exists an
extended class
K
function
α
such that the strict inequality
in (7) is met, and hence we may not conclude that
h
is a CBF
for the system (9)-(10) on
C
. The primary reason that
h
is not
a CBF lies in the fact that when
ξ
=
k
0
(
x
)
, the input does
not have an effect on the time derivative of
h
. In this situation,
the evolution of
h
is entirely dependent on the design of the
controller
k
0
. Suppose that instead of (25), we have that:
∂h
0
x
(
x
) (
f
0
(
x
) +
g
0
(
x
)
k
0
(
x
))
>
α
0
(
h
0
(
x
))
.
(39)
Considering any
x
R
n
now, if
ξ
=
k
0
(
x
)
, we have that:
̇
h
(
x
,
k
0
(
x
)
,
u
)
>
α
0
(
h
0
(
x
)) =
α
0
(
h
(
x
,
k
0
(
x
)))
,
(40)
for all
u
R
m
. Noting that if
ξ
6
=
k
0
(
x
)
,
̇
h
can be made
arbitrarily large through input, we may conclude that:
sup
u
R
m
̇
h
(
x
,
ξ
,
u
)
>
α
0
(
h
(
x
,
ξ
))
.
(41)
This is summarized in the following theorem:
Theorem 4.
Let
C
0
be the 0-superlevel set of a twice-
continuously differentiable function
h
0
:
R
n
R
with
∂h
0
x
(
x
)
6
=
0
when
h
0
(
x
) = 0
. If there exists a twice-
continuously differentiable function
k
0
(
x
) :
R
n
R
p
and
a function
α
0
∈K
e
such that
(39)
holds, then the function
h
defined in
(26)
is a Control Barrier Function for the system
(9)
-
(10)
on the set
C
defined in
(27)
.
Theorem 4 does not explicitly require the assumption of
global Lipschitz continuity on
α
0
, which was needed to
achieve (36) when using the particular controller (30). As
CBFs are typically used in the context of control synthesis
(beyond purely verification), we notice that (41) implies th
at:
sup
u
R
m
̇
h
(
x
,
ξ
,
u
)
>
α
1
(
h
(
x
,
ξ
))
,
(42)
for any
α
1
∈K
e
such that
α
1
(
s
)
α
0
(
s
)
for all
s
R
. Thus
we may view
α
1
as an design parameter we may specify.
For any such locally Lipschitz
2
α
1
∈ K
e
and any locally
Lipschitz continuous
k
d
:
R
n
×
R
p
R
m
, we can synthesize
an optimization-based controller:
k
(
x
,
ξ
) = argmin
u
R
m
1
2
k
u
k
d
(
x
,
ξ
)
k
2
2
(43)
s.t.
̇
h
(
x
,
ξ
,
u
)
≥−
α
1
(
h
(
x
,
ξ
))
,
that is locally Lipschitz continuous on
R
n
×
R
p
[23] and
renders
h
a BF for (11)-(12) on
C
.
2
Though it is not necessary for
α
0
to be locally Lipschitz continuous to
imply the existence of such an
α
1
, it is a sufficient condition.
IV. M
ULTI
-S
TEP
CBF B
ACKSTEPPING
In this section we extend the preceding CBF backstepping
approach to higher-order mixed-relative degree systems vi
a a
recursive design process typical of backstepping.
Consider the nonlinear system
3
in strict feedback form:
̇
ξ
0
=
f
0
(
ξ
0
) +
g
0
,
ξ
(
ξ
0
)
ξ
1
+
g
0
,
u
(
ξ
0
)
u
0
,
(44a)
̇
ξ
1
=
f
1
(
ξ
0
,
ξ
1
) +
g
1
,
ξ
(
ξ
0
,
ξ
1
)
ξ
2
+
g
1
,
u
(
ξ
0
,
ξ
1
)
u
1
,
(44b)
.
.
.
̇
ξ
r
=
f
r
(
ξ
0
,
ξ
1
,
ξ
2
,...
ξ
r
) +
g
r
(
ξ
0
,
ξ
1
,...,
ξ
r
)
u
r
,
(44c)
with states
ξ
i
R
p
i
and inputs
u
i
R
m
i
for
i
= 0
,...,r
. The
functions
f
i
,
g
i,
u
for
i
= 0
,...,r
and
g
i,
ξ
for
i
= 0
,...,r
1
are assumed to be smooth on their respective domains.
We further assume that the functions
g
i
= (
g
i,
ξ
,
g
i,
u
)
for
i
= 1
,...,r
1
and the function
g
r
are pseudo-invertible
on their respective domains. Let us denote
q
i
,
i
j
=0
p
j
,
M
r
,
r
j
=0
m
j
, and
z
i
,
(
ξ
0
,
ξ
1
,...,
ξ
i
)
R
q
i
for
i
= 0
,...,r
. We seek to construct a controller
k
:
R
q
r
R
M
r
such that setting
u
= (
u
0
,...,
u
r
) =
k
(
z
r
)
achieves safety.
Suppose the set
C
0
is defined as the 0-superlevel set of a
smooth function
h
0
:
R
q
0
R
as in (24), with
∂h
0
ξ
0
(
z
0
)
6
=
0
when
h
0
(
z
0
) = 0
. Let smooth functions
k
0
,
ξ
:
R
q
0
R
p
1
and
k
0
,
u
:
R
q
0
R
m
0
, and a globally Lipschitz continuous
function
α
0
∈K
e
with Lipschitz constant
L
satisfy:
∂h
0
ξ
0
(
z
0
)
(
f
0
(
z
0
) +
g
0
,
ξ
(
z
0
)
k
0
,
ξ
(
z
0
)
(45)
+
g
0
,
u
(
z
0
)
k
0
,
u
(
z
0
)
)
≥−
α
0
(
h
0
(
z
0
))
,
for all
z
0
R
q
0
. Consider smooth functions (to be defined)
k
i,
ξ
:
R
q
i
R
p
i
+1
for
i
= 1
,...,r
1
and
k
i,
u
:
R
q
i
R
m
i
for
i
= 1
,...,r
, and define the smooth function
h
:
R
q
r
R
:
h
(
z
r
) =
h
0
(
z
0
)
r
i
=1
1
2
μ
i
k
ξ
i
k
i
1
,
ξ
(
z
i
1
)
k
2
2
,
(46)
with
μ
i
R
>
0
for
i
= 1
,...,r
. Define the set
C ⊂
R
q
r
as:
C
=
{
z
r
R
q
r
|
h
(
z
r
)
0
}
,
(47)
noting that
C ⊆C
0
×
R
p
1
×···×
R
p
r
. Given this construction,
we have the following result:
Theorem 5.
Let
C
0
be the 0-superlevel set of smooth function
h
0
:
R
p
0
R
with
∂h
0
ξ
0
(
z
0
)
6
=
0
when
h
0
(
z
0
) = 0
. If there
exist smooth functions
k
0
,
ξ
:
R
p
0
R
p
1
and
k
0
,
u
:
R
p
0
R
m
0
and a globally Lipschitz function
α
0
∈K
e
such that
(45)
holds, then there exists a smooth controller
k
:
R
q
r
R
M
r
and functions
k
i,
ξ
:
R
q
i
R
p
i
+1
for
i
= 1
,...,r
1
such that
the function
h
:
R
q
r
R
defined in
(46)
is a Barrier Function
for the closed-loop system
(44)
on the set
C
defined in
(47)
.
Moreover, if the initial condition
z
r,
0
∈ C
, then
φ
ξ
0
(
t
)
∈ C
0
for all
t
I
(
z
r,
0
)
.
3
We do not notate a closed-loop system, but assume it is unders
tood that
when we refer to this system as closed-loop, it is operating u
nder a controller.
Proof.
We observe that:
∂h
ξ
0
(
z
r
) =
∂h
0
ξ
0
(
z
0
)
(48)
+
r
j
=1
1
μ
j
(
ξ
j
k
j
1
,
ξ
(
z
j
1
))
k
j
1
,
ξ
ξ
0
(
z
j
1
)
,
and for
i
∈{
1
,...,r
}
, we have that:
∂h
ξ
i
(
z
r
) =
1
μ
i
(
ξ
i
k
i
1
,
ξ
(
z
i
1
))
(49)
+
r
j
=
i
+1
1
μ
j
(
ξ
j
k
j
1
,
ξ
(
z
j
1
))
k
j
1
,
ξ
ξ
i
(
z
j
1
)
.
We can see recursively (backwards) that if
∂h
ξ
i
(
z
r
) =
0
for
i
= 1
,...,r
, then we must have
ξ
i
=
k
i
1
,
ξ
(
z
i
1
)
for
i
=
1
,...,r
, and thus
h
(
z
r
) =
h
0
(
ξ
0
)
and
∂h
ξ
0
(
z
r
) =
∂h
0
ξ
0
(
z
0
)
.
As
∂h
0
ξ
0
(
z
0
)
6
=
0
when
h
0
(
z
0
) = 0
, we have that
∂h
ξ
0
(
z
r
)
6
=
0
when
h
(
z
r
) = 0
, such that
∂h
z
r
(
z
r
)
6
=
0
when
h
(
z
r
) = 0
.
Using
k
0
,
ξ
and
k
0
,
u
, we define the smooth functions:
[
k
1
,
ξ
(
z
1
)
k
1
,
u
(
z
1
)
]
=
g
1
(
z
1
)
(
f
1
(
z
1
) +
μ
0
(
∂h
0
ξ
0
(
z
0
)
g
0
,
ξ
(
z
0
)
)
+
k
0
,
ξ
ξ
0
(
z
0
)
(
f
0
(
z
0
) +
g
0
,
ξ
(
z
0
)
ξ
1
+
g
0
,
u
(
z
0
)
k
0
,
u
(
z
0
)
)
λ
1
2
(
ξ
1
k
0
,
ξ
(
z
0
))
)
.
(50)
For
i
= 2
,...,r
1
, we recursively define the smooth
functions:
[
k
i,
ξ
(
z
i
)
k
i,
u
(
z
i
)
]
=
g
i
(
z
i
)
(
f
i
(
z
i
)
(51)
μ
i
g
i
1
,
ξ
(
z
i
1
)
(
ξ
i
1
k
i
2
,
ξ
(
z
i
2
))
+
i
1
j
=0
k
i
1
,
ξ
ξ
j
(
z
i
1
)
(
f
j
(
z
j
) +
g
j,
ξ
(
z
j
)
ξ
j
+1
+
g
j,
u
(
z
j
)
k
j,
u
(
z
j
)
)
λ
i
2
(
ξ
i
k
i
1
,
ξ
(
z
i
1
))
)
,
and lastly define the smooth function:
k
r,
u
(
z
i
) =
g
r
(
z
r
)
(
f
r
(
z
r
)
(52)
μ
r
g
r
1
,
ξ
(
z
r
1
)
(
ξ
r
1
k
r
2
,
ξ
(
z
r
2
))
+
r
1
j
=0
k
r
1
,
ξ
ξ
j
(
z
r
1
)
(
f
j
(
z
j
) +
g
j,
ξ
(
z
j
)
ξ
j
+1
+
g
j,
u
(
z
j
)
k
j,
u
(
z
j
)
)
λ
r
2
(
ξ
r
k
r
1
,
ξ
(
z
r
1
))
)
,
Letting the controller
k
:
R
q
r
R
M
r
be defined as:
k
(
z
r
) =
[
k
0
,
u
(
z
0
)
···
k
r,
u
(
z
r
)
]
,
(53)
a sequence of (laborious) calculations yields:
̇
h
(
z
r
,
k
(
z
r
))
≥−
α
0
(
h
0
(
z
0
)) +
r
i
=1
λ
i
2
μ
i
k
ξ
i
k
i
1
,
ξ
(
z
i
1
)
k
2
2
.
Choosing
λ
i
L
for
i
= 1
,...,r
and following the same
argument as in (31)-(36), we arrive at:
̇
h
(
z
r
,
k
(
z
r
))
≥−
α
0
(
h
(
z
r
))
.
(54)
Thus,
h
is a BF for the closed-loop system (44) on the set
C
.
Hence, by Theorem 1 we may conclude the set
C
is safe, i.e.,
z
r,
0
∈C
=
φ
(
t
)
∈C
=
φ
ξ
0
(
t
)
∈C
0
.
If instead of (45) we suppose that:
∂h
0
ξ
0
(
z
0
)
(
f
0
(
z
0
) +
g
0
,
ξ
(
z
0
)
k
0
,
ξ
(
z
0
)
(55)
+
g
0
,
u
k
0
,
u
(
z
0
)
)
>
α
0
(
h
0
(
z
0
))
,
we have the following result:
Theorem 6.
Let
C
0
be the 0-superlevel set of a smooth
function
h
0
:
R
q
0
R
with
∂h
0
ξ
0
(
z
0
)
6
=
0
when
h
0
(
z
0
) = 0
.
If there exist smooth functions
k
0
,
ξ
:
R
p
0
R
p
1
and
k
0
,
u
:
R
p
0
R
m
0
and a globally Lipschitz continuous
function
α
0
∈ K
e
such that
(55)
holds, then the function
h
defined in
(46)
is a Control Barrier Function for the system
(44)
on the set
C
defined in
(47)
.
Consequently, for any locally Lipschitz
α
1
∈ K
e
such
that
α
1
(
s
)
α
0
(
s
)
for all
s
R
and any locally Lipschitz
continuous
k
d
:
R
q
r
R
M
r
, we can synthesize a controller:
k
(
z
r
) = argmin
u
R
M
r
1
2
k
u
k
d
(
z
r
)
k
2
2
(56)
s.t.
̇
h
(
z
r
,
u
0
,...,
u
r
)
≥−
α
1
(
h
(
z
r
))
,
that is locally Lipschitz continuous on
R
q
r
[23] and renders
h
a BF for (44) on
C
.
V. J
OINT
CLF
AND
CBF B
ACKSTEPPING
In this section we use joint Lyapunov and CBF backstepping
to achieve both stability and safety of a cascaded system.
For simplicity, let us consider the system (9)-(10). Suppos
e
there exists functions
V
0
:
R
n
R
0
,
h
0
:
R
n
R
and
k
0
:
R
n
R
p
with
k
0
(
0
) =
0
, all twice-continuously
differentiable, and functions
γ
1
2
3
∈ K
and a globally
Lipschitz continuous function
α
0
∈ K
e
such that (13)-(14)
and (25) are satisfied. Furthermore, let us define the set
C
0
R
n
as in (24). As before, we wish to stabilize the
state to the origin while ensuring it remains in the set
C
0
.
Let us construct twice-continuously differentiable funct
ions
V
:
R
n
×
R
p
R
0
and
h
:
R
n
×
R
p
R
as:
V
(
x
,
ξ
) =
V
0
(
x
) +
1
2
μ
V
(
ξ
k
0
(
x
))
(
ξ
k
0
(
x
))
,
(57)
h
(
x
,
ξ
) =
h
0
(
x
)
1
2
μ
h
(
ξ
k
0
(
x
))
(
ξ
k
0
(
x
))
,
(58)
with
μ
V
h
R
>
0
. The time derivatives for
V
and
h
are
given in (18) and (29), using their respective values
μ
V
and
μ
h
. We express them compactly here as:
̇
V
(
x
,
ξ
,
u
) =
b
V,
1
(
x
,
ξ
) +
1
μ
V
a
1
(
x
,
ξ
)
u
(59)
̇
h
(
x
,
ξ
,
u
) =
b
h,
1
(
x
,
ξ
)
1
μ
h
a
1
(
x
,
ξ
)
u
,
(60)
for functions
b
V,
1
,b
h,
1
:
R
n
×
R
p
R
and
a
1
:
R
n
×
R
p
R
m
. As we saw in the individual backstepping cases, it was
possible to design (different) controllers such that the bo
unds
on the derivatives in (20) and (31) were met. This implies tha
t:
inf
u
R
m
b
V,
1
(
x
,
ξ
) +
1
μ
V
a
1
(
x
,
ξ
)
u
(61)
≤−
γ
3
(
k
x
k
)
γ
3
(
k
ξ
k
0
(
x
))
k
2
)
,
inf
u
R
m
b
h,
1
(
x
,
ξ
) +
1
μ
h
a
1
(
x
,
ξ
)
u
(62)
α
0
(
h
0
(
x
))
λ
2
μ
h
k
ξ
k
0
(
x
)
k
2
2
,
We can rewrite these two inequality constraints as:
a
1
(
x
,
ξ
)
u
c
V,
1
(
x
,
ξ
)
,
(63)
a
1
(
x
,
ξ
)
u
c
h,
1
(
x
,
ξ
)
,
(64)
for functions
c
V,
1
,c
h,
1
:
R
n
×
R
p
R
. A key observation is
that these constraints are mutually satisfiable, i.e, if we d
esign
a controller
k
:
R
n
×
R
p
R
m
such that:
a
1
(
x
,
ξ
)
k
(
x
,
ξ
)
min
{
c
V,
1
(
x
,
ξ
)
,c
h,
1
(
x
,
ξ
)
}
,
(65)
for all
(
x
,
ξ
)
R
n
×
R
p
, then both (63) and (64) are met.
Thus under this controller,
V
is a Lyapunov function and
h
is a Barrier Function on
C
for the closed-loop system (11)-
(12), such that we may conclude both stability and safety. An
optimization-based controller achieving this is defined as
:
k
(
x
,
ξ
) = argmin
u
R
m
1
2
k
u
k
2
2
(66)
s.t.
a
1
(
x
,
ξ
)
u
min
{
c
V,
1
(
x
,
ξ
)
,c
h,
1
(
x
,
ξ
)
}
.
The intuition behind the joint feasibility of these constra
ints
is that the controller
k
0
has been designed to provide both
stability and safety, and we are using the input
u
to drive
ξ
to
k
0
(
x
)
, thus benefiting both stability and safety. The challenge
is then to design a continuously differentiable controller
k
0
satisfying both (14) and (25). To accomplish this, we will
use the techniques presented in [19]. We note that designing
smooth stabilizing controllers via Lyapunov functions oft
en
faces challenges at the origin [16]. With a cascaded system,
we may encounter the origin of the top-level state without th
e
entire state being at the origin. Thus, in this work we slight
ly
relax (14) to ensure smoothness, in which case we achieve
practical stability as opposed to asymptotic stability.
Suppose that we are given a smooth desired controller
k
0
,
d
:
R
n
R
p
we wish to implement at the top-level, that is not
necessarily stable nor safe. Consider the top-level constr
aints:
∂V
0
x
(
x
)(
f
0
(
x
) +
g
0
(
x
)(
k
0
,
d
(
x
) +
v
))
≤ −
γ
3
(
k
x
k
2
)
+
δψ
(
k
x
k
2
)
,
∂h
0
x
(
x
) (
f
0
(
x
) +
g
0
(
x
)(
k
0
,
d
(
x
) +
v
))
≥ −
α
0
(
h
0
(
x
))
.
with
δ
R
>
0
and
ψ
:
R
R
0
a bump function defined as:
ψ
(
s
) =
{
exp
(
1
ǫ
2
s
2
)
, s
(
ǫ,ǫ
)
,
0
,
otherwise
,
(67)
with
ǫ
R
>
0
. We can rewrite these constraints as:
a
V,
0
(
x
)
v
+
b
V,
0
(
x
)
0
,
(68)
a
h,
0
(
x
)
v
+
b
h,
0
(
x
)
0
,
(69)
for functions
a
V,
0
,
a
h,
0
:
R
n
R
p
and
b
V,
0
,b
h,
0
:
R
n
R
.
Assuming
V
0
is a CLF and
h
0
is a CBF on
C
0
for (9) implies
the set-valued functions
U
V
,
U
h
:
R
n
→P
(
R
p
)
defined as:
U
i
(
x
) =
{
v
R
p
|
a
i,
0
(
x
)
v
+
b
i,
0
(
x
)
0
}
,
(70)
with
i
∈{
V,h
}
satisfy
U
i
(
x
)
6
=
{∅}
for all
x
R
n
. Moreover,
for simplicity let us assume that
U
V
(
x
)
∩U
h
(
x
)
6
=
{∅}
for
all
x
R
n
, such that there exists a
v
that satisfies both (68)
and (69) simultaneously. We note that if this is not possible
,
this construction can be done relaxing stability and enforc
ing
safety as is common with combined CLF-CBF methods [2].
For a set
U ⊆
R
p
, define the Gaussian weighted centroid
function
μ
:
R
n
R
p
as:
μ
(
x
;
U
)
,
U
v
φ
(
x
,
v
)
d
v
U
φ
(
x
,
v
)
d
v
,
(71)
where
φ
:
R
n
×
R
p
R
0
is defined as:
φ
(
x
,
v
) =
1
2
π
e
−k
v
k
2
2
/
(2
σ
(
x
))
,
(72)
with a smooth function
σ
:
R
n
R
0
. As in [19], we may
synthesize a controller:
k
0
(
x
) =
k
0
,
d
(
x
) +
ζ
(
ρ
(
x
))(
μ
(
x
;
U
V
) +
μ
(
x
;
U
h
))
+ (1
ζ
(
ρ
(
x
)))
μ
(
x
;
U
V
∩U
h
)
,
(73)
where
ζ
:
R
[0
,
1]
is a smooth partition of unity function
with
ζ
(
s
) = 0
for
s
0
and
ζ
(
s
) = 1
for
s
1
, and:
ρ
(
x
) =
a
V,
0
(
x
)
a
h,
0
(
x
)
k
a
V,
0
(
x
)
k
2
k
a
h,
0
(
x
)
k
2
,
(74)
encodes the angle between
a
V,
0
and
a
h,
0
. The Gaussian
weighted centroid functions in (73) have closed-form solut
ions
[24], [25]. The controller in (73) respects both constraint
s, i.e.,
(
k
0
(
x
)
k
0
,
d
(
x
))
∈U
V
(
x
)
∩U
h
(
x
)
. In addition,
k
0
is smooth
if the functions
a
V,
0
,
a
h,
0
,b
V,
0
and
b
h,
0
are smooth.
VI. S
IMULATION
We now demonstrate CBF backstepping with two examples.
Example 1.
Consider the planar double integrator system:
̇
x
=
ξ
,
̇
ξ
=
u
,
(75)
with
x
,
ξ
,
u
R
2
. We intend to control the system to a goal
position
x
g
R
2
(such that
lim
t
→∞
φ
x
(
t
) =
x
g
) while avoid-
ing an obstacle centered at
x
O
R
2
with radius
R
O
R
>
0
.
Collision-free behavior is captured by the safe set
C
0
with:
h
0
(
x
) =
1
2
(
k
x
x
O
k
2
2
R
2
O
)
,
(76)
that satisfies
h
0
(
x
) = 0 =
∂h
0
x
(
x
) = (
x
x
O
)
6
=
0
. To
reach the goal
x
g
, we rely on the desired smooth controller
k
0
,
d
(
x
) =
K
p
(
x
x
g
)
which is used to define
k
0
through
0
position,
x
2
1

3
position,
x
1
0
3
2
1
4
1
0
0.5
CBF,
h
0
1
1
0
time,
t
0
10
20
time,
t
0
10
20
time,
t
0
10
20

1

2
0.5
0
0.5
avoid


0.4


0.1


0.1


0.4



0.1


0.1


0.4
start
goal
Fig. 1.
Obstacle avoidance with double integrator model via backst
epping.
The system successfully avoids the obstacle and reaches the
goal, while the
conservatism of the route can be tuned by the smoothing param
eter.
the smooth safety filter in (73). This is used to define
h
as
in (26), which used with the desired controller
k
d
(
x
,
ξ
) =
K
v
(
ξ
k
0
(
x
))
in the quadratic-program safety filter (43).
The closed-loop system is simulated in Fig. 1 for
K
p
= 0
.
2
,
K
v
= 0
.
8
,
μ
= 1
,
α
0
(
s
) =
α
1
(
s
) =
s
,
σ
0
.
1
(purple) and
σ
0
.
4
(blue). The system safely reaches the goal without
colliding with the obstacle. As the smoothing parameter
σ
is
increased, the system takes a more conservative route farth
er
from the obstacle. This reduces the peak in the control input
.
Example 2.
Consider the planar unicycle model:
̇
x
=
v
cos
ψ,
̇
y
=
v
sin
ψ,
̇
ψ
=
ω.
(77)
where
x,y,ψ,v,ω
R
. This system can be written as:
̇
x
=
ξ
u
0
,
w
,
̇
ξ
=
[
ξ
2
ξ
1
]
u
1
,
(78)
with
x
=
[
x y
]
and
ξ
=
[
cos
ψ
sin
ψ
]
. Our goal is
obstacle avoidance like in Example 1, via the CBF (76).
The unicycle model is in the form of (44) except for
an additional nonlinearity: the product of the heading di-
rection
ξ
and the speed
u
0
that gives the velocity vector
w
=
ξ
u
0
. With some care, this nonlinearity can be handled
as follows. First, notice that (78) is affine in both
w
and
u
0
. Thus, a safe value
k
0
(
x
)
for the velocity
w
can be
designed such that it satisfies (25), which is the same as
k
0
(
x
)
in Example 1. We convert the safe velocity
k
0
(
x
)
into
a safe heading direction
k
0
,
ξ
(
x
) =
k
0
(
x
)
/
k
k
0
(
x
)
k
2
and safe
speed
k
0
,u
(
x
) =
k
k
0
(
x
)
k
2
by restricting to
k
0
(
x
)
6
=
0
. Then,
k
0
,
ξ
(
x
)
is incorporated into the composite barrier function
h