# Adaptive Cruise Control for Eco-Driving Based on Model Predictive Control Algorithm
## 2 Materials and Methods
### Adaptive Cruise Control System Modeling  
An actual ACC system being implemented is hierarchically distributed into two levels: an upper adaptive algorithm and a lower maneuver controller [27]. The acceleration command coming from the upper adaptive algorithm is fed as the input command into the lower maneuver controller. The required dynamics of the vehicle, as well as the constraints, are determined by the upper adaptive algorithm of the ACC system; the lower maneuver controller receives the acceleration command from the upper adaptive algorithm, to control the open-close degree of the throttle and state of the brake. Since this research concerns more the interaction with external driving conditions, such as the traffic flow situation, the upper-level algorithm design is the focus. In this case, the behavior of the lower-level controller can be approximated as a first-order system [28; 29]. \[\tau\frac{\mathrm{d}a(t)}{\mathrm{d}t}+a(t)=c(t) \tag{5}\]  
where \(\tau\) represents the time lag of the lower-level controller, \(a\) refers to the acceleration of the host ACC-equipped vehicle, \(c\) denotes the acceleration command output by the upper adaptive algorithm. Adopting the difference approximation method, the discretization expression for (5) can be obtained as [30]:  
\[\tau\frac{a(t+1)-a(t)}{T_{s}}+a(t)=c(t) \tag{6}\]  
where \(a(t),\ c(t)\) refer to the acceleration and the control command of the ACC-equipped vehicle at the sampling time \(t\), separately, and \(T_{s}\) represents the sampling period. The desired time headway mechanism is considered [31]:  
\[DTH(t)=x_{0}+\theta_{c}\cdot v(t) \tag{7}\]  
where \(DTH(t)\) refers to the desired vehicle spacing at sampling time \(t\), \(x_{0}\) represents a fixed safe spacing as the vehicle speed goes to a low value or zero, \(\theta_{c}\) denotes the desired time headway, and \(v(t)\) is the actual velocity at time \(t\). The vehicle spacing \(\Delta x(t)\) can be defined as [30]:  
\[\Delta x(t)=\Delta x(t-1)+\left[v_{l}(t-1)\cdot T_{s}+\tfrac{1}{2}a_{l}(t-1) \cdot T_{s}^{2}\right]-\left[v(t-1)\cdot T_{s}+\tfrac{1}{2}a(t-1)\cdot T_{s}^ {2}\right] \tag{8}\]  
where \(\Delta x(t)\) refers to the actual spacing between host and preceding vehicle at the sampling moment \(t\), \(a_{l}\) is the acceleration of the vehicle operating ahead, \(v_{l}=v+\Delta v\), is the velocity of the vehicle operating ahead, \(\Delta v\) denotes the velocity difference between the host and preceding vehicles. The derivative of vehicle acceleration can be derived as jerk [32]:  
\[J(t)=\frac{a(t)-a(t-1)}{T_{s}} \tag{9}\]  
The dynamics of an ACC-equipped vehicle can be expressed by the state-space equations:  
\[x(t)=\mathbf{C}_{0}\mathbf{x}(t-1)+\mathbf{C}_{1}\mathbf{c}(t-1)+\mathbf{C}_{2}\mathbf{a}_{l}(t-1) \tag{10}\]  
\[\mathbf{y}(t-1)=\mathbf{C}_{3}\mathbf{x}(t-1)-\mathbf{C}_{4} \tag{11}\]  
So, the driving comfortability evaluation index can be used indirectly as the index of fuel economy. In addition to the above constraints, the absolute value of acceleration command output by the upper-level controller of the ACC system should also be constrained. \[c_{min}\leq c\leq c_{max} \tag{18}\]  
where \(c_{min}\) and \(c_{max}\) are the minimum and maximum values of expected acceleration, respectively. To avoid an accident to guarantee the safety when tracking the preceding vehicle, the vehicle spacing between the host ACC-equipped vehicle and the preceding vehicle must be greater than a critical minimum distance, \(x_{min}\). Due to the unallowable reason for the collision, this constraint is set as a hard one. \[\text{Hard constraint: }\Delta x(t)\geq x_{min}. \tag{19}\]  
Besides, considering the regulation of traffic law and the limitation of the vehicle's own physical ability, the speed of the vehicle in the process of driving needs to be set as a hard constraint in this paper.