Method for estimating driving range of pure electric bus integrated with battery aging characteristics
By combining the battery aging characteristics and self-attention mechanism, an electric bus mileage estimation model was established, which solved the problem that the existing model failed to effectively consider the battery aging, and achieved more accurate mileage estimation and battery aging detection.
Patent Information
- Application Number
- CN202411693725.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-02-28
AI Technical Summary
The existing electric bus mileage estimation model fails to effectively consider the battery aging characteristics, which makes it difficult to accurately detect the battery performance aging process under the influence of vehicle cumulative mileage and external environmental factors.
Using a method that incorporates battery aging characteristics, an electric bus mileage estimation model is established through data processing, capacity incremental analysis method, dispersion squared sum system clustering and self-attention mechanism. The model combines electric bus operation data, weather condition data and battery aging levels, and uses a self-attention mechanism to process time series data to improve estimation accuracy.
A more accurate estimate of the mileage of electric buses is achieved, and the complex relationship between battery aging and multiple environmental factors can be effectively handled, avoiding the delayed response of traditional models in battery aging detection.
Smart Images

Figure CN119527043A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pure electric bus driving range estimation, and in particular to a pure electric bus driving range estimation method incorporating battery aging characteristics. Background Art
[0002] At present, with the development of sensing technology in recent years, a large amount of electric bus operation data can be collected. Unlike laboratory test data, real-world data can reflect the impact of actual complex scenarios on the operation of pure electric buses. At the same time, with the rise of artificial intelligence, the self-attention mechanism has also been widely used and continuously improved, which has promoted the creation of models. This study aims to use the actual operation data of electric buses to gain a deeper understanding of battery degradation and mileage estimation. In addition to the operation data of electric buses, weather condition data will also be adopted, because weather and environmental conditions have a significant impact on the mileage of electric vehicles. The battery degradation level is then identified. Finally, the self-attention mechanism method is used to model the mileage estimation under different charging modes. Combined with the battery degradation level, the model is trained and verified using the data of driving process and weather conditions, while considering the influence of multiple influencing factors.
[0003] In the prior art, the implementation scheme most similar to the present invention is an electric bus mileage estimation model based on integrated machine learning, which identifies the battery aging level through the k-means clustering method and uses four types of integrated machine learning methods, including adaptive boosting (AdaBoost), gradient boosting decision tree (GBDT), extreme gradient boosting (XGBoost) and random forest (RF) for mileage estimation.
[0004] Pure electric buses are increasingly being introduced into public transportation systems due to their environmental benefits such as zero tailpipe emissions. However, due to the technical limitations of existing batteries, the driving range of pure electric buses is significantly shorter than that of traditional buses. The limited driving range has brought new challenges to the operation of transportation systems. Today, there are still several problems in estimating the driving range of pure electric buses:
[0005] Most existing electric bus range estimation methods usually do not take into account the aging characteristics of the battery. As the vehicle's cumulative mileage gradually increases, coupled with the interference of external environmental factors, the battery performance will continue to age, and the aging process is a long-term, dynamic change.
[0006] At present, most of the research is based on data-driven methods to estimate the battery aging state. Its data sets are often obtained by testing in specific environments such as laboratories, which cannot reflect the actual driving environment of electric buses and are not representative in this regard. In addition, the clustering effect of experimental data based on traditional clustering methods is often too repetitive, and the identification of battery aging levels is not sufficient. The sum of squared deviations (SSE) is an important indicator for quantifying clustering effects. It measures the closeness between sample points and cluster centers after clustering. The smaller the SSE, the better the clustering effect. Based on the sum of squared deviations system clustering method, the elbow method is used to draw a curve of SSE changing with K value, which can help select the optimal K value.
[0007] Traditional models have a long window period during which it is difficult to effectively detect the battery aging level as the mileage of electric buses increases. The self-attention mechanism has significant advantages in building an electric bus range prediction model because it can effectively handle long dependencies in time series data. Through the self-attention mechanism, the model can not only more accurately identify subtle changes in battery aging levels, but also extract key information within a larger time window, avoiding the delayed response that may occur in traditional models. This flexible and powerful capability makes the range prediction of electric buses more accurate.
[0008] In summary, there is at least one of the following technical problems:
[0009] Existing electric bus range estimation models usually do not take into account the aging level of the battery. As the vehicle's cumulative mileage gradually increases, coupled with the interference of external environmental factors, the battery performance will continue to age, and the aging process is a long-term, dynamic change.
[0010] At present, some studies have been conducted on the estimation of battery aging levels based on data-driven methods. However, their data sets are often obtained through testing in specific environments such as laboratories, which cannot reflect the actual driving environment of electric buses and are not representative in this regard.
[0011] During the driving process of electric buses, the performance of the battery is affected by many factors, such as charging status, ambient temperature, etc. The relationship between these factors may show complex interactive patterns over a long period of time. Traditional models cannot effectively handle the long dependencies in time series data. As the mileage of electric buses increases, it is also impossible to effectively detect that there will be a long window period for the battery aging level. Summary of the invention
[0012] The main purpose of the present invention is to provide a pure electric bus mileage estimation method that incorporates battery aging characteristics, so as to solve the problem that the existing electric bus mileage estimation model in the prior art usually does not take into account the battery aging level. With the gradual increase of the cumulative mileage of the vehicle, coupled with the interference of external environmental factors, the battery performance will continue to age, and the aging process is a long-term, dynamic change. At present, some studies have conducted research on battery aging level estimation based on data-driven methods. Their data sets are often tested in specific environments such as laboratories, which cannot reflect the actual driving environment of electric buses and are not representative in this regard. During the driving process of electric buses, the performance of the battery is affected by many factors, such as charging status, ambient temperature, etc. The relationship between these factors may show a complex interactive pattern over a long period of time. The traditional model cannot effectively handle the long dependencies in time series data, and cannot effectively detect the technical problem that the battery aging level will have a long window period during the increase of the mileage of electric buses.
[0013] In order to achieve the above object, according to one aspect of the present invention, a method for estimating the driving range of a pure electric bus incorporating battery aging characteristics is provided, comprising:
[0014] Step 1: Data processing: collect electric bus operation data based on sensor technology and clean the data;
[0015] Step 2: Characterize battery performance based on capacity increment analysis;
[0016] Step 3: Identify the battery aging level through the system clustering of the sum of squared deviations;
[0017] Step 4: Establish a driving range estimation model based on the self-attention mechanism;
[0018] Step 5: Estimate the driving range of the pure electric bus based on the driving range estimation model.
[0019] Preferably, in step 1, cubic spline interpolation is used to compensate for missing values and clean outliers, different charging modes are provided according to urban areas, which are divided into fast charging and slow charging modes, and Z-score outlier detection is used to perform a second data cleaning before performing capacity increment analysis on these two charging modes respectively.
[0020] Preferably, in step 2, the inherent properties of the battery are combined with the driving data of the electric bus, and the influence of the cumulative mileage of the electric bus on the voltage platform and the charging capacity is further considered;
[0021] The capacity increment analysis method is introduced to draw the IC curve of the charging cycle. IC is the ratio of the charging capacity increment to the fixed increment of the terminal voltage, as shown in the following formula.
[0022]
[0023] Among them, IC n Indicates the incremental capacity at voltage step n; Q n and Q n-1 They represent the battery capacity at voltage steps n and n-1 respectively; V represents the fixed increment of terminal voltage; Q n represents the charge capacity at voltage step n;
[0024] To further characterize the battery aging level, cluster analysis was performed on the IC peak values and voltage platforms of different cumulative mileages collected in fast charging mode and slow charging mode.
[0025] Preferably, in step 3, a vector space X{x1,...x2,...x3,...x n ,...}, each element represents each set of data, including three sub-elements, namely, the peak value p of the IC curve i , voltage platform v i , and accumulated mileage i , first use Z-source to standardize the data, and each data is processed as follows:
[0026]
[0027] in Indicates the standardized IC curve peak, voltage platform, and accumulated mileage data. They represent the peak value of IC curve, voltage platform, and average value of accumulated mileage respectively, and s represents the standard deviation of each type of data;
[0028] Among them, the standardized data were used for cluster analysis.
[0029] Preferably, in step 3, the Euclidean distance is used as the distance between samples, and its expression is:
[0030]
[0031] x i , x j Represent elements in different vector spaces, x .k (k=1, 2, 3) respectively represent the values of the IC curve peak, voltage platform, and accumulated mileage in each column vector.
[0032] Each class is denoted by G i Indicates that the sample distance is taken as the distance between each class:
[0033] d(G i ,Gj )=d(x i ,x j )
[0034] Where d(G i ,G j ) represents the distance between each class, x i , x j Representing elements in different vector spaces respectively, we can get the following initialization distance matrix:
[0035]
[0036] Among them, D0 represents the initial distance between each class;
[0037] The two classes with the smallest distance are combined into one class, and the distance between the new classes is calculated.
[0038] Preferably, in step 3, the clustering method uses a systematic clustering method based on the sum of squares of deviations. When merging two classes, the total sum of squares of deviations within a class is minimized, the sum of squares of deviations between classes is maximized, and the distance between classes is defined as the sum of squares of deviations between classes, that is:
[0039]
[0040] Among them, x ij represents the jth sample point in the i-th class, n i represents the number of samples in the i-th class, represents the mean of the i-th class, WWS(G i ) represents the sum of squares of the intra-class deviations of a certain category, BBS(G i , G j ) represents the increment of the sum of squared deviations when classes are merged. For two classes G i G j For , the sum of squared deviations between classes can be defined as the increment of the sum of squared deviations after their merging, that is:
[0041] BBS(G i ,G j )=WWS(G i ∪G j )-[WWS(G i )+WWS(G j )]
[0042] Among them, WWS (G i ) represents the sum of squares of the intra-class deviations of a certain category, BBS(G i , G j ) represents the increase in the sum of squared deviations when classes are merged.
[0043] And this quantity is defined as the distance between two classes. By repeatedly calculating the distance between classes, and merging two classes that meet the objective function of this method into one class, all classes can be classified into one class eventually, and the clustering result can be obtained according to the k value.
[0044] Preferably, in step 3, regarding the value of the number of clusters k, the Gap Statistic method is used to determine the optimal value of the number of clusters k, and the number of clusters is determined by calculating the difference between the intra-cluster variation of the data set and the intra-cluster variation of the unstructured cluster generated by random data, and the intra-cluster dispersion of each cluster is calculated, and its expression is:
[0045]
[0046] Among them, W K represents the intra-cluster dispersion of each cluster, n i represents the number of samples in the i-th class, x i , x j Represent elements in different vector spaces, x ·k (k=1, 2, 3) respectively represent the values of the IC curve peak, voltage platform, and accumulated mileage in each column vector.
[0047] The expression obtains the squared Euclidean distances between all possible sample points in each class, sums them up, and then normalizes the value.
[0048] Preferably, in step 3, uniformly distributed random values are used as reference data sets, clustered using the same method, and the dispersion within the cluster is obtained, and the Gap value and standard error are calculated:
[0049]
[0050]
[0051] Where B represents the number of samples, ln w k represents the model weight of the current step size k, represents the optimal weight parameter for the b-th sample, for Finally, we can take the k corresponding to the maximum value of Gap(k) as the optimal k value, or take whether the change in Gap(k) brings significant improvement to the target when the k value increases as the choice of k value, which is expressed as:
[0052] Gap(k)≥Gap(k+1)-s k+1 .
[0053] Among them, Gap(k) is used to measure the current model w kPerformance vs. the best model The difference between k It is the standard error calculation representation of Gap.
[0054] Preferably, in step 4, the Gini index is used as an evaluation index, the variable importance score is represented by VIM, and the Gini index is represented by GI. Assuming m features X1, X2, X3, ... X c , calculate each feature X j Gini Index Score V IM j (Gini).
[0055] Preferably, in step 4, the calculation formula of the Gini index is:
[0056]
[0057] Among them, K means there are K categories. mk It represents the proportion of class column k in node m. Intuitively speaking, it is the probability that two samples randomly selected from node m will have inconsistent class labels. j The importance of node m, that is, the change in the Gini index before and after the node m branch is:
[0058] V IM jm (Gini) =GI m -GI l -GI r
[0059] Among them, VIM jm (Gini) Indicates the importance of feature X in node m, that is, the change in the Gini index before and after the branch of node m. The larger the value, the higher the importance of feature X in node m. m Represents the Gini index of node m before it branches. That is, the Gini index of the entire node m before it splits. l Represents the Gini index of the left child node after node m is split. That is, the Gini index of the left child node after node m is split. r Represents the Gini index of the right child node after node m is split. That is, the Gini index of the right child node after node m is split.
[0060] V I (Gini) =∑ m∈M V (Gini)
[0061] Among them VIMj (Gini) VIM represents the importance score of feature j in the i-th factor.jm (Gini) Represents the importance score of feature j in node m. This score is calculated based on the change in the Gini index. m∈M VIM jm (Gini) Indicates the sum of all nodes m. In this formula, the summation range is all nodes n belonging to the set M.
[0062] There are n important factors in total, then:
[0063]
[0064] Among them, VIM j (Gini) represents the importance score of feature j among all factors.
[0065] represents the importance score of feature j in the i-th factor. It means to sum all factors i. In this formula, the sum range is from i=1 to n.
[0066] Finally, normalize all the importance scores obtained to get the following results:
[0067]
[0068] Among them, VIM j ' represents the normalized importance score of feature j. VIM j VIM represents the original importance score of feature j in all factors. i represents the importance score of feature i among all factors, It means to sum all features i.
[0069] The application of the technical solution of the present invention has the following technical effects:
[0070] The present invention constructs the driving energy consumption of electric buses based on the self-attention mechanism. Compared with the traditional integrated machine learning method, the self-attention mechanism performs better in processing high-dimensional and sequence data. The self-attention mechanism can capture the dependencies between different positions in the sequence. Compared with the integrated method, which usually requires the gradual training of multiple base learners, self-attention can make full use of modern computing resources, which makes its advantages in large-scale data processing more obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] The drawings constituting a part of the present application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0072] Figure 1 A flow chart of a method for estimating the driving range of a pure electric bus incorporating battery aging characteristics according to the present invention is shown;
[0073] Figure 2 Shows Figure 1 Data processing flow chart of a pure electric bus range estimation method incorporating battery aging characteristics;
[0074] Figure 3 Shows Figure 1 An example diagram of the charging process in the fast charging mode of the pure electric bus range estimation method incorporating battery aging characteristics;
[0075] Figure 4 Shows Figure 1 An example diagram of the charging process in the slow charging mode of the pure electric bus range estimation method incorporating battery aging characteristics;
[0076] Figure 5 Shows Figure 1 A first example diagram of the charging process at different accumulated mileages in the fast charging mode of the pure electric bus range estimation method incorporating battery aging characteristics;
[0077] Figure 6 Shows Figure 1 A first example diagram of the charging process at different accumulated mileages in the slow charging mode of the pure electric bus range estimation method incorporating battery aging characteristics;
[0078] Figure 7 Shows Figure 1 A second example diagram of the charging process of the fast charging mode of the pure electric bus range estimation method incorporating battery aging characteristics at different accumulated mileages;
[0079] Figure 8 Shows Figure 1 A second example diagram of the charging process of the slow charging mode of the pure electric bus range estimation method incorporating battery aging characteristics at different accumulated mileages;
[0080] Fig. 9 Shows Figure 1 A third example diagram of the charging process of the fast charging mode of the pure electric bus range estimation method incorporating battery aging characteristics at different accumulated mileages;
[0081] Fig.10 Shows Figure 1 The third example diagram of the charging process of the slow charging mode of the pure electric bus range estimation method incorporating battery aging characteristics at different accumulated mileages;
[0082] Fig.11 Shows Figure 1 The Gap Statistic curve of the fast charging mode of the pure electric bus range estimation method incorporating battery aging characteristics;
[0083] Fig.12 Shows Figure 1 The slow charging mode Gap difference bar chart of the pure electric bus range estimation method incorporating battery aging characteristics;
[0084] Fig.13 Shows Figure 1 Clustering result diagram of the fast charging mode of the pure electric bus range estimation method incorporating battery aging characteristics;
[0085] Fig.14 Shows Figure 1 Clustering result diagram of the range estimation method for pure electric buses incorporating battery aging characteristics in slow charging mode;
[0086] Fig.15 Shows Figure 1 Schematic diagram of the self-attention mechanism model of the pure electric bus range estimation method incorporating battery aging characteristics;
[0087] Fig.16 Shows Figure 1 Importance diagram of various parameters in the fast charging mode of the pure electric bus range estimation method incorporating battery aging characteristics;
[0088] Fig.17 Shows Figure 1 Importance diagram of various parameters in the slow charging mode of the pure electric bus range estimation method incorporating battery aging characteristics;
[0089] Fig.18 Shows Figure 1 Comparison of prediction results of the self-attention mechanism of the pure electric bus range estimation method that incorporates battery aging characteristics. DETAILED DESCRIPTION
[0090] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0091] like Figures 1 to 18As shown, an embodiment of the present invention provides a method for estimating the driving range of a pure electric bus incorporating battery aging characteristics, including: step 1: data processing, collecting electric bus operation data based on sensing technology and cleaning the data; step 2: characterizing battery performance based on capacity increment analysis; step 3: identifying battery aging level through system clustering of the sum of squared deviations; step 4: establishing a driving range estimation model based on a self-attention mechanism; step 5: estimating the driving range of the pure electric bus based on the driving range estimation model.
[0092] Based on a large amount of electric bus driving data and on-board battery status data, the present invention intends to use the capacity increment analysis method and the deviation square sum system clustering method to mine the driving range law and battery aging characteristics of electric buses, explore the energy consumption law of electric buses under different battery aging levels, and construct an electric bus driving energy consumption estimation model incorporating battery aging characteristics based on the self-attention mechanism. It comprehensively considers the battery degradation level, two different charging modes and 10 influencing factors, and realizes accurate estimation of energy consumption factors and battery aging levels under various operating environments. It deeply analyzes the inherent coupling law between energy consumption and battery aging, and clarifies the evolution mechanism of electric bus energy consumption factors with battery aging status.
[0093] In this embodiment, the preliminary data processing, based on sensor technology, collects the running data of electric buses and records the data corresponding to the accumulated mileage ranging from 6,000 kilometers to 130,000 kilometers. Figure 2 The process shown in the figure is used to prepare data before establishing the driving energy consumption estimation model. However, due to the instability factors in the data collection process and external interference in the data transmission process, there are generally missing values and noise in the original data set, so cubic spline interpolation is used to compensate for the missing values and clean up the outliers. Since the two urban areas provide different charging modes, they are divided into fast charging and slow charging modes. And before performing capacity increment analysis on these two charging modes respectively, "Z-score outlier detection" is used for the second data cleaning.
[0094] In this embodiment, the battery performance is characterized based on the incremental capacity analysis method. The incremental capacity analysis method (ICA) is an in-situ non-destructive electrochemical technique that can detect the gradual change of the battery aging behavior by studying the evolution of the obtained IC curve with the cycle. This method is mostly used for battery energy consumption testing under specific controlled conditions, such as constant temperature and low current operation. At present, the incremental capacity analysis method has been proven to be applicable to high current operation and actual temperature environment of electric buses. In order to effectively apply the incremental capacity analysis method, data points with stable charging current must be extracted. The currents of the fast charging and slow charging modes must be close to C / 3 and C / 10 to meet the allowable charging current range of the ICA technology. Therefore, the present invention selects data with charging current values of 98-99A and 24-25A, respectively, to describe the fast charging and slow charging processes. From Figure 3 It can be observed that the charged capacity increases with the increase of terminal voltage, and there is a sharp rise in the charged capacity between narrow intervals of terminal voltage. The terminal voltage in such intervals is defined as a voltage platform. Based on the charging current available in the data set, the battery capacity Q can be calculated by the following formula.
[0095]
[0096] However, the charging current may be affected by the external environment and show different characteristics in different charging events, and the starting and ending points of each charging cycle are not fixed. Therefore, the charging process with SOC greater than 40% in the charging data is extracted and regarded as valid data. Based on this, the following IC curve is obtained and the IC curve is smoothed using cubic smoothing splines.
[0097] It is observed that during the charging process, as the terminal voltage increases, the charging capacity gradually begins to rise, tends to level off in the middle, and then rises again. Combining the inherent properties of the battery with the driving data of the electric bus, the impact of the accumulated mileage of the electric bus on the voltage platform and charging capacity is further considered.
[0098] It is observed that as the accumulated mileage increases, the final charging capacity gradually decreases, and the slope and degree of the second increase speed in the power platform decline. Therefore, the capacity increment analysis method is introduced to draw the IC (Incremental Capacity) curve of the charging cycle. IC is the ratio of the charging capacity increment to the fixed terminal voltage increment, as shown in the following formula.
[0099]
[0100] Among them, IC n Indicates the incremental capacity at voltage step n; Q n and Q n-1They represent the battery capacity at voltage steps n and n-1 respectively; V represents the fixed increment of terminal voltage; Q n Represents the charge capacity at voltage step n.
[0101] It is observed that the incremental capacity of the fast and slow charging modes presents a similar variation trend. The reason for the IC peak is the voltage step generated by the voltage platform, and two main peaks can be observed in the IC curve.
[0102] According to existing research, the second IC peak is the result of the convolution of electrochemical reactions in active positive and negative electrode materials, which is closely related to the loss of lithium inventory, which is considered to be the main cause of LiFePO4 battery degradation. Therefore, in this study, the second IC peak was mainly analyzed. In addition to the IC peak, the voltage platform also has a certain ability to reflect battery degradation. This is because of the resistance change caused by battery aging. In order to further characterize the battery aging level, cluster analysis was performed on the IC peaks and voltage platforms of different cumulative mileages collected in fast charging mode and slow charging mode.
[0103] In this embodiment, the deviation square sum system clustering method is used to identify the battery aging level. Based on the data obtained by the ICA method, the data groups pointing to the same are classified into the same cluster. The data in different clusters represent different degrees of battery aging. The present invention uses the deviation square sum system clustering method to perform data clustering analysis on the data results obtained above. It is used to identify the battery aging level of electric buses under different conditions.
[0104] First, we create a vector space X{x1,...x2,...x3,...x n ,...}, each element represents each set of data. It contains three sub-elements, namely, the peak value p of the IC curve i , voltage platform v i , and accumulated mileage i Considering the different dimensions of the three data, we first use Z-source to standardize the data, and each data is processed as follows:
[0105]
[0106] in Indicates the standardized IC curve peak, voltage platform, and accumulated mileage data. They represent the peak value of IC curve, voltage platform, and average value of accumulated mileage respectively, and s represents the standard deviation of each type of data;
[0107] Then use Euclidean distance as the distance between samples, and its expression is:
[0108]
[0109] x i , x j Represent elements in different vector spaces, x ·k (k=1, 2, 3) respectively represent the values of the IC curve peak, voltage platform, and accumulated mileage in each column vector.
[0110] Each class is denoted by G i Indicates that the sample distance is taken as the distance between each class:
[0111] d(G i ,G j )=d(x i ,x j )
[0112] Where d(G i ,G j ) represents the distance between each class, x i , x j Representing elements in different vector spaces respectively, we can get the following initialization distance matrix:
[0113]
[0114] The two classes with the smallest distance are merged into one class, and the distance between the new classes is calculated. The clustering method in this paper uses the deviation square sum system clustering method. When merging two classes, the total intra-class deviation square sum is minimized, the class deviation square sum is maximized, and the distance between classes is defined as the inter-class deviation square sum, that is:
[0115]
[0116] Among them, x ij represents the jth sample point in the i-th class, n i represents the number of samples in the i-th class, represents the mean of the i-th class, WWS(G i ) represents the sum of squares of the intra-class deviations of a certain category, BBS(G i , G j ) represents the increment of the sum of squared deviations when classes are merged. For two classes G i G j For , the sum of squared deviations between classes can be defined as the increment of the sum of squared deviations after their merging, that is:
[0117] BBS(G i ,G j )=WWS(G i ∪G j )-[WWS(G i )+WWS(Gj )]
[0118] WWS(G i ) represents the sum of squares of the intra-class deviations of a certain category, BBS(G i , G j ) represents the increase in the sum of squared deviations when classes are merged.
[0119] And this quantity is defined as the distance between two classes. By repeating the above steps, the distance between classes is calculated, and two classes that meet the objective function of this method are merged into one class. Finally, all classes can be classified into one class, and the clustering result can be obtained according to the k value.
[0120] Regarding the value of the number of clusters k, the present invention uses the Gap Statistic method to determine the optimal value of the number of clusters k. Gap Statistic is a statistical method based on a comparison model and a reference unstructured model. It determines the number of clusters by calculating the difference between the intra-cluster variation of the data set and the intra-cluster variation of the unstructured cluster generated by random data. When the difference is large, it means that the current number of clusters can well describe the internal structure of the data.
[0121] The intra-cluster dispersion of each cluster is calculated and its expression is:
[0122]
[0123] The expression calculates the squared Euclidean distances between all possible sample points in each class, sums them, and then normalizes the value. This data can represent the total dispersion within each class and ensure that clusters of different sizes are comparable when calculating the total dispersion.
[0124] Then, using uniformly distributed random values as the reference data set, clustering them using the same method, and finding the dispersion within the cluster, and calculating the Gap value and standard error:
[0125]
[0126] Where B represents the number of samples, ln w k represents the model weight of the current step size k, represents the optimal weight parameter for the b-th sample, for Finally, we can take the k corresponding to the maximum value of Gap(k) as the optimal k value, or take whether the change in Gap(k) brings significant improvement to the target when the k value increases as the choice of k value, which is expressed as:
[0127] Gap(k)≥Gap(k+1)-s k+1
[0128] Among them, Gap(k) is used to measure the current model w k Performance vs. the best model The difference between k It is the standard error calculation representation of Gap.
[0129] For the charging data obtained from different charging conditions in the two cities, when charging quickly, the k corresponding to the maximum Gap(k) value is used as the selection of the number of clusters; when charging slowly, the latter method is selected as the selection of the k value. The present invention compares the situations corresponding to the k values in different situations, and the results are as follows Fig.11 , 12 As shown:
[0130] After determining the number of clusters, the clustering results are visualized. The visualization results are as follows Fig.13 , 14 As shown:
[0131] Among them, FDLx and SDLx represent the battery aging level under fast charging and slow charging respectively. The larger the x value, the greater the battery aging. According to the difference in the number of clusters k in the two cases, it can be seen that the fast charging and slow charging methods have a certain degree of influence on the battery aging level. With the gradual increase in mileage and the change in the peak value of the IC curve, the battery aging level is also gradually increasing.
[0132] In this embodiment, a driving range estimation model is established based on the self-attention mechanism. Based on the above obtained data such as the battery degradation level, the driving data and weather data are combined to estimate the driving range of the BEB. This study uses the self-attention mechanism method to train and model the model. The principle diagram is shown in the figure. Fig.15 As shown: First, the impact of ICA on mileage is studied. As can be seen from the figure, the model takes into account the relationship between ICA and other related factors. Using the screening results analyzed from the previous training data, v is calculated first. v is the key value. v is calculated in the same way as q and k. It is also to multiply the input a by the weight matrix W. After v is obtained, it is multiplied by the corresponding a. After each v is multiplied by a, the sum is obtained to obtain the output b1. If a1 and a2 are highly correlated, a12 is relatively large, then the output b1 may be closer to v2, that is, the attention score determines the proportion of the vector in the result. Next, the steps are the same as before, and several other variables are trained separately to obtain values such as b2 and b3. Finally, the impact of various factors on the mileage of electric vehicles is comprehensively compared. According to this method, the degree of influence of several other factors can be output accordingly.
[0133] In this data analysis, the Gini index is used as an evaluation indicator. We use VIM to represent the variable importance score and GI to represent the Gini index. Assuming m features X1, X2, X3, ...X c Now we need to calculate each feature X j Gini Index Score V IM j (Gini). The calculation formula of Gini index is:
[0134]
[0135] Among them, K means there are K categories. mk It represents the proportion of class column k in node m. Intuitively speaking, it is the probability that two samples randomly selected from node m will have inconsistent class labels. j The importance of node m, that is, the change in the Gini index before and after the node m branch is:
[0136] V IM jm (Gini) =GI m -GI l -GI r
[0137] Among them, VIM jm (Gini) Indicates the importance of feature X in node m, that is, the change in the Gini index before and after the branch of node m. The larger the value, the higher the importance of feature X in node m. m Represents the Gini index of node m before it branches. That is, the Gini index of the entire node m before it splits. l Represents the Gini index of the left child node after node m is split. That is, the Gini index of the left child node after node m is split. r Represents the Gini index of the right child node after node m is split. That is, the Gini index of the right child node after node m is split.
[0138] V I (Gini) =∑ m∈M V (Gini)
[0139] Among them VIMj (Gini) VIM represents the importance score of feature j in the i-th factor. jm (Gini) Represents the importance score of feature j in node m. This score is calculated based on the change in the Gini index. m∈M VIM jm (Gini)Indicates the sum of all nodes m. In this formula, the summation range is all nodes n belonging to the set M.
[0140] There are n important factors in total, then:
[0141]
[0142] Among them, VIM j (Gini) represents the importance score of feature j among all factors.
[0143] represents the importance score of feature j in the i-th factor. It means to sum all factors i. In this formula, the sum range is from i=1 to n.
[0144] Finally, normalize all the importance scores obtained to get the following results:
[0145]
[0146] Among them, VIM j ' represents the normalized importance score of feature j. VIM j VIM represents the original importance score of feature j in all factors. i represents the importance score of feature i among all factors, It means to sum all features i.
[0147] from Fig.16 and Fig.17 It can be seen that the degradation level of the battery has the greatest impact on the mileage, the temperature has a relatively small impact on the mileage, and the voltage has an impact on the mileage that cannot be ignored. Among them, the degradation level of the battery has the most prominent impact among all factors because it is directly related to the performance and endurance of the battery. In contrast, the effect of the temperature factor is relatively weak because it mainly affects the mileage by indirectly affecting the battery performance or other factors. For example, temperature may affect the working efficiency and life of the battery; while the voltage factor may directly affect the power output and mileage of the vehicle. In addition, when considering the impact of battery degradation on the mileage estimation, there is a significant difference between the fast charging and slow charging modes. It is observed that the fast charging mode has a higher impact on battery degradation than the slow charging mode. Such results indicate that the fast charging mode has a greater impact on battery degradation than the slow charging mode. In other words, the battery performance in the slow charging mode deteriorates more slowly than in the fast charging mode. However, compared with the fast charging mode, the slow charging mode spends more time in the charging event, which may affect the efficiency of traffic operations.
[0148] Finally, we verify the accuracy of the model based on the existing data. The following is a comparison between the prediction results of the self-attention mechanism and the true value. Fig.18 As shown, the prediction result R-squared = 0.999071.
[0149] Fig.18 The data points are roughly distributed along the diagonal, indicating that the model's predicted values are very close to the true values. The result of R-squared = 0.999071 further verifies this, indicating that the self-attention mechanism performs well in capturing complex relationships in the data.
[0150] The present invention proposes an electric bus battery aging level identification method that effectively combines the capacity increment analysis method and the deviation square sum system clustering method; an electric bus range estimation method based on the self-attention mechanism and incorporating battery aging characteristics. The prior art usually uses traditional methods such as k-means clustering, which will result in excessive duplication of the final results and affect the final model establishment. The present invention uses the deviation square sum system clustering instead, and the clustering results obtained are improved.
[0151] In addition, the present invention chooses to construct the driving energy consumption of electric buses based on the self-attention mechanism. Compared with the traditional integrated machine learning method, the self-attention mechanism performs better in processing high-dimensional and sequence data. The self-attention mechanism can capture the dependencies between different positions in the sequence. Compared with the integrated method, which usually requires the gradual training of multiple base learners, self-attention can make full use of modern computing resources, which makes its advantages in large-scale data processing more obvious.
[0152] For the deviation square sum system clustering, Gaussian mixture model or other traditional clustering methods can be used for cluster analysis, but the different clustering repetitions of each method will affect the accuracy of the subsequent driving energy consumption estimation model. The advantage of the deviation square sum system clustering method is that it provides a quantitative evaluation standard that can effectively measure the compactness and separation of clustering results, and supports the optimization of the number of clusters through the elbow method, thereby effectively guiding the selection and adjustment of clustering models, and is suitable for the analysis needs of diverse data sets.
[0153] For the electric bus range estimation model based on the self-attention mechanism, although traditional machine learning methods such as random forests can also obtain prediction results, it is difficult to effectively detect the long-term window period where the battery aging level exists, which affects the accuracy of the results. During the driving process of electric buses, the performance of the battery is affected by many factors, such as charging status, ambient temperature, etc. The relationship between these factors may show complex interactive patterns over a long period of time. The advantage of the self-attention mechanism lies in its ability to effectively handle long dependencies in time series data to improve the interpretability of the model.
[0154] From the above description, it can be seen that the above embodiments of the present invention achieve the following technical effects:
[0155] The present invention constructs the driving energy consumption of electric buses based on the self-attention mechanism. Compared with the traditional integrated machine learning method, the self-attention mechanism performs better in processing high-dimensional and sequence data. The self-attention mechanism can capture the dependencies between different positions in the sequence. Compared with the integrated method, which usually requires the gradual training of multiple base learners, self-attention can make full use of modern computing resources, which makes its advantages in large-scale data processing more obvious.
[0156] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for estimating the driving range of a pure electric bus incorporating battery aging characteristics, characterized in that: The steps include: Step 1: Data processing: collect electric bus operation data based on sensor technology and clean the data; Step 2: Characterize battery performance based on capacity increment analysis; Step 3: Identify the battery aging level through the system clustering of the sum of squared deviations; Step 4: Establish a driving range estimation model based on the self-attention mechanism; Step 5: Estimate the driving range of the pure electric bus based on the driving range estimation model.
2. The method for estimating the driving range of a pure electric bus incorporating battery aging characteristics as claimed in claim 1, characterized in that: In step 1, cubic spline interpolation is used to compensate for missing values and clean outliers. Different charging modes are provided according to urban areas, which are divided into fast charging and slow charging modes. Before performing capacity increment analysis on these two charging modes respectively, Z-score outlier detection is used to perform a second data cleaning.
3. The method for estimating the driving range of a pure electric bus incorporating battery aging characteristics as claimed in claim 1, characterized in that: In step 2, the inherent properties of the battery are combined with the driving data of the electric bus, and the influence of the cumulative mileage of the electric bus on the voltage platform and the charging capacity is further considered; The capacity increment analysis method is introduced to draw the IC curve of the charging cycle. IC is the ratio of the charging capacity increment to the fixed increment of the terminal voltage, as shown in the following formula: Among them, IC n Indicates the incremental capacity at voltage step n; Q n and Q n-1 They represent the battery capacity at voltage steps n and n-1 respectively; V represents the fixed increment of terminal voltage; Q n represents the charge capacity at voltage step n; To further characterize the battery aging level, cluster analysis was performed on the IC peak values and voltage platforms of different cumulative mileages collected in fast charging mode and slow charging mode.
4. The method for estimating the driving range of a pure electric bus incorporating battery aging characteristics as claimed in claim 1, characterized in that: In step 3, first establish a vector space X{x1,...x2,...x3,...x n ,...}, each element represents each set of data, including three sub-elements, namely, the peak value p of the IC curve i , voltage platform v i , and accumulated mileage i , first use Z-source to standardize the data, and each data is processed as follows: Among them, p i 0 ,v i 0 ,l i 0 Indicates the standardized IC curve peak, voltage platform, and accumulated mileage data. They represent the IC curve peak, voltage platform, and average value of accumulated mileage, respectively, and s represents the standard deviation of each type of data; Among them, the standardized data were used for cluster analysis.
5. The method for estimating the driving range of a pure electric bus incorporating battery aging characteristics as claimed in claim 1, characterized in that: In step 3, the Euclidean distance is used as the distance between samples, and its expression is: Among them, x i , x j Represent elements in different vector spaces, x ·k (k=1, 2, 3) represents the value of IC curve peak, voltage platform, and accumulated mileage in each column vector respectively; Each class is denoted by G i Indicates that the sample distance is taken as the distance between each class: d(G i ,G j )=d(x i ,x j ) Among them, d(G i ,G j ) represents the distance between each class, x i , x j Representing elements in different vector spaces respectively, we can get the following initialization distance matrix: Among them, D0 represents the initial distance between each class; The two classes with the smallest distance are combined into one class, and the distance between the new classes is calculated.
6. The method for estimating the driving range of a pure electric bus incorporating battery aging characteristics as claimed in claim 1, characterized in that: In step 3, the clustering method uses the deviation square sum system clustering method. When merging two classes, the total intra-class deviation square sum is minimized, the class deviation square sum is maximized, and the distance between classes is defined as the inter-class deviation square sum, that is: Among them, x ij represents the jth sample point in the i-th class, n i represents the number of samples in the i-th class, represents the mean of the i-th class, WWS(G i ) represents the sum of squares of the intra-class deviations of a certain category, BBS(G i , G j ) represents the increment of the sum of squared deviations when classes are merged; for two classes G i G j For , the sum of squared deviations between classes can be defined as the increment of the sum of squared deviations after their merging, that is: BBS(G i ,G j )=WWS(G i ∪G j )-[WWS(G i )+WWS(G j )] Among them, WWS (G i ) represents the sum of squares of the intra-class deviations of a certain category, BBS(G i , G j ) represents the increase in the sum of squared deviations when classes are merged; And this quantity is defined as the distance between two classes. By repeatedly calculating the distance between classes, and merging two classes that meet the objective function of this method into one class, all classes can be classified into one class eventually, and the clustering result can be obtained according to the k value.
7. The method for estimating the driving range of a pure electric bus incorporating battery aging characteristics as claimed in claim 1, characterized in that: In step 3, regarding the value of the number of clusters k, the Gap Statistic method is used to determine the optimal value of the number of clusters k. The number of clusters is determined by calculating the difference between the intra-cluster variation of the data set and the intra-cluster variation of the unstructured cluster generated by random data, and the intra-cluster dispersion of each cluster is calculated, and its expression is: Among them, W K represents the intra-cluster dispersion of each cluster, n i represents the number of samples in the i-th class, x i , x j Represent elements in different vector spaces, x ·k (k=1, 2, 3) represents the value of IC curve peak, voltage platform, and accumulated mileage in each column vector respectively; The expression obtains the squared Euclidean distances between all possible sample points in each class, sums them up, and then normalizes the value.
8. The method for estimating the driving range of a pure electric bus incorporating battery aging characteristics as claimed in claim 1, characterized in that: In step 3, uniformly distributed random values are used as reference data sets, clustered using the same method, and the dispersion within the cluster is calculated, and the Gap value and standard error are calculated: Where B represents the number of samples, ln w k represents the model weight of the current step size k, represents the optimal weight parameter for the b-th sample, for The mean of Gap(k); Finally, we can take the k corresponding to the maximum value of Gap(k) as the optimal k value, or take whether the change in Gap(k) brings significant improvement to the target when the k value increases as the choice of k value, which is expressed as: Gap(k)≥Gap(k+1)-s k+1 Among them, Gap(k) is used to measure the current model w k Performance vs. the best model The difference between k It is the standard error calculation representation of Gap.
9. The method for estimating the driving range of a pure electric bus incorporating battery aging characteristics as claimed in claim 1, characterized in that: In step 4, the Gini index is used as an evaluation index, the variable importance score is represented by VIM, and the Gini index is represented by GI. Assuming m features X1, X2, X3, ... X c , calculate each feature X j Gini Index Score V IM j (Gini).
10. The method for estimating the driving range of a pure electric bus incorporating battery aging characteristics as claimed in claim 1, characterized in that: In step 4, the calculation formula of the Gini index is: Among them, K means there are K categories, P mk It represents the proportion of class column k in node m, that is, the probability that two samples are randomly selected from node m and their class labels are inconsistent; feature X j The importance of node m, that is, the change in the Gini index before and after the node m branch is: VIM jm (Gini) =GI m -AND l -AND r Among them, VIM jm (Gini) Indicates the importance of feature X in node m, that is, the change in the Gini index before and after the node m branch; the larger this value is, the more important feature X is in node m; GI m Represents the Gini index of node m before branching; that is, the Gini index of the entire node m before node m splits; GI l Represents the Gini index of the left child node after node m is split; that is, after node m is split, the Gini index of the left child node; GI r Represents the Gini index of the right child node after node m is split; that is, the Gini index of the right child node after node m is split; Then X j The importance of the i-th factor is: Among them, VIMj (Gini) represents the importance score of feature j in the i-th factor; VIM jm (Gini) Represents the importance score of feature j in node m; this score is calculated based on the change in the Gini index; ∑ m∈M VIM jm (Gini) Indicates the sum of all nodes m; in this formula, the summation range is all nodes n belonging to the set M; There are n important factors in total, then: Among them, VIM j (Gini) represents the importance score of feature j among all factors; represents the importance score of feature j in the i-th factor; It means to sum all factors i; in this formula, the sum range is from i=1 to n; Finally, normalize all the importance scores obtained to get the following results: Among them, VIM j ' represents the normalized importance score of feature j, VIM j VIM represents the original importance score of feature j in all factors. i represents the importance score of feature i among all factors, It means to sum all features i.