## 4 Expressway PTV Detection Algorithm for Over-the-Horizon
### Over-the-Horizon PTV Perception Algorithm Construction  
PTV information can be obtained by evaluating the threat of vehicles in transit through DTS. In the field of intelligent driving, for over-the-horizon vehicles, it is necessary to timely obtain PTV information within the rear over-the-horizon detection range. Therefore, it is necessary to update the position of vehicles in transit in real time and provide the information to the driver in a timely manner. However, due to the limitations of data collection conditions, we are unable to accurately locate the vehicle position in seconds. Only when the vehicle passes through the ETC gantry and generates transaction data can we obtain the current vehicle position information through the longitude and latitude of the gantry.  
When the vehicle and the ETC gantry generate a transaction record, the transaction time of the vehicle can be obtained; then, the approximate travelling time of the vehicle in this section and the average speed of the vehicle can be calculated, so as to calculate the  
\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline
**Matrix Order n** & **1** & **2** & **3** & **4** & **5** & **6** & **7** & **8** & **9** \\ \hline RI Value & 0 & 0 & 0.58 & 0.90 & 1.12 & 1.24 & 1.32 & 1.41 & 1.45 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Random consistency index RI.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Element** & \(\mathbf{f_{1}}\) & \(\mathbf{f_{2}}\) & \(\mathbf{f_{3}}\) &... & \(\mathbf{f_{n}}\) \\ \hline \hline \(\mathrm{f_{1}}\) & \(\frac{\mathrm{R}_{\mathrm{11}}}{\sum_{\mathrm{i=1}}^{\mathrm{n}}\mathrm{R  
distance \(\Delta\)S between the over-the-horizon vehicle and the PTV, and the specific location of the vehicle can be further estimated. The calculation is shown in Formula (13).  
\[\Delta\text{S}= |\text{T}_{2}-\text{T}_{1}|\times|\text{V}_{2}-\text{V}_{1}| \tag{13}\]  
where T\({}_{1}\) and V\({}_{1}\) are the transaction time and average section speed of the PTV, while T\({}_{2}\) and V\({}_{2}\) are the transaction time and average section speed of the over-the-horizon vehicle. Providing PTV information within the over-the-horizon range to the vehicle ahead can enable the driver to make decisions in advance. The division of the perception of the over-the-horizon range will be elaborated in detail in the experimental section. Algorithm 4 shows the process of the over-the-horizon PTV perception algorithm.  
```
Inputs: information on all vehicles in transit and DTS, constraints C, section transaction time DATA; output: PTV in over-the-horizon range;
1. Known beyond line of sight detection range BVR (e.g., 2 km) # Define PTV evaluation indicators
2. OS_car = [...] #Section travel speed of vehicles in transit;
3. VT_car = [...] #Vehicle type of the vehicle in transit;
4. LD_car = [...] #Accumulated travelling time for vehicles in transit;
5. TF_car = [...] #Section traffic flow at the current moment
6. PIVInfo[] #initialise the PTV list
7. EvaluationInfo[] = DTS(OS_car, VT_car, LD_car, TF_car) #Evaluate the vehicle in transit, return the vehicle evaluation score
8. FOR EACH car IN EvaluationInfo[] #Get PTV information
9. IF car do not meet the constraints C then
10. Do nothing
11. ELSE
12. PIVInfo.add(car)
13. END IF
14. END FOR
15. RETURN PTVInfo[]
16. Def AbIdentification(car[], PTVInfo[]){ #Identify PTVs in over-the-horizon range;
17. FOR EACH car IN car[]
18. AbCsars[] = getEachCarBVR(car, PTVInfo[]) #Get PTV within over-the-horizon detection range
19. AbnormalInfo.add(car, makeAlerInfo(T1,T2))
20. END FOR
21. FOR each ti in EvaluationInfo[]
22. car = ti.getCar #Get information about the vehicle in transit;
23. alertInfo = ti.getAlerInfo #Get information about the PTV message
24. SendAlertInfoToCar(car, alertInfo) #send alert info to a vehicle in transit
25. END FOR
26. RETURN AbnormalInfo
```  
**Algorithm 4**Over-the-horizon PTV perception algorithm