Safe_and_Robust_Observer-Controller_Synthesis_Using_Control_Barrier_Functions
Safe_and_Robust_Observer-Controller_Synthesis_Using_Control_Barrier_Functions
7, 2023 127
Abstract—This letter addresses the synthesis of safety- using only (often noisy) measurements obtained from sen-
critical controllers using estimate feedback. We propose sors. In such systems, it is common to design a full-state
an observer-controller interconnection to ensure that the feedback controller, and then replace the state by an estimate
nonlinear system remains safe despite bounded distur-
bances on the system dynamics and measurements that provided by an observer [6, Sec. 8.7]. It is well established
correspond to partial state information. The co-design that a controller capable of stabilizing a system with perfect
of observers and controllers is critical, since even in state information may fail to do so when using the state esti-
undisturbed cases, observers and controllers designed mate [7, Ch. 12]. Similarly, the use of imperfect information
independently may not render the system safe. We pro- for feedback control may cause safety violations.
pose two approaches to synthesize observer-controller
interconnections. The first approach utilizes Input-to-State In this letter, we study the implications on safety that
Stable observers, and the second uses Bounded Error arise due to imperfect and partially available information, and
observers. Using these stability and boundedness prop- propose a method to design safe observer-controllers. This
erties of the observation error, we construct novel Control important challenge has only recently received some attention.
Barrier Functions that impose inequality constraints on Measurement-Robust CBFs [8] have been proposed to address
the control inputs which, when satisfied, certifies safety.
We propose quadratic program-based controllers to sat- control synthesis in output-feedback, in the context of vision-
isfy these constraints, and prove Lipschitz continuity of based control. The authors assume sensors are noiseless and an
the derived controllers. Simulations and experiments on imperfect inverse of the measurement map is known, i.e., from
a quadrotor demonstrate the efficacy of the proposed a single measurement, a ball containing the true state is known.
methods. Using this bound, a second-order cone program-based con-
Index Terms—Robust control, constrained control, troller was proposed, although the Lipschitz continuity of this
observers for nonlinear systems. controller is yet to be established [8]. For many safety-critical
systems, the measurement maps are non-invertible, limiting
the scope for this method.
In [9], a safety critical controller is proposed for stochas-
I. I NTRODUCTION
tic systems, and a probabilistic safety guarantee is proved.
OR SAFETY-CRITICAL systems, one must not only
F design controllers that prioritize system safety above
all else, but also certify that the system will remain
The authors consider linear (non-invertible) measurement
maps, additive gaussian disturbances, and specifically use the
Extended Kalman Filter (EKF) as the observer. In [10] this
safe when deployed. In recent years, Control Barrier work is extended to consider a broader class of control-affine
Functions (CBFs) [1] have become a popular method to design systems, and probabilistic guarantees of safety over a finite for-
safety-critical controllers, since a certifiably safe control input ward interval are obtained. Establishing safety in a determin-
can be computed efficiently for nonlinear systems. Many istic (non-probabilistic) sense or using alternative observers
extensions have been proposed to address specific challenges remains challenging. It has also been demonstrated that in
in using CBFs, including robustness [2], [3], sampled-data some cases, safety guarantees can be obtained by modeling
considerations [4] and integration with high-level planners [5]. the system as a Partially Observable Markov Decision Process,
However, these works assume the controller has access to e.g., [11], although such methods are computationally expen-
perfect state information. In most practical systems, the true sive for high-dimensional systems and are more suitable for
state of the system is unknown and must be reconstructed systems with discrete action/state spaces.
The primary contribution of this letter is in synthesiz-
Manuscript received 21 March 2022; revised 24 May 2022; accepted ing safe and robust interconnected observer-controllers in
6 June 2022. Date of publication 22 June 2022; date of current ver- such a manner as to establish rigorous guarantees of safety,
sion 11 July 2022. This work was supported by the National Science
Foundation (NSF) under Grant 1942907. Recommended by Senior despite bounded disturbances on the system dynamics and sen-
Editor S. Tarbouriech. (Corresponding author: Devansh R. Agrawal.) sor measurements. We propose two approaches to solve this
The authors are with the Aerospace Engineering Department, problem, owing to the wide range of nonlinear observers [6].
University of Michigan at Ann Arbor, Ann Arbor, MI 48105 USA (e-mail:
[email protected]; [email protected]). The first approach utilizes the class of Input-to-State Stable
Digital Object Identifier 10.1109/LCSYS.2022.3185142 observers [12]. The second approach employs the more general
2475-1456
c 2022 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See https://www.ieee.org/publications/rights/index.html for more information.
Authorized licensed use limited to: University of Oklahoma Libraries. Downloaded on October 12,2023 at 22:19:06 UTC from IEEE Xplore. Restrictions apply.
128 IEEE CONTROL SYSTEMS LETTERS, VOL. 7, 2023
class of ‘Bounded Error’ observers, in which a set containing where y and u are defined in (1b) and (2b) respectively.
the state estimation error is known at all times. This class of Under the stated assumptions, there exists an interval I =
observers includes the Deterministic Extended Kalman Filter I(x0 , x̂0 ) = [0, tmax (x0 , x̂0 )) over which solutions to the
(DEKF) [7, Ch. 11.2], Lyapunov-based sum-of-squares poly- closed-loop system exist and are unique [15, Th. 3.1].
nomial observers [13], and others discussed later. We show that 2) Safety: Safety is defined as the true state of the system
our safe estimate-feedback controller can be obtained by solv- remaining within a safe set, S ⊂ X , for all times t ∈ I. The
ing quadratic programs (QP), and prove Lipschitz continuity safe set S is defined as the super-level set of a continuously-
of these controllers, allowing for low-computational complex- differentiable function h : X → R:
ity real-time implementation. The efficacy of the methods is
demonstrated both in simulations and in experiments on a S = {x ∈ X : h(x) ≥ 0}. (4)
quadrotor. A state-feedback controller1 π : R≥0 × X → U renders
system (1) safe with respect to the set S, if for the closed-
II. P RELIMINARIES AND B ACKGROUND loop dynamics ẋ = f (x) + g(x)π(t, x) + gd (x)d(t), the set S
Notation: Let R be the set of reals, R≥0 the set of non- is forward invariant, i.e., x(0) ∈ S =⇒ x(t) ∈ S ∀t ∈ I. In
negative reals and Sn++ the set of symmetric positive definite output-feedback we define safety as follows.
matrices in Rn×n . λmin (P), λmax (P) denote the smallest and Definition 1: An observer-controller pair (2) renders
largest eigenvalues of P ∈ Sn++ . For x ∈ Rn , xi is the system (1) safe with respect to a set S ⊂ X from the
i-th element, x is the Euclidean norm. The norm of a initial-condition sets X0 , X̂0 ⊂ S if for the closed-loop
signal w : R≥0 → Rq is w(t)∞ supt≥0 w(t). γf system (3),
denotes the Lipschitz constant of a Lipschitz-continuous func-
x(0) ∈ X0 and x̂(0) ∈ X̂0 =⇒ x(t) ∈ S ∀t ∈ I. (5)
tion f : Rn → Rm . Class K, extended class K and class KL
functions are as defined in [14]. Lie derivatives of a scalar Note the importance of the observer-controller connection,
function h : X → R, (X ⊂ Rn ), along a vector field i.e., using only x̂(t), we must obtain guarantees on x(t).
f : X → Rn are denoted Lf h(x) = ∂h ∂x (x)f (x). If vector fields 3) Control Barrier Functions: Control Barrier Functions
has an additional dependency, e.g., f : X × Rp → Rn , the (CBFs) have emerged as a tool to characterize and find con-
notation Lf h(x, y) = ∂h
∂x (x)f (x, y) is used. trollers that can render a system safe [1]. Robust-CBFs [2]
1) System: Consider a nonlinear control-affine system: also account for the disturbances d(t) in (1a). We introduce a
modification to reduce conservatism, inspired by [3].
ẋ = f (x) + g(x)u + gd (x)d(t), (1a)
Definition 2: A continuously differentiable function
y = c(x) + cd (x)v(t), (1b) h : X → R is a Tunable Robust CBF (TRCBF) for system (1)
if there exists a class K function α, and a continuous,
where x ∈ X ⊂ Rn is the system state, u ∈ U ⊂ Rm is the
non-increasing function κ : R≥0 → R with κ(0) = 1, s.t.
control input, y ∈ Rny is the measured output, d : R≥0 → Rnd
is a disturbance on the system dynamics, and v : R≥0 → sup Lf h(x) + Lg h(x)u + α(h(x))
Rnv is the measurement disturbance. We assume d and v are u∈U
piecewise continuous, bounded disturbances, supt d(t)∞ = ≥ κ(h(x))Lgd h(x)d̄, ∀x ∈ S. (6)
d̄ and v(t)∞ ≤ v̄ for some known d̄, v̄ < ∞. The functions
f : X → Rn , g : X → Rn×m , c : X → Rny , gd : X → Rn×nd , Examples include κ(r) = 1 and κ(r) = 2/(1 + exp(r)).
and cd : X → Rny ×nv are all assumed to be locally Lipschitz Given a TRCBF h for (1), the set of safe control inputs is
continuous. Notice that gd (x)d(t) accounts for either matched
Ktrcbf (x) = {u ∈ U : Lf h(x) + Lg h(x)u − κ(h(x))
or unmatched disturbances.
Lg h(x)d̄ ≥ −α(h(x))}, (7)
In observer-controller interconnections, the observer main- d
Authorized licensed use limited to: University of Oklahoma Libraries. Downloaded on October 12,2023 at 22:19:06 UTC from IEEE Xplore. Restrictions apply.
AGRAWAL AND PANAGOU: SAFE AND ROBUST OBSERVER-CONTROLLER SYNTHESIS USING CBFs 129
III. M AIN R ESULTS Proof: Consider the function H(t, x̂) = h(x̂) − γh Mδ (t). By
A. Approach 1 the Lipschitz continuity of h, and (9), H(t, x̂) ≥ 0 =⇒
h(x) ≥ 0. The total derivative of H is
Approach 1 relies on defining a set of state estimates,
Ŝ ⊂ X , such that if the estimate x̂ lies in Ŝ, the true state ∂H ∂H ˙
Ḣ = + x̂ = −γh Ṁδ + Lp h(x̂, y) + Lq h(x̂, y)u
x lies in the safe set S. The controller is designed to ensure ∂t ∂ x̂
x̂ ∈ Ŝ at all times. We consider Input-to-State Stable observers: therefore, for any π(t, x̂, y) ∈ Korcbf (t, x̂, y) we have Ḣ ≥
Definition 3 (Adapted From [12]): An observer (2) is an −α(H). Since H(0, x̂0 ) ≥ 0 (from the initial condition (12)),
Input-to-State Stable (ISS) Observer for system (1), if there H(t, x̂) ≥ 0, ∀t ∈ I, completing the proof.
exists a class KL function β continuously differentiable wrt Remark 1: Under the same assumptions as Theorem 1, if
to the second argument, and a class K function η such that U = Rm and a desired control input πdes : R≥0 × X → Rm
x(t) − x̂(t) ≤ β(x(0) − x̂(0), t) + η(w̄), ∀t ∈ I, (8) is provided, a QP-based safe estimate-feedback controller is
2
where w̄ = max(d̄, v̄). π(t, x̂, y) = argminu − πdes (t, x̂) , s.t.
u∈Rm
Various methods to design ISS observers for nonlinear
Lp h(x̂, y) + Lq h(x̂, y)u ≥ −α(h(x̂) − γh Mδ (t)) + γh Ṁδ (t) (15)
systems have been developed, and reader is referred to
[6], [12], [16], [17], [18] and references within for specific Remark 2: The constraint in (15) does not explicitly depend
techniques. on the disturbances d(t) and v(t), since the effect of these
The key property of an ISS observer is that the estimation disturbances is captured by the estimation error bound Mδ (t).
error is bounded with a known bound: for any δ > 0, there Furthermore, since γh Ṁδ (t) ≤ 0,5 the constraint (15) is easier
exists a continuously differentiable, non-increasing function to satisfy for higher convergence rates of the observer.
Mδ : R≥0 → R≥0 , such that Remark 3: For a linear class K function, α(r) = γα r, if
Ṁδ ≤ −γα Mδ (t), a sufficient condition for (15) is
x(0) − x̂(0) ≤ δ ⇒ x(t) − x̂(t) ≤ Mδ (t) ∀t ∈ I. (9)
Lp h(x̂, y) + Lq h(x̂, y)u ≥ −γα h(x̂).
Comparing (8) and (9), Mδ (t) = β(δ, t) + η(w̄). Define
Ŝ = {x̂ ∈ X : h(x̂) − γh Mδ (t) ≥ 0}, (10) which does not depend on the bound Mδ (t) or Lipschitz con-
stant γh . In other words, if the observer converges faster than
the set of safe state-estimates, and we obtain the property the rate at which the boundary of the safe set is approached,
x̂(t) ∈ Ŝ =⇒ x(t) ∈ S by the Lipschitz continuity of h.2 i.e., if Ṁδ ≤ −γα Mδ , then a safe control input can be obtained
Then the conditions to guarantee safety are as follows: without explicit knowledge of Mδ or γh . This matches the gen-
Definition 4: A continuously differentiable function eral principle that for good performance observers should be
h : X → R is an Observer-Robust CBF for system (1) with converge faster than controllers.
an ISS observer (2a) of known estimation error bound (9), if
there exists an extended class K function α s.t.3 B. Approach 2
sup Lp h(x̂, y) + Lq h(x̂, y)u ≥ −α(h(x̂) − γh Mδ (0)) (11) While in Approach 1 we used the stability guarantees of ISS
u∈U observers to obtain safe controllers, in Approach 2 we consider
for all x̂ ∈ S, and all y ∈ Y(x̂) = {y : y = c(x) + cd (x)v(t) | observers that only guarantee boundedness of the estimation
x − x̂ ≤ Mδ (0), v ≤ v̄}, an overapproximation of the set error. First, we define Bounded-Error Observers:
of possible outputs.4 Definition 5: An observer (2a) is a Bounded-Error (BE)
Theorem 1: For system (1), suppose the observer (2a) is Observer, if there exists a bounded set D(x̂0 ) ⊂ X and a
ISS with estimation error bound (9). Suppose S is defined by (potentially) time-varying bounded set P(t, x̂) ⊂ X s.t.
an Observer-Robust CBF h:X → R associated with extended
x0 ∈ D(x̂0 ) =⇒ x(t) ∈ P(t, x̂) ∀t ∈ I. (16)
class K function α. If the initial conditions satisfy
Figure 1 depicts the sets D and P. Note, ISS observers
x̂(0) ∈ X̂0 = {x̂ ∈ S : h(x̂) ≥ γh Mδ (0)}, (12)
are a subset of BE observers, using the definitions D(x̂0 ) =
x(0) ∈ X0 = {x ∈ S : x(0) − x̂(0) ≤ δ}, (13) {x : x − x̂0 ≤ δ} and P(t, x̂) = {x : x − x̂(t) ≤ Mδ (t)}. BE
then any Lipschitz continuous estimate-feedback controller observers are more general than ISS observers in the following
u = π(t, x̂, y) ∈ Korcbf (t, x̂, y) where ways: (A) The sets D and P do not have to be norm-balls. For
example, they could be zonotopes [19], intervals [20], or sub-
Korcbf (t, x̂, y) = {u ∈ U : Lp h(x̂, y) + Lq h(x̂, y)u ≥ level sets of sum-of-squares polynomials [21]. (B) The shape
− α h(x̂) − γh Mδ (t) + γh Ṁδ (t)} (14) and size of P is allowed to change over time.
The idea is to find a common, safe input for all x ∈ P(t, x̂):
renders the system safe from the initial-condition sets X0 , X̂0 . Theorem 2: For system (1), suppose the observer (2a)
2 By Lipschitz continuity, |h(x)−h(x̂)| ≤ γ x− x̂ =⇒ h(x̂)−γ x− x̂ ≤ is a Bounded-Error observer. Suppose the safe set S is
h h
h(x). Therefore, if x̂ ∈ Ŝ, then 0 ≤ h(x̂) − γh Mδ (t) ≤ h(x̂) − γh x − x̂ ≤ h(x), defined by a continuously differentiable function h : X →
i.e., x ∈ S. Thus, x̂ ∈ Ŝ =⇒ x ∈ S. R, where h is a Tunable Robust-CBF for the system.
3 Recall the notation L h(x̂, y) = ∂h (x̂)p(x̂, y).
p ∂x
4 Y is defined using M (0) instead of δ since Y(x̂(t)) must contain the set 5 Since M (t) = β(δ, t) + η(w̄), and β is a class KL function, Ṁ (t) =
δ δ δ
of possible outputs at time t for all t ∈ I. ∂β/∂t < 0. Finally since γh ∈ R≥0 is a Lipschitz constant, γh Ṁδ (t) ≤ 0.
Authorized licensed use limited to: University of Oklahoma Libraries. Downloaded on October 12,2023 at 22:19:06 UTC from IEEE Xplore. Restrictions apply.
130 IEEE CONTROL SYSTEMS LETTERS, VOL. 7, 2023
Authorized licensed use limited to: University of Oklahoma Libraries. Downloaded on October 12,2023 at 22:19:06 UTC from IEEE Xplore. Restrictions apply.
AGRAWAL AND PANAGOU: SAFE AND ROBUST OBSERVER-CONTROLLER SYNTHESIS USING CBFs 131
Fig. 2. Simulation results for the Double Integrator (20), using (a) the
baseline CBF controller, (b) Approach 1 and (c) Approach 2. The same
initial conditions and observer is used for each simulation.
and the safe set is defined as S = {x : x1 ≤ xmax }. We Fig. 3. Simulation Results for the Planar Quadrotor. The objective is
to fly the quadrotor from the starting state to the target position while
use the CBF h(x) = −x2 + α0 (xmax − x1 ). A Luenberger- avoiding the circular obstacle region. The blue lines indicate the path
observer, x̂˙ = Ax̂ + Bu + L(y − Cx̂), is used, where L = of the state estimate and grey lines the projection of P(t, x̂) on the x-y
1/2P−1 CT and P ∈ S2++ is the solution the Lyapunov equa- plane. The icons show the quadrotor’s true position every 0.2 s and is
colored red while violating safety. (a) uses the baseline CBF controller,
tion PA + AT P − CT C = −2θ P for design parameter θ > 0. and (b) uses Approach 2.
This observer √ is ISS, since for any δ > 0, (9) is satisfied
with Mδ (t) = λmax (P)/λmin (P)δe−θt . This observer is also The safety condition is to avoid collision with a circular
a Bounded Error observer since for any δ > 0, (16) is sat- obstacle at [x1∗ , x2∗ ]T of radius r, i.e., S = {x : (x1 − x1∗ )2 +
isfied with D(x̂0 ) = {x : x0 − x̂0 ≤ δ} and P(t, x̂) = (x2 − x2∗ )2 − r2 ≥ 0}. The CBF proposed in [24] is used.
{x : (x − x̂)T P(x − x̂) ≤ λmax (P)δ 2 e−2θt }. The desired control input is a LQR controller linearized about
We compare the methods proposed in this letter to the the hover state. The observer is a DEKF adapted from [25]9 :
CBF-QP of [1] (referred to as the Baseline-QP), using x̂ in Defining constant matrices D1 = gd (x) and D2 = cd (x), the
lieu of x. Plots of the resulting trajectory are depicted in observer is
Figure 4, demonstrating safety violation. The trajectory plots ⎧
under the controllers based on Approaches 1 and 2 are shown ⎨ x̂˙ = f (x̂) + g(x̂)u + PCT R−1 (y − c(x̂))
Ṗ = PAT + AP √
− PC T −1 CP + Q + 2θ P
in Figure 2, demonstrating that safety is maintained in both ⎩ RT −1/2
V̇ = −2θ V + 2 V D1 P d̄ + (LD2 )T P−1/2 v̄
cases. In Approach 2, the function Lf h(x) is affine in x and
Lg h(x) = −1 is independent of x, and therefore the func- where θ ≥ 0 is a design parameter, A = ∂∂x̂ (f (x̂) + g(x̂)u),
tion a(t, x̂) was determined using a box bound around P(t, x̂) ∂c
C = ∂x (x̂). In the standard form of EKFs [26, Sec. 5.3], the
and b− +
i (t, x̂) = bi (t, x̂) = −1. Numerically, we have noticed disturbances are assumed to be Weiner processes and Q, R
that for some initial conditions and convergence rates, the con-
represent the covariances of the d(t) and v(t). However in
troller of Approach 1 is less conservative than the controller of
the Deterministic EKF, we assume d(t), v(t) are bounded, and
Approach 2, and in other cases the converse is true. Identifying ny
thus Q ∈ Sn++ , R ∈ S++ can be freely chosen. Assuming
conditions that determine whether Approach 1 or 2 is less
there exist positive constants p1 , p2 such that p1 I ≤ P(t) ≤
conservative remains an open question.
p2 I ∀t ∈ I, (see [7, Sec. 11.2]), this observer is a Bounded-
2) Simulation (Planar Quadrotor): Consider
⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ Error observer, and satisfies (16) with D(x̂0 ) = P(0, x̂0 ), and
ẋ1 x4 0 0 0 P(t, x̂) = {x:(x − x̂)T P(t)−1 (x − x̂) ≤ V(t)}.
⎢ẋ2 ⎥ ⎢ x5 ⎥ ⎢ 0 0 ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ 0 ⎥ The method in Approach 2 is used to synthesize the
⎢ẋ3 ⎥ ⎢ x6 ⎥ ⎢ 0 ⎥
0 ⎥ u1 ⎢ 0 ⎥ interconnected observer-controller. Specifically, the functions
⎢ ⎥ = ⎢ ⎥+⎢ +⎢ ⎥
⎢ẋ4 ⎥ ⎢ 0 ⎥ ⎢ sin x3 /m ⎥ ⎢ ⎥ a, b− +
⎢ ⎥ ⎢ ⎥ ⎢ 0 ⎥ u2 ⎢d1 (t)⎥ i , and bi were determined using Lipschitz bounds, and
⎣ẋ5 ⎦ ⎣−g⎦ ⎣cos x3 /m 0 ⎦ ⎣d2 (t)⎦ the QP (18) is used to determine the control input.
ẋ6 0 0 J −1 0 Figure 3 compares the trajectory of the planar quadrotor
T T using the controller proposed in [24] (baseline case) to the
y = x1 , x2 , x3 + v1 (t), v2 (t), v3 (t)
proposed controller of Approach 2. In the baseline case, since
where [x1 , x2 ]T are the position coordinates of the quadro- the state estimate is used in lieu of the true state, safety is
tor with respect to an inertial coordinate frame, x3 is the violated. By accounting for the state estimation uncertainty,
pitch angle, [x4 , x5 ]T are the linear velocities in the inertial the proposed controller avoids the obstacle.
frame, and x6 is the rate of change of pitch. The quadrotor 3) Experiments (3D Quadrotor): For our experiments, we
has mass m = 1.0 kg and moment of inertial J = 0.25 kg/m2 , use the Crazyflie 2.0 quadrotor, using the on-board IMU
and the acceleration due to the gravity is g = 9.81 m/s2 . The and barometer sensors and an external Vicon motion cap-
control inputs are thrust u1 and torque u2 . The disturbances ture system. The objective was to fly in a figure of eight
d : R≥0 → R2 captures the effect of unmodeled aerody-
9 In [25], only the undisturbed case is demonstrated. The extension to
namic forces on the system, bounded by d ≤ 2 m/s2 . The
include bounded disturbances can be derived using the same techniques as in
measurement disturbance is v : R≥0 → R3 , bounded by 5 cm the original paper. The additional terms due to the disturbances are bounded
for position measurements, and 5◦ for pitch measurements. using [7, eq. (B4)].
Authorized licensed use limited to: University of Oklahoma Libraries. Downloaded on October 12,2023 at 22:19:06 UTC from IEEE Xplore. Restrictions apply.
132 IEEE CONTROL SYSTEMS LETTERS, VOL. 7, 2023
Authorized licensed use limited to: University of Oklahoma Libraries. Downloaded on October 12,2023 at 22:19:06 UTC from IEEE Xplore. Restrictions apply.