# Development of a Representative EV Urban Driving Cycle Based on a k-Means and SVM Hybrid Clustering Algorithm

Authors: Xuan Zhao; Qiang Yu; Jian Ma; Yan Wu; Man Yu; Yiming Ye
Journal: Journal of Advanced Transportation
 (2018)

---

## Abstract

This paper proposes a scientific and systematic methodology for the development of a representative electric vehicle (EV) urban driving cycle. The methodology mainly includes three tasks: test route selection and data collection, data processing, and driving cycle construction. A test route is designed according to the overall topological structure of the urban roads and traffic flow survey results. The driving pattern data are collected using a hybrid method of on-board measurement method and chase car method. Principal component analysis (PCA) is used to reduce the dimensionality of the characteristic parameters. The driving segments are classified using a hybrid k-means and support vector machine (SVM) clustering algorithm. Scientific assessment criteria are studied to select the most representative driving cycle from multiple candidate driving cycles. Finally, the characteristic parameters of the Xi’an EV urban driving cycle, international standard driving cycles, and other city driving cycles are compared and analyzed. The results indicate that the Xi’an EV urban driving cycle reflects more aggressive driving characteristics than the other cycles.


---

## Body

## 1. Introduction

Fuel depletion, environmental disruption, and air pollution have contributed to the development of electric vehicles (EVs) [1]. The driving range calculation and state of charge estimation for EVs are generally performed based on the international standard driving cycles [2, 3]. In the study of energy consumption prediction and energy management optimization strategies for EVs, some scholars have also adopted the international standard driving cycles [4–6]. However, the data of these international standard driving cycles were collected from internal combustion engine vehicles (ICEVs). Because of the differences in the torque characteristics, power characteristics [7–11], and braking characteristics between EVs and ICEVs, the driving cycles of EVs are significantly different from those of ICEVs [12–14]. The research on driving range calculation, state of charge estimation, energy consumption prediction, and energy management optimization strategies for EV under the international standard driving cycles can produce large errors. Therefore, it is important to conduct research on the driving cycles of EVs [15, 16].The driving cycle is a speed-time profile that represents a typical real-world driving pattern in a certain city or region [3, 17]. Driving cycles have a wide range of applications in the vehicle and transportation fields [18], and they are often used to simulate traffic conditions during laboratory chassis dynamometer bench tests and in automotive simulation research [3]. Moreover, these cycles serve as a standardized measurement procedure for the evaluation and certification of new vehicle models, the monitoring of exhaust emissions and fuel consumption for ICEVs, and the estimation of the driving range and energy consumption per unit mileage for EVs [3, 19]. Because of differences in city size, road topology, road types, traffic conditions, vehicle ownership, economics, cultures, geographical features, and vehicle types, the characteristics of driving cycles in different cities and regions are different [20, 21]. Hence, it is necessary to develop a unique driving cycle for each typical city and region. Moreover, many researchers have found that the energy consumption of an EV for a real-world driving cycle greatly differs from that based on the international standard driving cycles [19, 22–25].Many researchers have also successfully developed real-world driving cycles, such as the Dublin driving cycle [3], Hong Kong driving cycle [17], California driving cycle [26], Edinburgh driving cycle [27], Hamburg driving cycle [28], Winnipeg driving cycle [29], Mashhad driving cycle [30], Beijing driving cycle, Shanghai driving cycle, Chengdu driving cycle, Chongqing driving cycle, Ningbo driving cycle, Changchun driving cycle, Jilin driving cycle, Zitong driving cycle, Jiutai driving cycle, and Mianyang driving cycle [31]. To date, no studies have focused on the development of typical urban driving cycles in northwestern China. As the core city in Northwest China, Xi’an is characterized by the comprehensive economic, cultural, traffic, and population dynamics driven by the western development in China. Furthermore, Xi’an is a typical ancient capital of China. Notably, the center of the city is the bell tower, and the first ring road was built along the ancient city wall. Xi’an has a population of 9.61 million, and the number of vehicles totals more than 3 million. The total length of urban roads is 2562 km. Therefore, this paper takes Xi’an as an example to study the construction methodology of the EV urban driving cycle.This paper is organized as follows. The test route selection and data collection method are presented in Section2. The data processing procedure uses principal component analysis (PCA) to reduce the dimensionality of characteristic parameters, and the k-means and support vector machine (SVM) hybrid method is used for clustering calculations in Section 3. The driving cycle is constructed in Section 4. Section 5 compares the EV driving cycle constructed in this paper with other driving cycles. Finally, Section 6 presents the conclusions of this study.


## 2. Test Route Selection and Data Collection Method

The test routes must cover various urban road types, business and nonbusiness districts, densely populated areas and nonpopulated areas and consider the urban topological structure, driving speed, traffic flow, travel time, and origin-destination (O-D) pattern [30, 33–35]. First, the overall topological structure of urban roads in Xi’an was analyzed using ArcGIS software. The lengths and proportions of urban roads in Xi’an are shown in Figure 1. The total length of Xi’an urban roads is 2562 km, including 141 km of expressways, 597 km of main roads, 1001 km of secondary roads, and 823 km of branch roads. To investigate traffic flow, 11 traffic flow monitoring points were established on various types of roads: 2 expressways, 5 main roads, 4 secondary roads, and 1 branch road. Moreover, to avoid the differences between working days and nonworking days, traffic flow monitoring tests were conducted over 14 days. The traffic flow survey results obtained are shown in Figure 2. According to the traffic flow survey results, the peak times are 7:30-9:30 and 17:30-19:30, and the off-peak times are 12:00-13:30 and 19:30-21:00 [17, 20, 29–31]. Considering the abovementioned comprehensive factors, a circular road with a length of 38.4 km was finally selected as the test route. This route included the 11.3 km of expressways, 10.7 km of main roads, 9.4 km of secondary roads, and 7.0 km of branch roads, as shown in Figure 3. The details of the test route are shown in Table 1. Because Xi’an is located in a plain area, the slopes of the urban roads are mainly caused by the viaducts, and the influence of the road gradient on data acquisition is not considered in the test route selection process.Table 1
Details of the test route.
Number Road name Road type Road length (km) Number of traffic lights 1 Wenyi south road Secondary road 1.2 3 2 Mingsheng road Branch road 0.6 0 3 Jiandong road Branch road 1.7 5 4 Leju road Branch road 0.6 1 5 East Gate south road Main road 1.1 1 6 East Gate road Main road 0.4 1 7 Changle road Branch road 1.5 0 8 Xingqing road Main road 0.6 3 9 Changle west road Main road 1.6 2 10 North section of the east first ring road Express way 1.0 0 11 Taihua south road Main road 0.8 2 12 Hanyuan road Secondary road 2.0 0 13 East second ring road Express way 2.0 0 14 North second ring road Express way 1.8 0 15 Taihua south road Main road 0.7 1 16 Xuanwu road Secondary road 1.6 3 17 Weiyang road Main road 0.7 0 18 Fangxin road Branch road 1.6 2 19 Mingguang road Secondary road 1.0 3 20 Gongnong road Secondary road 0.5 3 21 Ziqiang west road Secondary road 0.8 0 22 Xinghuo road Main road 1.3 1 23 Daqing road Main road 2.1 1 24 Taoyuan road Secondary road 1.5 4 25 Fengqing road Main road 1.4 2 26 West section of south second ring road Express way 5.0 0 27 Chang’an road Secondary road 0.5 0 28 Xingshan temple east road Branch road 1.0 1 29 Cuihua road Secondary road 0.3 1 30 South second ring road Express way 1.5 0Figure 1
Lengths and proportions of urban road types.Figure 2
Traffic flow survey results.Figure 3
Test route. Note: the red data in the A-B-C format represents road information, where A represents the serial number of the roads, B represents the length of the roads, and C represents the number of traffic lights.In driving cycle construction, the common data acquisition methods include the on-board measurement method and chase car method. On-board measurement method uses on-board diagnostics (OBD) installed in a test vehicle to collect trip activity information. The advantage of this approach is that the collected data can accurately represent the actual driving cycle based on large-scale studies. However, the test costs to obtain a reasonable sample size can be extremely high, and the data processing workload is large [32, 34, 36]. Chase car method is widely used to collect speed-time data from real-world driving cycles. Such method involves randomly following a target vehicle and imitating its driving pattern in the traffic stream. When the previous target vehicle stops or is lost, another tracking target is selected [37]. A global position system (GPS) is installed in the test car to collect data, and a large number of driving characteristics are simulated and sampled through the car-following process. Chase car method has been commonly adopted due to its low cost requirements [17, 27, 33, 35].Considering on-board measurement method and chase car method has distinct merits and demerits, and this paper used a hybrid method of on-board measurement method and chase car method to collect test data. When an available EV was driving on the preset test route, the test vehicle chased it and imitated its driving pattern; when no target EV was available, the driving patterns of the test vehicle were collected. The GPS signal is easily influenced by the urban buildings, which can cause signal loss and data spikes; therefore, both GPS and OBD were used to collect driving pattern data. Speed-time data obtained by OBD were mainly used to supplement and improve abnormal GPS data. Moreover, 14 trained professional drivers were selected to minimize the influence of the driver on the collected data. In addition, a BYD E6 pure EV, which is the most commonly owned EV in the market, was selected as the test vehicle. The technical characteristics of the test EV are shown in Table2. The experimental equipment installed in the test vehicle mainly included a GPS, OBD, a gyroscope, a driving recorder, a 12-V lead-acid battery, and a power inverter. The GPS recorded the speed, time, and distance of each trip. The OBD recorded the speed, time, distance, and battery state of charge. Additionally, the gyroscope recorded the acceleration signal and road gradient, and the driving recorder was used to collect traffic condition and chased vehicle information. Finally, 12-V lead-acid battery and power inverter were used to power the test equipment. The test equipment is shown in Figure 4. All data were recorded at a constant sampling frequency of 1 Hz [38–40]. Driving data was collected by test vehicles moving along preset routes under real-world traffic conditions. Moreover, to consider the effect of the traffic flow and travel time on the test results, a 14-day test was conducted. The daily test periods were the morning peak from 7:30 to 9:30, the midday off-peak from 12:00 to 13:30, the afternoon peak from 17:30 to 19:30, and the evening off-peak from 19:30 to 21:00. The tests were conducted under clear weather conditions, on dry roads, and at wind speeds less than 1 m/s. Data collection ceased in cases of abnormal traffic conditions [30]. Test data were collected for a total of 56 trips totaling approximately 428 hours.Table 2
Technical characteristics of the test EV.
Characteristic parameter Value Curb weight (kg) 2380 Mass (kg) 2755 Length (mm) 4560 Width (mm) 1822 Height (mm) 1630 Wheel based (mm) 2830 Front/rear track width (mm) 1585/1560 Centroid height (mm) 640 Maximum speed (km/h) 140 Maximum endurance mileage (km) 400 Rated voltage (V) 600 Maximum torque (Nm) 450 Maximum power (kW) 120Figure 4
Test equipment.


## 3. Data Processing

In the data processing procedure, the raw data were first denoised and smoothed by using a wavelet decomposition and reconstruction method. Then, the preprocessed data were partitioned into 36388 kinematic segments according to (1). In addition, a PCA algorithm was adopted to reduce the dimensionality of the characteristic parameters. Finally, the k-means and SVM hybrid clustering algorithm was used to classify the kinematic segments that were used to construct the driving cycle.(1)accelerationa≥0.15m/s2decelerationa≤-0.15m/s2uniformv≥2m/s∩-0.15m/s2<a<0.15m/s2idlingv<2m/s∩-0.15m/s2<a<0.15m/s2where a is acceleration and v is speed.


### 3.1. Reduction of the Dimensionality of Characteristic Parameters Based on PCA

PCA was proposed and applied by statisticians K. Pearson and H. Hotelling in 1901 [41, 42]. PCA is a multivariate statistical method that transforms a large number of correlated variables into a few uncorrelated principal components through orthogonal transformation and can maintain the original variable information as much as possible. Generally, we use characteristic parameters to describe the vehicle motion state. If all the characteristic parameters are used for classification, it will increase both the computational complexity and the difficulty of analysis [41, 42]. Although each parameter characterizes different motion information, the parameters are not independent, and some parameters can be expressed by a combination of several other parameters. Therefore, we use the PCA algorithm to reduce the dimensionality of the characteristic parameters [41, 42].According to the existing literature, eight characteristic parameters are selected: the maximum speed, minimum speed, average speed, standard deviation of speed, maximum acceleration, maximum deceleration, average acceleration, and standard deviation of acceleration [30, 33, 36].We assume that the sample size isn, the number of observed parameters is p, and the sample observation matrix is A=[aij]n×p.(2)An×p=a11a12⋯a1pa21a22⋯a2p⋮⋮⋮an1an2⋯anpwhere aij is the j-th characteristic parameter of the i-th kinematic segment.The principal component expressions obtained after orthogonal transformation using the PCA are as follows:(3)y1′=e1TX=e1-1x1+e1-2x2+⋯+e1-pxpy2′=e2TX=e2-1x1+e2-2x2+⋯+e2-pxp⋮yp′=epTX=ep-1x1+ep-2x2+⋯+ep-pxpwhere y1′,y2′,⋯,yp′ are independent of each other and called the first, second, ……,p-th principal components, respectively; e1,e2,⋯,ep are eigenvectors corresponding to eigenvalues arranged in descending order, namely, λ1≥λ2≥⋯≥λp≥0.The principal component variance contribution ratioP and cumulative variance contribution ratio CP are calculated as follows:(4)P=λi∑k=1pλk×100%,i=1,2,⋯,p(5)CP=∑k=1iλi∑k=1pλk×100%,i=1,2,⋯,pThe principal components corresponding to the eigenvalues whose cumulative variance contributions ratio are greater than 90% are selected to form the comprehensive evaluation index that encompasses 90% of the entire data information.The number of principal components with cumulative variance contribution ratio exceeding 90% is obtained, whereYi=eiTX,i=1,2,...,k(k≤p). Additionally, the principal component expression and the principal component score are calculated.The calculated principal component expression is shown in (6).(6)Y1Y2Y3Y4Y5Y6Y7Y8=0.5670.4990.5620.1580.2030.0740.1490.143-0.151-0.046-0.096-0.1960.4430.5990.579-0.193-0.007-0.341-0.1670.5740.395-0.1170.1490.579-0.2200.239-0.006-0.6500.139-0.140-0.0010.658-0.0060.043-0.0410.155-0.4840.734-0.2100.393-0.0170.0190.0000.054-0.589-0.2450.7590.114-0.2120.750-0.5350.3040.067-0.0560.000-0.074-0.7490.1060.6000.2560.019-0.007-0.020-0.036×X1X2X3X4X5X6X7X8where Y1, Y2,…, and Y8 are the first, second, …, and eighth principal components, respectively; X1, X2,…, and X8 represent maximum speed, minimum speed, average speed, standard deviation of speed, maximum acceleration, maximum deceleration, average acceleration, and standard deviation of acceleration, respectively.The PCA algorithm is used to reduce the dimensionality of the characteristic parameters. The principal component variance, variance contribution ratio, and the cumulative variance contribution ratio are shown in Table3. Notably, from the first principal component to the eighth principal component, as the principal component variance decreases, the amount of information contained in the principal component gradually decreases. The first principal component Y1 contains the most information, in this case, 36.15% of the original indicator information. The second principal component Y2 contains 32.94% of the original indicator information, and the third principal component Y3 contains 28.50% of the original indicator information. The cumulative contribution ratio of the first three principal components reaches 97.59%; therefore, they essentially encompass all the original indicator information. Thus, to simplify the problem and reduce the complexity of the analysis, the first three principal components are selected as the characteristic parameters for clustering analysis. The principal component score matrix is shown in Table 4. These scores are calculated for the first three principal components of 36388 kinematic segments. The component matrix is shown in Table 5, which displays the correlation coefficient between the principal component and the original characteristic parameter.Table 3
PCA results.
Number of principal component Principal component variance Variance contribution rate /% Cumulative variance contribution rate /% 1 2.892 36.15 36.15 2 2.635 32.94 69.09 3 2.280 28.50 97.59 4 0.182 2.27 99.86 5 0.005 0.06 99.92 6 0.004 0.05 99.97 7 9.9e-4 0.02 99.99 8 5.9e-4 0.01 100.00Table 4
Principal component score matrix.
Segmentnumber Principalcomponent 1 Principalcomponent 2 Principalcomponent 3 1 2.569 0.748 0.271 2 1.909 1.510 -0.645 3 1.998 0.898 -0.158 4 1.853 1.552 0.188 5 1.829 0.467 -0.316 ⋮ ⋮ ⋮ ⋮ 10000 -0.459 1.424 -0.054 10001 0.026 0.102 1.151 10002 0.306 -1.141 0.380 10003 0.217 0.946 0.817 10004 -0.644 1.510 -0.258 ⋮ ⋮ ⋮ ⋮ 36384 1.972 0.619 0.470 36385 0.865 1.777 -1.059 36386 1.472 0.200 0.742 36387 2.110 -1.821 -0.838 36388 2.670 0.368 0.373Table 5
Component matrix.
Characteristic parameters Principalcomponent 1 Principalcomponent 2 Principalcomponent 3 maximum speed 0.965 -0.245 -0.010 minimum speed 0.848 -0.074 -0.514 average speed 0.955 -0.155 -0.252 standard deviation of speed 0.268 -0.317 0.866 maximum acceleration 0.346 0.720 0.597 maximum deceleration 0.125 0.973 -0.177 average acceleration 0.254 0.939 0.225 standard deviation of acceleration 0.243 -0.313 0.874


### 3.2. Clustering Based on the k-Means and SVM Hybrid Algorithm

#### 3.2.1. Clustering Based on k-Means

The k-means algorithm has been widely used in cluster computing in the existing literature [3, 4, 19, 24, 43]. The k-means clustering algorithm uses the Euclidean distance between a sample and cluster center as a criterion for similarity determination, and it has the advantages of efficiency and simplicity [19, 43]. The Euclidean distance is calculated as shown in (7).(7)dij=∑k=1pxik-xjk2where P is the number of characteristic parameters and xik and xjk are the k-th characteristic parameters of the i-th sample and the j-th sample, respectively.The numberk of clusters in the k-means algorithm has an important influence on the clustering results, but generally, an accurate value ofk is initially unknown [44, 45]. If the number of clusters is greater than the true value, the algorithm wrongly divides the same class of data into multiple classes, which will cause the clustering result boundaries to be blurred [46]. Conversely, merging different classes of data into one class will result in a decrease in the compactness of the cluster [47]. Therefore, clustering stability is generally used to determine thek value [48]. The concept of the approach is that if repeated clustering is performed for the same sample data, then a suitablek value should produce the same clustering results. In other words, stability is viewed as an indication of whether thek value fits the data. We repeated the clustering stability simulation test and finally determined that the number of clusters was seven. The classification results of the k-means clustering algorithm are shown in Figure 5.Figure 5
k-means clustering result.The analysis of the k-means clustering effect shows that when the distances between the segment and other cluster centers are large enough, and the characteristic parameters of the segment are close to those of a certain class, the clustering effect is good. In contrast, when the distance between the segment and all cluster centers is similar and the characteristic parameters of the segment are significantly different from those of most of the segments in the class, the clustering effect is poor. There are two main reasons for these results. First, k-means is a hard clustering algorithm. When clustering involves multiple classes or the distance between cluster centers is small, the clustering effect is poor, and it is easy to reach local optima that cannot be incrementally clustered. Second, the convergence condition of the k-means clustering algorithm is iterated until the cluster center no longer changes. This approach may cause the data within the class to be very similar but does not fully consider the distance between classes; therefore, only local optima are guaranteed, and the global optimization is not achieved.


#### 3.2.2. Clustering Based on the k-Means and SVM Hybrid Algorithm

The SVM method was first proposed by Cortes and Vapnik in 1995 and has significant advantages in solving nonlinear and high-dimensional pattern recognition problems [49, 50]. The SVM method is based on the Vapnik-Chervonenkis dimensional statistical learning theory and is an approximate implementation of minimizing structural risk. The basic principle of SVM is to establish an optimal classification hyperplane that can not only separate samples without errors, but also maximize the classification interval [50]. A schematic diagram of the optimal hyperplane is shown in Figure 6. SVM has been widely used for classification identification due to its many advantages, such as a high level of robustness and strong generalization ability.Figure 6
Schematic diagram of the optimal hyperplane.We assume that the size of the sample set isl and that the sample set consists of two classes: S=xi,yi,i=1,2,⋯,l,xi∈Rd,yi∈+1,-1. If xi belongs to the first class, yi=1; otherwise, yi=-1. If the sample can be correctly divided into two classes using a classification hyperplane, then the sample is linearly separable and satisfies (8).(8)wxi+b≥1,yi=1wxi+b≤-1,yi=-1,i=1,2,⋯,lwhere xi is the sample data, yi is a decision attribute, w is the normal vector of the hyperplane, and b is the offset of the classification straight line.If the interval from the sample point to the classification hyperplane isε=wxi+b=1, the distance between two types of samples is 2/w. To select an optimal classification hyperplane from a large number of classification hyperplanes and separate the samples of different classes as much as possible, the distance from the sample set to the classification hyperplane is maximized. Therefore, the optimization goal is to find the optimal classification hyperplane under the constraint of (9).(9)minw22s.t.yiwxi+b≥1,i=1,2,⋯,lThe above problem can be transformed into a dual problem according to the Lagrange theory and then solved with a quadratic programming method. In the linear inseparability problem, the nonlinear mapping ofΦ:Rd→H is used to map the original input space samples to the feature space H. Then, the optimal classification hyperplane is constructed in the high-dimensional feature space H. The dual problem after mapping to the high-dimensional feature space becomes (10).(10)
m
a
x
Q
a
=
∑
i
=
1
l
a
i
-
1
2
∑
i
=
1
l
∑
j
=
1
l
a
i
a
j
y
i
y
j
K
x
i
,
x
j
s
.
t
.
∑
i
=
1
l
a
i
y
i
=
0
0
≤
a
i
≤
C
,
i
=
1,2
,
⋯
,
lwhere ai>0,i=1,2,⋯,l is the Lagrange coefficient and Kxi,xj is the kernel function that satisfies the Mercer condition. C is a penalty factor used to control penalty degree for misclassified samples.Assuming thata∗=a1∗,a2∗,⋯,al∗T is the solution of (10), then the final optimal classification function can be obtained as shown in (11).(11)fx=sgn⁡∑i=1lai∗yiKxi,x+b∗This paper builds a multiclassification model based on SVM to classify the driving segments. The specific classification processes include training set screening, kernel function parameter optimization, classification prediction, and clustering result evaluation.The first step is training set screening. Because a SVM is a supervised learning algorithm, selecting an appropriate training set before classification is extremely important. To improve the classification accuracy and efficiency, the optimal segments were selected from the k-means clustering results as the SVM training set, and the remaining segments were used as the testing set. The selection principles of the optimal segments are as follows. We selected an appropriate number of training sets to avoid under-learning and over-learning issues. Moreover, we selected representative segments from the k-means clustering results, and these segments were as close to a cluster center as possible and as far from the other cluster centers as possible. According to the above principles, 2353 representative segments were selected as the training set of the SVM, and the remaining segments were used as the testing set. Additionally, all segments were normalized to eliminate the influence of the dimensions on the classification results.The second step is kernel function parameter optimization. Kernel functions can map the sample data in the original low-dimensional space to a high-dimensional feature space and transform them into linearly separable data. Meanwhile, the optimal classification hyperplane in the high-dimensional space can be obtained. Because the radial basis kernel function (RBF) can precisely express the features of the training set, accurately reflect the structure feature of the high-dimensional space, effectively control the dimension of the model solution set, and obtain the global optimal solution, this paper uses a RBF as the basic kernel function of the SVM.(12)Kx,xi=exp⁡-gammaxi-x2where x-xi is the two-norm distance, xi is the support vector, x is the predicted sample, and gamma is the kernel function parameter g.Based onK-fold cross validation method, this paper adopts a grid search algorithm to obtain the optimal parameters c and g. The optimization results are shown in Figure 7. Whenc=0.25 and g=4.0, classification recognition accuracy reaches a maximum of 100%.Figure 7
Optimization results.The third step in the proposed method involves classification prediction and clustering result evaluation. The SVM model was trained using the optimal parameters. The clustering results of driving segments using the k-means and SVM hybrid model are shown in Figure8.Figure 8
k-means and SVM hybrid model clustering results.To evaluate the clustering results, this paper introduces two indicators: compactness and separation [47, 51].Compactness (CP) is an internal cluster evaluation criterion that uses the norm distance between all data sets in each cluster and the cluster center to evaluate the compactness of the cluster. A smallCP value indicates that the data within the cluster are similar or close to one another.(13)CPi¯=1Ωi∑xi∈Ωixi-wiwhere Ωi is the ith cluster, wi is the cluster center in Ωi, xi represents the data in Ωi, and Ωi represents the quantity of data in Ωi. As a global measure of compactness, the average of all clusters is calculated as follows.(14)CP=1K∑k=1KCPk¯where K is the number of clusters.Separation (SP) is an external evaluation criterion between clusters that uses the average Euclidean distance between each two cluster centers to evaluate the degree of separation of the clusters. A highSP value indicates that the distance between clusters is large.(15)SP=2K2-K∑i=1K∑j=i+1Kwi-wj2Table6 gives the calculation results forCP andSP. A comparison of the values indicates that the k-means and SVM hybrid clustering results have smallCP and largeSP values; therefore, the clustering results with the k-means and SVM hybrid model are significantly better than those of the k-means alone.Table 6
The calculation results ofCP and SP.
Calculation results k-means k-means and SVM CP 1.393 1.317 SP 4.954 5.242The categorized driving segment characteristics are shown in Table7 and include low constant speed driving segments, medium constant speed driving segments, high constant speed driving segments, weak acceleration driving segments, strong acceleration driving segments, weak deceleration driving segments, and strong deceleration driving segments.Table 7
Driving segment characteristics.
Category number The number of segments Average speed Average acceleration Definition 1 10914 5.47 -0.008 low constant speed driving segments 2 9238 22.62 -0.006 medium constant speed driving segments 3 6503 40.54 0.007 high constant speed driving segments 4 3729 18.75 0.463 weak acceleration driving segments 5 1341 24.41 0.840 strong acceleration driving segments 6 3573 18.00 -0.489 weak deceleration driving segments 7 1090 21.38 -0.946 strong deceleration driving segments


## 3.1. Reduction of the Dimensionality of Characteristic Parameters Based on PCA

PCA was proposed and applied by statisticians K. Pearson and H. Hotelling in 1901 [41, 42]. PCA is a multivariate statistical method that transforms a large number of correlated variables into a few uncorrelated principal components through orthogonal transformation and can maintain the original variable information as much as possible. Generally, we use characteristic parameters to describe the vehicle motion state. If all the characteristic parameters are used for classification, it will increase both the computational complexity and the difficulty of analysis [41, 42]. Although each parameter characterizes different motion information, the parameters are not independent, and some parameters can be expressed by a combination of several other parameters. Therefore, we use the PCA algorithm to reduce the dimensionality of the characteristic parameters [41, 42].According to the existing literature, eight characteristic parameters are selected: the maximum speed, minimum speed, average speed, standard deviation of speed, maximum acceleration, maximum deceleration, average acceleration, and standard deviation of acceleration [30, 33, 36].We assume that the sample size isn, the number of observed parameters is p, and the sample observation matrix is A=[aij]n×p.(2)An×p=a11a12⋯a1pa21a22⋯a2p⋮⋮⋮an1an2⋯anpwhere aij is the j-th characteristic parameter of the i-th kinematic segment.The principal component expressions obtained after orthogonal transformation using the PCA are as follows:(3)y1′=e1TX=e1-1x1+e1-2x2+⋯+e1-pxpy2′=e2TX=e2-1x1+e2-2x2+⋯+e2-pxp⋮yp′=epTX=ep-1x1+ep-2x2+⋯+ep-pxpwhere y1′,y2′,⋯,yp′ are independent of each other and called the first, second, ……,p-th principal components, respectively; e1,e2,⋯,ep are eigenvectors corresponding to eigenvalues arranged in descending order, namely, λ1≥λ2≥⋯≥λp≥0.The principal component variance contribution ratioP and cumulative variance contribution ratio CP are calculated as follows:(4)P=λi∑k=1pλk×100%,i=1,2,⋯,p(5)CP=∑k=1iλi∑k=1pλk×100%,i=1,2,⋯,pThe principal components corresponding to the eigenvalues whose cumulative variance contributions ratio are greater than 90% are selected to form the comprehensive evaluation index that encompasses 90% of the entire data information.The number of principal components with cumulative variance contribution ratio exceeding 90% is obtained, whereYi=eiTX,i=1,2,...,k(k≤p). Additionally, the principal component expression and the principal component score are calculated.The calculated principal component expression is shown in (6).(6)Y1Y2Y3Y4Y5Y6Y7Y8=0.5670.4990.5620.1580.2030.0740.1490.143-0.151-0.046-0.096-0.1960.4430.5990.579-0.193-0.007-0.341-0.1670.5740.395-0.1170.1490.579-0.2200.239-0.006-0.6500.139-0.140-0.0010.658-0.0060.043-0.0410.155-0.4840.734-0.2100.393-0.0170.0190.0000.054-0.589-0.2450.7590.114-0.2120.750-0.5350.3040.067-0.0560.000-0.074-0.7490.1060.6000.2560.019-0.007-0.020-0.036×X1X2X3X4X5X6X7X8where Y1, Y2,…, and Y8 are the first, second, …, and eighth principal components, respectively; X1, X2,…, and X8 represent maximum speed, minimum speed, average speed, standard deviation of speed, maximum acceleration, maximum deceleration, average acceleration, and standard deviation of acceleration, respectively.The PCA algorithm is used to reduce the dimensionality of the characteristic parameters. The principal component variance, variance contribution ratio, and the cumulative variance contribution ratio are shown in Table3. Notably, from the first principal component to the eighth principal component, as the principal component variance decreases, the amount of information contained in the principal component gradually decreases. The first principal component Y1 contains the most information, in this case, 36.15% of the original indicator information. The second principal component Y2 contains 32.94% of the original indicator information, and the third principal component Y3 contains 28.50% of the original indicator information. The cumulative contribution ratio of the first three principal components reaches 97.59%; therefore, they essentially encompass all the original indicator information. Thus, to simplify the problem and reduce the complexity of the analysis, the first three principal components are selected as the characteristic parameters for clustering analysis. The principal component score matrix is shown in Table 4. These scores are calculated for the first three principal components of 36388 kinematic segments. The component matrix is shown in Table 5, which displays the correlation coefficient between the principal component and the original characteristic parameter.Table 3
PCA results.
Number of principal component Principal component variance Variance contribution rate /% Cumulative variance contribution rate /% 1 2.892 36.15 36.15 2 2.635 32.94 69.09 3 2.280 28.50 97.59 4 0.182 2.27 99.86 5 0.005 0.06 99.92 6 0.004 0.05 99.97 7 9.9e-4 0.02 99.99 8 5.9e-4 0.01 100.00Table 4
Principal component score matrix.
Segmentnumber Principalcomponent 1 Principalcomponent 2 Principalcomponent 3 1 2.569 0.748 0.271 2 1.909 1.510 -0.645 3 1.998 0.898 -0.158 4 1.853 1.552 0.188 5 1.829 0.467 -0.316 ⋮ ⋮ ⋮ ⋮ 10000 -0.459 1.424 -0.054 10001 0.026 0.102 1.151 10002 0.306 -1.141 0.380 10003 0.217 0.946 0.817 10004 -0.644 1.510 -0.258 ⋮ ⋮ ⋮ ⋮ 36384 1.972 0.619 0.470 36385 0.865 1.777 -1.059 36386 1.472 0.200 0.742 36387 2.110 -1.821 -0.838 36388 2.670 0.368 0.373Table 5
Component matrix.
Characteristic parameters Principalcomponent 1 Principalcomponent 2 Principalcomponent 3 maximum speed 0.965 -0.245 -0.010 minimum speed 0.848 -0.074 -0.514 average speed 0.955 -0.155 -0.252 standard deviation of speed 0.268 -0.317 0.866 maximum acceleration 0.346 0.720 0.597 maximum deceleration 0.125 0.973 -0.177 average acceleration 0.254 0.939 0.225 standard deviation of acceleration 0.243 -0.313 0.874


## 3.2. Clustering Based on the k-Means and SVM Hybrid Algorithm

### 3.2.1. Clustering Based on k-Means

The k-means algorithm has been widely used in cluster computing in the existing literature [3, 4, 19, 24, 43]. The k-means clustering algorithm uses the Euclidean distance between a sample and cluster center as a criterion for similarity determination, and it has the advantages of efficiency and simplicity [19, 43]. The Euclidean distance is calculated as shown in (7).(7)dij=∑k=1pxik-xjk2where P is the number of characteristic parameters and xik and xjk are the k-th characteristic parameters of the i-th sample and the j-th sample, respectively.The numberk of clusters in the k-means algorithm has an important influence on the clustering results, but generally, an accurate value ofk is initially unknown [44, 45]. If the number of clusters is greater than the true value, the algorithm wrongly divides the same class of data into multiple classes, which will cause the clustering result boundaries to be blurred [46]. Conversely, merging different classes of data into one class will result in a decrease in the compactness of the cluster [47]. Therefore, clustering stability is generally used to determine thek value [48]. The concept of the approach is that if repeated clustering is performed for the same sample data, then a suitablek value should produce the same clustering results. In other words, stability is viewed as an indication of whether thek value fits the data. We repeated the clustering stability simulation test and finally determined that the number of clusters was seven. The classification results of the k-means clustering algorithm are shown in Figure 5.Figure 5
k-means clustering result.The analysis of the k-means clustering effect shows that when the distances between the segment and other cluster centers are large enough, and the characteristic parameters of the segment are close to those of a certain class, the clustering effect is good. In contrast, when the distance between the segment and all cluster centers is similar and the characteristic parameters of the segment are significantly different from those of most of the segments in the class, the clustering effect is poor. There are two main reasons for these results. First, k-means is a hard clustering algorithm. When clustering involves multiple classes or the distance between cluster centers is small, the clustering effect is poor, and it is easy to reach local optima that cannot be incrementally clustered. Second, the convergence condition of the k-means clustering algorithm is iterated until the cluster center no longer changes. This approach may cause the data within the class to be very similar but does not fully consider the distance between classes; therefore, only local optima are guaranteed, and the global optimization is not achieved.


### 3.2.2. Clustering Based on the k-Means and SVM Hybrid Algorithm

The SVM method was first proposed by Cortes and Vapnik in 1995 and has significant advantages in solving nonlinear and high-dimensional pattern recognition problems [49, 50]. The SVM method is based on the Vapnik-Chervonenkis dimensional statistical learning theory and is an approximate implementation of minimizing structural risk. The basic principle of SVM is to establish an optimal classification hyperplane that can not only separate samples without errors, but also maximize the classification interval [50]. A schematic diagram of the optimal hyperplane is shown in Figure 6. SVM has been widely used for classification identification due to its many advantages, such as a high level of robustness and strong generalization ability.Figure 6
Schematic diagram of the optimal hyperplane.We assume that the size of the sample set isl and that the sample set consists of two classes: S=xi,yi,i=1,2,⋯,l,xi∈Rd,yi∈+1,-1. If xi belongs to the first class, yi=1; otherwise, yi=-1. If the sample can be correctly divided into two classes using a classification hyperplane, then the sample is linearly separable and satisfies (8).(8)wxi+b≥1,yi=1wxi+b≤-1,yi=-1,i=1,2,⋯,lwhere xi is the sample data, yi is a decision attribute, w is the normal vector of the hyperplane, and b is the offset of the classification straight line.If the interval from the sample point to the classification hyperplane isε=wxi+b=1, the distance between two types of samples is 2/w. To select an optimal classification hyperplane from a large number of classification hyperplanes and separate the samples of different classes as much as possible, the distance from the sample set to the classification hyperplane is maximized. Therefore, the optimization goal is to find the optimal classification hyperplane under the constraint of (9).(9)minw22s.t.yiwxi+b≥1,i=1,2,⋯,lThe above problem can be transformed into a dual problem according to the Lagrange theory and then solved with a quadratic programming method. In the linear inseparability problem, the nonlinear mapping ofΦ:Rd→H is used to map the original input space samples to the feature space H. Then, the optimal classification hyperplane is constructed in the high-dimensional feature space H. The dual problem after mapping to the high-dimensional feature space becomes (10).(10)
m
a
x
Q
a
=
∑
i
=
1
l
a
i
-
1
2
∑
i
=
1
l
∑
j
=
1
l
a
i
a
j
y
i
y
j
K
x
i
,
x
j
s
.
t
.
∑
i
=
1
l
a
i
y
i
=
0
0
≤
a
i
≤
C
,
i
=
1,2
,
⋯
,
lwhere ai>0,i=1,2,⋯,l is the Lagrange coefficient and Kxi,xj is the kernel function that satisfies the Mercer condition. C is a penalty factor used to control penalty degree for misclassified samples.Assuming thata∗=a1∗,a2∗,⋯,al∗T is the solution of (10), then the final optimal classification function can be obtained as shown in (11).(11)fx=sgn⁡∑i=1lai∗yiKxi,x+b∗This paper builds a multiclassification model based on SVM to classify the driving segments. The specific classification processes include training set screening, kernel function parameter optimization, classification prediction, and clustering result evaluation.The first step is training set screening. Because a SVM is a supervised learning algorithm, selecting an appropriate training set before classification is extremely important. To improve the classification accuracy and efficiency, the optimal segments were selected from the k-means clustering results as the SVM training set, and the remaining segments were used as the testing set. The selection principles of the optimal segments are as follows. We selected an appropriate number of training sets to avoid under-learning and over-learning issues. Moreover, we selected representative segments from the k-means clustering results, and these segments were as close to a cluster center as possible and as far from the other cluster centers as possible. According to the above principles, 2353 representative segments were selected as the training set of the SVM, and the remaining segments were used as the testing set. Additionally, all segments were normalized to eliminate the influence of the dimensions on the classification results.The second step is kernel function parameter optimization. Kernel functions can map the sample data in the original low-dimensional space to a high-dimensional feature space and transform them into linearly separable data. Meanwhile, the optimal classification hyperplane in the high-dimensional space can be obtained. Because the radial basis kernel function (RBF) can precisely express the features of the training set, accurately reflect the structure feature of the high-dimensional space, effectively control the dimension of the model solution set, and obtain the global optimal solution, this paper uses a RBF as the basic kernel function of the SVM.(12)Kx,xi=exp⁡-gammaxi-x2where x-xi is the two-norm distance, xi is the support vector, x is the predicted sample, and gamma is the kernel function parameter g.Based onK-fold cross validation method, this paper adopts a grid search algorithm to obtain the optimal parameters c and g. The optimization results are shown in Figure 7. Whenc=0.25 and g=4.0, classification recognition accuracy reaches a maximum of 100%.Figure 7
Optimization results.The third step in the proposed method involves classification prediction and clustering result evaluation. The SVM model was trained using the optimal parameters. The clustering results of driving segments using the k-means and SVM hybrid model are shown in Figure8.Figure 8
k-means and SVM hybrid model clustering results.To evaluate the clustering results, this paper introduces two indicators: compactness and separation [47, 51].Compactness (CP) is an internal cluster evaluation criterion that uses the norm distance between all data sets in each cluster and the cluster center to evaluate the compactness of the cluster. A smallCP value indicates that the data within the cluster are similar or close to one another.(13)CPi¯=1Ωi∑xi∈Ωixi-wiwhere Ωi is the ith cluster, wi is the cluster center in Ωi, xi represents the data in Ωi, and Ωi represents the quantity of data in Ωi. As a global measure of compactness, the average of all clusters is calculated as follows.(14)CP=1K∑k=1KCPk¯where K is the number of clusters.Separation (SP) is an external evaluation criterion between clusters that uses the average Euclidean distance between each two cluster centers to evaluate the degree of separation of the clusters. A highSP value indicates that the distance between clusters is large.(15)SP=2K2-K∑i=1K∑j=i+1Kwi-wj2Table6 gives the calculation results forCP andSP. A comparison of the values indicates that the k-means and SVM hybrid clustering results have smallCP and largeSP values; therefore, the clustering results with the k-means and SVM hybrid model are significantly better than those of the k-means alone.Table 6
The calculation results ofCP and SP.
Calculation results k-means k-means and SVM CP 1.393 1.317 SP 4.954 5.242The categorized driving segment characteristics are shown in Table7 and include low constant speed driving segments, medium constant speed driving segments, high constant speed driving segments, weak acceleration driving segments, strong acceleration driving segments, weak deceleration driving segments, and strong deceleration driving segments.Table 7
Driving segment characteristics.
Category number The number of segments Average speed Average acceleration Definition 1 10914 5.47 -0.008 low constant speed driving segments 2 9238 22.62 -0.006 medium constant speed driving segments 3 6503 40.54 0.007 high constant speed driving segments 4 3729 18.75 0.463 weak acceleration driving segments 5 1341 24.41 0.840 strong acceleration driving segments 6 3573 18.00 -0.489 weak deceleration driving segments 7 1090 21.38 -0.946 strong deceleration driving segments


## 3.2.1. Clustering Based on k-Means

The k-means algorithm has been widely used in cluster computing in the existing literature [3, 4, 19, 24, 43]. The k-means clustering algorithm uses the Euclidean distance between a sample and cluster center as a criterion for similarity determination, and it has the advantages of efficiency and simplicity [19, 43]. The Euclidean distance is calculated as shown in (7).(7)dij=∑k=1pxik-xjk2where P is the number of characteristic parameters and xik and xjk are the k-th characteristic parameters of the i-th sample and the j-th sample, respectively.The numberk of clusters in the k-means algorithm has an important influence on the clustering results, but generally, an accurate value ofk is initially unknown [44, 45]. If the number of clusters is greater than the true value, the algorithm wrongly divides the same class of data into multiple classes, which will cause the clustering result boundaries to be blurred [46]. Conversely, merging different classes of data into one class will result in a decrease in the compactness of the cluster [47]. Therefore, clustering stability is generally used to determine thek value [48]. The concept of the approach is that if repeated clustering is performed for the same sample data, then a suitablek value should produce the same clustering results. In other words, stability is viewed as an indication of whether thek value fits the data. We repeated the clustering stability simulation test and finally determined that the number of clusters was seven. The classification results of the k-means clustering algorithm are shown in Figure 5.Figure 5
k-means clustering result.The analysis of the k-means clustering effect shows that when the distances between the segment and other cluster centers are large enough, and the characteristic parameters of the segment are close to those of a certain class, the clustering effect is good. In contrast, when the distance between the segment and all cluster centers is similar and the characteristic parameters of the segment are significantly different from those of most of the segments in the class, the clustering effect is poor. There are two main reasons for these results. First, k-means is a hard clustering algorithm. When clustering involves multiple classes or the distance between cluster centers is small, the clustering effect is poor, and it is easy to reach local optima that cannot be incrementally clustered. Second, the convergence condition of the k-means clustering algorithm is iterated until the cluster center no longer changes. This approach may cause the data within the class to be very similar but does not fully consider the distance between classes; therefore, only local optima are guaranteed, and the global optimization is not achieved.


## 3.2.2. Clustering Based on the k-Means and SVM Hybrid Algorithm

The SVM method was first proposed by Cortes and Vapnik in 1995 and has significant advantages in solving nonlinear and high-dimensional pattern recognition problems [49, 50]. The SVM method is based on the Vapnik-Chervonenkis dimensional statistical learning theory and is an approximate implementation of minimizing structural risk. The basic principle of SVM is to establish an optimal classification hyperplane that can not only separate samples without errors, but also maximize the classification interval [50]. A schematic diagram of the optimal hyperplane is shown in Figure 6. SVM has been widely used for classification identification due to its many advantages, such as a high level of robustness and strong generalization ability.Figure 6
Schematic diagram of the optimal hyperplane.We assume that the size of the sample set isl and that the sample set consists of two classes: S=xi,yi,i=1,2,⋯,l,xi∈Rd,yi∈+1,-1. If xi belongs to the first class, yi=1; otherwise, yi=-1. If the sample can be correctly divided into two classes using a classification hyperplane, then the sample is linearly separable and satisfies (8).(8)wxi+b≥1,yi=1wxi+b≤-1,yi=-1,i=1,2,⋯,lwhere xi is the sample data, yi is a decision attribute, w is the normal vector of the hyperplane, and b is the offset of the classification straight line.If the interval from the sample point to the classification hyperplane isε=wxi+b=1, the distance between two types of samples is 2/w. To select an optimal classification hyperplane from a large number of classification hyperplanes and separate the samples of different classes as much as possible, the distance from the sample set to the classification hyperplane is maximized. Therefore, the optimization goal is to find the optimal classification hyperplane under the constraint of (9).(9)minw22s.t.yiwxi+b≥1,i=1,2,⋯,lThe above problem can be transformed into a dual problem according to the Lagrange theory and then solved with a quadratic programming method. In the linear inseparability problem, the nonlinear mapping ofΦ:Rd→H is used to map the original input space samples to the feature space H. Then, the optimal classification hyperplane is constructed in the high-dimensional feature space H. The dual problem after mapping to the high-dimensional feature space becomes (10).(10)
m
a
x
Q
a
=
∑
i
=
1
l
a
i
-
1
2
∑
i
=
1
l
∑
j
=
1
l
a
i
a
j
y
i
y
j
K
x
i
,
x
j
s
.
t
.
∑
i
=
1
l
a
i
y
i
=
0
0
≤
a
i
≤
C
,
i
=
1,2
,
⋯
,
lwhere ai>0,i=1,2,⋯,l is the Lagrange coefficient and Kxi,xj is the kernel function that satisfies the Mercer condition. C is a penalty factor used to control penalty degree for misclassified samples.Assuming thata∗=a1∗,a2∗,⋯,al∗T is the solution of (10), then the final optimal classification function can be obtained as shown in (11).(11)fx=sgn⁡∑i=1lai∗yiKxi,x+b∗This paper builds a multiclassification model based on SVM to classify the driving segments. The specific classification processes include training set screening, kernel function parameter optimization, classification prediction, and clustering result evaluation.The first step is training set screening. Because a SVM is a supervised learning algorithm, selecting an appropriate training set before classification is extremely important. To improve the classification accuracy and efficiency, the optimal segments were selected from the k-means clustering results as the SVM training set, and the remaining segments were used as the testing set. The selection principles of the optimal segments are as follows. We selected an appropriate number of training sets to avoid under-learning and over-learning issues. Moreover, we selected representative segments from the k-means clustering results, and these segments were as close to a cluster center as possible and as far from the other cluster centers as possible. According to the above principles, 2353 representative segments were selected as the training set of the SVM, and the remaining segments were used as the testing set. Additionally, all segments were normalized to eliminate the influence of the dimensions on the classification results.The second step is kernel function parameter optimization. Kernel functions can map the sample data in the original low-dimensional space to a high-dimensional feature space and transform them into linearly separable data. Meanwhile, the optimal classification hyperplane in the high-dimensional space can be obtained. Because the radial basis kernel function (RBF) can precisely express the features of the training set, accurately reflect the structure feature of the high-dimensional space, effectively control the dimension of the model solution set, and obtain the global optimal solution, this paper uses a RBF as the basic kernel function of the SVM.(12)Kx,xi=exp⁡-gammaxi-x2where x-xi is the two-norm distance, xi is the support vector, x is the predicted sample, and gamma is the kernel function parameter g.Based onK-fold cross validation method, this paper adopts a grid search algorithm to obtain the optimal parameters c and g. The optimization results are shown in Figure 7. Whenc=0.25 and g=4.0, classification recognition accuracy reaches a maximum of 100%.Figure 7
Optimization results.The third step in the proposed method involves classification prediction and clustering result evaluation. The SVM model was trained using the optimal parameters. The clustering results of driving segments using the k-means and SVM hybrid model are shown in Figure8.Figure 8
k-means and SVM hybrid model clustering results.To evaluate the clustering results, this paper introduces two indicators: compactness and separation [47, 51].Compactness (CP) is an internal cluster evaluation criterion that uses the norm distance between all data sets in each cluster and the cluster center to evaluate the compactness of the cluster. A smallCP value indicates that the data within the cluster are similar or close to one another.(13)CPi¯=1Ωi∑xi∈Ωixi-wiwhere Ωi is the ith cluster, wi is the cluster center in Ωi, xi represents the data in Ωi, and Ωi represents the quantity of data in Ωi. As a global measure of compactness, the average of all clusters is calculated as follows.(14)CP=1K∑k=1KCPk¯where K is the number of clusters.Separation (SP) is an external evaluation criterion between clusters that uses the average Euclidean distance between each two cluster centers to evaluate the degree of separation of the clusters. A highSP value indicates that the distance between clusters is large.(15)SP=2K2-K∑i=1K∑j=i+1Kwi-wj2Table6 gives the calculation results forCP andSP. A comparison of the values indicates that the k-means and SVM hybrid clustering results have smallCP and largeSP values; therefore, the clustering results with the k-means and SVM hybrid model are significantly better than those of the k-means alone.Table 6
The calculation results ofCP and SP.
Calculation results k-means k-means and SVM CP 1.393 1.317 SP 4.954 5.242The categorized driving segment characteristics are shown in Table7 and include low constant speed driving segments, medium constant speed driving segments, high constant speed driving segments, weak acceleration driving segments, strong acceleration driving segments, weak deceleration driving segments, and strong deceleration driving segments.Table 7
Driving segment characteristics.
Category number The number of segments Average speed Average acceleration Definition 1 10914 5.47 -0.008 low constant speed driving segments 2 9238 22.62 -0.006 medium constant speed driving segments 3 6503 40.54 0.007 high constant speed driving segments 4 3729 18.75 0.463 weak acceleration driving segments 5 1341 24.41 0.840 strong acceleration driving segments 6 3573 18.00 -0.489 weak deceleration driving segments 7 1090 21.38 -0.946 strong deceleration driving segments


## 4. Driving Cycle Construction

The driving cycle is constructed by connecting the most representative driving segments according to predetermined rules until the driving cycle duration is reached. Generally, the duration of the general international standard driving cycles and real-world representative driving cycles is between 600 s and 1800 s. Therefore, according to the Hong Kong, Colombo, and Sydney driving cycles, the duration of the Xi’an EV urban driving cycle in this paper is set to 1200 s [17, 33, 36, 43]. Then, the duration of each driving segment class in the constructed Xi’an EV urban driving cycle is determined based on experimental data. First, this paper calculates the cumulative time of the seven driving segment classes in the collected experimental data and determines the time proportions of the seven driving segment classes. As shown in Table 8, the time proportions of the seven driving segment classes are 30.53%, 13.98%, 12.51%, 14.28%, 7.84%, 14.72%, and 6.14%, respectively. Then, according to the time proportions of the seven driving segment classes in the experimental data, the time length of the seven driving segment classes in the constructed Xi’an representative EV urban driving cycle is determined. Their time lengths are 366 s, 168 s, 150 s, 171 s, 94 s, 177 s, and 74 s. In the process of constructing the driving cycle, we first randomly select a driving segment of no more than 5 s as the initial segment. Then, according to the following principles, the most representative driving segments are selected. The selection principle of representative driving segments is as follows: (1) the selected driving segment should be as close as possible to the cluster center; (2) the difference between the final speed of the previous driving segment and the initial speed of the current driving segment is less than 1km/h; (3) the selection of the driving segment is without replacement. Finally, the selected current driving segment is linked to the previous driving segment until the time length of each driving segment class is reached. This approach yields a constructed candidate driving cycle.Table 8
Time proportion and length of seven driving segments.
Driving segments Time proportion (%) Time length (s) 1 30.53 366 2 13.98 168 3 12.51 150 4 14.28 171 5 7.84 94 6 14.72 177 7 6.14 74According to the test data and classification results, the time proportion and length of the seven driving segments are shown in Table8.Considering the randomness in the construction process of the driving cycle, one construction result is difficult to fully represent the Xi’an EV urban driving cycle. Therefore, the construction process is repeated to generate a large number of candidate driving cycles. Moreover, the scientific assessment criteria are set, and the most representative driving cycle is selected from candidate driving cycles to form the Xi’an EV urban driving cycle.The assessment criteria flow diagram is shown in Figure9. First, the average speed, maximum speed, average acceleration, average deceleration, standard deviation of acceleration, proportion of acceleration, proportion of deceleration, proportion of uniform speed, and proportion of idling are selected as assessment parameters [17, 37]. Then, we calculate the relative error (RE) of the assessment parameters of the candidate driving cycles and the overall test data and select the driving cycles for which the RE of all the assessment parameters is less than 10%. Finally, the mean relative error (MRE) is calculated, and the candidate driving cycle with the minimum MRE is selected. If there is more than one candidate driving cycle with the same minimum MRE, the root mean square error (RMSE) of the speed-acceleration probability distribution (SAPD) is calculated. The driving cycle with the minimum RMSE is then selected as the most representative Xi’an EV urban driving cycle.(16)RE=αc-αtαt×100%where αc and αt are the assessment parameters of the candidate driving cycles and test data, respectively.(17)MRE=1n∑i=1nαc-αtαtwhere n is the number of all assessment parameters.(18)RMSE=1M×N∑j=1M∑i=1Nxij-yij2where N and M are the numbers of speed bins and acceleration bins, respectively, and xij and yij are the frequency values of the ijth bin of the candidate driving cycle and the test data, respectively.Figure 9
Assessment criteria flow diagram.The construction of Xi’an EV urban driving cycle is shown in Figure10. The SAPDs of Xi’an EV urban driving cycle and test data are shown in Figures 11 and 12, respectively. A comparison of the Xi’an EV urban driving cycle and test data is shown in Table 9. According to the comparison results, the REs of all assessment parameters are less than 8.81%, the MRE is 4.03%, and the RMSE of the SAPD is 1.32%. The small MRE and RMSE values indicate that the constructed Xi’an EV urban driving cycle is very close to that based on experimental data from the real-world driving cycle. Therefore, the Xi’an EV urban driving cycle constructed in this paper can effectively represent the speed-time driving pattern of the real-world cycle in Xi’an.Table 9
Comparison of the Xi’an EV urban driving cycle and test data.
Characteristic parameters Test data Driving cycle RE MRE RMSE Average speed (km/h) 20.01 20.74 3.65% 4.03% 1.32% Maximum speed (km/h) 68.22 63.86 6.39% Average acceleration (m/s2) 0.76 0.78 2.63% Average deceleration (m/s2) 0.78 0.77 1.28% Standard deviation of acceleration (m/s2) 0.84 0.79 5.95% Proportion of acceleration(%) 34.5 32.9 4.64% Proportion of deceleration(%) 32.1 31.9 0.62% Proportion of uniform speed(%) 15.9 17.3 8.81% Proportion of idling(%) 17.5 17.9 2.29% Note: RE is the relative error of the assessment parameters of the candidate driving cycles and the overall test data; MRE is the mean relative error of all assessment parameters; and RMSE is the root mean square error of the SAPD.Figure 10
Xi’an EV urban driving cycle.Figure 11
SAPD of the Xi’an EV urban driving cycle.Figure 12
SAPD of the test data.


## 5. Comparison of Driving Cycles

### 5.1. Comparison of the Xi’an and International Standard Driving Cycles

To study the differences between the Xi’an EV urban driving cycle constructed in this paper and the international standard driving cycles, eight characteristic parameters of seven general international standard driving cycles are compared as shown in Figure13 and Table 10. The seven general international standard driving cycles are the European Economic Commission 15-mode test cycle (ECE 15), New European Driving Cycle (NEDC), Japanese Industrial Standards Committee 08 test cycle (JC08), Japan 10/15 mode test cycle (J10/15), Federal Test Procedures 72 and 75 (FTP72, FTP75), and Worldwide harmonized light duty test cycle (WLTC) [52], respectively. The comparison of results shows that the Xi’an EV urban driving cycle has greater average acceleration and deceleration values, larger proportions of acceleration and deceleration, and smaller proportions of uniform speed and idling compared to the other driving cycles. Therefore, compared with various general international standard driving cycles, the Xi’an EV urban driving cycle is characterized by more aggressive driving features.Table 10
Comparison of results for the Xi’an and international standard driving cycles.
Driving cycle Xi’an ECE15 NEDC JC08 J10/15 FTP-72 FTP-75 WLTC Vehicle type EV ICEV ICEV ICEV ICEV ICEV ICEV ICEV Road type Urban Urban Composite Composite Urban Urban Urban Composite Average speed(km/h) 20.74 18.4 33.6 24.4 17.7 31.5 34.1 46.5 Maximum speed(km/h) 63.86 50.0 120 82.0 70.0 91.3 91.3 131.3 Average acceleration(m/s2) 0.78 0.64 0.51 0.42 0.63 0.59 0.60 0.42 Average deceleration(m/s2) 0.77 0.75 0.71 0.44 0.62 0.69 0.70 0.44 Proportion of acceleration(%) 32.9 21.5 23.8 27.8 25.9 32.8 32.4 29.4 Proportion of deceleration(%) 31.9 18.5 17.6 25.9 26.4 28.3 28.2 27.8 Proportion of uniform speed(%) 17.3 29.2 34.8 17.4 22.2 20.9 21.2 30.3 Proportion of idle(%) 17.9 30.8 23.8 28.9 25.4 18.0 18.2 12.5Figure 13
Driving cycles.


### 5.2. Verification of the Construction Method

To verify the advanced and scientific nature of the construction method of the driving cycle proposed in the paper, the driving cycles constructed by the k-means and SVM hybrid clustering algorithm, k-means clustering algorithm, and fuzzy c-means (FCM) clustering algorithm were compared. The driving cycles constructed by the k-means clustering algorithm and FCM clustering algorithm are shown in Figures14 and 15, respectively. A comparison of the characteristic parameter results is shown in Table 11. The results indicate that the characteristic parameters of the driving cycle based on the k-means and SVM hybrid clustering algorithm are closest to those of real-world test data. Therefore, the driving cycle constructed in this paper accurately reflects the speed-time and speed-acceleration characteristics of the real-world.Table 11
Comparison of the characteristic parameter results.
Characteristic parameters Test data k-means and SVM k-means FCM Average speed (km/h) 20.01 20.74 21.59 22.47 Maximum speed (km/h) 68.22 63.86 63.07 61.42 Average acceleration (m/s2) 0.76 0.78 0.69 0.74 Average deceleration (m/s2) 0.78 0.77 0.76 0.79 Standard deviation of acceleration (m/s2) 0.84 0.79 0.76 0.8 Proportion of acceleration(%) 34.5 32.9 36.0 38.33 Proportion of deceleration(%) 32.1 31.9 32.6 30.92 Proportion of uniform speed(%) 15.9 17.3 14.3 14.01 Proportion of idling(%) 17.5 17.9 17.1 16.74 MRE (%) - 4.03 6.11 6.88 RMSE (%) - 1.32 1.89 2.04Figure 14
Driving cycle based on k-means clustering algorithm.Figure 15
Driving cycle based on FCM clustering algorithm.


### 5.3. Comparison of Typical City Driving Cycles

To study the differences between the Xi’an EV urban driving cycle and other typical city driving cycles, this paper introduces the Winnipeg, Dublin, Mashhad, Hongkong, Ningbo, and Tianjin driving cycles and studies the difference and similarity among driving cycles through comparing the characteristic parameters. A comparison of the results is shown in Table12. The average and maximum speeds of the Xi’an EV urban driving cycle are similar to those of the Mashhad and Ningbo driving cycles. Moreover, the average acceleration and average deceleration of Xi’an EV urban driving cycle are obviously greater than those of other typical city driving cycles, and the proportions of acceleration, deceleration, uniform speed, and idling are similar to those of the Winnipeg driving cycle. Additionally, the average acceleration and average deceleration of the EV driving cycles are obviously greater than those of the ICEV driving cycles, and the EV driving cycles display more aggressive driving characteristics.Table 12
Comparison of the results for typical city driving cycles.
Driving cycle Xi’an Winnipeg Dublin Mashhad Hongkong Ningbo Tianjin Vehicle type EV PHEV EV ICEV ICEV ICEV ICEV Road type Urban Composite Urban Urban Urban Urban Urban Size of experiment 56 trips, 428 hours, 2158 km 76 volunteers, one year 1485 journals 450 km 29 hours 24 hours 25 hours Average speed(km/h) 20.74 31.4 30.87 20.27 25.0 23.7 22.5 Maximum speed(km/h) 63.86 100 84.5 60.90 77.7 60.2 70.2 Average acceleration(m/s2) 0.78 0.60 0.62 0.53 0.60 0.51 0.36 Average deceleration(m/s2) 0.77 0.60 0.64 0.54 0.60 0.58 0.43 Proportion of acceleration(%) 32.9 31.4 26.7 37.67 34.5 37.0 36.0 Proportion of deceleration(%) 31.9 31.2 25.0 37.48 34.2 33.0 30.0 Proportion of uniform speed(%) 17.3 14.9 27.6 3.16 12.0 11.0 21.0 Proportion of idle(%) 17.9 21.8 20.7 21.70 17.8 20.0 12.0 Reference - [29] [3] [30] [17] [32] [32]According to an analysis of the results, the Xi’an EV urban driving cycle reflects a more aggressive driving pattern than other driving cycles. The reasons for this finding are threefold. First, car ownership and the urban population have increased rapidly in Xi’an. The city size and transportation infrastructure construction cannot keep up with the increase in car ownership, and urban traffic congestion is serious. Second, the urban driving cycle in this paper is based on EVs, but general international standard driving cycles are based on traditional ICEVs. The start-up acceleration of EVs is obviously higher than that of ICEVs due to the low-speed constant torque characteristics of the motor [53, 54]. In addition, because the motor provides a fast response and good robustness, slight changes in the accelerator pedal will cause significant speed changes, which is not satisfied by the engine. Therefore, the average acceleration of the EV driving cycle is greater than that of the ICEV driving cycles. Third, to increase the energy utilization rate and driving range of EVs, the motor regenerative braking system can convert kinetic energy into electric energy and recharge batteries during the braking process. Specifically, when the driver releases the accelerator pedal, the EV enters into the regenerative braking mode. However, the ICEV remains in a uniform speed gliding state; therefore, EV experiences greater deceleration.


## 5.1. Comparison of the Xi’an and International Standard Driving Cycles

To study the differences between the Xi’an EV urban driving cycle constructed in this paper and the international standard driving cycles, eight characteristic parameters of seven general international standard driving cycles are compared as shown in Figure13 and Table 10. The seven general international standard driving cycles are the European Economic Commission 15-mode test cycle (ECE 15), New European Driving Cycle (NEDC), Japanese Industrial Standards Committee 08 test cycle (JC08), Japan 10/15 mode test cycle (J10/15), Federal Test Procedures 72 and 75 (FTP72, FTP75), and Worldwide harmonized light duty test cycle (WLTC) [52], respectively. The comparison of results shows that the Xi’an EV urban driving cycle has greater average acceleration and deceleration values, larger proportions of acceleration and deceleration, and smaller proportions of uniform speed and idling compared to the other driving cycles. Therefore, compared with various general international standard driving cycles, the Xi’an EV urban driving cycle is characterized by more aggressive driving features.Table 10
Comparison of results for the Xi’an and international standard driving cycles.
Driving cycle Xi’an ECE15 NEDC JC08 J10/15 FTP-72 FTP-75 WLTC Vehicle type EV ICEV ICEV ICEV ICEV ICEV ICEV ICEV Road type Urban Urban Composite Composite Urban Urban Urban Composite Average speed(km/h) 20.74 18.4 33.6 24.4 17.7 31.5 34.1 46.5 Maximum speed(km/h) 63.86 50.0 120 82.0 70.0 91.3 91.3 131.3 Average acceleration(m/s2) 0.78 0.64 0.51 0.42 0.63 0.59 0.60 0.42 Average deceleration(m/s2) 0.77 0.75 0.71 0.44 0.62 0.69 0.70 0.44 Proportion of acceleration(%) 32.9 21.5 23.8 27.8 25.9 32.8 32.4 29.4 Proportion of deceleration(%) 31.9 18.5 17.6 25.9 26.4 28.3 28.2 27.8 Proportion of uniform speed(%) 17.3 29.2 34.8 17.4 22.2 20.9 21.2 30.3 Proportion of idle(%) 17.9 30.8 23.8 28.9 25.4 18.0 18.2 12.5Figure 13
Driving cycles.


## 5.2. Verification of the Construction Method

To verify the advanced and scientific nature of the construction method of the driving cycle proposed in the paper, the driving cycles constructed by the k-means and SVM hybrid clustering algorithm, k-means clustering algorithm, and fuzzy c-means (FCM) clustering algorithm were compared. The driving cycles constructed by the k-means clustering algorithm and FCM clustering algorithm are shown in Figures14 and 15, respectively. A comparison of the characteristic parameter results is shown in Table 11. The results indicate that the characteristic parameters of the driving cycle based on the k-means and SVM hybrid clustering algorithm are closest to those of real-world test data. Therefore, the driving cycle constructed in this paper accurately reflects the speed-time and speed-acceleration characteristics of the real-world.Table 11
Comparison of the characteristic parameter results.
Characteristic parameters Test data k-means and SVM k-means FCM Average speed (km/h) 20.01 20.74 21.59 22.47 Maximum speed (km/h) 68.22 63.86 63.07 61.42 Average acceleration (m/s2) 0.76 0.78 0.69 0.74 Average deceleration (m/s2) 0.78 0.77 0.76 0.79 Standard deviation of acceleration (m/s2) 0.84 0.79 0.76 0.8 Proportion of acceleration(%) 34.5 32.9 36.0 38.33 Proportion of deceleration(%) 32.1 31.9 32.6 30.92 Proportion of uniform speed(%) 15.9 17.3 14.3 14.01 Proportion of idling(%) 17.5 17.9 17.1 16.74 MRE (%) - 4.03 6.11 6.88 RMSE (%) - 1.32 1.89 2.04Figure 14
Driving cycle based on k-means clustering algorithm.Figure 15
Driving cycle based on FCM clustering algorithm.


## 5.3. Comparison of Typical City Driving Cycles

To study the differences between the Xi’an EV urban driving cycle and other typical city driving cycles, this paper introduces the Winnipeg, Dublin, Mashhad, Hongkong, Ningbo, and Tianjin driving cycles and studies the difference and similarity among driving cycles through comparing the characteristic parameters. A comparison of the results is shown in Table12. The average and maximum speeds of the Xi’an EV urban driving cycle are similar to those of the Mashhad and Ningbo driving cycles. Moreover, the average acceleration and average deceleration of Xi’an EV urban driving cycle are obviously greater than those of other typical city driving cycles, and the proportions of acceleration, deceleration, uniform speed, and idling are similar to those of the Winnipeg driving cycle. Additionally, the average acceleration and average deceleration of the EV driving cycles are obviously greater than those of the ICEV driving cycles, and the EV driving cycles display more aggressive driving characteristics.Table 12
Comparison of the results for typical city driving cycles.
Driving cycle Xi’an Winnipeg Dublin Mashhad Hongkong Ningbo Tianjin Vehicle type EV PHEV EV ICEV ICEV ICEV ICEV Road type Urban Composite Urban Urban Urban Urban Urban Size of experiment 56 trips, 428 hours, 2158 km 76 volunteers, one year 1485 journals 450 km 29 hours 24 hours 25 hours Average speed(km/h) 20.74 31.4 30.87 20.27 25.0 23.7 22.5 Maximum speed(km/h) 63.86 100 84.5 60.90 77.7 60.2 70.2 Average acceleration(m/s2) 0.78 0.60 0.62 0.53 0.60 0.51 0.36 Average deceleration(m/s2) 0.77 0.60 0.64 0.54 0.60 0.58 0.43 Proportion of acceleration(%) 32.9 31.4 26.7 37.67 34.5 37.0 36.0 Proportion of deceleration(%) 31.9 31.2 25.0 37.48 34.2 33.0 30.0 Proportion of uniform speed(%) 17.3 14.9 27.6 3.16 12.0 11.0 21.0 Proportion of idle(%) 17.9 21.8 20.7 21.70 17.8 20.0 12.0 Reference - [29] [3] [30] [17] [32] [32]According to an analysis of the results, the Xi’an EV urban driving cycle reflects a more aggressive driving pattern than other driving cycles. The reasons for this finding are threefold. First, car ownership and the urban population have increased rapidly in Xi’an. The city size and transportation infrastructure construction cannot keep up with the increase in car ownership, and urban traffic congestion is serious. Second, the urban driving cycle in this paper is based on EVs, but general international standard driving cycles are based on traditional ICEVs. The start-up acceleration of EVs is obviously higher than that of ICEVs due to the low-speed constant torque characteristics of the motor [53, 54]. In addition, because the motor provides a fast response and good robustness, slight changes in the accelerator pedal will cause significant speed changes, which is not satisfied by the engine. Therefore, the average acceleration of the EV driving cycle is greater than that of the ICEV driving cycles. Third, to increase the energy utilization rate and driving range of EVs, the motor regenerative braking system can convert kinetic energy into electric energy and recharge batteries during the braking process. Specifically, when the driver releases the accelerator pedal, the EV enters into the regenerative braking mode. However, the ICEV remains in a uniform speed gliding state; therefore, EV experiences greater deceleration.


## 6. Conclusions

This paper proposes a scientific and systematic methodology for the development of a representative EV urban driving cycle. The methodology mainly includes three tasks: test route selection and data collection, data processing, and driving cycle construction. For test route selection and data collection, the overall topological structure of urban roads and traffic flow monitoring results are used as the main factors for the selection of test routes. We combine the advantages of the on-board measurement and chase car methods to collect driving pattern data. In the data processing stage, the PCA algorithm is used to reduce the dimensionality of the characteristic parameters. The driving segments are classified using a k-means and SVM hybrid clustering algorithm, and the classification results of the hybrid method are obviously superior to those of the k-means method. In the driving cycle construction stage, scientific assessment criteria are studied to select the most representative driving cycle from multiple candidate driving cycles. In addition, the SAPDs of the representative Xi’an EV urban driving cycle and real-world test data are compared, and the results show that the Xi’an EV urban driving cycle constructed in this paper effectively represents the speed-time driving pattern of the real-world cycle. Finally, the characteristic parameters of the Xi’an EV urban driving cycle, international standard driving cycles, and other typical city driving cycles are compared and analyzed. The results indicate that the Xi’an EV urban driving cycle reflects a more aggressive driving characteristic than other driving cycles, mainly due to the difference in the start-up acceleration and regenerative braking characteristics of EVs and ICEVs. Therefore, a representative EV driving cycle should be used for energy optimization, state of charge estimation, and driving mileage prediction for EVs, as well as the evaluation and certification of new EV models.



---

*Source: 1890753-2018-11-05.xml*