# An Eco-Driving Controller Based on Intelligent Connected Vehicles for Sustainable Transportation
## 2 The Cooperative Car-Following System Based on Eco-Driving
### The Car-Following Model Based on Eco-Driving for ICVs
#### 2.3.1 The Spacing Policy for ICVs
Then, the error \(e_{r}(t)\) between the current spacing \(\Delta r(t)\) and the desired spacing \(d_{tar}(t)\) can be formulated as Equation (7):  
\[e_{r}(t)=\Delta r(t)-d_{tar}(t) \tag{7}\]  
The velocity error \(e_{v}(t)\) can be expressed as:  
\[e_{v}(t)=\Delta v(t) \tag{8}\]  
In this controller, lateral control should be considered when the vehicle drives in a curved road. We donate \(v_{y}\) as the lateral velocity, \(\dot{\varphi}\) as the variation rate of yaw angle, \(e_{y}\) as the lateral distance between the vehicle and the centerline, \(e_{\varphi}\) as the error of the yaw angle, \(e_{r}\) as the spacing error, and \(e_{v}\) as the velocity error. Besides, \(\delta_{f}\) and \(a^{i}\) represent the front steering angle and acceleration, respectively. \(\rho\) and \(a^{i-1}\) represent the road curvature and the acceleration of the preceding vehicle. \(l_{f}\) and \(l_{r}\) are the longitudinal distance from the center of gravity to the front and rear tires. \(I_{z}\) denotes the yaw moment of inertia of the vehicle. \(C_{f}\) and \(C_{r}\) represent the tires cornering stiffness. \(m\) is the mass of the vehicle, and refers to the longitudinal velocity. We define \(\mathbf{x}=\left[ \begin{array}{cccccc}v_{y}&\dot{\varphi}&e_{y}&e_{\varphi}&e_{r}&e _{v}\end{array} \right]^{T}\); \(\mathbf{u}=\left[ \begin{array}{c}\delta_{f}\\ a^{\hat{1}}\end{array} \right]\); \(\mathbf{d}=\left[ \begin{array}{c}\rho\\ a^{\hat{1}-1}\end{array} \right]\). The model of the following vehicles can be expressed as:  
\[\dot{\mathbf{x}}=\mathbf{A}\mathbf{x}+\mathbf{B}\mathbf{u}+\mathbf{W}\mathbf{d} \tag{9}\]  
\[\mathbf{W}=\left[ \begin{array}{cccccc}0&0\\ 0&0\\ 0&0\\ -v_{x}&0\\ 0&0\\ 0&1\end{array} \right]\]  
. By discretizing Equation (9), the above model can be expressed by Equation (10) as:  
\[\mathbf{x}(k+1)=\overline{\mathbf{A}}\mathbf{x}(k)+\overline{\mathbf{B}} \mathbf{u}(k)+\overline{\mathbf{W}}\mathbf{d}(k) \tag{10}\]  
\[\mathbf{where}\ \overline{\mathbf{x}}=\left[ \begin{array}{cccccc}\frac{(C_{f}+C_{r})t_ {s}}{m\pi_{x}}+1&\frac{(l_{r}C_{f}-l_{r}C_{r})t_{s}}{m\pi_{x}}&0&0&0&0\\ \frac{(l_{r}C_{f}-l_{r}C_{r})t_{s}}{l_{x}\pi_{x}}&\frac{(l_{r}^{2}C_{f}+l_{r} ^{2}C_{r})t_{s}}{l_{x}\pi_{x}}+1&0&0&0&0\\ t_{s}&0&1&v_{x}t_{s}&0&0\\ 0&t_{s}&0&1&0&0\\ 0&0&0&1&t_{s}\\ 0&0&0&0&0&1\end{array} \right]\]  
\[\left[ \begin{array}{cccccc}0&0\\ 0&0\\ 0&0\\ 0&0\\ 0&0\\ 0&t_{s}\end{array} \right]\]  
\[t_{s}\]  
is the sampling interval. Predictive state vectors and input vectors at the \(p\)-th step can be defined as:  
\[\mathbf{X_{k}}=\left[ \begin{array}{cccccc}\mathbf{x}(k+1|k)&\mathbf{x}(k+2| k)&\cdots&\mathbf{x}(k+p|k)&\end{array} \right]^{T} \tag{11}\]  
\[\mathbf{U_{k}}=\left[ \begin{array}{cccccc}u(k|k)&u(k+1|k)&\cdots&u(k+p-1|k)& \end{array} \right]^{T} \tag{12}\]  
\[\mathbf{D_{k}}=\left[ \begin{array}{cccccc}d(k|k)&d(k+1|k)&\cdots&d(k+p-1|k)& \end{array} \right]^{T} \tag{13}\]  
Therefore, according to Equation (10), the prediction state vector \(\mathbf{X_{k}}\) can be expressed as Equation (14):  
\[\mathbf{X_{k}}=\mathbf{\Psi}\mathbf{x}(\mathbf{k})+\mathbf{\Theta}\mathbf{U_ {k}}+\mathbf{\Omega}\mathbf{D_{k}} \tag{14}\]  
\[\mathbf{where}\ \overline{\mathbf{\Psi}}=\left[ \begin{array}{cccccc}\overline{ \mathbf{A}}\\ \overline{\mathbf{A}}^{2}\\ \vdots\\ \overline{\mathbf{A}}^{p}\end{array} \right],\mathbf{\Theta}=\left[ \begin{array} []{cccccc}\overline{\mathbf{B}}&\cdots&0&0\\ \overline{\mathbf{B}}&\overline{\mathbf{B}}&\cdots&0\\ \vdots&\vdots&\ddots&\vdots\\ \overline{\mathbf{A}}^{p-1}\overline{\mathbf{B}}&\overline{\mathbf{A}}^{p-2} \overline{\mathbf{B}}&\cdots&\overline{\mathbf{B}}\end{array} \right], \mathbf{and}\ \mathbf{\Omega}=\left[ \begin{array}{cccccc}\overline{\mathbf{W}}&\cdots&0&0\\ \overline{\mathbf{A}}\overline{\mathbf{W}}&\overline{\mathbf{W}}&\cdots&0\\ \vdots&\vdots&\ddots&\vdots\\ \overline{\mathbf{A}}^{p-1}\overline{\mathbf{W}}&\overline{\mathbf{A}}^{p-2} \overline{\mathbf{W}}&\cdots&\overline{\mathbf{W}}\end{array}