## 3 Methodology
### Platoon Topology Control Based on Graph Theory and Safety Potential Field Theory
#### 3.1.2 Platoon Formation Control Model  
After the formation of the platoon, the optimal car-following control of vehicles in the platoon is key to improving traffic efficiency and avoiding string instability. In this paper, we introduce a slack variable \(SV\) based on the safety potential model to the effect function \(f\) to address the problem of optimal car-following control, as shown in Equation (8). The slack variable is a comprehensive velocity gain of the vehicle caused by factors such as the vehicle state and traffic environment. \(SV_{s}\) and \(SV_{l}\) are the components of the slack variable in longitudinal and lateral directions, respectively. \[\Delta f=\mathcal{L}\bigg{[} \begin{array}{c}\dot{s}\\ \dot{l}\end{array} \bigg{]}=\mathcal{L}\bigg{(}\bigg{[} \begin{array}{c}f(d_{ s}-s_{a})\\ f(d_{l}-l_{a})\end{array} \bigg{]}+\bigg{[} \begin{array}{c}SV_{s}\\ SV_{l}\end{array} \bigg{]}\bigg{)}. \tag{12}\]  
In our previous studies, the velocity control of any vehicle \(i\) in a platoon according to the safety potential field theory was characterized as  
\[ \begin{array}{ll}\dot{v}_{i}(t+1)&=a_{free}+a_{ji}\\ &=a_{max}\text{tanh}\Big{[}\delta\cdot\Big{(}v_{0}^{(\alpha)}-v_{i}(t)\Big{)} \Big{]}-e^{\beta_{2}v_{i}(t)\cdot\cos\phi}\cdot M_{j}\cdot\lambda\cdot\frac{e ^{-\beta_{1}v_{i}(t)\cos\theta}}{|K|^{5}}\cdot\frac{k^{\prime}}{|K|^{7}},\end{array}  \tag{13}\]  
where \(a_{max}\) represents the maximum allowable acceleration of the vehicle, \(a_{free}\) represents the acceleration of vehicle \(i\) when the distance between vehicle \(i\) and the leading vehicle (vehicle \(j\)) is long enough, \(v_{0}^{(\alpha)}\) is the desired velocity of vehicle \(i\), \(v_{i}(t)\) represents the velocity of vehicle \(i\) at time \(t\), \(M_{j}\) denotes the equivalent mass of object vehicle \(j\), \(\beta_{2}\) is an undetermined coefficient and \(\phi\) refers to the angle between the direction of the vehicle velocity and the \(X\)-axis (counter-clockwise). Note that the velocity-based slack variable \(SV\) reflects the feedback gain of the vehicle's driving environment on the vehicle velocity. In this paper, \(SV\) is defined as a variable that changes the vehicle's motion state under the influence of the safety potential field, which is directly reflected in the speed change of the vehicle. Thus, the definition of the \(SV\) based on safety potential field theory is actually modeling the impact of the complex driving environment on the vehicle. The velocity-based slack variable in the lateral direction \(SV_{s}\) can be defined as the lateral velocity control expression in Equation (13) to achieve the speed optimization of the individual vehicles in the platoon. For the expression of the velocity-based slack variable in the longitudinal direction \(SV_{l}\), the lane marking potential field and the road boundary potential field are employed to describe the constraints of the lane marking and road boundary to ensure that the vehicle does not produce a deviation in the longitudinal direction and thus to enable the vehicle to keep driving in the center of the lane. Then, as shown in Figure 3, the field forces generated by these two types of safety potential field will reach the longitudinal motion constraint of the vehicle. Similar to the field force analysis formed by the vehicle potential field, we can also derive the respective field force expressions based on the safe potential field expressions shown in Equations (9) and (10). Then, we can obtain the function expression of \(SV_{l}\) based on the field force expressions of the road boundaries and road lines [29]. Finally, the comprehensive expression of the velocity-based slack variable \(SV\) can be shown in Equation (14). \[