Automating Geometric Proofs of Collision Avoidance with Active Corners
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.
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 , a vehicle occupying the volume when centered on position along the trajectory, and a point-obstacle , the vehicle will not collide with the obstacle if and only if:
(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 , 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
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 and height that moves in the plane. The airplane begins at the origin and moves in the plane with piecewise trajectory :
(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 to be avoided; that is, the rectangle never intersects the obstacle. Then we can state an quantified (or implicit) formulation of obstacle avoidance:
(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 is far enough away (either width in the -axis or height in the -axis) from a point obstacle at , 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 and . 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 or and a function (differentiable and having a continuous derivative). Trajectories must have a finite number of these 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 from the center to the -th vertex, and there are vertices for an -sided polygon. Thus, the trajectory for vertex is or . 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 ; the case for 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 ) and the shape of the convex object. A corner is active when the slope of the trajectory is between the slopes of the sides adjacent to ; 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 through counter-clockwise (with and ), corner is active if and only if the slope of the trajectory is in the angle interval , or symmetrically in the angle interval . Because the direction of the trajectory is inconsequential for our purpose, is modulo .
For example, on the hexagon of Figure 2, and are active when ; and are active when ; and and are active when . 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.
Given an obstacle at point , 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 for active corner (vertex) . This term will be positive for both vertices if the obstacle is above both corner-trajectories, and similarly negative if the obstacle is below both. Therefore, any point 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:
(4) |
where are the (constant) offsets from the center of the polygon to the active corners (vertices) .
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 with . If the test in (4) indicates that an object lies within the unsafe region, trajectory or is clearly unsafe.
III-C Notches at Transition Points Between Active Corners
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 , the advisory is not necessarily safe; we additionally check safety at all transition points to see whether the obstacle at lies within the polygon centered at . 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.
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 , where 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 (or symmetrically) that holds the value of each subfunction outside of its subdomain . The function is used in place of in (4) above. Let .
(5) |
Additionally, we add a clause to ensure the modified subfunction is only used over the correct subdomain. First, we check , where 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 and and check 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 and the additional subdomain-related clauses.
(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 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 . 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 is inside the polygon at various transition points .
IV-A Proof Preliminaries
Consider a segment of the motion along trajectory or 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 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 for the proof; any trajectory can be rotated into the form invertibly, so our results hold for these forms as well. Let denote the active corners for this segment, with corresponding offsets in the rotated coordinate system.
Since no active corner switch occurs, then we know the slope of function is limited by the shape of the polygon itself – let these bounds be , with 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 () are also safe using the input implicit formulation (). To prove , we prove the contrapositive .
Specifically, means that an obstacle at is inside a polygon centered at some coordinates ; means that the below holds from (4):
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.
IV-B Middle Segment Proof
Consider a (symmetric) polygon , with half-height and half-width , centered at , where . Let be a point inside or on the edges of . We prove that interior point lies between the active corners of an identical polygon located at . We do this by bounding three terms: 1) , 2) , and 3) the active corners of to prove that lies between them.
First, we bound (the center of ). Let , for . Let , for some which we will bound. The slope of the trajectory is bounded by , because this proof considers a segment of motion with no changes in active corner. Hence is bounded proportionally to , with . Therefore, . Our proof proceeds assuming , since if will lie on the vertical centerline of . In that case, it is trivial to show lies between the active corners.
Now, we bound . Recall , for . Given that the slopes of the sides on the top and bottom of are , we assert that any with has a corresponding . This is illustrated in Figure 7 with a hexagon, but it generalizes to any symmetric convex polygon. Given this, we can bound the and interior coordinates as below:
(7) |
Finally, we show interior point y-coordinate lies within the active corners of . 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 and , respectively. The bounds on and are given by the following:
(8) |
Then and .
The top active corner trajectory is given by and the bottom active corner trajectory is given by . By definition, and , or equivalently, and . Since and ,
(9) |
By multiplying the equations in (9), we get
(10) |
This is equivalent test for whether an object lies in the unsafe region from (4). Therefore we have shown that for all points satisfying , all points inside and on the boundary of a polygon centered at also have . These are exactly the definitions of and from IV-A earlier. Therefore, we have shown and the contrapositive 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 of each side of the object. To avoid discontinuities in the function, the implementation solves a reformulation: . Solving this equation may yield either in terms of or the reverse. In this case, we substitute the implicit solution for or 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 lies in the “notch” at any transition point. The output explicit formulation can be expressed either in LaTeX 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, may mean that certain transition points do not occur at all if 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 is positive, no returned ordering will place before a transition point at , 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 lies between the piecewise boundaries for . Doing so ensures that we generate relatively few ( 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

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 and half-height . 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 of the two aircraft and assumed it constant; the vertical velocity of the oncoming aircraft 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 greater than its current vertical velocity . are the coordinates for trajectory in this example, and is the acceleration.
(11) |
The implicit formulation of the safe region is below, for an oncoming aircraft at relative coordinates .
(12) |
VI-B Verified Turning Maneuvers for Unmanned Aerial Vehicles

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:
(13) |
With a circular safety buffer of radius , the implicit formulation ensures for all points along the trajectory, the obstacle is at least away.
(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 |
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 dimensions; trajectories in the form of inequalities; rotating objects; and invariants of differential equations of the form 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).
(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 and width , and the obstacle of height and width , 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 and width . 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 to . The section above showed interior points with lie between the active corner-trajectories, but polygons near the endpoints may have interior points with or , despite being centered along the trajectory segment. Here, we consider interior points with -coordinates that are less than 0 and show these points lie within the initial polygon centered at . For these interior points, polygon center .
First, bound the -coordinate of such polygons: with minimum trajectory slope and maximum , . 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 -axis offset , we have corresponding y-axis offset . Therefore, interior points of the polygon at have . Note that because . If , the proof in Section IV-B applies. is a trivial case since all interior points there are inside the initial polygon centered at .
Now we show that always lies in the polygon centered at . First we compare to the polygon center to determine the -axis offset , relative to the initial polygon at . We have offset . By the same logic used to bound in Section IV-B, . Expanding this yields . If we compare and , we see and fall within the same ranges (the former is open and the latter is closed). Therefore, any interior point of a polygon with lies inside the initial polygon centered at .
C-B Right Endpoint Proof
This proof proceeds similarly to the proof in Section C-A, though in the neighborhood of endpoint (at which a piecewise change or active corner switch may occur). We show that any interior point of a polygon on trajectory with an -coordinate lies within the polygon centered at .
Consider a polygon centered at some that has some interior points beyond : its distance in the -axis from is and therefore . Now, as in C-A, we consider interior points of this polygon at some positive offset from the center. Using similar logic as before, we find . For , we have .
Now we show that always lies in the polygon centered at . First we must compare to to determine the -axis offset , relative to the final polygon at . This offset . Thus we can bound and . As above, we compare and and can see that and 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 lies inside the final polygon centered at .
C-C Proof of Tightness
Here we prove that 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 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 to .
Let be the location of the obstacle. Let be the location of the center of the polygon. Let and be the locations of active corners and . Let to represent the and distances from the center to an active corner. This implies and that , given the coordinate frame rotation. We will also assume that , without loss of generality.
By definition, means is inside or on the border of the polygon at any point on the rotated trajectory from to . By definition, means either
when active corners and exist or is inside or on the border of the polygon when at transition points or .
We prove that by proving the contrapositive . We consider both cases for being in the explicit unsafe region.
-
•
Case 1: There are no active corners, meaning is inside or on the border of the polygon at either or . It follows trivially that is in the unsafe region by definition for the implicit formulation of the unsafe region.
-
•
Case 2: We have active corners and , meaning
We proceed with Case 2. Since we do have active corners, . Since our trajectory is well-defined and continuous over the interval , there exists a polygon centered on . Given , there are three possibilities for , which we consider exhaustively.
Case A: :
Let . Then since we assume, without loss of generality, . Rearrangement yields and . Then and .
Therefore and . This means .
Case B: :
Let . By the same reasoning as Case A, , though the two terms multiplied are both negative.
Case C: :
Let . Then and , so and . Therefore and . This means
We have covered all possible values for when and we found that the only way for is to have . Therefore .
Since we are in a rotated coordinate system, refer to vertices of the polygon along a vertical centerline. Hence lies on that centerline, since we chose such that . Thus is inside the polygon at the point , which is the definition of . Therefore , or equivalently, . Having shown both directions, we can state .
Appendix D Applications
D-A Dubins Path Example

The trajectory below in Equation (16) is the equation for the Dubins path used in our evaluation above. Starting from the right at , the path follows a circular path, then proceeds in a straight line after it has swept out angle , then a straight line again until , then another circular path until , and a straight line after that. The entire path is 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.
(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
(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 and using a function 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.
(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 approximating a circular object and trajectory generated with parameters :
(19) |
The fully symbolic trajectory for this application is
(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 and using a function 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.
(21) |