## 4 GKL Algorithm of Active Suspension
### Data Analysis Based on K-means Clustering Algorithm
#### 4.2.2 Evaluation of Clustering Results  
The active suspension LQR controller studied in this paper changes 4 kinds of road classes, 6 kinds of speed, 50 weighting coefficients of DTD, and 50 weighting coefficients of SWS. The sample data of the machine learning dataset constructed after the simulation are so large that the clustering analysis cannot be carried out directly. Thus, keeping the road class and driving speed unchanged, a control variable method is used to divide the dataset into 24 subsets (i.e., 24 working conditions). In this paper, the subset of B-class road under 20 m/s (B-20 subset for short) is taken as an example for cluster analysis, which is used to explore the rule information between the weighting coefficients and LQR control effect. The other subsets have the same analysis steps and similar clustering characteristics, which will not be repeated here. A K-means clustering program is written and run to cluster the sample data of the B-20 subset. This subset is divided into seven clusters according to the similarity of the three performance indexes. The clustering results are shown in Figure 10:  
As can be seen from Figure 10, the sample data of the B-20 subset are divided into seven clusters, but there is lacking accurate data information to evaluate and analyze the results. Therefore, to accurately describe the clustering effect, the averages of each variable in each cluster are calculated, and all data are processed in ascending order according to the value of the suspension integral performance index \(L\). Finally, all the control results are classified into three different suspension requirement modes, which are safety mode, comprehensive mode, and comfort mode. The optimal solutions for the weighting coefficients of each mode are computed. The clustering results are shown in Table 5.  
Compared with the RMS values of passive suspension, the optimization effect of BA in Cluster 2 is very good, and the optimization rate is as high as 48.23%. However, the DTD deteriorates significantly, and the deterioration rate is as high as 47.01%. Therefore, Cluster 2 should be deleted. For Cluster 5 and Cluster 4, the optimization effect of DTD is the best, which could be classified as safety mode. For Cluster 1 and Cluster 7, the optimization effect of each performance is good, which could be classified as comprehensive mode. For Cluster 3 and Cluster 2, the optimization effect of BA is the most prominent, which is classified as comfort mode. The clustering results of the remaining 23 kinds of working conditions and the optimal weights of three performance modes can be obtained by the same clustering steps. Tables 6-8 are the optimal solution and simulation results of safety mode, comprehensive mode, and comfort mode under B-class road, respectively. Table 9 is the optimal solution and simulation results of comfort mode under C-class road. The others are not listed for simplification. \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline
**Road Class** & **Speed** & \(\mathbf{q_{1}}\) & \(\mathbf{q_{2}}\) & \(\mathbf{\mathrm{BA}_{J}}\)/(\(\mathbf{\mathrm{m}\cdot\mathrm{s}^{-2}}\)) & **SWS\({}_{\mathbf{s}}\)/m** & **DTD\({}_{\mathbf{s}}\)/m** & **dBA** & **dSWS** & **dDTD** & **L** \\ \hline \multirow{9}{*}{B} & 5 & 99,211 & 7328 & 0.3039 & 0.0023 & 0.0010 & \(-\)10.01\% & \(-\)30.63\% & \(-\)10.37\% & 2.4899 \\  & 10 & 100,830 & 7493 & 0.4319 & 0.0033 & 0.0015 & \(-\)9.86\% & \(-\)31.25\% & \(-\)10.66\% & 2.4823 \\  & 15 & 99,191 & 7433 & 0.5272 & 0.0040 & 0.0018 & \(-\)9.99\% & \(-\)30.85\% & \(-\)10.43\% & 2.4873 \\  & 20 & 100,819 & 7448 & 0.6105 & 0.0046 & 0.0021 & \(-\)9.87\% & \(-\)31.06\% & \(-\)10.65\% & 2.4842 \\  & 25 & 97,983 & 7389 & 0.6783 & 0.0052 & 0.0023 & \(-\)10.33\% & \(-\)30.96\% & \(-\)10.30\% & 2.4841 \\  & 30 & 98,991 & 7473 & 0.7451 & 0.0057 & 0.0025 & \(-\)10.12\% & \(-\)31.03\% & \(-\)10.43\% & 2.4842 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Optimal solution and simulation results of safety mode under B-class road.