Multi-fault diagnosis method for lithium battery sample scarcity and data imbalance

By introducing a multi-factor imbalance index and prototype network into the deep residual network, the problems of scarce lithium battery fault data and category imbalance are solved, and high-precision multi-fault diagnosis and unknown fault detection are achieved, which is suitable for electric vehicles and energy storage systems.

CN120804819APending Publication Date: 2025-10-17CHONGQING UNIV OF POSTS & TELECOMM +1

Patent Information

Application Number
CN202510891826.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Lithium battery fault data samples are scarce, the categories are extremely unbalanced, unknown faults are difficult to identify, and the inference computational overhead is high. Existing methods have poor diagnostic effects in scenarios with small samples and unbalanced data.

Method used

The multi-factor imbalance index (MFII) is introduced into the deep residual network for dynamic monitoring and adaptive optimization. The prototype network (ProtoNet) is combined for anomaly detection. A ResNet-MFII model is constructed. The loss function and feature distribution are dynamically adjusted. The prototype vector is constructed using normal working condition samples for secondary verification.

Benefits of technology

The accuracy and robustness of lithium battery multi-fault diagnosis have been significantly improved, the recall rate and accuracy of minority faults have been increased, the false alarm rate has been reduced, and the generalization ability and practicality of the model have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804819A_ABST
    Figure CN120804819A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-fault diagnosis method for lithium battery sample scarcity and data imbalance, and the method comprises the steps: firstly constructing a feature extraction model based on a residual neural network, introducing an improved multi-factor imbalance index (MFI), carrying out the analysis of real-time monitoring batch feature distribution through employing a minimum spanning tree, and carrying out the real-time monitoring of the real-time monitoring batch feature distribution; therefore, the loss function and the sample weight are dynamically adjusted, and the learning stability of majority classes and the recognition precision of minority classes are both considered. On the basis, a prototype vector of a normal working condition is obtained through sample feature mean value calculation, and a prototype network (ProtoNet) is constructed to serve as an anomaly detector; after features of a test sample are extracted through the ResNet-MFII module, the Euclidean distance between the test sample and a normal prototype is calculated, if the Euclidean distance exceeds a set threshold value, it is judged that the test sample is abnormal, and detection of unknown or rare faults is achieved. The system finally outputs fault types and abnormal alarms, and high-precision recognition of multiple types of faults such as short circuit and aging of the lithium ion battery is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of lithium ion battery fault diagnosis, in particular to a lithium battery multi-fault diagnosis method suitable for small sample data scenarios, which can be widely applied in electric vehicles, energy storage systems and other devices using lithium batteries, for realizing accurate identification and anomaly detection of multiple fault types. BACKGROUND

[0002] Lithium ion batteries have been widely used in electric vehicles, energy storage systems and consumer electronics due to their high energy density, long life and environmental protection characteristics. However, in complex application environments, lithium batteries are easily affected by various factors and can produce various types of faults, such as internal short circuit, overcharge, overdischarge, temperature anomaly, capacity attenuation, etc. If these faults cannot be detected in time and accurately, they may cause performance degradation, capacity reduction, and even thermal runaway, explosion and other serious safety accidents. Therefore, it is of great theoretical significance and engineering application value to carry out efficient and accurate lithium battery fault diagnosis research.

[0003] Current lithium battery fault diagnosis methods can be mainly divided into physical modeling-based methods, signal processing and expert system-based methods, and data-driven intelligent diagnosis methods. Among them, data-driven methods have developed rapidly in recent years due to their model automatic learning and strong adaptability, especially the algorithms represented by deep learning have shown excellent performance in image, voice and industrial monitoring fields, and have also been gradually introduced into battery fault diagnosis.

[0004] However, in actual engineering applications, lithium battery fault data generally has the following typical challenges:

[0005] Small sample problem: Due to the low probability of fault occurrence, high experimental cost and high safety risk, it is difficult to obtain high-quality data under different fault modes, resulting in a serious lack of training data for deep models;

[0006] Data class imbalance: normal data is much more than fault data, and the distribution between different types of faults is extremely uneven, so traditional classification models are prone to overfitting to the majority class, resulting in decreased recognition ability of the minority class;

[0007] Fault mode complexity: lithium battery faults show strong working condition dependence, nonlinearity and strong heterogeneity, making it difficult for traditional static modeling methods to adapt;

[0008] Insufficient detection capability for unknown / new type faults: most deep models can only recognize known classes in the training set, and lack of recognition mechanism for new or unseen fault modes, with a high risk of false negatives.

[0009] To address the above challenges, existing research attempts to introduce methods such as transfer learning, few-shot learning, ensemble learning, and adversarial training to improve the generalization ability and small sample adaptability of the model. At the same time, scholars also attempt to combine clustering, metric learning and other technologies to more effectively reconstruct the feature space. However, these methods still have obvious shortcomings in class imbalance problem processing, unknown fault detection ability, model stability and deployment efficiency, and it is still difficult to meet the safety and real-time requirements of industrial-level deployment.

[0010] Publication No. CN119377790A discloses a lithium ion battery pack multi-fault diagnosis method, which comprises: acquiring the end voltage of each first battery monomer in the lithium ion battery pack to be diagnosed; extracting the first feature value of each first battery monomer under the target time domain feature; inputting the first feature value into the preset fault diagnosis model to make the model calculate the distance between the first feature value and the second feature value of each second battery monomer under the target time domain feature in the model, and screening out several target feature values with the closest distance according to the preset nearest neighbor number; voting on the target feature values, and taking the fault type of the second battery monomer corresponding to the target feature value with the most votes as the fault type of the current first battery monomer to be diagnosed; and determining the fault of the lithium ion battery pack according to the fault types of all the first battery monomers to be diagnosed. This method also does not have unknown fault detection ability, and the model stability needs to be improved. The traditional and static fault matching mechanism lacks comprehensive response to sample imbalance, unknown fault detection and model stability.

[0011] Therefore, there is an urgent need for a new lithium battery fault diagnosis method that can balance small sample learning, class imbalance regulation and abnormal detection ability, improve the accuracy, robustness and universality of diagnosis, and adapt to the practical needs of lithium battery intelligent management systems under complex working conditions. SUMMARY

[0012] The present application aims to solve the technical problems of "fault sample scarcity, class extreme imbalance, unknown fault difficulty to identify and large inference calculation overhead" in lithium ion battery actual operation data, and proposes a lithium battery multi-fault diagnosis method and system suitable for small sample and imbalanced data scenarios.

[0013] The core idea of the present application is: in the end-to-end diagnosis framework of deep residual network, a multi-factor imbalance index (MFII) is introduced to dynamically monitor and adaptively optimize the feature distribution, and at the same time, the metric learning idea of ProtoNet is used to construct a compact prototype vector for normal working conditions to perform secondary verification, so as to balance the high-precision classification of multi-class faults and the abnormal detection of unknown / rare faults.

[0014] To achieve the above purpose, the present application provides the following technical solutions:

[0015] A multi-fault diagnosis method for lithium battery sample scarcity and data imbalance, comprising the following steps:

[0016] An electric vehicle lithium battery dataset is obtained, and the scale of fault data is usually much smaller than that of normal data. The electric vehicle lithium battery dataset is preprocessed to obtain a training sample set and a verification sample set.

[0017] A feature extraction model based on a residual neural network is constructed, and an improved multi-factor imbalance index MFII is introduced. Through minimum spanning tree analysis, the distribution of input sample batches in the feature space is monitored in real time. According to the change of MFII, the class weight and sample weight in the loss function are dynamically adjusted, which enhances the recognition ability of minority class fault samples while maintaining the stability of the recognition performance of majority class, and obtains a residual neural network model ResNet-MFII integrated with the MFII enhancement mechanism.

[0018] The ResNet-MFII model is used to preliminarily diagnose the lithium ion battery, and the preliminary classification results of fault type and fault degree are obtained.

[0019] A prototype vector is constructed based on the feature mean of normal working condition samples, and a network prototype of normal samples, i.e. PN _normal , is obtained, which is used for subsequent anomaly detection based on the prototype network.

[0020] After feature extraction of the verification sample, if it is preliminarily determined as a normal sample, the Euclidean distance between the network prototype (PN _i ) of the sample feature and the network prototype (PN _normal ) constructed based on the feature mean of normal working condition samples is calculated. If the distance exceeds a predetermined threshold, the sample is determined as an unknown fault.

[0021] Further, the running data of the electric vehicle lithium battery containing normal and multiple fault conditions are collected, and the lithium battery dataset includes voltage, temperature and SOC data. The preprocessing of the electric vehicle battery dataset includes time window slicing, outlier removal and normalization processing, etc. to obtain the training sample set and the verification sample set. The fault sample ratio is not oversampled to form a highly imbalanced small sample dataset.

[0022] Further, the feature extraction model based on the residual neural network is constructed, and the improved multi-factor imbalance index MFII is introduced. Through minimum spanning tree analysis, the distribution of input sample batches in the feature space is monitored in real time, which specifically includes:

[0023] Feature extraction model: a backbone network based on residual neural network ResNet is constructed to perform end-to-end feature coding on the input sequence-tensor; batch-level feature monitoring: in the training process, high-dimensional feature tensors of the current batch are extracted from the intermediate layers; the intra-class distance distribution and the inter-class distance distribution of each category are calculated respectively; minimum spanning tree analysis: based on the Euclidean distance matrix, a minimum spanning tree MST is generated, and the edges of the minimum spanning tree are divided into an intra-class set SAME and an inter-class set DIFF; then, secondary division is performed on the connected components: for the SAME set, if the component size is less than N_total / C, where C is the number of categories and N_total is the total number of samples, the number of cross-class connections of the component is detected, and if the number of cross-class connections exceeds a threshold, the component is determined to be an overlap region, otherwise, the component is regarded as an independent cluster; for the DIFF set, according to the component size and the imbalance degree of the internal category proportion, the DIFF set is divided into a complex boundary region or a normal boundary region;

[0024] MFII index calculation: according to the overlap sample count, the sub-cluster number and the category weight, a multi-factor imbalance index MFII = f(Overlap, Cluster, Weight) is calculated; the larger the MFII value is, the more unbalanced the feature distribution of the current batch is.

[0025] The calculation process of the multi-factor imbalance index MFII is as follows:

[0026] A minimum spanning tree (MST) is constructed based on the Euclidean distance of the sample feature vector to retain the connectivity and local geometric information of the overall structure in the feature space; the edges in the minimum spanning tree are divided according to the labels of the connected nodes to obtain an intra-class connection set (SAME) and an inter-class connection set (DIFF), which are respectively used to represent the close contact between samples of the same class and the boundary complexity between samples of different classes; the connected components in the SAME and DIFF sets are analyzed to identify the overlap region (overlap) and the sub-cluster (cluster) in each category, and accordingly, the structural statistics of each category in the feature space are extracted, and the following four items are further calculated:

[0027] Distribution factor one Factor1: reflects the compactness and representativeness of the clustering structure in the category, and the calculation formula is:

[0028]

[0029] where N i is the number of samples of the i-th category, N i cluster is the number of sub-clusters thereof, K is the total number of categories, and N j represents the number of samples of the j-th category.

[0030] Distribution factor two Factor2: reflects the complexity of the category on the inter-class boundary, and is defined as:

[0031]

[0032] wherein, is the number of overlapping regions of this class with other classes, is the number of connected components in the DIFF set corresponding to this class.

[0033] Class balance weight one w1: measures the representative difference of the current class relative to other classes in the internal structure of clustering, the formula is:

[0034]

[0035] wherein, is the number of SAME connected components in the jth class, is the number of its sub-clusters, N tot is the total number of all samples.

[0036] Class balance weight two w2: used to quantify the degree of overlap between other classes and the current class, the formula is:

[0037]

[0038] Finally, the above factors and weights are integrated to calculate the multi-factor imbalance index MFII of the current batch:

[0039]

[0040] Further, the dynamic adjustment of the class weight and the sample weight in the loss function according to the change of the MFII comprises: the dynamic adjustment of the loss function according to the change of the MFII: after completing each forward-backward propagation, the MFII change rate is calculated, and the loss function is dynamically adjusted according to the current and the last round of MFII, so as to enhance the adaptability of the model to the data imbalance. Until the MFII curve tends to be stable; this process runs in batch granularity, forming a "monitoring-adjustment" closed loop, so that the model is continuously optimized in the direction of feature balance, and a ResNet-MFII model fused with the MFII mechanism is obtained. Thus, the model can adaptively focus on the sample distribution change in the training process, and enhance the learning ability of the rare samples and the unbalanced data. The loss function adjustment formula is as follows:

[0041]

[0042] Loss k is the loss function value at the kth iteration (the loss of the current round), Loss k-1 (k-1)th iteration (the loss of the last round), MFII kMFII k represents a multi-factor imbalance index (MFII) calculated at the kth iteration, used to measure the degree of imbalance of the current sample distribution. k-1 MFII k-1 represents the MFII value at the (k-1)th iteration.

[0043] The ResNet-MFII is used to infer the validation / test samples, outputting the probability distribution of each fault category and fault degree, and obtaining the first round of classification results.

[0044] Only the deep feature mean of the normal class training sample is used to construct a single normal prototype vector; for the first round of samples judged as normal, the Euclidean distance d between the feature vector f(x) and the normal prototype vector is calculated; if d>delta (a preset threshold), the prediction result of x is corrected to the second highest probability category, and if there is no clear fault category, it is marked as "unknown fault"; this strategy not only reduces the normal-fault misjudgment, but also maintains a low false positive rate of 0.64%, and because only one distance calculation is required, it saves about 88.9% of the inference power compared with the full-class prototype matching.

[0045] Performance evaluation includes: based on the confusion matrix, the recall rate (Recall), the false positive rate (FPR) and the minority class accuracy are calculated;

[0046] The experimental results show that: the contribution of MFII: the recall rate of 31-80Ω fault is increased from 70.72% to 97.87%, and the recall rate of 751-1300Ω is increased from 86.06% to 99.94%; the average minority class accuracy is increased by 16.85%; the FPR of the normal class is reduced from 1.04% to 0.64%; MFII+PN synergy: the fault recall rate of 151-350Ω and 351-750Ω is increased by 3.56% and 10.25% respectively; the cross-class misjudgment (351-750Ω→751-1300Ω) is reduced by 67.1%; the final average accuracy of the minority class is 97.77%; the intra-class variance is reduced by 38%, and the inter-class boundary is increased by 25%.

[0047] The application also provides a multi-fault diagnosis system for lithium battery samples which are scarce and data imbalanced, comprising a data preprocessing module: used for acquiring a lithium battery dataset, preprocessing the lithium battery dataset to obtain a training sample set and a validation sample set;

[0048] The ResNet-MFII module is used for preliminary diagnosis of the lithium ion battery to obtain a preliminary classification result of fault type and fault degree; the ResNet-MFII constructs a feature extraction model based on a residual neural network, and introduces an improved multi-factor imbalance index MFII, and realizes real-time monitoring of the distribution of the input sample batch in the feature space through minimum spanning tree analysis;

[0049] MFII dynamic adjustment module: for real-time calculation of MFII and dynamic adjustment of class weight and sample weight in loss function;

[0050] Prototype network module: for constructing prototype vector based on feature mean of normal working condition sample, obtaining network prototype of normal sample, i.e. PN _normal , for subsequent anomaly detection based on this prototype network;

[0051] Fault output module: for calculating the Euclidean distance between the network prototype (PN _i ) of the sample feature after feature extraction of the verification sample and the network prototype (PN _normal ) constructed based on the feature mean of the normal working condition sample; if the distance exceeds the preset threshold, the sample is determined as unknown fault.

[0052] The system can be deployed on a GPU server, a vehicle-mounted MCU+NPU, or a cloud-edge collaborative architecture.

[0053] A computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the above-mentioned multi-fault diagnosis method for lithium battery samples with scarcity and data imbalance.

[0054] Compared with the prior art CN119377790A, the present application has significant improvements in method principle, applicable scene and diagnostic ability. The method mainly relies on artificial feature extraction of battery monomer terminal voltage in a specific time domain, and adopts the nearest neighbor voting strategy based on the preset sample library for fault judgment. Its diagnostic effect is highly dependent on the representativeness and integrity of sample distribution, and it is difficult to handle the problems of sample distribution drift and variable working conditions, and lacks deep feature abstraction ability. More importantly, the method cannot identify unknown fault types that do not appear in the training set, and does not optimize any data imbalance problems and small sample problems, resulting in weak recognition ability for a small number of faults. At the same time, its voting mechanism needs to traverse historical samples in the reasoning stage, with large calculation overhead, and is not suitable for deployment in resource-constrained edge devices. In contrast, the present application constructs a deep residual network that fuses a multi-factor imbalance index (MFII), which can dynamically monitor feature distribution and adaptively optimize the learning weight of each type of sample during the training process, significantly improving the model's learning ability for key faults under extreme imbalanced data. The ProtoNet mechanism is introduced to perform anomaly detection based on the normal class prototype vector, effectively enhancing the model's ability to identify unknown or rare faults. The present application significantly improves the diagnostic accuracy of the minority class while maintaining a low false positive rate, with stronger generalization ability and practicality. The present application introduces innovations in network architecture, loss regulation mechanism and reasoning logic, and is more suitable for handling complex problems such as small samples, high imbalance, multi-modal and real-time requirements in lithium battery applications.

[0055] The advantages and beneficial effects of the present application are as follows:

[0056] 1. Significant improvement in minority class: Under 50:1 imbalance conditions, the key fault recall rate is increased by 27.15%, and the average minority class accuracy is 97.77%;

[0057] 2. False positive rate is reduced and stable: while maintaining a low false positive rate, the overall recall rate is increased by 1.66%;

[0058] 3. High computational efficiency: creating a prototype network of normal samples reduces the inference algorithm power by 88.9% compared to creating a full-class prototype matching,

[0059] 4. Generalization and safety redundancy: MFII-PN dual mechanism improves the sensitivity of the model to unknown / rare faults, providing higher safety redundancy for battery management systems.

[0060] In summary, the present application enhances feature balance through MFII and abnormality detection through ProtoNet, taking into account small sample learning, class imbalance regulation and efficient diagnosis requirements. It can be widely used in electric vehicles, energy storage power stations and other lithium battery application scenarios, providing reliable technical support for improving the safety and life management of battery systems. BRIEF DESCRIPTION OF DRAWINGS

[0061] Figure 1 A flowchart of a lithium battery multi-fault diagnosis method for small sample scenarios is provided for embodiments of the present application.

[0062] Figure 2 A feature connectivity framework diagram based on MST is provided for embodiments of the present application.

[0063] Figure 3 A data set distribution and model performance comparison result diagram is provided for embodiments of the present application.

[0064] Figure 4 Confusion matrix comparison of six diagnostic models: (a) LSTM; (b) TCN; (c) Transformer; (d) ResNet; (e) ResNet-MFII; (f) ResNet-MFII-PN. Schematic diagram. DETAILED DESCRIPTION

[0065] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. The described embodiments are only some of the embodiments of the present application, not all. To implement the lithium battery multi-fault diagnosis method proposed in the above summary, the present application constructs a diagnostic model based on a residual neural network (ResNet), and introduces an MFII enhancement module and a prototype network (Prototype Network, PN) to improve the diagnostic performance under small sample conditions. The technical solution of the present application to solve the above technical problems is:

[0066] As shown in Figure 1 : A lithium battery multi-fault diagnosis method for small sample scenarios, the method comprises the following steps:

[0067] 1. Data processing: Collecting electric vehicle lithium battery operation data containing normal and multiple fault conditions, including voltage, temperature, SOC data, obtaining training sample set, verification sample set, test sample set through time window slicing, outlier rejection, normalization and other steps; The fault sample ratio of the training sample set and the verification sample set is artificially set to form a highly unbalanced small sample data set (normal data: fault data = 50:1), and the test data set is to test the diagnostic effect of the model trained by the small sample data on larger scale data, as shown in the upper left corner of Figure 3 The data amount proportions of the three data sets are: training data set: verification data set: test data set = 10.4%: 2.61%: 86.97%.

[0068] 2. Model training:

[0069] AsFigure 1 Model training part, feature extraction model: construct a backbone network based on residual neural network (ResNet), and perform end-to-end feature coding on the input sequence-tensor; as shown in Figure 2 The feature connectivity framework is shown in the figure, in the training process, the high-dimensional feature tensor of the current batch is extracted from the middle layer; the intra-class distance distribution and the inter-class distance distribution of each class are calculated respectively; minimum spanning tree analysis: generate the minimum spanning tree (MST) based on the Euclidean distance matrix, and divide its edges into intra-class set (SAME) and inter-class set (DIFF); then perform secondary division on the connected components: for the SAME set, if the component size is less than N_total / C (where C is the number of classes, and N_total is the total number of samples, then detect the number of cross-class connections, if it exceeds the threshold, it is judged as an overlapping area, otherwise it is regarded as an independent cluster; for the DIFF set, according to the component size and the internal class proportion imbalance degree, it is divided into complex boundary area or normal boundary area;

[0070] MFII index calculation: according to the overlap sample count, the number of sub-clusters and the class weight, the multi-factor imbalance index MFII is calculated; the larger the MFII value is, the more unbalanced the current batch feature distribution is. The calculation process is as follows: based on the Euclidean distance of the sample feature vector, a minimum spanning tree (MST) is constructed to preserve the connectivity and local geometric information of the overall structure in the feature space; the edges in the minimum spanning tree are divided according to the labels of the connected nodes, obtaining the intra-class connection set (SAME) and the inter-class connection set (DIFF), which are used to represent the close contact between samples of the same class and the boundary complexity between different classes, respectively; analyze the connected components in the SAME and DIFF sets to identify the overlap area (overlap) and the sub-cluster (cluster) in each class, and extract the structural statistics of each class in the feature space, and further calculate the following four items:

[0071] Distribution factor one (Factor1): reflects the compactness and representativeness of the clustering structure within the class, and the calculation formula is:

[0072]

[0073] Where, N i is the number of samples of the i-th class, is the number of sub-clusters, K is the total number of classes, and N j represents the number of samples of the j-th class.

[0074] Distribution factor two (Factor2): reflects the complexity of the class on the inter-class boundary, and is defined as:

[0075]

[0076] Where, the number of overlapping regions of this class with other classes, the number of connected components in the DIFF set corresponding to this class.

[0077] Class balance weight one (w1): measures the representative difference of the current class relative to other classes in the internal structure of the cluster, the formula is:

[0078]

[0079] wherein, the number of SAME connected components in the jth class, the number of its sub-clusters, N tot the total number of all samples.

[0080] Class balance weight two (w2): used to quantify the degree of overlap between other classes and the current class, the formula is:

[0081]

[0082] Finally, the multi-factor imbalance index (MFII) of the current batch is calculated by integrating the above factors and weights as follows:

[0083]

[0084] Adaptive loss adjustment: after each forward-backward propagation is completed, the MFII change rate AMFII is calculated; if AMFII continues to decrease and the main class learning converges, the minority class weight is automatically increased and the majority class weight is decreased until the MFII curve tends to be stable; this process runs at the batch granularity, forming a "monitoring-adjustment" closed loop, so that the model is continuously optimized towards feature balance, and the ResNet-MFII model with MFII mechanism is obtained.

[0085] 3. Model verification and testing: use ResNet-MFII to infer the verification / test samples, output the probability distribution of each fault class and fault degree, and obtain the first round of classification results. Abnormal detection stage (ProtoNet fine discrimination): only use the deep feature mean of the normal class training samples to construct a single normal prototype vector; for the first round of samples x judged as normal, calculate the Euclidean distance d between its feature vector f(x) and the normal prototype vector;

[0086] If d>δ (preset threshold), the prediction result of x is corrected to the second highest probability class, and if there is no clear fault class, it is marked as "unknown fault"; this strategy not only reduces the normal-fault misjudgment, but also maintains a low false positive rate of 0.64%, and because only one distance calculation is needed, it saves about 88.9% of the inference power compared to full-class prototype matching.

[0087] 4. Result output: fuse ResNet-MFII probability output and ProtoNet verification results to generate final fault type, fault severity and abnormal alarm.

[0088] To construct a highly imbalanced small sample fault diagnosis scene, the ratio of normal samples to fault samples is set to 50:1 in the training sample set and the verification sample set in this study, to simulate the problem of scarce fault samples in actual engineering. On this basis, a test set with significantly larger data is further introduced to evaluate the generalization ability and diagnostic performance of the model under the condition of relying only on a small amount of samples for training. As shown in Figure 3 As shown in the pie chart in the upper left corner, the proportions of the training set, the verification set and the test set in the total data are 10.4%, 2.61% and 86.97% respectively, wherein the training set and the verification set jointly participate in the optimization and selection of model parameters, and the large-scale test set is used to strictly test the robustness and identification accuracy of the model to multi-fault and multi-working condition data. The necessity of setting a large amount of test set lies in: on the one hand, it can avoid the overfitting evaluation error caused by small sample verification; on the other hand, it can truly reflect the complex working conditions and data distribution faced by the model in actual deployment, so as to more comprehensively measure the generalization ability and application value of the model under the condition of small sample learning. As shown in Figure 3 As shown in the pie chart in the upper left corner, the proportions of the training set, the verification set and the test set in the total data are 10.4%, 2.61% and 86.97% respectively, wherein the training set and the verification set jointly participate in the optimization and selection of model parameters, and the large-scale test set is used to strictly test the robustness and identification accuracy of the model to multi-fault and multi-working condition data. The necessity of setting a large amount of test set lies in: on the one hand, it can avoid the overfitting evaluation error caused by small sample verification; on the other hand, it can truly reflect the complex working conditions and data distribution faced by the model in actual deployment, so as to more comprehensively measure the generalization ability and application value of the model under the condition of small sample learning. As shown in

[0089] As shown in Figure 4 As shown in the pie chart in the upper left corner, the proportions of the training set, the verification set and the test set in the total data are 10.4%, 2.61% and 86.97% respectively, wherein the training set and the verification set jointly participate in the optimization and selection of model parameters, and the large-scale test set is used to strictly test the robustness and identification accuracy of the model to multi-fault and multi-working condition data. The necessity of setting a large amount of test set lies in: on the one hand, it can avoid the overfitting evaluation error caused by small sample verification; on the other hand, it can truly reflect the complex working conditions and data distribution faced by the model in actual deployment, so as to more comprehensively measure the generalization ability and application value of the model under the condition of small sample learning. As shown in

[0090] In summary, the application introduces MFII dynamic evaluation and prototype network module, and proposes a high-robustness lithium battery multi-fault diagnosis method suitable for small sample conditions, and has good generalization ability and engineering deployment potential.

Claims

1. A multi-fault diagnosis method for lithium battery samples with scarcity and data imbalance, characterized by: The following steps are involved: Obtain a lithium battery data set, preprocess the lithium battery data set, and obtain a training sample set and a verification sample set; A feature extraction model based on a residual neural network is constructed, and an improved multi-factor imbalance index (MFII) is introduced. Minimum spanning tree analysis is used to monitor the distribution of input sample batches in the feature space in real time. The class and sample weights in the loss function are dynamically adjusted based on changes in MFII. This enhances the ability to identify minority class fault samples while maintaining stable performance for majority class recognition. This results in a residual neural network model, ResNet-MFII, that incorporates the MFII enhancement mechanism. The ResNet-MFII model is used to perform preliminary diagnosis on lithium-ion batteries to obtain preliminary classification results of fault type and fault severity; The prototype vector is constructed based on the characteristic mean of the normal working condition sample to obtain the network prototype of the normal sample, namely PN _normal ,used for subsequent anomaly detection based on this prototype network; After feature extraction of the verification sample, if it is initially determined to be a normal sample, the sample feature is calculated. If the distance exceeds the preset threshold, the sample is judged as an unknown fault.

2. The multi-fault diagnosis method for lithium battery sample scarcity and data imbalance according to claim 1, characterized in that: The lithium battery data set includes voltage, temperature and SOC data, and the preprocessing of the electric vehicle battery data set includes time window slicing, outlier removal and normalization.

3. The multi-fault diagnosis method for lithium battery sample scarcity and data imbalance according to claim 1, characterized in that: The feature extraction model based on the residual neural network is constructed, and the improved multi-factor imbalance index MFII is introduced to realize real-time monitoring of the distribution of input sample batches in the feature space through minimum spanning tree analysis. Specifically, it includes: Feature extraction model: Construct a backbone network based on the residual neural network ResNet to perform end-to-end feature encoding on the input sequence-tensor; batch-level feature monitoring: During the training process, extract the high-dimensional feature tensor of the current batch from the intermediate layer; calculate the intra-class distance distribution and inter-class distance distribution for each category respectively; minimum spanning tree analysis: Generate a minimum spanning tree (MST) based on the Euclidean distance matrix and divide its edges into an intra-class set SAME and an inter-class set DIFF; then perform a secondary partitioning on the connected components: for the SAME set, if the component size is less than N_total / C, where C is the number of categories and N_totals is the total number of samples, detect the number of cross-class connections. If it exceeds the threshold, it is determined to be an overlapping area; otherwise, it is considered an independent cluster; for the DIFF set, it is divided into a complex boundary area or a normal boundary area based on the component size and the imbalance between the internal categories. MFII indicator calculation: Calculate the multi-factor imbalance index MFII = f(Overlap, Cluster, Weight) based on the overlapping sample count, the number of subclusters, and the category weight. The larger the MFII value, the more unbalanced the feature distribution of the current batch.

4. A multi-fault diagnosis method for lithium battery sample scarcity and data imbalance according to claim 1 or 3, characterized in that: The calculation process of the multi-factor imbalance index MFII is as follows: Distribution factor 1: reflects the compactness and representativeness of the internal clustering structure of the category. The calculation formula is: Among them, N i is the number of samples in the i-th category, is the number of its subclusters, K is the total number of categories, N j represents the number of samples of the jth class; Distribution factor 2: reflects the complexity of the category at the boundary between categories and is defined as: in, is the number of overlapping areas between this class and other classes, is the number of connected components in the corresponding DIFF set of this class; Category balance weight w1: measures the difference in representativeness of the current category relative to other categories in the internal structure of the cluster. The formula is: in, is the number of SAME connected components in the jth class, is the number of its subclusters, N tot is the total number of all samples; Category balance weight 2 w2: used to quantify the degree of overlap between other categories and the current category. The formula is: Finally, by combining the above factors and weights, the multi-factor imbalance index MFII of the current batch is calculated as:

5. The multi-fault diagnosis method for lithium battery sample scarcity and data imbalance according to claim 1, characterized in that: The loss function is dynamically adjusted according to the change of MFII: after each forward-backward propagation, the MFII change rate is calculated, and the loss function is dynamically adjusted according to the change of MFII in the current and previous rounds. The loss function adjustment formula is as follows: Loss k is the loss function value at the kth iteration, Loss k-1 Represents the loss function value at the k-1th iteration, MFII k Represents the multi-factor imbalance index calculated at the kth iteration, MFII k-1 Indicates the MFII value at the k-1th iteration.

6. A multi-fault diagnosis system for lithium battery samples that are scarce and data imbalanced, characterized by: It includes a data preprocessing module: used to obtain lithium battery data sets, preprocess the lithium battery data sets, and obtain training sample sets and verification sample sets; ResNet-MFII module: This module is used to perform preliminary diagnosis of lithium-ion batteries and obtain preliminary classification results of fault type and fault severity. ResNet-MFII constructs a feature extraction model based on a residual neural network and introduces an improved multi-factor imbalance index (MFII). Through minimum spanning tree analysis, it enables real-time monitoring of the distribution of input sample batches in the feature space. MFII dynamic adjustment module: used to calculate MFII in real time and dynamically adjust the class weights and sample weights in the loss function; Prototype network module: used to construct a prototype vector based on the feature mean of the normal working condition sample to obtain the network prototype of the normal sample, namely PN _normal ,used for subsequent anomaly detection based on this prototype network; Fault output module: After extracting features from the verification sample, if it is initially determined to be a normal sample, the network prototype (PN) of the sample feature is calculated. _i ) and the network prototype (PN) constructed based on the characteristic mean of normal working condition samples _normal ) between them; if the distance exceeds the preset threshold, the sample is determined to be an unknown fault.

7. The multi-fault diagnosis system for lithium battery sample scarcity and data imbalance according to claim 6, characterized in that: The ResNet-MFII module includes: a feature extraction model for end-to-end feature encoding of the input sequence-tensor using a backbone network based on the residual neural network ResNet; a batch-level feature monitoring module for extracting the high-dimensional feature tensor of the current batch from the intermediate layer during training; calculating the intra-class distance distribution and inter-class distance distribution of each category respectively; a minimum spanning tree module for generating a minimum spanning tree MST based on the Euclidean distance matrix, and dividing its edges into an intra-class set SAME and an inter-class set DIFF; a secondary partitioning module for detecting the number of cross-class connections in the SAME set if the component size is less than N_total / C, where C is the number of categories and N_totals is the total number of samples. If the threshold is exceeded, it is determined to be an overlapping area, otherwise it is regarded as an independent cluster; for the DIFF set, it is divided into a complex boundary area or a normal boundary area based on the component size and the imbalance between the internal categories. MFII indicator calculation module: Calculate the multi-factor imbalance index MFII = f(Overlap, Cluster, Weight) based on the overlapping sample count, the number of subclusters and the category weight.

8. The multi-fault diagnosis system for lithium battery sample scarcity and data imbalance according to claim 6, characterized in that: The calculation process of MFII is as follows: Distribution factor 1: reflects the compactness and representativeness of the internal clustering structure of the category. The calculation formula is: Among them, N i is the number of samples in the i-th category, is the number of its subclusters, K is the total number of categories, N j represents the number of samples of the jth class; Distribution factor 2: reflects the complexity of the category at the boundary between categories and is defined as: in, is the number of overlapping areas between this class and other classes, is the number of connected components in the corresponding DIFF set of this class; Category balance weight w1: measures the difference in representativeness of the current category relative to other categories in the internal structure of the cluster. The formula is: in, is the number of SAME connected components in the jth class, is the number of its subclusters, N tot is the total number of all samples; Category balance weight 2 w2: used to quantify the degree of overlap between other categories and the current category. The formula is: Finally, by combining the above factors and weights, the multi-factor imbalance index MFII of the current batch is calculated as:

9. The multi-fault diagnosis system for lithium battery sample scarcity and data imbalance according to claim 6, characterized in that: The loss function is dynamically adjusted according to the change of MFII: after each forward-backward propagation, the MFII change rate is calculated, and the loss function is dynamically adjusted according to the change of MFII in the current and previous rounds.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the multi-fault diagnosis method for lithium battery sample scarcity and data imbalance according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Lithium ion battery pack multi-fault diagnosis method and device, terminal equipment and computer readable storage medium

    CN119377790A

Cited By

  • Battery abnormity early warning method and device based on ensemble learning

    CN121541074A