# Adaptive Cruise Control Based on Model Predictive Control with Constraints Softening
## 3 Mathematical Model
### Car-Following State Space Model  
The dynamic characteristics of the ACC system should be considered when designing an ACC algorithm. Therefore, this paper regards the acceleration of the preceding vehicle as a disturbance to the ACC system. At the same time, to improve the robustness and control accuracy of the state space model, the dynamic characteristics of acceleration and jerk are also taken into account. For this purpose, this paper chooses the inter-distance \(\Delta x(k)\), the velocity of the host vehicle \(v(k)\), the relative velocity \(v_{\text{rel}}(k)\), the acceleration of the host vehicle \(a(k)\), and the jerk of the host vehicle \(j(k)\) as the state variables of the prediction model, that is \(x(k)=[\Delta x(k)\), \(v(k)\), \(v_{\text{rel}}(k)\), \(a(k)\), \(j(k)]^{\text{T}}\). The disturbance of the system is \(w(k)=a_{\text{p}}(k)\). Then, the car-following state space model can be defined as \[x(k+1)=Ax(k)+Bu(k)+Gw(k) \tag{7}\]  
where the system matrices are  
\[A=\left[ \begin{array}{ccccc}1&0&T_{\mathrm{s}}&-\frac{1}{2}{T_{\mathrm{s}}}^{2 }&0\\ 0&1&0&T_{\mathrm{s}}&0\\ 0&0&1&-T_{\mathrm{s}}&0\\ 0&0&0&1-\frac{T_{\mathrm{s}}}{\tau}&0\\ 0&0&0&-\frac{1}{\tau}&0\\ \end{array} \right],B=\left[ \begin{array}{c}0\\ 0\\ 0\\ T_{\mathrm{s}}\\ \frac{1}{\tau}\\ \end{array} \right],G=\left[ \begin{array}{c}\frac{1}{2}{T_{\mathrm{s}}}^{2 }\\ 0\\ T_{\mathrm{s}}\\ 0\\ 0\\ \end{array} \right].\]  
For the ACC system, safe car following is the required premise for designing the ACC strategy. While it can be achieved by ensuring a safe distance, two vehicles are likely to crash before achieving the desired safe distance. Therefore, the actual inter-distance between the preceding vehicle and the host vehicle must be restricted to ensure safety, yielding the first hard constraint  
\[\delta_{\mathrm{real}}(k)=x_{\mathrm{p}}(k)-x(k)\geq d_{\mathrm{c}} \tag{8}\]  
where \(d_{\mathrm{c}}\) is the minimum safe distance between the host vehicle and the proceeding vehicle. The driver's following behavior is to make the actual distance between the two vehicles close to the desired distance. At the same time, the velocity of the host vehicle is close to the velocity of the preceding vehicle. In other words, the two vehicles are relatively stationary, which means \(\delta(k)\) and \(v_{\mathrm{rel}}(k)\) converge to zero in the steady state. Riding comfort is another important requirement for designing an ACC system. [PERSON] and [PERSON] [20] researched the evaluation criterion for riding comfort by conducting surveys on a large number of drivers. The results indicate that vehicle acceleration and jerk can be used to describe the driving comfort of the vehicle. The smaller the absolute values of acceleration and jerk are, the better the ride comfort will be. Therefore, the velocity, the acceleration, the target acceleration, and the jerk of the host vehicle are limited to ensure riding comfort, which are defined as the following hard constraints:  
\[ \begin{array}{l}v_{\mathrm{min}}\leq v(k)\leq v_{\mathrm{max}}\\ a_{\mathrm{min}}\leq a(k)\leq a_{\mathrm{max}}\\ j_{\mathrm{min}}\leq j(k)\leq j_{\mathrm{max}}\\ u_{\mathrm{min}}\leq u(k)\leq u_{\mathrm{max}}\\ \end{array}  \tag{9}\]  
where \(v_{\mathrm{min}}\), \(v_{\mathrm{max}}\), \(a_{\mathrm{min}}\), \(a_{\mathrm{max}}\), \(j_{\mathrm{min}}\), \(j_{\mathrm{max}}\)\(u_{\mathrm{min}}\), and \(u_{\mathrm{max}}\) are the bounds of the velocity, the acceleration, the desired acceleration, and the jerk, respectively. The smoother the vehicle dynamic response curve is, the higher the vehicle fuel economy will be. Therefore, the reference trajectory is imported to make the variable that needs to be optimized gradually converge to the expected value, thus decreasing fuel consumption. The reference trajectories of inter-distance error, relative velocity, relative acceleration, and jerk are taken as the exponential attenuation functions; these are defined as  
\[