## 4 Comprehensive Controller Considering Traffic Information
### Future Trend Prediction of Vehicle Speed  
The instantaneous power allocation in the traditional controller is decided by the current demand power of the motor. However, the limited quantity of the electricity of the ultra-capacitor cannot always meet the energy and power requirement from the controller. To better develop the effect of the controller, it is necessary to predict the future trend of the vehicle speed and to guarantee that the electricity of the ultra-capacitor is in a proper range. This section employs the K-means clustering  
Figure 4: Diagram of road grade calculation. Figure 5: Added information of road grade in WLTP driving cycle. Figure 3: Traffic condition of the World Light Test Procedure (WLTP) driving cycle. algorithm to implement the future trend prediction of the vehicle speed, and the prediction process is as follows:  
1. The combined driving cycle, including MANHATTAN, NYCC, UDDS, NEDC, WVUNITER, and HWFET, is selected as the sample driving cycle, as shown in Figure 6. These six driving cycles cover urban, suburban, and expressway condition. 2. The sampling period is 1 s and the driving cycle between the two sampling points is a driving cycle block. The average accelerated speed, the standard deviation of the vehicle speed, and the difference between the initial speed and the last speed of a driving cycle block are selected as the characteristic parameters of the driving cycles [32]. The characteristic parameters of 10 s are calculated at each sampling point. 3. Referring to the K-means clustering algorithm [33], three cluster centers are obtained, which are the cluster centers of the speed descending \(c_{1}\), speed stabling \(c_{2}\), and speed rising \(c_{3}\), as Table 5 lists. 4. After obtaining the cluster centers, the distance, \(d_{j}\), from various characteristic parameters to the \(j\)th cluster center can be computed by Equation (11). If \(d_{1}<d_{2}\) & \(d_{2}<d_{3}\), the state of the vehicle speed is the type of speed descending, and the state of the vehicle speed belongs to the speed stabling when \(d_{2}<d_{1}\) & \(d_{2}<d_{3}\). If \(d_{3}<d_{1}\) & \(d_{3}<d_{2}\), the vehicle speed is considered to be a speed rising. \[d_{j}=\sqrt{\left(x_{1}-c_{j1}\right)^{2}+\left(x_{1}-c_{j2}\right)^{2}+\left( x_{1}-c_{j3}\right)^{2}} \tag{11}\]  
where \(j\) can be 1, 2, or 3. \(c_{j1}\) denotes the value of the average accelerated speed in the \(j\)th cluster. The standard deviation of the vehicle speed is labeled by \(c_{j2}\), and \(c_{j3}\) represents the difference between the initial speed and the last speed of a driving cycle block. The state of the vehicle speed under the WLTP driving cycle is displayed in Figure 7.  
Speed difference represents the difference between the initial speed and the last speed of a driving cycle block. Figure 6: Sample driving cycle. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Cluster Centers** & \(\mathbf{c_{1}}\) & \(\mathbf{c_{2}}\) & \(\mathbf{c_{3}}\) \\ \hline Average accelerated speed & \(-0.65394301496\) & \(-0.00551733775\) & \(0.5174511141\) \\ Standard deviation of vehicle speed & \(7.78720463753\) & \(1.10825192133\) & \(6.05417011930\) \\ Speed difference & \(-22.1134815365\) & \(-0.1531105304\) & \(17.3566038619\) \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Three cluster centers. The traffic condition is combined with the state of the vehicle speed, in order to better predict the future trend of the vehicle speed. If the vehicle speed belongs to the speed stabling, the vehicle speed is considered to be steady, no matter traffic condition. If the vehicle speed is the type of speed descending, it is considered that when the traffic condition is congested, modestly fluent, and fluent, and the future trend of the vehicle speed is considered to descend largely, moderately, and slightly, respectively, in a short time.