Hou at Al New Algorithms For Computing The Time-To-Collision in Freeway Traffic Simulation Models
Hou at Al New Algorithms For Computing The Time-To-Collision in Freeway Traffic Simulation Models
Research Article
New Algorithms for Computing the Time-to-Collision in
Freeway Traffic Simulation Models
Copyright © 2014 Jia Hou et al. This is an open access article distributed under the Creative Commons Attribution License, which
permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Ways to estimate the time-to-collision are explored. In the context of traffic simulation models, classical lane-based notions of
vehicle location are relaxed and new, fast, and efficient algorithms are examined. With trajectory conflicts being the main focus,
computational procedures are explored which use a two-dimensional coordinate system to track the vehicle trajectories and assess
conflicts. Vector-based kinematic variables are used to support the calculations. Algorithms based on boxes, circles, and ellipses
are considered. Their performance is evaluated in the context of computational complexity and solution time. Results from these
analyses suggest promise for effective and efficient analyses. A combined computation process is found to be very effective.
1. Introduction analyzed and compared. This leads to a result that one of the
algorithms is recommended as the primary methodology to
The time-to-collision (TTC) has often been used as a risk apply in traffic simulation models.
assessment metric for traffic safety analyses. In freeway simu-
lation models, TTC is often a critical element of a driver’s tra- 2. Literature Review
jectory management decision-making process. TTC assesses
the interaction intensity among vehicles. However, comput- The idea of computing a time-to-collision (TTC) was first
ing the TTC is not trivial. Projections of future interactions suggested by Hayward [1]. He defined it as “the time required
among vehicles involve creating predicted trajectories for for two vehicles to collide if they continue at their present
the subject vehicle as well as all other vehicles with which speed and on the same path.” Hydén suggested that lower
interactions might occur in order to see if collisions might TTC values correspond to higher conflict severities [2].
occur. The objective of this paper is to consider and evaluate Although this point has been argued in the safety assessment
algorithms that could be used to compute this new TTC in literature, it seems clear that lower TTC values correspond to
microsimulation based models. The algorithm must be as effi- a higher probability of collision [3, 4]. Hence, TTC is gener-
cient since the speed of the TTC computation will influence ally perceived to be a primary and efficient measure in traffic
the capacity of the simulation model. In contrast with existing safety assessment especially in assessing conflicts. In micro-
research, the algorithms discussed here address the problem scopic simulation, TTC is one of the most common safety
from a 2D continuous perspective. Given that focus, several surrogate assessment measures employed. In 2003, FHWA
approaches are examined for computing the TTC in a fast released a report that introduced the use of traffic simulation
and accurate manner. The results of these investigations are models to obtain surrogate safety measures [5]. In that doc-
presented and one procedure is recommended for use. ument, computational algorithms for calculating surrogate
Following this introduction, the next section reviews safety measures for different conflict types were described,
related research. The third part illustrates the problem of and example diagrams were provided to illustrate the calcula-
interest and the fourth presents several computational algo- tions graphically. In 2008, FHWA combined traffic simulation
rithms that are described. After that, the algorithms are and automated traffic conflict analysis to develop a software
2 Computational Intelligence and Neuroscience
Acceleration vector
after reaction time t
utility referred to as a surrogate safety assessment model 3. TTC as a Trajectory Management Aid
(SSAM) [6].
Besides being a safety indicator, the use of TTC as a cue 3.1. The Context of the Simulation System. In the new algo-
for decision-making in traffic has been suggested by several rithms presented here, the vehicles are treated as being in a
studies. For example, Horst found that both the decision to two-dimension plane. Each one is represented by a rectangle
start braking and the control of the braking process itself located at a specific spot in the 𝑋-𝑌 plane. Each has a velocity
can be based on TTC-related information [7]. By measuring and an acceleration, both of which are vectors.
drivers’ last second braking and steering while approaching a There are no “lead vehicles” or “following vehicles.” Each
surrogate target lead vehicle, a model is built which indicates “subject” vehicle interacts with its nearby vehicles. The subject
that the drivers’ response is according to an inverse time-to- vehicle’s actions are consistent with three rules: (i) follow
collision threshold that decreases linearly with driver speed the vehicles in front, (ii) avoid collisions, and (iii) scale the
[8]. intensity of the actions taken based on the numerical value of
TTC will not be simply replaced by headway since field the TTC. That is, employ more intense actions for larger TTC
data showed that headway and TTC are independent of each values and vice versa.
other [9]. In the case of the TTC evaluations commonly The TTC is computed every time step for each vehicle
performed today, vehicles are assumed to stay in the same pair that are close enough to each other that a TTC value
lane until their positions overlap. As a result, the TTC calcu- is meaningful. The new coordinates of the “subject” vehicle
lations are one-dimensional and the kinematic variables are are computed based on its old location, new speed vector,
scalars instead of vectors. The time-to-collision of a vehicle- and new acceleration vector. Its new speed vector is similarly
driver combination 𝑖 at instant 𝑡 with respect to a leading computed from its old speed and new acceleration vector.
vehicle 𝑖 − 1 on the same path is calculated with Acceleration vectors are determined through an analysis of
the desired trajectory, road geometry, traffic controls (e.g.,
𝑋𝑖 (𝑡) − 𝑋𝑖−1 (𝑡) − 𝑙𝑖 stop signs, traffic signals, and speed limits), and proximity
TTC𝑖 = ∀𝑋̇ 𝑖 (𝑡) > 𝑋̇ 𝑖−1 (𝑡) , (1) to neighboring vehicles. Acceleration is deemed acceptable
𝑋̇ 𝑖 (𝑡) − 𝑋̇ 𝑖−1 (𝑡)
if it will not lead to any collisions. This process is illustrated
in Figure 1. It places those computations into the broader
where 𝑋̇ 𝑖 denotes the speed, 𝑋 the position, and 𝑙 the vehicle trajectory management context. The “TTC algorithm” box
length [10]. From (1) it can be seen that the TTC is usually highlights the materials being discussed in this paper.
computed for a specific path. Laureshyn et al. indicated that
TTC could make continuous description during the road
users’ encounter process and provided a procedure for calcu- 3.2. A New Definition of TTC. The intent here is to compute
lating TTC for one vehicle’s side and another’s corner point a TTC that can influence the reaction maneuvers of subject
[11]. vehicles. That is, the focus is not just on computing an
Unfortunately, these computational procedures do not “expected or actual time-to-collision.” Rather, it is to measure
align well with the way vehicles move. They do not jump the imminent danger faced by the driver (the possibility that
from one lane to another. Moreover, additional vehicles are an accident will happen) if he/she continues on the current
considered besides the one in front. If the TTC is to be used trajectory. The idea presented here is to define the TTC as
as a decision-making aid, it should address situations where “the time it will take a subject vehicle to collide with another
vehicles are in the process of changing lanes. Moreover, accel- vehicle in its immediate vicinity if the present trajectories
eration should be included not just location and speed. This continue to be followed.” This definition is different in two
paper presents a new TTC definition as well as algorithms respects from the one currently in use: (i) acceleration is taken
based on that definition with these thoughts in mind. into consideration and (ii) the environmental objects include
Computational Intelligence and Neuroscience 3
4. Methodology
Discenter = Ri + Rj Rj
The key to the method is a simple, straightforward way to
determine when the “subject” vehicle will “touch” a “target”
vehicle. As the reader might expect, the geometric shapes
assumed for the two vehicles have a significant impact on the
complexity of and time required for the calculations. Even
though we assumed that the vehicles are basically rectangles
when projected to the plane, we need to deal with the buffer
areas in computing the TTC. Hence the shape used in the Figure 3: A collision based on circles as buffers.
analysis should not be the physical rectangle. It should be
larger or even a different shape.
Another reason to consider different shapes is that the real positive roots for the equation in the range of effective
geometric features of the shape will influence the complexity TTC values, the smallest value is the TTC. As can be seen,
of the algorithm. In the following text, four algorithms are the computation is straightforward and simple.
discussed based on different shapes.
4.2. Rectangle Algorithm. This algorithm treats both the sub-
4.1. Circle Algorithm. Circles are a valuable geometric shape ject vehicle and the target vehicles as rectangles. The rectangle
with which to experiment. Determining when two circles for the subject vehicle is larger than its own physical rectangle
touch is simply a matter of determining whether the distance to account for the buffer area. The target vehicle is repre-
between the circle centers is less than the sum of the radii. The sented by the rectangle of its own measure. When the two
problem is, the shape of the circles does not match well with rectangles overlap, a collision has occurred.
our notion of a buffer. But that limitation does not imply that In this case, it is not possible to solve a set of equations
the use of circles should be omitted. This could be a valuable directly to compute the TTC. Simulation must be used.
prescreening procedure. Hence, the algorithmic task is as follows: “given the orienta-
As shown in Figure 3, if the buffers are circles, then, when tion of two rectangles with certain speeds and accelerations,
the distance between the centers of two circles is equal to the move them from one time step to another, and get the time
sum of the two radii, the subject vehicle has touched the target when they overlap.”
vehicle. Fortunately, it is trivial to locate a pair of rectangles in
Mathematically, given the radius, position, and state of every time step of the simulation. A general polygon-clipping
motion for every vehicle (circle), the TTC is easy to obtain. algorithm can be used to perform the detection. As shown
The equation set is in Figure 4, one of the two rectangles is defined to be the
clipper and the other is the target. The edges of the clipper
1
[𝑥𝑖 + V𝑥𝑖 ⋅ TTC𝑖𝑗 + 𝑎𝑥𝑖 ⋅ TTC𝑖𝑗 2 are assumed to be vectors oriented in a clockwise direction.
2 Each directed edge of the clipper is used to cut the target
2
1 rectangle, retaining at each step the remaining piece of the
− (𝑥𝑗 + V𝑥𝑗 ⋅ TTC𝑖𝑗 + 𝑎𝑥𝑗 ⋅ TTC𝑖𝑗 2 )] target that is to the right of the clipping edge. This process
2
continues until all the edges of the clipper have been exam-
1
+ [𝑦𝑖 + V𝑦𝑖 ⋅ TTC𝑖𝑗 + 𝑎𝑦𝑖 ⋅ TTC𝑖𝑗 2 (2) ined. A collision exists if the target rectangle has a nonzero
2 area remaining.
2 As each edge of the clipper is examined, the size of the
1
− (𝑦𝑗 + V𝑦𝑗 ⋅ TTC𝑖𝑗 + 𝑎𝑦𝑗 ⋅ TTC𝑖𝑗 2 )] remaining area is tested. To determine if an endpoint is to the
2 right of the clipping vector, the cross product of that vector
2 and the vector from the starting point of the clipping vector
= (𝑟𝑖 + 𝑟𝑗 ) ,
to the endpoint is applied. If one of two adjacent points is on
where TTC𝑖𝑗 is the unknown value of TTC between the 𝑖th the left while the other is on the right, the intersection point
and 𝑗th vehicle, 𝑥𝑖 and 𝑦𝑖 are the coordinates, V𝑥𝑖 and V𝑦𝑖 of the clipping vector and the line segment defined by those
are speed components on 𝑋 and 𝑌 direction, 𝑎𝑥𝑖 and 𝑎𝑦𝑖 are two points remains as a new endpoint of the rest piece.
acceleration components on 𝑋 and 𝑌 direction of 𝑖th vehicle,
and 𝑟𝑖 is the radius of the circle standing for the 𝑖th vehicle. 4.3. Ellipse-Rectangle Algorithm. As shown in Figure 5, this
It is a quartic equation with one unknown TTC𝑖𝑗 . If there are option uses an ellipse to represent the subject vehicle and a
Computational Intelligence and Neuroscience 5
Buffer
area
The subject
Step 1 Step 2 vehicle
Some other
vehicle
Step 4 Step 3
Figure 5: The illustration for the ellipse-rectangle algorithm.
l3
(a) Nine regions for the ellipse (b) Lines and the ellipse
Figure 6: Detection of the intersection between the ellipse-rectangle and a line segment.
then there must be a collision between 𝑡0 + TTCbigcir and Table 2: Computation times for the example dataset.
𝑡0 +TTCsmacir . To find out the exact TTC, the ellipse-rectangle
Correlation coefficient
algorithm is employed.
Computation between inverse TTC
If a collision is predicted based on the big circle analysis, Algorithm type
time (sec) and reaction intensity
while none is predicted by the small circle one, simulation is 𝑟 (𝑃 < 0.01)
used to see if a collision occurs, but the simulation starts at Circle algorithm 18 0.381
𝑡0 + TTCbigcir . Values between 𝑡0 and 𝑡0 + TTCbigcir can be Rectangle algorithm 32 0.522
ignored. Ellipse-rectangle
45 0.732
One important issue is the determination of the geomet- algorithm
ric dimensions. The size of the ellipse is the same as was Optimized algorithm 17 0.732
discussed previously. Optimized algorithm
36 0.732
The radius of the big circle should be greater than or only using big circle
equal to the sum of the major semiaxis of subject ellipse and Optimized algorithm
48 0.732
only using small circle
the semidiagonal length of the rectangle. This is because the
function of the big circle algorithm is to find those vehicle
pairs which have no chance of colliding. The radius of the
Comparisons were drawn among the aforementioned
small circle should be the same length of the smallest axis of
algorithms, a process using big circle and ellipse-rectangle
the ellipse or rectangle.
without small circle (numerical simulation starting from
TTCbigcir ) and a process using small circle and ellipse-
5. Numerical Example and Comparison rectangle only (dichotomy search between 𝑡0 + TTCbigcir
and 𝑡0 + TTCsmacir ). Two indicators were compared among
A computational procedure was developed in MATLAB all those algorithms. First is the computation time and the
which implemented the analysis procedure shown in second is the correlation coefficient between inverse TTC
Figure 7. The efficiency of the procedure was tested and the and reaction intensity which is measured by the deceleration
results are presented in this section. The procedure can be vector and steering angle change. The optimized algorithm
applied in an environment which treats lateral movements using both small and big circles is the most efficient algo-
as continuous in space. The buffer areas are represented by rithm. And the last 4 algorithms in Table 2 have the same TTC
ellipses. If there is a need to use the rectangle to substitute the result (since the TTC values are all determined by the ellipse-
subject vehicle then in the algorithm process, for example, rectangle model). The correlation coefficient of those is larger
to obtain the exact TTC as a conflict intensity indicator, than the first 2 as the ellipse-rectangle model is more reliable
the ellipse-rectangle algorithm is replaced by the rectangle than the circle model and the rectangle model. It could be
algorithm. asserted that the algorithm using both small and big circles is
the best one.
As can be seen, the optimized algorithm provides the
5.1. Data Process. The data we used to validate the simulation
shortest computation time. Such an algorithm could also be
system as well as this algorithm is the dataset of vehicle trajec-
applied to traffic accident monitoring or safety analysis in
tory data completed as part of the Federal Highway Admin-
which the ellipse-rectangle representing geometry might be
istration’s (FHWA) Next Generation Simulation (NGSIM).
replaced by the rectangle with the same dimensions of the
The data analyzed in this paper represent vehicle trajectories
vehicle. There are still several problems to be solved as the
on a segment of U.S. Highway 101 (Hollywood Freeway)
exact parameters of the ellipse and the specific relationship
in Los Angeles, California, collected between 7:50 a.m. and
between TTC and response acceleration stimulated by it.
8:05 a.m. on June 15, 2005. The NGSIM trajectory dataset
Future work should be done to explore the importance of and
provides longitudinal and lateral positional information for
to quantify the consequence of TTC.
all vehicles in certain spatiotemporal regions. We applied
a symmetric exponential moving average filter (sEMA) to
smooth the data for all trajectories before any further analysis. 6. Conclusions
After that, velocity and acceleration values were decomposed
The optimized algorithm is proposed to calculate TTC in
into vectors combining 𝑥-axis and 𝑦-axis components.
simulation model of freeway traffic. The efficiency has been
proved sufficient for the simulation. It could also be applied
5.2. Test and Results Comparison. The tests were performed in other traffic conditions when the shape of vehicle could not
on a standard desktop computer using MATLAB (R2012a). be neglected. In the future, the TTC got from this algorithm
We set the upper bound on the TTC as 5 seconds. A should be tested and validated in the context of the entire
total of 327616 vehicle pairs were tested. Several comparison traffic simulation.
experiments were conducted using the same dataset. Some of
the results were selected at random to test the correctness of Conflict of Interests
the result. For example, the vehicle trajectories were plotted to
ensure that the TTCs correctly reflected what would happen The authors declare that there is no conflict of interests
to the vehicles given their trajectories. regarding the publication of this paper.
8 Computational Intelligence and Neuroscience
References
[1] J. C. Hayward, “Near-miss determination through use of a scale
of danger,” Highway Research Record, no. 384, pp. 24–34, 1972.
[2] C. Hydén, The Development of a Method for Traffic Safety Evalu-
ation: The Swedish Traffic Conflicts Technique, vol. 70 of Bulletin
(University of Lund, Lund Institute of Technology, Department of
Traffic Planning and Engeneering), 1987.
[3] H. W. Kruysse, “The subjective evaluation of traffic conflicts
based on an internal concept of dangerousness,” Accident
Analysis and Prevention, vol. 23, no. 1, pp. 53–65, 1991.
[4] G. Tiwari, D. Mohan, and J. Fazio, “Conflict analysis for predic-
tion of fatal crash locations in mixed traffic streams,” in Annual
Proceedings of the Association for the Advancement of Automo-
tive Medicine, Association for the Advancement of Automotive
Medicine, 1995.
[5] D. Gettman and L. Head, “Surrogate safety measures from traffic
simulation models,” Transportation Research Record, no. 1, pp.
104–115, 1840.
[6] L. Pu and R. Joshi, Surrogate Safety Assessment Model (SSAM):
Software User Manual, 2008.
[7] R. Horst, Time-to-Collision as a Cue for Decision-Making in
Braking, Vision in Vehicles—III, 1991.
[8] R. J. Kiefer, D. J. Leblanc, and C. A. Flannagan, “Developing an
inverse time-to-collision crash alert timing approach based on
drivers’ last-second braking and steering judgments,” Accident
Analysis and Prevention, vol. 37, no. 2, pp. 295–303, 2005.
[9] K. Vogel, “A comparison of headway and time to collision as
safety indicators,” Accident Analysis and Prevention, vol. 35, no.
3, pp. 427–433, 2003.
[10] M. M. Minderhoud and P. H. L. Bovy, “Extended time-to-
collision measures for road traffic safety assessment,” Accident
Analysis and Prevention, vol. 33, no. 1, pp. 89–97, 2001.
[11] A. Laureshyn, Å. Svensson, and C. Hydén, “Evaluation of
traffic safety, based on micro-level behavioural data: theoretical
framework and first implementation,” Accident Analysis and
Prevention, vol. 42, no. 6, pp. 1637–1646, 2010.
Advances in Journal of
Industrial Engineering
Multimedia
Applied
Computational
Intelligence and Soft
Computing
The Scientific International Journal of
Distributed
Hindawi Publishing Corporation
World Journal
Hindawi Publishing Corporation
Sensor Networks
Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014
Advances in
Fuzzy
Systems
Modelling &
Simulation
in Engineering
Hindawi Publishing Corporation
Hindawi Publishing Corporation Volume 2014 http://www.hindawi.com Volume 2014
http://www.hindawi.com
International Journal of
Advances in Computer Games Advances in
Computer Engineering Technology Software Engineering
Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014
International Journal of
Reconfigurable
Computing