Uneingeschränkter Zugang

Research on Driving Conditions Based on Principal Component and K-means Clustering Optimization

, , ,  und   
16. Juni 2025

Zitieren
COVER HERUNTERLADEN

Introduction

Vehicle driving conditions, also known as vehicle operating cycles or driving cycles, refer to the mathematical representation of the speed-time curve that characterizes the vehicle's operating state in a specific traffic environment [1]. It provides core data support for fuel efficiency evaluation, emission control technology research and development, and intelligent traffic control, and directly affects the design of new energy vehicles and the accuracy of urban traffic carbon accounting [2]. Zhao Xuan's team [3] proposed a driving mode analysis method based on fuzzy C-means clustering. By integrating the time distribution characteristics of kinematic segments with multi-dimensional parameter correlation analysis, they achieved intelligent identification and optimized reconstruction of typical driving conditions of urban electric vehicles. The operating condition curves they constructed have significant improvements in typicality indicators compared to traditional methods. Currently, K-means clustering is widely used in driving cycle synthesis. However, K-means clustering often has problems such as large dependence on the initial cluster center, isolated points, and sensitivity to noise data. Ma Fumin et al. [4] innovatively constructed a local density dynamic adaptation measurement model to accurately characterize the spatial distribution characteristics of data objects within a cluster, and based on this, designed a rough K-means clustering algorithm that integrates a local density adaptation mechanism. Yuan Yiming et al. [5] developed an optimized K-means text clustering algorithm based on density peak. This algorithm effectively overcomes the convergence instability problem caused by random initialization of centers in the traditional K-means algorithm by accurately selecting density peak points as the initial clustering centers, and significantly improves the reliability of clustering results. Although the above two methods optimize the initial cluster centers to a certain extent, they do not mention the impact of edge data and isolated points in the data set. Bao Zhiqiang et al. [6] only used an outlier removal algorithm to eliminate isolated points in the data set, but still used traditional K-means clustering to cluster the data set.

Based on the above research conclusions, this paper constructs an improved density-driven K-means clustering algorithm. The core innovation of this algorithm is to introduce density measurement indicators to screen the initial clustering centers, effectively suppress the interference of noise data on the selection of initial centers, and integrate enhanced principal component analysis technology to build a two-stage collaborative optimization framework to achieve intelligent synthesis of driving conditions.

Data Preprocessing

The measured data obtained in this study are from a light vehicle road operation scenario in a certain city, with a sampling rate of 1 Hz. The data dimensions include multiple source parameters such as timestamp, global positioning system (GPS) speed measurement value, geographic longitude and latitude coordinates, and instantaneous fuel consumption rate. In the actual data collection process, due to the combined influence of factors such as complex driving environment, electromagnetic signal interference, and urban building occlusion, the original sensor data generally has significant noise pollution, which manifests as multiple problems such as data distortion, abnormal value fluctuations, and signal interference [7]. Therefore, the first step in data processing is to preprocess the original data using wavelet decomposition and reconstruction [8]. The basic idea is to remove the wavelet coefficients corresponding to each frequency band and noise while retaining the wavelet coefficients of the original signal, and then perform wavelet reconstruction on the processed coefficients to obtain a pure signal.

Assume that a noisy signal can be described as: S(x)=f(x)+n1(x)×n2(x)$$S(x) = f(x) + {n_1}(x) \times {n_2}(x)$$

Among them, S(x) is the degraded signal, f(x) is the original signal, n1(x) is the additive noise, and n2 (x) is the multiplicative noise.

The denoising process based on wavelet decomposition and reconstruction is described as follows:

Decompose the noisy signal f(x) into approximate component cj,k and detailed component dj,k by wavelet decomposition.

According to the threshold δj, use equation (2) to process the detailed component dj, k of the layer j. dj,k={ dj,k,| dj,k |>δi0,| dj,k |δi$${d_{j,k}} = \left\{ {\matrix{ {{d_{j,k}},} & {\left| {{d_{j,k}}} \right| > {\delta _i}} \cr {0,} & {\left| {{d_{j,k}}} \right| \le {\delta _i}} \cr } } \right.$$

Use the reconstruction algorithm to reconstruct the approximate component cj,k and the detailed component dj,k to obtain the filtered signal.

The original data and the data preprocessed by wavelet decomposition and reconstruction are shown in Fig. 1.

Figure 1.

Comparison of noise reduction data results

The comparison between the original data and the preprocessed data shows that the wavelet decomposition and reconstruction method has a good denoising effect and can effectively improve the signal-to-noise ratio of the signal.

Analysis of Driving Condition Data
A. Feature Parameter Extraction and Kinematic Segment Division

Based on the analysis of relevant data and related research, 12 characteristic parameters were defined to describe the kinematic segments [8]. This paper selects 12 characteristic parameters including running time T/s, driving distance S/km, average speed Va/(km·h−1), average driving speed Vd/(km·h−1), idling time ratio Ti/%, acceleration time ratio Ta/%, deceleration Td/% time ratio Td/% cruising time ratio Tc/%, speed standard deviation Vstd/(km·h−1), average acceleration aa/(m·s−1), acceleration standard deviation astd/(km·h−1), and average deceleration ad/(m·s−2).

The interval from the start of one idle speed to the start of the next idle speed of the car is called a kinematic segment [9]. This paper uses Python language to process and segment 1,655 kinematic segments from 195,815 pre-processed data.

B. Improved principal component analysis

Although the classical principal component analysis can effectively eliminate the differences in dimensions and magnitudes between the original variables when standardizing data, this process may also cause the characteristic differences of different indicators to be over-smoothed, resulting in potential information loss [10]. In view of the above situation, the improved principal component analysis method is as follows:

Improve the traditional principal component dimensionless method by using the indicator mean method and indicator homogeneity method [11]. Assume that there are m objects and n indicators in the overall evaluation, and the initial indicators can form a matrix Xij = (xij)m×m). To average the matrix is to divide the original index by the average value of all indexes Yij: Yij=xij/x¯j,(i=1,2,,n;j=1,2,,p)$${Y_{ij}} = {x_{ij}}/{{\bar x}_j},(i = 1,2, \cdots ,n;j = 1,2, \cdots ,p)$$ Among this: x¯j=1n xij,(j=1,2,,p)$${{\bar x}_j} = {1 \over n}\sum {{x_{ij}}} ,(j = 1,2, \cdots ,p)$$

The index can be processed to make all indicators have the same effect on the whole in the same direction. In the series, let yij be the reverse index, min1im{ yij }$$\mathop {\min }\limits_{1 \le i \le m} \left\{ {{y_{ij}}} \right\}$$ is the smallest number among them, and the index is processed to be: yij=yijmin1im{ yij },(i=1,2,,m;j=1,2,,n)$$y_{ij}^\prime = {y_{ij}} - \mathop {\min }\limits_{1 \le i \le m} \left\{ {{y_{ij}}} \right\},(i = 1,2, \cdots ,m;j = 1,2, \cdots ,n)$$

Among them, yij$$y_{ij}^\prime $$ is the sequence after yij is homogenized, Such changes will not change the distribution of the original indicators. The improved principal component can represent more characteristic parameter information and achieve dimensionality reduction of driving conditions.

Fig. 2 shows that there are obvious inflection points in the variation curves of each principal component, and it is concluded from this observation that the first three principal components are selected.

Figure 2.

Lithotripsy

As shown in Fig. 3, the cumulative contribution rate of the first three principal components has reached 85%, which basically represents all the information of the 12 characteristic parameters of the fragment, and can be used for cluster analysis. The first principal component contains 45% of the information, thus meeting the requirement of fewer principal components representing more information.

Figure 3.

Contribution rate and cumulative contribution rate

The larger the absolute value of the parameter principal component load coefficient, the higher the correlation coefficient between a parameter and a principal component, and the larger the contribution factor. According to Table 1 above, the eigenvalues of the first principal component are driving distance, segment duration, cruising time ratio, and average driving speed; the eigenvalues of the second principal component are average speed; and the eigenvalues of the third principal component are idling time ratio. From the first three principal components, it can be seen that the 12 characteristic parameter matrices of the sample are reduced to 6 characteristic parameter matrices that can represent most of the sample information.

PRINCIPAL COMPONENT LOAD MATRIX

Characteristic parameters M1 M2 M3
Deceleration time ratio Td/% 0.323 0.351 -0.223
Driving Clustering S/km 0.893 0.234 0.065
Run time T/S 0.782 0.251 -0.342
Acceleration time ratio Ta/% 0.396 -0.186 0.061
Cruise time ratio Tc/% 0.641 0.335 -0.075
Average speed Va/(km·h−1) 0.499 0.763 0.125
Deceleration time ratio Vd/(km·−1) 0.778 0.415 0.132
Speed standard deviation Vstd/(km·h−1) 0.498 0.333 0.054
Acceleration standard deviation astd/(km·−1) 0.125 0.267 -0.077
Average acceleration aa/(m·s−2) 0.024 0.523 0.053
Average deceleration aa/(m·s−2) 0.266 -0.433 -0.059
Idle time ratio Ti/(m·s−2) 0.165 -0.351 0.853
C. Improved K-means cluster analysis

The K-means algorithm is sensitive to the selection of initial cluster centers. Since the process uses a random mechanism, the initial centroids it selects may be distributed in data sparse areas or coincide with outliers. This non-ideal initial state can easily cause the algorithm to fall into a local optimal solution, thereby reducing the clustering quality [12]. In the usual optimization method, in order to make the initial cluster center better than the method of randomly selecting cluster centers in traditional algorithms, k data objects with the farthest distance or the largest density are generally selected as the initial cluster centers. However, if there is noise data in the data set, the "distance optimization method" is likely to use the noise data as the initial cluster center. The "density method" selects the k data objects with the largest density as the initial clustering centers. This method can remove isolated points of data, but it is not suitable for non-convex data sets. This paper proposes a method that combines the "distance optimization method" and the "density method" to determine the optimal initial clustering center, and constructs a data set density measurement method.

1) Relevant definitions

The Euclidean distance between two points in space is: d(xi,xj)=(xi1xj1)2++(ximxjm)2$$d\left( {{x_i},{x_j}} \right) = \sqrt {{{\left( {{x_{i1}} - {x_{j1}}} \right)}^2} + \cdots + {{\left( {{x_{im}} - {x_{jm}}} \right)}^2}} $$ Among them, xi, xj are two m-dimensional data points.

Average distance between data objects: MeanDist=1Cn2 d(xi,xj)$$MeanDist{\rm{ }} = {1 \over {C_n^2}}\sum d \left( {{x_i},{x_j}} \right)$$

n is the number of data points in the data cluster, Cn2$$C_n^2$$ and n is the number of logarithms obtained from n data points.

Given a data set D = {x1,x2, …, xn}, the density measurement function of data point xi is: Dean(xi)=j=1nu(MeanDistd(xi,xj))$$Dean\left( {{x_i}} \right) = \sum\limits_{j = 1}^n u \left( {{\rm{ }}MeanDist{\rm{ }} - d\left( {{x_i},{x_j}} \right)} \right)$$

Among them, the u(z) function is expressed as: u(z)={ 1,z00,z<0$$u(z) = \left\{ {\matrix{ {1,} \hfill & {z \ge 0} \hfill \cr {0,} \hfill & {z < 0} \hfill \cr } } \right.$$

The density parameter of data point xi is actually a data object inside a circle with center xi and radius MeanDist.

The average density measurement function of the data set is defined as: MeanDens(D)=1ni=1nDens(xi)$$MeanDens(D) = {1 \over n}\sum\limits_{i = 1}^n {Dens} \left( {{x_i}} \right)$$ nis the number of data objects in the dataset a D.

For data point xi in data set D, if Dens(xi)<α×MeanDens(D)$$Dens\left( {{x_i}} \right) < \alpha \times MeanDens(D)$$ Point xi is called an isolated point, where 0 < α 1.

The distance between data object xi and data set C is the closest distance to all data points in data set C. d(xi,C)=min(d(xi,xj),xjC)$$d\left( {{x_i},C} \right) = \min \left( {d\left( {{x_i},{x_j}} \right),{x_j} \in C} \right)$$

2) Algorithm Idea

The improved K-means clustering process is as follows: first evaluate the density distribution function of all samples, identify and remove outliers, and then construct a high-density data subset. Then select the sample with the best density value as the first initial cluster center, and then select the sample points with the farthest distance from the previous center in the remaining high-density data as new cluster centers, until k initial centroids are established. Finally, the standard K-means clustering process is executed based on the optimized centroid configuration.

The algorithm is described as follows:

Sample dataset D = {d1, d2, …, dn} containing n data objects

optimal k value and clustering results.

Use d(xi,xj) and MeanDist to calculate the distance and average distance between any two data objects in data set D.

Use Dens(xi) and MeanDens(D) to calculate the density measurement function of all data objects in data set D and the average density measurement function of data set D.

According to formula (10), determine the isolated data objects and delete them from set D to obtain set A with high density parameters.

Select a data object with the highest parameter density from set A as the first initial cluster center, add it to set B, and remove it from set A.

From set A, select the data object farthest from set B as the next initial cluster center, add it to set B, and remove it from set A.

Repeat Step 5 until the number of data objects in set B is k.

Step 7 uses traditional K-means for clustering based on k cluster centers.

3) Results Analysis

CH is used as an evaluation index to determine the optimal K value before clustering. It is a measure based on the intra-class dispersion matrix and inter-class dispersion matrix of all samples. The larger the is, the tighter the clusters are and the more dispersed the classes are. In this case, the clustering result is relatively better [13]. The index is defined as: CH(k)=trB(k)/(k1)trW(k)/(nk)$$CH(k) = {{trB(k)/(k - 1)} \over {trW(k)/(n - k)}}$$

Where n is the number of clusters, k is the current class, trB(k) is the trace of the between-class dispersion matrix, and trW(k) is the trace of the within-class dispersion matrix.

In order to determine the appropriate number of clusters, this paper first clusters into 2, 3, and 4 categories, and the clustering results are shown in Fig. 5. At this time, the clustering k value cannot be clearly determined. At this time, CH can be used as an evaluation indicator. The processing results of CH values under different clustering states are shown in Fig. 4. It can be observed that 3 categories are clustered when the CH value is the largest.

Figure 4.

Relationship between cluster number and CH index

Figure 5.

K-means clustering results

Reference [14] used two typical driving condition characteristic parameters, average vehicle speed and idling time ratio, to conduct clustering research. This study innovatively focused on the cruising time ratio and average driving speed, which have a higher contribution, as the core analysis dimensions. The original data points shown in Fig. 6 are scattered point distribution, in which the red marked area clearly circles the isolated samples and outliers that significantly deviate from the main distribution trend.

Figure 6.

Scatter plot of segments in two-dimensional feature space

This paper clusters the kinematic segments into three categories. As shown in Fig. 7, the cluster centers of the first, second and third categories are (14, 38), (52, 45) and (86, 54) respectively, considering the general urban traffic conditions: the first category is the relatively crowded urban area, with relatively low average speed and cruising time, and more frequent starts and stops; the second category is the relatively unobstructed urban suburbs, with relatively high average speed and cruising time, and fewer starts and stops; the third category is the unobstructed high-speed segment, with high average speed and cruising time, and fewer starts and stops.

Figure 7.

Clustering results of fragments in two-dimensional feature space

Driving Condition Construction and Analysis
A. Working condition construction

According to the proportion of the total time of each time segment to the driving conditions of all data sets, the time taken by each segment in the final constructed condition can be calculated. As shown in Fig. 8, this paper constructs it according to the time of 1,200s of the general typical driving condition.

Figure 8.

Synthetic driving conditions

As can be seen from Fig. 9, most of the operating points are concentrated in the medium and low speed range, and the distribution of acceleration is relatively reasonable, which can show the actual acceleration and deceleration of the car.

Figure 9.

Time and acceleration diagram

As can be seen from Fig. 10, the acceleration is mainly distributed in the speed range of 0-40 km·h−1 and around 80 km·h−1. During low speed and high acceleration, the instantaneous fuel consumption has a significant bulge, which may be caused by the driver's improper operation.

Figure 10.

Scatter plot of instantaneous fuel consumption of speed and acceleration

B. Working condition verification and fuel consumption analysis

The smaller the distribution difference value SAFDdiff is, the higher the commonality between the constructed working condition and the actual data is [15]. SAFDdiff=i(SAFDcycle(i)SAFDdata(i))2iSAFDdata(i)2$$SAF{D_{diff{\rm{ }}}} = {{\sum\nolimits_i {{{\left( {SAF{D_{cycle{\rm{ }}}}(i) - SAF{D_{data{\rm{ }}}}(i)} \right)}^2}} } \over {\sum\nolimits_i {SAF{D_{data{\rm{ }}}}{{(i)}^2}} }}$$

SAFDcycle is the SAFD of a cycle, and SAFDdat is the SAFD of all data.

COMPARISON OF THE METHOD IN THIS PAPER AND TRADITIONAL K-MEANS RESULTS

Method Eigenvalue mean relative error/% Cluster average accuracy/% Average time/s SAFDdiff/%
Traditional K-means clustering 8.1 93 215 2.12
Clustering of this article 4.6 98 127 1.17

The velocity-acceleration joint distribution is to separate the velocity values and acceleration values into equal intervals and further calculate the proportion of the working condition data in different intervals [16]. As shown in Fig. 11, the combined speed-acceleration difference between the original data and the constructed driving condition is distributed within the range of ±1.2%, and the calculated distribution difference value (SAFDdiff ) is 1.17%. Therefore, the driving condition constructed in this paper meets the driving characteristics of light vehicles and has strong applicability.

Figure 11.

SAFD difference between experimental data and synthetic conditions

Conclusions

In view of the inherent defects of information distortion in the dimensionless processing of traditional principal component analysis, this study proposes a dual optimization strategy of "mean preservation-trend synchronization" to achieve standardized improvement while maintaining the original difference characteristics of the variables. In view of the limitation of the K-means clustering algorithm being sensitive to the initial center, an intelligent optimization mechanism for initial clustering centers based on local density distribution is constructed. The statistically representative initial centroids are selected by the density measurement value of data objects, which effectively eliminates noise interference and improves clustering stability. This paper constructs an optimization method of improved principal component and improved K-means combination to synthesize automobile driving conditions. The verification results show that the difference rate between the synthetic conditions generated by the proposed method and the original data in the joint distribution space of speed-acceleration is only 1.17%, and the reconstruction accuracy of the conditions reaches 98.83%. The driving conditions synthesized by the proposed method are significantly better than those of traditional methods and are closer to actual traffic conditions.

Sprache:
Englisch
Zeitrahmen der Veröffentlichung:
4 Hefte pro Jahr
Fachgebiete der Zeitschrift:
Informatik, Informatik, andere