Enhancing Data-Driven Reachability Analysis using Temporal Logic Side Information

09/15/2021 ∙ by Amr Alanwar, et al. ∙ KTH Royal Institute of Technology 0

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.



There are no comments yet.


page 1

page 5

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.

Fig. 1: Snapshots from our experiment video where an SVEA vehicle leaves a parking lot in the Smart Mobility Lab and its STL reachable sets are drawn in red at different time instances.

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


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

Definition 2

(Zonotope [20, 16]) Given center and

generator vectors in a generator matrix

, a zonotope is defined as

We use the shorthand notation .

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


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


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


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

Definition 5

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


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:


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:

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.

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].

Input: input-state trajectories , initial set , process noise zonotope and matrix zonotope , Lipschitz constant , covering radius , input zonotope , data-driven zonotope
Output: data-driven zonotope

Algorithm 1 Reachability analysis for Lipschitz nonlinear system

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


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

Iii Reachability Analysis Given STL Side Information

Input: data-driven zonotope , STL side information ,
Output: STL zonotope

2:for  do
3:     Construct from
4:     if  is linear then
5:         //
8:     else if  is nonlinear then
9:         //
12:     end if
13:end for
Algorithm 2 Reachability analysis under STL side information using zonotopes

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.

Input: data-driven constrained zonotope , , STL side information ,
Output: STL constrained zonotope

2:for  do
3:     Construct from
4:     if  is linear then
5:         //
8:     else if  is nonlinear then
9:         //
13:     end if
14:end for
Algorithm 3 Reachability analysis under STL side information using constrained zonotopes

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


Adding and subtracting to (9) results in


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


Inserting (9) into (11)

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


Inserting (12) in (10) results in

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


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


Inserting (13) into (15) results in


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

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

Fig. 2: Illustration of our parking lot example on the left and roundabout example on the right.
Zonotope Constrained zonotope
No constraints 9.722 -
constraints 9.311 7.042
constraints 0.124 0.076
TABLE I: Average volumes in the parking example.

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.

Fig. 3: Snapshot showing the result of constraining a reachable set from the parking example.
Fig. 4: The reachable sets without constraint in (a), with constraints in (b) and constraint in (c).
Fig. 5: The reachable sets without constraint in (a), with constraints using zonotope and constrained zonotope in (b) and (c), respectively.
Zonotope Constrained zonotope
No constraints 9.722 -
constraints 9.109 5.956
TABLE II: Average volumes in the roundabout 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 :


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

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).





Fig. 6: Constrained region for .

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 , :

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.

Iv-B Roundabout Example

We evaluate how the STL-based side information constrains the reachable sets when a nonlinear spatial constraint is included in the side-information. Suppose enters, drives around, and exits a roundabout intersection. For this example, we assume we have a rough prediction of when will enter and exit the roundabout. As illustrated in Fig. 2, let the region before the roundabout be , the roundabout itself be , and the region after the roundabout be . We model the roundabout as a circle and we will use to introduce nonlinearity into our side information. Finally, we know that will enter the roundabout within 4 seconds and will leave the roundabout within seconds of the start of the scenario. We formalize the side information with the following STL formula: