## 3 Methodology
### Car-Following Model Based on Safety Potential Field
The distance between the \((n-i)\)th and nth vehicle is denoted as \(\Delta\text{x}_{i}\), while the distance between the \((n+j)\)th and the nth vehicle is \(\Delta x_{j}\). \[U_{V}^{n-i,n}=M_{n-i}\lambda\frac{e^{-a_{n-i}}}{|k_{n-i,n}|}\frac{k_{n-i,n}}{| k_{n-i,n}|} =M_{n-i}\lambda\frac{e^{-a_{n-i}+v_{n-i}}}{\Delta x_{i}\cdot s_{0} }\frac{k_{n-i,n}}{|k_{n-i,n}|}, \tag{2}\]  
\[U_{V}^{n+j,n}=M_{n+j}\lambda\frac{e^{-a_{n+j}}}{|k_{n+j,n}|}\frac{k_{n+j,n}}{| k_{n+j,n}|} =M_{n+j}\lambda\frac{e^{-a_{n+j}+v_{n+j}}}{\Delta x_{j}\cdot s_{0} }\frac{k_{n+j,n}}{|k_{n+j,n}|}, \tag{3}\]  
where \(M_{n-i}\) and \(M_{n+j}\) represent the actual weight of the \((n-1)\)th and \((n+1)\)th vehicles, and \(v_{n-i}\) and \(v_{n+j}\) are their respective velocities. \(k_{n-i,n}\) and \(k_{n+j,n}\) denote the distances from the \(n\)th vehicle. The field force \(F\) experienced by vehicles in a real car-following state indicates the level of safety risk, with higher risks leading to stronger field forces. This concept draws an analogy to the calculation formula for electric field force, leading to an expression for the field force exerted on the \(n\)th vehicle by the \((n-i)\)th and \((n+j)\)th vehicles. \[F_{n-i,n}=U_{V}^{n-i,n}M_{n}e^{v_{n}}=M_{n-i}\lambda\frac{e^{-a_{n-i}+v_{n-i}} }{\Delta x_{i}\cdot s_{0}}M_{n}e^{v_{n}}, \tag{4}\]  
Figure 1: Traffic scenarios based on SPF: (**a**) scenario building; (**b**) description of scenario elements. \[F_{n+j,n}=U_{V}^{n+j,n}M_{n}e^{v_{n}}=M_{n+j}\lambda\frac{e^{-a_{n+j}+v_{n+j}}}{ \Delta x_{j}\cdot s_{0}}M_{n}e^{v_{n}}, \tag{5}\]  
where \(M_{n}\) denotes the actual weight of the \(n\)th vehicle. \(v_{n}\) represents the velocity of the \(n\)th vehicle. For the \((n-i)\) and \((n+j)\) vehicles, the accelerations \(a_{n-i,n}\) and \(a_{n+j,n}\) under the action of the field forces \(F_{n-i,n}\) and \(F_{n+j,n}\) are expressed as:  
\[a_{n-i,n}=\frac{F_{n-j,n}}{M_{n}} =M_{n-i}\lambda\frac{e^{-a_{n-i}+v_{n-i}}}{\Delta x_{i}\cdot s_{0 }}e^{v_{n}}, \tag{6}\] \[a_{n+j,n}=\frac{F_{n+j,n}}{M_{n}} =M_{n+j}\lambda\frac{e^{-a_{n+j}+v_{n+j}}}{\Delta x_{j}\cdot s_{0 }}e^{v_{n}}, \tag{7}\]  
According to the previous description of the safety potential field, the field forces within a certain range influences the vehicles. In larger distances between preceding and following vehicles, the intelligent driver model (IDM) is employed to capture the car-following behaviour characteristics [42; 43]. This includes the vehicle's response to acceleration and deceleration in both free-flow and congested flow conditions. The car-following model based on the safety potential field is expressed as:  
\[ \begin{split}&\frac{d\varpi_{n}(t+t_{d})}{dt}=a_{0}\bigg{(}1- \Big{(}\frac{v_{n}(t)}{v_{0}}\Big{)}^{4}-\Big{(}\frac{s_{n}^{*}(t)}{s_{n}(t)} \Big{)}^{2}\bigg{)}+\\ &\gamma(a_{n-i}(t)-a_{n-i,n}(t))+\mu\big{(}a_{n+j}(t)-a_{n+j,n}(t )\big{)}\\ &\qquad=a_{0}\bigg{(}1-\Big{(}\frac{v_{n}(t)}{v_{0}}\Big{)}^{4}- \Big{(}\frac{s_{n}^{*}(t)}{s_{n}(t)}\Big{)}^{2}\bigg{)}+\\ &\gamma\sum\limits_{i=1}^{p}\Big{(}a_{n-i}(t)-M_{n-i}\lambda \frac{e^{-a_{n-i}+v_{n-i}}}{\Delta x_{i}\cdot s_{0}}e^{v_{n}}\Big{)}+\\ &\qquad\mu\sum\limits_{j=1}^{q}\Big{(}a_{n+j}(t)-M_{n+j}\lambda \frac{e^{-a_{n+j}+v_{n+j}}}{\Delta x_{j}\cdot s_{0}}e^{v_{n}}\Big{)},\end{split}  \tag{8}\]  
\[s_{n}^{*}(t)=s_{0}+Tv_{n}(t)+\frac{v_{n}(t)\Delta v(t)}{2\sqrt{a_{0}b}}, \tag{9}\]  
where \(a_{0}\) and \(v_{0}\) represent the maximum acceleration and desired velocity of the following vehicle in free-flow conditions, and \(v_{n}(t)\) is the velocity of the following vehicle at time \(t\). \(s_{n}^{*}(t)\) is the desired headway, \(s_{n}(t)\) is the actual headway, \(T\) is the safe time headway, and \(\Delta v(t)\) the velocity difference between the following and leading vehicles. \(b\) indicates the comfortable deceleration, while \(p\) and \(q\) are the numbers of preceding and following vehicles, respectively. \(t_{d}\) is the time delay for information reception and processing. \(\gamma\) and \(\mu\) represent the sensitivity coefficients of the safety potential field.