## 3 Vehicle Clustering Algorithms
### Vehicle Clustering Method Based on DBSCAN Algorithm
Figure 12 illustrates the variation in the RSU deployment interval with CAV permeability under different densities of mixed traffic flow on the highway, assuming that the RSU communication radius is equal to the vehicle communication radius and that it takes an average value of 300 m. From the figure, it can be observed that as the CAV permeability increases and the mixed traffic flow density becomes higher, the RSU deployment interval increases at a faster rate. When the mixed traffic flow density is 0.05 and the CAV permeability is relatively low at 0.2, the recommended RSU deployment interval is 1235 m. According to Figure 11, the network connectivity is above 80% under these conditions. When the mixed traffic flow density is higher at 0.08 and the permeability is also higher at 0.7, the suggested RSU deployment interval is 1669 m. As depicted in Figure 11, the network connectivity is 100% under these circumstances. Figure 3:2 Relationship between permeability and network connectivity under different mixed traffic densities. Figure 3:3 RSU deployment interval vs mixed traffic density and permeability. ## 5 Conclusions

In this paper, the characteristics of heterogeneous traffic flow on highways and the mobility and clustering characteristics of vehicles were analyzed. In view of the influence of different CAV permeabilities of mixed traffic flow on RSU deployment, the D-LEACH algorithm was proposed, considering factors such as mixed traffic flow density, CAV permeability, RSU communication radius, and vehicle communication radius. The DBSCAN density-clustering algorithm was used to improve the clustering part and the cluster-head selection part of the LEACH algorithm, and vehicle clustering was carried out based on the proposed D-LEACH clustering algorithm. Network performance indicators were used to evaluate and compare the network performance before and after the improved algorithm, and the following conclusions were drawn:

(1) The cluster network of the improved D-LEACH wireless routing algorithm consumes less energy, indicating that the improved cluster network and cluster-head distribution are more reasonable;

(2) The number of surviving nodes in the network of the proposed algorithm is greater, and the classical LEACH protocol nodes die faster, indicating that the nodes in the cluster of the proposed algorithm are distributed more evenly, effectively improving the life cycle and stability of the network. Simulations were carried out by the MATLAB software to analyze the relationship between different CAV permeabilities, RSU and vehicle communication radii, and mixed traffic densities on the network connectivity, average vehicle cluster length, and RSU deployment interval in heterogeneous traffic flows. These revealed the following:

(1) When the vehicle communication radius is fixed at 300 m on average and the CAV has a low permeability of 0.3, the RSU communication range can be adjusted to 500 m, and the RSU deployment interval is 1624 m; when the CAV has a high penetration rate of 0.7, the RSU communication range can be reduced to 300 m, and the RSU deployment interval is 1317 m.

(2) When the RSU communication radius is equal to the vehicle communication radius and the mean is 300 m, the mixed traffic density is 0.05, and the CAV low permeability is 0.2, the RSU deployment interval can be set to 1235 m; when the mixed traffic density is 0.08 and the CAV penetration rate is 0.7, the RSU deployment interval can be set to 1669 m.

The above deployment schemes can ensure that the network connectivity is maintained at a high level, and this study can provide a theoretical basis for determining a reasonable and effective RSU communication radius and RSU deployment interval according to the CAV permeability and heterogeneous traffic flow density of future highways. L.Z. : Conceptualization, Methodology, Software, Formal analysis, Writing-original draft. Y.L. : Conceptualization, Resources, Supervision. N.C.: Methodology, Software, Writing--review and editing. P.W. : Methodology, Software. W.K.