Battery fault type classification method and apparatus, electronic device, and medium

By segmenting and extracting features from the battery system data, and combining the isolated forest algorithm and the Z-score method, a fine classification of battery fault types was achieved, solving the problem of high misjudgment rate in existing technologies and improving the accuracy of fault identification.

CN123116016APending Publication Date: 2026-11-17MIRATTERY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611380641.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify battery fault types, particularly in distinguishing abnormal cell behavior, leading to a high misjudgment rate and an inability to promptly identify specific fault modes in the battery system.

Method used

The raw operating data of the battery system is divided into charging and discharging segments according to the charging and discharging states. Voltage consistency aggregation features are extracted, and anomaly detection is performed using a trained isolated forest algorithm to screen outlier segments with abnormal voltage consistency. Candidate abnormal cells are screened using the corrected Z-score method based on the median absolute deviation, and dual-abnormality outlier verification is performed during charging and discharging. Finally, four-dimensional statistical features are used to classify the fault types.

Benefits of technology

It enables precise differentiation of battery fault types, reduces misjudgments, improves the accuracy of fault classification, and can more accurately identify specific fault modes of the battery system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123116016A_ABST
    Figure CN123116016A_ABST
Patent Text Reader

Abstract

This application provides a battery fault type classification method, apparatus, electronic device, and medium, belonging to the field of battery technology. The method includes: segmenting raw operating data into charging and discharging segments; extracting voltage consistency aggregation features for each segment; using a trained isolated forest algorithm for anomaly detection to filter outlier segments; calculating the mean and standard deviation of voltage deviation within the raw segment data of the outlier segments; using a modified Z-score method based on median absolute deviation to filter candidate abnormal cells; verifying the candidate abnormal cells against dual outlier outliers during charging and discharging; pairing charging and discharging segments of truly abnormal cells, extracting four-dimensional statistical features from the charging and discharging segment pairs, and using these four-dimensional statistical features for fault type classification. The provided battery fault type classification scheme achieves precise differentiation of cell faults, reduces misjudgments, and improves the accuracy of fault classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery technology, and in particular to a method, apparatus, electronic device and medium for classifying battery fault types. Background Technology

[0002] With the rapid development of the new energy vehicle industry, the market share of pure electric vehicles and hybrid electric vehicles has been increasing year by year. The safety of new energy vehicles has become a major concern, especially the battery system, a core component of new energy vehicles, whose safety and reliability play a decisive role in the overall safety performance of these vehicles.

[0003] In the actual use of new energy vehicles, battery systems may face various failure risks, among which abnormal capacity decay, abnormal self-discharge, and abnormal connections are three typical failure modes. These failures usually manifest as abnormal behavior of individual cells, such as excessively rapid voltage drop, uneven temperature distribution, or sudden changes in internal resistance. Since battery packs are composed of multiple cells connected in series or parallel, abnormalities in a single cell will be reflected in the charge-discharge curve, thus affecting the performance and safety status of the entire battery system. Currently, fault detection for battery systems mainly relies on real-time data collected by the BMS, using fixed thresholds or simple algorithms to determine anomalies. However, this detection method often struggles to identify battery fault types in a timely and accurate manner, resulting in poor battery fault identification performance. Summary of the Invention

[0004] To address the aforementioned technical problems, this application provides a method, apparatus, electronic device, and medium for classifying battery fault types.

[0005] In a first aspect, the present invention provides a method for classifying battery fault types, the method comprising: The raw operating data of the battery system is divided into charging segments and discharging segments according to the charging and discharging states; Extract voltage consistency aggregated features for each of the charging segments and each of the discharging segments; The isolated forest algorithm is trained using training data to obtain a trained isolated forest algorithm. The trained isolated forest algorithm is then used to perform anomaly detection on the voltage consistency aggregation feature to filter out abnormal outliers with abnormal voltage consistency. Read the original segment data of the abnormal outlier segments, and calculate the mean voltage deviation and standard deviation of voltage deviation for each cell within the original segment data; A modified Z-score method based on median absolute deviation was used to screen out cells that were significantly out of the group as candidate abnormal cells. The candidate abnormal cells are verified by charging and discharging dual abnormal outliers to identify the truly abnormal cells. The charging and discharging segments of the truly abnormal battery cells are paired according to the number of cycles. Four-dimensional statistical features are extracted for each successfully paired charging and discharging segment, and the fault type is classified using the four-dimensional statistical features.

[0006] In an optional implementation, dividing the raw operating data of the battery system into charging and discharging segments according to the charging and discharging states includes: Read the original operating data, convert the charging status identifier into a numerical type, merge the stationary charging and charging complete statuses into a charging status, keep the discharging status unchanged, remove the data of the driving charging status, remove invalid values, and obtain the preprocessed data. The preprocessed data is arranged in ascending order of time. The segment is identified according to the charging status identifier. All voltage columns of the segment are checked to see if they are within the effective voltage range. Rows with voltages greater than the effective voltage range are removed. If the number of rows in the segment is less than a preset row threshold, the segment is discarded. If the obtained segment is in a charging state, it is saved as a charging segment. If the obtained segment is in a discharging state, it is saved as a discharging segment.

[0007] In an optional implementation, the step of extracting voltage consistency aggregation features for each of the charging segments and each of the discharging segments includes: For each of the charging segments and each of the discharging segments, at each sampling time t, the median voltage of all cells is calculated, and the median voltage is used as the group benchmark at the sampling time t. Calculate the first voltage deviation between the voltage of each cell at sampling time t and the median voltage at time t. Calculate the mean and standard deviation of the voltage deviation for each cell at all times within each segment. The mean deviation and standard deviation of all cells are aggregated and statistically analyzed to generate voltage consistency aggregated features for each charging segment and each discharging segment. The voltage consistency aggregated features include the maximum value of the mean deviation of all cells, the minimum value of the mean deviation of all cells, the maximum value of the standard deviation of all cells, the standard deviation of the mean deviation of all cells, the maximum value of the voltage range, the average value of the voltage range, and the initial voltage difference.

[0008] In an optional implementation, the isolated forest algorithm is trained using training data to obtain a trained isolated forest algorithm. The trained isolated forest algorithm is then used to perform anomaly detection on the voltage consistency aggregation features, filtering out anomalous outliers where voltage consistency is abnormal, including: Collect normal segment-level feature data of the battery system as the training data. The normal segment feature data includes normal charging segment feature data and normal discharging segment feature data. The training data is standardized to obtain standardized data. The standardized data is then used to train the Isolation Forest algorithm. The Isolation Forest algorithm isolates samples by constructing multiple isolated trees. In each isolated tree, a feature and a splitting value are randomly selected to continuously divide the normal charging segment feature data and the normal discharging segment feature data until each sample is isolated or the tree depth limit is reached. After training, each isolated tree records the random partitioning method of the data space to obtain the trained Isolation Forest algorithm. The voltage consistency aggregation feature is input into the trained isolated forest. The samples of the voltage consistency aggregation feature will walk from the root node to the leaf node along the splitting condition of each isolated tree. The number of edges traversed is recorded as the path length. The average path length is obtained by averaging the path lengths of all isolated trees. Anomaly scores are calculated based on the average path length and normalization factor. If the abnormal score is greater than a preset threshold, the charging segment or discharging segment corresponding to the abnormal score is determined to be an abnormal outlier segment. If the abnormal score is less than the preset threshold, then the charging segment or discharging segment corresponding to the abnormal score is determined to be a normal segment. The method further includes: During the training of the isolated forest algorithm using the standardized data, the mean and standard deviation of each feature of the normal segment feature data are calculated. The normal range of each feature is determined based on the calculated mean and standard deviation, and the normal range of each feature is used as the adaptive threshold for classification.

[0009] In an optional implementation, the step of using a modified Z-score method based on the median absolute deviation to screen out cells that are significantly out of the group as candidate abnormal cells includes: The mean deviation of each segment is taken as the set of mean deviations, and the mean voltage deviation of each segment is taken as the set of mean voltage deviations. The median and absolute deviation of the mean deviation of the set of mean deviations are calculated. For each cell i, the corrected Z-score for each segment is calculated based on the adjustment coefficient, the mean of all deviations for each cell i, the median of the mean deviations, and the absolute deviation of the median. If the median absolute deviation is 0, then the corrected Z score of all cells is 0, and no cell is marked as the candidate abnormal cell. If there is a first segment with a corrected Z score greater than a preset score threshold, then the first segment is marked as an abnormal segment, and the cells corresponding to the charging segment and / or the abnormal discharging segment are identified as candidate abnormal cells. If there is a second segment whose corrected Z-score is less than a preset score threshold, then the second segment is identified as a non-candidate outlier segment. If the average deviation of all cells is evenly distributed and there are no cells with a corrected Z-score greater than the preset score threshold, then all cells are determined to be aged as a whole.

[0010] In an optional implementation, the verification of the candidate abnormal cells through charge-discharge dual-abnormality outliers to determine the truly abnormal cells includes: For each battery system, summarize the candidate label records of each cell in all abnormal segments and abnormal outlier segments. For each cell i, count the first number of cells marked as candidate abnormal chips in all charging abnormal segments. For each cell, count the first number of cells marked as candidate abnormal chips in all charging abnormal outlier segments. Count the second number of cells marked as candidate abnormal chips in all discharging abnormal segments and abnormal outlier segments. If a target chip that meets the preset conditions exists, then the target cell is the real abnormal cell. The preset conditions include: a first quantity is greater than or equal to a first preset quantity, a second quantity is greater than or equal to the first preset quantity, the sum of the first quantity and the second quantity is greater than or equal to a second preset quantity, the first quantity is greater than or equal to the first preset quantity, the second quantity is greater than or equal to the first preset quantity, and the sum of the first quantity and the second quantity is greater than or equal to a second preset quantity.

[0011] In an optional implementation, the extraction of four-dimensional statistical features for each successfully paired charge-discharge segment pair, and the use of these four-dimensional statistical features for fault type classification, includes: For each successfully paired charge / discharge segment, four-dimensional statistical features are extracted, including: the mean voltage deviation of the charging segment, the standard deviation of the voltage deviation of the charging segment, the mean voltage deviation of the discharging segment, and the standard deviation of the voltage deviation of the discharging segment. The normal upper limit of the maximum value of the standard deviation of voltage deviation of all cells of the charging and discharging type is read from the normal range of each feature, and is denoted as the normal upper limit of charging and the normal upper limit of discharging, respectively. If the following conditions are met simultaneously: the average voltage deviation of the charging segment is greater than 0, the standard deviation of the voltage deviation of the charging segment is less than or equal to the upper limit of normal charging, the standard deviation of the voltage deviation of the discharging segment is less than or equal to the upper limit of normal discharging, and the standard deviation of the voltage deviation of the discharging segment is less than or equal to the upper limit of normal discharging, then it is determined to be a connection abnormality. If the following conditions are met simultaneously: the average voltage deviation of the charging segment is greater than 0, the standard deviation of the voltage deviation of the charging segment is greater than the normal upper limit of charging, the average voltage deviation of the discharging segment is less than 0, and the standard deviation of the voltage deviation of the discharging segment is greater than the normal upper limit of discharging, then it is determined to be an abnormal capacity decay. If the following criteria are met: the average voltage deviation of the charging segment is less than 0 and the average voltage deviation of the discharging segment is less than 0, then it is determined to be an abnormal self-discharge.

[0012] Secondly, the present invention provides a battery fault type classification device, the device comprising: The segmentation module is used to divide the raw operating data of the battery system into charging segments and discharging segments according to the charging and discharging states. The extraction module is used to extract voltage consistency aggregation features for each of the charging segments and each of the discharging segments. The detection module is used to train the isolated forest algorithm using training data to obtain a trained isolated forest algorithm. The trained isolated forest algorithm is then used to perform anomaly detection on the voltage consistency aggregation feature to filter out abnormal outliers with abnormal voltage consistency. The calculation module is used to read the original segment data of the abnormal outlier segments and calculate the mean voltage deviation and standard deviation of voltage deviation for each cell within the original segment data. The screening module is used to select cells that are significantly out of the group as candidate abnormal cells by using a modified Z-score method based on the absolute deviation of the median. The verification module is used to verify the candidate abnormal cells by performing dual abnormality outliers in charging and discharging, so as to identify the truly abnormal cells. The classification module is used to pair the charging and discharging segments of the truly abnormal battery cells according to the number of cycles, extract four-dimensional statistical features for each successfully paired charging and discharging segment pair, and use the four-dimensional statistical features to classify the fault type.

[0013] Thirdly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the computer program executes the battery fault type classification method described in any of the foregoing embodiments when the processor is running.

[0014] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when run on a processor, executes the battery fault type classification method described in any of the foregoing embodiments.

[0015] The battery fault type classification method provided in this application divides the original operating data of the battery system into charging and discharging segments according to the charging and discharging states; extracts voltage consistency aggregation features for each segment; trains an isolated forest algorithm using training data to obtain a trained isolated forest algorithm; uses the trained isolated forest algorithm to detect anomalies in the voltage consistency aggregation features, filtering out outlier segments with abnormal voltage consistency; reads the original segment data of the outlier segments, calculates the mean and standard deviation of voltage deviation for each cell within the original segment data; uses a modified Z-score method based on the median absolute deviation to filter out cells that are significantly outliers relative to the group as candidate abnormal cells; verifies the candidate abnormal cells by charging and discharging dual-abnormality to determine the truly abnormal cells; pairs the charging and discharging segments of the truly abnormal cells according to the number of cycles, extracts four-dimensional statistical features for each successfully paired charging and discharging segment pair, and uses the four-dimensional statistical features for fault type classification. Through the provided battery fault type classification scheme, fine differentiation of cell faults is achieved, misjudgments are reduced, and the accuracy of fault classification is improved. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be considered as a limitation on the scope of protection of this application. In the various drawings, similar components are numbered similarly.

[0017] Figure 1 A flowchart illustrating the battery fault type classification method provided in this application is shown. Figure 2Another flowchart of the battery fault type classification method provided in this application is shown; Figure 3 A schematic diagram of another process for the battery fault type classification method provided in this application is shown; Figure 4 This paper illustrates another flowchart of the battery fault type classification method provided in this application; Figure 5 A schematic diagram of the battery fault type classification device provided in this application is shown.

[0018] Icons: 500 - Battery fault type classification device, 510 - Segmentation module, 520 - Extraction module, 530 - Detection module, 540 - Calculation module, 550 - Filtering module, 560 - Verification module, 570 - Classification module. Detailed Implementation

[0019] The technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0020] The components of this application, typically described and illustrated in the accompanying drawings, can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0021] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.

[0022] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0023] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.

[0024] In the field of battery cell anomaly detection and fault type identification, existing technical solutions can be mainly classified into the following categories: (1) Model-based multi-feature battery anomaly detection methods, such as "New Energy Vehicle Battery Anomaly Detection Method Based on Isolation Forest Algorithm", which constructs an isolation forest model for 14-dimensional features, calculates the average path length of each feature in all isolated trees to obtain the anomaly score, and judges the anomaly score of each feature. Its 14-dimensional features include: real-time data time of battery module operation, maximum value of single cell voltage, minimum value of single cell voltage, maximum value of single cell temperature, minimum value of single cell temperature, total voltage, total current, remaining power SOC, battery charging state, vehicle speed, cumulative running time of battery module, DC-DC state, gear and insulation resistance, etc.

[0025] The shortcomings of this scheme (1) include: In terms of feature selection, although multi-dimensional features are used to avoid the robustness problem caused by single features, its 14-dimensional features are the raw collected values ​​of battery module operating status data, namely, the highest voltage value, the lowest voltage value, the temperature value, the total voltage, the total current, the SOC, the vehicle speed, etc. These 14-dimensional features are not specifically designed for the "outlier relationship between cells and the group", but are the basic state parameters of battery operation. By inputting such features, the isolated forest model learns: whether a certain cell deviates from the normal operating conditions, rather than: whether a certain cell is an outlier cell compared with the other cells. At the same time, this scheme can only determine whether there is an anomaly that deviates from the normal operating conditions, but cannot determine the specific fault category, and cannot identify the anomalies caused by the normal aging of cells.

[0026] (2) Cell fault detection and classification methods based on standard scores of charge and discharge voltages, such as a cell fault type detection scheme, include the following steps: acquiring the charging voltage data and discharging voltage data of the cell; calculating the average standard score of the charging voltage data and the average standard score of the discharging voltage data respectively; determining the fault type based on the positive and negative combinations of the two: if the average standard score of charging > 0 and the average standard score of discharging > 0, it is determined that the state of charge is too high; if the average standard score of charging ≤ 0 and the average standard score of discharging ≤ 0, it is determined that the internal short circuit is determined; if the average standard score of charging > 0 and the average standard score of discharging ≤ 0, it is determined that the cell capacity is too low and the internal resistance is too high. Another example is a cell anomaly detection scheme based on standard scores, which includes the following steps: in response to the end of the battery system charge and discharge cycle, acquiring the charging voltage and discharging voltage of each cell; calculating the standard score of the charging voltage and the standard score of the discharging voltage of each cell respectively based on the standard score calculation principle; and determining whether each cell has an abnormal state based on the two.

[0027] The shortcomings of the above scheme (2) include: logical problems, as not all cells that meet the standard score conditions are abnormal cells. The judgment logic of the above scheme will seriously lead to program misjudgment, because normal cells may also meet the above judgment conditions. In addition, the judgment features used in this type of scheme are relatively simple and cannot take into account the judgment of multiple abnormal categories.

[0028] In summary, the existing technology has the following shortcomings: (1) The feature selection for identifying outlier cells is not detailed enough, and the feature design lacks specificity; (2) It only identifies whether there is an anomaly, but cannot determine the specific type of anomaly in the battery system; (3) It cannot identify outlier cells caused by normal aging, which increases the misjudgment rate of the model; (4) The judgment logic for abnormal cells has loopholes, the identification feature is singular, and it cannot take into account the judgment of multiple anomaly categories. Overall, the existing technical solutions often fail to identify battery fault types in a timely and accurate manner, and the battery fault identification effect is relatively poor.

[0029] Example 1 This application provides a method for classifying battery fault types.

[0030] It is understandable that for the three types of faults in a battery system—abnormal capacity decay, abnormal self-discharge, and abnormal connection—the voltage curve will show the presence of one or more outlier cells. Therefore, in the fault identification logic of the battery fault type classification method in this embodiment, a preset model is first trained to enable the model to identify voltage curve inconsistencies. It is important to understand that the presence of voltage curve inconsistencies in a battery system does not necessarily indicate a faulty system; it could also be due to normal aging. Therefore, further feature analysis is needed to determine whether the voltage curve inconsistency in a battery system is truly caused by one or more outlier cells.

[0031] It should be noted that the presence of one or several outlier cells does not necessarily indicate a faulty system. The battery system must exhibit the characteristics of a specific fault to be considered faulty. Logical judgments are then performed on the outlier cells to identify the truly faulty battery system and classify the faults within the battery system.

[0032] See Figure 1 The battery fault type classification method includes steps S110-S170.

[0033] Step S110: Divide the original operating data of the battery system into charging segments and discharging segments according to the charging and discharging states.

[0034] In this embodiment, step S110 includes the following steps: Step S111: Read the original operating data, convert the charging status identifier into a numerical type, merge the stationary charging and charging completed statuses into a charging status, keep the discharging status unchanged, remove the data of the driving charging status, remove invalid values, and obtain preprocessed data.

[0035] In this embodiment, the raw operating data of each battery system consists of charge and discharge data for multiple cycles. Each battery system can be represented by a Vehicle Identification Number (VIN). Each battery system can also be represented by a battery system number.

[0036] Each cycle contains one charging segment and one discharging segment. Understandably, charging and discharging may alternate during actual vehicle operation, and each charging and discharging segment is stored independently. Each segment (i.e., each charging segment and each discharging segment) contains voltage sampling data for all cells within that time period, SOC, and auxiliary fields such as charging status indicators. The data hierarchy is as follows: there are multiple charging / discharging segments corresponding to the battery system (VIN), and each charging / discharging segment corresponds to the voltage timing data of each cell.

[0037] In this embodiment, the subsequent screening process follows a progressive logic from segment-level screening to cell-level screening. This can be understood as follows: first, outlier segments with voltage consistency issues are screened at the segment level; then, within each outlier segment, the outlier degree is calculated for each cell to pinpoint which cell(s) caused the inconsistency in that outlier segment. Additionally, rows with non-zero vehicle speeds during charging can also be excluded.

[0038] Step S112: Sort the preprocessed data in ascending order of time, identify segments according to the charging status identifier, check whether all voltage columns of the segment are within the effective voltage range, remove rows that are greater than the effective voltage range, discard the segment if the number of rows of the segment is less than the preset number of rows threshold, save the segment if the obtained segment is in the charging state, and save the segment if the obtained segment is in the discharging state.

[0039] In this embodiment, the charging state can have 4 numerical codes: number 1 indicates parking charging (i.e., stationary charging), number 2 indicates driving charging (i.e., driving charging state), number 3 indicates not charging, and number 4 indicates charging completed state. The stationary charging (i.e., parking charging) and charging completed state are combined into the charging state. The discharging state actually corresponds to the not charging state (number 3). For ease of understanding, the not charging state is described as the discharging state.

[0040] In this embodiment, after arranging the data in ascending order of time, the segment boundaries are identified based on the continuous changes in the charging status indicator. Continuous data of the same status (e.g., continuous charging status data, continuous discharging status data) constitute a segment. For example, if sampling is performed once per second, the charging status indicator will have 60 numbers within one minute. For instance, if the data is identified as: 1, 1, 1, 1, 4, 4, 4, 3, 3, 3, 1, 1, 1, 1, 1, 3, 3, 3, 3; then 1, 1, 1, 1, 4, 4, 4 is divided into one charging segment, and 3, 3, 3 is one discharging segment; 1, 1, 1, 1 is another charging segment, and 3, 3, 3, 3 is another discharging segment. It should be noted that the effective voltage range can be 0~10000mV, or other ranges, which are not limited here.

[0041] As an example, several charging segment files (charge1.csv, charge2.csv, ...) and several discharging segment files (discharge1.csv, discharge2.csv, ...) are generated for each battery system. Each segment contains complete sampling data within the continuous time period, which realizes the filtering and cleaning of the raw data, which is convenient for subsequent modeling and analysis. Without cleaning, data interference will exist, affecting the analysis results.

[0042] Step S120: Extract voltage consistency aggregation features for each segment.

[0043] join Figure 2 Step S120 includes the following steps: Step S121: For each sampling time t of each segment, calculate the median voltage of all cells and use the median voltage as the group reference for the sampling time t.

[0044] As an example, V_mid(t) = median(V_1(t), V_2(t), ..., V_n(t)), where V_n(t) represents the cell voltage at sampling time t of the nth chip, median represents the median voltage among V_1(t), V_2(t), ..., V_n(t), and V_mid(t) represents the median voltage.

[0045] Step S122: Calculate the first voltage deviation between the voltage of each cell at sampling time t and the median voltage.

[0046] As an example, deviation_i(t) = V_i(t) - V_mid(t), where V_i(t) represents the voltage of each cell i at sampling time t, V_mid(t) represents the median voltage, and deviation_i(t) represents the first voltage deviation of cell i at sampling time t.

[0047] Assuming there are 4 battery cells and the median voltage is a, the calculation of the first voltage deviation between the voltage of cell 1 at sampling time t and the median voltage can include: deviation_1(t) = V_1(t) - a, deviation_2(t) = V_2(t) - a, deviation_3(t) = V_3(t) - a, deviation_4(t) = V_4(t) - a, respectively, to calculate the first voltage deviation of the 4 battery cells at sampling time t.

[0048] Step S123: Calculate the mean voltage deviation and standard deviation of voltage deviation for each cell at all times within each segment.

[0049] It is understandable that each segment includes each charging segment and each discharging segment. For example, mean_dev_i = mean(deviation_i(1), deviation_i(2), ..., deviation_i(T)), where T is the number of valid sampling points in the segment, mean_dev_i represents the average voltage deviation of cell i from 0 to T at all times in each segment, deviation_i(1) represents the first voltage deviation of cell i at sampling time 1, deviation_i(2) represents the first voltage deviation of cell i at sampling time 2, ..., deviation_i(T) represents the first voltage deviation of cell i at sampling time T.

[0050] For example, std_dev_i = std(deviation_i(1), deviation_i(2), ..., deviation_i(T)), where T is the number of valid sampling points in the segment, and std_dev_i represents the standard deviation of the voltage deviation of cell i from 0 to T at all times in each segment.

[0051] Step S124: Aggregate and statistically analyze the mean voltage deviation and standard deviation of all cells to generate voltage consistency aggregated features for each segment.

[0052] The voltage consistency aggregation features include the maximum value of the average voltage deviation of all cells (mean_dev_max), the minimum value of the average voltage deviation of all cells (mean_dev_min), the maximum value of the standard deviation of the deviation of all cells (std_dev_max), the standard deviation of the average deviation of all cells (std_mean_dev), the maximum value of the voltage range (cell_volt_range_max), the average value of the voltage range (cell_volt_range_mean), and the initial voltage difference (initial_voltage_diff).

[0053] As an example, the mean deviation (mean_dev_i) and standard deviation (std_dev_i) of all cells from 0 to T at all times in each segment are aggregated and statistically analyzed to generate the voltage consistency aggregated feature of that segment. The calculation method and meaning of each feature are shown in Table 1 below.

[0054] Table 1

[0055] Step S130: Train the isolated forest algorithm using training data to obtain a trained isolated forest algorithm. Use the trained isolated forest algorithm to perform anomaly detection on the voltage consistency aggregation feature and filter out abnormal outliers with abnormal voltage consistency.

[0056] It's important to understand that the outliers identified at the fragment level by unsupervised algorithms like the Isolation Forest algorithm may have completely different underlying causes. They could be due to overall battery pack aging leading to inconsistent performance, in which case there are no individual outlier cells. Alternatively, they could be due to a faulty cell causing system inconsistency, in which case a single faulty cell exists. Only system inconsistency caused by a faulty cell is the real anomaly that needs attention. In this embodiment, a trained Isolation Forest algorithm is used to unsupervised model the robust voltage consistency aggregation features of charging and discharging segments, filtering out outliers with voltage consistency issues.

[0057] join Figure 3 Step S130 includes the following steps: Step S131: Collect normal segment feature data of the battery system as the training data.

[0058] In this embodiment, the normal segment feature data includes normal charging segment feature data and normal discharging segment feature data. When establishing an unsupervised model using the isolated forest algorithm, the extracted normal segment feature data are all aggregated statistics of voltage consistency. The normal segment feature data includes: the maximum value of the mean voltage deviation of all cells (mean_dev_max), the minimum value of the mean voltage deviation of all cells (mean_dev_min), the maximum value of the standard deviation of the voltage deviation of all cells (std_dev_max), the standard deviation of the mean voltage deviation of all cells (std_mean_dev), the maximum value of the voltage range (cell_volt_range_max), the average value of the voltage range (cell_volt_range_mean), and the initial voltage difference (initial_voltage_diff). This normal segment feature data is not the original collected values ​​(such as voltage, current, and temperature), but rather outlier characteristics after statistical transformation. They describe the deviation distribution of all cells relative to the group median within the charging and discharging segment. For example, mean_dev_max reflects how much the voltage of the cell with the largest deviation has deviated, while std_mean_dev reflects the dispersion of the voltage deviation of all cells. This normal segment feature data indicates whether any cell has broken away from the group. This is fundamentally different from the aforementioned existing technology that uses raw physical quantities such as the highest voltage value, lowest voltage value, and temperature as features.

[0059] In this embodiment, the feature data of the normal charging segment uses 7-dimensional features including mean_dev_max, mean_dev_min, std_dev_max, cell_volt_range_max, cell_volt_range_mean, initial_voltage_diff, and std_mean_dev, while the feature data of the normal discharging segment uses 4-dimensional features including mean_dev_max, mean_dev_min, std_dev_max, and std_mean_dev.

[0060] It is understood that in this embodiment, the use of multiple feature combinations can avoid the problem of feature singularity, while the aforementioned prior art only uses multi-dimensional original state quantities. The features in this embodiment are statistical aggregations of homogeneous features. All features revolve around the core dimension of voltage deviation, characterizing the outlier relationship between the cell and the group from different perspectives, including maximum value, minimum value, standard deviation, extreme value, coefficient of variation, etc. The feature combination in this embodiment can more comprehensively capture the degree and pattern of deviation of the cell relative to the group, avoiding the omissions or misjudgments that may be caused by single features.

[0061] Step S132: Standardize the training data to obtain standardized data; train the Isolation Forest algorithm using the standardized data. The Isolation Forest algorithm isolates samples by constructing multiple isolated trees. In each isolated tree, a feature and a segmentation value are randomly selected, and the normal fragment feature data is continuously divided until each sample is isolated or the tree depth limit is reached. After training, each isolated tree records the random segmentation method of the data space to obtain the trained Isolation Forest algorithm.

[0062] As an example, the training data is standardized, meaning the mean of each feature is 0 and the variance is 1. The Isolation Forest algorithm is then trained using this standardized data. Key parameters during training include: 100 trees, an expected anomaly rate of 2%, or other parameter values; no restrictions are placed here. The Isolation Forest algorithm isolates samples by constructing multiple isolated trees. In each tree, a feature and a splitting value are randomly selected. The standardized data is continuously divided until each sample is isolated or the tree depth limit is reached. The randomly selected feature refers to one of the 7 dimensions used for normal charging segment feature data and one of the 4 dimensions used for normal discharging segment feature data. The process of continuously dividing standardized data is illustrated below: For example, the maximum value of the average voltage deviation of all battery cells, mean_dev_max, ranges from 0.5 to 1.5. Assuming a randomly selected splitting value of 1, in the first split, data with a splitting value less than 1 is placed in the left child node, and data with a splitting value greater than 1 is placed in the right child node, effectively dividing the sample into two parts. In the second split, a random splitting value of 0.6 is selected for the data in the left child node. Now, the feature range of the left child node is 0.5 to 1. Data less than 0.6 is placed in the left child node's left child node, and data greater than 0.6 is placed in the left child node's right child node. This process continues recursively, dividing the training set samples into many parts based on the feature. This process is repeated recursively until a stopping condition is met. For normal samples, the feature ranges of each dimension are very concentrated, requiring many splits to distinguish the samples. However, for outlier samples, a few splits may be sufficient to differentiate them. During training, the segmentation value is random. For example, in the training set, the maximum value of the average voltage deviation of all cells, mean_dev_max, is distributed in the range of 0.5 to 1.5. Then the segmentation value will be randomly selected within this range.

[0063] To further clarify, the condition for each sample to be isolated can be understood as the recursive stopping condition for feature partitioning. The condition for each sample to be isolated can include the following three conditions: (1) there is only one sample on a node; (2) the feature values ​​of all samples on the node are the same; (3) the tree height limit has been reached. Relatively speaking, conditions 1 and 2 are more difficult to satisfy, and generally, satisfying condition 3 is enough to stop the tree from reaching its height limit. The tree depth limit depends on the number of samples. For example, if the number of samples is 500, then the tree depth limit is equal to log2(500) ≈ 8.97. Here, log is base 2. It can be understood that abnormal samples are easier to isolate, i.e., the path is shorter, while normal samples are more difficult to isolate, i.e., the path is longer. After training, each isolated tree records the random partitioning method of the data space.

[0064] Step S133: Input the voltage consistency aggregation feature into the trained isolated forest. The sample data of the voltage consistency aggregation feature will walk from the root node to the leaf node along the splitting condition of each isolated tree. Record the number of edges traversed as the path length. Take the average of the path lengths on all isolated trees to obtain the average path length.

[0065] After training, predictions are made for each segment of the battery system to be identified. Specifically, the voltage consistency aggregated features of the segments of the battery system to be identified are input into the trained isolated forest. The sample data of the voltage consistency aggregated features will walk from the root node to the leaf node along the splitting condition of each isolated tree, and the number of edges traversed will be recorded as the path length. The average path length is obtained by averaging the path lengths of all trees.

[0066] Step S134: Calculate the anomaly score based on the average path length and normalization factor.

[0067] As an example, the anomaly score is calculated using the following formula:

[0068] Where h(x) is the number of edges traversed from the root node to the leaf node, which can be understood as the number of times a feature is partitioned until it stops. E(h(x)) represents the average path length. x is a vector of features of a sample, such as the vector of 7-dimensional features of a charging segment; n is the total number of samples used when training this isolated tree. For example, if there are 1000 segments, then n = 1000. c(n) is the normalization factor, calculated as c(n) = 2H(n-1) - 2(n-1) / n, where H(n-1) is the harmonic number, and H(n-1) = 1 + ½ + +…+1 / (n-1).

[0069] The above formula maps the average path length E(h(x)) to a score between 0 and 1. The closer the score is to 1, the more likely the sample is to be isolated and the more abnormal it is. The closer the score is to 0, the more normal the sample is. A score around 0.5 indicates that the sample has no obvious abnormal characteristics.

[0070] Step S135: If the anomaly score is greater than a preset threshold, the segment corresponding to the anomaly score is determined to be an anomalous outlier segment.

[0071] Step S136: If the abnormal score is less than the preset threshold, the segment corresponding to the abnormal score is determined to be a normal segment.

[0072] As an example, the preset threshold can be 0.5, or other values; no limitation is made here. If the anomaly score of a segment is >0.5, the segment is determined to be an outlier and proceeds to the next step of analysis; otherwise, it is determined to be a normal segment and does not proceed to the next step of analysis. For ease of uniform processing, in this embodiment, segments with anomaly scores >0.5 are marked as prediction = -1 (outlier), and segments with anomaly scores ≤0.5 are marked as prediction = 1 (normal). Prediction is the predicted label output by the Isolation Forest algorithm for each segment, where -1 represents an outlier segment and 1 represents a normal segment.

[0073] In one embodiment, the method further includes: During the training of the isolated forest algorithm using the standardized data, the mean and standard deviation of each feature of the normal segment feature data are calculated. The normal range of each feature is determined based on the calculated mean and standard deviation, and the normal range of each feature is used as the adaptive threshold for classification.

[0074] In this embodiment, during the training process, the mean voltage deviation and standard deviation of each feature of the normal training samples (i.e., normal segment feature data) are also calculated. The normal range of each feature is calculated with μ±3σ, and the normal range is from (μ-3σ) to (μ+3σ). μ is the calculated mean voltage deviation of each feature, and σ is the calculated standard deviation of the voltage deviation of each feature.

[0075] Step S140: Read the original segment data of the abnormal outlier segment, and calculate the mean voltage deviation and standard deviation of voltage deviation for each cell within the original segment data.

[0076] In this embodiment, for each segment identified as an outlier, its original segment data is read, and the voltage deviation statistics for each cell within that segment are calculated: the mean voltage deviation (mean_dev) and the standard deviation voltage deviation (std_dev). This facilitates subsequent identification of which cells are truly outliers. The method for calculating the mean voltage deviation (mean_dev) and the standard deviation voltage deviation (std_dev) is the same as or similar to the method used previously for calculating the mean voltage deviation (mean_dev) and the standard deviation voltage deviation (std_dev), and will not be elaborated here.

[0077] Step S150: Using the modified Z-score method based on the absolute deviation of the median, cells that are significantly out of the group are selected as candidate abnormal cells.

[0078] In this embodiment, the mean voltage deviation (mean_dev) is calculated for each cell within the outlier segment, and a corrected Z-score based on MAD is used for screening. Specifically, if the corrected Z-score > 5.0, a candidate outlier cell is selected. In the overall aging battery pack, all cells age synchronously, and the voltage deviation is evenly distributed. No single cell will have a significantly deviated corrected Z-score, therefore no cell will be marked as a candidate outlier cell, eliminating inconsistencies caused by battery system aging and reducing misjudgments.

[0079] join Figure 4 Step S150 includes the following steps: Step S151: Take the average voltage deviation of all the segments as the voltage deviation mean set, and calculate the median and absolute deviation of the voltage deviation mean set.

[0080] As an example, med = median(mean_dev_1, mean_dev_2, ..., mean_dev_n), where mean_dev_1, mean_dev_2, ..., mean_dev_n represent the set of mean voltage deviations, and med represents the median of the mean deviations.

[0081] MAD = median(|mean_dev_1 - med|,|mean_dev_2 - med|,...,|mean_dev_n - med|), where |mean_dev_n - med| represents the absolute difference between the mean voltage deviation and the median of the mean deviation, and MAD represents the absolute difference of the median.

[0082] Step S152: For each cell, calculate the corrected Z-score for each segment based on the adjustment coefficient, the mean of all deviations for each cell, the median of the mean deviations, and the absolute deviation of the median.

[0083] For example, Z_mean_i = 0.6745 × (mean_dev_i - med) / MAD, where the coefficient 0.6745 is the value of the 75th percentile in the standard normal distribution, used to make the median absolute difference MAD comparable to the standard deviation under a normal distribution.

[0084] In step S153, if the median absolute deviation is 0, then the corrected Z score of all cells is 0, and no cell is marked as the candidate abnormal cell.

[0085] As an example, if MAD = 0, it means that the mean voltage deviation of all cells is exactly the same, then the Z_mean of all cells is 0, and no cell will be marked as a candidate abnormal cell.

[0086] Step S154: If there is a first segment with a corrected Z score greater than a preset score threshold, then the first segment is marked as an abnormal outlier segment, and the cell corresponding to the abnormal outlier segment is determined as a candidate abnormal cell.

[0087] As an example, if |Z_mean_i|>5.0 for a certain cell, then the cell is marked as a candidate abnormal cell (is_candidate = True); otherwise, it is marked as a non-candidate (is_candidate = False).

[0088] Step S155: If there is a second segment with a corrected Z score less than a preset score threshold, then the second segment is identified as a non-candidate outlier segment.

[0089] As an example, if |Z_mean_i| < 5.0 for a certain cell, it is marked as a non-candidate (is_candidate = False).

[0090] Step S156: If the average deviation of all cells is evenly distributed and there are no cells with a corrected Z score greater than the preset score threshold, then it is determined that all cells are aging as a whole.

[0091] In this embodiment, within the overall aging battery pack, all cells age synchronously, and their mean voltage deviation (mean_dev) is evenly distributed. No single cell exhibits a significant deviation in Z_mean, thus preventing any cell from being marked as a candidate abnormal cell and eliminating misjudgments caused by aging. However, in a single-cell failure scenario, the mean voltage deviation (mean_dev) of the faulty cell deviates significantly from that of other cells, with its |Z_mean| being much greater than 5.0, successfully identifying it as a candidate abnormal cell.

[0092] Step S160: Verify the candidate abnormal cells by checking for dual abnormalities in charging and discharging to identify the truly abnormal cells.

[0093] In this embodiment, the presence of outlier cells does not necessarily mean that the cells are faulty. Therefore, a cell is required to be marked as an outlier cell in both charging and discharging conditions before it is considered a potentially faulty cell. This decision logic further enhances the model's recognition capability.

[0094] In one embodiment, step S160 includes the following steps: Step S161: For each battery system, summarize the candidate label records of each cell in all abnormal outlier segments. For each cell, count the first number of cells marked as candidate abnormal chips in all charging abnormal outlier segments and the second number of cells marked as candidate abnormal chips in all discharging abnormal outlier segments.

[0095] Step S162: If there is a target chip that meets the preset conditions, then the target cell is the real abnormal cell. The preset conditions include: the first quantity is greater than or equal to the first preset quantity, the second quantity is greater than or equal to the first preset quantity, and the sum of the first quantity and the second quantity is greater than or equal to the second preset quantity.

[0096] As an example, for each VIN, summarize the candidate label records for each cell in all its outlier segments. For each cell i, count `charge_count_i` and `discharge_count_i`, where `charge_count_i` represents the number of times the cell is marked as a candidate (`is_candidate = True`) in all charging outlier segments, i.e., the first count. `discharge_count_i` represents the number of times the cell is marked as a candidate in all discharging outlier segments, i.e., the second count. Only cells that meet the following conditions pass the double confirmation verification: charge_count_i ≥ 1 indicates that it is marked as a candidate in at least one charging segment; If discharge_count_i ≥ 1, it means that it is marked as a candidate in at least one discharge segment; If charge_count_i + discharge_count_i ≥ 2, it means that the total number of candidates is at least 2. In this way, only cells that pass the double verification and are confirmed to be truly caused by a single cell or multiple cells resulting in a deterioration in system consistency will proceed to the subsequent fault type classification stage. Cells that fail the double verification and candidate abnormal cells exhibiting only a single charging or discharging condition are excluded, which can filter out misjudgments caused by a single operating condition due to certain specific conditions and improve the accuracy of fault identification.

[0097] Step S170: The charging and discharging segments of the truly abnormal battery cells are paired according to the number of cycles. Four-dimensional statistical features are extracted for each successfully paired charging and discharging segment pair, and the fault type is classified using the four-dimensional statistical features.

[0098] In this embodiment, the four-dimensional statistical features include: the mean voltage deviation of the charging segment (c_mean), the standard deviation of the voltage deviation of the charging segment (c_std), the mean voltage deviation of the discharging segment (d_mean), and the standard deviation of the voltage deviation of the discharging segment (d_std). Based on the different characteristics exhibited during the charging and discharging processes, the battery cell system that may actually have faults is classified. Thus, by employing steps S110-S170, a progressive diagnostic architecture is constructed, from screening outlier segments, locating abnormal cells, dual verification during charging and discharging, to fault classification. This ensures that only system consistency degradation truly caused by a single or multiple cells is identified as a fault, logically avoiding misjudging overall aging as cell failure and improving the accuracy of cell fault identification.

[0099] In one embodiment, step S170 includes the following steps: Step S171: Read the maximum normal upper limit of the standard deviation of voltage deviation of all cells of the charging and discharging type from the normal range of each feature, and record them as the normal upper limit of charging and the normal upper limit of discharging, respectively.

[0100] Step S172: If the following conditions are met: the average voltage deviation of the charging segment is greater than 0, the standard deviation of the voltage deviation of the charging segment is less than or equal to the normal charging upper limit, and the standard deviation of the voltage deviation of the discharging segment is less than or equal to the normal discharging upper limit, then it is determined to be a connection abnormality.

[0101] Step S173: If the following conditions are met: the average voltage deviation of the charging segment is greater than 0, the standard deviation of the voltage deviation of the charging segment is greater than the normal upper limit of charging, the average voltage deviation of the discharging segment is less than 0, and the standard deviation of the voltage deviation of the discharging segment is greater than the normal upper limit of discharging, then it is determined to be an abnormal capacity decay.

[0102] Step S174: If the following judgment conditions are met: the average voltage deviation of the charging segment is less than 0 and the average voltage deviation of the discharging segment is less than 0, then it is determined to be an abnormal self-discharge.

[0103] In this embodiment, during the classification stage, four statistical measures are used in combination: the mean voltage deviation of the charging segment (c_mean), the standard deviation of the voltage deviation of the charging segment (c_std), the mean voltage deviation of the discharging segment (d_mean), and the standard deviation of the voltage deviation of the discharging segment (d_std). The mean voltage deviation reflects the DC bias direction, indicating whether the overall voltage of the cell is too high or too low. The standard deviation reflects the degree of fluctuation, indicating whether the voltage change of the cell is stable. Their physical meanings are complementary, and their combined use allows for more precise differentiation of different fault mechanisms. For example, a connection abnormality fault is characterized by a positive mean deviation but a normal standard deviation, indicating a stable high voltage. A capacity decay abnormality fault is characterized by a positive mean deviation and an excessive standard deviation, indicating severe fluctuations. A self-discharge abnormality fault is characterized by a negative mean deviation, indicating a persistently low voltage.

[0104] As an example, for each candidate abnormal cell, its charging and discharging segments are paired according to the number of cycles. Pairing requires that the cell's `is_candidate` is True for both the charging and discharging segments with the same number of cycles. For each successfully paired charging and discharging segment pair, four key statistics are extracted: the mean voltage deviation of the charging segment (c_mean), the standard deviation of the charging segment (c_std), the mean voltage deviation of the discharging segment (d_mean), and the standard deviation of the discharging segment (d_std). Among these four statistics, the mean voltage deviation (mean_dev) reflects the DC bias direction of the voltage deviation, i.e., whether the cell is higher or lower than the overall group; the standard deviation of the voltage deviation (std_dev) reflects the degree of voltage deviation fluctuation, i.e., whether the cell's voltage change is stable. The physical meanings of the two are complementary, and their combined use can more precisely distinguish different fault mechanisms.

[0105] From the normal range files of each feature obtained from normal training samples, the upper limit of the normal range of the maximum value of the average voltage deviation of all cells of this charging type (std_dev_max) is recorded as the normal upper limit of charging (Th_c), and the upper limit of the normal range of the maximum value of the average voltage deviation of all cells of this discharging type (std_dev_max) is recorded as the normal upper limit of discharging (Th_d). These normal upper limits of charging (Th_c) and discharging (Th_d) are derived from the statistical distribution of normal samples, distinguishing between charging and discharging types and exhibiting adaptability.

[0106] Based on electrochemical physical mechanisms, fault types are classified according to the following decision tree rules: Rule 1 states that the criteria for determining connection anomalies are: c_mean > 0, c_std ≤ Th_c, and d_std ≤ Th_d must all be met simultaneously. The physical meaning of these criteria is: increased contact resistance causes an additional voltage drop during charging, resulting in a positive voltage shift in the cell, but this shift is stable and has minimal fluctuations; during discharging, the current direction is reversed, and the voltage drop direction is reversed, but it remains stable.

[0107] Rule 2 stipulates that the criteria for determining abnormal capacity decay are: all four conditions must be met simultaneously: c_mean > 0, c_std > Th_c, d_mean < 0, and d_std > Th_d. The physical meaning of these criteria is: loss of active material or increased internal resistance leads to severe polarization during charging, resulting in a positive voltage shift and drastic fluctuations; insufficient voltage support during discharging leads to a negative voltage shift and drastic fluctuations.

[0108] Rule 3 states that the criteria for determining self-discharge anomalies are: both c_mean < 0 and d_mean < 0 must be met simultaneously. The physical meaning of this criterion is that an internal micro-short circuit causes the cell's voltage to remain consistently lower than the group median level during both charging and discharging, with the deviation direction consistently negative.

[0109] Rule 4: If any of the above rules are not met, the case is marked for manual review. This corresponds to a marginal case where the feature combination is unclear, requiring manual intervention for judgment.

[0110] In this embodiment, the method further includes: Step S180: Summarize the classification results.

[0111] This step summarizes and statistically analyzes the classification results from step S170 to generate diagnostic conclusions at the cell level and VIN level. The cell-level summary includes: summarizing the classification results of all paired segments for each abnormal cell, and statistically analyzing the number and percentage of segments requiring manual review for the four types of faults: connection abnormalities, capacity decay abnormalities, self-discharge abnormalities, and faults requiring manual review. If only one fault type appears in all paired segments of the cell, the cell is classified consistently, and this type is determined as the final fault type for the cell; if two or more fault types appear, the cell is classified inconsistently and marked as requiring manual review.

[0112] The corresponding VIN-level summary includes: for each VIN, collecting the final fault type of all abnormal cells. If all cell types are the same, the VIN is classified consistently, the type is determined as the fault type of the VIN, and an alarm is output; if multiple types exist, the VIN is classified inconsistently, marked for manual review, and a detailed report is generated, while an alarm is issued to indicate the risk.

[0113] The battery fault type classification method provided in this embodiment effectively distinguishes between overall aging and single-cell faults through a progressive screening architecture from the segment level to the cell level, greatly reducing misjudgments caused by battery aging. Multi-feature combinations are used to specifically reflect the outlier relationship between cells and the group, more accurately identifying outlier cells than the raw collected values ​​used in existing technologies. Through dual charge / discharge confirmation and a four-dimensional feature decision tree, fine differentiation of the three types of faults is achieved, reducing misjudgments and improving the accuracy of fault classification.

[0114] Example 2 In addition, this application provides a battery fault type classification device.

[0115] like Figure 5 As shown, the battery fault type classification device 500 includes: The segmentation module 510 is used to segment the raw operating data of the battery system into charging segments and discharging segments according to the charging and discharging states. Extraction module 520 is used to extract voltage consistency aggregation features for each segment; The detection module 530 is used to train the isolated forest algorithm using training data to obtain a trained isolated forest algorithm, and to use the trained isolated forest algorithm to perform anomaly detection on the voltage consistency aggregation feature to filter out abnormal outliers with abnormal voltage consistency. The calculation module 540 is used to read the original segment data of the abnormal outlier segment and calculate the mean voltage deviation and standard deviation of voltage deviation for each cell in the original segment data. The screening module 550 is used to screen out cells that are significantly out of the group as candidate abnormal cells using a modified Z-score method based on the absolute deviation of the median. The verification module 560 is used to verify the candidate abnormal cells by performing dual abnormality outliers in charging and discharging, so as to identify the real abnormal cells. The classification module 570 is used to pair the charging and discharging segments of the truly abnormal battery cells according to the number of cycles, extract four-dimensional statistical features for each successfully paired charging and discharging segment pair, and use the four-dimensional statistical features to classify the fault type.

[0116] In one embodiment, the segmentation module 510 is further configured to read the original operating data, convert the charging status identifier into a numerical type, merge the stationary charging and charging completion statuses into a charging status, keep the discharging status unchanged, remove the data of the driving charging status, remove invalid values, and obtain preprocessed data. The preprocessed data is arranged in ascending order of time. The segment is identified according to the charging status identifier. All voltage columns of the segment are checked to see if they are within the effective voltage range. Rows with voltages greater than the effective voltage range are removed. If the number of rows in the segment is less than a preset row threshold, the segment is discarded. If the obtained segment is in a charging state, it is saved as a charging segment. If the obtained segment is in a discharging state, it is saved as a discharging segment.

[0117] In one embodiment, the extraction module 520 is further configured to calculate the median voltage of all cells for each sampling time t of each segment, and use the median voltage as the group reference for the sampling time t; Calculate the first voltage deviation between the voltage of each cell at sampling time t and the median voltage; Calculate the mean voltage deviation and standard deviation of voltage deviation for each cell at all times within each segment; The average voltage deviation and standard deviation of all cells are aggregated and statistically analyzed to generate voltage consistency aggregate features for each segment. The voltage consistency aggregate features include the maximum value of the average voltage deviation of all cells, the minimum value of the average voltage deviation of all cells, the maximum value of the standard deviation of all cells, the standard deviation of the average voltage deviation of all cells, the maximum value of the voltage range, the average value of the voltage range, and the initial voltage difference.

[0118] In one embodiment, the detection module 530 is further configured to collect normal segment feature data of the battery system as the training data, wherein the normal segment feature data includes normal charging segment feature data and normal discharging segment feature data. The training data is standardized to obtain standardized data. The standardized data is then used to train the Isolation Forest algorithm. The Isolation Forest algorithm isolates samples by constructing multiple isolation trees. In each isolation tree, a feature and a splitting value are randomly selected, and the normal segment feature data is continuously divided until each sample is isolated or the tree depth limit is reached. After training, each isolation tree records the random partitioning method of the data space to obtain the trained Isolation Forest algorithm. The voltage consistency aggregation feature is input into the trained isolated forest. The sample data of the voltage consistency aggregation feature will walk from the root node to the leaf node along the splitting condition of each isolated tree. The number of edges traversed is recorded as the path length. The average path length is obtained by averaging the path lengths on all isolated trees. Anomaly scores are calculated based on the average path length and normalization factor. If the anomaly score is greater than a preset threshold, the segment corresponding to the anomaly score is determined to be an anomalous outlier segment. If the abnormal score is less than the preset threshold, the segment corresponding to the abnormal score is determined to be a normal segment; During the training of the isolated forest algorithm using the standardized data, the mean and standard deviation of each feature of the normal segment feature data are calculated. The normal range of each feature is determined based on the calculated mean and standard deviation, and the normal range of each feature is used as the adaptive threshold for classification.

[0119] In one embodiment, the screening module 550 is further configured to take the average voltage deviation of all voltage deviations of each segment as a set of average voltage deviations, and calculate the median and absolute deviation of the average voltage deviation of the set of average voltage deviations. For each cell, the corrected Z-score for each segment is calculated based on the adjustment coefficient, the mean of all deviations for each cell, the median of the mean deviations, and the absolute deviation of the median. If the median absolute deviation is 0, then the corrected Z score of all cells is 0, and no cell is marked as the candidate abnormal cell. If there is a first segment with a corrected Z score greater than a preset score threshold, then the first segment is marked as an abnormal outlier segment, and the cell corresponding to the abnormal outlier segment is determined as a candidate abnormal cell. If there is a second segment whose corrected Z-score is less than a preset score threshold, then the second segment is identified as a non-candidate outlier segment. If the average deviation of all cells is evenly distributed and there are no cells with a corrected Z-score greater than the preset score threshold, then all cells are determined to be aged as a whole.

[0120] In one embodiment, the verification module 560 is further configured to, for each battery system, summarize the candidate label records of each cell in all abnormal outlier segments, and for each cell, count the first number of times each cell is marked as a candidate abnormal chip in all charging abnormal outlier segments, and count the second number of times each chip is marked as a candidate abnormal chip in all discharging abnormal outlier segments. If a target chip that meets the preset conditions exists, then the target cell is the real abnormal cell. The preset conditions include: the first quantity is greater than or equal to the first preset quantity, the second quantity is greater than or equal to the first preset quantity, and the sum of the first quantity and the second quantity is greater than or equal to the second preset quantity.

[0121] In one embodiment, the classification module 570 is further configured to read the normal upper limit of the maximum value of the standard deviation of voltage deviation of all cells of the charging and discharging type from the normal range of the features, which are respectively denoted as the normal upper limit of charging and the normal upper limit of discharging. If the following conditions are met: the average voltage deviation of the charging segment is greater than 0, the standard deviation of the voltage deviation of the charging segment is less than or equal to the normal charging upper limit, and the standard deviation of the voltage deviation of the discharging segment is less than or equal to the normal discharging upper limit, then it is determined to be a connection abnormality. If the following conditions are met: the average voltage deviation of the charging segment is greater than 0, the standard deviation of the voltage deviation of the charging segment is greater than the normal upper limit of charging, the average voltage deviation of the discharging segment is less than 0, and the standard deviation of the voltage deviation of the discharging segment is greater than the normal upper limit of discharging, then it is determined to be an abnormal capacity decay. If the following criteria are met: the average voltage deviation of the charging segment is less than 0 and the average voltage deviation of the discharging segment is less than 0, then it is determined to be an abnormal self-discharge.

[0122] The battery fault type classification device 500 provided in this embodiment can implement the battery fault type classification method provided in Embodiment 1. To avoid repetition, it will not be described again here.

[0123] The battery fault type classification device provided in this embodiment effectively distinguishes between overall aging and single-cell faults through a progressive screening architecture from the segment level to the cell level, greatly reducing misjudgments caused by battery aging. Multi-feature combinations are used to specifically reflect the outlier relationship between cells and the group, more accurately identifying outlier cells than the raw collected values ​​used in existing technologies. Through dual charge / discharge confirmation and a four-dimensional feature decision tree, it achieves fine differentiation among the three types of faults, reducing misjudgments and improving the accuracy of fault classification.

[0124] Example 3 In addition, this application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the computer program executes the battery fault type classification method provided in Embodiment 1 when it is run on the processor.

[0125] The electronic device provided in this embodiment can implement the battery fault type classification method provided in Embodiment 1. To avoid repetition, it will not be described again here.

[0126] Example 4 This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the battery fault type classification method provided in Embodiment 1.

[0127] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0128] The computer-readable storage medium provided in this embodiment can implement the battery fault type classification method provided in Embodiment 1. To avoid repetition, it will not be described again here.

[0129] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.

[0130] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0131] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for classifying battery fault types, characterized in that, The method includes: The raw operating data of the battery system is divided into charging segments and discharging segments according to the charging and discharging states; Extract voltage consistency aggregation features for each segment; The isolated forest algorithm is trained using training data to obtain a trained isolated forest algorithm. The trained isolated forest algorithm is then used to perform anomaly detection on the voltage consistency aggregation feature to filter out abnormal outliers with abnormal voltage consistency. Read the original segment data of the abnormal outlier segments, and calculate the mean voltage deviation and standard deviation of voltage deviation for each cell within the original segment data; A modified Z-score method based on median absolute deviation was used to screen out cells that were significantly out of the group as candidate abnormal cells. The candidate abnormal cells are verified by charging and discharging dual abnormal outliers to identify the truly abnormal cells. The charging and discharging segments of the truly abnormal battery cells are paired according to the number of cycles. Four-dimensional statistical features are extracted for each successfully paired charging and discharging segment, and the fault type is classified using the four-dimensional statistical features.

2. The method according to claim 1, characterized in that, The process of dividing the raw operating data of the battery system into charging and discharging segments according to the charging and discharging states includes: Read the original operating data, convert the charging status identifier into a numerical type, merge the stationary charging and charging complete statuses into a charging status, keep the discharging status unchanged, remove the data of the driving charging status, remove invalid values, and obtain the preprocessed data. The preprocessed data is arranged in ascending order of time. The segment is identified according to the charging status identifier. All voltage columns of the segment are checked to see if they are within the effective voltage range. Rows with voltages greater than the effective voltage range are removed. If the number of rows in the segment is less than a preset row threshold, the segment is discarded. If the obtained segment is in a charging state, it is saved as a charging segment. If the obtained segment is in a discharging state, it is saved as a discharging segment.

3. The method according to claim 1, characterized in that, The extraction of voltage consistency aggregation features for each segment includes: For each sampling time t of each segment, calculate the median voltage of all cells, and use the median voltage as the group benchmark at the sampling time t; Calculate the first voltage deviation between the voltage of each cell at sampling time t and the median voltage; Calculate the mean voltage deviation and standard deviation of voltage deviation for each cell at all times within each segment; The average voltage deviation and standard deviation of all cells are aggregated and statistically analyzed to generate voltage consistency aggregate features for each segment. The voltage consistency aggregate features include the maximum value of the average voltage deviation of all cells, the minimum value of the average voltage deviation of all cells, the maximum value of the standard deviation of all cells, the standard deviation of the average voltage deviation of all cells, the maximum value of the voltage range, the average value of the voltage range, and the initial voltage difference.

4. The method according to claim 1, characterized in that, The isolated forest algorithm is trained using training data to obtain a trained isolated forest algorithm. This trained isolated forest algorithm is then used to perform anomaly detection on the voltage consistency aggregation features, filtering out anomalous outliers with abnormal voltage consistency, including: Collect normal segment feature data of the battery system as the training data, wherein the normal segment feature data includes normal charging segment feature data and normal discharging segment feature data; The training data is standardized to obtain standardized data. The standardized data is then used to train the Isolation Forest algorithm. The Isolation Forest algorithm isolates samples by constructing multiple isolation trees. In each isolation tree, a feature and a splitting value are randomly selected, and the normal segment feature data is continuously divided until each sample is isolated or the tree depth limit is reached. After training, each isolation tree records the random partitioning method of the data space to obtain the trained Isolation Forest algorithm. The voltage consistency aggregation feature is input into the trained isolated forest. The sample data of the voltage consistency aggregation feature will walk from the root node to the leaf node along the splitting condition of each isolated tree. The number of edges traversed is recorded as the path length. The average path length is obtained by averaging the path lengths on all isolated trees. Anomaly scores are calculated based on the average path length and normalization factor. If the anomaly score is greater than a preset threshold, the segment corresponding to the anomaly score is determined to be an anomalous outlier segment. If the abnormal score is less than the preset threshold, the segment corresponding to the abnormal score is determined to be a normal segment; The method further includes: During the training of the isolated forest algorithm using the standardized data, the mean and standard deviation of each feature of the normal segment feature data are calculated. The normal range of each feature is determined based on the calculated mean and standard deviation, and the normal range of each feature is used as the adaptive threshold for classification.

5. The method according to claim 1, characterized in that, The modified Z-score method based on median absolute deviation is used to screen out cells that are significantly outliers relative to the population as candidate abnormal cells, including: For each segment, the mean of all voltage deviations is taken as the set of mean voltage deviations, and the median and absolute deviation of the mean voltage deviations of the set of mean voltage deviations are calculated. For each cell, the corrected Z-score for each segment is calculated based on the adjustment coefficient, the mean of all deviations for each cell, the median of the mean deviations, and the absolute deviation of the median. If the median absolute deviation is 0, then the corrected Z score of all cells is 0, and no cell is marked as the candidate abnormal cell. If there is a first segment with a corrected Z score greater than a preset score threshold, then the first segment is marked as an abnormal outlier segment, and the cell corresponding to the abnormal outlier segment is determined as a candidate abnormal cell. If there is a second segment whose corrected Z-score is less than a preset score threshold, then the second segment is identified as a non-candidate outlier segment. If the average deviation of all cells is evenly distributed and there are no cells with a corrected Z-score greater than the preset score threshold, then all cells are determined to be aged as a whole.

6. The method according to claim 1, characterized in that, The verification of the candidate abnormal cells through charge and discharge dual-abnormality outliers to determine the truly abnormal cells includes: For each battery system, summarize the candidate label records of each cell in all abnormal outlier segments. For each cell, count the first number of cells marked as candidate abnormal chips in all charging abnormal outlier segments and the second number of cells marked as candidate abnormal chips in all discharging abnormal outlier segments. If a target chip that meets the preset conditions exists, then the target cell is the real abnormal cell. The preset conditions include: the first quantity is greater than or equal to the first preset quantity, the second quantity is greater than or equal to the first preset quantity, and the sum of the first quantity and the second quantity is greater than or equal to the second preset quantity.

7. The method according to claim 4, characterized in that, The method of classifying fault types using the four-dimensional statistical features includes: The normal upper limit of the maximum value of the standard deviation of voltage deviation of all cells of the charging and discharging type is read from the normal range of each feature, and is recorded as the normal upper limit of charging and the normal upper limit of discharging respectively. If the following conditions are met: the average voltage deviation of the charging segment is greater than 0, the standard deviation of the voltage deviation of the charging segment is less than or equal to the normal charging upper limit, and the standard deviation of the voltage deviation of the discharging segment is less than or equal to the normal discharging upper limit, then it is determined to be a connection abnormality. If the following conditions are met: the average voltage deviation of the charging segment is greater than 0, the standard deviation of the voltage deviation of the charging segment is greater than the normal upper limit of charging, the average voltage deviation of the discharging segment is less than 0, and the standard deviation of the voltage deviation of the discharging segment is greater than the normal upper limit of discharging, then it is determined to be an abnormal capacity decay. If the following criteria are met: the average voltage deviation of the charging segment is less than 0 and the average voltage deviation of the discharging segment is less than 0, then it is determined to be an abnormal self-discharge.

8. A battery fault type classification device, characterized in that, The device includes: The segmentation module is used to divide the raw operating data of the battery system into charging segments and discharging segments according to the charging and discharging states. The extraction module is used to extract voltage consistency aggregation features for each segment; The detection module is used to train the isolated forest algorithm using training data to obtain a trained isolated forest algorithm. The trained isolated forest algorithm is then used to perform anomaly detection on the voltage consistency aggregation feature to filter out abnormal outliers with abnormal voltage consistency. The calculation module is used to read the original segment data of the abnormal outlier segments and calculate the mean voltage deviation and standard deviation of voltage deviation for each cell within the original segment data. The screening module is used to select cells that are significantly out of the group as candidate abnormal cells by using a modified Z-score method based on the absolute deviation of the median. The verification module is used to verify the candidate abnormal cells by performing dual abnormality outliers in charging and discharging, so as to identify the truly abnormal cells. The classification module is used to pair the charging and discharging segments of the truly abnormal battery cells according to the number of cycles, extract four-dimensional statistical features for each successfully paired charging and discharging segment pair, and use the four-dimensional statistical features to classify the fault type.

9. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program that executes the battery fault type classification method according to any one of claims 1 to 7 when the processor is running.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when run on a processor, executes the battery fault type classification method according to any one of claims 1 to 7.