# Selecting Non-Line of Sight Critical Scenarios for Connected Autonomous Vehicle Testing
## 3 Methodology
### Critical Scenarios  
The most common measure used in the literature to determine the criticality of scenario is time-to-collision (TTC) [56]. This can be defined as the remaining time from the current time to the time for two objects to collide if they persist on their current planned trajectory (speed and direction). The lower the value of TTC, the more critical a scenario.  
This paper focuses on scenarios where TTC represents the time for the two NLOS vehicles (ego and CAV) to collide. Given the current planned trajectory, \(\mathrm{t_{d}}\) is the point in time along the planned trajectory after which, if the ego detects the CAV, there is not sufficient time for the vehicle to react, manoeuvre or brake in order to avoid a collision (and to note that the presence of an obstacle or the geometry of the road prevents early detection of the CAV before \(\mathrm{t_{d}}\)). In such a scenario, if the ego vehicle receives information regarding an oncoming object before the \(\mathrm{t_{d}}\), this would allow for an early reaction that would change speed or direction in order to avoid the collision. The TTC is determined via the simulation-based approach rather than mathematically. A simulation-based approach is used as this can be easily implemented for any scenario with any underlying road network with no or little change to the function to determine TTC. This is more advantageous than any mathematical calculation as it takes into consideration all varying parameters, such as yaw, and can be easily implemented for corner scenarios.  
The total time taken for an ego vehicle to detect and react is termed as total stopping time (TST), as depicted in Equation (1). This is the time taken for the vehicle to travel the total stopping distance which is made up of the braking distance and reaction time. The time to react is the product of perception-reaction time and speed of the vehicle [84].  
\[TST=TTS+TTD+TTR \tag{1}\]  
Figure 3: Sample Scenario Space.  
where TTS is time to stop, TTD is time to detect and TTR is time to react. TTS can be acquired by first determining the braking distance. The braking distance is shown in Equation (2) [85, 86].  
\[d=\frac{1}{2K_{a}}\ln\biggl{(}1+\frac{K_{a}}{K_{t}}v^{2}\biggr{)} \tag{2}\]  
where:  
\[K_{a}=\frac{\rho}{2m}(C_{D}) \tag{3}\]  
\[K_{t}=(0.01+\mu)g \tag{4}\]  
and \(v\), \(\rho\), \(m\), \(g\), \(\mu\) and \(C_{D}\) depict velocity, atmospheric density, mass, acceleration due to gravity, road friction coefficient and drag factor, respectively.  
TTS can be determined using Equation (5):  
\[TTS=\frac{v}{d} \tag{5}\]  
To calculate time to detect (TTD), the following inputs are required: the starting position \(x_{p}\), position of detection \(x_{d}\) and velocity \(v\), as shown in Equation (6). Time to React (TTR) has been calculated incorporating vehicle dynamics.  
\[TTD=\frac{\left(x_{d}-x_{p}\right)}{v} \tag{6}\]  
Therefore, a critical scenario is defined as a scenario involving at least two dynamic objects (for example, the ego vehicle or the vehicle under test and a CAV) such that the ego and CAV are in NLOS from each other and their planned trajectories and speed will lead to a collision. Therefore, a criticality metric is developed using TTC and TST (obtained as explained above) which meets the following conditions:  
* The position of both dynamic objects must be within NLOS (i.e., the ego vehicle's on-board sensors have not detected the CAV) from each other.
* There must exist a point of interaction between the trajectories of both dynamic objects, which is also known as the collision point (CP).
* The time taken for both dynamic objects to reach the CP must be within TTC.
* The time taken for the ego vehicle to perceive and react to the oncoming dynamic object and reach a velocity of zero is known as the TST.
* A scenario is therefore critical if TTC < TST or within a safety parameter.  
Section 3.2 discusses the selection of a critical scenario using a T-junction scenario whose boundaries and parameters are depicted in Figure 6.