# Adaptive Cruise Control for Intelligent City Bus Based on Vehicle Mass and Road Slope Estimation
## 3 Problem Formulation
### ACC Optimizing Indexes  
As one important component of ACC, the spacing strategy determines the safe following distance and provides the reference input values for the subsequent control algorithm. These indexes that should be optimized are the following distance\(\Delta s\), the relative speed \(\Delta\upsilon\), the relative acceleration \(\Delta a\), and the vehicle jerk \(j_{veh}=\mathrm{d}a_{veh}/\mathrm{d}t\). They are described in the following text. Safety is the primary requirement in ACC. To avoid collision between the current and preceding vehicle, the minimum following distance should be longer than the braking distance. The braking distance can be obtained as [33]:  
\[s_{Brk}=v_{veh}\tau_{Brk}+\frac{v_{veh}^{2}}{2a_{Brk}} \tag{18}\]  
where \(\tau_{Brk}\) is the reaction time of braking system, we assume it is 0.5 s. \(a_{Brk}\) is the braking deceleration; the maximum braking deceleration is 8 m/s\({}^{2}\). This paper assumes that after the emergency braking, the final minimum and maximum distance between the two vehicles is 2 m and 8 m. Therefore, Equation (18) can be expended as follows [34]:  
\[\left\{ \begin{array}{l}\Delta s_{\min}=2+0.5\cdot v_{veh}+0.0625\cdot v_{veh}^{2 }\\ \Delta s_{\max}=8+0.5\cdot v_{veh}+0.0625\cdot v_{veh}^{2}\\ \end{array} \right. \tag{19}\]  
where \(\Delta s_{\min}\) and \(\Delta s_{\max}\) are the minimum and maximum safety following distance. We can define the optimal braking distance with the adjustment coefficient \(\alpha\):  
\[\left\{ \begin{array}{l}\Delta s_{up}=\alpha\cdot\Delta s_{\max}+(1-\alpha) \cdot\Delta s_{\min}\\ \Delta s_{low}=\alpha\cdot\Delta s_{\min}+(1-\alpha)\cdot\Delta s_{\max}\\ \end{array} \right. \tag{20}\]  
where \(\Delta s_{up}\) and \(\Delta s_{low}\) are the upper and lower bound of the optimal distance zone. The relationship between the following distance and the longitudinal speed of the vehicle is shown in Figure 5.  
The relevant traveling distance \(\Delta s\) should be restricted in the optimal distance area, when it is out of the area, there will be a cost coefficient. When \(\Delta s\) is larger than \(\Delta s_{up}\), the cost coefficient will be very large. When \(\Delta s\) is smaller than \(\Delta s_{low}\), it means the preceding vehicle and the current vehicle may collide and this situation is not allowed. Therefore, the cost function of \(\Delta s\) can be defined as:  
\[J_{\Delta s}=\left\{ \begin{array}{l}+\infty,&\Delta s<\Delta s_{\min}\\ k_{1}\cdot\tan(\frac{\Delta s-\Delta s_{low}}{\Delta s_{\min}-\Delta s_{low}} \cdot\frac{\pi}{2}),&\Delta s_{\min}\leq\Delta s<\Delta s_{low}\\ \left|\Delta s-\frac{\Delta s_{up}+\Delta s_{low}}{\Delta s}\right|,&\Delta s_ {low}\leq\Delta s<\Delta s_{up}\\ k_{2}\cdot(\Delta s-\Delta s_{up})^{2},&\Delta s_{up}\leq\Delta s<\Delta s_{ \max}\\ k_{3}\cdot(\Delta s-\Delta s_{\max})^{2}+k_{2}\cdot(\Delta s-\Delta s_{up})^{2},&\Delta s>\Delta s_{\max}\\ \end{array} \right. \tag{21}\]  
where \(k_{1}\), \(k_{2}\), and \(k_{3}\) are the cost coefficients. As for the cost function about longitudinal speed and acceleration, we define them by \(\Delta v\) and \(\Delta a\):  
\[\left\{ \begin{array}{l}J_{\Delta v}=k_{4}\cdot\Delta v^{2}\\ J_{\Delta a}=k_{5}\cdot\Delta a^{2}\\ \end{array} \right. \tag{22}\]  
Figure 5: The relationship between the following distance and longitudinal speed. where \(k_{4}\) and \(k_{5}\) are the cost coefficients. The cost function corresponding to the vehicle jerk (the time rate of change of acceleration) has great effect on ride comfort:  
\[J_{jerk}= \begin{cases}k_{6}\cdot j_{beh}^{2}&|j_{veh}|>3\ m/s^{2}\\ 0&|j_{veh}|\leq 3\ m/s^{2}\end{cases}  \tag{23}\]  
where \(k_{6}\) is the cost coefficient. When \(j_{veh}\leq 3\), we think the jerk is small and the vehicle movies smoothly, so \(J_{jerk}=0\). In order to optimize energy consumption, economic optimizing indexes should be defined. Considering that EM power represents the consumption of electrical energy.