## 3 Methodology
### Procedure of Conflict Detection and Resolution  
As we mentioned above, the intersection manager can obtain the motion information of CAVs, including arriving time, location, and speed by V2X technologies, and predict spatio-temporal \begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline
**Serial Number** & **E1** & **E2** & **E3** & **S1** & **S2** & **S3** & **W1** & **W2** & **W3** & **N1** & **N2** & **N3** \\ \hline E1 & 0 & 0 & 0 & 13 & 6 & 0 & 0 & 2 & 0 & 14 & 0 & 0 \\ E2 & 0 & 0 & 0 & 0 & 7 & 0 & 8 & 0 & 0 & 9 & 10 & 0 \\ E3 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ S1 & 13 & 0 & 0 & 0 & 0 & 0 & 16 & 3 & 0 & 0 & 11 & 0 \\ S2 & 6 & 7 & 0 & 0 & 0 & 0 & 0 & 4 & 0 & 5 & 0 & 0 \\ S3 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ W1 & 0 & 8 & 0 & 16 & 0 & 0 & 0 & 0 & 0 & 15 & 12 & 0 \\ W2 & 2 & 0 & 0 & 3 & 4 & 0 & 0 & 0 & 0 & 1 & 0 \\ W3 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ N1 & 14 & 9 & 0 & 0 & 5 & 0 & 15 & 0 & 0 & 0 & 0 \\ N2 & 0 & 10 & 0 & 11 & 0 & 0 & 12 & 1 & 0 & 0 & 0 & 0 \\ N3 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Conflict relationships among different lanes. Figure 4: Diagram of a collision from combined spatio-temporal domains. (**a**) 3D axonometric view; (**b**) 2D vertical view. Figure 3: Potential trajectories of vehicles. (**a**) Turn left from S1; (**b**) go straight from S2; (**c**) turn right from S3. trajectories of vehicles. Besides, the intersection manager will send warning messages to vehicles if conflicts are detected, and then adjust the speed to avoid collisions. In this section, we use a two-vehicle collision scenario to introduce the proposed CDG-based conflict detection. As shown in Figure 5, vehicle A goes along lane W2 with an initial speed \(v_{A}\), vehicle B goes along lane S2 with an initial speed \(v_{B}\), and the two paths have an overlapping point called conflict point 4. If the two vehicles occupy the same conflict point at the same time, there will be a collision. On the contrary, it is feasible to drive at the initial speeds \(v_{A}\) and \(v_{B}\), and that there will be no collision. Assuming that two vehicles keep their respective initial speeds after entering the approach road, we can predict the occupation time of the conflict point according to the following formula (taking vehicle A as an example):  
\[L_{A}=\sqrt{l_{A}^{2}+w_{A}^{2}} \tag{1}\]  
\[t_{A}=L_{A}\div v_{A} \tag{2}\]  
where \(l_{A}\) is the physical length of the vehicle, \(w_{A}\) is its physical width and \(L_{A}\) is its virtual length. The reason why we replace the original length with a larger artificial length (as shown in Figure 6) is to eliminate both communication and control errors caused by communication delay and packet loss, in order to prevent collisions accidents. As shown in Figure 7a,b, the conflict point will be occupied when the head of vehicle A enters the overlapping region, and it will be released when the rear of the vehicle A entirely leaves the overlapping area. There will be no collision in Figure 7c if vehicle B does not contact the conflict point when vehicle A is occupying it. On the contrary, there will be a collision in Figure 7d. Figure 5: Diagram of a potential collision accident. Figure 6: Diagram of virtual length and physical width. For the sake of visualization, we introduce the conflict-duration graph to express the crucial factors in spatio-temporal trajectories, for the reason that the trajectories will be too dense to detect conflicts as traffic flows rise. Hence, the conflict-duration graph, inspired by a Gantt chart, is used to represent the state of occupation of 16 conflict points inside the intersection. Among them, the horizontal axis of the CDG is used to represent the timestamp (the number of simulation steps experienced), and the vertical axis is used to represent the index of conflict points.