control barriers in bayesian learning of system dynamics

16
1 Control Barriers in Bayesian Learning of System Dynamics Vikas Dhiman , Mohammad Javad Khojasteh , Member, IEEE, Massimo Franceschetti, Fellow, IEEE, and Nikolay Atanasov, Member, IEEE Abstract—This paper focuses on learning a model of system dynamics online while satisfying safety constraints. Our objec- tive is to avoid offline system identification or hand-specified models and allow a system to safely and autonomously estimate and adapt its own model during operation. Given streaming observations of the system state, we use Bayesian learning to obtain a distribution over the system dynamics. Specifically, we propose a new matrix variate Gaussian process (MVGP) regression approach with an efficient covariance factorization to learn the drift and input gain terms of a nonlinear control- affine system. The MVGP distribution is then used to optimize the system behavior and ensure safety with high probability, by specifying control Lyapunov function (CLF) and control barrier function (CBF) chance constraints. We show that a safe control policy can be synthesized for systems with arbitrary relative degree and probabilistic CLF-CBF constraints by solving a second order cone program (SOCP). Finally, we extend our design to a self-triggering formulation, adaptively determining the time at which a new control input needs to be applied in order to guarantee safety. Index Terms—Gaussian Process, learning for dynamics and control, high relative-degree system safety, control barrier func- tion, self-triggered safe control SUPPLEMENTARY MATERIAL Software and videos supplementing this paper are available at: https://vikasdhiman.info/Bayesian_CBF I. I NTRODUCTION Unmanned vehicles and other cyber-physical systems [2], [3] promise to transform many aspects of our lives, including transportation, agriculture, mining, and construction. Success- ful use of autonomous systems in these areas critically depends on safe adaptation in changing operational conditions. Existing systems, however, rely on brittle hand-designed dynamics models and safety rules that often fail to account for both the complexity and uncertainty of real-world operation. Recent work [4]–[19] has demonstrated that learning-based system identification and control techniques may be successful at complex tasks and control objectives. However, two crit- ical considerations for applying these techniques onboard autonomous systems remain less explored: learning online, The first two authors contributed equally. The material in this paper was presented in part at the 2020 Learning for Dynamics and Control Conference (L4DC) [1]. We gratefully acknowledge support from ARL DCIST CRA W911NF-17-2-0181 and NSF awards CNS- 1446891, ECCS-1917177, and IIS-2007141. V. Dhiman is with Department of Electrical and Computer Engineering, University of Maine, Bangor, ME 04469. (e-mail: [email protected]) M. J. Khojasteh is with Laboratory for Information and Decision Systems, Massachusetts Institute of Technology, Cambridge, MA 02139. (e-mail: [email protected]) M. Franceschetti, and N. Atanasov are with Department of Electrical and Computer Engineering, University of California San Diego, La Jolla, CA 92093. (e-mails: {mfranceschetti,natanasov}@ucsd.edu) relying on streaming data, and guaranteeing safe operation, despite the estimation errors inherent to learning algorithms. For example, consider steering a Ackermann-drive vehicle, whose dynamics are not perfectly known, safely to a goal location. Not only does the Ackermann vehicle need to learn a distribution over its dynamics from state and control obser- vations but also account for the variance of the dynamics to guarantee safety while executing its actions. Several approaches have been proposed in the literature to guaratee safety of dynamical systems. Motivated by the utility of Lyapunov functions for certifying stability properties, [20]–[29] proposed control barrier functions (CBFs) as a tool to enforce safety properties in dynamical systems. A CBF certifies whether a control policy achieves forward invariance of a safe set C by evaluating if the system trajectory remains away from the boundary of C . A lot of the literature on CBFs considers systems with known dynamics, low relative degree, no disturbances, and time-triggered control, in which inputs are recalculated at a fixed and sufficiently small period. Time- triggered control is limiting because low frequency may lead to safety violations in-between sampling times, while high frequency leads to inefficient use of computational resources and actuators. Yang et al. [30] extend the CBF framework, for known dynamics, to a event-triggered setup [31]–[34] in which the longest time until a control input needs to be recomputed to guarantee safety is provided. CBF techniques can handle nonlinear control-affine systems but many existing results apply only to relative-degree-one systems, in which the first time derivative of the CBF depends on the control input. This requirement is violated by many underactuated robot systems and motivates extensions to relative-degree-two systems, such as bipedal and car-like robots. The works [35]– [38] generalized these ideas, in the case of known dynamics, by designing exponential control barrier function (ECBF) and high order control barrier function (HOCBF), that can handle control-affine systems with any relative degree. Our work proposes a Bayesian learning approach for esti- mating the posterior distribution of the control-affine system dynamics from online data. We generalize the CBF control synthesis techniques to handle probabilistic safety constraints induced by the dynamics distribution. Our work makes the following contributions. First, we develop a Matrix Variate Gaussian Process (MVGP) regression to estimate the un- known system dynamics and formulate probabilistic safety and stability constraints for systems with arbitrary relative degree. Second, we show that a control policy satisfying the proposed probabilistic constraints can be obtained as the solution of a deterministic second order cone program (SOCP). The SOCP formulation depends on the mean and variance of the probabilistic safety and stability constraints, which can be obtained efficiently. Third, we extend our results to

Upload: others

Post on 03-May-2022

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Control Barriers in Bayesian Learning of System Dynamics

1

Control Barriers in Bayesian Learning of System DynamicsVikas Dhiman∗, Mohammad Javad Khojasteh∗, Member, IEEE, Massimo Franceschetti, Fellow, IEEE,

and Nikolay Atanasov, Member, IEEE

Abstract—This paper focuses on learning a model of systemdynamics online while satisfying safety constraints. Our objec-tive is to avoid offline system identification or hand-specifiedmodels and allow a system to safely and autonomously estimateand adapt its own model during operation. Given streamingobservations of the system state, we use Bayesian learning toobtain a distribution over the system dynamics. Specifically,we propose a new matrix variate Gaussian process (MVGP)regression approach with an efficient covariance factorizationto learn the drift and input gain terms of a nonlinear control-affine system. The MVGP distribution is then used to optimizethe system behavior and ensure safety with high probability,by specifying control Lyapunov function (CLF) and controlbarrier function (CBF) chance constraints. We show that a safecontrol policy can be synthesized for systems with arbitraryrelative degree and probabilistic CLF-CBF constraints by solvinga second order cone program (SOCP). Finally, we extend ourdesign to a self-triggering formulation, adaptively determiningthe time at which a new control input needs to be applied inorder to guarantee safety.

Index Terms—Gaussian Process, learning for dynamics andcontrol, high relative-degree system safety, control barrier func-tion, self-triggered safe control

SUPPLEMENTARY MATERIAL

Software and videos supplementing this paper are availableat: https://vikasdhiman.info/Bayesian_CBF

I. INTRODUCTION

Unmanned vehicles and other cyber-physical systems [2],[3] promise to transform many aspects of our lives, includingtransportation, agriculture, mining, and construction. Success-ful use of autonomous systems in these areas critically dependson safe adaptation in changing operational conditions. Existingsystems, however, rely on brittle hand-designed dynamicsmodels and safety rules that often fail to account for both thecomplexity and uncertainty of real-world operation. Recentwork [4]–[19] has demonstrated that learning-based systemidentification and control techniques may be successful atcomplex tasks and control objectives. However, two crit-ical considerations for applying these techniques onboardautonomous systems remain less explored: learning online,

∗ The first two authors contributed equally.The material in this paper was presented in part at the 2020 Learning for

Dynamics and Control Conference (L4DC) [1]. We gratefully acknowledgesupport from ARL DCIST CRA W911NF-17-2-0181 and NSF awards CNS-1446891, ECCS-1917177, and IIS-2007141.

V. Dhiman is with Department of Electrical and ComputerEngineering, University of Maine, Bangor, ME 04469. (e-mail:[email protected])

M. J. Khojasteh is with Laboratory for Information and Decision Systems,Massachusetts Institute of Technology, Cambridge, MA 02139. (e-mail:[email protected])

M. Franceschetti, and N. Atanasov are with Department of Electrical andComputer Engineering, University of California San Diego, La Jolla, CA92093. (e-mails: {mfranceschetti,natanasov}@ucsd.edu)

relying on streaming data, and guaranteeing safe operation,despite the estimation errors inherent to learning algorithms.For example, consider steering a Ackermann-drive vehicle,whose dynamics are not perfectly known, safely to a goallocation. Not only does the Ackermann vehicle need to learna distribution over its dynamics from state and control obser-vations but also account for the variance of the dynamics toguarantee safety while executing its actions.

Several approaches have been proposed in the literatureto guaratee safety of dynamical systems. Motivated by theutility of Lyapunov functions for certifying stability properties,[20]–[29] proposed control barrier functions (CBFs) as a toolto enforce safety properties in dynamical systems. A CBFcertifies whether a control policy achieves forward invarianceof a safe set C by evaluating if the system trajectory remainsaway from the boundary of C. A lot of the literature on CBFsconsiders systems with known dynamics, low relative degree,no disturbances, and time-triggered control, in which inputsare recalculated at a fixed and sufficiently small period. Time-triggered control is limiting because low frequency may leadto safety violations in-between sampling times, while highfrequency leads to inefficient use of computational resourcesand actuators. Yang et al. [30] extend the CBF framework,for known dynamics, to a event-triggered setup [31]–[34] inwhich the longest time until a control input needs to berecomputed to guarantee safety is provided. CBF techniquescan handle nonlinear control-affine systems but many existingresults apply only to relative-degree-one systems, in whichthe first time derivative of the CBF depends on the controlinput. This requirement is violated by many underactuatedrobot systems and motivates extensions to relative-degree-twosystems, such as bipedal and car-like robots. The works [35]–[38] generalized these ideas, in the case of known dynamics,by designing exponential control barrier function (ECBF) andhigh order control barrier function (HOCBF), that can handlecontrol-affine systems with any relative degree.

Our work proposes a Bayesian learning approach for esti-mating the posterior distribution of the control-affine systemdynamics from online data. We generalize the CBF controlsynthesis techniques to handle probabilistic safety constraintsinduced by the dynamics distribution. Our work makes thefollowing contributions. First, we develop a Matrix VariateGaussian Process (MVGP) regression to estimate the un-known system dynamics and formulate probabilistic safetyand stability constraints for systems with arbitrary relativedegree. Second, we show that a control policy satisfyingthe proposed probabilistic constraints can be obtained as thesolution of a deterministic second order cone program (SOCP).The SOCP formulation depends on the mean and varianceof the probabilistic safety and stability constraints, whichcan be obtained efficiently. Third, we extend our results to

Page 2: Control Barriers in Bayesian Learning of System Dynamics

2

a self-triggered safe control setting, adaptively determiningthe duration of each control input before re-computation isnecessary to guarantee safety with high probability. Finally, wederive closed-form expressions for the mean and variance ofthe probabilistic safety and stability constraints, up to relative-degree two. This work extends our conference paper [1] byintroducing a SOCP control-synthesis formulation instead ofthe original, possibly non-convex, quadratic program (QP)problem. This paper also extends the self-triggered controldesign to systems with relative degree above one, containsa complete technical treatment of the result—including theproofs of that were omitted in the conference version, andpresents new evaluation results.

II. RELATED WORK

Providing safety guarantees for learning-based control tech-niques has received significant attention recently [39]–[46].In particular, optimization-based control synthesis with CLFand CBF constraints has been considered for systems subjectto additive stochastic disturbances [47]–[49]. Aloysius Pereiraet al. [49] combine CBF constraints and forward-backwardstochastic differential equations, to find a deep parameterizedsafe optimal control policy in the presence of additive Brow-nian motion in the system dynamics. Yaghoubi et al. [50]provide a stochastic CBF framework for composite systemswhere a component of the system evolve according to a knowndeterministic dynamics and the other one follows a stochasticdynamics based on the Weiner process. CBF conditions forsystems with uncertain dynamics have been proposed in [51]–[58]. Fan et al. [51] study time-triggered CBF-based controlsynthesis for control-affine systems with relative degree one,where the input gain is known and invertible but the driftterm is learned via Bayesian techniques. The authors com-pare the performance of Gaussian process (GP) regression[59], dropout neural networks [60], and ALPaCA [61] inconstructing adaptive CLF and CBF conditions using boundson the error with respect to a system reference model. Theworks in [52], [53], [55], [56] study time-triggered CBF-based control of relative-degree-one systems with additiveuncertainties in the drift part of the dynamics. Wang et al.[52] use GP regression to approximate the unknown part of the3D nonlinear dynamics of a quadrotor robot. Cheng et al. [53]propose a two-layers control policy design that integrates CBF-based control with model-free reinforcement learning (RL).Safety is ensured by bounding the worst-case deviation ofthe dynamics estimate from the mean, using high-confidencepolytopic uncertainty bounds. Marvi and Kiumarsi [54] alsoconsider safe model-free reinforcement learning but, instead ofa two-layer policy design, the cost-to-go function is augmentedwith a CBF term. The works [55], [56] use adaptive CBFs todeal with parameter uncertainty. Salehi et al. [57] use ExtremeLearning Machines to approximate the dynamics of a closed-loop nonlinear system (with a drift term only) subject to abarrier certificate constraint during the learning process itself.

Our work builds upon the current literature by developing amatrix variate GP regression with efficient covariance factor-ization to learn both the drift term and the input gain terms ofa nonlinear control-affine system. The posterior distributionis used to ensure safety for systems with arbitrary relative

degree. Compared to previous works, our safety constraintsare less conservative (probabilistic instead of worst-case) andlead to a novel SOCP formulation. We also present results fora self-triggering design with unknown system dynamics.

Research directions left open for future investigation includethe extension of the results to a frequentist setting [62]. Fol-lowing [63], where the unknown but deterministic dynamicsare assumed to belong to the Reproducing Kernel HilbertSpace (RKHS), our CBF-based self-triggered controller maybe redesigned in a frequentist framework. In fact, a time-triggered setup that utlizes independent GP regression foreach coordinate has been recently developed in [64], wherea systematic approach is utilized to compute CBFs for thelearned model.

III. PROBLEM STATEMENT

Consider a control-affine nonlinear system:

x = f(x) + g(x)u =[f(x) g(x)

] [1u

], F (x)u, (1)

where x(t) ∈ X ⊂ Rn and u(t) ∈ U ⊂ Rm are the systemstate and control input, respectively, at time t. Assume thatthe drift term f : Rn → Rn and the input gain g : Rn →Rn×m are locally Lipschitz and the admissible control set Uis convex. We study the problem of enforcing stability andsafety properties for (1) when f and g are unknown and needto be estimated online, using observations of x, u, x.

A. NotationWe use bold lower-case letters for vectors (x), bold capital

letters for matrices (X), and caligraphic capital letters for sets(X ). The boundary of a set X is denoted by ∂X . Let vec(X) ∈Rnm be the vectorization of X ∈ Rn×m, obtained by stackingthe columns of X. The Kronecker product is denoted by ⊗.The Hessian and Jacobian of functions h : Rn×Rm → R andf : Rn → Rn, respectively, are defined as:

Hx,yh(x,y) ,

∂2h

∂x1∂y1. . . ∂2h

∂x1∂ym

......

∂2h∂xn∂y1

. . . ∂2h∂xn∂ym

Jxf(x) ,

∂f1∂x1

. . . ∂f1∂xn

......

∂fn∂x1

. . . ∂fn∂xn

.

The Lie derivative of V : Rn → R along f : Rn → Rn isdenoted by LfV : Rn → R. The space of r times continuouslydifferentiable functions h : X → R is denoted by Cr(X ,R).

B. Stability and Safety with Known DynamicsWe first review key results [25] on control Lyapunov

functions for enforcing stability and control barrier functionsfor enforcing safety of control-affine systems with knowndynamics. System stability may be asserted as follows.

Definition 1. A function V ∈ C1(X ,R) is a control Lyapunovfunction (CLF) for the system in (1) if it is positive definite,V (x) > 0, ∀x ∈ X \ {0}, V (0) = 0, and satisfies:

infu∈U

CLC(x,u) ≤ 0, ∀x ∈ X , (2)

where CLC(x,u) , LfV (x) + LgV (x)u + γ(V (x)) is acontrol Lyapunov condition (CLC) defined for some class Kfunction γ.

Page 3: Control Barriers in Bayesian Learning of System Dynamics

3

Proposition 1 (Sufficient Condition for Stability [25]). Ifthere exists a CLF V (x) for system (1), then any Lipschitzcontinuous control policy π(x) ∈ {u ∈ U | CLC(x,u) ≤ 0}asymptotically stabilizes the system.

Let C , {x ∈ X | h(x) ≥ 0} be a safe set of system states,defined implicitly by a function h ∈ C1(X ,R). System (1) issafe with respect to C if C is forward invariant, i.e., for anyx(0) ∈ C, x(t) remains in C for all t ≥ 0. System safety maybe asserted as follows.

Definition 2. A function h ∈ C1(X ,R) is a control barrierfunction (CBF) for the system in (1) if

supu∈U

CBC(x,u) ≥ 0, ∀x ∈ X , (3)

where CBC(x,u) , Lfh(x)+Lgh(x)u+α(h(x)) is a controlbarrier condition (CBC) defined for some extended class K∞function α.

Proposition 2 (Sufficient Condition for Safety [25]). Considera set C defined implicitly by h ∈ C1(X ,R). If h is a CBF and∇h(x) = 0 for all x when h(x) = 0, then any Lipschitzcontinuous control policy π(x) ∈ {u ∈ U | CBC(x,u) ≥ 0}renders the system in (1) safe with respect to C.

Prop. 1 and Prop. 2 provide sufficient conditions for acontrol policy π(x) applied to the system in (1) to guaranteestability and safety. Note that the conditions are defined byaffine constraints in u. This allows the formulation of controlsynthesis as a quadratic program (QP) in which stability andsafety properties are captured by the linear CLC and CBCconstraints, respectively:

π(x) ∈ argminu∈U,δ∈R

∥R(x)u∥2 + λδ2

s.t. CLC(x,u) ≤ δ, CBC(x,u) ≥ 0,(4)

where R(x) ∈ Rm×m is a matrix penalizing control effortand δ is a slack variable that ensures feasibility of the QPby giving preference to safety over stability, controlled bythe scaling factor λ > 0. If a stabilizing control policy π(x)is already available, it may be modified minimally online toensure safety:

π(x) ∈ argminu∈U

∥R(x) (u− π(x)) ∥2

s.t. CBC(x,u) ≥ 0.(5)

In practice, the QPs above cannot be solved infinitelyfast. Optimization is typically performed at triggering timestk, tk+1, . . ., providing control input uk , π(xk) when thesystem state is xk , x(tk). Ames et al. [21, Thm. 3] showthat if f , g, and α ◦ h are locally Lipschitz, then π(x)and CBC(x, π(x)) are locally Lipschitz. Thus, for sufficientlysmall inter-triggering times τk , tk+1 − tk, solving (5) at{tk}k∈N ensures safety during the inter-triggering intervals[tk, tk+1) as well.

C. Stability and Safety with Unknown Dynamics

This work considers stability and safety for the control-affine nonlinear system in (1) when the system dynamics

F (x) ∈ Rn×(1+m) are unknown. We place a prior distri-bution over vec(F (x)) using a GP [59] with mean functionvec(M0(x)) and covariance function K0(x,x

′).Our objective is to compute the posterior distribution of

vec(F (x)) using observations of the system states and controlsover time and ensure stability and safety using the estimateddynamics model despite possible estimation errors.

Problem 1. Given a prior distribution on the unknown systemdynamics, vec(F (x)) ∼ GP (vec(M0(x)),K0(x,x

′)), anda training set, X1:k , [x(t1), . . . ,x(tk)], U1:k , [u(t1),. . . ,u(tk)], X1:k = [x(t1), . . . , x(tk)]

1, compute the poste-rior distribution GP (vec(Mk(x)),Kk(x,x

′)) of vec(F (x))conditioned on (X1:k,U1:k, X1:k).

Problem 2. Given a safe set C , {x ∈ X | h(x) ≥ 0}, initialstate xk , x(tk) ∈ C, and the distribution GP(vec(Mk(x)),Kk(x,x

′)) of vec(F (x)) at time tk, choose a control inputuk and triggering period τk such that for u(t) , uk:

P(CBC(x(t),uk) ≥ 0) ≥ pk for all t ∈ [tk, tk + τk), (6)

where x(t) follows the dynamics in (1), and pk ∈ (0, 1) is auser-specified risk tolerance.

IV. MATRIX VARIATE GAUSSIAN PROCESS REGRESSIONOF SYSTEM DYNAMICS

This section presents our novel Matrix Variate GaussianProcess (MVGP) solution to Problem 1. We aim to estimate theunknown drift f and input gain g of system (1) using a state-control dataset (X1:k,U1:k, X1:k). To simplify the derivation,we assume that X1:k and U1:k are observed without noise, butteach measurement x(tk) in X1:k is corrupted by zero-meanGaussian noise N (0,S) that is independent across time steps.Treating f(x)+g(x)u as a single vector-valued function withinput [x⊤,u⊤]⊤ may seem natural from a function approxima-tion perspective, but this approach ignores the control-affinestructure. Encoding this structure in the learning process notonly increases the learning efficiency, but also ensures that thecontrol Lyapunov and control barrier conditions remain linearin u. Hence, we focus on learning the matrix-valued functionF (x) = [f(x) g(x)] defined in (1).

The simplest approach is to use n(1+m) decoupled GPs foreach element of F (x). This approach ignores the dependenciesamong the components of f(x) and g(x). Furthermore, sincethe outputs of f(x) and g(x) are observed together via X1:k,training data dimensions are still mutually correlated andcannot be treated as decoupled GPs denying the efficiencyadvantage. At the other extreme, treating vec(F (x)) as a singlevector-valued function and using a single GP distribution willenable high estimation accuracy but specifying an effectivematrix-valued kernel function K0(x,x

′) and optimizing itshyperparameters is challenging. A promising approach isoffered by the Coregionalization GP (CoGP) model [65],where the kernel function is decomposed as K0(x,x

′) ,Σκ0(x,x

′) into a scalar kernel κ0(x,x′) and a covariance

matrix parameter Σ ∈ Rn(1+m)×(1+m)n. Estimating Σ may

1If not available, the derivatives may be approximated via finite differences,e.g., X1:k ,

[x(t2)−x(t1)t2−t1

, . . . ,x(tk+1)−x(tk)

tk+1−tk

], provided that the inter-

triggering times {τk = tk − tk−1}k are sufficiently small.

Page 4: Control Barriers in Bayesian Learning of System Dynamics

4

still require a lot of training data. Moreover, the matrix-times-scalar-kernel structure is not preserved in the posterior ofthe Coregionalization model, preventing its effective use forincremental learning when new data is received over time.

We propose an alternative factorization of K0(x,x′) in-

spired by the Matrix Variate Gaussian distribution [66], [67].The strengths of our factorization are that it models thecorrelation among the elements of F (x), preserves its structurein the posterior GP distribution, and has similar training andtesting complexity as the decoupled GP approach.

Definition 3. The Matrix Variate Gaussian (MVG) distributionis a three-parameter distribution MN (M,A,B) describing arandom matrix X ∈ Rn×m with probability density function:

p(X;M,A,B) ,exp

(− 1

2 tr[B−1(X−M)⊤A−1(X−M)

])(2π)nm/2 det(A)m/2 det(B)n/2

where M ∈ Rn×m is the mean. Up to a scaling factor, eachcolumn of X has the same covariance A ∈ Rn×n, and eachrow has the same covariance B ∈ Rm×m.

Additional properties of the MVG distribution are providedin Appendix A. Note that if X ∼ MN (M,A,B), thenvec(X) ∼ N (vec(M),B ⊗ A). Based on this observation,we propose the following decomposition of the GP prior:

vec(F (x)) ∼ GP(vec(M0(x)),B0(x,x′)⊗A), (7)

where B0(x,x′) ∈ R(m+1)×(m+1) and A ∈ Rn×n. We call

such a process F (x) with kernel structure defined in (7) aMatrix Variate Gaussian Process (MVGP).

We assume that the measurement noise covariance matrixsatisfies S = σ2A for some parameter σ > 0. This assump-tion on the relationship between S and the dynamics rowcovariance A is necessary to preserve the Kronecker productstructure of the covariance in the GP posterior.

To simplify notation, let B1:k1:k ∈ Rk(m+1)×k(m+1) be a

matrix with k×k block elements[B1:k

1:k

]i,j

, B0(xi,xj) and

define M1:k ,[M0(x1) · · · M0(xk)

]∈ Rn×k(m+1),

B1:k(x) , [B0(x,x1), . . . ,B0(x,xk)] ∈ R(m+1)×k(m+1) andU1:k , diag(u1, . . . ,uk) ∈ Rk(m+1)×k. Consider an arbitrarytest point x∗. The train and test data are jointly Gaussian:[

vec(X1:k)vec(F (x∗))

]∼ N

([vec(M1:kU1:k)vec(M0(x∗))

],[

U⊤1:kB

1:k1:kU1:k + σ2Ik U⊤

1:kB⊤1:k(x∗)

B1:k(x∗)U1:k B0(x∗,x∗)

]⊗A

), (8)

where

U⊤1:kB

1:k1:kU1:k =

u⊤1 B0(x1,x1)u1 · · · u⊤

1 B0(x1,xk)uk...

. . ....

u⊤k B0(xk,x1)u1 · · · u⊤

k B0(xk,xk)uk

B1:k(x∗)U1:k =

[B0(x1,x∗)u1 · · · B0(xk,x∗)uk

].

(9)

Applying a Schur complement to (8), we find the dis-tribution of vec(F (x∗)) conditioned on the training data(X1:k,U1:k, X1:k). The posterior mean and covariance func-tions are provided in the next proposition.

Proposition 3. The posterior distribution of vec(F (x)) condi-tioned on the training data (X1:k,U1:k, X1:k) is a Gaussianprocess GP(vec(Mk(x)),Bk(x,x

′)⊗A) with parameters:

Mk(x) , M0(x) +(X1:k −M1:kU1:k

)(U1:kB1:k(x))

Bk(x,x′) , B0(x,x

′)−B1:k(x)U1:k (U1:kB1:k(x′))

(U1:kB1:k(x))† ,

(U⊤

1:kB1:k1:kU1:k + σ2Ik

)−1

U⊤1:kB

⊤1:k(x).

(10)

Proof. See Appendix B.

Prop. 3 shows that, for a given control input u, the MVGPposterior of F (x)u is (applying Lemma 8):

F (x)u ∼ GP(Mk(x)u,u⊤Bk(x,x

′)u⊗A). (11)

A key property of the MVGP model in Prop. 3 is thatthe posterior preserves the kernel decomposition. In the spe-cial case of, B0(x,x

′) , Bκ0(x,x′), in addition to the

kernel parameters, our model requires learning of B ∈R(1+m)×(1+m) and, if the measurement noise statistics areunknown, A ∈ Rn×n and σ ∈ R. Thus, the MVGP modelhas fewer parameters than a CoGP model, which requires(1 +m)2n2 parameters for the full covariance decompositionK0(x,x

′) , Σκ0(x,x′). For a data set with k examples, the

training computational complexity of our MVGP approach isO(k3), while the same for the CoGP model is O(k3n3). Thisis because our model inverts only a (k × k) matrix while theCoGP model inverts a (kn × kn) matrix (see Appendix C).Fig. 1 shows a comparison of the covariances obtained froman MVGP model (with B0(x,x

′) = Bκ0(x,x′)) and from

a CoGP model. The shapes of the MVGP covriances fordifferent columns of F (x) are the same by construction, whilethose of CoGP model may be arbitrary. Thus, the CoGPmodel is more expressive than our MVGP model. However,MVGP model offers considerable computational advantagesespecially for high-dimensional systems without significantloss in accuracy. The accuracy and computational complexityof the MVGP and CoGP models are compared in Sec. VIII-A.

V. SELF-TRIGGERED CONTROL WITH PROBABILISTICSAFETY CONSTRAINTS

The MVGP model developed in Sec. IV addresses Prob-lem 1 and provides a probabilistic estimate of the unknownsystem dynamics F (x)u in (11). In this section, we considerProblem 2. We extend the optimization-based control synthesisapproach in (4) to handle probabilistic stability and safetyconstraints induced by the posterior distribution of F (x)u.We focus on handling probabilistic safety constraints of theform P(CBC(x,u) ≥ 0) ≥ p. Since the control Lyapunovand control barrier conditions have the same form, involvingthe Lie derivative of a known function V (x) or h(x) withrespect to the system dynamics, our approach can be usedfor stability constraints as well, as demonstrated in Sec.VIII-B. Furthermore, we develop self-triggering conditionsto adaptively decide the times tk, tk+1, . . ., at which thesystem inputs u should be recomputed in order to guaranteesafety with high probability along the continuous-time systemtrajectory, instead of instantaneously in time.

Page 5: Control Barriers in Bayesian Learning of System Dynamics

5

�10 0 10

x

�10

�5

0

5

10

y

Var(f(x)) on x-y

�10 0 10

Var(f(x)) on y-θ

�10 0 10

θ

x

Var(f(x)) on θ-x

�5 0 5

x

�5.0

�2.5

0.0

2.5

5.0

y

Var(g(x):,1) on x-y

�5 0 5

y

θVar(g(x):,1) on y-θ

�5 0 5

θ

x

Var(g(x):,1) on θ-x

�5 0 5

x

�5

0

5

y

Var(g(x):,2) on x-y

�5 0 5

y

θ

Var(g(x):,2) on y-θ

�5 0 5

θ

x

Var(g(x):,2) on θ-x

MVGP

�5 0 5

x

�5

0

5

y

Var(f(x)) on x-y

�5 0 5

y

θ

Var(f(x)) on y-θ

�5 0 5

θ

x

Var(f(x)) on θ-x

�5 0 5

x

�5

0

5

y

Var(g(x):,1) on x-y

�5 0 5

y

θ

Var(g(x):,1) on y-θ

�5 0 5

θ

x

Var(g(x):,1) on θ-x

�5 0 5

x

�5

0

5

y

Var(g(x):,2) on x-y

�5 0 5

y

θ

Var(g(x):,2) on y-θ

�5 0 5

θ

x

Var(g(x):,2) on θ-x

CoGP

Fig. 1. Covariances of f(x) and the columns of g(x) learned from an Ackermann vehicle simulation described in Sec. VIII-B using an MVGP model (left)and a CoGP model (right). By construction the shapes of the covariances for each column of the MVGP model are the same (up to scale), while the columncovariance shapes for the CoGP model are not constrained.

Our approach requires the stochastic system dynamicsF (x)u to be locally Lipschitz continuous with high proba-bility. This is necessary to ensure that for any MVGP sampleF (x), the ordinary differential equation x = F (x)u in (1)has a unique solution [68, Thm. 3.20]. Without such anassumption, the system would be able to instantaneously movefrom a safe state with a large safety margin to an unsafestate, making it impossible to guarantee safety for any timeduration after a control triggering instant. The next Lemmashows constructively how to compute a Lipschitz constant Lf

which holds with a user-specified probability 1 − δL for avector-valued GP model with kernel whose fourth-order partialderivatives are Lipschtz continuous. The proof follows, withminor modifications, the argument in [69, Thm 3.2].

Lemma 1. Consider the vector-valued function f(x) ,F (x)u in (11) with distribution GP(µ(x),AκB(x,x

′)),where µ(x) = Mk(x)u and κB(x,x

′) = u⊤Bk(x,x′)u.

Suppose that κB(x,x′) has continuous partial derivatives

of fourth order. For j ∈ {1, . . . , n}, let κ∂jB (x,x′) ,

∂2

∂xj∂x′jκB(x,x

′) with Lipschitz constant L∂jκ over a compact

set X with maximal extension r = maxx,x′∈X ∥x − x′∥.Then, each element of the Jacobian of f(x) is bounded withprobability of at least 1− δL

n2 :∣∣∣∣supx∈X

∂fi(x)

∂xj

∣∣∣∣ ≤ Li,∂j , ∀i, j ∈ {1, . . . , n}, (12)

where

Li,∂j ,√2 log

(2n2

δL

)κi,∂jX + 12

√6nmax

{κi,∂jX ,

√rAiiL

∂jκ

}

and κi,∂jX , maxx∈X

√Aiiκ

∂jB (x,x′). Furthermore, a sample

function f(x) of the given GP is almost surely continu-ous on X and with probability of at least 1 − δL, Lf ,√

1n2

∑ni=1

∑nj=1 L

2i,∂j is a Lipschitz constant of f(x) on X .

Proof. See Appendix D.

The assumptions of Lemma 1 are mild and reasonable. Theassumption about kernel continuity can be satisfied by an ap-propriate choice of a kernel function. For example, commonlyused radial basis functions are infinitely differentiable andcontinuous. The assumption that the space X is bounded isreasonable for physical systems. For example, the region thatan Ackermann vehicle can cover can be bounded based on themaximum velocity and acceleration of the vehicle.

A. Probabilistic Safety ConstraintsConsider probabilistic stability and safety constraints in the

CLF-CBF QP in (4), induced by the MVGP distribution ofF (x)u at time tk in (11):

π(xk) ∈ argminuk∈U,δ∈R

∥R(xk)uk∥2 + λδ2

s.t. P(CLC(xk,uk) ≤ δ | xk,uk) ≥ pk

P(CBC(xk,uk) ≥ ζ | xk,uk) ≥ pk,

(13)

where pk , pk/(1− δL) and δL is specified in Lemma 1.Remark 1. Given a desired safety probability pk for theinterval [tk, tk + τk), defined in (6), we choose the Lipschitzcontinuity probability 1− δL in Lemma 1 to ensure instanta-neous safety at time tk with higher probability pk ∈ [0.5, 1).The choice of δL affects the Lipschitz constant Lf and in turn

Page 6: Control Barriers in Bayesian Learning of System Dynamics

6

the duration τk, as discussed in Sec. V-B. By ensuring safetyat time instant tk with probability at least pk, we guaranteesafety with probability at least pk = pk(1 − δL) during theinterval [tk, tk + τk) (see Proposition 5). Also see Remark 2for further discussion on feasibility. •

To ensure that the safety constraint does not only holdinstantaneously at tk but over an interval [tk, tk + τk), weenforce a tighter constraint via ζ > 0 and determine the timeτk for which it remains valid. The choice of ζ and its effect onτk are discussed next. First, we obtain the mean and varianceof the CBC constraint, which is an affine transformation ofthe system dynamics.

Lemma 2. Consider the dynamics in (1) with posteriordistribution in (11). Given xk and uk, CBCk , CBC(xk,uk)is a Gaussian random variable with the following parameters:

E[CBCk] = ∇xh(xk)⊤Mk(xk)uk + α(h(xk)), (14)

Var[CBCk] = (u⊤k Bk(xk,xk)uk)(∇xh(xk)

⊤A∇xh(xk)).

Proof. We start by rewriting the definition of CBC as:

CBCk = ∇xh(xk)⊤F (xk)uk + α(h(xk)). (15)

Then, the mean and variance of CBCk are:

E[CBCk] = ∇xh(xk)⊤E[F (xk)uk] + α(h(xk)),

Var[CBCk] = ∇xh(xk)⊤ Var[F (xk)uk]∇xh(xk),

(16)

where the mean and variance of F (xk)uk are from (11).

Using Lemma 2, we can rewrite the safety constraint as

P(CBCk ≥ ζ|xk,uk) = 1− Φ

(ζ − E[CBCk]√

Var[CBCk]

)≥ pk, (17)

where Φ(·) is the cumulative distribution function of thestandard Gaussian. Note that if the control input is chosenso that ζ−E[CBCk]√

Var[CBCk]→ −∞, as the posterior variance of CBCk

tends to zero, the probability P(CBCk ≥ ζ|xk,uk) tends toone. Namely, as the uncertainty about the system dynamicstends to zero, our results reduce to the setting of Sec. III-B,and safety can be ensured with probability one. Using (17)and noting that Φ−1(1 − pk) = −

√2erf−1(2pk − 1), where

erf(·) is the Gauss error function, the optimization problem in(13) can be restated as:

π(xk) ∈ argminuk∈U,δ∈R

∥R(xk)uk∥2 + λδ2

s.t. δ − E[CLCk] ≥ c(pk)√

Var[CLCk]

ζ − E[CBCk] ≤ −c(pk)√

Var[CBCk],

(18)

where c(pk) ,√2erf−1(2pk − 1). Using the reformulation in

(18), the next proposition shows that the control problem withprobabilistic stability and safety constraints in (13) is a convexoptimization problem, which can be solved efficiently.

Proposition 4. The chance-constrained optimization problemin (13) for control-affine system dynamics in (1) with posteriordistribution (11) is a second-order cone program (SOCP):

π(xk) ∈ argminy∈R,δ∈R,u∈U

y (19a)

s.t. y −∥∥∥R(xk)u+

√λδ∥∥∥2≥ 0 (19b)

qk(xk)⊤u− δ + c(pk) ∥Pk(xk)u∥2 ≤ 0 (19c)

ek(xk)⊤u− ζ − c(pk) ∥Vk(xk)u∥2 ≥ 0, (19d)

where

qk(xk) , Mk(xk)⊤∇xV (xk) +

[γ(V (xk))

0m

],

Pk(xk) ,√∇xV (xk)⊤A∇xV (xk)B

12

k (xk,xk),

ek(xk) , Mk(xk)⊤∇xh(xk) +

[α(h(xk))

0m

],

Vk(xk) ,√∇xh(xk)⊤A∇xh(xk)B

12

k (xk,xk),

and B12

k (xk,xk) is the Cholesky factorization of Bk(xk,xk).

Proof. Substituting the mean and variance of CLCk and CBCk

(Lemma 2) in (18) and introducing an auxiliary variable y toexpress the quadratic objective as a SOCP constraint leads tothe result.

Prop. 4 generalizes the CLF-CBF QP formulation in (4).It shows that when the stability and safety constraints areprobabilistic, induced by the MVGP distribution of the systemdynamics, the control synthesis problem becomes a SOCP and,hence, is still convex. We refer to the left-hand side of theconstraints in (19d) and (19c) as Stochastic CBC (SCBC)and Stochastic CLC (SCLC), respectively. Note that whenpk = 0.5, c(pk) = 0 and the SOCP in (19) reduces to thedeterministic-case QP in (4). Otherwise, the SOCP can besolved to arbitrary precision ϵ within O(− log(ϵ)) iterations[70] with off-the-shelf solvers [71], [72].Remark 2. If the SOCP program in (19) is infeasible, theredoes not exist a control input that guarantees safety forthe current dynamics GP distribution and the user-specifiedprobabilistic safety requirement. This can be used as a failuremode to ask a human to take over control or provide additionaltraining data that reduces the dynamics GP uncertainty. Sinceour SOCP constraint is a conservative approximation of thetrue probabilistic safety constraint in (13), it is possible thatcontrol that meets the desired safety bounds exists even if theSOCP is infeasible. Please refer to Casteñada et al [73] fordiscussion of feasibility conditions of an SOCP controller. •

B. Self-triggering Design

The safety constraint in (19) ensures safety with highprobability at the triggering times {tk}k∈N. Here, we extendour analysis to the inter-triggering invervals [tk, tk + τk). Werestate [30, Prop. 1] in our setting, showing that when thesystem dynamics are Lipschitz continuous (Lemma 1), thenthe change in the state is bounded.

Lemma 3. Consider the GP model of the system dynamicsin (11) with zero-order hold control for [tk, tk + τk). Ifthe assumptions of Lemma 1 are satisfied, i.e., with highprobability the system dynamics are Lipschitz continuous withLipschitz constant Lfk , then for all s ∈ [0, τk) the total changein the system state is bounded with probability at least 1−δL:

∥x(tk + s)− xk∥ ≤ rk(s) ,1

Lfk

∥xk∥(esLfk − 1

). (20)

Page 7: Control Barriers in Bayesian Learning of System Dynamics

7

Recall from Sec. III-B that h is a continuously differentiablefunction. Thus, using Lemma 3, for any inter-triggering timeτk, there exist a constant Lhk

> 0 such that:

sups∈[0,τk)

∥∇xh(x(tk + s))∥ ≤ Lhk. (21)

This is used in the next proposition which concerns Prob-lem 2. The next proposition guarantees safety during the inter-triggering intervals as long as the controller ensures safety atthe triggering time using the SOCP in (19).

Proposition 5. Consider the GP model of the system dy-namics in (11) with safe set C. Assume the system dynamicshave Lipschitz constant Lfk with probability at least 1 − δL(Lemma 1), the system is safe with margin ζ at trigger-ing time tk with probability at least pk = pk/(1 − δL)(Prop. 4), and α is Lipschitz continuous with Lipschitz constantLα. Then, the system is safe according to the constraintin (6) with probability at least pk for time duration τk ≤1

Lfkln(1 +

Lfkζ

(Lfk+Lα)Lhk

∥xk∥

), where Lhk

is defined in (21).

Proof. Since the program (13) has a solution at the triggeringtime tk, we know P(CBCk ≥ ζ|xk,uk) ≥ pk. Thus, condi-tioned on CBCk ≥ ζ and the Lipschitz continuity of the systemdynamics, if we prove CBC(s+tk) ≥ 0, for all s ∈ [0, τk), theresult follows. Using the Cauchy-Schwarz inequality, Lipschitzcontinuity of the system dynamics and Lipschitz continuityof α and h (from (21)), for all s ∈ [0, τk), we have withprobability at least pk(1− δL):

|CBC(x(s+ tk),uk)− CBCk| (22)

(sup

s∈[0,τk)

∥∇xh(x(s+ tk))∥Lfk + LαLhk

)rk(s).

Thus, using (20) and (21), we notice that the right-hand sideof (22) is upper-bounded by Lhk

Lfk+LαLhk

Lfk∥xk∥

(eLfk

s − 1),

which, in turn, is less than or equal to ζ for s = τk.

Prop. 4 ensures instantaneous safety with probability pk ≥pk, while Prop. 5 extends the safety guarantee with probabilitypk to the interval [tk, tk + τk). System safety as formalizedin Problem 2 is guaranteed because P(CBC(x) ≥ 0) ≥ pkimplies P(h(x) ≥ 0) ≥ pk, for all t ∈ [tk, tk + τk), due toProp. 2. Prop. 5 characterizes the longest time τk until it isnecessary to recompute the control input to guarantee safety.

Fig. 2 shows an evaluation of the Lipschitz constant Lfk

(Lemma 1) and triggering time τk (Prop. 5) for a systemwith Ackermann dynamics. We compute Lfk and τk bothanalytically and numerically. The shapes of the curves forthe numerical and analytical Lipschitz constant are the same,although the analytical bound in Lemma 1 is a few orders ofmagnitude more conservative. More details about the simula-tion are presented in Sec. VIII-B.

VI. EXTENSION TO HIGHER RELATIVE-DEGREE SYSTEMS

Next, we extend the probabilistic safety constraint for-mulation for systems with arbitrary relative degree2, using

2The motivation for assuming known relative degree but unknown dynamicscomes from robotics applications. Commonly, the class of the system is knownbut the parameters (e.g., mass, moment of inertia) and high-order interactions(e.g., jerk, snap, drag) of the dynamics are unknown. Estimating the relativedegree is left for future work (see [74]–[76]).

101

102

103

Lf k

10�2

100

Nu

mer

icalL

f k

0 100 200

time (k)

10�5

10�4

10�3

τ k

0 100 200

time (k)

10�3

10�2

Nu

mer

icalτ k

Fig. 2. Lipschitz constant Lfk and triggering time τk for an Ackermannvehicle simulation. The analytical values (left) obtained from Lemma 1 andProp. 5 are compared with numerical estimates (right). The shapes are similarfor both terms over a 200 time-step simulation but the magnitudes differs. SeeSec. VIII-B3 for details.

an exponential control barrier function (ECBF) [25], [37].Sec. VI-A reviews ECBF results for systems with known dy-namics. Sec. VI-B investigates probabilistic ECBF constraints,while Sec. VI-C provides a self-triggering formulation.

A. Known DynamicsLet r ≥ 1 be the relative degree of (1) with respect to

h(x), i.e., LgL(r−1)f h(x) = 0 and LgL(k−1)

f h(x) = 0, ∀k ∈{1, . . . , r − 1}. This condition can be expressed by defining

η(x) ,

h(x)

Lfh(x)...

L(r−1)f h(x)

, F ,

0 1 . . . 0...

......

0 0 . . . 10 0 . . . 0

, G ,

0...01

and h(x) is the output of the linear time-invariant system:

η(x) = Fη(x) + Gu, h(x) = c⊤η(x), (23)

where c , [1, 0, . . . , 0]⊤ ∈ Rr.

Definition 4 ([25], [37]). A function h ∈ Cr(X ,R) is anexponential control barrier function (ECBF) for the systemin (1) if there exists a vector kα ∈ Rr such that the r-thorder control barrier condition CBC(r)(x,u) , L(r)

f h(x) +

LgL(r−1)f h(x)u + k⊤

αη(x) satisfies supu∈U CBC(r)(x,u) ≥0 for all x ∈ X and h(x(t)) ≥ c⊤η(x0)e

(F−Gkα)t ≥ 0,whenever h(x(0)) ≥ 0.

If kα satisfies the properties in [37, Thm. 2], then any con-troller u = π(x) that ensures CBC(r)(x,u) ≥ 0 renders thedynamics (1) safe with respect to C = {x ∈ X | h(x) ≥ 0}.For relative-degree-one systems, k⊤

αη(x) reduces to αh(x)with α > 0. Thus, CBC(1), the safety condition based onECBF for r = 1, is equivalent to the CBC in Def. 2 when theextended class K∞ function α is linear.

B. Probabilistic ECBF ConstraintsAs in (13), we are interested in solving

π(xk) ∈ argminuk∈U

∥R(xk)uk∥2

s.t. P(CBC(r)k ≥ ζ|xk,uk) ≥ pk,

(24)

Page 8: Control Barriers in Bayesian Learning of System Dynamics

8

where CBC(r)k , CBC(r)(xk,uk) and we have dropped the

CLC term for clarity of presentation. While we explicitlycharacterised the distribution of CBCk for relative degree onein Lemma 2, the distribution of CBC(r)

k cannot be determinedexplicitly for arbitrary r. Instead, we use a concentration boundto rewrite the chance constraint in terms of the moments ofCBC(r)

k . Before we can derive a SOCP controller for higherrelative-degree systems, we need to show that the mean andvariance of CBC(r)

k are affine and quadratic in u, respectively.

Lemma 4. Let r ≥ 1 be the relative degree of (1) with respectto h(x) ∈ Cr(X ,R) and F (x) be a random function withfinite mean and variance. Then, the expectation and varianceof CBC(r)(x,u) in Def. 4 are linear and quadratic in u,respectively, and satisfy:

E[CBC(r)(x,u)] = e(r)(x)⊤u,

Var[CBC(r)(x,u)] = u⊤V(r)(x)V(r)(x)⊤u,(25)

where

e(r)(x) , E[F (x)⊤∇xL(r−1)

f h(x) +

[k⊤αη(x)0m

]](26)

V(r)(x) , Var[F (x)⊤∇xL(r−1)

f h(x) +

[k⊤αη(x)0m

]] 12

(27)

Proof. See Appendix E.

The next proposition generalizes Prop. 4 to arbitraryrelative-degree systems by showing that control synthesis withprobabilistic safety constraints can still be cast as a SOCP.

Proposition 6. Consider the control-affine system in (1) withstochastic dynamics and relative degree r ≥ 1 with respectto an ECBF h(x) ∈ Cr(X ,R). If the system inputs aredetermined in continuous time tk from the following SOCP,

π(xk) ∈ argminy∈R,uk∈U

y

s.t. y − ∥R(xk)uk∥2 ≥ 0 (28)

e(r)k (xk)

⊤uk − ζ − c(r)(pk)∥∥∥V(r)

k (xk)uk

∥∥∥2≥ 0,

where c(r)(pk) ,√

pk

1−pkand pk ∈ (0, 1) is fixed for all

tk, then the system trajectory remains in the safe set C ={x ∈ X | h(x) ≥ 0} with probability pk.

Proof. See Appendix F.

In the proposition above, we bound P(CBC(r)k ≥ ζ|xk,uk)

in (24) using Cantelli’s inequality, because the exact distri-bution of CBC(r)

k is unknown. The safety constraint in (28)can be interpreted as: “The system must satisfy CBC(r)

k inexpectation by a margin c(pk) times the standard deviation ofCBC(r)

k ”. Solving the SOCP requires knowledge of the meanand variance of CBC(r)

k . Sec. VII shows how to determine themean and variance of CBC(2)

k , which is of practical relevancefor many physical systems. For r > 2, Monte Carlo samplingcan be used to estimate these quantities.

C. Self-triggering DesignIn this section, we extend the time-triggered formulation for

probabilistic safety of high relative-degree systems to a self-triggering setup. Our extension to self-triggering control in therelative-degree-one case in Proposition 5, relied on Lipshitzcontinuity of the CBC components. To simplify the analysisfor arbitrary relative degree r, we temporarily introduce amodified CBF hb(x) , h(x) − ζb with ζb > 0. We solvethe SOCP in (28) with ζ = 0 but replace h(x) with hb(x).Enforcing the safety constraint in (28) for hb(xk), ensuresthat with probability pk, h(xk) ≥ ζb at the sampling times.We find an upper bound on the sampling time τk that ensuresh(x(t)) remains non-negative during the inter-triggering in-tervals [tk, tk + τk). As shown in the next proposition, thisis sufficient to guarantee safety during the inter-triggeringinterval as long as the system using the SOCP controller (28)is safe at the triggering time tk.

Proposition 7. Consider the system in (1) with stochasticdynamics and safe set C = {x ∈ X | h(x) ≥ 0}. Supposethe system has relative degree r ≥ 1 with respect to h(x)and the SOCP in (28) has a solution at triggering timetk with hb(x) , h(x) − ζb as the CBF and ζ = 0.Suppose that the system dynamics are Lipschitz continuouswith probability at least 1− δL (Lemma 1) and h is Lipschitzcontinuous with Lipschitz constant Lhk

. Then, h(x(t)) ≥ 0,for t ∈ [tk, tk + τk), holds with probability pk = pk(1− δL),where τk ≤ 1

Lfkln(1 +

Lfkζb

Lhk∥xk∥

).

Proof. Using Lemma 1 and 3 we have,

sups∈[0,τk)

|h(x(tk + s))− h(xk)| ≤ Lhk∥x(tk + s)− xk∥

≤ Lhk

Lfk

∥xk∥(eLfkτk − 1) ≤ ζb, (29)

where the last inequality follows from the upper bound on τk.Given h(x(t)) ≥ ζb at tk, we deduce h(x(t)) ≥ 0 for all timein [tk, tk + τk), and the result follows.

Assuming that the Lipschitz continuity of system dynamicsoccurs with probability at least 1− δL (Lemma 1), and giventhe value of ∥xk∥ at triggering time tk and the parameterζb > 0 and the Lipschitz constant Lhk

, Proposition 7 char-acterizes the longest time τk until a control input needs tobe recomputed to guarantee safety with probability at leastpk = pk(1− δ) for a system with arbitrary relative degree.Remark 3. Recent works [38], [77], [78]studya more generalhigh-order CBF (HOCBF) formulation than ECBF. Applyingour probabilistic safety constraints with a HOCBF is left forfuture work. •

VII. SPECIAL CASE: RELATIVE DEGREE TWO

Systems with relative degree two appear frequently. Wedevelop an efficient approach for computing the mean andvariance of the relative-degree-two safety condition:

CBC(2)(x,u) = [∇xLfh(x)]⊤F (x)u+ [h(x),Lfh(x)]

⊤kα,

which is needed to specify the safety constraints in our SOCPformulation in (28). Note that CBC(2)(x,u) is a stochastic pro-cess whose distribution is induced by the GP vec(F (x)). Fig. 3

Page 9: Control Barriers in Bayesian Learning of System Dynamics

9

∇xh(x)∇xh(x)

⊤f(x)︸ ︷︷ ︸Lfh(x)

[·]

f(x) ∼ GP

[·]

∇xLfh(x)∇x ∇x[Lfh(x)]

⊤F (x)u

F (x)u ∼ GP[·]

u = [1,0⊤m]⊤

[·]

[·]

Fig. 3. Computation graph for the second-order Lie derivative of a controlbarrier function h(x) along the GP-distributed dynamics F (x)u of a relativedegree two system. Only two kinds of operations are required: (1) dot productwith a vector-variate GP ([·]) and (2) gradient of a scalar GP ([∇x]).

shows a computation graph for CBC(2)(x,u) with randomor deterministic functions as nodes and computations amongthem as edges. The graph contains only two kinds of edges:(1) dot product of a deterministic function with a vector-variate GP and (2) gradient of a scalar GP. We show howthe mean, variance, and covariance propagate through thesetwo computations in Lemma 5 (dot product) and Lemma 6(scalar GP gradient).

Lemma 5. Consider three Gaussian random vectors x, y,z with means x, y, z and variances Var[x], Var[y], Var[z],respectively. Let their pairwise covariances be cov(x,y),cov(y, z) and cov(z,x). The mean, variance, and covariancesof x⊤y are given by:

E[x⊤y] = x⊤y +1

2tr(cov(x,y) + cov(y,x)) (30)

Var[x⊤y] =1

2tr(cov(x,y) + cov(y,x))2 + y⊤ Var[x]y

+ x⊤ Var[y]x+ y⊤ cov(x,y)x+ x⊤ cov(y,x)y (31)cov(x,x⊤y)cov(y,x⊤y)cov(z,x⊤y)

=

cov(x,y)x+ Var[x]yVar[y]x+ cov(y,x)y

cov(z,y)x+ cov(z,x)y

. (32)

Proof. See Appendix G.

Lemma 6 ([79, Thm. 2.2.2][80, p. 43]). Let q(x) be ascalar Gaussian Process with differentiable mean functionµ(x) : Rn 7→ R and twice-differentiable covariance functionκ(x,x′) : Rn × Rn 7→ R. If ∇xµ(x) exists and is finite forall x ∈ R and Hx,x′κ(x,x′) = [∂

2κ(x,x′)∂xi,∂x′

j]n,ni=1,j=1 exists and

is finite for all (x,x′) ∈ R2n, then q(x) possesses a meansquare derivative ∇xq(x), which is a vector-variate GaussianProcess GP(∇xµ(x),Hx,x′κ(x,x′)). If s is another randomprocess whose finite covariance with q is covq,s(x,x

′), then

cov(∇xq(x), s(x′)) = ∇x covq,s(x,x

′). (33)

The mean and variance of CBC(2)(x,u) can be computedusing Lemma 4:

E[CBC(2)(x,u)] = e(2)(x)⊤u

Var[CBC(2)(x,u)] = u⊤V(2)(x)V(2)(x)⊤u

e(2)(x) = E[F (x)⊤∇xLfh(x)]

+

[kα,1h(x) + kα,2E[Lfh(x)]

0m

]V(2)(x) =

(Var[F (x)⊤∇xLfh(x)] (34)

Algorithm 1: Mean and variance of CBC(2)(x,u).Data: ECBF h(x), system dynamics distribution

vec(F (x)) ∼ GP(vec(Mk(x)),Bk(x,x′)⊗A)

Result: E[CBC(2)(x,u)] and Var[CBC(2)(x,u)]1 Compute E[Lfh(x)] = ∇xh(x)

⊤Mk(x)[1,0⊤m]⊤ and

Var[Lfh(x)] = [Bk(x,x′)]1,1 (∇xh(x)

⊤A∇xh(x))

by substituting u = [1,0⊤m]⊤ in Lemma 2.

2 Compute the mean and variance of ∇xLfh(x) usingLemma 6,

3 Compute cov(∇xLfh(x),Lfh(x)

)using (33)

4 Compute the mean and variance ∇x[Lfh(x)]⊤F (x)u

using Lemma 5,5 Compute d(x)⊤u = cov

(∇x[Lfh(x)]

⊤F (x)u,Lfh(x))

using (32),6 Plug the above values into (34) to obtain

E[CBC(2)(x,u)] and Var[CBC(2)(x,u)].

+

[k2α,2 Var[Lfh(x)] + 2[d(x)]1 [d(x)]⊤2:m+1

[d(x)]2:m+1 0m×m

]) 12

d(x) , kα,2 cov(F (x)⊤∇xLfh(x),Lfh(x))

where the means, variances, and covariances of Lfh(x) andF (x)⊤∇xLfh(x) in the above equations can be computed viaAlgorithm 1 using Lemma 5 and Lemma 6.

VIII. SIMULATIONS

We evaluate our proposed MVGP learning model and theSOCP-based safe control synthesis on two simulated systems:(A) Pendulum and (B) Ackermann Vehicle. To allow reproduc-ing the results, our implementation is available on Github3.

A. Pendulum

Consider a pendulum, shown in Fig 6, with state x =[θ, ω]⊤, containing its angular deviation θ from the rest posi-tion and its angular velocity ω. The pendulum dynamics are:[

θω

]=

− gl sin(θ)

]︸ ︷︷ ︸

f(x)

+

[01ml

]︸ ︷︷ ︸g(x)

u, (35)

where g is the gravitational acceleration, m is the mass, andl is the length.

1) Estimating Pendulum Dynamics: We compare ourMVGP model versus the Coregionalization GP (CoGP) [65]in estimating the pendulum dynamics using data from ran-domly generated control inputs. In our simulation, the truependulum model has mass m = 1 and length l = 1. Theinference algorithms were implemented in Python using GPy-Torch [81]. We let K0(x,x

′) = Bκ0(x,x′) ⊗ A for MVGP

and K0(x,x′) = Σκ0(x,x

′) for CoGP, where κ0(x,x′) is a

scaled radial-basis function kernel. Further, A, B, and Σ areconstrained to be positive semi-definite by modeling each asCrC

⊤r + diag(v), where Cr ∈ Rl×r, r is a desired rank and

diag(v) is a diagonal matrix constructed from a vector v.

3https://github.com/wecacuee/Bayesian_CBF

Page 10: Control Barriers in Bayesian Learning of System Dynamics

10

We emphasize that a straightforward implementation ofdecoupled GPs for each system dimension is not possible be-cause the training data is only available as a linear combinationof the unknown functions f(x) and g(x). We approximatedecoupled GP inference by constraining the matrices A, B,and Σ in the MVGP and CoGP models to be diagonal. Tocompare the accuracy of the GP models, we randomly split thesamples from the pendulum simulation into training data andtest data. Given a test set T , we compute variance-weightederror as,

err(T ) ,

√√√√∑x∈T

∥K− 12

k (x,x) vec(Mk(x)− F (x))∥22|T |

. (36)

A qualitative comparison of MVGP and CoGP is shownin Fig. 4. A quantitative comparison of the computationalefficiency and inference accuracy of the models with full anddiagonal covariance matrices is shown in Fig. 5. The medianvariance-weighted error and error bars showing the 2nd to9th decile over 30 repetitions of the evaluation are shown.The experiments are performed on a desktop with Nvidia R⃝

GeForce RTXTM 2080Ti GPU and Intel R⃝ CoreTM i9-7900XCPU (3.30GHz). The results show that MVGP inference issignificantly faster than CoGP, while maintaining comparableaccuracy. Both MVGP and CoGP have higher median accuracythan their counterparts with diagonally restricted covariances.

2) Safe Control of Learned Pendulum Dynamics: A safeset is chosen as the complement of a radial region [θc −∆col, θc + ∆col] with θc = 45◦, ∆col = 22.5◦ that needs tobe avoided, as shown in Fig. 6. The control barrier functiondefining this safe set is h(x) = cos(∆col) − cos(θ − θc).The controller knows a priori that the system is control-affinewith relative degree two, but it is not aware of f and g. Azero-mean prior M0(x) = 0n×(1+m) and randomly generatedcovariance matrices A and B are used to initialize the MVGPmodel. We formulate a SOCP as in (28) with r = 2. Wespecify a task requiring the pendulum to track a referencecontrol signal πk(x) and specify the optimization objective as∥R(xk)(uk−πk(xk))∥22 with R(xk) ≡ I. The reference signalπk(x) is an ϵ-greedy policy [82], used to provide sufficient ex-citation in the training data. Concretely, πk(x) is sampled froman ϵk weighted combination of Direc delta distribution δ andUniform distribution U, π(xk) ∼ (1−ϵk)δu=0+ϵkU[−20, 20],where ϵk = 10−k/50 so that ϵk goes from 1 to 0.01 in 100steps. We initialize the system with parameters θ0 = 75◦,ω0 = −0.01, τ = 0.01, m = 1, g = 10, l = 1. Our simulationresults show that the pendulum remains in the safe region(see Fig. 6). Negative control inputs get rejected by the SOCPsafety constraint, while positive inputs allow the pendulum tobounce back from the unsafe region.

B. Ackermann Vehicle

Consider an Ackermann-drive vehicle model with state x =[x, y, θ]⊤, including position (x, y) and orientation θ. To makethe Ackermann dynamics affine in the control input, we define

z , v tan(ϕ), where v is the linear velocity and ϕ is thesteering angle. The Ackermann-drive dynamics are:xy

θ

=

000

︸︷︷︸f(x)

+

cos(θ) 0sin(θ) 0

0 1L

︸ ︷︷ ︸

g(x)

[vz

]︸︷︷︸u

, (37)

where L is the distance between the front and back wheels.1) Estimating Ackermann-drive Dynamics: Similar to

Sec. VIII-A1, we compare the computational efficiency andinference accuracy of MVGP and CoGP with diagonal andfull covariance matrices on training data generated from theAckermann-drive model in (37). We further explicitly assumetranslation-invariant dynamics, i.e, F (x) = F ([0, 0, θ]⊤),∀x ∈ R3. This assumption allows us to transfer the learneddynamics to unvisited parts of the environment. The resultsof the simulation are shown in Fig. 5. We again find thatMVGP inference is significantly faster than CoGP. In terms ofaccuracy, MVGP is comparable to CoGP and restricting thecovariance matrices to diagonal matrices increases the medianvariance-weighted error error.

2) Safe Control of Learned Ackermann-drive Dynamics:To test our safe controller on the Ackermann-drive vehicle,we consider navigation to a goal state in the presence of twocircular obstacles in the environment. The CBF for circularobstacle i ∈ {1, 2} with center oi ∈ R2 and radius ri > 0 is:

hi(x) = q1(∥x1:2 − oi∥22 − r2i ) + q2 cos(θ − ϕo), (38)

where ϕo = tan−1(

y−oi,2

x−oi,1

). We assume that a planning

algorithm provides a desired time-parameterized trajectoryx(d) = [x(d), y(d), θ(d)] and its time derivative x(d). We selecta control Lyapunov function candidate:

V (x,x(d)) =w1

2ρ2 + w2(1− cos(α)), (39)

where ρ , ∥x(d)1:2 − x1:2∥2 and α , θ − tan−1

(y(d)−yx(d)−x

). The

control Lyapunov condition is given by:

CLC(x,u) = ∇⊤x V (x,x(d))F (x)u+

∇⊤x(d)V (x,x(d))x(d) + γvV (x,x(d)). (40)

The control Barrier condition for each obstacle i is:

CBC(x,u; i) = ∇⊤x hi(x)F (x)u+ γhi

hi(x). (41)

We implement the SOCP controller in Prop. 4 with parameters:q1 = 0.7, q2 = 0.3, w1 = 0.9, w2 = 1.5, γhi

= 5, γV = 10,τ = 0.01.

We perform two experiments to evaluate the advantages ofour model. First, we evaluate the importance of accounting forthe variance of the dynamics estimate for safe control. Second,we evaluate the importance of online learning in reducing thevariance and ensuring safety.

Recall the observation in Prop. 4 that c(pk = 0.5) = 0. Inthis case, the SOCP in (19) reduces to the deterministic-caseQP in (4). We dub the case of pk = 0.5 as Mean CBF andthe case of pk = 0.99 as Bayes CBF. In both the cases, thecovariance matrices are initialized as A = 0.01I3 and B = I3.The true dynamics, F (x), is specified with L = 12, while themean dynamics M0(x) is obtained with L = 1. The result

Page 11: Control Barriers in Bayesian Learning of System Dynamics

11

θ

−0.50

−0.25

0.00ω

Gro

und

Tru

thf(x)1

θ

f(x)2

θ

g(x)1,1

θ

g(x)2,1

θ

−0.50

−0.25

0.00

ω

CoG

P

θ θ θ

0 2

θ

−0.50

−0.25

0.00

ω

MV

GP

0 2

θ

0 2

θ

0 2

θ

−0.8−0.7−0.6−0.5−0.4−0.3−0.2−0.10.00.1

−12.5−10.0−7.5−5.0−2.50.02.55.07.510.0

−0.008−0.006−0.004−0.0020.0000.0020.0040.0060.008

0.9800.9840.9880.9920.9961.0001.0041.008

−0.8−0.7−0.6−0.5−0.4−0.3−0.2−0.10.00.1

−12.5−10.0−7.5−5.0−2.50.02.55.07.510.0

−0.008−0.006−0.004−0.0020.0000.0020.0040.0060.008

0.9800.9840.9880.9920.9961.0001.0041.008

−0.8−0.7−0.6−0.5−0.4−0.3−0.2−0.10.00.1

−12.5−10.0−7.5−5.0−2.50.02.55.07.510.0

−0.008−0.006−0.004−0.0020.0000.0020.0040.0060.008

0.9800.9840.9880.9920.9961.0001.0041.008

Fig. 4. Qualitative comparison of our Matrix Variate Gaussian Process (MVGP) regression with the Coregionalization GP (CoGP) model [65]. Trainingsample are generated using random control inputs to the pendulum. The training samples are shown as +. The learned models are evaluated on a 20 × 20grid, shown as contour plots. The MVGP model has lower computational complexity than CoGP (O(k3) vs O(k3n3), see Sec. IV) without significant dropin accuracy.

300 400 500

Training samples

0.05

0.10

0.15

Infe

ren

ceti

me

(sec

s)

CoGP (diag)

MVGP (diag)

CoGP (full)

MVGP (full)

300 400 500

Training samples

0

5

10

15

20

Var

ian

cew

eigh

ted

erro

r

Pendulum

80 100 120

Training samples

0.008

0.010

0.012

0.014

0.016

0.018

Infe

ren

ceti

me

(sec

s)

MVGP (diag)

CoGP (diag)

CoGP (full)

MVGP (full)

80 100 120

Training samples

0

1

2

3

4

Var

ian

cew

eigh

ted

erro

r

Ackermann Drive

Fig. 5. Comparison of the computational efficiency and inference accuracyof MVGP and CoGP [65]. Both models are evaluated on the Pendulum andAckermann systems in two modes: 1) with correlation matrix constrained to bediagonal (labelled diag) and (2) without any constraint on correlation matrix(labelled full). The results show that MVGP is significantly faster than CoGP.We argue in Sec. IV that the computational complexity of MVGP is O(k3)for k training examples, while that of CoGP is O(k3n3), where n is the statedimension. The variance-weighted error is computed via (36). The error barsdenote the range from the 2nd to the 9th decile over 30 repetitions, centeredaround the median. The median errors of the MVGP and CoGP models aresimilar but enforcing diagonal covariance matrices, increases the median error.

of simulation is shown in Fig. 7. The Bayes CBF controllerslows down when the safety constraint in (19d) hits zero andthen changes direction while avoiding the obstacle. However,the Mean CBF controller is not able to avoid the obstaclebecause it does not take the variance of the dynamics estimateinto account and the mean dynamics are inaccurate.

We also evaluate the importance of online learning forsafe control. We compare two setups: (1) updating the system

time time time

Fig. 6. Pendulum simulation (left) with an unsafe (red) region. The pendulumtrajectory (middle two) resulting from the application of safe control inputs(right) is shown. The pendulum starts from θ = 75◦, drops down until itreaches the unsafe region and then stays there.

dynamics estimate online via our MVGP approach every 40steps using the data collected so far (With Learning) and(2) relying on the prior system dynamics estimate only (NoLearning). In both the cases, we choose pk = 0.99. Thetrue dynamics are specified with L = 1, while prior meandynamics correspond to L = 8. The covariance matrices Aand B are initialized with elements independently sampledfrom a standard Gaussian distribution while ensuring them topositive semi-definite as before. The result are shown in Fig. 8.Online learning of the vehicle dynamics reduces the varianceand allows the vehicle to pass between the two obstacles.This is not possible using the prior dynamics distributionbecause the large variance makes the safety constraint in (19d)conservative.

3) Evaluating triggering time: We evaluate the bounds onthe Lipschitz constant Lfk (Lemma 1) and triggering time τk(Prop 5) for the Ackermann vehicle. At any time k, we usethe following choice of parameters to compute τk, δL = 10−4,ζ = 10−2, Lα = 1, and Lhk

= maxx∈Xk∇xh(x). We define

Xk to be a cuboid with sides (0.2, 0.2, π50 ) in the directions x, y

and θ respectively centered around the current state xk. Wecompute the Lipschitz constant Lfk and τk both numericallyand analytically. The numerical computation of Li,∂j is done

Page 12: Control Barriers in Bayesian Learning of System Dynamics

12

−3 −2 −1 0

x

−3

−2

−1

0

y

Crash

0.00

.0

4.0

8.0

8.0

12.0

12.0

12

.0

16.0

0 50 100 150 200

0

1

2

|v|

0 50 100 150 200

timesteps

0

5

10

SC

BC

Mean CBF

−3 −2 −1 0

x

−3

−2

−1

0

y

-3.0

-3.0

0.0

0.0

3.0

6.0

9.0

9.0

9.0

12.0

12.0

12

.0

15.0

0 50 100 150 200

0

2

4

|v|

0 50 100 150 200

timesteps

0

5

SC

BC

Bayes CBF

Fig. 7. Comparison of enforcing CBF constraints with Ackermann dynamicswhen accounting (Bayes CBF) and not accounting (Mean CBF) for thevariance in the dynamics estimate. The top row shows the Ackermann vehicletrajectory in dashed blue with two obstacles in red. The contour plots showsthe minimum of the SCBC (19d) values corresponding to the two obstacles,evaluated on the (x, y) grid while keeping θ and u fixed. The middle rowshows the magnitude of the velocity input over time. The bottom row showsthe minimum of the two SCBC (19d) values over time. Enforcing safety usingonly the mean CBC (Mean CBF) results in a collision, while accounting forstochastic CBC (Bayes CBF) constraint causes the Ackermann vehicle toslow down and turn away from the unsafe region. A video rendering of thesesimulations is available in the supplementary material.

by sampling the GP, ∂fi(x)∂xj

over a 10 × 10 × 10 grid in Xk

and taking the maximum norm as the Lipschitz constant. Therest of the computation for the numerical approximation ofτk is the same as the analytical τk. The results are shown inFig. 2. The shapes of the numerical and analytical Lipschitzconstants are the same, although they differ by a coupleorders of magnitude in scale since the analytical bound isconservative. Also, note that we are that in the numericalapproximation δL is determined by the samples drawn fromthe GP. We also observe that the second term in the expressionfor Li,∂j (Lemma 1) dominates the effect of δL on theLipschitz constant.

IX. CONCLUSION

Allowing artificial systems to safely adapt their own modelsduring online operation will have significant implications fortheir successful use in unstructured changing real-world envi-ronments. This paper developed a Bayesian inference approachto approximate system dynamics and their uncertainty fromonline observations. The posterior distribution over the dynam-ics was used to specify probabilistic constraints that guaranteesafe and stable online operation with high probability. Ourresults offer a promising approach for controlling complex

−3 −2 −1 0

x

−3

−2

−1

0

y

-4.00.0

4.0

8.0

8.0

8.0

12.016.0

0 100 20010�7

10�3

101

tr(B

k(x,x

)⊗

A)

0 100 200

timesteps

0

5

10

SC

BC

No Learning

−3 −2 −1 0

x

−3

−2

−1

0

y

0.0

0.0

4.0

8.0

8.0

12.0 12.0

12.0

16.0

16

.0

0 100 20010�7

10�3

101

tr(B

k(x,x

)⊗

A)

0 100 200

timesteps

0

5

10

SC

BC

With Learning

Fig. 8. The effect of online dynamics learning (right) versus no online learning(left) on the safe control of an Ackermann vehicle. The top row shows thevehicle trajectory in dashed blue with two obstacles in red. The middle rowshows the trace of the covariance matrix tr(Bk(x,x)⊗A), which we useas a measure of uncertainty. The bottom row shows the minimum of thetwo probabilistic safety constraint over time, as defined in (19d). Note thatwithout learning, the vehicle gets stuck between the two obstacles becausethe uncertainty in the dynamics is too high, i.e., the safety condition in (19d)cannot be rendered positive. With online learning, however, the uncertaintyis reduced enough to allow the safety condition to become positive in thearea between the two obstacles. The dynamics distribution is updated every40 time steps. Note the drop in uncertainty in the middle row at these timesteps. A video rendering of these simulations is available in the supplementarymaterial.

systems in challenging environments. Future work will focuson applications of the proposed approach to real robot systems.

APPENDIX AADDITIONAL PROPERTIES OF THE MVG DISTRIBUTION

Lemma 7 ([66]). Let X follow an MVG distributionMN (M,A,B). Then, vec(X) ∼ N (vec(M),B⊗A).

Lemma 8 ([66]). Let X follow an MVG distributionMN (M,A,B) and let C ∈ Rd×n and D ∈ Rm×d. Then,

CX ∼ MN (CM,CAC⊤,B),

XD ∼ MN (MD,A,D⊤BD).(42)

APPENDIX BPROOF OF PROPOSITION 3

Let GP(vec(Mk(x)),Kk(x,x′)) be the posterior dis-

tribution of vec(F (x)) conditioned on the training data(X1:k,U1:k, X1:k). The mean and variance can be obtainedby applying Schur’s complement to (8),

vec(Mk(x)) = vec(M0(x))+ (43)(B1:k(x)⊗A

)⊤(B1:k1:k ⊗A

)−1vec(X−M1:kU1:k),

Page 13: Control Barriers in Bayesian Learning of System Dynamics

13

Kk(x,x) = B0(x,x)⊗A− (44)(B1:k(x)⊗A

)⊤(B1:k1:k ⊗A

)−1(B⊤1:k(x)⊗A

).

where B1:k1:k , U⊤

1:kB1:k1:kU1:k + σ2Ik and B1:k(x) ,

B1:k(x)U1:k. For appropriately sized matrices P, Q, R, S,the Kronecker product satisfies (P⊗Q)(R⊗S) = (PR⊗QS)and (P⊗Q)−1 = P−1⊗Q−1. Thus, we can rewrite the meanas:vec(Mk(x)) = vec(M0(x))+((

B⊤1:k(x)[B

1:k1:k]

−1)⊗AA−1

)vec(X−M1:kU1:k).

(45)

Applying (P⊗Q) vec(R) = vec(QRP⊤), we get

Mk(x) = M0(x) + (X1:k −M1:kU1:k)[B1:k1:k]

−1B⊤1:k(x)

= M0(x) + (X1:k −M1:kU1:k)(U1:kB1:k(x))†. (46)

Similarly, the covariance can be rewritten as,

Kk(x,x′) =

(B0(x,x

′)−B1:k(x)[B1:k1:k]

−1B⊤1:k(x

′))⊗A

=(B0(x,x

′)−B1:k(x′)U1:k(U1:kB1:k)

†)⊗A. (47)

Defining Bk(x,x′) such that Kk(x,x) = Bk(x,x

′) ⊗ A,we can write the posterior distribution of vec(F (x)) asGP(vec(Mk(x)),Bk(x,x

′)⊗A).

APPENDIX CCOREGIONALIZATION GAUSSIAN PROCESS

Here, we show how the Coregionalization model [65] canbe applied to Gaussian process inference when the trainingdata is available as a matrix vector product.

Lemma 9. Let vec(F (x)) ∼ GP(vec(M0(x)),Σκ0(x,x′)),

where Σ ∈ R(1+m)n×(1+m)n is the covariance matrix of theoutput dimensions, and κ0(x,x

′) is the kernel function. Denotethe kernel function evaluation over the training data as,

K1:k1:k ,

κ0(x1,x1) . . . κ0(xk,x1)...

...κ0(xk,x1) . . . κ0(xk,xk)

∈ Rk×k

K1:k(x) ,[κ0(x1,x) . . . κ0(xk,x)

]∈ R1×k.

(48)

Let M1:k and U1:k be defined as in Proposition 3. Then, theposterior distribution of vec(F (x)), given the training data(X1:k,X1:k,U1:k), is GP

(vec(Mk(x)),Kk(x,x

′)), where

vec(Mk(x)) , vec(M0(x))+

K1:k(x)[K1:k1:k]

−1 vec(X1:k −M1:kU1:k),

Kk(x,x′) , Σκ0(x,x

′)−K1:k(x)[K1:k1:k]

−1K⊤1:k(x),

(49)

K1:k1:k , (U⊤

1:k ⊗ In)(K1:k1:k ⊗ Σ)(U1:k ⊗ In) + Ik ⊗ S, and

K1:k(x) , (K1:k(x)⊗Σ)(U1:k ⊗ In).

Proof. Using vec(PQR) = (R⊤⊗P) vec(Q), we can rewriteF (x)u as

F (x)u = vec(InF (x)u) = (u⊤ ⊗ In) vec(F (x)). (50)

Thus, the variance of F (x)u can be expressed in terms of thekernel Σκ0(x,x

′):

F (x)u∼N(M0(x)u, (u

⊤⊗ In)Σκ0(x,x′)(u⊗ In)

). (51)

The training data is generated from x = F (x)u + w withw ∼ N (0n,S) and is jointly Gaussian:

vec(X1:k) ∼ N(vec(M1:kU1:k),K

1:k1:k

), (52)

The covariance for a single point is given by,

cov(vec(F (x)), F (x′)u) (53)= cov(vec(F (x), (u⊤ ⊗ In) vec(F (x′))) = Σκ0(x,x

′)(u⊗ In).

A similar expression for covariance can be obtained betweenthe training data and the test data, cov(vec(F (x)), X1:k) =K1:k(x). We can now write the joint distribution between thetraining and test data,[vec(X1:k)vec(F (x))

]∼ N

([vec(M1:kU1:k)

M0(x)

],

[K1:k

1:k K⊤1:k(x

′)K1:k(x) Σκ0(x,x

′)

]).

Applying a Schur complement, we get the posterior distribu-tion in (49).

APPENDIX DPROOF OF LEMMA 1

Proof. The bound on each element of the Jacobian of f(x) isdue to [69, Lemma B.2] with probability at least 1− δL

n2 ,

|fi(x′)− fi(x)| ≤ Li,∂j |x′j − xj | ∀i, j ∈ {1, . . . , n}. (54)

Denote the event in (54) by Ei,∂j so that P(Ei,∂j) ≥ 1− δLnn .

A lower bound on the probability of intersection of all eventscan be computed using a union bound:

P(∩ni=1 ∩n

j=1 Ei,∂j) = 1− P(∪ni=1 ∪n

j=1 E{i,∂j)

≥ 1−n∑

i=1

n∑j=1

P(E{i,∂j) = 1−

n∑i=1

n∑j=1

(1− P(Ei,∂j))

≥ 1− δL. (55)

Adding (54) for all j ∈ {1, . . . , n} and using the Cauchy-Schwarz inequality, we get for each i ∈ {1, . . . , n}:

n|fi(x′)−fi(x)| ≤n∑

j=1

Li,∂j |x′j−xj | ≤

√√√√ n∑j=1

L2i,∂j∥x

′−x∥2.

Squaring and adding all inequalities for i ∈ {1, . . . , n}, weget:

∥f(x′)− f(x)∥2 ≤

√√√√ 1

n2

n∑i=1

n∑j=1

L2i,∂j∥x

′ − x∥2.

APPENDIX EPROOF OF LEMMA 4

Recall the definition of CBC(r)(x,u):

CBC(r)(x,u) = L(r)f h(x) + LgL(r−1)

f h(x)u+ k⊤α η(x)

= Lf [L(r−1)f h(x)] + Lg[L(r−1)

f h(x)]u+ k⊤α η(x)

= ∇x[L(r−1)f h(x)]⊤f(x) +∇x[L(r−1)

f h(x)]⊤g(x)u+ k⊤α η(x)

= ∇x[L(r−1)f h(x)]⊤F (x)u+ k⊤

α η(x).

Since, u = [1,u⊤]⊤, we can rewrite the above as

CBC(r)(x,u) =

(∇xL(r−1)

f h(x)⊤F (x) +

[k⊤α η(x)0m

]⊤)u

Page 14: Control Barriers in Bayesian Learning of System Dynamics

14

Using linearity of expectation, we see that E[CBC(r)(x,u)] islinear in u:

E[CBC(r)(x,u)]

=

(E[F (x)⊤∇xL(r−1)

f h(x)] + E[[

k⊤α η(x)0m

]])⊤

︸ ︷︷ ︸e(r)(x)

u. (56)

Also, applying Var(x⊤u) = Var(u⊤x) = u⊤ Var(x)u toCBC(r)(x,u), we get:

Var[CBC(r)(x,u)] (57)

= u⊤ Var

[∇xL(r−1)

f h(x)⊤F (x) +

[k⊤α η(x)0m

]⊤]︸ ︷︷ ︸

V(r)(x)V(r)(x)⊤

u.

APPENDIX FPROOF OF PROPOSITION 6

Unlike CBC for relative degree one, the distribution ofCBC(r) is not a Gaussian Process for r ≥ 2. Hence, insteadof computing the probability distribution analytically, we useCantelli’s inequality to bound the mean and variance ofCBC(r)

k . For any scalar λ > 0, we have

P(

CBC(r)k ≥ E[CBC(r)

k ]− λ | xk,uk

)≥ 1−

Var[CBC(r)k ]

Var[CBC(r)k ] + λ2

.

Since we want the probability to be greater than pk, we ensureits lower bound is greater than pk, i.e.,

1−Var[CBC(r)

k ]

Var[CBC(r)k ] + λ2

≥ pk. (58)

The terms can be rearranged into,

(1− pk)(Var[CBC(r)k ] + λ2) ≥ Var[CBC(r)

k ]

λ ≥

√pk

1− pkVar[CBC(r)

k ].(59)

For some desired margin, E[CBC(r)k ] ≥ ζ, we can substitute

λ = (E[CBC(r)k ]− ζ) > 0 in (59), so that:

E[CBC(r)k ]− ζ >

√pk

1− pkVar

12 [CBC(r)

k ]

=⇒ P(

CBC(r)k ≥ ζ | xk,uk

)≥ pk

(60)

Using the constraint in (24) and the explicit expressions in(56) and (57) for the mean and variance of CBC(r)

k , we get:

π(xk) ∈ argminuk∈U

∥R(xk)uk∥2 (61)

s.t. e(r)k (xk)⊤uk − ζ − c(r)(pk)

∥∥∥V(r)k (xk)uk

∥∥∥2≥ 0,

where c(r)(pk) =√

pk

1−pk. To ensure that (61) is a standard

SOCP, we convert the objective into a SOCP constraint byintroducing an auxilary variable y, leading to (28).

APPENDIX GPROOF OF LEMMA 5

Recall the following result about the mean and cumulantsof a quadratic form of Gaussian random vectors.

Lemma 10 ([83, p. 55]). Let x be a Gaussian random vectorwith mean x and covariance matrix Σ. Let Λ be a symmetricmatrix and consider the random variable x⊤Λx. The meanof x⊤Λx is

E[x⊤Λx] = x⊤Λx+ tr(ΛΣ).

The rth cumulant of x⊤Λx is:

Kr(x⊤Λx) = 2r−1(r − 1)![tr(ΛΣ)r + rx⊤Λ(ΣΛ)r−1x].

The variance of x⊤Λx is the second cumulant:

Var[x⊤Λx] = K2(x⊤Λx) = 2 tr(ΛΣ)2 + 4x⊤ΛΣΛx.

The covariance between x and x⊤Λx is:

cov(x,x⊤Λx) = 2ΣΛx

Returning to the proof of Lemma 5, consider the threeGaussian random vectors x, y, and z. Note that x⊤y canbe written as a quadratic form:

x⊤y =1

2

[x⊤ y⊤ z⊤

] 0 I 0I 0 00 0 0

xyz

. (62)

Applying Lemma 10 to (62), shows that:

E[x⊤y] = x⊤y +1

2tr(cov(x,y) + cov(y,x))

Var[x⊤y] =1

2tr(cov(x,y) + cov(y,x))2 + y⊤ Var[x]y

+ x⊤ Var[y]x+ y⊤ cov(x,y)x+ x⊤ cov(y,x)ycov(x,x⊤y)cov(y,x⊤y)cov(z,x⊤y)

= cov

xyz

,x⊤y

= 2

Var[x] cov(x,y) cov(x, z)cov(y,x) Var[y] cov(y, z)cov(z,x) cov(z,y) Var[z]

1

2

yx0

.

REFERENCES

[1] M. J. Khojasteh, V. Dhiman, M. Franceschetti, and N. Atanasov, “Prob-abilistic Safety Constraints for Learned High Relative Degree SystemDynamics,” in Learn. Dyn. Cont. (L4DC), 2020.

[2] K.-D. Kim and P. R. Kumar, “Cyber-physical systems: A perspective atthe centennial,” Proc. of IEEE, vol. 100, pp. 1287–1308, 2012.

[3] R. M. Murray, K. J. Astrom, S. P. Boyd, R. W. Brockett, and G. Stein,“Future directions in control in an information-rich world,” IEEE Cont.Sys., vol. 23, no. 2, pp. 20–33, 2003.

[4] J. A. Bagnell, D. Bradley, D. Silver, B. Sofman, and A. Stentz, “Learningfor autonomous navigation,” IEEE Robot. & Auto. Mag., vol. 17, no. 2,pp. 74–84, 2010.

[5] B. Thananjeyan, A. Balakrishna, U. Rosolia, F. Li, R. McAllister, J. E.Gonzalez, S. Levine, F. Borrelli, and K. Goldberg, “Safety AugmentedValue Estimation from Demonstrations (SAVED): Safe Deep Model-Based RL for Sparse Cost Robotic Tasks,” IEEE Robotics and Auto.Lett., vol. 5, no. 2, pp. 3612–3619, 2020.

[6] M. Deisenroth and C. E. Rasmussen, “PILCO: A model-based and data-efficient approach to policy search,” in Int. Conf. Mach. Learn. (ICML),2011, pp. 465–472.

[7] S. Dean, H. Mania, N. Matni, B. Recht, and S. Tu, “On the SampleComplexity of the Linear Quadratic Regulator,” Foundations of Compu-tational Mathematics, vol. 20, pp. 633–679, 2020.

Page 15: Control Barriers in Bayesian Learning of System Dynamics

15

[8] T. Sarkar and A. Rakhlin, “Near optimal finite time identification ofarbitrary linear dynamical systems,” in Int. Conf. Mach. Learn. (ICML),2019, pp. 5610–5618.

[9] J. Coulson, J. Lygeros, and F. Dörfler, “Data-enabled predictive control:in the shallows of the DeePC,” in European Control Conf. (ECC). IEEE,2019, pp. 307–312.

[10] S. Chen, K. Saulnier, N. Atanasov, D. D. Lee, V. Kumar, G. J. Pappas,and M. Morari, “Approximating explicit model predictive control usingconstrained neural networks,” in American Control Conf. (ACC). IEEE,2018, pp. 1520–1527.

[11] M. J. Khojasteh, A. Khina, M. Franceschetti, and T. Javidi, “Learning-based Attacks in Cyber-Physical Systems,” IEEE Trans. Cont. NetworkSys., 2020.

[12] A. Liu, G. Shi, S.-J. Chung, A. Anandkumar, and Y. Yue, “Robustregression for safe exploration in control,” in Learn. Dyn. Cont. (L4DC),2020, pp. 608–619.

[13] D. D. Fan, A.-a. Agha-mohammadi, and E. A. Theodorou, “DeepLearning Tubes for Tube MPC,” Robotics: Science and Systems, 2020.

[14] G. Chowdhary, H. A. Kingravi, J. P. How, and P. A. Vela, “Bayesiannonparametric adaptive control using Gaussian processes,” IEEE Trans.Neural Netw. Learn. Syst., vol. 26, no. 3, pp. 537–550, 2014.

[15] A. Lakshmanan, A. Gahlawat, and N. Hovakimyan, “Safe feedbackmotion planning: A contraction theory and L1-adaptive control basedapproach,” in IEEE Conf. Decision and Cont. (CDC), 2020, pp. 1578–1583.

[16] S. Levine, C. Finn, T. Darrell, and P. Abbeel, “End-to-end training ofdeep visuomotor policies,” The Journal of Machine Learning Research,vol. 17, no. 1, pp. 1334–1373, 2016.

[17] Y. Pan, C.-A. Cheng, K. Saigol, K. Lee, X. Yan, E. Theodorou, andB. Boots, “Agile Autonomous Driving using End-to-End Deep ImitationLearning,” in Robotics: science and systems, 2018.

[18] G. Kahn, P. Abbeel, and S. Levine, “BADGR: An autonomous self-supervised learning-based navigation system,” IEEE Robot. Autom. Lett.,2020.

[19] M. Ono, B. Rothrock, K. Otsu, S. Higa, Y. Iwashita, A. Didier, T. Islam,C. Laporte, V. Sun, K. Stack et al., “MAARS: Machine learning-basedAnalytics for Automated Rover Systems,” in Aerospace Conf. IEEE,2020, pp. 1–17.

[20] P. Wieland and F. Allgöwer, “Constructive safety using control barrierfunctions,” IFAC Proc. Vol., vol. 40, no. 12, pp. 462–467, 2007.

[21] A. D. Ames, X. Xu, J. W. Grizzle, and P. Tabuada, “Control barrierfunction based quadratic programs for safety critical systems,” IEEETrans. Auto. Control, vol. 62, no. 8, pp. 3861–3876, 2016.

[22] X. Xu, T. Waters, D. Pickem, P. Glotfelter, M. Egerstedt, P. Tabuada,J. W. Grizzle, and A. D. Ames, “Realizing simultaneous lane keepingand adaptive speed regulation on accessible mobile robot testbeds,” inIEEE Conf. on Cont. Tech. and App.(CCTA), 2017, pp. 1769–1775.

[23] X. Xu, P. Tabuada, J. W. Grizzle, and A. D. Ames, “Robustness ofcontrol barrier functions for safety critical control,” IFAC-PapersOnLine,vol. 48, no. 27, pp. 54–61, 2015.

[24] S. Prajna, A. Jadbabaie, and G. J. Pappas, “A framework for worst-caseand stochastic safety verification using barrier certificates,” IEEE Trans.Auto. Control, vol. 52, no. 8, pp. 1415–1428, 2007.

[25] A. D. Ames, S. Coogan, M. Egerstedt, G. Notomista, K. Sreenath, andP. Tabuada, “Control Barrier Functions: Theory and Applications,” inEuropean Control Conf. (ECC), June 2019, pp. 3420–3431.

[26] F. S. Barbosa, L. Lindemann, D. V. Dimarogonas, and J. Tumova,“Provably safe control of lagrangian systems in obstacle-scattered envi-ronments,” in IEEE Conf. Decision and Cont. (CDC), 2020, pp. 2056–2061.

[27] M. Jankovic, “Robust control barrier functions for constrained stabiliza-tion of nonlinear systems,” Automatica, vol. 96, pp. 359–367, 2018.

[28] L. Lindemann and D. V. Dimarogonas, “Control barrier functions formulti-agent systems under conflicting local signal temporal logic tasks,”IEEE Control Systems Letters, vol. 3, no. 3, pp. 757–762, 2019.

[29] K. Garg and D. Panagou, “Control-Lyapunov and Control-Barrier Func-tions based Quadratic Program for Spatio-temporal Specifications,” inIEEE Conf. Decision and Cont. (CDC), 2019, pp. 1422–1429.

[30] G. Yang, C. Belta, and R. Tron, “Self-triggered control for safety criticalsystems using control barrier functions,” in American Control Conf.(ACC). IEEE, 2019, pp. 4454–4459.

[31] J. Umlauft and S. Hirche, “Feedback linearization based on gaussianprocesses with event-triggered online learning,” IEEE Trans. Auto.Control, vol. 65, no. 10, pp. 4154–4169, 2020.

[32] F. Solowjow and S. Trimpe, “Event-triggered learning,” Automatica, vol.117, p. 109009, 2020.

[33] W. Heemels, K. H. Johansson, and P. Tabuada, “An introduction to event-triggered and self-triggered control,” in IEEE Conf. Decision and Cont.(CDC), 2012, pp. 3270–3285.

[34] K. Hashimoto, Y. Yoshimura, and T. Ushio, “Learning self-triggeredcontrollers with Gaussian processes,” IEEE Transactions on Cybernetics,2020, to appear.

[35] S.-C. Hsu, X. Xu, and A. D. Ames, “Control barrier function basedquadratic programs with application to bipedal robotic walking,” inAmerican Control Conf. (ACC). IEEE, 2015, pp. 4542–4548.

[36] Q. Nguyen and K. Sreenath, “Optimal robust control for constrainednonlinear hybrid systems with application to bipedal locomotion,” inAmerican Control Conf. (ACC). IEEE, 2016, pp. 4807–4813.

[37] Q. Nguyen and K. Sreenath, “Exponential Control Barrier Functions forenforcing high relative-degree safety-critical constraints,” in AmericanControl Conf. (ACC). IEEE, 2016, pp. 322–328.

[38] W. Xiao and C. Belta, “Control barrier functions for systems with highrelative degree,” in IEEE Conf. Decision and Cont. (CDC), 2019, pp.474–479.

[39] T. Koller, F. Berkenkamp, M. Turchetta, and A. Krause, “Learning-basedmodel predictive control for safe exploration,” in IEEE Conf. Decisionand Cont. (CDC), 2018, pp. 6059–6066.

[40] F. Berkenkamp, A. P. Schoellig, and A. Krause, “Safe controller op-timization for quadrotors with Gaussian processes,” in IEEE Int Conf.Robot Autom. (ICRA), 2016, pp. 493–496.

[41] J. F. Fisac, A. K. Akametalu, M. N. Zeilinger, S. Kaynama, J. Gillula,and C. J. Tomlin, “A general safety framework for learning-based controlin uncertain robotic systems,” IEEE Trans. Auto. Control, vol. 64, no. 7,pp. 2737–2752, 2018.

[42] O. Bastani, “Safe reinforcement learning with nonlinear dynamics viamodel predictive shielding,” in American Control Conf. (ACC), 2021,pp. 3488–3494.

[43] K. P. Wabersich and M. N. Zeilinger, “Safe exploration of nonlineardynamical systems: A predictive safety filter for reinforcement learning,”arXiv preprint arXiv:1812.05506, 2018.

[44] E. Biyik, J. Margoliash, S. R. Alimo, and D. Sadigh, “Efficient and safeexploration in deterministic markov decision processes with unknowntransition models,” in American Control Conf. (ACC). IEEE, 2019, pp.1792–1799.

[45] N. Jansen, B. Könighofer, S. Junges, and R. Bloem, “Shielded decision-making in MDPs,” arXiv preprint arXiv:1807.06096, 2018.

[46] T. Lew, R. Bonalli, and M. Pavone, “Chance-constrained sequentialconvex programming for robust trajectory optimization,” in EuropeanControl Conf. (ECC). IEEE, 2020, pp. 1871–1878.

[47] A. Clark, “Control Barrier Functions for Complete and IncompleteInformation Stochastic Systems,” in American Control Conf. (ACC).IEEE, 2019, pp. 2928–2935.

[48] C. Santoyo, M. Dutreix, and S. Coogan, “A Barrier Function Approachto Finite-Time Stochastic System Verification and Control,” Automatica,2020.

[49] M. Aloysius Pereira, Z. Wang, I. Exarchos, and E. A. Theodorou, “SafeOptimal Control Using Stochastic Barrier Functions and Deep Forward-Backward SDEs,” arXiv preprint arXiv:2009.01196, 2020.

[50] S. Yaghoubi, K. Majd, G. Fainekos, T. Yamaguchi, D. Prokhorov, andB. Hoxha, “Risk-bounded control using stochastic barrier functions,”IEEE Control Syst. Lett., vol. 5, no. 5, pp. 1831–1836, 2021.

[51] D. D. Fan, J. Nguyen, R. Thakker, N. Alatur, A. a. Agha-mohammadi,and E. A. Theodorou, “Bayesian Learning-Based Adaptive Control forSafety Critical Systems,” in IEEE Int. Conf. Robot. Autom., 2020, pp.4093–4099.

[52] L. Wang, E. A. Theodorou, and M. Egerstedt, “Safe learning ofquadrotor dynamics using barrier certificates,” in IEEE Int Conf. RobotAutom. (ICRA), 2018, pp. 2460–2465.

[53] R. Cheng, G. Orosz, R. M. Murray, and J. W. Burdick, “End-to-endsafe reinforcement learning through barrier functions for safety-criticalcontinuous control tasks,” in AAAI Conference on Artificial Intelligence,vol. 33, 2019, pp. 3387–3395.

[54] Z. Marvi and B. Kiumarsi, “Safe Off-policy Reinforcement LearningUsing Barrier Functions,” in American Control Conf. (ACC). IEEE,2020, pp. 2176–2181.

[55] A. J. Taylor and A. D. Ames, “Adaptive Safety with Control BarrierFunctions,” in American Control Conf. (ACC), 2020, pp. 1399–1405.

[56] B. T. Lopez, J.-J. E. Slotine, and J. P. How, “Robust Adaptive ControlBarrier Functions: An Adaptive and Data-Driven Approach to Safety,”IEEE Control Systems Letters, vol. 5, no. 3, pp. 1031–1036, 2020.

[57] I. Salehi, G. Yao, and A. P. Dani, “Active Sampling based SafeIdentification of Dynamical Systems using Extreme Learning Machinesand Barrier Certificates,” in IEEE Int Conf. Robot Autom. (ICRA), 2019,pp. 22–28.

Page 16: Control Barriers in Bayesian Learning of System Dynamics

16

[58] A. Taylor, A. Singletary, Y. Yue, and A. Ames, “Learning for safety-critical control with control barrier functions,” in Learn. Dyn. Cont.(L4DC), 2020, pp. 708–717.

[59] C. K. Williams and C. E. Rasmussen, Gaussian processes for machinelearning. MIT press Cambridge, MA, 2006, vol. 2, no. 3.

[60] Y. Gal and Z. Ghahramani, “Dropout as a Bayesian approximation:Representing model uncertainty in deep learning,” in Int. Conf. Mach.Learn. (ICML), 2016, pp. 1050–1059.

[61] J. Harrison, A. Sharma, and M. Pavone, “Meta-learning Priors forEfficient Online Bayesian Regression,” in Work. Alg. Found. Robotics.Springer, 2018, pp. 318–337.

[62] B. Efron and T. Hastie, Computer age statistical inference. CambridgeUniversity Press, 2016, vol. 5.

[63] F. Berkenkamp, M. Turchetta, A. Schoellig, and A. Krause, “Safe model-based reinforcement learning with stability guarantees,” in Adv. NeuralInf. Process. Syst., 2017, pp. 908–918.

[64] P. Jagtap, G. J. Pappas, and M. Zamani, “Control barrier functions forunknown nonlinear systems using gaussian processes,” in IEEE Conf.Decision and Cont. (CDC), 2020, pp. 3699–3704.

[65] M. A. Alvarez, L. Rosasco, and N. D. Lawrence, “Kernels for vector-valued functions: A review,” Found. Trends Mach. Learn., vol. 4, no. 3,pp. 195–266, 2012.

[66] S. Sun, C. Chen, and L. Carin, “Learning Structured Weight Uncertaintyin Bayesian Neural Networks,” in Int. Conf. Artif. Intell. Stat. (AISTATS),2017, pp. 1283–1292.

[67] C. Louizos and M. Welling, “Structured and efficient variational deeplearning with matrix Gaussian posteriors,” in Int. Conf. Mach. Learn.(ICML), 2016, pp. 1708–1716.

[68] S. Sastry, Nonlinear Systems: Analysis, Stability, and Control. Springer,1999.

[69] A. Lederer, J. Umlauft, and S. Hirche, “Uniform error bounds forGaussian process regression with application to safe control,” in Adv.Neural Inf. Process. Syst., 2019, pp. 659–669.

[70] M. S. Lobo, L. Vandenberghe, S. Boyd, and H. Lebret, “Applications ofsecond-order cone programming,” Linear algebra and its applications,vol. 284, no. 1-3, pp. 193–228, 1998.

[71] Gurobi Optimization, LLC, “Gurobi Optimizer Reference Manual,”Online: http://www.gurobi.com, 2020.

[72] L. Vandenberghe, “The CVXOPT linear and quadratic cone programsolvers,” Online: https://cvxopt.org/userguide/coneprog, 2010.

[73] F. Castañeda, J. J. Choi, B. Zhang, C. J. Tomlin, and K. Sreenath,“Pointwise feasibility of gaussian process-based safety-critical controlunder model uncertainty,” in IEEE Conf. Decision and Cont. (CDC),2021.

[74] P. Akella, M. Ahmadi, R. M. Murray, and A. D. Ames, “Formal testsynthesis for safety-critical autonomous systems based on control barrierfunctions,” in IEEE Conf. Decision and Cont. (CDC), 2020, pp. 790–795.

[75] A. Robey, H. Hu, L. Lindemann, H. Zhang, D. V. Dimarogonas,S. Tu, and N. Matni, “Learning Control Barrier Functions from ExpertDemonstrations,” arXiv preprint arXiv:2004.03315, 2020.

[76] M. Srinivasan, A. Dabholkar, S. Coogan, and P. Vela, “Synthesis ofcontrol barrier functions using a supervised machine learning approach,”International Conference on Intelligent Robots and Systems, 2020.

[77] M. Sarkar, D. Ghose, and E. A. Theodorou, “High-Relative DegreeStochastic Control Lyapunov and Barrier Functions,” arXiv preprintarXiv:2004.03856, 2020.

[78] S. Yaghoubi, G. Fainekos, and S. Sankaranarayanan, “Training neuralnetwork controllers using control barrier functions in the presence ofdisturbances,” in IEEE Int. Conf. Intel. Trans. Sys., 2020, pp. 1–6.

[79] R. J. Adler, The geometry of random fields. Chichester : John Wileyand Sons, 1981.

[80] J. Taylor, “STAT352, Spatial Statistics: Notes on Random Fields,”Stanford University, http://statweb.stanford.edu/~jtaylo/courses/stats352/notes/random_fields.pdf, 2009.

[81] J. R. Gardner, G. Pleiss, D. Bindel, K. Q. Weinberger, and A. G. Wilson,“GPyTorch: Blackbox Matrix-Matrix Gaussian Process Inference withGPU Acceleration,” in Adv. Neural Inf. Process. Syst., 2018.

[82] R. S. Sutton and A. G. Barto, Reinforcement learning: An introduction.MIT press, 2018.

[83] S. R. Searle and M. H. Gruber, Linear models. John Wiley & Sons,1971.

Vikas Dhiman is an Assistant Professor in theECE department at the University of Maine. Hisworks lie in the localization, mapping and controlalgorithms for applications in robotics. He was aPostdoctoral Researcher at the University of Cali-fornia, San Diego (2019-21). He graduated in Elec.Engg (2008) from Indian Institute of Technology,Roorkee, earned his MS (2014) from Universityat Buffalo, and received his PhD (2019) from theUniversity of Michigan, Ann Arbor.

Mohammad Javad Khojasteh (S’14–M’21) did hisundergraduate studies at Sharif University of Tech-nology from which he received B.Sc. degrees in bothElectrical Engineering and Mathematics, in 2015. Hereceived the M.Sc. and Ph.D. degrees in Electricaland Computer Engineering from University of Cal-ifornia San Diego (UCSD), La Jolla, CA, in 2017,and 2019, respectively. In 2020, he was a postdoc-toral scholar with Center for Autonomous Systemsand Technology (CAST) at California Institute ofTechnology (Caltech), and a visitor at NASA’s Jet

Propulsion Laboratory (JPL), where he worked with Team CoSTAR. Cur-rently, he is a Postdoctoral Associate with Laboratory for Information andDecision Systems (LIDS) at Massachusetts Institute of Technology (MIT).

Massimo Franceschetti (M’98–SM’11–F’18) re-ceived the Laurea degree (with highest honors) incomputer engineering from the University of Naples,Naples, Italy, in 1997, the M.S. and Ph.D. degrees inelectrical engineering from the California Institute ofTechnology, in 1999, and 2003, respectively. He isProfessor of Electrical and Computer Engineering atthe University of California at San Diego (UCSD).Before joining UCSD, he was a postdoctoral scholarat the University of California at Berkeley for twoyears. He has held visiting positions at the Vrije

Universiteit Amsterdam, the École Polytechnique Fédérale de Lausanne,and the University of Trento. His research interests are in physical andinformation-based foundations of communication and control systems. He wasawarded the C. H. Wilts Prize in 2003 for best doctoral thesis in electricalengineering at Caltech; the S.A. Schelkunoff Award in 2005 for best paperin the IEEE Transactions on Antennas and Propagation, a National ScienceFoundation (NSF) CAREER award in 2006, an Office of Naval Research(ONR) Young Investigator Award in 2007, the IEEE Communications SocietyBest Tutorial Paper Award in 2010, and the IEEE Control theory societyRuberti young researcher award in 2012. He has been elected fellow of theIEEE in 2018 and became a Guggenheim fellow for the natural sciences:engineering in 2019.

Nikolay Atanasov (S’07-M’16) is an Assistant Pro-fessor of Electrical and Computer Engineering atthe University of California San Diego. He obtaineda B.S. degree in Electrical Engineering from Trin-ity College, Hartford, CT, in 2008 and M.S. andPh.D. degrees in Electrical and Systems Engineeringfrom the University of Pennsylvania, Philadelphia,PA, in 2012 and 2015, respectively. His researchfocuses on robotics, control theory, and machinelearning, applied to active sensing using ground andaerial robots. He works on probabilistic environment

models that unify geometry and semantics and on optimal control andreinforcement learning approaches for minimizing uncertainty in these models.Dr. Atanasov’s work has been recognized by the Joseph and Rosaline Wolfaward for the best Ph.D. dissertation in Electrical and Systems Engineering atthe University of Pennsylvania in 2015 and the best conference paper awardat the International Conference on Robotics and Automation in 2017.