A Battery Fault Diagnosis Method and System Based on Clustering and Random Anomaly Selection
By combining variational mode decomposition and clustering algorithms with random anomaly selection, the high complexity and poor robustness of existing battery fault diagnosis methods are solved, achieving fast and accurate battery fault diagnosis applicable to various battery types.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2026-03-13
AI Technical Summary
Existing battery fault diagnosis methods suffer from high computational complexity, poor robustness, and a high demand for high-quality fault data, resulting in low diagnostic accuracy.
A clustering-based and random anomaly selection method is adopted. Static and dynamic components are extracted through variational mode decomposition. Combined with K-means clustering and random anomaly selection algorithm, the characteristics of gradual and sudden faults are handled respectively, so as to achieve fast and accurate fault diagnosis.
It enables fast and accurate battery short-circuit fault diagnosis without the need for model training, is applicable to various battery types, improves diagnostic speed and accuracy, and avoids dependence on high-quality fault data.
Smart Images

Figure CN119291512B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of battery management technology, specifically relating to a battery fault diagnosis method and system based on clustering and random anomaly selection. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Lithium-ion batteries are widely used in electric vehicles, energy storage systems, and other fields due to their advantages such as long lifespan, high energy density, and low self-discharge rate. In practical applications of electric vehicles and energy storage systems, batteries may experience various internal and external faults during operation, leading to performance problems and potentially serious consequences such as thermal runaway, fire, or explosion. Therefore, timely diagnosis of battery faults and prevention of their further development are crucial to ensuring the safe and reliable operation of the battery system.
[0004] Currently, methods for diagnosing short-circuit faults in batteries can be broadly categorized into model-based methods and data-driven methods.
[0005] 1) Model-based approach: Model-based short-circuit fault diagnosis methods first establish a battery model by analyzing the physical and chemical principles of the battery. Then, faults are detected by comparing model parameters or estimated battery states with actual values. This method can achieve online diagnosis, but it suffers from high complexity, large computational load, and susceptibility to external interference.
[0006] 2) Data-driven approach: Data-driven short-circuit diagnosis methods learn features from historical faulty battery data to form a nonlinear black-box mapping model for fault diagnosis. This approach utilizes computational intelligence to simulate the inherent nonlinearity of the battery and employs statistical techniques to identify subtle deviations caused by the fault. However, this method suffers from a lack of high-quality fault data for training, leading to low model diagnostic accuracy and poor robustness. Summary of the Invention
[0007] To address the aforementioned problems, this invention proposes a battery fault diagnosis method and system based on clustering and random anomaly selection. This invention can achieve rapid diagnosis of battery short-circuit faults with high accuracy and minimal or no requirement for high-quality fault data, ensuring the safe and reliable operation of the battery.
[0008] According to some embodiments, the present invention adopts the following technical solution:
[0009] A battery fault diagnosis method based on clustering and random anomaly selection includes the following steps:
[0010] S1: Obtain historical data of the battery module under diagnosis during normal operation;
[0011] S2: Process the voltage data of each cell in the battery module to obtain multiple modal components, remove the high-frequency components, and obtain the static and dynamic components.
[0012] S3: Extract progressive fault features from the static components, extract sudden fault features from the dynamic components, and extract data points from the progressive fault features and sudden fault features respectively.
[0013] S4: Cluster the two types of data points extracted, and introduce a random anomaly selection algorithm to score the anomalies within each cluster to obtain the two anomaly scores of each battery when the battery module is running normally, and set the progressive fault threshold and the sudden fault threshold.
[0014] S5: Obtain real-time data of the battery module, execute steps S2-S4 to calculate the two abnormal scores of all individual cells in the battery module, and compare them with the progressive fault threshold or the sudden fault threshold respectively. If the corresponding threshold is exceeded, it is determined that the corresponding fault has occurred.
[0015] As an alternative implementation, the battery modules are connected in series. The number of batteries in the battery module and the cycle conditions are selected according to the actual application. The cycle conditions include the current rate of battery charging and discharging, depth of discharge, temperature and cutoff voltage.
[0016] As an alternative implementation, the historical data includes the voltage and current data of each battery and the corresponding data acquisition time.
[0017] As an alternative implementation, step S2 uses a variational mode decomposition algorithm to adaptively decompose the battery voltage data to obtain m mode components: {IMF1, IMF2, ..., IMF...} m}, where m is the pre-set number of decompositions.
[0018] As a further implementation, only the static component IMF1, which characterizes the battery voltage trend, and the IMF2, which reflects dynamic fault information, are used; other high-frequency components are treated as noise and discarded. The static components of all batteries are... Dynamic components are
[0019] As an alternative implementation, the process of extracting progressive fault features from the static components includes:
[0020]
[0021] Among them, z i (t) is the standard score of battery i at time t. is the static component of battery i at time t, and T represents the length of the time series involved in the calculation. represents the magnification degree. The larger it is, the more sensitive to abnormal data. N is the number of batteries in the battery module, and m is the preset decomposition quantity.
[0022] As an alternative implementation, the process of extracting sudden fault features from the dynamic component includes: using the Pearson correlation coefficient method to process the dynamic component to extract fault features. The specific formula is:
[0023]
[0024] where r i (t) is the correlation coefficient between battery i and the average value of the dynamic components of each battery at time t. is the dynamic component of battery i at time t, Y is the average value sequence of the dynamic components of each battery, is the average value of the dynamic components within the time window.
[0025] As an alternative implementation, the process of extracting data points from the progressive fault features and the sudden fault features respectively includes using a sliding window to process the progressive fault features and the sudden fault features to obtain static component data points and dynamic component data points, and the widths of the sliding windows in the two data point extraction processes are the same.
[0026] As an alternative implementation, the process in step S4 includes:
[0027] Using the K-means algorithm to cluster the static component data points and the dynamic component data points respectively to obtain K clusters: {C1, C2, …, C k}; C i is the i-th cluster, i = 1, 2, …, K;
[0028] For each point x j ∈C k , determine its neighborhood: N k (x j ) = {x l ∈C k : d(x j , x l ) < r}, where r is the neighborhood radius and d(x j , x l ) is the distance metric;
[0029] For each point x j within the cluster, use an unsupervised anomaly detection algorithm to calculate the anomaly score and calculate the local density of point x j ; From the neighborhood N k (x jRandomly select m samples S = {x} from the given data. j1 ,x j2 ,…,x jm}; Calculate its local density: Where σ is the sample variance; calculate the anomaly score:
[0030] The maximum values of the anomaly scores calculated based on static component data points and dynamic component data points are set as the progressive fault threshold and the sudden fault threshold, respectively.
[0031] As an alternative implementation, in step S5, the sudden anomaly score is compared with the sudden fault threshold. If the sudden anomaly score is greater than the sudden fault threshold, it is determined that a sudden fault has occurred. Conversely, the gradual anomaly score is compared with the gradual fault threshold. If the gradual anomaly score is greater than the gradual fault threshold, it is determined that a gradual fault has occurred. If both anomaly scores are less than the corresponding thresholds, it is determined that the battery pack is working normally.
[0032] A battery fault diagnosis system based on clustering and random anomaly selection includes:
[0033] The data acquisition module is configured to acquire historical data of the battery module under diagnosis during normal operation, as well as real-time data of the battery module.
[0034] The mode decomposition module is configured to process the voltage data of each cell in the battery module to obtain multiple mode components, remove the high-frequency components, and obtain static and dynamic components.
[0035] The fault feature extraction module is configured to extract progressive fault features from the static components, extract sudden fault features from the dynamic components, and extract data points from the progressive fault features and the sudden fault features, respectively.
[0036] The anomaly scoring module is configured to cluster the two types of data points extracted, and for each cluster obtained by clustering, a random anomaly selection algorithm is introduced to score the anomalies within the cluster, so as to obtain the two anomaly scores of each battery when the battery module is running normally, and to set the progressive fault threshold and the sudden fault threshold.
[0037] The fault diagnosis module is configured to call the mode decomposition module, fault feature extraction module, and anomaly scoring module based on real-time data to calculate two anomaly scores for all individual cells in the battery module, and compare them with the progressive fault threshold or the sudden fault threshold respectively. If the corresponding threshold is exceeded, it is determined that the corresponding fault has occurred.
[0038] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the steps in the method described above.
[0039] The electronic device may be a battery controller or a battery management system.
[0040] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0041] This invention uses variational mode decomposition to decompose battery voltage sequences, extracting static components reflecting progressive fault characteristics and dynamic components reflecting sudden fault characteristics. Then, different fault feature extraction methods are applied to each component based on its characteristics to extract fault features. Finally, the extracted fault features are input into a diagnostic algorithm combining K-means clustering and random anomaly selection to achieve rapid and accurate diagnosis of short-circuit faults.
[0042] The fault diagnosis method proposed in this invention can achieve rapid diagnosis of short-circuit faults without training a model, thus overcoming the problem that traditional machine learning methods cannot be effectively trained due to the lack of high-quality fault data.
[0043] This invention extracts static and dynamic components from the decomposed modal components and processes them using different feature extraction methods, avoiding mutual interference between the two components and enabling the diagnosis of progressive and sudden faults.
[0044] This invention combines the global clustering results of K-means with the local anomaly scoring of the random anomaly selection algorithm to effectively address battery fault diagnosis scenarios with complex distributions or multimodal data, thereby effectively improving diagnosis speed and ensuring high diagnosis accuracy.
[0045] The method developed in this invention is data-driven and does not involve complex battery electrochemical mechanisms. It can be conveniently used for fault diagnosis of various types of batteries without the need to build different battery models under different conditions, as is the case with model-based methods.
[0046] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0047] 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.
[0048] Figure 1 A flowchart of a battery short-circuit fault diagnosis method provided in one embodiment;
[0049] Figure 2 A flowchart for fault diagnosis is provided as one embodiment;
[0050] Figure 3 This is a schematic diagram of an electronic device according to one embodiment. Detailed Implementation
[0051] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0052] It should be noted that the following detailed description is illustrative and intended to provide further explanation 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.
[0053] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0054] Where there is no conflict, the embodiments and features described in this application may be combined with each other.
[0055] Example 1
[0056] A battery fault diagnosis method based on clustering and random anomaly selection, such as Figure 1 As shown, it includes the following steps:
[0057] S1: Obtain historical data of the battery module to be diagnosed during normal operation.
[0058] In this embodiment, the battery modules are connected in series. The number of batteries N in the module and the cycle conditions are selected according to the actual application. The cycle conditions include the current rate of battery charging and discharging, depth of discharge, temperature and cutoff voltage. The collected historical data of the battery module includes, but is not limited to, the voltage and current data of each battery and the corresponding data collection time.
[0059] S2: Use the variational mode decomposition algorithm to process the voltage data of each cell in the battery module to obtain m mode components, and take the low frequency components.
[0060] Specifically, the variational mode decomposition algorithm is used to adaptively decompose the voltage data of each battery to obtain m mode components: {IMF1, IMF2, ..., IMF...} m}, where m is the pre-set number of decompositions. Only the static component IMF1, which best characterizes the battery voltage trend, and the IMF2, which best reflects dynamic fault information, are used; other high-frequency components are treated as noise and discarded. The static components of all batteries are... Dynamic components are
[0061] S3: The static components of each battery are processed to extract progressive fault features. Then, the Pearson correlation coefficient is used to extract sudden fault features from the dynamic components. Finally, a sliding window is used to extract data points from the two types of fault features respectively.
[0062] The specific steps are as follows:
[0063] S31: Process the static components to extract progressive fault features. The specific formula is as follows:
[0064]
[0065] In the formula z i (t) is the standard score of battery i at time t. It represents the static component of battery i at time t, where T represents the length of the time series involved in the calculation. This indicates the degree of magnification; the higher the magnification, the more sensitive the data is to outliers.
[0066] S32: The Pearson correlation coefficient method is used to process dynamic components and extract fault features. The specific formula is as follows:
[0067]
[0068] In the formula r i (t) is the correlation coefficient between battery i at time t and the average value of the dynamic components of each battery. Y is the dynamic component of battery i at time t, and Y is the average value sequence of the dynamic components of each battery. It is the average value of the dynamic components within the time window.
[0069] S33: Use a sliding window to handle z i (t) and r i (t) Obtain static component data point x i ={z i (t-W+1), z i (t-W+2),…,z i (t)};i=1,2,…,N, and dynamic component data points n i ={r i (t-W+1), r i (t-W+2),…,r i(t)};i=1,2,…,N. Where W represents the sliding window width, and the data points x of all batteries are given by the sliding window. i and n i These are respectively composed of static component input and dynamic component input.
[0070] S4: Input the two types of data points extracted into the diagnostic algorithm to obtain two abnormal scores for each battery when the battery module is running normally, and take the maximum value as the progressive fault threshold J1 and the sudden fault threshold J2 respectively.
[0071] The diagnostic algorithm combines K-means clustering with random anomaly selection. The specific steps of the algorithm and the method for setting the threshold are as follows:
[0072] S41: First, cluster the input data points using the K-means algorithm to obtain K clusters: {C1, C2, ..., C...} k}
[0073] S42: Calculate the anomaly score within each cluster, specifically for each cluster C. k Perform the following steps:
[0074] S421: For each point x j ∈C k Determine its neighborhood:
[0075] N k (x j )={x l ∈C k :d(x j ,x l ) <r}
[0076] Where r is the neighborhood radius, d(x) j ,x l () is a distance metric.
[0077] S432: For each point x within the cluster j Execute the SOS algorithm to calculate the anomaly score:
[0078] (1) Calculate point x j Local density
[0079]
[0080] (2) From the neighborhood N k (x j Randomly select m samples S = {x} from the given data. j1 ,x j2 ,…,x jm};
[0081] (3) Calculate its local density:
[0082]
[0083] Where σ is the variance of the sample.
[0084] (4) Calculate the anomaly score:
[0085]
[0086] S44: Input the static component input and dynamic component input extracted using the sliding window into the diagnostic algorithm to obtain the progressive anomaly score and sudden anomaly score of each battery when the battery module is running normally, and take the maximum value as the progressive fault threshold J1 and sudden fault threshold J2 respectively.
[0087] S5: Obtain real-time data of the battery module, calculate the two abnormal scores of all individual cells in the battery module using the same calculation method, and compare them with the thresholds J1 and J2 respectively. If the threshold is exceeded, it is determined that a fault has occurred, and the fault is classified.
[0088] The battery module used is the same as the battery module in step S1. The specific detection method is as follows: Figure 2 As shown, real-time data of the battery module is acquired, and the same calculation method is used to calculate two types of anomaly scores for all individual cells in the battery module. First, the sudden anomaly score is compared with the sudden fault threshold J2. If the sudden anomaly score is greater than J2, it is determined that a sudden fault has occurred. Conversely, the gradual anomaly score is compared with the gradual fault threshold J1. If the gradual anomaly score is greater than J1, it is determined that a gradual fault has occurred. If both anomaly scores are less than the threshold, the battery pack is determined to be operating normally.
[0089] Example 2
[0090] A battery fault diagnosis system based on clustering and random anomaly selection includes:
[0091] The data acquisition module is configured to acquire historical data of the battery module under diagnosis during normal operation, as well as real-time data of the battery module.
[0092] The specific execution process of this module can be found in steps S1 and S4 of Embodiment 1, which involves acquiring data. It will not be repeated here.
[0093] The mode decomposition module is configured to process the voltage data of each cell in the battery module to obtain multiple mode components, remove the high-frequency components, and obtain static and dynamic components.
[0094] The specific execution process of this module can be referred to in step S2 of Embodiment 1, and will not be repeated here.
[0095] The fault feature extraction module is configured to extract progressive fault features from the static components, extract sudden fault features from the dynamic components, and extract data points from the progressive fault features and the sudden fault features, respectively.
[0096] The specific execution process of this module can be referred to in step S3 of Embodiment 1, and will not be repeated here.
[0097] The anomaly scoring module is configured to cluster the two types of data points extracted, and for each cluster obtained by clustering, a random anomaly selection algorithm is introduced to score the anomalies within the cluster, so as to obtain the two anomaly scores of each battery when the battery module is running normally, and to set the progressive fault threshold and the sudden fault threshold.
[0098] The specific execution process of this module can be referred to in step S4 of Embodiment 1, and will not be repeated here.
[0099] The fault diagnosis module is configured to call the mode decomposition module, fault feature extraction module, and anomaly scoring module based on real-time data to calculate two anomaly scores for all individual cells in the battery module, and compare them with the progressive fault threshold or the sudden fault threshold respectively. If the corresponding threshold is exceeded, it is determined that the corresponding fault has occurred.
[0100] The specific execution process of this module can be referred to in step S5 of Embodiment 1, and will not be repeated here.
[0101] It is understood that the above-mentioned units / modules can be individually or completely merged into one or more other units / modules, or some of the units can be further divided into multiple functionally smaller units to achieve the same operation without affecting the technical effect of the embodiments of this application.
[0102] The modules described above in this system are based on logical functional division. In practical applications, the function of one module can be implemented by multiple modules, or the function of multiple modules can be implemented by one module. For example, the modality decomposition module in this embodiment may, in other embodiments, include:
[0103] The decomposition module is used to adaptively decompose the battery voltage data using a variational mode decomposition algorithm, obtaining m mode components: {IMF1, IMF2, ..., IMF...} m}, where m is the pre-set number of decompositions;
[0104] The selection module is used to select the static component IMF1, which characterizes the battery voltage trend, and the IMF2, which reflects dynamic fault information. Other high-frequency components are treated as noise and discarded. The static components of all batteries are... Dynamic components are
[0105] Similarly, in other embodiments of this application, the system may also include other units / modules. In practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by multiple units working together.
[0106] According to another embodiment of this application, the system described in this embodiment, and the method of embodiment one, can be constructed by running a computer program (including program code) capable of performing the steps involved in the corresponding method described in embodiment one on a general-purpose computing device, such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). The computer program can be recorded on, for example, a computer-readable recording medium, loaded into the aforementioned computing device through the computer-readable recording medium, and run therein.
[0107] Example 3
[0108] This implementation provides an electronic device, such as... Figure 3 As shown, the electronic device includes a processor 1001, a communication interface 1002, and a computer-readable storage medium 1003. The processor 1001, communication interface 1002, and computer-readable storage medium 1003 can be connected via a bus or other means.
[0109] The communication interface 1002 is used to receive and send data. The computer-readable storage medium 1003 can be stored in the memory of the electronic device. The computer-readable storage medium 1003 is used to store computer programs, which include program instructions. The processor 1001 is used to execute the program instructions stored in the computer-readable storage medium 1003.
[0110] The processor 1001 (or CPU (Central Processing Unit)) is the computing and control core of electronic devices. It is suitable for implementing one or more instructions, specifically for loading and executing one or more instructions to achieve corresponding methods or functions.
[0111] The processor 1001 is configured to perform the following process:
[0112] S1: Obtain historical data of the battery module under diagnosis during normal operation;
[0113] S2: Process the voltage data of each cell in the battery module to obtain multiple modal components, remove the high-frequency components, and obtain the static and dynamic components.
[0114] S3: Extract progressive fault features from the static components, extract sudden fault features from the dynamic components, and extract data points from the progressive fault features and sudden fault features respectively.
[0115] S4: Cluster the two types of data points extracted, and introduce a random anomaly selection algorithm to score the anomalies within each cluster to obtain the two anomaly scores of each battery when the battery module is running normally, and set the progressive fault threshold and the sudden fault threshold.
[0116] S5: Obtain real-time data of the battery module, execute steps S2-S4 to calculate the two abnormal scores of all individual cells in the battery module, and compare them with the progressive fault threshold or the sudden fault threshold respectively. If the corresponding threshold is exceeded, it is determined that the corresponding fault has occurred.
[0117] The process of steps S1-S5 in Example 1 will not be repeated here.
[0118] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made by those skilled in the art without creative effort within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A battery fault diagnosis method based on clustering and random anomaly selection, characterized in that, Includes the following steps: S1: Obtain historical data of the battery module under diagnosis during normal operation; S2: Process the voltage data of each cell in the battery module to obtain multiple modal components, remove the high-frequency components, and obtain the static and dynamic components. S3: Extract progressive fault features from the static components, extract sudden fault features from the dynamic components, and extract data points from the progressive fault features and sudden fault features respectively. The process of extracting progressive fault features from the static components includes: Among them, z i (t) is the standard score of battery i at time t. It represents the static component of battery i at time t, where T represents the length of the time series involved in the calculation. Indicates the magnification level; the higher the magnification, the more sensitive it is to abnormal data. N is the number of batteries in the battery module, and m is the pre-set number of decompositions. S4: Cluster the two types of data points extracted, and introduce a random anomaly selection algorithm to score the anomalies within each cluster to obtain the two anomaly scores of each battery when the battery module is running normally, and set the progressive fault threshold and the sudden fault threshold. S5: Obtain real-time data of the battery module, execute steps S2-S4 to calculate the two abnormal scores of all individual cells in the battery module, and compare them with the progressive fault threshold or the sudden fault threshold respectively. If the corresponding threshold is exceeded, it is determined that the corresponding fault has occurred.
2. The battery fault diagnosis method based on clustering and random anomaly selection as described in claim 1, characterized in that, The battery module is connected in series. The number of batteries in the battery module and the cycle conditions are selected according to the actual application. The cycle conditions include the current rate of battery charging and discharging, depth of discharge, temperature and cutoff voltage. The historical data includes the voltage and current data of each battery, as well as the corresponding data acquisition time.
3. The battery fault diagnosis method based on clustering and random anomaly selection as described in claim 1, characterized in that, In step S2, the variational mode decomposition algorithm is used to adaptively decompose the voltage data of each battery to obtain m mode components: {IMF1, IMF2, ..., IMF}. m }, where m is the pre-set number of decompositions; Only the static component IMF1, which characterizes battery voltage trends, and the IMF2, which reflects dynamic fault information, are used; other high-frequency components are treated as noise and discarded. The static components for all batteries are... Dynamic components are 4. The battery fault diagnosis method based on clustering and random anomaly selection as described in claim 1, characterized in that, The process of extracting sudden fault features from dynamic components includes: using the Pearson correlation coefficient method to process dynamic components and extract fault features, the specific formula is as follows: Where, r i (t) is the correlation coefficient between battery i at time t and the average value of the dynamic components of each battery. Y is the dynamic component of battery i at time t, and Y is the average value sequence of the dynamic components of each battery. It is the average value of the dynamic components within the time window.
5. The battery fault diagnosis method based on clustering and random anomaly selection as described in claim 1, characterized in that, The process of extracting data points from progressive fault features and sudden fault features respectively involves using a sliding window to process progressive fault features and sudden fault features to obtain static component data points and dynamic component data points, and the width of the sliding window is the same in the extraction process of the two types of data points.
6. The battery fault diagnosis method based on clustering and random anomaly selection as described in claim 1, characterized in that, The process in step S4 includes: K-means clustering was performed on the static and dynamic component data points respectively to obtain K clusters: {C1, C2, ..., C...} K }, C i Let i be the i-th cluster, i = 1, 2, ..., K; For each point x j ∈ C K , determine its neighborhood: N k (x j ) = {x l ∈ C K : d(x j , x l ) < r}, where r is the neighborhood radius and d(x j , x l ) is the distance metric; For each point x within the cluster j An unsupervised anomaly detection algorithm is used to calculate anomaly scores, and the scores for point x are calculated. j Local density From the neighborhood N k (x j M samples S = {x} are randomly selected from the given data. j1 ,x j2 ,…,x jM }; Calculate its local density: Where σ is the sample variance; calculate the anomaly score: The maximum values of the anomaly scores calculated based on static component data points and dynamic component data points are set as the progressive fault threshold and the sudden fault threshold, respectively.
7. The battery fault diagnosis method based on clustering and random anomaly selection as described in claim 1, characterized in that, In step S5, the sudden anomaly score is compared with the sudden fault threshold. If the sudden anomaly score is greater than the sudden fault threshold, it is determined that a sudden fault has occurred. Conversely, the gradual anomaly score is compared with the gradual fault threshold. If the gradual anomaly score is greater than the gradual fault threshold, it is determined that a gradual fault has occurred. If both anomaly scores are less than the corresponding thresholds, it is determined that the battery pack is working normally.
8. A battery fault diagnosis system based on clustering and random anomaly selection, characterized in that, include: The data acquisition module is configured to acquire historical data of the battery module under diagnosis during normal operation, as well as real-time data of the battery module. The mode decomposition module is configured to process the voltage data of each cell in the battery module to obtain multiple mode components, remove the high-frequency components, and obtain static and dynamic components. The fault feature extraction module is configured to extract progressive fault features from the static components, extract sudden fault features from the dynamic components, and extract data points from the progressive fault features and the sudden fault features, respectively. The process of extracting progressive fault features from the static components includes: Among them, z i (t) is the standard score of battery i at time t. It represents the static component of battery i at time t, where T represents the length of the time series involved in the calculation. Indicates the magnification level; the higher the magnification, the more sensitive it is to abnormal data. N is the number of batteries in the battery module, and m is the pre-set number of decompositions. The anomaly scoring module is configured to cluster the two types of data points extracted, and for each cluster obtained by clustering, a random anomaly selection algorithm is introduced to score the anomalies within the cluster, so as to obtain the two anomaly scores of each battery when the battery module is running normally, and to set the progressive fault threshold and the sudden fault threshold. The fault diagnosis module is configured to call the mode decomposition module, fault feature extraction module, and anomaly scoring module based on real-time data to calculate two anomaly scores for all individual cells in the battery module, and compare them with the progressive fault threshold or the sudden fault threshold respectively. If the corresponding threshold is exceeded, it is determined that the corresponding fault has occurred.
9. An electronic device, characterized in that, It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, which, when executed by the processor, perform the steps of the method according to any one of claims 1-7.