## Appendix A
### Modelling of Safety Potential Field  
Lane markings are classified into two types: white lane and yellow vehicle direction division lines (Figure 1). The white lines separate vehicles travelling in the same direction, whereas the yellow lines differentiate vehicles moving in opposite directions. These lane markings impose constraints on vehicle driving, with the safety risk being inversely proportional to the distance from them. The closer a vehicle is to the lane markings, the higher the associated safety risk. Both types of division lines collaboratively restrict the lateral movement of vehicles, aiming to keep vehicles centred in their lanes to the extent possible. The potential field strength of a lane division line is less than that of a vehicle direction division line, as vehicles are permitted to change lanes but must not drive against traffic. The potential field distribution of the lane markings is modelled using a Gaussian function:  
\[U_{L}=\sum_{i=1}^{m}L_{i}e^{-\frac{(y-y_{i})^{2}}{2\alpha^{2}}}\frac{(y-y_{i} )}{|y-y_{i}|}+\sum_{j=1}^{n}L_{j}e^{-\frac{(y-y_{j})^{2}}{2\alpha^{2}}}\frac{ (y-y_{j})}{|y-y_{j}|}, \tag{1}\]where \(m\) and \(n\) denote the number of lane division lines and vehicle direction division lines, respectively. \(L_{i}\) and \(L_{j}\) are the potential field strength coefficients for these lines, related to their peak field strength. \(y\) is the lateral coordinate of any point, with \(y_{i}\) and \(y_{j}\) representing the lateral positions of the lane division and vehicle direction division lines, respectively. \(\sigma\) represents the rate of change in potential field strength, which increases significantly as a vehicle rapidly approaches the road markings. In contrast to lane markings, the black road boundaries demarcate the maximum range of vehicle movement. Their potential field is more restrictive, tending toward infinity as a vehicle approaches the boundary; this ensures that CAVs remain within the road limits. The function representing the road boundary field is expressed as follows:  
\[U_{R}=\sum_{k=1}^{2}\frac{1}{2}R_{k}\bigg{(}\frac{1}{|y-y_{k}|}\bigg{)}^{2} \frac{(y-y_{k})}{|y-y_{k}|}, \tag{1}\]  
where \(R_{k}\) is the intensity coefficient of the road boundary line's potential field. \(y_{k}\) denotes the transverse coordinate position of the road boundary, with \(y_{1}\) and \(y_{2}\) corresponding to the upper and lower boundaries, respectively. The parameters of both the lane markings and road boundary potential fields are detailed in Table 1.  
By integrating the parameters from Table 1 into the models for the lane-marking potential field and the road boundary potential field, the distribution of these potential fields and their combined three-dimensional (3D) representation can be visualised. Figure 11a illustrates this concept: the green dashed line symbolises the potential field of the lane markings, the yellow dashed line represents the potential field of the road boundary, and the blue solid line depicts the cumulative potential field of both. The figure reveals that the peak of the potential field for lane markings is lower than that for the road boundary. The road boundary's potential field peaks at its actual position in the scene and diminishes substantially as the vehicle distances itself from the boundary. Figure 11b displays a 3D overlay of the potential fields for the two types of lanes. Here, the potential field intensity is minimal at the centre of each lane, indicating that driving in the middle of a lane minimises driving risk. The potential field intensity increases when the vehicle engages in different driving actions or encounters various scene factors. The vehicle potential field arises from the vehicle elements within the traffic scenario. The influencing factors include not just the vehicle mass M but also its speed \(v\), acceleration \(a\), positional distance k, and other driving states.