1. Introduction
The rapid development of electric vehicles has provided humans with a clean and efficient way to travel, and their market share is gradually increasing [
1,
2]. Along with the booming development of electric vehicles, the production of power batteries has also shown growth [
3,
4,
5]. Lithium-ion batteries are widely used in electric vehicles due to their high energy density and long cycle life [
6]. With the operation of electric vehicles, lithium-ion battery life will decay, and the inconsistency between the batteries will increase; in order to ensure the safe operation of electric vehicles, the battery needs to be replaced [
7], but the retired batteries can be utilized for secondary use in circumstances where the battery performance requirements are lower [
8]. In the whole life cycle of the power battery, its utilization mainly includes four stages [
9], as shown in
Figure 1. Firstly, the new battery will be applied to electric vehicles and can be applied in other scenarios when its lifespan decreases to a certain extent. Batteries with better performance can be applied in scenarios such as low-speed electric bicycles, mobile power, etc. Batteries with poorer performance are generally applied in places such as energy storage power stations. Batteries with capacities lower than 30% or 20% [
10] will be dismantled and recycled.
In order to ensure the safety of the echelon utilization of retired batteries, it is necessary to carry out appearance detection of batteries before utilization, eliminating batteries with bulging packs, liquid leakage, and case deformation [
11]. At the same time, due to the different degrees of aging of batteries, the internal indicators have a large difference. If not sorted and regrouped, the inconsistency between batteries will lead to excessive aging of the batteries and the risk of thermal runaway. Therefore, appearance detection, sorting, and regrouping of batteries are necessary for echelon utilization.
Since the echelon utilization of retired batteries is still in its infancy, appearance filtering standards are not perfect. The appearance filtering of retired batteries remains at the stage of manual filtering [
12], mainly through visual observation, eliminating bulging, leaking, and deformed batteries, but manual observation depends on the professional ability and quality of the staff. At the same time, leaking and bulging batteries also have certain safety hazards, and the direct contact of manpower will have a certain degree of risk. Zhou et al. [
13] detected the location and status of retired batteries through machine vision and proposed a combination of manual and robotic methods for the echelon utilization of retired batteries. In the stage of the new battery leaving the factory, the appearance detection of the battery is mainly realized by machine vision. Zhang et al. [
14] proposed a method based on machine vision to realize the scratch detection of the battery appearance, which overcomes the disadvantages of manual detection. Machine vision greatly improves the speed and accuracy of appearance detection. In the stage of filtering the appearance of retired batteries, there are few studies that utilize machine vision for filtering. On the one hand, due to the diverse appearance of retired batteries, it is necessary to simultaneously detect features such as bulging, leakage, and deformation. On the other hand, the construction of a retired batteries appearance dataset is also more difficult.
Sorting of retired batteries is intended to classify batteries with similar performance, while the purpose of regrouping is to recombine similar batteries for secondary utilization [
15]. The consistency of retired batteries varies widely due to differences in battery usage environments, operating conditions, and even driving habits [
16], and these differences are mainly reflected in parameters such as capacity and internal resistance. Jiang et al. [
17] evaluated the consistency of retired batteries in terms of both capacity and internal resistance and analyzed the correlation between them. Lai et al. [
18] analyzed the relationship between the charging curve and the available capacity, combined with the scenario of echelon utilization of retired batteries, and proposed an improved K-means algorithm for regrouping. Wang et al. [
19] introduced a clustering methodology that combines density-based spatial clustering of applications with noise (DBSCAN) with K-means, resulting in improved accuracy in the regrouping process. In previous studies, numerous researchers [
20,
21] have concentrated on assessing the influence of battery capacity and internal resistance on echelon utilization. Nevertheless, during battery regrouping, disparities in open-circuit voltage can result in internal charging between modules, thereby compromising the safety of echelon utilization. Additionally, initial parameters, such as the number of clusters in various clustering algorithms, wield significant influence on the regrouping process. Current clustering methods, including K-means and Gaussian mixture model (GMM), often necessitate manual selection of the cluster count [
22], rendering them unsuitable for the extensive clustering and regrouping requirements of retired batteries.
Based on the above analysis, the limitations of the existing technology of echelon use mainly include:
- (1)
The appearance filtering of retired batteries has an important impact on their safe application, but the existing program mainly carries out manual observation filtering, the filtering accuracy is not guaranteed, and the manual filtering also has safety risks.
- (2)
A large number of studies have taken battery capacity and internal resistance as sorting indicators, ignoring the influence of open-circuit voltage on the echelon utilization of the battery, while the binary evaluation indicators make it difficult to comprehensively assess the state of the battery.
- (3)
Existing regrouping algorithms are mainly aimed at evaluating the advantages and disadvantages of a certain batch of batteries, without taking into account the actual scenario of echelon utilization, and at the same time, the algorithm parameters are often chosen artificially in regrouping.
In order to fill these research gaps, this paper delves into research on technology for the detection, sorting, and regrouping of retired batteries. The main structure of the article is shown in
Figure 2, which mainly contains the following contributions:
- (1)
The paper examines the criteria for screening the appearance of retired batteries and introduces a method for capturing appearance features through dual-image acquisition. Subsequently, retired battery appearance screening is achieved using the machine learning method.
- (2)
Retired batteries are sorted according to different application scenarios through the analytic hierarchy process (AHP) and Gray relation analysis (GRA), laying the foundation for subsequent high-precision battery regrouping.
- (3)
A hybrid DBSCAN-GMM algorithm is proposed, which can adaptively adjust the number of clustering clusters and related parameters. This algorithm aims to minimize disparities among batteries within the same group, ultimately enhancing regrouping accuracy.
2. Construction of Retired Battery Appearance Dataset
In this section, the appearance filtering criteria of retired batteries are analyzed, and a method for acquiring the appearance characteristics of retired batteries by two image acquisitions is proposed.
2.1. Criteria for Appearance Filtering of Retired Batteries
The retired battery analyzed in this paper is a square 20 Ah lithium iron phosphate power battery, a battery widely used by electric vehicles, and its main performance parameters are shown in
Table 1.
During the electric vehicle usage phase, various operating conditions lead to defects like bulging, liquid leakage, and deformation in the batteries. Therefore, in the echelon utilization of retired batteries, the first step for disassembled single batteries is appearance filtering. Only the batteries meeting the appearance filtering standards are permitted to proceed to the echelon utilization stage [
23]. Generally speaking, the appearance filtering of single batteries is mainly from the lugs as well as the case to check the appearance status of the battery. The desirable condition of the lugs and the case are illustrated in
Figure 3a,d.
- (1)
Single battery lugs are stained and broken in appearance, as shown in
Figure 3b,c. This is mainly due to improper operation of the battery in the electric vehicle use and battery pack disassembly stage, and this type of retired battery is not suitable for echelon utilization.
- (2)
The cases of single batteries are bulging and deformed as shown in
Figure 3e,f. This is mainly due to the battery production stage process that is poor or in the electric vehicle application stage of over-charging, over-discharging. Consequently, batteries of this nature should be deemed unfit for use and should undergo scrapping and dismantling.
2.2. Image Acquisition Platform Construction for Retired Batteries
The retired battery image acquisition platform is mainly composed of industrial cameras, lenses, and light sources.
2.2.1. Image Acquisition Platform Program Design
In the process of image acquisition, due to the diversity of appearance defects in retired batteries, it is not possible to capture all features in a single acquisition. However, collecting data too frequently decreases the system efficiency. To strike a balance between sampling accuracy and efficiency, this paper proposes a method of detecting the appearance features of retired batteries by two image acquisitions, and the main process is shown in
Figure 4. Firstly, the battery is loaded through the machine with the lugs facing upwards, and the industrial camera captures the battery lug features. Followed by battery flipping, the industrial camera captures the lower battery features.
In the first image acquisition, the main focus is on the features of the two lugs of the square battery, and the stains and damages to the lugs are recognized. In the second shooting, the lower part of the battery is selected for the purpose of acquiring features such as bulging and deformation of the battery case in one shot. Because the deformation and bulging of the battery cannot be fully captured from a single side view, employing multiple side views would complicate the system. However, the lower part of the battery is relatively flat, without lugs, pressured relief holes, or other features that might obstruct the view of the battery case’s bulging and deformation. This approach allows for the comprehensive capture of all appearance characteristics of square batteries, ensuring accurate identification while enhancing system efficiency.
2.2.2. Selection of Industrial Cameras, Lenses, and Light Sources
In image acquisition, the camera is used to collect the characteristics of retired batteries, and the camera performance directly affects the quality of the image. To enhance the precision of appearance filtering while ensuring the system’s reliability, an OSG130-210UM industrial camera was selected in this study. In the image acquisition system, an industrial camera is paired with a lens to facilitate image acquisition. The lens modulates light, transmitting the target imaging information to the camera’s image sensor. Considering factors such as focal length, aperture, and depth of field, this paper opted for the VM04018MPIR lens. Light sources are another important part of the image acquisition platform. Although the choice of the light source should not only take into account the final image of the imaging conditions, ensuring that the characteristics of the retired batteries can be completely presented, this paper chose a JS-RL-90-60 white ring light source. The main parameters of the industrial camera, lens, and light source are shown in
Table 2.
2.3. Construction and Enhancement of Retired Battery Dataset
On the image acquisition platform, image acquisition of retired batteries acquired from factories is carried out to obtain the original images of retired batteries, and the acquired lugs and case images are classified as defective or good, respectively. The images acquired are often interfered with by the complex external environment, and it is necessary to pre-process the images in order to improve the image quality. The original image has a resolution of 1280 × 1024. After removing the background and cropping in a way that the target subject occupies the majority of the image, all the images are uniformly resized to 224 × 224.
The image data augmentation primarily involves random flipping, random mirroring, and proportional scaling. The augmented lug dataset comprises a total of 800 images, consisting of 500 good and 300 defective images. Similarly, the case dataset comprises 500 images, with 300 good and 200 defective images.
4. Sorting Retired Batteries based on AHP and GRA
This section mainly introduces the indicators of retired batteries, selects capacity, internal resistance, and open-circuit voltage as the basis of sorting, and completes the sorting of retired batteries through AHP and GRA.
4.1. Selection of Evaluation Indicators of Retired Battery Performance
Due to different manufacturing processes and operating conditions, the internal parameters of retired batteries show inconsistency [
29], and the impact of this inconsistency on echelon utilization is mainly reflected in the following three aspects:
- (1)
Inconsistency of capacity parameters: inconsistent capacity of single batteries used in groups; when the lower capacity of one battery is fully charged, the others are still charging. It results in over-charging or over-discharging, which reduces the life of the battery pack.
- (2)
Inconsistency of the internal resistance of the battery: the internal resistance of the battery leads to a large thermal loss, which deteriorates the battery’s performance in use. After the batteries are used in groups, it leads to a decline in the overall battery pack performance and causes safety problems.
- (3)
Inconsistency of open-circuit voltage: the inconsistency of battery voltage leads to the charging of single batteries in the battery pack, and batteries with higher voltage charge batteries with lower voltage, which accelerates the degradation of the battery performance and depletion of the energy of the whole battery pack.
In order to improve the consistency of the batteries after regrouping, three indicators, namely, capacity, internal resistance, and open-circuit voltage, are chosen to evaluate, sort, and regroup the single batteries.
4.2. Analytic Hierarchy Process
AHP [
30] is a multi-criteria decision-making method that combines qualitative and quantitative analysis. In this paper, the target layer is determined to be the performance of retired batteries, the guidelines layer is the battery performance, which contains security, energy conversion efficiency, and degradation rate, and the program layer is the battery indicator, which contains capacity, internal resistance, and open-circuit voltage, and the hierarchical analysis structure is shown in
Figure 7.
The AHP method constructs a judgment matrix by comparing the importance of two indicators with each other. Matrix
A is the judgment matrix of the target layer and the guideline layer, where the element
in matrix
A represents the importance of
i to
j, which needs to meet the conditions of Equation (5).
Table 4 shows the criteria assignments for dividing the importance level.
Based on the degree of influence between performances, five experts discussed and discussed the scores of each group of performances, and ultimately obtained the judgment matrix
A as follows:
By analogy, the judgment matrices for the guideline layer are as follows, and
is the degree of importance between indicators.
To ensure the reliability of the results, a consistency test of each judgment matrix is required:
where
is the consistency index,
is the consistency rate;
is the maximum eigenvalue of the judgment matrix;
is the order of the judgment matrix (the number of elements of the program layer), and
is the degree of freedom index, taking the value of 0.58. When
< 0.1, it is considered that the judgment matrix meets the consistency requirements.
Table 5 shows the calculation results of the judgment matrix; the consistency rate of each judgment matrix is less than 0.1, which meets the consistency test standard.
After completing the construction and inspection of the judgment matrix, the weights of the target layer and the program layer can be calculated by weighting each layer, as shown in
Table 6. The weights of battery capacity, internal resistance, and open-circuit voltage for battery performance
are 0.3176, 0.4548, and 0.2276, respectively.
4.3. Gray Relation Analysis
GRA can quantitatively describe the degree of relative change between objects [
31]; the basic idea is to set a set of optimal performance indicators of retired batteries as a reference sequence, with the measured value of the current battery performance as a comparative sequence, calculate the correlation between the comparative sequence and the reference sequence, and then classify the retired batteries according to the size of the correlation, and the correlation calculation steps are as follows:
- (1)
Determine the optimal indicator values
Set the optimal values of capacity, internal resistance, and open-circuit voltage as 20 Ah, 1.5 mΩ, and 3.2 V, and form the optimal indicators set .
- (2)
Dimensionless
Since the capacity and open-circuit voltage are gradually decreasing while the internal resistance is gradually increasing during the aging process of the battery, Equation (9) is used for dimensionless quantization of the capacity and open-circuit voltage indicators, and Equation (10) is used for dimensionless quantization of the internal resistance.
where
represents the dimensionless value of the
r-th indicator for the
s-th battery.
is the raw value of the
r-th indicator for the
s-th battery.
represents the minimum value of performance for the
r-th indicator in the original data, while
represents the maximum value of performance for the
r-th indicator,
n represents the dimension of the indicator, value is 3, and
m represents the number of batteries.
- (3)
Calculation of correlation coefficient and correlation degree
The correlation coefficient between each indicator of the target to be evaluated and its corresponding optimal indicators is as follows:
where
is the correlation coefficient between the
r-th indicator of the
s-th battery to be evaluated and its optimal indicator,
is the optimal indicator value from vector
, and
takes the value of 0.5.
Therefore, the correlation coefficient between the
s-th battery to be evaluated and the optimal indicator set is noted with
and calculated as follows:
where
is the number of evaluation indicators, value is 3;
is the weight of the
r-th indicator, and the results are shown in
Table 6. The larger the correlation
, the closer the indicators of the battery are to the optimal indicators, indicating better performance.
The correlation coefficients of 335 retired batteries are calculated according to the set of optimal indicators, and the results are shown in
Table 7.
4.4. Sorting of Retired Batteries
Considering the actual application scenarios of retired batteries [
9,
10], the battery data are categorized into four categories based on the different correlations between retired batteries and new batteries, as shown in
Table 8.
Based on the correlation of the batteries, 335 retired batteries were categorized according to the criteria in
Table 8, and the number of batteries belonging to categories A, B, C, and D were 21, 219, 88, and 7, respectively.
5. Regrouping of Retired Batteries Based on DBSCAN-GMM
After AHP and GRA, retired batteries are classified into four categories, A, B, C, and D. However, there are still large differences in each category, so the first three categories need to be regrouped into different clusters. To enhance the consistency of batteries after grouping, a clustering algorithm is utilized for batteries in Category A, Category B, and Category C. This algorithm groups individual batteries with similar characteristics into distinct clusters within each category, enabling subsequent series and parallel connections within a battery module or pack.
5.1. DBSCAN Algorithm and Gaussian Mixture Model
5.1.1. DBSCAN Algorithm
The DBSCAN algorithm is mainly based on density [
32] without determining the number of clusters and recognizes outliers as noise. The main algorithm steps are as follows:
- (1)
Input battery feature vectors set, which contains n-dimensional vectors of m batteries, and input the density threshold
and the maximum radius .
- (2)
Find the subset of
neighborhood of all batteries; if the number of batteries in the subset is greater than or equal to
, the battery is added to the core battery set; if it is not satisfied, the battery is marked as a noise point.
- (3)
In the core battery collection, randomly select a battery, create a new set, add all batteries in its neighborhood to the cluster, and repeat the check of all batteries in the neighborhood of the battery in the cluster.
- (4)
Randomly select an unselected battery in the updated core battery set, repeat step (3) until all batteries are selected, and output the segmentation results.
Although DBSCAN does not need to determine the number of clusters, it is less effective when the density of data clusters is not uniform [
33].
5.1.2. Gaussian Mixture Model
GMM is a probabilistic-based clustering method [
34], which is computed by iterative optimization using the expectation maximization (EM) algorithm [
35]. The EM algorithm is an iterative approach to solving a special maximum likelihood problem. It aims to discover the maximum likelihood solution by introducing hidden variables and establishing the distribution of these hidden variables as a posterior distribution, conditioned on the observed variables.
In applying the GMM, it is assumed that the battery characteristic indicator
has
n features, which obey the Gaussian distribution of Equation (13):
where
is the number of Gaussian models, which is the number of clusters determined by the DBSCAN algorithm,
represents the weight coefficient of the
i-th mixed model, and
is the probability density distribution function, which is expressed as:
where parameter
is the mean vector and
is the covariance matrix, and Equation (19) gives its expression.
For the convenience of calculation, the hidden variable
is introduced. When Equation (15) is satisfied, battery
xj belongs to the
i-th Gaussian distribution.
Taking the logarithm of the maximum likelihood function for the dataset when the hidden variables are known yields the log-likelihood function as shown in Equation (16):
5.2. DBSCAN-GMM Algorithm
The GMM algorithm requires prior knowledge of the number of clusters, and it introduces randomness during the selection of initial points. The algorithm’s iterative process can become complex and uncertain, with the EM algorithm being sensitive to initial parameters, potentially leading to local optima. In response to these challenges, this paper introduces a novel approach called the DBSCAN-GMM algorithm. It begins by utilizing the DBSCAN algorithm for initialization, followed by employing the EM algorithm for Gaussian model clustering once the centroids and model parameters have been established. The primary steps of this algorithm are illustrated in
Figure 8, and its algorithmic procedure is as follows:
- (1)
Input battery feature vector date set and parameters , .
- (2)
Based on the DBSCAN algorithm, the initial clustering cluster
is obtained. By computing the mean vectors for cluster , the data vector closest to is selected as the center of the i-th cluster, resulting in cluster centers . The parameters’ set
of the GMM model is then initialized with this information.
- (3)
Substitute the retired battery dataset into the initialized model, and calculate the 1st to k-th Gaussian distribution probabilities for each battery in the dataset:
- (4)
The retired battery dataset
data points are weighted with the probabilities from step (3) and the parameters of each Gaussian model are calculated and updated:
- (5)
Update the parameters of the GMM algorithm and then proceed to the next iteration, given a sufficiently small threshold , and after several repeated iterations, when the conditions of Equation (21) are satisfied, exit the loop iteration to obtain the final converged model parameters, is the change rate of the log-likelihood function, calculated using Equation (16).
- (6)
For , select the largest , assign the batteries to their respective cluster , and finally get l clusters, the division of clusters for .
5.3. Evaluation Metrics and Clustering Results
Common clustering evaluation indexes include the silhouette index (
SI), Davies–Bouldin index (
DBI), and Krzanowski–Lai index (
KLI) [
36]. In order to verify the effectiveness and accuracy of the proposed algorithm, two indicators,
SI and
DBI, are chosen in this paper.
SI describes the compactness within clusters and the separateness between clusters; the larger
SI is, the better the clustering effect, denoted as:
where
is the average distance from battery
to other batteries in the cluster, and
is the minimum value of the average distance from battery
to batteries in other clusters.
DBI represents the correlation between clusters by describing the spacing between the intra-cluster scatter of the batteries and the clustering centers, and the smaller the
DBI, the better the clustering results, which is expressed as:
where
is the number of clusters,
denotes the average distance of all batteries in cluster
to its clustering center,
denotes the average distance of all battery points in cluster
to its clustering center, and
is the distance in clusters
and
.
The DBSCAN-GMM clustering algorithm was used to group similar batteries based on the three indicators of battery capacity, internal resistance, and open-circuit voltage; 21 retired batteries in Category A were divided into 2 groups; 219 retired batteries in Category B were divided into 5 groups; 88 retired batteries in Category C were divided into 5 groups, and the results of the grouping are shown in
Figure 9.
Table 9 shows the clustering results of different algorithms. For Category A, the
SI of the proposed algorithm is 0.796, which is 34% and 28% higher than the two benchmark algorithms, and the
DBI is 0.247, which is 41% and 38% lower than the two benchmark algorithms, respectively; in Category B and C batteries, the
SI and
DBI of the proposed algorithm are also better than the two benchmark algorithms, which show a higher accuracy and better clustering results.
In order to judge the consistency between the batteries after clustering by different clustering algorithms, the maximum indicator difference of the batteries after clustering is calculated separately for each category of batteries, as shown in
Table 10. The maximum capacity difference of the proposed algorithm is 1.89 Ah, the maximum internal resistance difference is 0.2 mΩ, and the maximum open-circuit voltage difference is 0.04 V after clustering of the batteries in Category A. Compared with the DBSCAN algorithm, the consistency of the capacity, the internal resistance, and the open-circuit voltage are improved by 10.8%, 9%, and 33%, respectively, and the consistency of the proposed algorithm is increased by 5.9%, 9%, and 20% compared to the GMM algorithm, respectively. The proposed algorithm also improves the inter-battery consistency to a different extent compared to the two benchmark algorithms grouped together in Category B and Category C.