Battery micro short circuit diagnosis method and system based on auto-encoder and abnormal clustering
By employing autoencoders and anomaly clustering methods, and utilizing Pearson correlation coefficient and cosine similarity to extract features, combined with residual distance matrix and DBSCAN algorithm, a rapid and accurate diagnosis of early micro-short circuit faults in lithium-ion battery systems is achieved, solving the problems of diagnostic delay and high computational burden in existing technologies.
Patent Information
- Application Number
- CN202511275696.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-10-31
AI Technical Summary
Existing technologies struggle to achieve timely and accurate diagnosis of early micro-short circuit faults in lithium-ion battery systems. Traditional methods suffer from high false negative rates, heavy computational burden, and diagnostic delays.
An autoencoder and anomaly clustering method are used to extract two-dimensional features by parallel calculation of the Pearson correlation coefficient and cosine similarity of voltage signals, and an autoencoder fault detection model is constructed. The residual distance matrix and DBSCAN clustering algorithm are then combined for fault location.
It enables rapid and accurate diagnosis of early micro-short circuit faults in lithium-ion battery systems, reduces computational burden, and improves the real-time performance and accuracy of diagnosis.
Smart Images

Figure CN120873649A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of battery pack fault diagnosis technology, and particularly relates to a battery micro-short circuit diagnosis method and system based on autoencoder and anomaly clustering. Background Technology
[0002] Developing new energy vehicles is a key path to solving the dual dilemmas of energy crisis and environmental pollution. Lithium-ion batteries, with their high energy density, low pollution, and long lifespan, have become the core power source for electric vehicles. However, the frequent battery thermal runaway incidents leading to vehicle fires and explosions in recent years highlight the severity of safety issues related to lithium-ion battery systems, necessitating the establishment of an efficient and accurate fault diagnosis mechanism. It is worth noting that short-circuit faults, as a major cause of thermal runaway, are the most dangerous and common type of battery failure due to their high heat generation characteristics.
[0003] Based on the severity of the fault, short circuits can be divided into two categories: hard short circuits and micro short circuits. Hard short circuits, due to their severe nature, immediately trigger thermal runaway, rendering fault diagnosis meaningless. Micro short circuits, on the other hand, cause an abnormal voltage drop but remain within the normal range, with no significant temperature rise. As the fault progresses, the heat generated gradually increases, leading to a slow temperature increase. Timely and accurate diagnosis of micro short circuits in the early stages of a fault can effectively prevent the chain reaction of battery thermal runaway.
[0004] Current methods for diagnosing micro-short circuits in battery systems have significant limitations: traditional voltage threshold methods rely on a single fixed threshold for fault diagnosis, which can only identify mid-to-late stage short circuit faults and have a high rate of missed diagnoses for early micro-short circuits; model-based methods, while highly accurate, impose a heavy computational burden on embedded battery management systems due to the complexity of the models; at the same time, data-driven methods using a single correlation coefficient suffer from drawbacks such as large diagnostic delays and insufficient sensitivity to early faults, making it difficult to achieve real-time detection and accurate location of early micro-short circuits in power lithium-ion battery systems. Summary of the Invention
[0005] To overcome the shortcomings of the prior art, this invention provides a battery micro-short circuit diagnosis method and system based on autoencoder and anomaly clustering. It extracts two-dimensional features by parallel computation of the Pearson correlation coefficient (representing linear similarity) and cosine similarity (representing directional similarity) of voltage signals. An autoencoder detection model is trained based on a fusion feature dataset under normal operating conditions. Real-time fault detection is achieved by online evaluation of the reconstruction mean square error of the input feature vector. When a fault is detected, a residual distance matrix is constructed, and an unsupervised clustering algorithm is used to cluster anomaly variables, ultimately accurately locating the faulty battery cell. This solves the problems of difficult micro-short circuit fault diagnosis, high computational load of model-based methods, and large detection delay and low accuracy of correlation coefficient methods in the prior art, achieving rapid detection and accurate location of micro-short circuit faults.
[0006] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: The first aspect of this invention provides a battery micro-short circuit diagnosis method based on autoencoders and anomaly clustering.
[0007] A battery micro-short circuit diagnosis method based on autoencoders and anomaly clustering includes the following steps: The target battery pack is identified, and the voltage signals of the batteries in it are sampled using the sliding time window method. The improved Pearson correlation coefficient and improved cosine similarity of the sampled voltage signals between batteries are calculated. Similarity fusion features are calculated based on improved Pearson correlation coefficient and improved cosine similarity. The similarity fusion features are input into a pre-trained autoencoder fault detection model to obtain reconstructed features; Calculate the loss function between similarity fusion features and reconstructed features, and use the loss function value as a fault detection indicator to determine whether the target battery pack has a micro short circuit fault; When a micro short-circuit fault occurs in the target battery pack, the residual matrix is obtained based on the similarity fusion features and reconstruction features of the voltage sampling signals within a time window before the first fault detection time. Construct the residual distance matrix based on the residual matrix; Based on the residual distance matrix, a clustering method is used to determine the fault variables, and finally the short-circuit faulty battery is identified.
[0008] A second aspect of the present invention provides a battery micro short circuit diagnostic system based on autoencoders and anomaly clustering.
[0009] A battery micro-short circuit diagnostic system based on autoencoders and anomaly clustering includes: The dual-dimensional feature calculation module is configured to: determine the target battery pack, sample the battery voltage signals in it using the sliding time window method, and calculate the improved Pearson correlation coefficient and improved cosine similarity of the sampled voltage signals between batteries; The fusion feature calculation module is configured to calculate similarity fusion features based on the improved Pearson correlation coefficient and the improved cosine similarity. The autoencoder reconstruction module is configured to input similarity fusion features into a pre-trained autoencoder fault detection model to obtain reconstructed features; The judgment module is configured to: calculate the loss function between the similarity fusion feature and the reconstructed feature, use the loss function value as a fault detection indicator, and determine whether the target battery pack has a micro short circuit fault; The residual matrix calculation module is configured to: when a micro short-circuit fault occurs in the target battery pack, obtain the residual matrix based on the similarity fusion features and reconstruction features of the voltage sampling signals within a time window before the first fault detection time; The residual distance matrix calculation module is configured to: construct the residual distance matrix based on the residual matrix; The clustering localization module is configured to determine fault variables based on the residual distance matrix using a clustering method, and ultimately identify the short-circuit faulty battery. A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the steps in the battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering as described in the first aspect of the present invention.
[0010] A fourth aspect of the present invention provides an electronic device including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering as described in the first aspect of the present invention.
[0011] The above one or more technical solutions have the following beneficial effects: This invention discloses a micro-short-circuit fault diagnosis method for lithium-ion battery packs based on autoencoders and anomaly clustering. It extracts dual-dimensional features by parallel computation of the Pearson correlation coefficient (representing linear similarity) and cosine similarity (representing directional similarity) of voltage signals, and generates fused features using a standard averaging fusion strategy. This effectively combines the advantages of two similarity measures to reduce the impact of battery inconsistencies and noise interference. An autoencoder detection model is trained based on the fused feature dataset under normal operating conditions, and the reconstruction mean square error of the input feature vector is evaluated online to achieve real-time fault detection. When a fault is detected, a residual distance matrix is constructed, and an unsupervised clustering algorithm is used to cluster anomaly variables, thereby accurately locating the micro-short-circuit faulty battery cell. This method solves the problems of difficulty in detecting early micro-short-circuit faults in current lithium-ion battery systems, high computational load of model-based methods, and high diagnostic latency and low accuracy of correlation coefficient methods, achieving fast and reliable micro-short-circuit fault diagnosis.
[0012] This invention considers both voltage linear similarity and directional similarity, calculates Pearson correlation coefficient and cosine similarity to extract features respectively, and uses standard average fusion to obtain fused features to achieve complementary advantages, thereby overcoming the adverse effects of battery inconsistency and noise on fault diagnosis.
[0013] This invention utilizes a normal dataset with fused features to establish a micro-short-circuit fault detection model based on an autoencoder. The constructed diagnostic model is used to evaluate the similarity fusion feature vector online. Real-time fault detection is achieved by reconstructing the mean square error generated from the input. The autoencoder has a simple structure, low computational burden, and enables real-time detection. After detecting a micro-short-circuit fault, a residual distance matrix is constructed, and anomaly clustering is performed using an unsupervised clustering algorithm to determine fault variables and stagger the location of faulty batteries.
[0014] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0015] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0016] Figure 1 This is a flowchart of the method in Example 1.
[0017] Figure 2 This is a structural diagram of the similarity fusion feature autoencoder in Example 1.
[0018] Figure 3 This is a schematic diagram of the DBSCAN abnormal clustering principle in Example 1.
[0019] Figure 4 The circuit diagram for the sudden short-circuit fault in Example 1 is shown.
[0020] Figure 5 This is a voltage curve diagram of a sudden micro short-circuit fault in Example 1.
[0021] Figure 6 This is a diagram showing the detection results of a sudden short-circuit fault in Example 1.
[0022] Figure 7 This is a diagram showing the location results of a sudden short-circuit fault in Example 1.
[0023] Figure 8 This is a diagram showing the diagnostic results of the traditional correlation coefficient method in Example 1.
[0024] Figure 9 This is a voltage curve diagram of a progressive micro-short circuit fault in Example 1.
[0025] Figure 10 This is a diagram showing the detection results of a progressive short-circuit fault in Example 1.
[0026] Figure 11 This is a diagram showing the location results of the progressive short-circuit fault in Example 1.
[0027] Figure 12 This is a diagram showing the traditional correlation coefficient diagnostic results for progressive short-circuit faults in Example 1. Detailed Implementation
[0028] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0029] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0030] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0031] Example 1 This invention discloses a method for diagnosing micro-short-circuit faults in lithium-ion battery packs based on autoencoders and anomaly clustering. The implementation process includes three core steps: 1) By parallel computing of the Pearson correlation coefficient (representing linear similarity) and cosine similarity (representing directional similarity) of the voltage signal, dual-dimensional features are extracted. A standard averaging fusion strategy is used to generate fused features, effectively combining the advantages of the two similarity measures to reduce the impact of battery inconsistency and noise interference. 2) Train an autoencoder detection model based on a fusion feature dataset under normal operating conditions, and evaluate the mean square error of the reconstruction of the input feature vector online to achieve real-time fault detection; 3) When a fault is detected, a residual distance matrix is constructed and an unsupervised clustering algorithm is used to cluster abnormal variables, ultimately accurately locating the faulty battery cell.
[0032] This embodiment discloses a battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering, which solves the problems of difficulty in detecting early micro-short circuit faults in current lithium-ion battery systems, high computational load of model method and high diagnosis delay and low accuracy of correlation coefficient method, and realizes fast and reliable micro-short circuit fault diagnosis.
[0033] like Figure 1 As shown, the battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering includes the following steps: The target battery pack is identified, and the voltage signals of the batteries in it are sampled using the sliding time window method. The improved Pearson correlation coefficient and improved cosine similarity of the sampled voltage signals between batteries are calculated. Similarity fusion features are calculated based on improved Pearson correlation coefficient and improved cosine similarity. The similarity fusion features are input into a pre-trained autoencoder fault detection model to obtain reconstructed features; Calculate the loss function between similarity fusion features and reconstructed features, and use the loss function value as a fault detection indicator to determine whether the target battery pack has a micro short circuit fault; When a micro short-circuit fault occurs in the target battery pack, the residual matrix is obtained based on the similarity fusion features and reconstruction features of the voltage sampling signals within a time window before the first fault detection time. Construct the residual distance matrix based on the residual matrix; Based on the residual distance matrix, a clustering method is used to determine the fault variables, and finally the short-circuit faulty battery is identified.
[0034] The overall diagnostic framework of this invention is shown below. Figure 1 The technical solution of this embodiment will now be explained in detail with reference to the accompanying drawings.
[0035] 1. Extract similarity fusion features In lithium-ion battery packs, differences in state of charge and health among individual cells lead to voltage inconsistencies. This inconsistency makes it difficult to effectively identify micro-short-circuit fault characteristics when directly relying on raw voltage signals for fault diagnosis; therefore, voltage data preprocessing is necessary.
[0036] In a series-connected battery pack, the current of each individual cell is the same, resulting in a high degree of synchronicity in voltage changes under normal operating conditions. However, when a short-circuit fault occurs, the voltage similarity between the faulty cell and the normal cells will be significantly distorted. Therefore, this embodiment uses an improved Pearson correlation coefficient and cosine similarity to extract voltage features, as shown in formulas (1) and (2). (1) (2) in, and Representing voltage vectors respectively and Improved correlation coefficient and improved cosine similarity between them Indicates that the i-th battery is continuous A vector composed of sampled voltages, and Indicates the size of the sliding time window. This indicates the calculation of covariance. This represents the standard deviation calculation. Let represent the square wave correction function, the specific expression of which is shown in formula (3): (3) In the formula, This represents the amplitude of the square wave function. The function period is represented. A technique involving artificially injected correction square waves is employed to eliminate the negative impacts of measurement errors and noise interference on feature extraction. Sliding window length. The selection of [amount] needs to meet two constraints: [Amount] is too large. A value that is too small will reduce fault response sensitivity, while a value that is too small will... Such values cannot effectively suppress measurement noise and interference signals. Furthermore, to ensure the zero-mean characteristic of the square wave correction function, its period parameter must strictly satisfy the mathematical relationship of dividing the time window.
[0037] After optimization and verification, the final parameters of this solution are set as follows: time window =100 s, square wave amplitude =10 mV, period T=4 s.
[0038] To achieve synergistic optimization of linear similarity (corrected correlation coefficient) and directional similarity (improved cosine similarity) of voltage sequences, this embodiment employs a standardized average fusion method to construct composite features. As shown in formula (4).
[0039] (4) in, This represents the features after standardization.
[0040] Its technical advantages are reflected in three aspects: (1) eliminating feature dimension differences through Z-score standardization; (2) balancing the contribution weights of each feature using arithmetic average; and (3) suppressing random noise interference through feature error compensation mechanisms. It should be noted that in both the subsequent offline modeling and online diagnosis stages, the fused features need to be... Standardize the process.
[0041] 2. Fault Detection Model Based on Fusion Feature Autoencoder Based on similarity fusion features, an autoencoder fault detection model is constructed. This model consists of two components: an encoder for learning the latent representation of the data, and a decoder for reconstructing the original input from the latent representation. The specific structure is as follows: Figure 2 As shown.
[0042] The autoencoder employs a symmetrical structure, with both the encoder and decoder consisting of L fully connected (FC) layers. For the encoder, let the... Layers and The weight matrix and bias vector between layers are respectively expressed as: and , No. The output of neurons in a layer is represented by formula (5).
[0043] (5) in, Indicates the encoder's first... The output of neurons in the layer, This represents a certain activation function.
[0044] The output of the compression layer is expressed by formula (6): (6) Regarding the decoder section, let the decoder's first... Layers and The weight matrix and bias vector distribution of the layer are represented as follows: and Then the first The output of the neurons in the layer is expressed as formula (7): (7) The output of the output layer is the reconstructed fusion feature, expressed as formula (8): (8) Regarding the selection of activation functions, considering that the fused features need to be standardized, the Sigmoid function maps zero-centered data to the [0,1] interval, destroying the symmetry of the data and causing distortion of the negative half-axis information; while the ReLU function completely suppresses negative values, and the information of the negative half-axis data after standardization will be lost. In contrast, the Tanh function maps the input to the [-1,1] interval, and its output is symmetrical about the origin, which can effectively preserve the positive and negative fluctuation information of the fused features after standardization. Therefore, this embodiment uses the Tanh function to construct the autoencoder fault detection model, and its mathematical expression is shown in formula (9).
[0045] (9) To construct an efficient and reliable autoencoder short-circuit fault detection model, a reasonable loss function needs to be selected to quantify the difference between the input data and the reconstructed data. Commonly used loss functions include root mean squared error (RMSE), mean absolute error (MAE), and mean squared error (MSE). Among them, MSE is more suitable for vector reconstruction regression problems because its squared penalty on the error can effectively amplify significant biases, thereby improving the model's sensitivity to fault features. Therefore, this embodiment uses MSE as the loss function and optimizes the similarity fusion autoencoder model through backpropagation. Its mathematical expression is shown in formula (10).
[0046] (10) in, It is a moment k Fusion feature vectors, It is a fused feature vector obtained through reconstruction by an autoencoder.
[0047] Based on a similarity fusion feature dataset under normal operating conditions, an autoencoder fault detection model is constructed. During real-time diagnosis, if the fused feature vector to be tested conforms to the normal data distribution, the model can reconstruct it with high accuracy; however, when a fault occurs, the reconstruction error will increase significantly. Therefore, this embodiment uses the mean square error (MSE) between the input sample and the reconstructed output as the fault detection metric. When the MSE exceeds a threshold at a certain moment, a fault alarm is triggered. This threshold is determined based on the MSE of normal samples during the training phase.
[0048] 3. Short-circuit fault localization based on anomaly clustering The short-circuit fault localization strategy uses residual data within a sliding time window, rather than relying solely on the instantaneous residual vector at the fault trigger moment. Let the moment when the similarity fusion feature autoencoder model first detects the fault be... ,Pick The residual matrix is constructed from the residual dataset of the time window preceding time step [time]. As shown in formula (11): (11) In the formula, express The residual vector at time step, Represents the first time within a time window i Each residual vector express Time of the first The residuals of the fused feature variables, express Moment Battery # i With battery # j Similarity between feature variables express The reconstructed value is the same for the other variables.
[0049] Under normal operating conditions, the residuals of variables exhibit small non-negativity, while fault variables show significantly increased residuals. To maintain the residual distribution characteristics of normal variables while amplifying the anomalous features of fault residuals, a residual distance matrix is constructed based on this. As shown in formula (12).
[0050] (12) In the formula, Indicates the first i The residual distance vector of each variable. Indicates the first i The residual variables at time... t The calculated residual distance variable, Indicates the first i The mean of a residual variable over a time window. This represents the population mean of all residual variables within this time window.
[0051] To balance computational efficiency and fault information integrity, Principal Component Analysis (PCA) is used to reduce the dimensionality of the residual distance matrix, retaining the first two principal components. The resulting dimensionality-reduced matrix is defined as follows: .
[0052] To achieve accurate localization of short-circuited batteries, the Density-Based Spatial Clustering of Applications with Noise (DBSCAN) algorithm is used to detect anomalies in the residual distance matrix after PCA dimensionality reduction. As an unsupervised clustering method, DBSCAN can robustly distinguish between fault variables and normal variables without pre-training, and is particularly suitable for identifying anomalies under complex operating conditions.
[0053] The core idea of DBSCAN is to partition cluster structures based on density reachability. This algorithm can identify valid clusters within high-density regions while classifying points in low-density regions as outliers. Its hyperparameters include two: neighborhood radius (…). ) and minimum sample size ( ). The points in the dataset are thus divided into three categories: core points (those with at least one core point in their neighborhood) and core points (those with at least one core point in their neighborhood). The three categories of points are: core points, boundary points (belonging to the neighborhood of a core point but not itself), and outliers (points that are neither core points nor boundary points).
[0054] The principle of using DBSCAN for data anomaly clustering is as follows: Figure 3 As shown, based on this clustering principle, the short-circuit fault location process is as follows: (1) Initialization: Input the dimension-reduced residual distance matrix Given radius and minimum sample size Initialize all points to an unvisited state.
[0055] (2) Traverse the dataset: For each unvisited point p, mark it as visited. Calculate the... The set of points N(p) within the radius neighborhood. If N(p) contains fewer than... If the point N(p) is an outlier, then p is marked as an outlier. Otherwise, a new cluster C is created, point N(p) is added to cluster C, and cluster expansion begins.
[0056] (3) Expanding the cluster: For each point q in N(p), if q has not been visited, mark q as visited and calculate the value of q. The neighborhood N(q). If the number of points in N(q) is greater than or equal to... If so, the points in N(q) are added to cluster C (i.e., the neighborhood is extended).
[0057] (4) Repeat steps (2) to (3) to continue traversing the dataset until all points have been visited; (5) Output normal variables and fault variables.
[0058] After obtaining the fault variables based on DBSCAN clustering, the short-circuit faulty battery can be identified using the staggered location method.
[0059] 4. Short-circuit test and verification of diagnostic methods 4.1 Diagnostic Model Parameter Settings To balance model complexity and diagnostic performance, the parameters of the autoencoder are configured as shown in Table 1. Its structure adopts a symmetrical design, with both the encoder and decoder consisting of four fully connected layers. The number of neurons in the compression layer is set to four to achieve efficient low-dimensional representation of the input features.
[0060] Table 1 Autoencoder parameter settings
[0061] The battery pack was tested using the Urban Dynamometer Driving Schedule (UDDS) to simulate its actual operating conditions. The entire UDDS cycle lasted 1370 seconds, with a short-circuit fault injected into the battery pack after 600 seconds. The sampled voltage data from the first 600 seconds was used to extract similarity fusion features and for training the autoencoder detection model; the data after 600 seconds was used for diagnostic testing of micro-short-circuit faults, thus achieving complete separation of training and testing data. The autoencoder training parameters were set as follows: 100 epochs, 200 batch sizes, Adam optimizer, and a learning rate of 0.001.
[0062] 4.2 Diagnostic results of sudden micro-short circuit A short-circuit fault experiment was conducted on a battery pack consisting of eight batteries connected in series. The equivalent circuit is as follows: Figure 4 As shown. The battery used is a 30 Ah nickel-cobalt-manganese (NCM) lithium-ion battery with a rated voltage of 3.7 V, a charging cut-off voltage of 4.2 V, and a discharging cut-off voltage of 2.7 V. A sudden micro-short-circuit fault was simulated by connecting a parallel resistor between the positive and negative terminals of the battery. Battery #4 was selected as the faulty battery, and a short-circuit fault was injected during the period of 1300-1370 s. The short-circuit resistance was 0.5 Ω, corresponding to an equivalent short-circuit rate of approximately 0.247 C. The voltage curves collected under the entire UDDS operating condition are shown below. Figure 5As shown in the figure, after a micro-short circuit fault occurs, the voltage only shows a slight abnormal drop. Traditional fault diagnosis methods based on charge and discharge voltage thresholds are difficult to effectively identify this type of micro-short circuit fault.
[0063] The proposed method was used to diagnose sudden short-circuit faults in battery packs, and the results are as follows: Figure 6 , Figure 7 and Figure 8 As shown, under normal operating conditions of 600–1300 s, the fusion feature autoencoder fault detection model did not exhibit false alarms. When a micro-short-circuit fault occurred at 1300 s, the detection index MSE rose rapidly and exceeded the preset threshold at 1313 s, with a detection delay of only 13 s, verifying the method's rapid response capability to micro-short-circuit faults. After fault detection, PCA dimensionality reduction was performed based on the residual distance matrix at 1313 s, and DBSCAN unsupervised clustering analysis was conducted. The results showed that the fusion feature variables... and The significant anomaly led to the precise location of the short circuit fault in battery #4 using the staggered location method (which matched the actual fault).
[0064] Comparative analysis shows that the diagnostic results of the traditional correlation coefficient method are as follows: Figure 8 As shown, the correlation coefficient variable and The threshold of 0.02 was exceeded at 1320 s and 1323 s respectively, with a detection delay of 20 s and a localization delay of 23 s. In comparison, the proposed method improves the diagnostic speed by 43.5%, and the MSE index shows a more significant abnormal deviation after the fault. The detection sensitivity and visualization performance are significantly better than traditional methods.
[0065] 4.3 Progressive Micro-Short Circuit Diagnosis Results The sudden short-circuit fault discussed above is simulated by instantaneously connecting short-circuit resistors in parallel at the positive and negative electrodes of the battery. However, actual internal short-circuit faults in batteries exhibit a progressive evolution characteristic, and their dynamic process can be divided into three stages: in the initial stage, the individual cell voltage decreases slowly; in the middle stage, the short-circuit current increases, causing the voltage to decrease more rapidly, and at the same time, the heat generation rate exceeds the heat dissipation capacity, triggering a heat accumulation effect, which further catalyzes the short-circuit process; in the later stage, it develops into a hard short circuit (the terminal voltage approaches zero), ultimately triggering thermal runaway. To accurately simulate the evolution characteristics of internal short-circuit faults and achieve early diagnosis, a progressive micro-short-circuit fault is introduced based on the normal sampled voltage using mathematical formulas.
[0066] The sudden short-circuit fault discussed above is simulated by suddenly connecting a short-circuit resistor in parallel with the positive and negative terminals of the battery. However, actual internal short-circuit faults in batteries evolve continuously, progressing in three stages. In the initial stage, the individual cell voltage decreases slowly. In the middle stage, the short-circuit current increases, and the voltage decreases at an accelerated rate. Simultaneously, the rate of heat generation exceeds the rate of heat dissipation, leading to internal heat accumulation and further accelerating the short-circuit evolution. In the later stage, it develops into a hard short circuit, the terminal voltage drops to zero, and ultimately, thermal runaway occurs.
[0067] In order to simulate the development process of internal short-circuit faults and to make timely diagnoses in the early and middle stages of short circuits, a progressive micro-short-circuit fault is introduced based on the normal sampling voltage using a formula, as shown in formula (13): (13) in, The coefficient takes values between 0 and 1; in this experiment, it is set to 0.15. Setting it to 700 indicates that a progressive micro-short-circuit fault is injected at 700s, and the data collected in the first 700s serves as the baseline for normal operating conditions. The diagnostic model is trained using the data from the first 600 seconds, and the subsequent time-domain data (601-1370s) is used independently for testing and verification, achieving strict separation of training and testing data. The voltage curve for the progressive short-circuit fault is shown in Figure 9.
[0068] The proposed diagnostic method based on autoencoder and anomaly clustering was used for diagnosis, and the results are as follows: Figure 10 and Figure 11 As shown. The fault detection results of the fused feature autoencoder are as follows. Figure 10 As shown, the detection metric MSE exceeds the threshold in 785 seconds, triggering an alarm (detection delay is 85 seconds). After detecting the fault, a fault location strategy is executed. Unsupervised clustering of the residual distance matrix from PCA dimensionality reduction is performed using DBSCAN. The clustering results are shown below. Figure 11 As shown, similarity fusion feature variables and As an outlier variable, battery #5 was accurately located as the faulty battery based on the staggered location criterion (consistent with the actual fault location). Based on the diagnostic results, the accuracy, precision, recall, and F1 score were calculated to be 0.8768, 1, 0.8584, and 0.9238, respectively.
[0069] The diagnostic results of the correlation coefficient method are as follows: Figure 12 As shown. Correlation coefficient and The faults were detected at 822 s and 826 s, respectively, with a detection delay of 122 s and a location delay of 126 s. The accuracy, precision, recall, and F1 score for the entire diagnostic process were 0.8418, 1, 0.8182, and 0.9, respectively.
[0070] Compared with the correlation coefficient method, the proposed diagnostic method reduces the detection time by 37 seconds and the localization time by 41 seconds, significantly enhancing the real-time performance of the diagnosis. At the same time, the accuracy, recall, and F1-score are improved by 3.5%, 4%, and 2.4%, respectively, verifying the dual advantages of the proposed method in terms of diagnostic timeliness and recognition accuracy.
[0071] Example 2 This embodiment discloses a battery micro short-circuit diagnostic system based on autoencoders and anomaly clustering.
[0072] A battery micro-short circuit diagnostic system based on autoencoders and anomaly clustering includes: The dual-dimensional feature calculation module is configured to: determine the target battery pack, sample the battery voltage signals in it using the sliding time window method, and calculate the improved Pearson correlation coefficient and improved cosine similarity of the sampled voltage signals between batteries; The fusion feature calculation module is configured to calculate similarity fusion features based on the improved Pearson correlation coefficient and the improved cosine similarity. The autoencoder reconstruction module is configured to input similarity fusion features into a pre-trained autoencoder fault detection model to obtain reconstructed features; The judgment module is configured to: calculate the loss function between the similarity fusion feature and the reconstructed feature, use the loss function value as a fault detection indicator, and determine whether the target battery pack has a micro short circuit fault; The residual matrix calculation module is configured to: when a micro short-circuit fault occurs in the target battery pack, obtain the residual matrix based on the similarity fusion features and reconstruction features of the voltage sampling signals within a time window before the first fault detection time; The residual distance matrix calculation module is configured to: construct the residual distance matrix based on the residual matrix; The clustering localization module is configured to determine fault variables based on the residual distance matrix using a clustering method, and ultimately identify the short-circuit faulty battery. Example 3 The purpose of this embodiment is to provide a computer-readable storage medium.
[0073] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps in the battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering as described in Embodiment 1 of this disclosure.
[0074] Example 4 The purpose of this embodiment is to provide an electronic device.
[0075] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering as described in Embodiment 1 of this disclosure.
[0076] The steps and methods involved in the apparatuses of Embodiments 2, 3, and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0077] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0078] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering, characterized in that, Includes the following steps: The target battery pack is identified, and the voltage signals of the batteries in it are sampled using the sliding time window method. The improved Pearson correlation coefficient and improved cosine similarity of the sampled voltage signals between batteries are calculated. Similarity fusion features are calculated based on improved Pearson correlation coefficient and improved cosine similarity. The similarity fusion features are input into a pre-trained autoencoder fault detection model to obtain reconstructed features; Calculate the loss function between similarity fusion features and reconstructed features, and use the loss function value as a fault detection indicator to determine whether the target battery pack has a micro short circuit fault; When a micro short-circuit fault occurs in the target battery pack, the residual matrix is obtained based on the similarity fusion features and reconstruction features of the voltage sampling signals within a time window before the first fault detection time. Construct the residual distance matrix based on the residual matrix; Based on the residual distance matrix, a clustering method is used to determine the fault variables, and finally the short-circuit faulty battery is identified.
2. The battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering as described in claim 1, characterized in that, The improved Pearson correlation coefficient and improved cosine similarity are calculated using the following formulas: ; ; in, and Representing voltage vectors respectively and Improved correlation coefficient and improved cosine similarity between them; Indicates that the i-th battery is continuous A vector composed of sampled voltages, Indicates that the j-th battery is consecutive A vector composed of sampled voltages, Indicates the size of the sliding time window. This indicates the calculation of covariance. This represents the standard deviation calculation. This represents the square wave correction function.
3. The battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering as described in claim 1, characterized in that, Based on the improved Pearson correlation coefficient and improved cosine similarity, similarity fusion features are calculated, specifically including: ; in, represents the standardized features, and f represents the similarity fusion features; This represents the improved Pearson correlation coefficient after standardization. This represents the improved cosine similarity after standardization.
4. The battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering as described in claim 1, characterized in that, The similarity fusion features are input into a pre-trained autoencoder fault detection model to obtain reconstructed features, specifically including: First, the encoder in the autoencoder fault detection model is used to learn the latent representation of similarity fusion features; The latent representation is then input into the compression layer, and the features output from the compression layer are input into the decoder. The latent representation of the similarity fusion features is reconstructed to obtain the reconstructed features. The Tanh function is used as the activation function, and the mean squared error (MSE) is used as the loss function. or, When the loss function value between the calculated similarity fusion feature and the reconstructed feature increases, it is determined whether the target battery pack has a micro short circuit fault.
5. The battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering as described in claim 1, characterized in that, The residual matrix is specifically: ; In the formula, The residual matrix; express The residual vector at time step, express The residual vector at time step; express The residual vector at time step; express Time of the first The residuals of the fused feature variables; express Time of the first The residuals of the fused feature variables; express Time of the first The residuals of the fused feature variables; Represents the first time within a time window i One residual vector; express Time Battery i With battery j Similarity between feature variables express The reconstructed value; This is the moment when the autoencoder fault detection model first detects a fault.
6. The battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering as described in claim 5, characterized in that, The residual distance matrix is specifically as follows: ; In the formula, Represents the residual distance matrix; Indicates the first i The residual distance vector of each variable. Indicates the first i The residual variables at time... t The calculated residual distance variable, Indicates the first i The mean of a residual variable over a time window. This represents the population mean of all residual variables within this time window.
7. The battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering as described in claim 1, characterized in that, Based on the residual distance matrix, a density-based spatial clustering method using noise is employed to determine fault variables, ultimately identifying the short-circuit faulty battery. Specifically, this includes: The residual distance matrix is reduced in dimension to obtain the dimension-reduced matrix; A density-based spatial clustering method is used to detect anomalies in the dimensionality-reduced matrix, identifying effective clusters in high-density regions and identifying points in low-density regions as anomalies. The identified anomalies are used as fault variables. After obtaining the fault variables, the short-circuit faulty battery is identified using the staggered location method.
8. A battery micro-short circuit diagnostic system based on autoencoder and anomaly clustering, characterized in that, include: The dual-dimensional feature calculation module is configured to: determine the target battery pack, sample the battery voltage signals in it using the sliding time window method, and calculate the improved Pearson correlation coefficient and improved cosine similarity of the sampled voltage signals between batteries; The fusion feature calculation module is configured to calculate similarity fusion features based on the improved Pearson correlation coefficient and the improved cosine similarity. The autoencoder reconstruction module is configured to input similarity fusion features into a pre-trained autoencoder fault detection model to obtain reconstructed features; The judgment module is configured to: calculate the loss function between the similarity fusion feature and the reconstructed feature, use the loss function value as a fault detection indicator, and determine whether the target battery pack has a micro short circuit fault; The residual matrix calculation module is configured to: when a micro short-circuit fault occurs in the target battery pack, obtain the residual matrix based on the similarity fusion features and reconstruction features of the voltage sampling signals within a time window before the first fault detection time; The residual distance matrix calculation module is configured to: construct the residual distance matrix based on the residual matrix; The clustering localization module is configured to determine fault variables based on the residual distance matrix using a clustering method, and ultimately identify the short-circuit faulty battery.
9. A computer-readable storage medium having a program stored thereon, characterized in that, When executed by the processor, the program implements the steps in the battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering as described in any one of claims 1-7.
10. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the battery micro-short circuit diagnosis method based on autoencoder and anomaly clustering as described in any one of claims 1-7.
Citation Information
Cited By
Garbage classification quality supervision method and platform based on Internet of Things
CN121391036A
Lithium ion battery internal short circuit fault diagnosis method based on model and data fusion
CN122131163A