# A Traffic Information Detection Method at Single Intersection Based on Wi-Fi Data
## 4 Experiment and Result Analysis
### Traffic Information Detection  
By applying the aforementioned method, real-time preprocessing of Wi-Fi data is carried out, and the detection of road targets passing through the intersection is achieved based on MAC address matching. The road target data set from 9:00 to 21:00 on a working day is taken as an example to distinguish road target travel modes. The data can be obtained using a combination of field surveys and Baidu Map data. The data set contains 7107 samples. First, the elbow method is used to determine the optimal clustering K-value. The SSE value of the data set has the largest decline when the value is 2; therefore, the clustering value of this data set is set to 2, as shown in Figure 10a. At this point, if direct clustering is adopted, the data set is divided into two clusters. Among them, the number of samples in the cluster of category 0 is 4388, and the mean speed of the import section of the center point is 30.656 km/h, while that of the export section is 26.839 km/h, with a speed difference \begin{table}
\begin{tabular}{c c c} \hline
**Device Group Number** & \
\begin{tabular}{c} **The Coordinate of** \\ **Latitude and Longitude** \\ \end{tabular} &
\begin{tabular}{c} **Distance from Intersection** \\ **(m)** \\ \end{tabular} \\ \hline
1 & [108.953867, 4.336224] & 0 \\
2 & [108.953525, 4.335852] & 0 \\
3 & [108.944506, 4.336089] & 831 \\
4 & [108.953489, 4.332886] & 336 \\
5 & [108.960119, 4.335911] & 574 \\
6 & [108.953885, 4.339578] & 388 \\ \hline \end{tabular}
\end{table} 
Table 3: Wi-Fi data collection device information. Figure 9: The channelization design of the experimental intersection. of 19.023 km/h. The number of samples in the cluster of category 1 is 2540, and the mean speed of the import section of the center point is 14.605 km/h, while that of the export section is 15.178 km/h, with a speed difference of 7.221 km/h. It can be seen that the values of each feature of Category 0 and Category 1 are overall higher, which does not match the travel speed of low-speed targets in reality. Subsequently, a clustering profile analysis was performed. The road target data set was adjusted, and the vehicle speed threshold was successively selected within the interval [10; 25] for clustering, as shown in Figure 10b. The average silhouette coefficient has the largest value when the vehicle speed threshold is 13 km/h, so the vehicle speed threshold for this data set is selected as 13 km/h. After adjusting the road target data set according to the selected motor vehicle speed threshold, the sample number is 897. K-means clustering is carried out. Among them, the number of samples in the cluster of category 0 is 495, and the speed of the central point of the import section of the cluster is 9.324 km/h, the speed of the export section is 9.367 km/h, and the speed difference between the import and export sections is 3.833 km/h. The number of samples in the cluster of category 1 is 402, and the speed of the central point of the import section is 5.254 km/h, the speed of the export section is 4.981 km/h, and the speed difference is 1.681 km/h. The travel speed of the samples in Category 0 is motor vehicles, and the travel speed of the samples in Category 1 is walking and non-motorized vehicle travel. The number of samples between the two clusters is more balanced, and the speed characteristics of the clustering center of the low-speed road target are significantly reduced, which is more consistent with the actual situation. The method of optimizing the clustering profile analysis is relatively effective. Finally, spatial-temporal correlation analysis is used to divide the travel modes of the motor vehicle travel samples into private car and bus travel. In the above 6705 samples of motor vehicle travel, the number of bus travel was 1215, and the number of buses was 232. It can be seen that the road targets with bus as the primary mode of transportation account for a relatively large proportion. Therefore, it is necessary to distinguish the travel modes of road targets.