# Enhancing Data-Driven Reachability Analysis using Temporal Logic Side Information

This paper presents algorithms for performing data-driven reachability analysis under temporal logic side information. In certain scenarios, the data-driven reachable sets of a robot can be prohibitively conservative due to the inherent noise in the robot's historical measurement data. In the same scenarios, we often have side information about the robot's expected motion (e.g., limits on how much a robot can move in a one-time step) that could be useful for further specifying the reachability analysis. In this work, we show that if we can model this side information using a signal temporal logic (STL) fragment, we can constrain the data-driven reachability analysis and safely limit the conservatism of the computed reachable sets. Moreover, we provide formal guarantees that, even after incorporating side information, the computed reachable sets still properly over-approximate the robot's future states. Lastly, we empirically validate the practicality of the over-approximation by computing constrained, data-driven reachable sets for the Small-Vehicles-for-Autonomy (SVEA) hardware platform in two driving scenarios.

## Authors

• 13 publications
• 1 publication
• 1 publication
• 24 publications
• 15 publications
• ### Data-Driven Reachability Analysis Using Matrix Zonotopes

In this paper, we propose a data-driven reachability analysis approach f...
11/17/2020 ∙ by Amr Alanwar, et al. ∙ 0

• ### Data-Driven Reachability Analysis from Noisy Data

We consider the problem of computing reachable sets directly from noisy ...
05/15/2021 ∙ by Amr Alanwar, et al. ∙ 0

• ### Robust Data-Driven Predictive Control using Reachability Analysis

We present a robust data-driven control scheme for unknown linear system...
03/25/2021 ∙ by Amr Alanwar, et al. ∙ 0

• ### Verification of the IBOS Browser Security Properties in Reachability Logic

This paper presents a rewriting logic specification of the Illinois Brow...
05/25/2020 ∙ by Stephen Skeirik, et al. ∙ 0

• ### Structured Prediction for CRiSP Inverse Kinematics Learning with Misspecified Robot Models

02/25/2021 ∙ by Gian Maria Marconi, et al. ∙ 0

• ### Neuro-Reachability of Networked Microgrids

A neural ordinary differential equations network (ODE-Net)-enabled reach...
01/13/2021 ∙ by Yifan Zhou, et al. ∙ 0

• ### Data-Driven Verification under Signal Temporal Logic Constraints

We consider systems under uncertainty whose dynamics are partially unkno...
05/08/2020 ∙ by Ali Salamati, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## I Introduction

Reachability analysis is an essential tool that provides a principled understanding of the dynamic capabilities of a system [21, 30]. In recent years, researchers have proposed a variety of formulations in which reachability analysis provides formal guarantees on the safety of an autonomous system (i.e., for autonomous vehicles [5] and drones [15]). Traditionally, a reachable set of states is computed based on a model of the subject system using either set-propagation techniques [7, 31, 19] or simulation-based techniques [13, 23, 18, 25]. Most techniques compute over-approximations of the robot’s reachable states to ensure that the resulting reachable set can be used for providing safety guarantees. However, these traditional approaches are sensitive to model error and do not incorporate the readily available trajectory data that robots continuously produce.

Several recent works have proposed performing reachability analysis from data [10, 12, 11, 9, 8, 4, 27, 33, 6] to overcome the limitation of prior model knowledge. By performing reachability analysis directly from data, we can form a direct link between the actual, historical performance of a robot and our prediction of its reachability, removing the dependency on the accuracy of first-principles-based modeling. Moreover, in [2, 1], authors provide formal guarantees on the over-approximation of a system’s reachability based on data that contains noise. However, in order to provide guarantees on the over-approximation of the data-driven reachable sets, the computed sets might become prohibitively conservative when the noise becomes significant. In this work, we aim to limit this conservatism whenever we have useful side information.

The main contribution of this paper is an approach for performing data-driven reachability analysis under signal temporal logic (STL) side information. We choose to use STL since it can be interpreted over continuous-time signals, supports imposing strict deadlines and robust semantics [14], and allows for the formulation of complex specifications. To the extent of the authors’ knowledge, the presented approach is novel in its use of STL formulae as side information, instead of as specifications (e.g. [24, 17]), while performing reachability analysis. More specifically, the contributions of this work are as follows: (1) We provide two algorithms for performing data-driven reachability analysis under STL side information, which, in turn, reduces the conservatism of data-driven reachable sets. (2) We provide state inclusion guarantees in reachable sets by intersecting a predicate function constructed from STL side information with either reachable zonotopes or reachable constrained zonotopes. (3) We validate our approach using two driving scenarios of a Small-Vehicles-for-Autonomy (SVEA) hardware platform (e.g., in Fig. 1).

The remainder of the paper is organized as follows. In Section II, we introduce preliminary material. In Section III, we present our approach to constrain the reachable sets using STL-based side information. In Section IV, we validate the practicality of our approach using the SVEA platform. In Section V, we conclude the paper with final remarks.

## Ii Preliminaries and Problem Statement

In this section, we start by describing our assumed model for the subject system. After establishing our assumed model, we overview some necessary preliminary material and end the section by detailing the problem that we solve in Section III.

### Ii-a Model Description

We consider a discrete-time Lipschitz nonlinear system

 x(k+1) =f(x(k),u(k))+w(k). (1)

We assume to be an unknown twice differentiable function and to be process noise bounded by the set .

### Ii-B Reachable Set and Set Representations

In the following definitions, we define the reachable sets and different set representations used in our approach.

###### Definition 1

(Reachable set) The reachable set after steps of system (1) from a set of initial states and a set of possible inputs is

 RN={x(N)∈Rn∣∣∀k∈{0,...,N−1}:x(k+1)=f(x(k),u(k))+w(k),w(k)∈Zw,u(k)∈Uk,x(0)∈X0}.
###### Definition 2

(Zonotope [20, 16]) Given center and

generator vectors in a generator matrix

, a zonotope is defined as

 Z={x∈Rn∣∣x=cZ+γZ∑i=1β(i)Zg(i)Z,−1≤β(i)Z≤1}.

We use the shorthand notation .

The linear map is defined and computed as follows [3]:

 LZ={Lz|z∈Z}=⟨LcZ,LGZ⟩. (2)

Given two zonotopes and , the Minkowski sum can be computed exactly as [3]:

 Z1+Z2=⟨cZ1+cZ2,[GZ1,GZ2]⟩. (3)

The noise is random but bounded by the zonotope . The Cartesian product of two zonotopes and is defined and computed as

 Z1×Z2 =⟨[cZ1cZ2],[GZ100GZ2]⟩. (4)

With a minor abuse of notation, we write to represent an interval as a zonotope. Zonotopes have been extended in [32] to represent polytopes by applying constraints on the factors multiplied with the generators.

###### Definition 3

(Constrained zonotope [32]) An -dimensional constrained zonotope is defined by

where is the center, is the generator matrix and and constrain the factors . In short, we write .

###### Definition 4

(Strip [22]) For given parameters and , the strip is the set of all possible state values satisfying

 Si,k={x||Hi,kx−yi,k|≤ri,k}. (5)
###### Definition 5

(Nonlinear strip) For given and the nonlinear strip is the set of all possible state values satisfying

 Ni,k={x||hi,k(x)|≤ri,k}. (6)

We denote the Moore-Penrose pseudoinverse by and the Kronecker product by . We also the denote the vector of a matrix by .

### Ii-C Signal temporal logic

STL is an expressive language that is able to model complex, time-varying side information. STL is based on predicates which are obtained by evaluation of a predicate function , where (True) if and (False) if for [26]. In this paper, we consider side information that can be modeled with the following STL fragment:

 ¯ϕ::=G[a,b]ϕ|F[a,b]ϕ|ϕ′U[a,b]ϕ′′|ϕ′∧ϕ′′, (7)

where are STL formulas. In addition, is the until operator with , and and are eventually and always operators, respectively. Let denote the satisfaction relation. A formula is satisfiable if such that . STL semantics are defined formally as follows:

###### Definition 6

(STL semantics [26]) The STL semantics for a signal are recursively given by:

 (x,t)⊨¬ϕ⇔¬((x,t)⊨ϕ), (x,t)⊨ϕ′∧ϕ′′⇔(x,t)⊨ϕ′∧(x,t)⊨ϕ′′, (x,t)⊨ϕ′U[a,b]ϕ′′⇔∃t1∈[t+a,t+b]s.t.(x,t1)⊨ϕ′′ ∧∀t2∈[t,t1],(x,t2)⊨ϕ′, (x,t)⊨F[a,b]ϕ⇔∃t1∈[t+a,t+b]s.t.(x,t1)⊨ϕ, (x,t)⊨G[a,b]ϕ⇔∀t1∈[t+a,t+b]s.t.(x,t1)⊨ϕ.

We omit the time to simplify the notation and write .

### Ii-D Data-Driven Reachablibity Analysis

In this section, we show how we compute data-driven reachable sets from recorded trajectories. Consider input-state data trajectories of length , , from system (1), given by , . Denote the following matrices containing the set of all data sequence.

 X =[x(1)(0)…x(1)(T1)…x(K)(0)…x(K)(TK)], U− =[u(1)(0)…u(1)(T1−1)…u(K)(0)…u(K)(TK−1)], X+ =[x(1)(1)…x(1)(T1)…x(K)(1)…x(K)(TK)], X− =[x(1)(0)…x(1)(T1−1)…x(K)(0)…x(K)(TK−1)].

The total number of data points is denoted by , and the set of all data by .

After collecting the data offline, we calculate an over-approximation of the reachable sets online using Algorithm 1 [1]. We compute a least-squares model at a linearization point in line 1 where is a the noise matrix zonotope [1] with center matrix and a list of generator matrices . Then, we compute a zonotope that over-approximates the model mismatch and the nonlinearity terms in lines 2 to 4. Given that the data have a limited covering radius, we compute a Lipschitz zonotope in line 5 to provide guarantees. Next, we perform the reachability recursion in line 6 given the previously computed zonotopes. Note that the Lipschitz constant and covering radius can be computed as proposed in [1, 28, 29].

### Ii-E Problem Statement

Now that we have introduced the necessary preliminaries, we can detail the problem that we aim to solve.

###### Problem II.1

Given the STL side information with of the form (7) , a historical data set collected from an unknown system model, noise zonotope , and input zonotope , compute the STL reachable set at time step starting from initial zonotope that properly over-approximates the set of states where

 Rϕ,N={ x(N)∈Rn∣∣∀k∈{0,...,N−1}:x(k+1)⊨ϕk+1, x(k+1)=f(x(k),u(k))+w(k),w(k)∈Zw, u(k)∈Uk,x(0)∈X0,x(0)⊨ϕ0}. (8)

The reachable set can represented by a zonotope or a constrained zonotope .

## Iii Reachability Analysis Given STL Side Information

In the previous section, we showed how to generate a data-driven reachable set from input-state data. In this section, we show how to incorporate STL formulas in data-driven reachability analysis. Algorithm 2 summarizes our proposed approach using zonotopes. The input to the algorithm is the data-driven reachable zonotope from Algorithm 1 and STL side information , , of the form (7). In line 3, we construct a predicate function from , such that if , then [14]. We consider first the linear case, where is a linear formula with respect to . In this case, we represent by a linear strip in (5) by having . The intersection between the linear strip and the current zonotope is provided in lines 6 and 7. Many scenarios contain nonlinearity in the side information in which we propose to represent the as a nonlinear strip and perform an intersection with the data-driven reachable set. More specifically, we consider nonlinear strips in (5) with , where the intersection is provided in lines 10 and 11.

The reachable set can be represented by a zonotope from Algorithm 1 or as a constrained zonotope [1]. Using constrained zonotopes allows for less conservative results, but come with extra computational cost. We propose Algorithm 3 to compute reachable sets under STL side information using constrained zonotope. Similar to Algorithm 2, we construct from in line 3. Then, we provide intersection between constrained zonotope and linear in lines 6 and 7. In case of nonlinear , we provide the intersection in lines 10 to 12. In both Algorithms 2 and 3, we guarantee state inclusion by providing an over-approximated intersection between the data-driven reachable set and the . To guarantee state inclusion in the STL generated set in case of nonlinear , we linearize and over-approximate the infinite Taylor series by a first order Taylor series and its Lagrange remainder [5, p.65]. The next theorems shows the provided guarantees.

###### Theorem 1

Algorithm 2 provides reachability analysis with state inclusion guarantees under STL side information, i.e., .

In order to prove state inclusion guarantees, we show that the resultant intersection between and the reachable zonotope contains the state in all cases. We omit the proof in the linear case as it follows immediately from [22, Prop.1]. We prove the guaranteed intersection in the nonlinear case as follows: We aim to find the zonotope that over-approximates the intersection. Let , then there is a , where

 x=^ck+^Gkzk. (9)

Adding and subtracting to (9) results in

 x=^ck+λi,k∂hi,k∂x|x∗i,k^Gkzk+(I−λi,k∂hi,k∂x|x∗i,k)^Gkzk. (10)

Given that , then , i.e., there exists for such that:

 hi,k(x∗i,k) +∂hi,k∂x|x∗i,k(x−x∗i,k)+⋯=ri,kd. (11)

Inserting (9) into (11)

 −hi,k(x∗i,k)−∂hi,k∂x|x∗i,k(^ck−x∗i,k)−… +ri,kd= ∂hi,k∂x|x∗i,k^Gkzk

Considering the Lagrange remainder [5, p.65] results in

 ∂hi,k∂x|x∗i,k^Gkzk∈ −hi,k(x∗i,k)−∂hi,k∂x|x∗i,k(^ck−x∗i,k) −ZL,i,k+ri,kd. (12)

Inserting (12) in (10) results in

 x∈ ^ck+λi,k(−hi,k(x∗i,k)−∂hi,k∂x|x∗i,k(^ck−x∗i,k)−ZL,i,k +ri,kd)+(I−λi,k∂hi,k∂x|x∗i,k)^Gkzk = ^ck−λi,k(hi,k(x∗i,k)+∂hi,k∂x|x∗i,k(^ck−x∗i,k)+cL,i,k)¯ck

Note that as . Thus, the center and the generator of the over-approximating zonotope are and , respectively.

###### Theorem 2

Algorithm 3 provides reachability analysis with state inclusion guarantees under STL side information, i.e., .

Similar to the proof of Theorem 1, we omit the proof for the linear case as it follows immediately from [32, Prop.1] and prove the guaranteed intersection in the nonlinear case as follows: Let , then there is a such that

 x =^ck+^Gkzk, (13) ^Akzk =^bk. (14)

Given that is inside the intersection of the constrained zonotope and , there exists a such that

 hi,k(x∗i,k)+∂hi,k∂x|x∗i,k(x−x∗i,k)+⋯=ri,k d. (15)

Inserting (13) into (15) results in

 hi,k(x∗i,k)+∂hi,k∂x|x∗i,k(^ck+^Gkzk−x∗i,k)+⋯=ri,k d. (16)

We combine (16) and (14) while considering the Lagrange remainder yields

 ⎡⎢⎣^Ak00∂hi,k∂x|x∗i,k^Gk−ri,kGL,i,k⎤⎥⎦¯Ak ⎡⎢⎣zkdzL⎤⎥⎦zb= ⎡⎢⎣^bk−hi,k(x∗i,k)−∂hi,k∂x|x∗i,k(^ck−x∗i,k)−cL,i,k⎤⎥⎦¯bk.

Note that we consider the superset consisting the equality (16) by solving it for all . Then, we can assure that (16) is also satisfied.

In the next section, we empirically show that the reachable sets computed from these intersections is a practical improvement compared to original data-driven reachable sets.

## Iv Evaluation

In this section, we detail the application of our method to two examples. Readers can find an overview video of our experiments conducted at the Smart Mobility Lab at [https://bit.ly/DataReachSTL].

For our experimental platform, we represent a vehicle with an SVEA vehicle [17]. We use historical data sets of length points gathered from the same car from other driving scenarios than the presented ones. We perform a single-step reachability analysis for each example, and we manually operate the car such that its behavior satisfies the known side information. Measurements for both the historical data sets and our two examples are made using a motion capture system. The assumed process noise zonotope is and measurement noise zonotope of value . For both examples, let and its environment be defined over . In other words, ’s state is written as , where and are the x and y positions of . Now, in the following sections, we will introduce our two scenarios for and present the results for each case. To the extent of the authors’ knowledge, there are no comparable methods that use STL formulae as side information instead of specifications for reachability analysis; thus, we do not include comparisons with alternative methods (other than the original approach in [1]) in either example.

### Iv-a Parking Lot Example

In this example, we only consider side information that contains only linear spatial constraints. Suppose is parked in the parking lot and is scheduled to depart the parking lot soon. As denoted in Fig. 2, let the set of states corresponding to the parking region be and the set of states corresponding to the outside of the parking region (the street) be . Note, the entrance and exit of the parking lot is considered both part of the parking region and the street. We know that is scheduled to leave the parking region within 25 seconds of the start of our scenario. Thus, we can write the following STL formula as the known side information about :

 ϕp::=G[0,25](P) ∧ F[0,25](P∧O) ∧ G[25,40](O). (17)

We can find the functions to , which encode (17):

 h1(x1,x2)=1.7175−|x1−0.2805|,t∈[0,25], h2(x1,x2)=2.429−|x2−0.839|,t∈[0,25], h3(x1,x2)=1.3045−|x1+0.3225|,t∈[24,25], h4(x1,x2)=0.453−|x2+1.137|,t∈[24,25], h5(x1,x2)=1−|x2+1.665|,t∈[25,40],

where and models our knowledge of ’s time within the region , and encodes eventually reaching the exit region before , and corresponds to our knowledge of when departs to . Fig. 3 shows a snapshot of the data-driven reachable sets before and after being constrained by at . We show the unconstrained, data-driven reachable sets in Fig. 3(a) and the STL reachable sets constrained by in Fig. 3(b).

Then, suppose we know the upper limit of ’s capability to move forward and change heading between each sampling time. Let this set be denoted by . Then, we can expand (17) into the following STL formula as the known side information about : . Now, we find the additional functions , , which encode the constraints corresponding to . Let be the heading angle and be the known, maximum heading angle change between each sampling time. We derive the constrained rectangular region , shown in Fig. 6, with the following equations using the edges coordinates , :

 h6(x1,x2)=0.5|c2−c3|−|−m2x1+x2−0.5(c1+c4)|, h7(x1,x2)=0.5|c1−c4|−|−m1x1+x2−0.5(c2+c3)|,

where for , , and . Both and are defined for . The reachable sets using as side information and constrained zonotope are shown in Fig. 3(c). The average volumes of the reachable sets are presented in Table I.