Criticality dimension-based probabilistic framework to detect near crashes in a roundabout

Preventing fatal traffic accidents towards Vision Zero is a challenge for the society. The collection of critical events from video recorded traffic data is of essential value for a better understanding on how and under what circumstances critical situations evolve. Identified behavioral patterns and derived infrastructural measures cannot only help to make driving safer, but also help to mature automated driving functions (ADFs) to make automated vehicles drive and interact more like humans especially in challenging situations. One flaw when developing ADFs is the dependency on synthetic simulated traffic scenarios. In this paper, a novel probability-based framework is proposed allowing to measure the degree of criticality C(d) based on two dimensions explaining risk: severity (delta-v) and proximity (distance). This metric is applied on real data of a roundabout. An initial evaluation of it was conducted using both a novel proposed method that takes the reaction of the second vehicle merged into account, and a practical application that shows a potential correlation between the traffic expert's perceived risk and the metric. Quantifying risk on each of the collected real traffic scenarios makes testing ADFs possible in further more reliable and significant scenarios like near-crashes.


Introduction
Advances in traffic data observation systems such as the AIM (Application platform for intelligent mobility) Mobile Traffic Acquisition [5], allow the automatic collection of large amounts of trajectory data.The data can be reduced to the desired scenarios, e.g.near misses due to spatial and temporal closeness of interacting road users.Still some crashes and critical scenarios may not be found, which leads to deal with false-negative rates, making it difficult to derive statistically significant estimations.The reason is either lack of accuracy, no detection of the object tracking system or a limitation of the algorithm detecting criticality.This paper focuses on the last point, by investigating ways to improve measurement of criticality.In general, Surrogate measures of safety (SMoS) in combination with collected microscopic traffic datasets enable finding behavioral patterns that lead to risky interactions.In the following some exemplary works are presented.
Laureshyn et al. [7] defined the risk of collision and the severity of a potential crash as relevant metrics in a traffic encounter.SMoS that are sensitive to both dimensions have been developed like the extended delta V, which is one of the most relevant ones [6].
Even though thresholding criticality is a scientifically accepted standard, to define risk boundaries is a complex and subjective task.Stemmler et al. [9] tackle this issue introducing a probabilistic framework that assesses safety critical events based on the likelihood of the collected parameter distributions from naturalistic driving data.
In this paper, this approach is extended by combining both proximity and severity as independent parameter distributions to build the probabilistic model based on a dataset of merging events.Distance (d) and difference of speed (delta-v) between the entities are mapped to proximity and severity respectively.
Even though in traffic scenarios an interdependency exists in the proximity and severity dimensions, these two are independent continuous variables.For instance, there might be car following behavioral patterns that yield to a certain correlation between the relative distance (proximity) and the difference in speed (severity) kept by the traffic entities, but there could also be two similar scenarios with the same relative distance but having different values of the relative velocity.As explained in the following method part, this assumption is key towards the definition of the probabilistic model.

Method
The proposed method consists firstly on mining a traffic scenario (based on automatically annotated trajectory data).Once this is done, the parameters that are representative of both proximity and severity are extracted for each of the mined events, creating the parameter-space distributions for the probabilistic model.Based on combined probability of these two independent dimensions, each of the mined scenario is finally labeled with a fuzzified criticality index from 0 (barely critical, or extremely safe interaction) to 1 (extremely unsafe interaction).In this section a more detailed explanation of this index is given.
Proximity and severity of an encounter process of two interacting road users, are modelled as continuous independent stochastic variables.For simplification of the whole process, each of these dimensions' metric is computed once per scenario (Sect."Scenario parameterization").
The Cd metric is based on the definition of a percentile value (P).Considering the proximity first, let d i be the dis- tance d between the traffic entities of a specific scenario i to which its risk is intended to be quantified, and D the random variable representing the collected distribution of distances of multiple events of the same scenario.P d i is then equal to the probability that the random variable (D) is less than or equal to the upper bound d i .This is math- ematically expressed as: Since the probability density function of distances ( f (d) ) represents the probability that the random vari- able D takes on values less than or equal to any particular value, the probability that D takes on a value less than or equal to its maximum value should be 1(P(D ≤ max(D)) = 1) .Being the low distance values a high-risk indicator, and following the logic that the scenario with the smallest d of the distribution should be labeled as 1, P d i is inverted by subtracting it to 1 to get the proximity indicator (pi): When it comes to the severity indicator (si), the higher the delta-v of both entities the higher the severity of the event.In terms of probability of occurrence, this implies that any random merging scenario's delta-v (�V ) would have low chances of being larger than an event with an extremely high delta-v (� vi ).
Following the initial assumption of the non-dependency of both criticality dimensions, in probability this is expressed as the product of both indicators pi and si .This results in a normalized risk metric taking both proximity and severity into account. (1)

Dataset and preprocessing steps
Motivated by the European research project L3Pilot, the test dataset consists of one month of trajectory data, collecting around 24,000 merging interactions during October-November 2019.For the data collection campaign, the AIM traffic data acquisition system, consisting on stereo cameras tracking traffic participants based on optical flow detection algorithms was used.Three of its mobile units were located in a roundabout in Wolfsburg (see Fig. 1 below).The perceived trajectory data consists of position, time, velocity, heading and acceleration measurements in time, which is afterwards used for testing the proposed framework.

Scenario mining
The chosen scenario of interest inside a roundabout to test the proposed metric must be the one with the higher probability of being severe.According to [8], conflicts in roundabouts are mainly caused by merging and diverging scenarios, being merging more critical due to both a higher uncertainty and the specific angle of attack in caused collisions [1].
For a better understanding of the scenario, a further split into sub scenarios (SC) is made, differentiating events where the entering stream yields (YSC) and does not yield (NYSC) to the circling stream.
Using the satellite view of the roundabout, several optical loops (OL) and areas of interest (AOI) where included within one of the entering arms of the roundabout and the circling stream.The intersection of those loops with the recorded trajectories is used for the extraction of the merging candidates (Fig. 2).
To improve the quality of those trajectories an Unscented Kalman Filter (UKF) method is applied in a post processing step.Following the L3Pilot requirements, any merging interaction between both streams was considered as true if their absolute Post encroachment time (PET) was below or equal to six seconds.If being greater than this threshold, the road users most likely did not interact.Beware that this criterion itself could be a limitation due to potential high PET as a consequence of critical events yielding to a strong braking of either of the entities.The flow diagram below illustrates the whole mining process (Fig. 3).
All in all, the image processing part corresponds to the collection and processing of traffic data, while the mining part comes after the collection of those events, where certain rules are applied to obtain the SCs of interest.A more graphical and simplistic view of the process described above is shown in Fig. 4.

Scenario parameterization
For generating the sample's parameter distribution, the current approach simplifies the whole merging scenario.Being this a complex time dependent interaction, it is reduced to the computation of some scenario parameters at a single specific frame of interest (t = T).As can be seen in Fig. 5, a representation of this timestamp for both entering stream yielding (right) and no yielding (left) is shown.
The sub-indexes 1 and 2 refer to the order the merging entities merged; the time instant (T) corresponds to the moment either of the vehicles exposes to the a-posteriori recorded trajectory of the other stream.
As to the computation of those parameters, both d and delta-v are then computed at that specific moment of time for each of the 24,000 recorded events.As stated in the introduction, the criticality's parameter-space is a combination of the outcome severity in case of a collision and the probability of both entities colliding (proximity).d(T ) is then taken as representative of closeness, and v2(T ) − v1(T ) as the measure explaining severity.The diagram below exemplifies this process (Fig. 6).

Analysis of parameter distributions
The scenarios' parameter distributions introduced in this section help to understand, validate, and derive conclusions about the performance of the proposed metric (Sect.3.3).Beware that the current validation method is not completed, since the current work provides only with an initial validation and a practical application.

Traffic flow
Hydén [4] and [11] suggest a strong correlation between the number of crashes and the frequency of conflicts.Hence, there is a focus on identifying events with a higher probability of ending in a conflict.Since proximity is directly related to a higher probability of crashing, and the traffic flow is a direct consequence of the time gap (PET) between merging vehicles, a higher probability of crashing is expected to be found on larger traffic volumes.In Fig. 7, a bar plot with the merging events per hour is shown.As expected, the [7][8][9] and the [15-16] time intervals have the highest traffic peaks.Furthermore, low PET values (below 1.5 s) per hour is used as a tool to count the frequency of close events (or conflicts).As can be seen in red below, most critical events would have a higher probability of occurring during those hours where traffic volume is also high.This chapter later links to the validation of the metric, showing indeed that these hours lead to higher average Cd.
This observed correlation between traffic flow and the number of close encounters is better described in the scatter plot below (Fig. 8).In the vertical axis, the hourly average PET values are calculated, whereas in the horizontal axis the hourly number of merging events.The higher the amount of traffic (in this case represented by high merging events per hour), the less the chance of finding time gaps to safely merge by the entering stream, so in order to keep a balance between efficiency and safety, this last one is compromised resulting in lower PET values.Intuitively, this could be thought as if an entering vehicle wants to find a safe time-space spot to enter; it is more likely that this vehicle spends more time waiting for this time-gap to appear, the higher the traffic density in the roundabouts' circling stream is.

Distance (d)
The proximity component of the Cd is the distance between the merging entities.The distribution below shows how in the YSC (blue), the resulting space gap is much smaller.In the NYSC, the average distance between the entities is a little less of twenty meters, while in the YSC the average distance does not reach ten meters.We can state that during the YSC, being a more controlled scenario, the resulting merging event tends to generate closer gaps (see Fig. 9).

Delta-v
The distribution of the severity component of the Cd is firstly introduced through a set of boxplots (Fig. 10).These boxplots represent the stream's velocities for both SCs.YSC interactions show the severity of a potential collision being clearly smaller, since the velocity of the circling stream, and therefore the first one merging, is significantly higher (see first two boxplots starting from the left).On the contrary, the NYSC barely states a difference in velocity between both streams (two boxplots on the right of the figure).This means that this SC leads to merging events with a higher probability of being severe.
Theoretically, and assuming no acceleration is expected from the second entity merging, an event with delta − v <= 0 has zero probability of being severe.The probability of an event having a delta-v greater than zero is expressed by the next equation.
The higher the severity exposure of this SC is clearly represented in the probability distribution of the deltav, where NYSC have 42% of chances of being exposed to at least a minimum severity level (see Fig. 11).On the contrary, the YSC barely have a chance of being exposed.The red area in the density graphs below represents the events with a likelihood of being severe.Equations ( 7) and ( 8) represent the probability given a specific SC.( 6)

Delta-v-distance
When both parameters are contrasted in a ridge plot (Fig. 12) it can be seen that the closer the merging vehicles are, the lower is the probability of them being injured, or in other words, the higher the delta-v.This of course is a representation of normal driving behavior.Negative delta-v values occur whenever the vehicle in front has a bigger longitudinal speed than the vehicle in the back, resulting theoretically in a zero probability of collision.NYSC is more frequent the higher the distance, and gets dispersed the closer the merging actors.

Criticality degree (Cd)
The 24,000 merging events are the basis sample for the probabilistic framework.A criticality index is computed (8) P delta_v > 0|SC == no yield = 0.42 for each of the events.The histogram below (See Fig. 13), shows a discrete distribution of all the resulting Cds.Interestingly, different phases can be determined (visualized by the vertical black lines): From 0-0.1 an increase on the frequency can be seen.This seems to be in line with the idea by [3] and [10] of perfectly safe events being less common than moderate severe events due to the smaller gap acceptance on the interactions to gain travel time but also consequently increasing the risk level.Reaching the peak around 0.1, it can be seen how the number of events starts decreasing at three different rates: [0.1-0.3], and [0.3-0.5], and [0.5-1], potentially defining different risk ranges.Of course, these statements might need to be considered in different scenarios, or even in different samples of the same scenario, on the one hand, and on the other hand the low rate might be biased by the PET threshold limitation of six seconds to include a merging scenario or not within the sample.

Cd initial evaluation and discussion
Once the theoretical framework was introduced, the proposed metric Cd is evaluated by using relevant parts of the descriptive analysis' results as well as parts of the humanvideo-observation-based analysis.The Cd is evaluated in the following three steps: I. Measuring the reaction of the 2nd entity merging and compare it with the Cd.
II. Finding a correlation between traffic flow and the mean Cd at different hours of the day.III.Practical application by traffic safety experts.

Reaction of 2nd merged vehicle
The reaction of the 2nd vehicle merging to a potentially critical scenario is a novel proposed good indicator of its criticality.By adding the Initially Attempted PET (IAPT [2]) to the equation, a metric representing the reaction of the second vehicle is incorporated.Being the PET the real crossing/merging time gap between the entities, and the IAPT the initially expected PET whenever the 1st vehicle leaves the crossing/merging area, this metric then only depends on the actions taken by the 2nd vehicle.If initially the IAPT was 3 s and the real PET was then 1 s, a statement can be made that the 2nd vehicle accelerated (reducing this way the expected time gap from 3 s to just 1 s).On the contrary, if some risk is perceived by the 2nd vehicle, it shall increase the time gap, resulting in IAPT/PET being smaller than 1.The ratio between the IAPT and the PET therefore describes the kinematic behavior of the second vehicle until it reaches the crossing/merging area.If this ratio is equal to 1, it is understood that the entity did not react after the first vehicle left the area and kept the velocity constant, therefore the IAPT's value remains unchanged.When a change in the velocity is made, then the final PET value will be either bigger or smaller than the IAPT.Mathematically this can be expressed as: One would expect that when a merging scenario has a higher potential of being critical, the reaction of the second vehicle to this event should be to brake rather than to accelerate, since this last action would close the gap between both merging actors even more.According to what is expected, Fig. 14 shows how whenever the 2nd entity brakes, in average those events indicated a higher degree of criticality.In other words, as expected there seems to be a higher tendency to brake the higher the perceived risk is.

Traffic flow
As stated in 3.2.1, this parameter plays an important role in traffic management when balancing both safety and efficiency.Figure 15 shows the mean Cd after grouping all merging scenarios per hour of the day.According to the bar-plot, the [7][8][9]   probability of events yielding to a conflict the hours where traffic volume is higher (See Fig. 7).

Practical application of the Cd
In the EU funded project L3Pilot, traffic experts annotated 4 merging scenarios with different perceived severity and proximity levels (low/medium/high) so that a first practical example of this metric is seen.Table 1 represents the conducted study.The last column is the frame corresponding to the time where the scenario-parameters where extracted.
To help a further understanding of the scenarios, some of the computed parameters for each of these events are also added.The scenario id 1 has a low Cd of 0.18, matching the resulting high PET of 3.71 s.The deltav of -1.22 indicates that the vehicle in front is 1.22 m/s faster; in other words, no severity.The corresponding video frame in Table 1 also show a huge gap between both entities.The second and third scenario ids show a similar medium-risk Cd (0.43 and 0.44 respectively), with a significantly different PET value (2.2 s vs. 0.5 s).This makes sense considering that the PET is a proximity metric; when taking the severity values into account, the one with a higher PET (id = 2), has a significantly higher delta-v value (1.66 m/s vs. − 3.47 m/s), balancing the PET inequality into a similarly risk indexed scenario.The table's last row shows the merging event with the highest perceived criticality, being in line with the resulting risk index of 0.75.This event has a low PET value (0.6 s), as well as a high delta-v (3.7 m/s).
Even though after a first review there seems to be a strong correlation between the perceived risk by the human experts and the proposed metric Cd, a more robust empirical evaluation is still needed with a higher number of computed scenarios and a validated questionnaire involving perceived risk, proximity and severity analysis.

Conclusions
This paper's main contribution is the proposal of a probabilistic framework to determine a criticality index Cd to collected real traffic scenarios.The parameter space was selected as a combination of the most representative criticality dimensions: severity and proximity.The resulting index ranges from 0, or no probability of the scenario being severe at all, to 1, or most safety critical event of the collected dataset.This simple novel metric allows quantification of criticality in one value, which is the main weakness of currently used methods to assess criticality by multiple metrics with individual thresholds so far.The proposed method is applied in a statistically significant batch of 24,000 collected scenarios, and compared with both traditional existing metrics for crossing and merging events such as the PET.The Cd was evaluated based on the perceived risk based on the reaction of the 2nd entity to the interaction calculated by IAPT/PET.Finally, the subjective rating of the risk in four merging scenarios showed a consistency with the obtained Cd.

Future prospects
When seeking for a universal SMoS, there is still much to be done.One aspect is the need to overcome the dependency on the collected dataset; in other words, one might collect 1 month of trajectory data, and still not get an extremely critical event, but nevertheless it would be indexed as the most critical one ( Cd = 1 ); this metric gives a criticality degree relative to the distribution, not universal.
The presented approach also equally weights both proximity and severity dimensions, so a subjective (further expert evaluation of more scene videos) and objective (find correlation between an already validated SMoS, for instance, extended deltav and Cd) evaluation of the metric would still be needed to validate this metric.This follows the logic that depending on the situation, the user might seek for traffic efficiency instead of safety, biasing the collected batch of data, and the resulting Cd from the obtained parameter distribution.
Finally, and with regards to the generalization of the method, this technique should be applied in other relevant scenarios (for example left turn with oncoming traffic at an urban intersection).The parameterization part would have to be readjusted, because it is currently biased by the tested roundabout scenario (see Scenario parameterization above).

Fig. 1
Fig. 1 Bird's eye view of mobile camera pole-units facing the center of the single-lane roundabout

Fig. 4 Fig. 5 Fig. 6
Fig. 4 Image flow from the processing of the frame, to the mining of the SC

Fig. 11
Fig. 11 Delta-v probability density functions for yield and no-yield SCs

Fig. 14
Fig. 14 Reaction to risk representation, observing a more tendency to brake the higher the Cd

Fig. 15
Fig. 15 All event's Cd values grouped by its mean per hour of day and [15-17]h ranges contain the highest average risk indices, meaning the higher IAPT /PET . . .

Table 1
Parameter-table of 4 merging events