Lithium battery pack early internal short circuit automatic identification method and system based on dynamic time warping sequence and Gaussian mixture model clustering
By using the methods of dynamic time warping sequence and Gaussian mixture model clustering, the misdiagnosis and threshold setting problems of early internal short circuit detection in lithium-ion batteries are solved, accurate fault identification is achieved without the need for online deployment, and the accuracy of early internal short circuit detection in lithium-ion battery packs is improved.
Patent Information
- Application Number
- CN202510754691.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-09-16
AI Technical Summary
Existing methods for detecting early internal short circuits in lithium-ion batteries have problems with misdiagnosis or missed diagnosis, and require manual setting of detection thresholds, making them difficult to deploy online.
A method based on dynamic time warping sequence and Gaussian mixture model clustering is adopted. By sorting, segmenting and calculating the DTW distance of the cell terminal voltages in the battery pack, the maximum and average values of the DTW sequence are extracted, and the Gaussian mixture model clustering algorithm is used to automatically identify early internal short-circuit cells.
There is no need to establish a battery model or set a diagnostic threshold. It can accurately identify early internal short-circuit cells, improve detection accuracy, and does not require labeled training data, making it suitable for online fault detection.
Smart Images

Figure CN120654015A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to early-stage internal short circuit fault diagnosis of energy storage lithium-ion battery packs, belongs to the field of lithium-ion battery fault diagnosis, and specifically relates to a method and system for automatically identifying early-stage internal short circuits of lithium battery packs based on dynamic time warping sequences and Gaussian mixture model clustering. Background Art
[0002] Lithium-ion batteries, with their excellent cycle performance, high energy density, and environmentally friendly advantages, have become one of the preferred carriers for large-scale energy storage. As a high-energy-density energy carrier, lithium-ion batteries are susceptible to fire and explosion accidents when misused. Fire safety issues in lithium-ion batteries for energy storage have become a critical challenge that must be overcome for the stable and healthy development of the energy storage industry. Internal short circuits are one of the most common causes of thermal runaway in lithium-ion batteries. Relevant research has provided ample evidence that internal short circuits undergo a very long evolutionary process before they develop into thermal runaway. In the early stages of an internal short circuit, the internal short circuit resistance is high, the internal short circuit current and heat generation are very low, and there is no significant temperature change in the battery. When an internal short circuit reaches its final stage, thermal runaway is immediately triggered by the breakdown of the battery separator. Therefore, the final stage of the internal short circuit is extremely short. Because thermal runaway is immediately triggered once an internal short circuit reaches its final stage, detection and response to internal short circuits must be implemented at the earliest possible stage.
[0003] Existing early internal short circuit detection methods can be divided into: consistency difference-based methods, model-based methods, and self-discharge detection-based methods. They have made some progress in early internal short circuit detection of lithium-ion batteries, but still have the following limitations:
[0004] First, existing methods generally perform internal short circuit detection based on raw voltage data. However, in the early stages, the voltage of lithium-ion batteries does not undergo obvious abnormal changes, resulting in the voltage of early internal short-circuited cells being mixed with the voltage of normal cells. Therefore, existing detection methods based on raw voltage data may result in misdiagnosis or missed diagnosis. Second, the detection process of existing methods generally requires manual pre-setting of detection thresholds. The choice of threshold directly determines the accuracy of fault detection. Too high a threshold may lead to missed diagnosis, while too low a threshold may cause false alarms. Determining the correct detection threshold often requires a large amount of offline testing, which is often very time-consuming and not conducive to the online deployment of diagnostic methods. Therefore, how to avoid threshold setting problems and amplify the characteristic differences between normal cells and early internal short-circuited cells in lithium-ion battery packs to improve the accuracy of diagnosis is an urgent problem that needs to be solved. Summary of the Invention
[0005] In order to solve the problems existing in the prior art, the present invention provides a method and system for automatically identifying early internal short circuits in lithium battery packs based on dynamic time warping sequences and Gaussian mixture model clustering. By amplifying the differences between normal cells and early internal short circuit cells in the battery pack, the automatic identification of early internal short circuits in energy storage lithium-ion battery packs can be achieved.
[0006] To achieve the above object, the present invention provides the following solutions:
[0007] A method for automatically identifying early internal short circuits in lithium battery packs based on dynamic time warping sequences and Gaussian mixture model clustering, the method comprising:
[0008] S1: Sort the terminal voltages of all cells in the battery pack in ascending order at each moment to obtain a median terminal voltage curve;
[0009] S2: Split the median terminal voltage curve and the cell terminal voltage curve into overlapping subsequences based on a sliding time window, and calculate the DTW distance between the subsequences of the median terminal voltage curve and the subsequences of the cell terminal voltage curve;
[0010] S3: Based on the results of S2, obtain the DTW sequence of each monomer, extract the maximum value and average value two statistical features from the DTW sequence to characterize the state of each monomer;
[0011] S4: The extracted statistical features are input into a Gaussian mixture model clustering algorithm, and the short-circuited cells and normal cells in the battery pack are automatically identified based on the clustering results.
[0012] Preferably, in S2, the method of dividing the median terminal voltage curve and the cell terminal voltage curve into overlapping subsequences based on the sliding time window, and obtaining the DTW distance between the subsequence of the median terminal voltage curve and the subsequence of the cell terminal voltage curve includes:
[0013] The subsequence of the median voltage curve and the subsequence of the terminal voltage curve of a certain monomer are represented as V med and V:
[0014] V med =[v med (1),v med (2),...,v med (m)];
[0015] V=[v(1),v(2),...,v(l)];
[0016] Among them, v med v(m) and v(l) represent the median voltage at the mth moment and the cell terminal voltage at the lth moment, respectively. m and l represent the lengths of the median voltage curve subsequence and the cell terminal voltage curve subsequence, respectively.
[0017] Construct the distance matrix A based on the Euclidean distance between any two points in the two subsequences:
[0018]
[0019] Among them, d ij Represents the i-th sample point v in the median voltage curve subsequence med (i) The Euclidean distance from the jth sample point v(j) in the cell terminal voltage curve subsequence is calculated as:
[0020] d ij =||v med (i)-v(j)||2,1≤i≤m,1≤j≤l;
[0021] DTW distance D(V med ,V) is: find an optimal regular path W in the distance matrix A best , making V med The cumulative distance value from V reaches the minimum, and the optimal regular path W best for:
[0022]
[0023] The mathematical expression of DTW is:
[0024]
[0025] Among them, k, i, and j represent the regularized path number, the i-th row of the distance matrix, and the j-th column of the distance matrix, respectively. k Represents the position of the regularized path W in the distance matrix A;
[0026] Three constraints are preset; based on the three constraints, a dynamic programming method is used to solve the mathematical expression of DTW to obtain a state transition equation of the dynamic programming;
[0027] Among them, the three constraints are:
[0028] Boundary property: optimal regular path W best The boundary points are determined, that is, W1=(1,1),W k =(m,l);
[0029] Monotonicity, ensuring W best The search direction, that is, for a given W k =(i,j) and W k+1 =(i * ,j * ), there must be i * ≥i,j *≥j, i* and j* represent the next search position;
[0030] Continuity: W best The search can only be done at adjacent nodes, that is, for a given W k =(i,j) and W k+1 =(i * ,j * ), there must be i * ≤i+1,j * ≤j+1;
[0031] The state transition equation of dynamic programming is:
[0032] DTW(i,j)=d ij +min[DTW(i-1,j-1),DTW(i-1,j),DTW(i,j-1)];
[0033] Among them, DTW(i,j) represents the dynamic warping distance of the current step, d ij Represents the i-th sample point v in the median voltage curve subsequence med (i) The Euclidean distance from the jth sample point v(j) in the cell terminal voltage curve subsequence.
[0034] Preferably, in S3, the method for obtaining the DTW sequence of each monomer includes:
[0035] D={D1,D2,D3,...,D η}
[0036] In the formula, an element D in D i =D(V med ,V) represents V med and V, and η represents the length of the DTW sequence.
[0037] Preferably, in S4, the extracted statistical features are input into a Gaussian mixture model clustering algorithm, and the method for automatically identifying short-circuited cells and normal cells in a battery pack based on the clustering results includes:
[0038]
[0039] Where x is a vector consisting of the maximum and average values of the DTW sequence, p(x|Θ) is the probability density function of GMM, is the parameter set of GMM, N(x|μ k ,Σ k ) is the probability density function of the kth component, π k is the weight of the kth component, also known as the mixing coefficient, and its corresponding GMM component mean and covariance are μ k and Σk .
[0040] The present invention also provides a lithium battery pack early internal short circuit automatic identification system based on dynamic time warping sequence and Gaussian mixture model clustering, the system is used to implement the above method, the system includes: a sorting module, a segmentation module, a solution module, and a clustering module;
[0041] The sorting module is used to sort the terminal voltages of all cells in the battery pack in ascending order at each moment to obtain a median terminal voltage curve;
[0042] The segmentation module is used to segment the median terminal voltage curve and the cell terminal voltage curve into overlapping subsequences based on a sliding time window, and obtain the DTW distance between the subsequence of the median terminal voltage curve and the subsequence of the cell terminal voltage curve;
[0043] The solution module is used to obtain the DTW sequence of each monomer based on the results of the segmentation module, and extract two statistical features, namely the maximum value and the average value, from the DTW sequence to characterize the state of each monomer;
[0044] The clustering module is used to input the extracted statistical features into a Gaussian mixture model clustering algorithm, and realize automatic identification of short-circuited cells and normal cells in the battery pack based on the clustering results.
[0045] Preferably, in the segmentation module, the process of segmenting the median terminal voltage curve and the cell terminal voltage curve into overlapping subsequences based on the sliding time window, and obtaining the DTW distance between the subsequence of the median terminal voltage curve and the subsequence of the cell terminal voltage curve includes:
[0046] The subsequence of the median voltage curve and the subsequence of the terminal voltage curve of a certain monomer are represented as V med and V:
[0047] V med =[v med (1),v med (2),...,v med (m)];
[0048] V=[v(1),v(2),...,v(l)];
[0049] Among them, v med v(m) and v(l) represent the median voltage at the mth moment and the cell terminal voltage at the lth moment, respectively. m and l represent the lengths of the median voltage curve subsequence and the cell terminal voltage curve subsequence, respectively.
[0050] Construct the distance matrix A based on the Euclidean distance between any two points in the two subsequences:
[0051]
[0052] Among them, d ij Represents the i-th sample point v in the median voltage curve subsequence med (i) The Euclidean distance from the jth sample point v(j) in the cell terminal voltage curve subsequence is calculated as:
[0053] d ij =||v med (i)-v(j)||2,1≤i≤m,1≤j≤l;
[0054] DTW distance D(V med ,V) is: find an optimal regular path W in the distance matrix A best , making V med The cumulative distance value from V reaches the minimum, and the optimal regular path W best for:
[0055]
[0056] The mathematical expression of DTW is:
[0057]
[0058] Among them, k, i, and j represent the regularized path number, the i-th row of the distance matrix, and the j-th column of the distance matrix, respectively. k Represents the position of the regularized path W in the distance matrix A;
[0059] Three constraints are preset; based on the three constraints, a dynamic programming method is used to solve the mathematical expression of DTW to obtain a state transition equation of the dynamic programming;
[0060] Among them, the three constraints are:
[0061] Boundary property: optimal regular path W best The boundary points are determined, that is, W1=(1,1),W k =(m,l);
[0062] Monotonicity, ensuring W best The search direction, that is, for a given W k =(i,j) and W k+1 =(i * ,j * ), there must be i * ≥i, j * ≥j, i* and j* represent the next search position;
[0063] Continuity: W best The search can only be done at adjacent nodes, that is, for a given Wk =(i,j) and W k+1 =(i * ,j * ), there must be i * ≤i+1,j * ≤j+1;
[0064] The state transition equation of dynamic programming is:
[0065] DTW(i,j)=d ij +min[DTW(i-1,j-1),DTW(i-1,j),DTW(i,j-1)];
[0066] Among them, DTW(i,j) represents the dynamic warping distance of the current step, d ij Represents the i-th sample point v in the median voltage curve subsequence med (i) The Euclidean distance from the jth sample point v(j) in the cell terminal voltage curve subsequence.
[0067] Preferably, in the solving module, the process of obtaining the DTW sequence of each monomer includes:
[0068] D={D1,D2,D3,...,D η}
[0069] In the formula, an element D in D i =D(V med ,V) represents V med and V, and η represents the length of the DTW sequence.
[0070] Preferably, in the clustering module, the extracted statistical features are input into a Gaussian mixture model clustering algorithm, and the process of automatically identifying short-circuited cells and normal cells in the battery pack based on the clustering results includes:
[0071]
[0072] Where x is a vector consisting of the maximum and average values of the DTW sequence, p(x|Θ) is the probability density function of GMM, is the parameter set of GMM, N(x|μ k ,Σ k ) is the probability density function of the kth component, π k is the weight of the kth component, also known as the mixing coefficient, and its corresponding GMM component mean and covariance are μ k and Σ k .
[0073] Compared with the prior art, the present invention has the following beneficial effects:
[0074] The method proposed in the present invention has the following advantages: (1) It can detect and identify early internal short circuit faults of lithium-ion battery packs without establishing a battery model and setting a diagnostic threshold, thus avoiding the two thorny problems of difficulty in establishing an accurate model and difficulty in setting an accurate threshold; (2) It can extract the DTW sequence of each cell from the original voltage measurement value and use it as an indicator to characterize the battery fault state. The DTW sequence difference between the early internal short circuit cell and the normal cell is much more significant than the voltage difference, thereby amplifying the difference between the early internal short circuit cell and the normal cell in the battery pack, making it easier for the fault detection algorithm to accurately distinguish between the faulty cell and the normal cell; (3) It can realize automatic identification of early internal short circuit faults based on the Gaussian mixture model clustering algorithm. Since the Gaussian mixture model clustering algorithm is an unsupervised method, the proposed method has the advantage of not requiring labeled training data in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0076] Figure 1 This is a flow chart of a method for automatically identifying early internal short circuits in lithium battery packs based on dynamic time warping sequences and Gaussian mixture model clustering according to an embodiment of the present invention;
[0077] Figure 2 Schematic diagram of voltage curves of all cells when no early internal short circuit occurs in cycle 3 of the embodiment of the present invention;
[0078] Figure 3 Schematic diagram of voltage curves of all monomers when the short-circuit resistance is 1000Ω in cycle 4 of the embodiment of the present invention;
[0079] Figure 4 Schematic diagram of voltage curves of all monomers when the short-circuit resistance is 750Ω in cycle 5 of the embodiment of the present invention;
[0080] Figure 5 Schematic diagram of voltage curves of all monomers when the short-circuit resistance is 500Ω in cycle 6 of the embodiment of the present invention;
[0081] Figure 6 Schematic diagram of voltage curves of all monomers when the short-circuit resistance is 300Ω in cycle 7 of the embodiment of the present invention;
[0082] Figure 7 Schematic diagram of voltage curves of all monomers when the short-circuit resistance is 200Ω in cycle 8 of the embodiment of the present invention;
[0083] Figure 8 Schematic diagram of the DTW sequence of all monomers when no early internal short circuit occurs in cycle 3 according to an embodiment of the present invention;
[0084] Figure 9 Schematic diagram of the DTW sequence of all monomers in cycle 4 when the short-circuit resistance is 1000Ω according to an embodiment of the present invention;
[0085] Figure 10 Schematic diagram of the DTW sequence of all monomers in cycle 5 when the short-circuit resistance is 750Ω in an embodiment of the present invention;
[0086] Figure 11 Schematic diagram of the DTW sequence of all monomers in cycle 6 when the short-circuit resistance is 500Ω according to an embodiment of the present invention;
[0087] Figure 12 Schematic diagram of the DTW sequence of all monomers in cycle 7 when the short-circuit resistance is 300Ω according to an embodiment of the present invention;
[0088] Figure 13 Schematic diagram of the DTW sequence of all monomers in cycle 8 when the short-circuit resistance is 200Ω according to an embodiment of the present invention;
[0089] Figure 14 Schematic diagram of fault detection results based on DTW sequence according to an embodiment of the present invention;
[0090] Figure 15 Schematic diagram of fault detection results based on the original voltage curve according to an embodiment of the present invention. DETAILED DESCRIPTION
[0091] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0092] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0093] Example 1
[0094] The present invention proposes a method for early internal short circuit detection of lithium-ion battery packs based on dynamic time warping (DTW) sequence and Gaussian mixture model clustering. The overall framework of the proposed diagnostic method is as follows Figure 1 As shown. Figure 1As shown in Figure 2, the proposed method for detecting early internal short-circuit faults in lithium-ion battery packs includes the following four main steps:
[0095] (1) At each moment, the terminal voltages of all cells in the battery pack are sorted in ascending order to obtain the median terminal voltage curve. During actual operation, there are very few cells in the battery pack that are simultaneously short-circuited, accounting for only a very small part of the total number of cells in the battery pack. This means that most of the terminal voltages at each moment are the terminal voltages of normal cells. In addition, the median is not affected by the maximum and minimum values. Therefore, the median terminal voltage can represent the state of normal cells in the battery pack. (2) Based on the sliding time window, the median terminal voltage curve and the cell terminal voltage curve are divided into overlapping subsequences. The DTW distance between the subsequence of the median terminal voltage curve and the subsequence of the cell terminal voltage curve is calculated. (3) Based on the result of step (2), the DTW sequence of each cell is obtained. The two statistical features of the maximum value and the average value are extracted from the DTW sequence to characterize the state of each cell. (4) The extracted statistical features are input into the Gaussian mixture model clustering algorithm, and the automatic identification of short-circuited cells and normal cells in the battery pack is realized based on the clustering results.
[0096] It can be seen from the above fault detection process that, compared with the existing methods, the method proposed in the present invention has the following advantages: (1) It can realize the detection and identification of early internal short circuit faults of lithium-ion battery packs without the need to establish a battery model and set a diagnostic threshold, thus avoiding the two thorny problems of difficulty in establishing an accurate model and difficulty in setting an accurate threshold; (2) The DTW sequence of each cell is extracted from the original voltage measurement value and used as an indicator to characterize the battery fault state. The DTW sequence difference between the early internal short circuit cell and the normal cell is much more significant than the voltage difference, thereby amplifying the difference between the early internal short circuit cell and the normal cell in the battery pack, making it easier for the fault detection algorithm to accurately distinguish between the faulty cell and the normal cell; (3) The automatic identification of early internal short circuit faults is realized based on the Gaussian mixture model clustering algorithm. Since the Gaussian mixture model clustering algorithm is an unsupervised method, the proposed method has the advantage of not requiring labeled training data in practical applications.
[0097] The implementation process of the method of the present invention mainly involves technologies including DTW distance and Gaussian mixture model clustering. The present invention focuses on the implementation process of the above two modules.
[0098] In this embodiment, if Figure 1As shown, after obtaining the median terminal voltage curve based on the terminal voltage sorting result, the present invention divides the median terminal voltage curve and the monomer terminal voltage curve into overlapping subsequences based on the sliding time window. Subsequently, it is necessary to calculate the DTW distance between the median voltage subsequence and the monomer voltage subsequence to obtain the DTW sequence of each monomer. The DTW distance can efficiently align sequences of different lengths or local time offsets, and solve the nonlinear deformation problem on the time axis through elastic matching. It is particularly suitable for scenarios with variable speed, local stretching or compression. It has a wide range of applications, covering speech recognition, biosignal analysis, finance, motion recognition and other fields. In addition, DTW has a certain robustness to noise and amplitude changes.
[0099] The subsequence of the median voltage curve and the subsequence of the terminal voltage curve of a certain monomer are represented as V med and V:
[0100] V med =[v med (1),v med (2),...,v med (m)] (1)
[0101] V=[v(1),v(2),...,v(l)](2)
[0102] Among them, v med v(m) and v(l) represent the median voltage at the mth moment and the cell terminal voltage at the lth moment, respectively; m and l represent the lengths of the median voltage curve subsequence and the cell terminal voltage curve subsequence, respectively. The distance matrix A is constructed based on the Euclidean distance between any two points in the two subsequences as follows:
[0103]
[0104] Among them, d ij Represents the i-th sample point v in the median voltage curve subsequence med (i) The Euclidean distance from the jth sample point v(j) in the cell terminal voltage curve subsequence is calculated as follows:
[0105] d ij =||v med (i)-v(j)||2,1≤i≤m,1≤j≤l (4)
[0106] At this time, the DTW distance D(V med ,V) can be defined as: find an optimal regular path W in the distance matrix A best , making V med The cumulative distance value of V reaches the minimum. The optimal regular path W best It can be defined by the following formula:
[0107]
[0108] Therefore, the mathematical definition of DTW can be given as:
[0109]
[0110] Where k, i, and j represent the regularized path number, the i-th row of the distance matrix, and the j-th column of the distance matrix, respectively; W k Represents the position of the regularized path W in the distance matrix A. In order to ensure the uniqueness of the DTW mathematical definition solution, three constraints are given to formula (6):
[0111] (1) Boundary: Optimal regularized path W best The boundary points of are determined.
[0112] W1=(1,1),W k =(m,l).
[0113] (2) Monotonicity, ensuring W best The search direction. That is, for a given W k =(i,j) and W k+1 =(i * ,j * ), there must be i * ≥i, j * ≥j. Here, i* and j* represent the position to be searched next.
[0114] (3) Continuity, W best The search can only be done at adjacent nodes. k =(i,j) and
[0115] W k+1 =(i * ,j * ), there must be i * ≤i+1,j * ≤j+1.
[0116] Based on the three constraints given, we can use the dynamic programming method to solve formula (6). Here is the state transition equation of dynamic programming:
[0117] DTW(i,j)=d ij +min[DTW(i-1,j-1),DTW(i-1,j),DTW(i,j-1)](7)
[0118] Where DTW(i,j) represents the dynamic warping distance of the current step.
[0119] Based on formulas (1)-(7) in the above process, the present invention can obtain the DTW sequence D of each monomer as follows:
[0120] D={D1,D2,D3,...,D η}
[0121] In the formula, an element D in D i =D(V med ,V) represents V med and V, and η represents the length of the DTW sequence.
[0122] The DTW sequence is used to replace the original voltage sequence for early internal short circuit fault detection. Subsequently, the present invention obtains the maximum value and average value of the DTW sequence of each cell, and uses these two statistical features to characterize the battery state.
[0123] In this embodiment, the DTW sequence can effectively amplify the difference between early internal short circuit cells and normal cells, making early internal short circuit detection easier to achieve. Theoretically, after obtaining the DTW sequence of each cell in the battery pack, the present invention can detect early internal short circuit cells by directly observing the difference in DTW sequences between cells. That is, if the difference between the DTW sequence of a cell and the DTW sequences of the remaining cells is large, it can be identified as an early internal short circuit cell. However, in actual operation, lithium-ion battery packs are often composed of hundreds or thousands of battery cells connected in series and parallel, which means that a battery pack corresponds to hundreds or thousands of DTW sequences. Therefore, the above-mentioned method of manually identifying early internal short circuit cells by directly observing the difference between DTW sequences is very inconvenient and not rigorous enough, and may lead to misdiagnosis. Therefore, after obtaining the DTW sequence of each cell, it is necessary to design an automatic identification method to accurately and efficiently detect early internal short circuit cells in the battery pack. Specifically, the present invention uses the maximum and average values of the DTW sequence as input and realizes automatic identification of early internal short circuit cells based on the Gaussian mixture model clustering algorithm.
[0124] Gaussian mixture model clustering is a clustering method based on a probabilistic model. It uses a Gaussian mixture model (GMM) to characterize the spatial distribution and characteristics of the data. By iterating the GMM parameters, the model is optimally fitted to the dataset, and the data is clustered according to the principle of maximum probability. This method not only smoothly fits the overall data distribution, but also clearly describes the multimodal nature of the data density through its various components, fully considering the correlation characteristics between the data. In L-dimensional space, a GMM with K components is defined as follows:
[0125]
[0126] Among them, x is a vector consisting of the maximum and average values of the DTW sequence, p(x|Θ) is the probability density function of GMM, is the parameter set of GMM, N(x|μ k ,Σ k ) is the probability density function of the kth component, π k is the weight of the kth component, also known as the mixing coefficient, and its corresponding GMM component mean and covariance are μ k and Σ k .
[0127] GMM is used to train the dataset {x1; x2; ...; x N} clustering (where x N The essence of this is to find the maximum likelihood estimate of the GMM parameter set. The most commonly used method is the Expectation-Maximization (EM) algorithm. The following procedure gives the detailed steps of the Gaussian mixture model clustering algorithm.
[0128] Step 1: Input the data set {x1; x2; ...; x N}, and its corresponding output is the class division {C1,C2,…,C K}, where C K represents the Kth category.
[0129] Step 2: Initialize parameter set here and They represent the initial value of the weight of the kth component, the initial value of the mean of the kth GMM component, and the initial value of the covariance; and the log-likelihood function f(Θ0) is calculated as follows:
[0130]
[0131] Step 3: When the following conditions are met
[0132] |f(Θ i+1 )-f(Θ i )|≤Δ(10)
[0133] When , the following steps Step4 to Step10 are executed in a loop. In the above formula, f(Θ i+1 ) represents the log-likelihood function at step i+1, f(Θ i ) represents the log-likelihood function of the i-th step, f(Θ i ) is calculated as D represents the residual of the log-likelihood function between two adjacent steps.
[0134] Step 4: Calculate x nThe posterior probability of belonging to the kth component is recorded as
[0135]
[0136] Among them, z n,k =1 means x n Belongs to component k; is the mixing coefficient (weight) of the kth Gaussian component; is the mean vector of the kth Gaussian component; is the covariance matrix of the kth Gaussian component;
[0137] is the probability density function of the kth Gaussian distribution; is the mixing coefficient (weight) of the jth Gaussian component; is the mean vector of the jth Gaussian component; is the covariance matrix of the j-th Gaussian component; is the probability density function of the j-th Gaussian distribution.
[0138] Step 5: Update model parameters:
[0139]
[0140] Among them, N k is the effective number of data points belonging to the kth Gaussian component; is the weight of the kth Gaussian component after update; is the updated mean vector of the kth Gaussian component; is the updated covariance matrix of the kth Gaussian component. N represents the number of samples.
[0141] Step 6: Update the log-likelihood function:
[0142]
[0143] where z n,k represents the posterior probability of the kth Gaussian component.
[0144] Step 7: Iteration counter update: i←i+1.
[0145] Step 8: Classification: Determine x n The category label k * :
[0146]
[0147] In the formula The estimate of the posterior probability of the k-th component.
[0148] Step 9: Place x n Classify into corresponding categories
[0149] Step 10: Return the result: Classification {C1, C2, ..., C k}.
[0150] As shown in the above steps, the EM algorithm iteratively searches for the maximum likelihood solution for parameter estimation. After initialization, it alternates between two steps: the expectation step (E-step) and the maximization step (M-step). In the E-step, based on the current model parameters, x is calculated. n The posterior probability of belonging to the kth component In the M-step, the model parameters are updated using the posterior probabilities of each GMM component from all the data obtained in the E-step. The E-step and M-step are repeated until the log-likelihood function converges or the number of iterations exceeds 100. Finally, the dataset is clustered based on the trained GMM, and the resulting clustering is output.
[0151] The number of components (order) of the Gaussian mixture model is a key parameter of the algorithm. The model order is always a trade-off between goodness of fit and model complexity. If the order of the mixture model is too low, it is difficult to estimate the actual underlying model; however, if the order of the mixture model is too high, the problem of overfitting the training data will occur. The Bayesian Information Criterion (BIC) is a method widely used to determine the order of GMM. It evaluates the model based on log-likelihood and complexity, and can be used to compare the fit of multiple models to the same set of data. The definition of BIC is as follows:
[0152] BIC=-2logf(Θ)+q×log(n)(18)
[0153] Where logf() is the log-likelihood function, n is the number of observations, and q is the number of estimated parameters. A smaller BIC value indicates a better model fit.
[0154] Example 2
[0155] The present invention also provides a system for automatically identifying early internal short circuits in lithium battery packs based on dynamic time warping sequences and Gaussian mixture model clustering. The system is used to implement the method described in Example 1, and is characterized in that the system includes: a sorting module, a segmentation module, a solution module, and a clustering module;
[0156] A sorting module is used to sort the terminal voltages of all cells in the battery pack in ascending order at each moment to obtain a median terminal voltage curve;
[0157] a segmentation module, configured to segment the median terminal voltage curve and the cell terminal voltage curve into overlapping subsequences based on a sliding time window, and calculate the DTW distance between the subsequences of the median terminal voltage curve and the subsequences of the cell terminal voltage curve;
[0158] The solution module is used to obtain the DTW sequence of each monomer based on the results of the segmentation module, and extract the maximum value and average value two statistical features from the DTW sequence to characterize the status of each monomer;
[0159] The clustering module is used to input the extracted statistical features into the Gaussian mixture model clustering algorithm, and realize automatic identification of short-circuited cells and normal cells in the battery pack based on the clustering results.
[0160] In this embodiment, in the segmentation module, the process of segmenting the median terminal voltage curve and the cell terminal voltage curve into overlapping subsequences based on the sliding time window and obtaining the DTW distance between the subsequence of the median terminal voltage curve and the subsequence of the cell terminal voltage curve includes:
[0161] The subsequence of the median voltage curve and the subsequence of the terminal voltage curve of a certain monomer are represented as V med and V:
[0162] V med =[v med (1),v med (2),...,v med (m)];
[0163] V=[v(1),v(2),...,v(l)];
[0164] Among them, v med v(m) and v(l) represent the median voltage at the mth moment and the cell terminal voltage at the lth moment, respectively. m and l represent the lengths of the median voltage curve subsequence and the cell terminal voltage curve subsequence, respectively.
[0165] Construct the distance matrix A based on the Euclidean distance between any two points in the two subsequences:
[0166]
[0167] Among them, d ij Represents the i-th sample point v in the median voltage curve subsequence med (i) The Euclidean distance from the jth sample point v(j) in the cell terminal voltage curve subsequence is calculated as:
[0168] d ij =||v med (i)-v(j)||2,1≤i≤m,1≤j≤l;
[0169] DTW distance D(V med ,V) is: find an optimal regular path W in the distance matrix A best , making V med The cumulative distance value from V reaches the minimum, and the optimal regular path W best for:
[0170]
[0171] The mathematical expression of DTW is:
[0172]
[0173] Among them, k, i, and j represent the regularized path number, the i-th row of the distance matrix, and the j-th column of the distance matrix, respectively. k Represents the position of the regularized path W in the distance matrix A;
[0174] Three constraints are preset; based on the three constraints, a dynamic programming method is used to solve the mathematical expression of DTW to obtain a state transition equation of the dynamic programming;
[0175] Among them, the three constraints are:
[0176] Boundary property: optimal regular path W best The boundary points are determined, that is, W1=(1,1),W k =(m,l);
[0177] Monotonicity, ensuring W best The search direction, that is, for a given W k =(i,j) and W k+1 =(i * ,j * ), there must be i * ≥i,j * ≥j, i* and j* represent the next search position;
[0178] Continuity: W best The search can only be done at adjacent nodes, that is, for a given W k =(i,j) and W k+1 =(i * ,j * ), there must be i * ≤i+1,j * ≤j+1;
[0179] The state transition equation of dynamic programming is:
[0180] DTW(i,j)=d ij+min[DTW(i-1,j-1),DTW(i-1,j),DTW(i,j-1)];
[0181] Among them, DTW(i,j) represents the dynamic warping distance of the current step, d ij Represents the i-th sample point v in the median voltage curve subsequence med (i) The Euclidean distance from the jth sample point v(j) in the cell terminal voltage curve subsequence.
[0182] In this embodiment, in the solution module, the process of obtaining the DTW sequence of each monomer includes:
[0183] D={D1,D2,D3,...,D η}
[0184] In the formula, an element D in D i =D(V med ,V) represents V med and V, and η represents the length of the DTW sequence.
[0185] In this embodiment, the clustering module inputs the extracted statistical features into a Gaussian mixture model clustering algorithm. The process of automatically identifying short-circuited cells and normal cells in the battery pack based on the clustering results includes:
[0186]
[0187] Where x is a vector consisting of the maximum and average values of the DTW sequence, p(x|Θ) is the probability density function of GMM, is the parameter set of GMM, N(x|μ k ,Σ k ) is the probability density function of the kth component, π k is the weight of the kth component, also known as the mixing coefficient, and its corresponding GMM component mean and covariance are μ k and Σ k .
[0188] Example 3
[0189] The effectiveness of the technology was verified by testing a battery pack consisting of eight cylindrical lithium-ion battery cells connected in series. The cell specifications are shown in Table 1.
[0190] Table 1 Specifications of lithium-ion batteries
[0191]
[0192] The battery pack was cycled using a combination of constant current charge and dynamic discharge. Eight complete charge and discharge cycles were completed. The present invention simulates an early internal short-circuit fault by connecting an external resistor in parallel across the battery. This method not only effectively controls the triggering time and location of an early internal short, but also simulates the evolution of an early internal short, offering excellent controllability and repeatability.
[0193] In order to simulate the dynamic evolution characteristics of early internal short circuits, controllable resistance networks are connected to both ends of the selected monomers 4 and 8 starting from the 4th cycle. By systematically adjusting the parallel resistance values (see Table 2 for details), the development process of early internal short circuits from mild to severe can be accurately simulated: the smaller the resistance value, the more severe the short circuit, and the corresponding short-circuit current is larger. This progressive parameter adjustment method effectively realizes the quantitative simulation of the evolution process of early internal short circuits. In the experiment, the same test process was performed on two battery packs with the same configuration. The data of the first battery pack will be used as a training set for the effectiveness verification of the subsequent method, and the data of the second battery pack will be used as a subsequent test set. The present invention regards the output of each monomer in the battery pack in each charge and discharge cycle as a sample. Therefore, for each battery pack used in the experiment, 8 monomers output a total of 64 samples in 8 cycles, including 54 normal samples and 10 fault samples with early internal short circuits.
[0194] Table 2 Short-circuit resistance corresponding to different charge and discharge cycles
[0195]
[0196]
[0197] Figures 2 to 7 The original terminal voltage curves of each cell in the battery pack used in the experiment are shown in the 3rd to 8th cycles. Figure 2 As shown in Figure 1, when there is no early internal short circuit failure in the battery pack, the terminal voltage curves of all cells completely overlap and maintain very good consistency. Figures 3 to 7As shown in the figure, when an early internal short circuit occurs within the battery pack, the terminal voltage curves of shorted cells 4 and 8 are slightly lower than those of normal cells. This phenomenon occurs because during the battery pack's charge and discharge processes, the short-circuit current continuously consumes the shorted cells' charge. As a result, during charging, the terminal voltage and SOC of the shorted cells rise more slowly than those of normal cells. Conversely, during discharge, the terminal voltage and SOC of the shorted cells decrease more quickly than those of normal cells. It is also important to note that the difference between the terminal voltage curves of shorted cells 4 and 8 and those of normal cells is not significant. This is because, at the initial stage of a short circuit, the short-circuit resistance is large, and the corresponding short-circuit current is small, insufficient to trigger significant electrical and thermal anomalies. This phenomenon demonstrates that relying solely on the raw terminal voltage curve for early internal short circuit detection places very stringent demands on the sensitivity and accuracy of the fault detection algorithm, presenting significant challenges. In other words, early internal short circuit detection based on the raw terminal voltage curve carries the risk of misdiagnosis or missed diagnosis. Therefore, the raw terminal voltage curve is not the optimal diagnostic indicator for early internal short circuit detection.
[0198] Based on the above analysis, in order to accurately detect early internal short circuits in lithium-ion battery packs, the present invention uses the proposed method to obtain the DTW sequence of each cell. Figures 8 to 13 The DTW sequences of all cells in the battery pack from the 3rd to the 8th cycle are shown. Figure 8 As shown in Figure 1, when there is no early internal short circuit fault in the battery pack, the DTW sequence values of all cells are small, and the DTW sequences between different cells maintain good consistency and do not show obvious differences. Figures 9 to 13 As shown, when an early internal short circuit fault occurs in the battery pack, the DTW sequence values of short-circuited cells 4 and 8 increase significantly, while the DTW sequence values of normal cells do not fluctuate much compared to the values in cycle 3. This leads to an increase in the difference between the DTW sequences of short-circuited cells 4 and 8 and the DTW sequences of normal cells. Furthermore, it can be observed that as the short-circuit resistance decreases, the DTW sequence values of short-circuited cells 4 and 8 gradually increase, and the difference between them and the DTW sequences of normal cells becomes increasingly significant. The above analysis shows that the DTW difference between short-circuited cells and normal cells is very significant compared to the voltage difference, which proves that the DTW sequence can amplify the difference between short-circuited cells and normal cells, thereby facilitating the fault detection algorithm to detect early internal short circuits. In other words, compared to the original voltage curve, the DTW sequence is a better indicator for early internal short circuit detection.
[0199] After obtaining the DTW sequence of each cell, the present invention extracts the maximum value and average value of the DTW sequence of each cell in each cycle, and uses this as input to realize the automatic identification and differentiation of early internal short circuit cells and normal cells in the lithium-ion battery pack based on the Gaussian mixture model clustering algorithm. At the same time, as a comparison, the present invention extracts the maximum value and average value of the original terminal voltage curve of each cell in each cycle, and also inputs it into the clustering algorithm based on the Gaussian mixture model to realize early internal short circuit detection. Looking back at Section 3, the present invention regards the output of each cell in the battery pack in each charge and discharge cycle as a sample. Therefore, for the battery pack used in the experiment, 8 cells output a total of 64 samples in 8 cycles, including 54 normal samples and 10 fault samples with early internal short circuits.
[0200] The fault detection results based on DTW sequence and original voltage curve are shown as follows: Figure 14 and Figure 15 As shown in , each data point corresponds to a sample. Normal samples are represented by dots, and fault samples are represented by squares. Figure 14 As shown in , the DTW sequence-based method accurately detects and distinguishes all normal samples and faulty samples in the battery pack. Figure 15 As shown, the method based on raw voltage measurements misdiagnoses a certain proportion of faulty samples as normal. The above analysis demonstrates that the proposed method can accurately and automatically identify and distinguish between cells with early internal short circuits and normal cells within a battery pack, demonstrating its effectiveness and feasibility.
[0201] The embodiments described above are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by persons skilled in the art should fall within the scope of protection defined by the claims of the present invention.
Claims
1. A method for automatically identifying early internal short circuits in lithium battery packs based on dynamic time warping sequences and Gaussian mixture model clustering, characterized in that: The method comprises: S1: Sort the terminal voltages of all cells in the battery pack in ascending order at each moment to obtain a median terminal voltage curve; S2: Split the median terminal voltage curve and the cell terminal voltage curve into overlapping subsequences based on a sliding time window, and calculate the DTW distance between the subsequences of the median terminal voltage curve and the subsequences of the cell terminal voltage curve; S3: Based on the results of S2, obtain the DTW sequence of each monomer, extract the maximum value and average value two statistical features from the DTW sequence to characterize the state of each monomer; S4: The extracted statistical features are input into a Gaussian mixture model clustering algorithm, and the short-circuited cells and normal cells in the battery pack are automatically identified based on the clustering results.
2. The method according to claim 1, characterized in that In S2, the method of dividing the median terminal voltage curve and the cell terminal voltage curve into overlapping subsequences based on the sliding time window and obtaining the DTW distance between the subsequence of the median terminal voltage curve and the subsequence of the cell terminal voltage curve includes: The subsequence of the median voltage curve and the subsequence of the terminal voltage curve of a certain monomer are represented as V med and V: V med =[v med (1),v med (2),…,v med (m)]; V=[v(1),v(2),...,v(l)]; Among them, v med v(m) and v(l) represent the median voltage at the mth moment and the cell terminal voltage at the lth moment, respectively. m and l represent the lengths of the median voltage curve subsequence and the cell terminal voltage curve subsequence, respectively. Construct the distance matrix A based on the Euclidean distance between any two points in the two subsequences: Among them, d ij Represents the i-th sample point v in the median voltage curve subsequence med (i) The Euclidean distance from the jth sample point v(j) in the cell terminal voltage curve subsequence is calculated as: d ij =||v med (i)-v(j)||2,1≤i≤m,1≤j≤l; DTW distance D(V med ,V) is: find an optimal regular path W in the distance matrix A best , making V med The cumulative distance value from V reaches the minimum, and the optimal regular path W best for: The mathematical expression of DTW is: Among them, k, i, and j represent the regularized path number, the i-th row of the distance matrix, and the j-th column of the distance matrix, respectively. k Represents the position of the regularized path W in the distance matrix A; Three constraints are preset; based on the three constraints, a dynamic programming method is used to solve the mathematical expression of DTW to obtain a state transition equation of the dynamic programming; Among them, the three constraints are: Boundary property: optimal regular path W best The boundary points are determined, that is, W1=(1,1),W k =(m,l); Monotonicity, ensuring W best The search direction, that is, for a given W k =(i,j) and W k+1 =(i * ,j * ), there must be i * ≥i, j * ≥j, i* and j* represent the next search position; Continuity: W best The search can only be done at adjacent nodes, that is, for a given W k =(i,j) and W k+1 =(i * ,j * ), there must be i * ≤i+1,j * ≤j+1; The state transition equation of dynamic programming is: DTW(i,j)=d ij +min[DTW(i-1,j-1),DTW(i-1,j),DTW(i,j-1)]; Among them, DTW(i,j) represents the dynamic warping distance of the current step, d ij Represents the i-th sample point v in the median voltage curve subsequence med (i) The Euclidean distance from the jth sample point v(j) in the cell terminal voltage curve subsequence.
3. The method according to claim 2, characterized in that In S3, the method for obtaining the DTW sequence of each monomer includes: <h2 style=";text-align:left;direction:ltr">D = {D1,D2,D3,...,D<h2 style=";text-align:left;direction:ltr"> η <h2 style=";text-align:left;direction:ltr">} In the formula, an element D in D i =D(V med ,V) represents V med and V, and η represents the length of the DTW sequence.
4. The method according to claim 1, wherein In S4, the extracted statistical features are input into a Gaussian mixture model clustering algorithm. The method for automatically identifying short-circuited cells and normal cells in a battery pack based on the clustering results includes: Where x is a vector consisting of the maximum and average values of the DTW sequence, p(x|Θ) is the probability density function of GMM, is the parameter set of GMM, N(x|μ k ,Σ k ) is the probability density function of the kth component, π k is the weight of the kth component, also known as the mixing coefficient, and its corresponding GMM component mean and covariance are μ k and Σ k .
5. A system for automatically identifying early internal short circuits in lithium battery packs based on dynamic time warping sequences and Gaussian mixture model clustering, the system being used to implement the method according to any one of claims 1 to 4, characterized in that: The system includes: a sorting module, a segmentation module, a solution module, and a clustering module; The sorting module is used to sort the terminal voltages of all cells in the battery pack in ascending order at each moment to obtain a median terminal voltage curve; The segmentation module is used to segment the median terminal voltage curve and the cell terminal voltage curve into overlapping subsequences based on a sliding time window, and obtain the DTW distance between the subsequence of the median terminal voltage curve and the subsequence of the cell terminal voltage curve; The solution module is used to obtain the DTW sequence of each monomer based on the results of the segmentation module, and extract two statistical features, namely the maximum value and the average value, from the DTW sequence to characterize the state of each monomer; The clustering module is used to input the extracted statistical features into a Gaussian mixture model clustering algorithm, and realize automatic identification of short-circuited cells and normal cells in the battery pack based on the clustering results.
6. The system according to claim 5, characterized in that In the segmentation module, the process of segmenting the median terminal voltage curve and the cell terminal voltage curve into overlapping subsequences based on the sliding time window and obtaining the DTW distance between the subsequence of the median terminal voltage curve and the subsequence of the cell terminal voltage curve includes: The subsequence of the median voltage curve and the subsequence of the terminal voltage curve of a certain monomer are represented as V med and V: V med =[v med (1),v med (2),...,v med (m)]; V=[v(1),v(2),...,v(l)]; Among them, v med v(m) and v(l) represent the median voltage at the mth moment and the cell terminal voltage at the lth moment, respectively. m and l represent the lengths of the median voltage curve subsequence and the cell terminal voltage curve subsequence, respectively. Construct the distance matrix A based on the Euclidean distance between any two points in the two subsequences: Among them, d ij Represents the i-th sample point v in the median voltage curve subsequence med (i) The Euclidean distance from the jth sample point v(j) in the cell terminal voltage curve subsequence is calculated as: d ij =||v med (i)-v(j)||2,1≤i≤m,1≤j≤l; DTW distance D(V med ,V) is: find an optimal regular path W in the distance matrix A best , making V med The cumulative distance value from V reaches the minimum, and the optimal regular path W best for: The mathematical expression of DTW is: Among them, k, i, and j represent the regularized path number, the i-th row of the distance matrix, and the j-th column of the distance matrix, respectively. k Represents the position of the regularized path W in the distance matrix A; Three constraints are preset; based on the three constraints, a dynamic programming method is used to solve the mathematical expression of DTW to obtain a state transition equation of the dynamic programming; Among them, the three constraints are: Boundary property: optimal regular path W best The boundary points are determined, that is, W1=(1,1),W k =(m,l); Monotonicity, ensuring W best The search direction, that is, for a given W k =(i,j) and W k+1 =(i * ,j * ), there must be i * ≥i, j * ≥j, i* and j* represent the next search position; Continuity: W best The search can only be done at adjacent nodes, that is, for a given W k =(i,j) and W k+1 =(i * ,j * ), there must be i * ≤i+1,j * ≤j+1; The state transition equation of dynamic programming is: DTW(i,j)=d ij +min[DTW(i-1,j-1),DTW(i-1,j),DTW(i,j-1)]; Among them, DTW(i,j) represents the dynamic warping distance of the current step, d ij Represents the i-th sample point v in the median voltage curve subsequence med (i) The Euclidean distance from the jth sample point v(j) in the cell terminal voltage curve subsequence.
7. The system according to claim 6, characterized in that In the solution module, the process of obtaining the DTW sequence of each monomer includes: <h2 style=";text-align:left;direction:ltr">D = {D1,D2,D3,...,D<h2 style=";text-align:left;direction:ltr"> η <h2 style=";text-align:left;direction:ltr">} In the formula, an element D in D i =D(V med ,V) represents V med and V, and η represents the length of the DTW sequence.
8. The system according to claim 5, characterized in that In the clustering module, the extracted statistical features are input into the Gaussian mixture model clustering algorithm. The process of automatically identifying short-circuited cells and normal cells in the battery pack based on the clustering results includes: Where x is a vector consisting of the maximum and average values of the DTW sequence, p(x|Θ) is the probability density function of GMM, is the parameter set of GMM, N(x|μ k ,Σ k ) is the probability density function of the kth component, π k is the weight of the kth component, also known as the mixing coefficient, and its corresponding GMM component mean and covariance are μ k and Σ k .