1 Introduction
In the context of autonomous systems and robotics, linear temporal logic (LTL) provides an expressive language for defining desired properties of an autonomous agent that extends the typical pointtopoint motion planning problem which has been studied extensively in the robotics literature [1]. LTL extends predicate logic with operators that allow constraints to be placed on the ordering of events. The techniques that have been developed for planning motions satisfying specifications given as LTL formulae are well suited to systems requiring guaranteed satisfaction of safety requirements and traceability of failures.
Most approaches share two key elements: (i) a discrete abstraction of the system is constructed along with a labeling of the discrete system with properties relevant to the specification, (ii) the specification is translated into a finite automaton which accepts runs of the system satisfying the specification. However, practical challenges lead to many variations on this approach. Discrete abstractions can be constructed by sampling a finite number of discrete motions [2, 3] in the state space or by a finite partition of the state space [4, 5]
. The discrete abstraction was formulated as a Markov Decision process to handle uncertainty in the system in addition to a performance objective in
[6]. Resolving conflicting specifications was treated in [7], and generating trajectories satisfying LTL formulae using Monte Carlo methods was recently investigated in [8].While there are numerous variations on the basic approach available, there are many remaining challenges related to bringing the theory to practice. A recent literature review [9]
discusses some of the open problems in greater detail, One of the principal challenges with planning to meet an LTL specification is the labeling of the discrete system with features extracted from sensor data by the perception system. These geometric computations dominate the computational requirements of the planning process. This paper investigates practical aspects of constructing the labeling function in realtime by leveraging precomputed data and a highly parallel implementation. A fixed discrete abstraction is computed offline and used in multiple receding horizon planning queries at runtime by exploiting equivariace in the differential constraints present in models for mobile agents. Equivariance in the dynamic model was similarly exploited in
[10]. Data from the perception system at a given instant can then be mapped, in parallel, to each of the precomputed trajectories making up the discrete abstraction.Constructing discrete abstractions for differentially constrained systems is reviewed in Section 2. Section 3 discusses labeling of discrete abstractions with properties relevant to the task specification and construction of monitors to detect violation of safety properties expressed in LTL. The principal contribution of the paper, presented in Section 4, describes a reduction of the labeling operation to a binary matrix multiplication with efficient processor memory access patterns and is readily accelerated by parallel computation on a graphics processing unit (GPU) or application specific integrated circuit. Lastly, the labeling technique is tested on a probabilistic roadmap [2] designed for autonomous driving using on a commodity GPU.
2 Discrete Approximations of Robot Mobility
The mobility of an autonomous agent is initially modeled by a controlled dynamical system with state and control action at time . The dynamical system, derived from first principles, relates control actions to the resulting trajectory
(1) 
An initial condition is given, and the control actions must be selected so that the unique trajectory through resulting from taking actions meets a planning specification and minimizes a cost function of the form
(2) 
In the interest of computing a motion meeting the specification in realtime, many approaches to motion planning approximate the set of trajectories satisfying (1) as a directed graph or transition system where the is a finite subset of the state space containing , and . For each transition , we associate a trajectory and control signal with finite duration such that and . The trajectory and control signal associated to a transition will be denoted and respectively. Similarly, the net cost of an edge is given by , which will be abbreviated with some abuse of notation by .
A finite trace of the transition system is a finite sequence of states in such that each sequential state is a transition . Due to the time invariance of (1), a feasible trajectory and control signal can be recovered from each finite trace by concatenating the trajectories and controls associated to each transition , and .
3 Properties of Trajectories
A finite set of atomic propositions , rich enough to express the task planning specification in the syntax of LTL, are given. For example, in the context of advanced driver assistance systems, might include DrivableSurface, LegalSurface, NominalSurface, etc. In a given scenario, an interpretation of true or false ( or ) is assigned to each proposition in at each state. A state labeling function provides the map from each state to the interpretation of each proposition (there is a natural bijection between and the powerset and it is customary to use the powerset representation).
The state labeling function can be applied pointwise to a trajectory to construct a state labeling function defined as follows
(3) 
Intuitively, this construction labels a transition with each proposition encountered by the associated state trajectory .
Sequences of transitions of the transition system form strings over which can be scrutinized for satisfaction or violation of the task specification.
3.1 Linear Temporal Logic as a Specification Language
Linear temporal logic (LTL) has become one of the predominant means of specifying desired properties of motions for autonomous agents. It consists of the usual logical operators (not), (and), (or), together with the temporal operators (until) and (next). The set of LTL formulae are defined recursively as follows:

Each subset of is a formula.

If is a formula, then is a formula.

If and are formulae, then is a formula.

If and are formulae, then is a formula.

If is a formula, then is a formula.
Let be an infinite sequence of elements from . Such a sequence is called an word over . In the context of motion and task planning, each is a subset of representing the atomic propositions which are true at time . The semantics of LTL define which words satisfy a LTL formula , in which case we write the relation . A pair in the complement of the satisfaction relation is denoted . The satisfaction relation for LTL is defined recursively as follows:

For , if .

if .

if or .

if .

if there exists such that and for each , .
Useful constructs derived from these operators are the following:



)




The set of words that satisfy a formula is an regular language. When monitoring a system in real time, only finite prefixes of infinite execution traces are observable from the finite operating time of the system so it cannot always be determined from a finite prefix of an word if it will ultimately satisfy or violate a particular LTL formula. For example, satisfaction of a persistent surveillance specification, which can be expressed as (always eventually visit X), cannot be verified by observing a finite prefix of an infinite trace since a future visit to must take place at a later time than what can be observed. A finite prefix is a bad prefix if all words beginning with that prefix fail to satisfy a formula. The notion of good prefix is defined analogously.
3.2 Büchi Automata
A Büchi Automaton consists of a set of states , a transition relation , an initial state and a set of accepting states . An regular word is accepted by a Büchi Automaton if there exists a sequence of states in such that and if there exists a state in appearing infinitely often in the sequence of states associated with . The purpose of runtime monitors is to identify good and/or bad prefixes from finite executions of a system.
Like the regular words satisfying an LTL formula, the regular words accepted by a Büchi Automaton is an regular language. This language will be nonempty if there are strongly connected components of the automaton reachable from the initial state. A variety of algorithms and implementations are available (e.g. [11]) for constructing a Büchi Automaton accepting exactly the regular words satisfying an LTL formula.
A subset of the automaton’s states of interest are those states which can reach a strongly connected component. Let denote this subset, and define the nondeterministic finite automaton . Among the results in [12] was the observation that the regular language (in contrast to regular) rejected by this new automaton is exactly the set of bad prefixes violating the safety specification. This provides a means of detecting violations of LTL safety specifications from finite strings.
Restricted to the discrete abstraction with labeling function and cost function discussed in Section 2, the set of trajectories with finite duration which do not violate a LTL formula are given by paths on such that there exists a sequence of states on with . Note that these are simply the paths in the product graph with vertices , and edges in the edge set if and . The weighting function on edges of can be extended to edges of the product graph as . A minimum cost path reaching a terminal state in without violating the LTL formula can then be computed by solving the shortest path problem on the product graph.
Example
As an example in the context of autonomous freeway driving, the requirement that the vehicle should not split driving lanes for two or more consecutive transitions in the state abstraction can be expressed as
(4) 
Figure 1 illustrates how this specification can be monitored on traces of a discrete abstraction of the autonomous vehicle’s model of mobility.
4 Realtime Labeling of Transition Systems
The above discussion outlines a mathematical framework for approaching motion planning problems subject to specifications given as LTL formulae. In practice, the computational bottleneck encountered in implementing this approach is constructing the labeling function determined by the scene perceived by the perception system.
The subset of a state space where an atomic proposition is interpreted as is typically defined by states where the associated physical volume occupied by the agent intersects some volume associated with that proposition. The physical subset of space^{1}^{1}1This is generally a three dimensional space, but a two dimensional space may be sufficient for ground robots. Alternatively, time could be included in a spatiotemporal workspace leading to potentially four dimensional workspaces. occupied by the autonomous agent is distinct from, and may have differing dimension than the state space. This is referred to as the workspace, and the mapping from a state of the agent to the subset occupied by the agent in the workspace will be denoted by
(5) 
In this context, an atomic proposition associated to a subset of the workspace belongs to the label of an edge if
(6) 
This allows for a succinct definition of the labeling function as follows:
(7) 
Figure 2 illustrates the definition of the labeling function. The focus of the remainder of the paper is a discussion of how to approximately evaluate (7) in realtime.
4.1 Partitioning and Indexing the Workspace
Subsets associated to particular predicates in the workspace must be approximated by some finite representation. The workspace geometry is restricted to rectangular regions in . This region is partitioned into an occupancy grid of hyperrectangular regions and these cells are indexed with integer values using a dimensional zorder curve. Algorithm 1
illustrates how an index is computed for a particular point in the workspace by descending a space partitioning binary tree to determine the index of a point. Each level of the binary tree represents a contribution of a power of two to the index. If the point is on the high side of a space partitioning hyperplane at depth
, then is added to the index. Algorithm 1 indexes points in along the zorder curve with. With finite precision, the same indexing can be accomplished in finite time by interleaving the bits of the individual coordinates of the point.4.2 Labeling the Transition System via Boolean Matrix Multiplication
In reference to (7), determining if requires intersecting two subsets of the workspace. If the subset associated with the trajectory is approximated by the binary vector , and the subset associated with the proposition is approximated by a binary vector , whether or not their intersection is empty can be computed by evaluating
(8) 
In connection to the labeling function,
(9) 
Let the matrix be a binary matrix who’s rows are the binary vectors associated to each trajectory in the transition system approximating the autonomous agent’s mobility. Similarly, let be a binary matrix who’s columns correspond to the binary vectors associated with each atomic proposition. Then computation of (7) for each proposition and trajectory can be distilled into a binary matrix multiplication,
(10) 
where indicates that .
4.3 Accelerated Binary Matrix Multiplication
The following implementation discussion makes use of several practical observations and assumptions:

The required number of trajectories and number of rectangular regions partitioning the workspace is large relative to the number of atomic propositions.

As a result of having a large number trajectories, the duration of each trajectory is small leading to a small fraction of the workspace swept out by . In contrast, the volume of the workspace associated to a particular predicate could be large (e.g. the drivable surface in a scene).

The volume swept out in the workspace by will be a somewhat spatially coherent region which maps to a small number of clustered entries (via the zorder curve) in the associated binary vector. In contrast, the volume occupied by an atomic proposition may be a large fraction of the workspace.
Since each trajectory sweeps out a small fraction of the workspace, the matrix M in (10) will be sparse in the sense that it will have few entries. This suggests that the matrix be stored in compressed sparse row (CSR) format. The location of entries of are represented by two arrays and . The entry of is the total number of entries in rows up to, but excluding, . The entries of contain the column index of each entry of read from left to right and top to bottom. This is illustrated with the following example matrix and its CSR format:
(11) 
The proposition matrix is much smaller than the trajectory matrix and is not observed to be particularly sparse. Therefore, it is left in the dense 2dimensional array format and the appropriate sparsedense matrix multiplication algorithm is described in Algorithm 2
The advantage of using a sparse representation for is the reduction in memory requirements in proportion to the sparsity of , and similarly the reduction in the number of operations required to perform the matrix multiplication. However, if the entries are scattered throughout the matrix as illustrated in (11), the incremented values of in line 3 of the multiplication algorithm will vary erratically leading to random memory accesses and poor cache utilization. In light of assumption A3, the volume swept out by each trajectory is mapped to a clustered region within each row of the matrix remedying this problem.
5 Application to Autonomous Freeway Driving
These concepts are tested in the context of level 4 autonomous freeway driving where LTL specifications are used to represent safety requirements of freeway driving.
The dynamic model representing the mobility of the vehicle is the following:
(12) 
This models the nonholonomic constraint of the singletrack bicycle model with generalized coordinates located between the front wheels, and representing the heading of the vehicle. The steering angle and acceleration are treated as the control variables with longitudinal velocity integrating acceleration. Additionally, since autonomous driving requires accounting for dynamic objects, a state is used to keep track of time so that dynamic objects become static subsets of the resulting augmented state space.
The workspace consists of a rectangular subset of with two coordinates associated with a position in the plane and the third coordinate is associated with time. In reference to Section 4, the mapping from a state to a subset of the workspace is constructed by locating a topdown view of a bounding box or footprint of the vehicle determined by the coordinates , and and . This 2dimensional rectangle is located at along the third axis in the 3dimensional workspace. To illustrate this, Figure 5 depicts the two subsets of the workspace that could be tested for intersection (7). In the timeaugmented workspace the image of the state trajectory under does not encounter the dynamic object (proposition) which is traveling across the path of the vehicle. If a projection into the plane were used instead as the workspace, the system would not be able to reason about the motion of the moving object.
A discrete abstraction of the system in (12) is constructed using a probabilistic roadmap which uses a finite number of sampled states from the state space as states of the transition system with transitions to a number of each state’s nearest neighbors computed by a steering function as required by the algorithm [2]. From one planning query to the next, the vehicle’s initial position may vary substantially. To remedy this issue, note that the dynamics in (12) are equivariant to translations along the subspace. That is, if the coordinate system is redefined as
(13) 
for any value of then the transition system will remain dynamically feasible in the new coordinate system.
5.1 Numerical Experiments
The principal contribution of this paper is to present the performance of the proposed GPUaccelerated transition labeling procedure of Section 4 on a transition system of interest to autonomous driving. To generate realistic labeling function construction queries, a scenario was simulated where the vehicle travels on a closed circular loop with randomly generated agents driving along the route at various lateral positions and speeds. Two atomic propositions from the driving specification are tested. The first proposition represents the anticipated volume swept out by the other agents at each labeling function construction query. The second proposition represents the region outside the nominal driving surface. The subset of the workspace associated with represents dynamic objects occupying a small fraction of the workspace while represents a static object occupying a majority of the workspace’s volume.
The workspace is partitioned into rectangular regions as described in Section 4.1, and an Nvidia GTX 1080 GPU was used for the experiments. The reported label construction times include the time to transfer data between the GPU over PCIe in addition to the computation running time. Transition systems of various sizes are tested on 150 labeling function construction queries. The labeling function construction results are summarized in Table 1, and Figures 6.
Importance of sampling test queries from realistic distributions:
Initial experiments were carried out on randomly generated subsets associated to motions and propositions. Each subset was generated by randomly selecting the occupancy of a voxel by sampling a bernoulli random variable with bias equal to the desired overall workspace occupancy. This resulted in unrealistically fast computation time for the following reason: If the probability that a particular voxel is occupied by a motion or predicate is
and respectively, then the probability that sequentially examined voxels are not simultaneously occupied by a motion and proposition is which tends to zero exponentially fast in. If intersection is detected before all voxels have been examined, the remaining voxels have no effect on the result and the computation can be terminated early. With random voxel selection, the number of voxels which need to be examined before early termination occurs follows a geometric distribution with an expected value,
(14) 
Number of transtions  154,776  295,700  568,958  836,276  1,097,702 
Mean workspace occupancy (per transition)  0.0223%  0.0223%  0.0223%  0.0223%  0.0223% 
labeling time ()  3.67ms  6.60ms  12.77ms  18.46ms  24.40ms 
labeling time ()  2.01ms  3.25ms  5.95ms  8.40ms  11.02ms 
Mean workspace occupancy ()  90.0%  89.9%  89.9%  89.9%  89.9% 
Mean workspace occupancy ()  1.17%  0.909%  0.928%  1.26%  1.07% 
GPU memory bandwidth utilization (Gb/s)  177.61  188.55  187.68  190.96  189.62 
Mean and variance of transition labeling time for the two propositions investigated. A linear dependence on the number of transitions is observed which is consistent with the number of binary operations required in (
9). Labeling time is observed to be inversely related to proposition occupancy of the workspace. This is consistent, but not accurately predicted by equation (14) which justifies the need for realistic simulated scenarios.5.2 Discussion
In reference to Table 1, the labeling function construction time scales linearly with the size of the transition system. This is consistent with the linear scaling of the number of binary operation required to compute the binary matrix multiplication in (10). The proposition occupied roughly 90% of the workspace while the proposition occupied only around 1%. One would expect that the proposition with higher occupancy would require less computation time as a result of the early termination phenomena discussed in Section 5.1. This is consistent with the observation of roughly twice the time required for versus . However, the uniformly sampled random subset model (14) predicts a difference in amortized label construction time by a factor of 90:
(15) 
The difference between what is predicted and what is observed highlights the importance of sampling subsets for the performance study from realistic scenarios.
6 Conclusion
The proposed transition system labeling technique was demonstrated to label transition systems approximating the mobility of an autonomous vehicle at a rate of 4e78e7 transitions per propositionsecond with variation due to the geometry and fraction of the workspace occupied by the subset associated to each proposition. With a fairly standard PRM construction, a transition system with roughly 1e6 transitions is capable of demonstrating a wide range of maneuvers from low to freeway speeds. If the driving specification is expressed with 10 atomic propositions, then the labeling task can be accomplished in 125ms250ms. This is marginally suitable for autonomous driving where the latency of the entire system must be well under one second. The implementation is not highly optimized for the GPU architecture however and with some effort the performance could likely be improved by considering more effective use of shared memory and caches. Alternatively, an application specific integrated circuit could be constructed to perform the labeling operation with a greater degree of parallelism.
References
 [1] LaValle, S.M.: Planning algorithms. Cambridge university press (2006)
 [2] Karaman, S., Frazzoli, E.: Samplingbased algorithms for optimal motion planning. The international journal of robotics research 30(7) (2011) 846–894
 [3] Vasile, C.I., Belta, C.: Samplingbased temporal logic path planning. In: Intelligent Robots and Systems (IROS), 2013 IEEE/RSJ International Conference on, IEEE (2013) 4817–4822
 [4] Kloetzer, M., Belta, C.: A fully automated framework for control of linear systems from temporal logic specifications. IEEE Transactions on Automatic Control 53(1) (2008) 287–297
 [5] KressGazit, H., Fainekos, G.E., Pappas, G.J.: Temporallogicbased reactive mission and motion planning. IEEE transactions on robotics 25(6) (2009) 1370–1381
 [6] Ding, X., Smith, S.L., Belta, C., Rus, D.: Optimal control of markov decision processes with linear temporal logic constraints. IEEE Transactions on Automatic Control 59(5) (2014) 1244–1257
 [7] Tumova, J., Castro, L.I.R., Karaman, S., Frazzoli, E., Rus, D.: Minimumviolation LTL planning with conflicting specifications. In: American Control Conference (ACC), 2013, IEEE (2013) 200–205

[8]
Paxton, C., Raman, V.:
Combining neural networks and tree search for task and motion planning in challenging environments.
IROS 17/RLDM 17: (2017)  [9] Plaku, E., Karaman, S.: Motion planning with temporallogic specifications: Progress and challenges. AI Communications 29(1) (2016) 151–162
 [10] Frazzoli, E., Dahleh, M.A., Feron, E.: Maneuverbased motion planning for nonlinear systems with symmetries. IEEE transactions on robotics 21(6) (2005) 1077–1091
 [11] Gastin, P., Oddoux, D.: Fast LTL to Büchi automata translation. In: International Conference on Computer Aided Verification, Springer (2001) 53–65
 [12] Bauer, A., Leucker, M., Schallhart, C.: Runtime verification for LTL and TLTL. ACM Transactions on Software Engineering and Methodology (TOSEM) 20(4) (2011) 14
Comments
There are no comments yet.