# Adaptive Cruise Control for Cut-In Scenarios Based on Model Predictive Control Algorithm
## 3 The Cut-In Vehicle Safety Distance Model
### The Safe Distance Model of the Cut-In Vehicle for a Straight Lane
#### 3.1.1 The Minimum Longitudinal Safety Distance between Cut-In Vehicle L and Preceding Vehicle P  
As shown in Figure 14, considering a critical collision scenario, assuming that cut-in vehicle L collides with preceding vehicle P in the target lane at point c, S represents the initial lateral distance between the upper edge of cut-in vehicle L and the lower edge of ] preceding vehicle P. D represents the lane width.  
The lateral acceleration of preceding vehicle P is 0, and the lateral position is constant. Assuming that the time at collision point c is \(t_{c}+t_{adj}\), the collision avoidance condition between cut-in vehicle L and preceding vehicle P is given by the following formula:  
\[x_{L}(t)<x_{P}(t)-l_{0}-w\times\sin(\theta(t))\quad\forall t\in\left[t_{c}+t_ {adj},T\right] \tag{10}\]  
Where \(x_{L}(t)x_{P}(t)\) is the abscissa of the cut-in vehicle and the preceding vehicle, respectively, \(l_{0}\) is the length of the vehicles, and \(\theta(t)\) is the yaw angle of the cut-in vehicle when changing lanes.  
The last term in Formula (10) represents the distance between cut-in vehicle L and preceding vehicle P in the interval of \(\left[t_{c}+t_{adj},t_{lat}+t_{adj}\right]\) to avoid collision. The calculation is as follows:  
\[\tan(\theta(t))=\frac{v_{lat}(t)}{v_{L}(t)} \tag{11}\]  
where \(v_{lat}(t)\) is the lateral speed of the cut-in vehicle and \(v_{L}(t)\) is the longitudinal speed of the cut-in vehicle. The largest \(\theta(t)\), that is the largest \(sin(\theta(t))\), is obtained at the \(t=t_{c}+t_{adj}\) moment. Defining \(L_{P}=l_{0}+W\times sin(\theta(t_{c}+t_{adj}))\), the above formula is simplified to  
\[x_{L}(t)<x_{P}(t)-L_{P}\quad\forall t\in\left[t_{c}+t_{adj},T\right] \tag{12}\]  
Figure 14: The position of cut-in vehicle L and preceding vehicle P.  
Use \(S_{r}(t)\) to represent the longitudinal distance between cut-in vehicle L and preceding vehicle P during the lane change.  
\[S_{r}(t)=x_{P}(t)-L_{P}-x_{L}(t)\quad\forall t\in\left[t_{c}+t_{adj},T\right] \tag{13}\]  
In order to make cut-in vehicle L not collide with preceding vehicle P during the lane change process, the following equation needs to be satisfied  
\[S_{r}(t)=\left(\begin{array}{c}S_{r}(0)+\int_{0}^{t}\int_{0}^{\lambda}(a_{P} (\tau)-a_{L}(\tau))d\tau d\lambda+\\ (v_{P}(0)-v_{L}(0))\times t\end{array}\right)>0\quad\forall t\in\left[t_{c}+t_ {adj},T\right] \tag{14}\]  
where \(S_{r}(0)=x_{P}(0)-l_{0}-x_{L}(0)\). In order not to collide with preceding vehicle P, the longitudinal distance (\(S_{r}(t)\)) between cut-in vehicle L and preceding vehicle P should be as large as possible during the period of \(\left[t_{c}+t_{adj},T\right]\), and \(S_{r}(t)_{\text{max}}\) will be used as the minimum safe distance, \(MSD(L,P)\), at which point cut-in vehicle L will not collide with preceding vehicle P during the lane change process, thus, \(MSD(L,P)\) is obtained:  
\[MSD(L,P)=\underset{t}{Max}\Bigg{(}\begin{array}{c}\int_{0}^{t}\int_{0}^{ \lambda}(a_{L}(\tau)-a_{P}(\tau))d\tau d\lambda+\\ (v_{L}(0)-v_{P}(0))\times t+l_{0}\end{array}\Bigg{)}\quad\forall t\in\left[t_{ c}+t_{adj},T\right] \tag{15}\]  
where \(a_{L}\) is the longitudinal acceleration of the cut-in vehicle, \(a_{P}\) is the longitudinal acceleration of the preceding vehicle, \(v_{L}\) is the longitudinal velocity of the cut-in vehicle, and \(v_{P}\) is the longitudinal velocity of the preceding vehicle