This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Automating Geometric Proofs of Collision Avoidance with Active Corners

Nishant Kheterpal1 University of Michigan    Elanor Tang University of Michigan    Jean-Baptiste Jeannin University of Michigan
Abstract

Avoiding collisions between obstacles and vehicles such as cars, robots or aircraft is essential to the development of automation and autonomy. To simplify the problem, many collision avoidance algorithms and proofs consider vehicles to be a point mass, though the actual vehicles are not points. In this paper, we consider a convex polygonal vehicle with nonzero area traveling along a 2-dimensional trajectory. We derive an easily-checkable, quantifier-free formula to check whether a given obstacle will collide with the vehicle moving on the planned trajectory. We apply our method to two case studies of aircraft collision avoidance and study its performance.

**footnotetext: Emails: {nskh, elanor, jeannin}@umich.edu

I Introduction

Preventing collisions with obstacles or foreign objects is crucial when developing autonomous capabilities for robots, cars, aircraft, and many other vehicles. As such, collision avoidance remains a major research theme of the autonomy, robotics, and formal methods communities. In particular, for safety-critical tasks such as vehicles interacting with humans or animals, it is imperative to provide formal proofs that the vehicle will not collide with agents in its environment.

In many papers studying trajectory planning or collision avoidance, e.g. [29, 3, 19], the vehicle is modeled as a point, and the volume – or surface area – occupied by the vehicle is ignored. In reality, land and air vehicles are not points but have a certain volume, and contact of any external object with any part of the vehicle would constitute a collision. In this paper, we present a novel, automated, and general technique to transform a planned trajectory of a vehicle with volume into explicit boundaries of the region in which an obstacle will not be at risk of a collision. This transformation provides an efficient, runtime-checkable test to determine whether a given obstacle will collide with a vehicle on the planned trajectory, even when the vehicle has volume.

Given a part of a trajectory 𝒯\mathcal{T}, a vehicle occupying the volume v(x𝒯,y𝒯)v(x_{\mathcal{T}},y_{\mathcal{T}}) when centered on position (x𝒯,y𝒯)(x_{\mathcal{T}},y_{\mathcal{T}}) along the trajectory, and a point-obstacle (xO,yO)(x_{O},y_{O}), the vehicle will not collide with the obstacle if and only if:

(x𝒯,y𝒯)𝒯,(xO,yO)v(x𝒯,y𝒯)\displaystyle\forall(x_{\mathcal{T}},y_{\mathcal{T}})\in\mathcal{T},(x_{O},y_{O})\not\in v(x_{\mathcal{T}},y_{\mathcal{T}}) (1)

In the rest of the paper, we will call this formulation the implicit formulation of collision avoidance. This implicit formulation is a correct definition, but it has one major drawback: because of the universal quantifier on (x𝒯,y𝒯)(x_{\mathcal{T}},y_{\mathcal{T}}), it is not easy to check systematically or at runtime whether an obstacle is indeed at risk of a collision. Ideally, we would want to obtain a quantifier-free, easily checkable formula that is equivalent to (1); in the rest of this paper we will call that formula, which represents a region in the plane, the explicit formulation. In theory, one could use quantifier elimination, but for trajectories containing more than a few symbolic parameters, the algorithm does not finish in a reasonable time due to its doubly-exponential time complexity in the number of variables [13].

This issue arose before, notably in the verification of the Next-Generation Aircraft Collision Avoidance System ACAS X [21, 22]. In that work, the formal proof of correctness was divided into: (i) establishing the trajectory of the aircraft from its equations of motion, leading to a formula of the form of (1); and (ii) establishing an equivalent quantifier-free formula that can be checked efficiently at runtime. Both tasks required a proof in the KeYmaera X theorem prover, with significant manual effort [30]. The object of this paper is to automate and generalize task (ii) of this process.

In order to automate task (ii), we propose a different approach based on geometric intuition. Let us examine an example of a rectangular vehicle performing a simple maneuver (Figure 1). The central idea of the method presented in this paper is that the boundaries of the explicit formulation are either trajectories of a corner of the vehicle or sides of the vehicle at a few particular points. The use of corners is geometrically intuitive, yet we are not aware of past work that uses corners in this way to prove reachability properties.

The corners to consider at every point depend on the slope of the trajectory: for a rectangular vehicle, the boundaries follow the top-right and bottom-left corners when the vehicle’s velocity is directed “northwest” (towards the top left) or southeast; and, symmetrically, the boundaries follow the top-left and bottom-right corners when the vehicle’s velocity is directed towards the northeast or southwest of the plane. We call these corners active corners. But this is not enough: at points where the trajectory switches from following one set of corners to another, the boundary may follow a side of the vehicle at that point, e.g., its bottom boundary at the lowest point of the trajectory on Figure 1. We call these points transition points. By capturing the motion of these boundaries – both corners depending on the slope or sides of the vehicle – we can construct a quantifier-free formula equivalent to (1), corresponding to its equivalent explicit formulation. Our approach is fully symbolic with no approximation.

In this paper, we formalize and generalize our approach to different trajectories and polygons and show how to find active corners and transitions symbolically and how to form a quantifier free explicit formulation equivalent to the input implicit formulation. We carefully prove that our transformation is both sound (that any obstacle shown safe using the explicit formulation is safe using the implicit formulation) and complete (no obstacles that are actually safe appear unsafe using the explicit formulation). Finally, we detail a fully symbolic Python implementation of our work and present an evaluation of its performance on two applications from previous papers (where we fully automate results that had required significant manual proof effort) and a third non-polynomial example.

II Overview

xxyy
Figure 1: Safe region for a rectangle with w=2,h=1w=2,h=1 and its center following Equation (2). The trajectory is dashed in purple, safe region shaded in green, and unsafe region is unshaded.

This section provides an overview of our approach, by walking through the different steps of a simple example constructing a geometric safe region used to verify obstacle avoidance of aircraft. At present, our method applies only to two-dimensional planar motion due to the increased complexity of three-dimensional motion when analyzing trajectories and polyhedra. The example uses linear motion and a rectangle, though the method generalizes to other planar motion and convex polygons, as detailed in Section IV.

II-A Trajectory

Consider the planar side-view of an airplane flying, initially descending at constant velocity and then ascending with constant velocity. For simplicity, assume the aircraft has infinite acceleration. In this example, we represent the bounds of the aircraft as an axis-aligned rectangle with width 2w2w and height 2h2h that moves in the (x,y)(x,y) plane. The airplane begins at the origin and moves in the plane with piecewise trajectory 𝒯\mathcal{T}:

𝒯={y=2xx[0,5]y=x15x[5,)\mathcal{T}=\begin{cases}y=-2x&x\in[0,5]\\ y=x-15&x\in[5,\infty)\end{cases} (2)

II-B Implicit Formulation

Suppose the rectangle translates with its center moving along this piecewise trajectory. Additionally, assume there is a point obstacle at (xO,yO)(x_{O},y_{O}) to be avoided; that is, the rectangle never intersects the obstacle. Then we can state an quantified (or implicit) formulation of obstacle avoidance:

(x𝒯,y𝒯)𝒯,(|xOx𝒯|>w|yOy𝒯|>h)\forall(x_{\mathcal{T}},y_{\mathcal{T}})\in\mathcal{T},\left(|x_{O}-x_{\mathcal{T}}|>w\vee|y_{O}-y_{\mathcal{T}}|>h\right) (3)

The implicit formulation of the safe region (3) straightforwardly represents a safety property of obstacle avoidance - if an object moving with its center fixed along the nominal trajectory 𝒯\mathcal{T} is far enough away (either width ww in the xx-axis or height hh in the yy-axis) from a point obstacle at (xO,yO)(x_{O},y_{O}), it is safe. Here we use safe region to mean the set of all obstacle locations for which collision is avoided.

II-C Explicit Formulation

The need for a quantifier-free equivalent of Equation (3) motivates an explicit formulation of the safe region for the obstacle. The goal of this work is to automate the generation of such a formulation. We compute the reachable set of the object as it moves along a trajectory in order to compute the complement of the safe region: the unsafe region. We can express the unsafe region (the set of all locations for which an obstacle will collide with the object as it moves along a given trajectory) directly as a union of regions in the plane, each defined (in this case) by an intersection of linear inequalities bounding the region, plotted in Figure 1. The inequalities are presented in Appendix A.

III Algorithm

III-A Preliminaries

In this work, we define the safe region as the set of obstacle locations where, given a polygon’s trajectory, a collision will not occur. Correspondingly, the unsafe region is called that because it will be unsafe if an obstacle invades that area. As such, the unsafe region corresponds to the reachable set of the polygon as it moves along a trajectory. We can define a quantified representation of the safe region: the implicit formulation from (1). We also use the term explicit formulation in this work; we use that to mean an equivalent to the implicit formulation, but without quantifiers like \forall and \exists. Our method applies to convex polygons; concave polygons and circles are not within the scope of this work. In this paper, we discuss polygons with central symmetry for ease of exposition, though the method straightforwardly extends to irregular and asymmetric convex polygons (Appendix B).

We consider two-dimensional planar trajectories defined piecewise, with each piece a function y=f(x)y=f(x) or x=f(y)x=f(y) and ff a C1C^{1} function (differentiable and having a continuous derivative). Trajectories must have a finite number of these C1C^{1} pieces. The pieces themselves need not be continuous, though the applications we study do include continuous piecewise trajectories. The subdomains for the piecewise trajectory must be non-overlapping and exhaustive, meaning their union should cover the entire domain of the trajectory. Polygons move along the trajectory without rotating. Since the polygons translate along the trajectory, there is a constant vector offset [ΔxiΔyi]\begin{bmatrix}\Delta x_{i}\\ \Delta y_{i}\end{bmatrix} from the center to the ii-th vertex, and there are nn vertices for an nn-sided polygon. Thus, the trajectory for vertex ii is yΔyi=f(xΔxi)y-\Delta y_{i}=f(x-\Delta x_{i}) or xΔxi=f(yΔyi)x-\Delta x_{i}=f(y-\Delta y_{i}). We consider the trajectories of all vertices of the polygon in an attempt to bound its motion and compute the reachable set of the object as it moves along the trajectory.

III-B Active Corners

Throughout this section we consider a trajectory of the form y=f(x)y=f(x); the case for x=f(y)x=f(y) is symmetric. The boundaries of the safe region are typically formed by the trajectories of a pair of opposite corners of the vehicle (Figure 2) – we call this pair of corners active corners. We choose the active corners to represent the outermost extent of the object along the trajectory; as such, their motion bounds the safe region. Which corners are active depends on the slope of the trajectory (which can be computed from the derivative of ff) and the shape of the convex object. A corner viv_{i} is active when the slope θ\theta of the trajectory is between the slopes of the sides adjacent to viv_{i}; when a corner is active, its opposite corner is also active based on the symmetry of the polygon. More precisely, if we number the corners v1v_{1} through vnv_{n} counter-clockwise (with vn+1=v0v_{n+1}=v_{0} and v1=vnv_{-1}=v_{n}), corner viv_{i} is active if and only if the slope θ\theta of the trajectory is in the angle interval [vi1vi,vivi+1][\angle\overrightarrow{v_{i-1}v_{i}},\angle\overrightarrow{v_{i}v_{i+1}}], or symmetrically in the angle interval [vi+1vi,vivi1][\angle\overrightarrow{v_{i+1}v_{i}},\angle\overrightarrow{v_{i}v_{i-1}}]. Because the direction of the trajectory is inconsequential for our purpose, θ\theta is modulo 180180{}^{\circ}.

For example, on the hexagon of Figure 2, v1v_{1} and v4v_{4} are active when θ[0,60][180,240]\theta\in[0{}^{\circ},60{}^{\circ}]\cup[180{}^{\circ},240{}^{\circ}]; v2v_{2} and v5v_{5} are active when θ[60,120][240,300]\theta\in[60{}^{\circ},120{}^{\circ}]\cup[240{}^{\circ},300{}^{\circ}]; and v3v_{3} and v6v_{6} are active when θ[120,180][300,360]\theta\in[120{}^{\circ},180{}^{\circ}]\cup[300{}^{\circ},360{}^{\circ}]. At transition points (where the active corners change), the boundary of the safe region may not follow an active corner. We detail what happens then in Section III-C.

θ(120,180)\theta\in(120{}^{\circ},180{}^{\circ})θ(180,240)\theta\in(180{}^{\circ},240{}^{\circ})θ(240,300)\theta\in(240{}^{\circ},300{}^{\circ})θ(300,360)\theta\in(300{}^{\circ},360{}^{\circ})θ(0,60)\theta\in(0{}^{\circ},60{}^{\circ})θ(60,120)\theta\in(60{}^{\circ},120{}^{\circ})v3v_{3}v4v_{4}v5v_{5}v6v_{6}v1v_{1}v2v_{2}
Figure 2: A hexagon, the angles of its sides, and shifted active corner-trajectories

Given an obstacle at point (xO,yO)(x_{O},y_{O}), we can check if it is inside the unsafe region (or reachable set) in a computationally efficient fashion. If an obstacle lies outside the unsafe region, it would be either above both corner-trajectories or below both corner-trajectories for whichever corners are active. We can express the location of the obstacle with respect to a corner-trajectory in a single equation by considering the value of yOf(xOΔxi)Δyiy_{O}-f(x_{O}-\Delta x_{i})-\Delta y_{i} for active corner (vertex) viv_{i}. This term will be positive for both vertices vi,vjv_{i},v_{j} if the obstacle is above both corner-trajectories, and similarly negative if the obstacle is below both. Therefore, any point (xO,yO)(x_{O},y_{O}) in the safe region has a positive value for the product of the two expressions above, and any point in the unsafe region has a negative or zero value for this product. This yields the following test to check if an object lies in (part of) the unsafe region:

(yOf(xOΔxi)Δyi)(yOf(xOΔxj)Δyj)0\left(y_{O}-f(x_{O}-\Delta x_{i})-\Delta y_{i}\right)\cdot\left(y_{O}-f(x_{O}-\Delta x_{j})-\Delta y_{j}\right)\leq 0 (4)

where Δxi,Δyi,Δxj,Δyj\Delta x_{i},\Delta y_{i},\Delta x_{j},\Delta y_{j} are the (constant) offsets from the center of the polygon to the active corners (vertices) vi,vjv_{i},v_{j}.

When implementing this algorithm, the trajectories of all other vertices lie within the trajectories of the active corners, so to check whether an obstacle lies in the portion of the unsafe region defined by the active corners, it suffices to check over all pairs of vertices (vi,vj)(v_{i},v_{j}) with i,j{1,2,n}i,j\in\{1,2,...n\}. If the test in (4) indicates that an object lies within the unsafe region, trajectory y=f(x)y=f(x) or x=f(y)x=f(y) is clearly unsafe.

III-C Notches at Transition Points Between Active Corners

Figure 3: A rectangular airplane moving along a planar trajectory. At the transition point at the parabola’s vertex, the “notch” is visible and shaded in red; part of the object lies outside the corner-trajectories at this point.

It turns out that using only active corners would yield an underestimate of the reachable set, which would be unsound for verifying safety. Figure 3 illustrates why: the white area bounded by the trajectories of the corners does not contain the red “notch”, even though a collision would occur with an obstacle in this notch. Therefore, if the test in (4) yields a value >0>0, the advisory is not necessarily safe; we additionally check safety at all transition points (xT,yT)(x_{T},y_{T}) to see whether the obstacle at (xO,yO)(x_{O},y_{O}) lies within the polygon centered at (xT,yT)(x_{T},y_{T}). Recall that transition points are defined as points on the trajectory where the active corners switch. In the full test for safety (Equation 6), this check is represented as in_polygon() and can leverage one of many point-in-polygon implementations, which generally run in linear time on the order of number of vertices. As the slope of the function may change at the boundary between piecewise subfunctions, we also add a notch check at each subdomain boundary.

xTix_{Ti}xT(i+1)x_{T(i+1)}f()f(\cdot)line between active cornersline between active cornersxTiwx_{Ti}-wxT(i+1)+wx_{T(i+1)}+wg()g(\cdot)
Figure 4: For piecewise functions, between transition points and/or piecewise boundaries, this figure shows the difference between f()f(\cdot) and g()g(\cdot) and the two additional checks on (xO,yO)(x_{O},y_{O}) described in Section III-D.

III-D Handling Piecewise Functions

In order to account for piecewise functions, we modify our method in two ways to avoid using a subfunction outside the subdomain over which it holds. The first is a modification to hold subfunctions constant outside of the subdomain over which they’re defined; and the second is an additional boolean clause to the safety test in (4) so it only applies over a valid subdomain. In this case, the subdomain is an interval [xTi,xT(i+1)][x_{Ti},x_{T(i+1)}], where xTi,xT(i+1)x_{Ti},x_{T(i+1)} may be piecewise boundaries or transition points. Because of this, there may be many subdomains for a single piecewise case in which there happen to be many transition points.

First, we define a function g(x)g(x) (or g(y)g(y) symmetrically) that holds the value of each subfunction outside of its subdomain [xTi,xT(i+1)][x_{Ti},x_{T(i+1)}]. The function g()g(\cdot) is used in place of f()f(\cdot) in (4) above. Let yTi=f(xTi)y_{Ti}=f(x_{Ti}).

g(x)={yTiif xxTif(x)if xTi<x<xT(i+1)yT(i+1)if xxT(i+1)g(x)=\begin{cases}y_{Ti}&\text{if }x\leq x_{Ti}\\ f(x)&\text{if }x_{Ti}<x<x_{T(i+1)}\\ y_{T(i+1)}&\text{if }x\geq x_{T(i+1)}\\ \end{cases} (5)

Additionally, we add a clause to ensure the modified subfunction g()g(\cdot) is only used over the correct subdomain. First, we check xTiw<xO<xT(i+1)+wx_{Ti}-w<x_{O}<x_{T(i+1)}+w, where ww is the half-width of the object. We also construct a line between the two active corners of the object in each of the two piecewise boundary locations (xTi,yTi)\big{(}x_{Ti},y_{Ti}\big{)} and (xT(i+1),yT(i+1))\big{(}x_{T(i+1)},y_{T(i+1)}\big{)} and check (xO,yO)(x_{O},y_{O}) is between the two lines. This way, we ensure the test for being unsafe holds only for the region on which each subfunction applies. Figure 4 illustrates the function g()g(\cdot) and the additional subdomain-related clauses.

Figure 5: Terms in Equation (6), illustrated. Green terms restrict test to relevant piecewise subdomains, blue, diagonally-hatched terms check if obstacles are between active corner pairs, and orange, horizontally-hatched terms check if obstacles are in the notch at transition points and subdomain bounds.
unsafe?={(gi,xTi,xTj)}(xTiw<xO<xTj+w(xO,yO) between (Line((xTi+Δxi,yTi+Δxi),(xTi+Δxj,yTi+Δxj)),Line((xTj+Δxi,yTj+Δxi),(xTj+Δxj,yTj+Δxj))){(vi,vj)}(yOg(xO+Δxi)Δyi)(yOg(xO+Δxj)Δyj)0)({(xT,yT)i}in_polygon(xTi,yTi,xO,yO))\begin{split}\textbf{u}&\textbf{nsafe?}=\bigvee_{\{(g_{i},x_{Ti},x_{Tj})\}}\Bigg{(}\color[rgb]{0,0.5,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0.5,0}x_{Ti}-w<x_{O}<x_{Tj}+w\ \land\ \color[rgb]{0,0.5,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0.5,0}(x_{O},y_{O})\color[rgb]{0,0.5,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0.5,0}\text{ between }\\ &\color[rgb]{0,0.5,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0.5,0}\Big{(}\textbf{Line}\big{(}(x_{Ti}+\Delta x_{i},y_{Ti}+\Delta x_{i}),(x_{Ti}+\Delta x_{j},y_{Ti}+\Delta x_{j})\big{)},\color[rgb]{0,0.5,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0.5,0}\textbf{Line}\color[rgb]{0,0.5,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0.5,0}\big{(}(x_{Tj}+\Delta x_{i},y_{Tj}+\Delta x_{i}),(x_{Tj}+\Delta x_{j},y_{Tj}+\Delta x_{j})\big{)}\Big{)}\land\\ &\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\bigvee_{\{(v_{i},v_{j})\}}\big{(}y_{O}-g(x_{O}+\Delta x_{i})-\Delta y_{i})\big{(}y_{O}-g(x_{O}+\Delta x_{j})-\Delta y_{j})\leq 0\ \color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}\Bigg{)}\lor\color[rgb]{1,.5,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,.5,0}\Big{(}\bigvee_{\{(x_{T},y_{T})_{i}\}}\textbf{in\_polygon}(x_{Ti},y_{Ti},x_{O},y_{O})\Big{)}\end{split} (6)

III-E Generic Explicit Formulation

This leads to a generic quantifier-free explicit formulation to test whether an obstacle is in the safe region, where {(xT,yT)i}\{(x_{T},y_{T})_{i}\} represents the set of all transition and boundary points on the trajectory between piecewise subdomains. Our algorithm yields a test for whether an obstacle is unsafe; negating the boolean formula or its result allows testing whether an obstacle lies in the safe region.

Equation (6) is color-coded in correspondence with Figure 5. The first, third, and fourth lines ensure the test applies only over the correct piecewise domain and are in green; the second line checks the obstacle is between the active corners and is in blue; the fifth line is in orange and checks for the notch at transition points and piecewise subdomain boundaries. For ease of presentation, we have focused on convex, centrally-symmetric objects and point-mass obstacles. However, our method extends to obstacles with area, to asymmetric, irregular polygons, and even non-convex objects, as detailed in Appendix B.

IV Proof of Equivalence

We prove the equivalence of the safe regions represented by 1) the implicit formulation and 2) our active-corner method for trajectories of form y=f(x)y=f(x). The proof of soundness follows; the proof of completeness is in Appendix C-C, due to space constraints. The proof structure considers segments of the trajectory in which no active corner switch occurs; that is, where the angle of the tangent to the trajectory is bounded. In these segments, the bounds on the trajectory tangent angle allow us to bound the location of points in the interior of the polygon and show they lie between the two active corners. The two endpoints of a segment represent locations at which 1) the notch exists or 2) the trajectory switches to a new piecewise subfunction. In our method, these cases are handled by testing if obstacle (xO,yO)(x_{O},y_{O}) is inside the polygon at various transition points {(xT,yT)}i\big{\{}(x_{T},y_{T})\big{\}}_{i}.

IV-A Proof Preliminaries

Consider a segment of the motion along trajectory y=f(x)y=f(x) or x=f(y)x=f(y) in which no active corner switches or piecewise trajectory segment switches occur. We can arbitrarily rotate this segment of motion and the proof will hold, since the object translates along the trajectory without rotation. Assume, then, that a rotation is made by an angle θ\theta such that the active corners are oriented along a vertical line. This rotation is an invertible transformation, so the logic of this proof holds through the entire trajectory. Because of this coordinate rotation, we consider only trajectories y=f(x)y=f(x) for the proof; any trajectory x=f(y)x=f(y) can be rotated into the form y=f(x)y=f(x) invertibly, so our results hold for these forms as well. Let vi,vjv_{i},v_{j} denote the active corners for this segment, with corresponding offsets Δxi,Δyi,Δxj,Δyj\Delta x_{i},\Delta y_{i},\Delta x_{j},\Delta y_{j} in the rotated coordinate system.

Since no active corner switch occurs, then we know the slope of function y=f(x)y=f(x) is limited by the shape of the polygon itself – let these bounds be ±m\pm m, with mm representing the slope of the relevant sides of the polygon. Because the polygon is symmetric, the lower bound on slope is the negative of the upper bound (Figure 7). This proof is presented considering regular, symmetric polygons for simplicity, but extends to asymmetric polygons as discussed in Appendix B. To prove the soundness of our method, we must prove that all obstacles shown safe using our method (safeexpl\text{safe}_{\text{expl}}) are also safe using the input implicit formulation (safeimpl\text{safe}_{\text{impl}}). To prove safeexplsafeimpl\text{safe}_{\text{expl}}\implies\text{safe}_{\text{impl}}, we prove the contrapositive unsafeimplunsafeexpl\text{unsafe}_{\text{impl}}\implies\text{unsafe}_{\text{expl}}.

Specifically, unsafeimpl\text{unsafe}_{\text{impl}} means that an obstacle at (xO,yO)(x_{O},y_{O}) is inside a polygon centered at some coordinates (x,y)(x,y); unsafeexpl\text{unsafe}_{\text{expl}} means that the below holds from (4):

(yOf(xOΔxi)Δyi)(yOf(xOΔxj)Δyj)0\begin{split}\left(y_{O}-f(x_{O}-\Delta x_{i})-\Delta y_{i}\right)\cdot\left(y_{O}-f(x_{O}-\Delta x_{j})-\Delta y_{j}\right)\leq 0\\ \end{split}

This proof has three sections: one holds for the majority of the trajectory segment, one for the beginning of the segment, and one of the end of the segment. The beginning- and end-of-segment proofs follow the form of the main proof but consider fixed polygons at the trajectory segment endpoints and are included in Appendix C for space reasons.

Left EndpointMiddle SegmentRight Endpoint
Figure 6: Sections of proof
(xC,yC)(x_{C},y_{C})m-mslope mmslope m-mmm hhhhΔx\Delta xxintx_{\text{int}}
(xC,yC)(x_{C},y_{C})hhhhΔx\Delta xxintx_{\text{int}}
Figure 7: Figure of the slope of the sides of a regular hexagon and octagon.

IV-B Middle Segment Proof

Consider a (symmetric) polygon PP, with half-height hh and half-width ww, centered at (xC,yC)(x_{C},y_{C}), where yC=f(xC)y_{C}=f(x_{C}). Let (xint,yint)(x_{\text{int}},y_{\text{int}}) be a point inside or on the edges of PP. We prove that interior point (xint,yint)(x_{\text{int}},y_{\text{int}}) lies between the active corners of an identical polygon P¯\mkern 1.5mu\overline{\mkern-1.5muP\mkern-1.5mu}\mkern 1.5mu located at (xint,f(xint))(x_{\text{int}},f(x_{\text{int}})). We do this by bounding three terms: 1) f(xint)f(x_{\text{int}}), 2) yinty_{\text{int}}, and 3) the active corners of P¯\mkern 1.5mu\overline{\mkern-1.5muP\mkern-1.5mu}\mkern 1.5mu to prove that yinty_{\text{int}} lies between them.

First, we bound f(xint)f(x_{\text{int}}) (the center of P¯\mkern 1.5mu\overline{\mkern-1.5muP\mkern-1.5mu}\mkern 1.5mu). Let xint=xC+Δxx_{\text{int}}=x_{C}+\Delta x, for Δx[w,w]\Delta x\in\left[-w,w\right]. Let f(xint)=f(xC+Δx)=yC+Δyf(x_{\text{int}})=f(x_{C}+\Delta x)=y_{C}+\Delta y, for some Δy\Delta y which we will bound. The slope of the trajectory dydx\frac{dy}{dx} is bounded by (m,m)(-m,m), because this proof considers a segment of motion with no changes in active corner. Hence Δy\Delta y is bounded proportionally to Δx\Delta x, with Δy(|mΔx|,|mΔx|)\Delta y\in\left(-|m\Delta x|,|m\Delta x|\right). Therefore, f(xint)(yC|mΔx|,yC+|mΔx|)f(x_{\text{int}})\in\left(y_{C}-|m\Delta x|,y_{C}+|m\Delta x|\right). Our proof proceeds assuming Δx0\Delta x\neq 0, since if Δx=0,xint\Delta x=0,x_{\text{int}} will lie on the vertical centerline of PP. In that case, it is trivial to show xintx_{\text{int}} lies between the active corners.

Now, we bound yinty_{\text{int}}. Recall xint=xC+Δxx_{\text{int}}=x_{C}+\Delta x, for Δx[w,w]\Delta x\in\left[-w,w\right]. Given that the slopes of the sides on the top and bottom of PP are ±m\pm m, we assert that any (xint,yint)(x_{\text{int}},y_{\text{int}}) with xint=xC+Δxx_{\text{int}}=x_{C}+\Delta x has a corresponding Δyint[h+|mΔx|,h|mΔx|]\Delta y_{\text{int}}\in\big{[}-h+|m\Delta x|,h-|m\Delta x|\big{]}. This is illustrated in Figure 7 with a hexagon, but it generalizes to any symmetric convex polygon. Given this, we can bound the xx and yy interior coordinates as below:

(xint,yint)=[xC+Δx[yCh+|mΔx|,yC+h|mΔx|]]\left(x_{\text{int}},y_{\text{int}}\right)=\begin{bmatrix}x_{C}+\Delta x\\ \left[y_{C}-h+|m\Delta x|,y_{C}+h-|m\Delta x|\right]\end{bmatrix} (7)
xCx_{C}xintx_{\text{int}}
Figure 8: Shifted polygon illustration

Finally, we show interior point y-coordinate yinty_{\text{int}} lies within the active corners of P¯\mkern 1.5mu\overline{\mkern-1.5muP\mkern-1.5mu}\mkern 1.5mu. Because we consider a rotated coordinate frame such that the active corners are oriented along the vertical axis, the top and bottom active corners are located at (xtop¯,ytop¯)=(xint,f(xint)+h)(\mkern 1.5mu\overline{\mkern-1.5mux_{\text{top}}\mkern-1.5mu}\mkern 1.5mu,\mkern 1.5mu\overline{\mkern-1.5muy_{\text{top}}\mkern-1.5mu}\mkern 1.5mu)=(x_{\text{int}},f(x_{\text{int}})+h) and (xbot¯,ybot¯)=(xint,f(xint)h)(\mkern 1.5mu\overline{\mkern-1.5mux_{\text{bot}}\mkern-1.5mu}\mkern 1.5mu,\mkern 1.5mu\overline{\mkern-1.5muy_{\text{bot}}\mkern-1.5mu}\mkern 1.5mu)=(x_{\text{int}},f(x_{\text{int}})-h), respectively. The bounds on ytop¯\mkern 1.5mu\overline{\mkern-1.5muy_{\text{top}}\mkern-1.5mu}\mkern 1.5mu and ybot¯\mkern 1.5mu\overline{\mkern-1.5muy_{\text{bot}}\mkern-1.5mu}\mkern 1.5mu are given by the following:

yC|mΔx|+h<ytop¯<yC+|mΔx|+hyC|mΔx|h<ybot¯<yC+|mΔx|h\begin{split}y_{C}-|m\Delta x|+h<\mkern 1.5mu\overline{\mkern-1.5muy_{\text{top}}\mkern-1.5mu}\mkern 1.5mu<y_{C}+|m\Delta x|+h\\ y_{C}-|m\Delta x|-h<\mkern 1.5mu\overline{\mkern-1.5muy_{\text{bot}}\mkern-1.5mu}\mkern 1.5mu<y_{C}+|m\Delta x|-h\end{split} (8)

Then yintyC|mΔx|+h<ytop¯y_{\text{int}}\leq y_{C}-|m\Delta x|+h<\mkern 1.5mu\overline{\mkern-1.5muy_{\text{top}}\mkern-1.5mu}\mkern 1.5mu and yintyC+|mΔx|h>ybot¯y_{\text{int}}\geq y_{C}+|m\Delta x|-h>\mkern 1.5mu\overline{\mkern-1.5muy_{\text{bot}}\mkern-1.5mu}\mkern 1.5mu.

The top active corner trajectory is given by ftop(x)=f(x)+hf_{\text{top}}(x)=f(x)+h and the bottom active corner trajectory is given by fbot(x)=f(x)hf_{\text{bot}}(x)=f(x)-h. By definition, ftop(xint)=ytop¯f_{\text{top}}(x_{\text{int}})=\mkern 1.5mu\overline{\mkern-1.5muy_{\text{top}}\mkern-1.5mu}\mkern 1.5mu and fbot(xint)=ybot¯f_{\text{bot}}(x_{\text{int}})=\mkern 1.5mu\overline{\mkern-1.5muy_{\text{bot}}\mkern-1.5mu}\mkern 1.5mu, or equivalently, ytop¯ftop(xint)=0\mkern 1.5mu\overline{\mkern-1.5muy_{\text{top}}\mkern-1.5mu}\mkern 1.5mu-f_{\text{top}}(x_{\text{int}})=0 and ybot¯fbot(xint)=0\mkern 1.5mu\overline{\mkern-1.5muy_{\text{bot}}\mkern-1.5mu}\mkern 1.5mu-f_{\text{bot}}(x_{\text{int}})=0. Since yint<ytop¯y_{\text{int}}<\mkern 1.5mu\overline{\mkern-1.5muy_{\text{top}}\mkern-1.5mu}\mkern 1.5mu and yint>ybot¯y_{\text{int}}>\mkern 1.5mu\overline{\mkern-1.5muy_{\text{bot}}\mkern-1.5mu}\mkern 1.5mu,

yintftop(xint)<0yintfbot(xint)>0y_{\text{int}}-f_{\text{top}}(x_{\text{int}})<0\qquad\qquad y_{\text{int}}-f_{\text{bot}}(x_{\text{int}})>0 (9)

By multiplying the equations in (9), we get

(yintftop(xint))(yintfbot(xint))<0(y_{\text{int}}-f_{\text{top}}(x_{\text{int}}))\cdot(y_{\text{int}}-f_{\text{bot}}(x_{\text{int}}))<0 (10)

This is equivalent test for whether an object lies in the unsafe region from (4). Therefore we have shown that for all (xC,yC)(x_{C},y_{C}) points satisfying yC=f(xC)y_{C}=f(x_{C}), all points (xint,yint)(x_{\text{int}},y_{\text{int}}) inside and on the boundary of a polygon centered at (xC,yC)(x_{C},y_{C}) also have (ftop(xint)yint)(fbot(xint)yint)0(f_{\text{top}}(x_{\text{int}})-y_{\text{int}})\cdot(f_{\text{bot}}(x_{\text{int}})-y_{\text{int}})\leq 0. These are exactly the definitions of unsafeimpl\text{unsafe}_{\text{impl}} and unsafeexpl\text{unsafe}_{\text{expl}} from IV-A earlier. Therefore, we have shown unsafeimplunsafeexpl\text{unsafe}_{\text{impl}}\implies\text{unsafe}_{\text{expl}} and the contrapositive safeexplsafeimpl\text{safe}_{\text{expl}}\implies\text{safe}_{\text{impl}} holds as well.

V Implementation

We have implemented our automated method in Python using SymPy, a symbolic math library [28]. The code implementing our algorithm and the applications in Section VI is available on GitHub at https://github.com/nskh/automatic-safety-proofs.

Given a fully symbolic trajectory and object, we first identify the angles corresponding to sides of the object. Then, following Section III-B, we identify points on the trajectory corresponding to the angles θi\theta_{i} of each side of the object. To avoid discontinuities in the arctan\arctan function, the implementation solves a reformulation: fxsin(θi)=fycos(θi)\frac{\partial f}{\partial x}\sin(\theta_{i})=\frac{\partial f}{\partial y}\cos(\theta_{i}). Solving this equation may yield either yy in terms of xx or the reverse. In this case, we substitute the implicit solution for xx or yy into the trajectory equation, eliminate the remaining variable, and identify transition points. Given transition points, we can implement the test from (6). Sympy includes a “point-in-polygon” method, which we use to identify if an obstacle (xO,yO)(x_{O},y_{O}) lies in the “notch” at any transition point. The output explicit formulation can be expressed either in or in Mathematica format; output in Mathematica also supports generating code to copy-paste directly and plot the safe region using Mathematica’s RegionPlot[] functionality. Examples can be found in Figures 9 and 10.

In order to implement our method in a fully symbolic fashion, we must account for the potential values of symbols when instantiated. We can leverage Sympy’s built-in “assumptions” to specify that certain symbols representing, say, trajectory parameters or object dimensions are real, positive, and/or nonzero, but these assumptions may not suffice to construct a fully symbolic safe region. In that case, our fully symbolic implementation computes a number of potential valid safe regions. As detailed in Section III-D, we construct the explicit formulation using many clauses defined on intervals between transition points and/or piecewise boundaries. In the symbolic case, the order of these terms may differ, depending on, say, the sign of a variable in the trajectory. Additionally, symbolic piecewise cases for, say, x<bx<b may mean that certain transition points do not occur at all if bb lies in some range. Correspondingly, our fully symbolic implementation computes all valid orderings of piecewise boundaries and transition points; it additionally considers all valid combinations of transition points to account for “notches” that may not exist when piecewise bounds and/or trajectory parameters are instantiated. In order to check if orderings are valid, we attempt to sort using the Sympy assumptions: if we know bb is positive, no returned ordering will place bb before a transition point at 0, for example. Additionally, we enforce that adjacent points in the ordering “come from” the same functions: we will not return an ordering where a transition point from piecewise subfunction f1f_{1} lies between the piecewise boundaries for f2f_{2}. Doing so ensures that we generate relatively few (\sim 10) potential orderings despite considering many combinations, though examples with intractably many orderings do exist.

VI Applications and Evaluation

VI-A Verification of vertical maneuvers in ACAS X

Refer to caption
Figure 9: Safe region for an instance of [21]. The notches are the red-hatched rectangles and the trajectory is dashed in purple.

A collision avoidance system intended to prevent near mid-air collisions, ACAS X, was verified in [21]. The KeYmaera X proof presented in [21] required a significant amount of human interaction (on the order of hundreds of hours), while the method presented in this paper generates an explicit formulation from the trajectory fully automatically. ACAS X prevents collisions between aircraft by issuing advisories (control commands) to one aircraft, the ownship. The bounds of aircraft in this work are shaped like hockey pucks (cylinders wider than they are tall) of a radius rpr_{p} and half-height hph_{p}. From a side perspective of an encounter between aircraft, the bounds are rectangular. In [21], verification was performed in a side-view perspective, assuming two aircraft approach each other in a vertically-oriented planar slice of three dimensions. A careful choice of reference frame can reduce a three-dimensional encounter between aircraft into a two-dimensional system, by modeling the encounter as a 1-dimensional vertical encounter and the distance of a horizontal encounter [21, Section 6].

To simplify calculations, [21] used the relative horizontal speed rvr_{v} of the two aircraft and assumed it constant; the vertical velocity of the oncoming aircraft h˙\dot{h} is also assumed constant. Advisories consist of climb and descent speed advisories, yielding ownship trajectories that are piecewise combinations of parabolas and straight lines. One example trajectory is below in (11), which assumes the advisory issued is for the ownship to climb at a rate h˙f\dot{h}_{f} greater than its current vertical velocity h˙0\dot{h}_{0}. (rt,ht)(r_{t},h_{t}) are the (x,y)(x,y) coordinates for trajectory 𝒯\mathcal{T} in this example, and ara_{r} is the acceleration.

(rt,ht)={(rvt,ar2t2+h˙0t) for 0t<h˙fh˙0ar(rvt,h˙ft(h˙fh˙0)22ar) for h˙fh˙0art\left(r_{t},h_{t}\right)=\begin{cases}\left(r_{v}t,\frac{a_{r}}{2}t^{2}+\dot{h}_{0}t\right)&\text{ for }0\leq t<\frac{\dot{h}_{f}-\dot{h}_{0}}{a_{r}}\\ \left(r_{v}t,\dot{h}_{f}t-\frac{(\dot{h}_{f}-\dot{h}_{0})^{2}}{2a_{r}}\right)&\text{ for }\frac{\dot{h}_{f}-\dot{h}_{0}}{a_{r}}\leq t\end{cases} (11)

The implicit formulation of the safe region is below, for an oncoming aircraft at relative coordinates rO,hOr_{O},h_{O}.

t.rt.ht.((rt,ht)𝒯|rOrt|>rp|hOht|>hp)\forall t.\forall r_{t}.\forall h_{t}.\big{(}(r_{t},h_{t})\in\mathcal{T}\implies|r_{O}-r_{t}|>r_{p}\vee|h_{O}-h_{t}|>h_{p}\big{)} (12)

In [21], the authors eliminate the parametrization over tt, which yields an initial parabolic section and then straight-line motion after. We use this tt-free trajectory to compute the unsafe region, which is displayed in Figure 9. A boolean formulation of the unsafe region is in Appendix D-B.

VI-B Verified Turning Maneuvers for Unmanned Aerial Vehicles

Refer to caption
Figure 10: Approximated safe region for an instance of [1]. The notches are the red-hatched hexagons, the trajectory is dashed in purple.

Turning maneuvers for unmanned aerial vehicles (UAVs) have been verified as safe in [1], where the UAV was represented as a circular safety buffer around a point object fixed along the trajectory. The KeYmaera X proof presented in [1] required a significant amount of human interaction (on the order of hundreds of hours); in contrast, the method presented in this paper generates an explicit formulation from the trajectory fully automatically. This work represents motion in a two-dimension plane viewed top-down, with the buffer “puck” taking the form of a circle. The turning maneuver trajectory moves along a circular arc then in a straight line:

(x𝒯,y𝒯)={x𝒯2+y𝒯2=R2y𝒯<x𝒯tanθy𝒯=Rcosθx𝒯tanθ+Rsinθy𝒯x𝒯tanθ(x_{\mathcal{T}},y_{\mathcal{T}})=\begin{cases}x_{\mathcal{T}}^{2}+y_{\mathcal{T}}^{2}=R^{2}&y_{\mathcal{T}}<x_{\mathcal{T}}\tan\theta\\ y_{\mathcal{T}}=\frac{R\cos\theta-x_{\mathcal{T}}}{\tan\theta}+R\sin\theta&y_{\mathcal{T}}\geq x_{\mathcal{T}}\tan\theta\\ \end{cases} (13)

With a circular safety buffer of radius rpr_{p}, the implicit formulation ensures for all points along the trajectory, the obstacle (xO,yO)(x_{O},y_{O}) is at least rpr_{p} away.

x𝒯.y𝒯.(traj(x𝒯,y𝒯)(xOx𝒯)2+(yOy𝒯)2rp2)\forall x_{\mathcal{T}}.\forall y_{\mathcal{T}}.\big{(}\text{traj}(x_{\mathcal{T}},y_{\mathcal{T}})\implies(x_{O}-x_{\mathcal{T}})^{2}+(y_{O}-y_{\mathcal{T}})^{2}\geq r_{p}^{2}\big{)} (14)

Note that our method does not support circular objects, only polygons, so we overapproximate the circular safety buffer as a regular hexagon inscribing a circle. This approximation allows a valid overapproximation of the unsafe region, since the hexagon contains the original circle in [1]. Note that the approximation of a circle can be made arbitrarily precise by increasing the number of sides of a polygon used. A plot of the unsafe region is in Figure 10 and a boolean formulation of the unsafe region is in Appendix D-C.

Example Instance Active Corners Time Active Corners RAM CAD Time CAD RAM
UAV Fully Numeric 0.48 sec 7.1 MB 2381* sec 30.89 MB
UAV Numeric Trajectory 0.82 sec 8.4 MB DNF 50+ GB
UAV Numeric Hexagon 38 sec 22 MB DNF 100+ GB
UAV Fully Symbolic 45 sec 24 MB DNF 100+ GB
Dubins Fully Numeric 1.2 sec 9.0 MB DNF 11+ GB
Dubins Fully Symbolic: Rectangle 4505 sec 91 MB DNF 4+ GB
Dubins Fully Symbolic: Hexagon DNF N/A DNF 8+ GB
ACAS X Fully Numeric 0.13 sec 5.9 MB 0.04 sec 160 KB
ACAS X Numeric Trajectory 0.48 sec 6.6 MB 0.04 sec 188 KB
ACAS X Numeric Rectangle 0.51 sec 6.6 MB 0.2 sec 325 KB
ACAS X Fully Symbolic 0.57 sec 6.6 MB 1.1 sec 1.8 MB
TABLE I: Evaluation results, with better results bolded. DNF: example did not finish in 8+ hours. *: incorrect answer.

VI-C Runtime Evaluation

This section presents a comparison of our method to quantifier elimination via cylindrical algebraic decomposition (CAD) in a variety of cases, from fully numeric to fully symbolic [12]. Results were generated using a 2017 iMac Pro workstation with 128  GB of RAM, with CAD results using Mathematica’s Resolve implementation. A table of results is shown in Table I. We use the examples from VI-A (ACAS X) and VI-B (UAV). The Dubins path example is inspired by common path planners and takes the form of two circular arcs connected by a straight line and ending with a line; its symbolic trajectory equation is included in Appendix D-A.

Our findings in Table I demonstrate the advantages and disadvantages of our method relative to quantifier elimination using CAD. For non-polynomial examples like a rectangle moving along the Dubins path described above or the UAV example from [1], the active corner method is able to compute fully symbolic formulations of the safe region when CAD fails to return an answer when run overnight (8+ hours). We do note that due to the complexity of a symbolic hexagon moving along the Dubins path, the number of transition points means our method cannot compute an answer, though neither can CAD. For a fully numeric example from [1], CAD took 2381 seconds to run but returned False incorrectly in place of a region. Additionally, memory is often a constraint for symbolic computation given the CAD algorithm’s doubly-exponential runtime [13]; many examples consumed 100+ GB of RAM and one case grew to consume 350 GB of RAM without returning an answer. In the worst case, however, our method consumes under 100MB of RAM. On the other hand, for strictly polynomial examples like that in [21], CAD runs quickly and efficiently, though our method remains competitive.

VII Related Work

Reachability computation is a vital question in safety-critical cases where users seek to guarantee properties or behavior. One method of constructing reachable sets for safety is zonotope reachablity [3]. Reachability computation using zonotopes offers efficient algorithmic methods and supports analysis of dynamical systems with uncertainty. Zonotopes have been used in verification of automated vehicles [2], the design of safe trajectories for quadrotor aircraft [23], and the analysis of power systems [14], among other applications. Zonotope reachability methods discretize a dynamical system and iteratively propagate an estimate of the reachable set forward in time. Their input is a differential equation, while our method requires an explicit closed-form trajectory. For the purpose of checking safety, the estimate of the reachable set must be either exact or an overestimate; in order to deal with discretization error, zonotope methods repeatedly overestimate the reachable interval. Zonotope methods for nonlinear systems rely on linearization and again account for error that may occur by expanding the reachable set [4]. Our method yields exact reachable sets. While it is possible to model convex object reachability with zonotopes, the reachable set expands with the time horizon because the dimensions of the object are treated not as constant dimensions but as uncertainty in initial conditions that is propagated forward through time [19]. Set-valued constraint solving may be used but similarly relies on inexact discretization [20]. Other reachability methods for differential equations include Hamilton-Jacobi reachability for systems with complex, nonlinear, high-dimensional dynamics [7], and control barrier functions, which enable the construction of safe optimization-based controllers [5].

A counterpart to reachability is automatic invariant generation for hybrid systems, in which a formal statement showing a system never evolves into an unsafe state is proved. In [16], the authors proved a polynomial and its Lie derivatives can represent algebraic sets of polynomial vector fields. A procedure to check invariance of polynomial equalities was proposed in [17]. Semi-algebraic invariants for polynomial ODEs were studied in [18, 35, 26]. Invariants for hybrid systems were studied in [32] and [27]. Relational abstractions bridge the gap between continuous and discrete modes by over-approximating continuous system evolution to summarize the system as a purely discrete one using invariant generation [33]. Barrier certificates have also been used as invariants for safety verification in hybrid systems [31].

Our work has similar aims to swept-volume collision checking, from path planning and graphics, in which approximate, efficient collision-checking is performed as a volume is moved along a path. A convex over-approximation swept-volume approach was presented in [15]. Swept-volume checking in four dimensions was performed using an intersection test in space-time in [10]. An efficient algorithm computing distances between convex polytopes, the Lin-Canny algorithm, was proposed for this task in [24, 25]. Methods are typically discrete and approximate for performance in online applications. That said, there are some exact methods such as collision checking for straight-line segments like those on robotic arms [34] and an algorithm for large-scale environments [11]. However, these methods operate on individual collision checking instances, such as graphics simulations or video game environments, and their results cannot be used repeatedly. Our method yields provably correct, fully symbolic, and exact safe regions for continuous trajectories and supports, for example, quantifier-free and efficient testing in runtime or in large-scale settings once a desired safe region formulation has been generated.

Another alternative to this work is quantifier elimination, [36, 12] a general algorithm for converting formulas with quantified variables into equivalent statements that are quantifier-free. Quantifier elimination can be performed using Cylindrical Algebraic Decomposition (CAD), an algorithm that operates on semialgebraic sets [12, 6]. QEPCAD is one notable software tool implementing CAD that could be used in this work [8]. The runtime of the CAD algorithm is doubly exponential in the number of total variables (not the number of quantified variables) [13, 9]; we offer a detailed comparison to CAD in Mathematica in Section VI-C.

VIII Conclusion and Future Work

We would like to study how our method extends to objects translating in 3 or nn dimensions; trajectories in the form of inequalities; rotating objects; and invariants of differential equations of the form f(x,y)=0f(x,y)=0 rather than explicit trajectories. On the implementation side, we envision an extension to automatically output a machine-checkable proof of equivalence between the implicit and explicit formulations, in a theorem prover such as Coq, PVS, Isabelle, or KeYmaera X.

References

  • [1] Eytan Adler and Jean-Baptiste Jeannin. Formal verification of collision avoidance for turning maneuvers in uavs. In AIAA Aviation 2019 Forum, page 2845, 2019.
  • [2] Matthias Althoff and John M Dolan. Online verification of automated road vehicles using reachability analysis. IEEE Transactions on Robotics, 30(4):903–918, 2014.
  • [3] Matthias Althoff, Goran Frehse, and Antoine Girard. Set propagation techniques for reachability analysis. Annual Review of Control, Robotics, and Autonomous Systems, 4:369–395, 2021.
  • [4] Matthias Althoff, Olaf Stursberg, and Martin Buss. Reachability analysis of nonlinear systems with uncertain parameters using conservative linearization. In 2008 47th IEEE Conference on Decision and Control, pages 4042–4048, 2008.
  • [5] Aaron D Ames, Samuel Coogan, Magnus Egerstedt, Gennaro Notomista, Koushil Sreenath, and Paulo Tabuada. Control barrier functions: Theory and applications. In 2019 18th European Control Conference (ECC), pages 3420–3431. IEEE, 2019.
  • [6] Dennis S Arnon, George E Collins, and Scott McCallum. Cylindrical algebraic decomposition i: The basic algorithm. SIAM Journal on Computing, 13(4):865–877, 1984.
  • [7] Somil Bansal, Mo Chen, Sylvia Herbert, and Claire J Tomlin. Hamilton-jacobi reachability: A brief overview and recent advances. In 2017 IEEE 56th Annual Conference on Decision and Control (CDC), pages 2242–2253. IEEE, 2017.
  • [8] Christopher W. Brown. Qepcad b: A program for computing with semi-algebraic sets using cads. SIGSAM Bull., 37(4):97–108, December 2003.
  • [9] Christopher W Brown and James H Davenport. The complexity of quantifier elimination and cylindrical algebraic decomposition. In Proceedings of the 2007 international symposium on Symbolic and algebraic computation, pages 54–60, 2007.
  • [10] Stephen Cameron. Collision detection by four-dimensional intersection testing. 1990.
  • [11] Jonathan D Cohen, Ming C Lin, Dinesh Manocha, and Madhav Ponamgi. I-collide: An interactive and exact collision detection system for large-scale environments. In Proceedings of the 1995 symposium on Interactive 3D graphics, pages 189–ff, 1995.
  • [12] George E. Collins. Quantifier elimination for real closed fields by cylindrical algebraic decompostion. In H. Brakhage, editor, Automata Theory and Formal Languages, pages 134–183, Berlin, Heidelberg, 1975. Springer Berlin Heidelberg.
  • [13] James H. Davenport and Joos Heintz. Real quantifier elimination is doubly exponential. Journal of Symbolic Computation, 5(1):29–35, 1988.
  • [14] Ahmed El-Guindy, Yu Christine Chen, and Matthias Althoff. Compositional transient stability analysis of power systems via the computation of reachable sets. In 2017 American Control Conference (ACC), pages 2536–2543. IEEE, 2017.
  • [15] A Foisy and V Hayward. A safe swept volume method for collision detection. In The Sixth International Symposium of Robotics Research, pages 61–68, 1993.
  • [16] Khalil Ghorbal and André Platzer. Characterizing algebraic invariants by differential radical invariants. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 279–294. Springer, 2014.
  • [17] Khalil Ghorbal, Andrew Sogokon, and André Platzer. Invariance of conjunctions of polynomial equalities for algebraic differential equations. In International Static Analysis Symposium, pages 151–167. Springer, 2014.
  • [18] Khalil Ghorbal, Andrew Sogokon, and André Platzer. A hierarchy of proof rules for checking positive invariance of algebraic and semi-algebraic sets. Computer Languages, Systems & Structures, 47:19–43, 2017.
  • [19] Antoine Girard. Reachability of uncertain linear systems using zonotopes. In International Workshop on Hybrid Systems: Computation and Control, pages 291–305. Springer, 2005.
  • [20] Luc Jaulin. Solving set-valued constraint satisfaction problems. Computing, 94(2):297–311, 2012.
  • [21] Jean-Baptiste Jeannin, Khalil Ghorbal, Yanni Kouskoulas, Ryan Gardner, Aurora Schmidt, Erik Zawadzki, and André Platzer. A formally verified hybrid system for the next-generation airborne collision avoidance system. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 21–36. Springer, 2015.
  • [22] Jean-Baptiste Jeannin, Khalil Ghorbal, Yanni Kouskoulas, Aurora Schmidt, Ryan W. Gardner, Stefan Mitsch, and André Platzer. A formally verified hybrid system for safe advisories in the next-generation airborne collision avoidance system. Int. J. Softw. Tools Technol. Transf., 19(6):717–741, 2017.
  • [23] Shreyas Kousik, Patrick Holmes, and Ram Vasudevan. Safe, aggressive quadrotor flight via reachability-based trajectory design. In Dynamic Systems and Control Conference, volume 59162, page V003T19A010. American Society of Mechanical Engineers, 2019.
  • [24] Ming C Lin. Efficient collision detection for animation. In Proceedings of the Third Euro-graphics Workshop on Animation Cambridge, 1992.
  • [25] Ming C Lin. Efficient collision detection for animation and robotics. PhD thesis, PhD thesis, Department of Electrical Engineering and Computer Science, UC Berkeley, 1993.
  • [26] Jiang Liu, Naijun Zhan, and Hengjun Zhao. Computing semi-algebraic invariants for polynomial dynamical systems. In Proceedings of the ninth ACM international conference on Embedded software, pages 97–106, 2011.
  • [27] Nadir Matringe, Arnaldo Vieira Moura, and Rachid Rebiha. Generating invariants for non-linear hybrid systems by linear algebraic methods. In International Static Analysis Symposium, pages 373–389. Springer, 2010.
  • [28] Aaron Meurer, Christopher P. Smith, Mateusz Paprocki, Ondřej Čertík, Sergey B. Kirpichev, Matthew Rocklin, AMiT Kumar, Sergiu Ivanov, Jason K. Moore, Sartaj Singh, Thilina Rathnayake, Sean Vig, Brian E. Granger, Richard P. Muller, Francesco Bonazzi, Harsh Gupta, Shivam Vats, Fredrik Johansson, Fabian Pedregosa, Matthew J. Curry, Andy R. Terrel, Štěpán Roučka, Ashutosh Saboo, Isuru Fernando, Sumith Kulal, Robert Cimrman, and Anthony Scopatz. Sympy: symbolic computing in python. PeerJ Computer Science, 3:e103, January 2017.
  • [29] Stefan Mitsch, Khalil Ghorbal, and André Platzer. On provably safe obstacle avoidance for autonomous robotic ground vehicles. In Robotics: Science and Systems IX, Technische Universität Berlin, Berlin, Germany, June 24-June 28, 2013, 2013.
  • [30] André Platzer. A complete uniform substitution calculus for differential dynamic logic. J. Autom. Reas., 59(2):219–265, 2017.
  • [31] Stephen Prajna and Ali Jadbabaie. Safety verification of hybrid systems using barrier certificates. In International Workshop on Hybrid Systems: Computation and Control, pages 477–492. Springer, 2004.
  • [32] Sriram Sankaranarayanan, Henny B Sipma, and Zohar Manna. Constructing invariants for hybrid systems. In International Workshop on Hybrid Systems: Computation and Control, pages 539–554. Springer, 2004.
  • [33] Sriram Sankaranarayanan and Ashish Tiwari. Relational abstractions for continuous and hybrid systems. In International Conference on Computer Aided Verification, pages 686–702. Springer, 2011.
  • [34] Fabian Schwarzer, Mitul Saha, and Jean-Claude Latombe. Exact collision checking of robot paths. In Algorithmic foundations of robotics V, pages 25–41. Springer, 2004.
  • [35] Andrew Sogokon, Khalil Ghorbal, Paul B Jackson, and André Platzer. A method for invariant generation for polynomial continuous systems. In International Conference on Verification, Model Checking, and Abstract Interpretation, pages 268–288. Springer, 2016.
  • [36] Alfred Tarski. A decision method for elementary algebra and geometry. University of California Press, Berkeley, 1951.

Appendix A Safe Region Inequalities For Figure 1

These inequalities are plotted in Figure 1. The safe region is simply the negation of Equation (15).

((xOw)(yOh)(yO2xO2wh)(xO5+w)(yO2xO+2w+h)(yO10h))((xO5w)(yO10h)(yOxO+w+h15)(yOxOwh15))\begin{split}\Big{(}&(x_{O}\geq-w)\ \land\ (y_{O}\leq h)\ \land(y_{O}\geq-2x_{O}-2w-h)\\ &\land\ (x_{O}\leq 5+w)\ \land\ (y_{O}\leq-2x_{O}+2w+h)\\ &\land\ (y_{O}\geq-10-h)\Big{)}\ \bigvee\Big{(}(x_{O}\geq 5-w)\\ &\land\ (y_{O}\geq-10-h)\ \land(y_{O}\leq x_{O}+w+h-15)\\ &\land\ (y_{O}\geq x_{O}-w-h-15)\Big{)}\end{split} (15)

Note the first disjunction in Equation (15) corresponds to the motion of the aircraft on the left side of Figure 1 as it descends; the second corresponds to the right side as the aircraft ascends.

Appendix B Extensions

In the main body of the paper we have considered point-mass obstacles, but the reasoning extends to obstacles that have the same properties as the object (convex and centrally symmetric). This is achieved through a reduction where the shape of the obstacle is incorporated into the shape of the object. For example, in the simple case where both are horizontal rectangles, with the object of height 2h2h and width 2w2w, and the obstacle of height 2hO2h_{O} and width 2wO2w_{O}, the object and obstacle intersect if and only if the center of the obstacle is contained in a virtual object with the same center as the initial object, but of height 2(h+hO)2(h+h_{O}) and width 2(w+wO)2(w+w_{O}). We have thus reduced the problem of collision avoidance with a convex object to a problem avoidance with a point-mass object. A similar reasoning – albeit a little more complicated – can be applied to any convex, centrally symmetric obstacle.

For ease of of presentation, and because they appear in most practical applications, we have focused on objects that are convex and centrally symmetric. We can extend the reasoning to non-centrally symmetric objects: the only difference in that case is that pairs of active corners do not change together, but rather one active corner may change on one side, and another active corner may change on the other side later. Pairs of active corners are thus not opposite corners of the object anymore. The convexity of the object (and obstacles) is essential for active corners; however, we can extend our reasoning to non-convex, polygonal objects by seeing them as unions of convex sub-objects and ensuring collision avoidance with each sub-object. Finally, due to its reliance on corners, our method cannot handle circles or ellipses, but they can be approximated by polygons.

Appendix C Proofs

C-A Left Endpoint Proof

Assume the coordinate rotation is paired with a shift such that the trajectory segment goes from (0,0)(0,0) to (xF,yF)(x_{F},y_{F}). The section above showed interior points with xint[0,xF]x_{\text{int}}\in[0,x_{F}] lie between the active corner-trajectories, but polygons near the endpoints may have interior points with xint<0x_{\text{int}}<0 or xint>xFx_{\text{int}}>x_{F}, despite being centered along the trajectory segment. Here, we consider interior points with xx-coordinates that are less than 0 and show these points lie within the initial polygon centered at (0,0)(0,0). For these interior points, polygon center xCwx_{C}\leq w.

First, bound the yy-coordinate of such polygons: with minimum trajectory slope m-m and maximum +m+m, yC(mxC,mxC)y_{C}\in(-mx_{C},mx_{C}). Now we can bound the locations of the interior points of these polygons, using a result from the prior section. For an interior point with xx-axis offset Δx\Delta x, we have corresponding y-axis offset Δy[h+|mΔx|,h|mΔx|]\Delta y\in[-h+|m\Delta x|,h-|m\Delta x|]. Therefore, interior points of the polygon at xC+Δxx_{C}+\Delta x have yint(mxCh+|mΔx|,mxC+h|mΔx|)y_{\text{int}}\in(-mx_{C}-h+|m\Delta x|,mx_{C}+h-|m\Delta x|). Note that because xint<0,Δx<xCx_{\text{int}}<0,\Delta x<-x_{C}. If xint>0x_{\text{int}}>0, the proof in Section IV-B applies. xint=0x_{\text{int}}=0 is a trivial case since all interior points there are inside the initial polygon centered at (0,0)(0,0).

Now we show that (xint,yint)(x_{\text{int}},y_{\text{int}}) always lies in the polygon centered at (0,0)(0,0). First we compare xintx_{\text{int}} to the polygon center 0 to determine the xx-axis offset Δxinit\Delta x_{\text{init}}, relative to the initial polygon at (0,0)(0,0). We have offset |xinit|=|Δx|xC|x_{\text{init}}|=|\Delta x|-x_{C}. By the same logic used to bound yinty_{\text{int}} in Section IV-B, Δyinit[h+m(|Δx|xC),hm(|Δx|xC)]\Delta y_{\text{init}}\in[-h+m*(|\Delta x|-x_{C}),h-m*(|\Delta x|-x_{C})]. Expanding this yields Δyinit[h+|mΔx|mxC,hm|Δx|mxC]\Delta y_{\text{init}}\in[-h+|m\Delta x|-mx_{C},h-m|\Delta x|-mx_{C}]. If we compare yinty_{\text{int}} and yinity_{\text{init}}, we see yinty_{\text{int}} and yinity_{\text{init}} fall within the same ranges (the former is open and the latter is closed). Therefore, any interior point (xint,yint)(x_{\text{int}},y_{\text{int}}) of a polygon with xint<0x_{\text{int}}<0 lies inside the initial polygon centered at (0,0)(0,0).

C-B Right Endpoint Proof

This proof proceeds similarly to the proof in Section C-A, though in the neighborhood of endpoint (xF,yF)(x_{F},y_{F}) (at which a piecewise change or active corner switch may occur). We show that any interior point of a polygon on trajectory y=f(x)y=f(x) with an xx-coordinate xint>xFx_{\text{int}}>x_{F} lies within the polygon centered at (xF,yF)(x_{F},y_{F}).

Consider a polygon centered at some (xC,yC)(x_{C},y_{C}) that has some interior points beyond xFx_{F}: its distance in the xx-axis from xFx_{F} is xFxCx_{F}-x_{C} and therefore yC(yFm(xFxC),yF+m(xFxC))y_{C}\in(y_{F}-m(x_{F}-x_{C}),y_{F}+m(x_{F}-x_{C})). Now, as in C-A, we consider interior points of this polygon at some positive Δx\Delta x offset from the center. Using similar logic as before, we find Δy[h+mΔx,hmΔx]\Delta y\in[-h+m\Delta x,h-m\Delta x]. For xintxC+Δxx_{\text{int}}\triangleq x_{C}+\Delta x, we have yint(yFm(xFxC)h+mΔx,yF+m(xFxC)+hmΔx)y_{\text{int}}\in(y_{F}-m(x_{F}-x_{C})-h+m\Delta x,y_{F}+m(x_{F}-x_{C})+h-m\Delta x).

Now we show that (xint,yint)(x_{\text{int}},y_{\text{int}}) always lies in the polygon centered at (xF,yF)(x_{F},y_{F}). First we must compare xintx_{\text{int}} to xFx_{F} to determine the xx-axis offset Δxfinal\Delta x_{\text{final}}, relative to the final polygon at (xF,yF)(x_{F},y_{F}). This offset Δxfinal=Δx(xFxC)=Δx+xCxF\Delta x_{\text{final}}=\Delta x-(x_{F}-x_{C})=\Delta x+x_{C}-x_{F}. Thus we can bound Δyfinal[h+m(Δx+xCxF),hm(Δx+xCxF)]\Delta y_{\text{final}}\in[-h+m(\Delta x+x_{C}-x_{F}),h-m(\Delta x+x_{C}-x_{F})] and yfinal[yFh+mΔx+mxCmxF,yF+hmΔxmxC+mxF])y_{\text{final}}\in[y_{F}-h+m\Delta x+mx_{C}-mx_{F},y_{F}+h-m\Delta x-mx_{C}+mx_{F}]). As above, we compare yinty_{\text{int}} and yfinaly_{\text{final}} and can see that yinty_{\text{int}} and yfinaly_{\text{final}} fall within the same intervals, with the former open and the latter closed. As above, we can state that any interior point of a polygon with xint>xFx_{\text{int}}>x_{F} lies inside the final polygon centered at (xF,yF)(x_{F},y_{F}).

C-C Proof of Tightness

Here we prove that safeimplsafeexpl\text{safe}_{\text{impl}}\implies\text{safe}_{\text{expl}} by contraposition. Together with the proof in Sections 4.2-4.4, this completes our proof of equivalence of the implicit and explicit formulations.

As above, we assume the active corners vi,vjv_{i},v_{j} do not change and we are in a rotated and shifted coordinate frame such that a line which runs through the active corners and the center of the polygon would be vertical. We also assume that we are in a segment of the trajectory with no active corner switches bounded by transition points, going from (0,0)(0,0) to (xF,yF)(x_{F},y_{F}).

Let (xO,yO)(x_{O},y_{O}) be the location of the obstacle. Let (xC,yC)(x_{C},y_{C}) be the location of the center of the polygon. Let (xi,yi)(x_{i},y_{i}) and (xj,yj)(x_{j},y_{j}) be the locations of active corners viv_{i} and vjv_{j}. Let Δxi=xixC,Δyi=yiyC,Δxj=xjxC,Δyj=yjyC\Delta x_{i}=x_{i}-x_{C},\Delta y_{i}=y_{i}-y_{C},\Delta x_{j}=x_{j}-x_{C},\Delta y_{j}=y_{j}-y_{C} to represent the xx and yy distances from the center to an active corner. This implies Δxi=Δxj=0\Delta x_{i}=\Delta x_{j}=0 and that xC=xi=xjx_{C}=x_{i}=x_{j}, given the coordinate frame rotation. We will also assume that yi>yjy_{i}>y_{j}, without loss of generality.

By definition, unsafeimpl\text{unsafe}_{\text{impl}} means (xO,yO)(x_{O},y_{O}) is inside or on the border of the polygon at any point on the rotated trajectory from (0,0)(0,0) to (xF,yF)(x_{F},y_{F}). By definition, unsafeexpl\text{unsafe}_{\text{expl}} means either

(yOf(xOΔxi)Δyi)(yOf(xOΔxj)Δyj)0\left(y_{O}-f(x_{O}-\Delta x_{i})-\Delta y_{i}\right)\cdot\left(y_{O}-f(x_{O}-\Delta x_{j})-\Delta y_{j}\right)\leq 0\\

when active corners ii and jj exist or (xO,yO)(x_{O},y_{O}) is inside or on the border of the polygon when at transition points (0,0)(0,0) or (xF,yF)(x_{F},y_{F}).

We prove that safeimplsafeexpl\text{safe}_{\text{impl}}\implies\text{safe}_{\text{expl}} by proving the contrapositive unsafeexplunsafeimpl\text{unsafe}_{\text{expl}}\implies\text{unsafe}_{\text{impl}}. We consider both cases for (xO,yO)(x_{O},y_{O}) being in the explicit unsafe region.

  • Case 1: There are no active corners, meaning (xO,yO)(x_{O},y_{O}) is inside or on the border of the polygon at either (0,0)(0,0) or (xF,yF)(x_{F},y_{F}). It follows trivially that (xO,yO)(x_{O},y_{O}) is in the unsafe region by definition for the implicit formulation of the unsafe region.

  • Case 2: We have active corners ii and jj, meaning

    (yOf(xO)Δyi)(yOf(xO)Δyj)0\left(y_{O}-f(x_{O})-\Delta y_{i}\right)\cdot\left(y_{O}-f(x_{O})-\Delta y_{j}\right)\leq 0\\

We proceed with Case 2. Since we do have active corners, xO[0,xF]x_{O}\in[0,x_{F}]. Since our trajectory f(x)f(x) is well-defined and continuous over the interval [0,xF][0,x_{F}], there exists a polygon centered on (xC,yC)=(xO,f(xO))(x_{C},y_{C})=(x_{O},f(x_{O})). Given xO=xCx_{O}=x_{C}, there are three possibilities for yOy_{O}, which we consider exhaustively.

Case A: yO>yiy_{O}>y_{i}:

Let yh>yiy_{h}>y_{i}. Then yh>yjy_{h}>y_{j} since we assume, without loss of generality, yi>yjy_{i}>y_{j}. Rearrangement yields yhyi>0y_{h}-y_{i}>0 and yhyj>0y_{h}-y_{j}>0. Then yhyi+yCyC>0y_{h}-y_{i}+y_{C}-y_{C}>0 and yhyj+yCyC>0y_{h}-y_{j}+y_{C}-y_{C}>0.

Therefore yh(yiyC)f(xC)=yhΔyif(xC)>0y_{h}-(y_{i}-y_{C})-f(x_{C})=y_{h}-\Delta y_{i}-f(x_{C})>0 and yh(yjyC)f(xC)=yhΔyjf(xC)>0y_{h}-(y_{j}-y_{C})-f(x_{C})=y_{h}-\Delta y_{j}-f(x_{C})>0. This means (yhf(xC)Δyi)(yhf(xC)Δyj)>0(y_{h}-f(x_{C})-\Delta y_{i})\cdot(y_{h}-f(x_{C})-\Delta y_{j})>0.

Case B: yO<yjy_{O}<y_{j}:

Let yl<yjy_{l}<y_{j}. By the same reasoning as Case A, (ylf(xC)Δyi)(ylf(xC)Δyj)>0(y_{l}-f(x_{C})-\Delta y_{i})\cdot(y_{l}-f(x_{C})-\Delta y_{j})>0, though the two terms multiplied are both negative.

Case C: yjyOyiy_{j}\leq y_{O}\leq y_{i}:

Let yjymyiy_{j}\leq y_{m}\leq y_{i}. Then ymyj0y_{m}-y_{j}\geq 0 and ymyi0y_{m}-y_{i}\leq 0, so ymyj+yCyC0y_{m}-y_{j}+y_{C}-y_{C}\geq 0 and ymyi+yCyC0y_{m}-y_{i}+y_{C}-y_{C}\leq 0. Therefore ymf(xC)Δyi=ymf(xC)(yiyC)0y_{m}-f(x_{C})-\Delta y_{i}=y_{m}-f(x_{C})-(y_{i}-y_{C})\leq 0 and ymf(xC)Δyj=ymf(xC)(yjyC)0y_{m}-f(x_{C})-\Delta y_{j}=y_{m}-f(x_{C})-(y_{j}-y_{C})\geq 0. This means

(ymf(xC)Δyi)(ymf(xC)Δyj)0(y_{m}-f(x_{C})-\Delta y_{i})\cdot(y_{m}-f(x_{C})-\Delta y_{j})\leq 0

We have covered all possible values for yOy_{O} when xO=xCx_{O}=x_{C} and we found that the only way for (yOf(xC)Δyi)(yOf(xC)Δyj)0(y_{O}-f(x_{C})-\Delta y_{i})\cdot(y_{O}-f(x_{C})-\Delta y_{j})\leq 0 is to have yjyOyiy_{j}\leq y_{O}\leq y_{i}. Therefore (yOf(xC)Δyi)(yOf(xC)Δyj)0yjyOyi(y_{O}-f(x_{C})-\Delta y_{i})\cdot(y_{O}-f(x_{C})-\Delta y_{j})\leq 0\implies y_{j}\leq y_{O}\leq y_{i}.

Since we are in a rotated coordinate system, yj,yiy_{j},y_{i} refer to vertices of the polygon along a vertical centerline. Hence (xO,yO)(x_{O},y_{O}) lies on that centerline, since we chose xCx_{C} such that xC=xOx_{C}=x_{O}. Thus (xO,yO)(x_{O},y_{O}) is inside the polygon at the point (xC,yC)=(xO,f(xO))(x_{C},y_{C})=(x_{O},f(x_{O})), which is the definition of unsafeimpl\text{unsafe}_{\text{impl}}. Therefore unsafeexplunsafeimpl\text{unsafe}_{\text{expl}}\implies\text{unsafe}_{\text{impl}}, or equivalently, safeimplsafeexpl\text{safe}_{\text{impl}}\implies\text{safe}_{\text{expl}}. Having shown both directions, we can state safeimplsafeexpl\textbf{safe}_{\text{impl}}\mathbf{\iff}\textbf{safe}_{\text{expl}}.

Appendix D Applications

D-A Dubins Path Example

Refer to caption
Figure 11: Dubins path instantiated with R=10,θ=π3,p=3,b=1R=10,\theta=\frac{\pi}{3},p=3,b=1

The trajectory below in Equation (16) is the equation for the Dubins path used in our evaluation above. Starting from the right at x=Rx=R, the path follows a circular path, then proceeds in a straight line after it has swept out angle θ\theta, then a straight line again until x=px=p, then another circular path until x=bx=b, and a straight line after that. The entire path is C1C^{1} smooth (function and its first derivative are continuous). Because of its length and complexity, a fully symbolic explicit formulation for a rectangle with symbolic dimensions moving along this cannot be included in this paper but can be computed using our implementation available on GitHub.

{strip}
{R2x2forx>Rtan2(θ)+1Rsin(θ)Rcos(θ)+xtan(θ)forp<xRsin(θ)ptan(θ)p2cos2(θ)(2p+x)2+|ptan(θ)|forb<xRsin(θ)ptan(θ)+(b+x)(2p+x)|cos(θ)|p2(b2p)2cos2(θ)b2cos2(θ)+4bpcos2(θ)4p2cos2(θ)+p2|cos(θ)|+|ptan(θ)|otherwise\begin{cases}\sqrt{R^{2}-x^{2}}&\text{for}\>x>\frac{R}{\sqrt{\tan^{2}{\left(\theta\right)}+1}}\\ R\sin{\left(\theta\right)}-\frac{-R\cos{\left(\theta\right)}+x}{\tan{\left(\theta\right)}}&\text{for}\>p<x\\ \frac{R}{\sin{\left(\theta\right)}}-\frac{p}{\tan{\left(\theta\right)}}-\sqrt{\frac{p^{2}}{\cos^{2}{\left(\theta\right)}}-\left(-2p+x\right)^{2}}+\left|{p\tan{\left(\theta\right)}}\right|&\text{for}\>b<x\\ \frac{R}{\sin{\left(\theta\right)}}-\frac{p}{\tan{\left(\theta\right)}}+\frac{\left(-b+x\right)\left(-2p+x\right)\left|{\cos{\left(\theta\right)}}\right|}{\sqrt{p^{2}-\left(b-2p\right)^{2}\cos^{2}{\left(\theta\right)}}}-\frac{\sqrt{-b^{2}\cos^{2}{\left(\theta\right)}+4bp\cos^{2}{\left(\theta\right)}-4p^{2}\cos^{2}{\left(\theta\right)}+p^{2}}}{\left|{\cos{\left(\theta\right)}}\right|}+\left|{p\tan{\left(\theta\right)}}\right|&\text{otherwise}\end{cases} (16)

D-B Jeannin 2015

Below is the explicit formulation of the unsafe region as plotted in Figure 9. The following boolean formula is computed for a simplified version of the formulation in [21], with a rectangular object of width 1.5 and height 1, and trajectory

{cx2forb>xb2c+2bc(b+x)otherwise\begin{cases}cx^{2}&\text{for}\>b>x\\ b^{2}c+2bc\left(-b+x\right)&\text{otherwise}\end{cases} (17)

The boolean formula for the explicit formulation is below in Equation (18). It includes all the components from Equation (6), such as testing if the obstacle is between the active corners as in Equation (4), clipping the function f()f(\cdot) and using a function g()g(\cdot) instead as in Equation (5), bounds ensuring tests apply only over a valid subregion as in Figure 4, and testing for the notch at transition points and piecewise boundaries.

{strip}
xb2cw+bh+wyhxbw(h+y{b2cforb>w+xb2c+2bc(bw+x)forwx)(h+y{b2cforb>w+xb2c+2bc(b+w+x)forw+x)0xb2cw+bhwyhxbw(h+y{b2cforb>w+xb2c+2bc(b+w+x)forw+x)(h+y{b2cforb>w+xb2c+2bc(bw+x)forwx)0xb2cw+bh+wyhxb+w(h+y{c(w+x)2forbw+xb2cotherwise)(h+y{c(w+x)2forbw+xb2cotherwise)0xb2cw+bhwyhxb+w(h+y{c(w+x)2forbw+xb2cotherwise)(h+y{c(w+x)2forbw+xb2cotherwise)0(2h(bw+x)02h(b+w+x)02w(b2ch+y)02w(b2c+h+y)0)(2h(bw+x)02h(b+w+x)02w(b2ch+y)02w(b2c+h+y)0)x\geq\frac{-b^{2}cw+bh+wy}{h}\wedge x\geq b-w\\ \wedge\left(-h+y-\begin{cases}b^{2}c&\text{for}\>b>-w+x\\ b^{2}c+2bc\left(-b-w+x\right)&\text{for}\>w-x\geq-\infty\end{cases}\right)\left(h+y-\begin{cases}b^{2}c&\text{for}\>b>w+x\\ b^{2}c+2bc\left(-b+w+x\right)&\text{for}\>w+x\leq\infty\end{cases}\right)\leq 0\\ \vee x\geq\frac{b^{2}cw+bh-wy}{h}\wedge x\geq b-w\\ \wedge\left(-h+y-\begin{cases}b^{2}c&\text{for}\>b>w+x\\ b^{2}c+2bc\left(-b+w+x\right)&\text{for}\>w+x\leq\infty\end{cases}\right)\left(h+y-\begin{cases}b^{2}c&\text{for}\>b>-w+x\\ b^{2}c+2bc\left(-b-w+x\right)&\text{for}\>w-x\geq-\infty\end{cases}\right)\leq 0\\ \vee x\leq\frac{-b^{2}cw+bh+wy}{h}\wedge x\leq b+w\\ \wedge\left(-h+y-\begin{cases}c\left(-w+x\right)^{2}&\text{for}\>b\geq-w+x\\ b^{2}c&\text{otherwise}\end{cases}\right)\left(h+y-\begin{cases}c\left(w+x\right)^{2}&\text{for}\>b\geq w+x\\ b^{2}c&\text{otherwise}\end{cases}\right)\leq 0\vee\\ x\leq\frac{b^{2}cw+bh-wy}{h}\wedge x\leq b+w\\ \wedge\left(-h+y-\begin{cases}c\left(w+x\right)^{2}&\text{for}\>b\geq w+x\\ b^{2}c&\text{otherwise}\end{cases}\right)\left(h+y-\begin{cases}c\left(-w+x\right)^{2}&\text{for}\>b\geq-w+x\\ b^{2}c&\text{otherwise}\end{cases}\right)\leq 0\\ \vee\left(-2h\left(-b-w+x\right)\geq 0\wedge 2h\left(-b+w+x\right)\geq 0\wedge-2w\left(-b^{2}c-h+y\right)\geq 0\wedge 2w\left(-b^{2}c+h+y\right)\geq 0\right)\vee\\ \left(-2h\left(-b-w+x\right)\leq 0\wedge 2h\left(-b+w+x\right)\leq 0\wedge-2w\left(-b^{2}c-h+y\right)\leq 0\wedge 2w\left(-b^{2}c+h+y\right)\leq 0\right) (18)

D-C Adler 2019

Below is the explicit formulation of the unsafe region as plotted in Figure 10. The following boolean formula is computed for the formulation in [1], with a regular hexagon of radius 22 approximating a circular object and trajectory generated with parameters R=10,θ=π3R=10,\theta=\frac{\pi}{3}:

{100x2forx>53(x5)3+53otherwise\begin{cases}\sqrt{100-x^{2}}&\text{for}\>x>5\\ -\frac{\sqrt{3}\left(x-5\right)}{3}+5\sqrt{3}&\text{otherwise}\end{cases} (19)

The fully symbolic trajectory for this application is

{R2x2forx>Rtan2(θ)+1Rsin(θ)Rcos(θ)+xtan(θ)otherwise\begin{cases}\sqrt{R^{2}-x^{2}}&\text{for}\>x>\frac{R}{\sqrt{\tan^{2}{\left(\theta\right)}+1}}\\ R\sin{\left(\theta\right)}-\frac{-R\cos{\left(\theta\right)}+x}{\tan{\left(\theta\right)}}&\text{otherwise}\end{cases} (20)

The boolean formula for the explicit formulation is below in Equation (21). It includes all the components from Equation (6), such as testing if the obstacle is between the active corners as in Equation (4), clipping the function f()f(\cdot) and using a function g()g(\cdot) instead as in Equation (5), bounds ensuring tests apply only over a valid subregion as in Figure 4, and testing for the notch at transition points and piecewise boundaries. Because of its length and complexity, a fully symbolic explicit formulation cannot be included in this paper but can be computed using our implementation available on GitHub.

(x14x7(3xy)(3xy+6833)0(y{3233forx1<123(x6)3+53forx1553otherwise3)×(y{3233forx+1<123(x4)3+53forx+1553otherwise+3)0)(x3x2+53(3xy)(3xy10)0(y{53forx1<5100(x1)2forx1535otherwise3)×(y{53forx+1<5100(x+1)2forx+1535otherwise+3)0)(x2+53x12y(y5)0(y{5forx2<53100(x2)2forx2100otherwise)(y{5forx+2<53100(x+2)2forx+2100otherwise)0)(2y+230y3(x12)0y+3(x8)02y+230y+3(x9)+30y3(x11)+30)(2y+12302y830y3(x7)+530y+3(x4)+630y3(x6)430y+3(x3)530)(2y+703302y58330y3(x+10)+32330y+3(x+13)+35330y3(x+11)29330y+3(x+14)32330)(2y+23+100y3(x532)+50y+3(x53+2)502y10+230y+3(x53+1)+3+50y3(x531)5+30)(2y+230y3(x12)0y+3(x8)02y+230y+3(x9)+30y3(x11)+30)(2y+12302y830y3(x7)+530y+3(x4)+630y3(x6)430y+3(x3)530)(2y+703302y58330y3(x+10)+32330y+3(x+13)+35330y3(x+11)29330y+3(x+14)32330)(2y+23+100y3(x532)+50y+3(x53+2)502y10+230y+3(x53+1)+3+50y3(x531)5+30)(x\geq-14\ \wedge x\leq 7\ \wedge(\sqrt{3}x-y)(\sqrt{3}x-y+\frac{68\sqrt{3}}{3})\leq 0\ \wedge\\ (y-\begin{cases}\frac{32\sqrt{3}}{3}&\text{for}\>x-1<-12\\ -\frac{\sqrt{3}(x-6)}{3}+5\sqrt{3}&\text{for}\>x-1\leq 5\\ 5\sqrt{3}&\text{otherwise}\end{cases}-\sqrt{3})\times\\ (y-\begin{cases}\frac{32\sqrt{3}}{3}&\text{for}\>x+1<-12\\ -\frac{\sqrt{3}(x-4)}{3}+5\sqrt{3}&\text{for}\>x+1\leq 5\\ 5\sqrt{3}&\text{otherwise}\end{cases}+\sqrt{3})\leq 0)\\ \ \vee(x\geq 3\ \wedge\\ x\leq 2+5\sqrt{3}\ \wedge\\ (\sqrt{3}x-y)(\sqrt{3}x-y-10)\leq 0\ \wedge\\ (y-\begin{cases}5\sqrt{3}&\text{for}\>x-1<5\\ \sqrt{100-(x-1)^{2}}&\text{for}\>x-1\leq 5\sqrt{3}\\ 5&\text{otherwise}\end{cases}-\sqrt{3})\times\\ (y-\begin{cases}5\sqrt{3}&\text{for}\>x+1<5\\ \sqrt{100-(x+1)^{2}}&\text{for}\>x+1\leq 5\sqrt{3}\\ 5&\text{otherwise}\end{cases}+\sqrt{3})\leq 0)\ \vee\\ (x\geq-2+5\sqrt{3}\ \wedge\\ x\leq 12\ \wedge\\ y(y-5)\leq 0\ \wedge\\ (y-\begin{cases}5&\text{for}\>x-2<5\sqrt{3}\\ \sqrt{100-(x-2)^{2}}&\text{for}\>x-2\leq 10\\ 0&\text{otherwise}\end{cases})(y-\begin{cases}5&\text{for}\>x+2<5\sqrt{3}\\ \sqrt{100-(x+2)^{2}}&\text{for}\>x+2\leq 10\\ 0&\text{otherwise}\end{cases})\leq 0)\ \vee\\ (-2y+2\sqrt{3}\geq 0\ \wedge-y-\sqrt{3}(x-12)\geq 0\ \wedge y+\sqrt{3}(x-8)\geq 0\ \wedge\\ 2y+2\sqrt{3}\geq 0\ \wedge-y+\sqrt{3}(x-9)+\sqrt{3}\geq 0\ \wedge\\ y-\sqrt{3}(x-11)+\sqrt{3}\geq 0)\ \vee(-2y+12\sqrt{3}\geq 0\ \wedge\\ 2y-8\sqrt{3}\geq 0\ \wedge-y-\sqrt{3}(x-7)+5\sqrt{3}\geq 0\ \wedge\\ -y+\sqrt{3}(x-4)+6\sqrt{3}\geq 0\\ \wedge y-\sqrt{3}(x-6)-4\sqrt{3}\geq 0\ \wedge\\ y+\sqrt{3}(x-3)-5\sqrt{3}\geq 0)\ \vee(-2y+\frac{70\sqrt{3}}{3}\geq 0\ \wedge\\ 2y-\frac{58\sqrt{3}}{3}\geq 0\ \wedge-y-\sqrt{3}(x+10)+\frac{32\sqrt{3}}{3}\geq 0\ \wedge-y+\sqrt{3}(x+13)+\\ \frac{35\sqrt{3}}{3}\geq 0\ \wedge y-\sqrt{3}(x+11)-\frac{29\sqrt{3}}{3}\geq 0\ \wedge\\ y+\sqrt{3}(x+14)-\frac{32\sqrt{3}}{3}\geq 0)\ \vee(-2y+2\sqrt{3}+10\geq 0\ \wedge\\ -y-\sqrt{3}(x-5\sqrt{3}-2)+5\geq 0\ \wedge\\ y+\sqrt{3}(x-5\sqrt{3}+2)-5\geq 0\ \wedge 2y-10+2\sqrt{3}\geq 0\ \wedge\\ -y+\sqrt{3}(x-5\sqrt{3}+1)+\sqrt{3}+5\geq 0\ \wedge y-\sqrt{3}(x-5\sqrt{3}-1)-5+\sqrt{3}\geq 0)\ \vee\\ (-2y+2\sqrt{3}\leq 0\ \wedge-y-\sqrt{3}(x-12)\leq 0\ \wedge y+\sqrt{3}(x-8)\leq 0\\ \wedge 2y+2\sqrt{3}\leq 0\ \\ \wedge-y+\sqrt{3}(x-9)+\sqrt{3}\leq 0\ \wedge y-\sqrt{3}(x-11)+\sqrt{3}\leq 0)\ \vee\\ (-2y+12\sqrt{3}\leq 0\ \wedge 2y-8\sqrt{3}\leq 0\ \wedge\\ -y-\sqrt{3}(x-7)+5\sqrt{3}\leq 0\ \wedge-y+\sqrt{3}(x-4)+6\sqrt{3}\leq 0\ \wedge\\ y-\sqrt{3}(x-6)-4\sqrt{3}\leq 0\ \\ \wedge y+\sqrt{3}(x-3)-5\sqrt{3}\leq 0)\ \vee(-2y+\frac{70\sqrt{3}}{3}\leq 0\ \wedge\\ 2y-\frac{58\sqrt{3}}{3}\leq 0\ \wedge-y-\sqrt{3}(x+10)+\frac{32\sqrt{3}}{3}\leq 0\ \wedge\\ -y+\sqrt{3}(x+13)+\\ \frac{35\sqrt{3}}{3}\leq 0\ \wedge y-\sqrt{3}(x+11)-\frac{29\sqrt{3}}{3}\leq 0\ \wedge\\ y+\sqrt{3}(x+14)-\frac{32\sqrt{3}}{3}\leq 0)\ \vee\\ (-2y+2\sqrt{3}+10\leq 0\ \wedge-y-\sqrt{3}(x-5\sqrt{3}-2)+5\leq 0\ \\ \wedge y+\sqrt{3}(x-5\sqrt{3}+2)-5\leq 0\ \wedge\\ 2y-10+2\sqrt{3}\leq 0\ \wedge-y+\sqrt{3}(x-5\sqrt{3}+1)+\sqrt{3}+5\leq 0\ \wedge\\ y-\sqrt{3}(x-5\sqrt{3}-1)-5+\sqrt{3}\leq 0) (21)