Power battery fault detection method based on improved isolated forest algorithm
Through the improved golden section isolation forest algorithm and Z-Score normalization processing, the real-time and stability problems of the traditional isolation forest algorithm in power battery fault detection are solved, and efficient and accurate detection and positioning of battery faults are achieved.
Patent Information
- Application Number
- CN202510868465.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-10-17
AI Technical Summary
The traditional isolation forest algorithm has problems in power battery fault detection, such as insufficient stability, low computational efficiency and insufficient adaptability to high-dimensional features, making it difficult to meet the requirements of real-time and accuracy.
An improved golden section isolation forest algorithm is adopted to construct a decision tree ensemble through the deterministic segmentation strategy of the golden section method. Combined with the Z-Score standardization to process battery data, real-time fault detection of battery cell voltage is achieved.
It improves the real-time and stability of fault detection, reduces the false alarm rate, improves computing efficiency, and can accurately locate fault units under actual vehicle conditions.
Smart Images

Figure CN120802040A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of battery management, and relates to a power battery fault detection method based on an improved isolated forest algorithm. BACKGROUND
[0002] With the rapid popularization of electric vehicles, the safety performance of power batteries has become the focus of industry and society. If a single cell in the power battery pack fails, it may cause a sharp decline in vehicle performance or even a safety accident. Traditional battery fault detection methods are usually based on multi-dimensional features and empirical thresholds in a laboratory environment, which are not sensitive enough to fault cells under complex real-world conditions, often leading to detection lag or false positives.
[0003] Isolation forest is an unsupervised anomaly detection algorithm that uses random partitioning to "isolate" potential outliers in the data set, and then calculates the anomaly score and determines the anomaly. The standard isolation forest algorithm randomly selects a split axis and a random split point in the feature space when constructing each isolation tree, until each sample is completely isolated as a leaf node. Outliers are more likely to be "isolated" and can reach the leaf node at a lower split depth, resulting in a shorter average path length and a higher anomaly score. Although the isolation forest algorithm achieves unsupervised anomaly detection through random partitioning, it has inherent defects in the power battery scenario: 1) stability defects caused by randomness: the anomaly score of the same fault cell fluctuates greatly in different operation periods, affecting the consistency of fault determination; 2) low processing efficiency for large samples: when processing the battery data generated by each vehicle daily, the traditional algorithm takes several hours to complete the full pack scan, making it difficult to meet real-time requirements; 3) insufficient adaptability of high-dimensional features: random splitting has low accuracy for anomaly detection of derived features such as SOC estimation error and internal resistance change rate.
[0004] The latest industry attempt to improve data dimensions through multi-sensor fusion, but the core algorithm still lacks breakthroughs. Golden Section Search has proven its convergence efficiency advantage in the optimization field: 1) mathematical property adaptability: the 0.618 split ratio can make the search interval converge exponentially, improving the convergence speed by about 58% compared to random search; 2) battery data feature matching: the standardized voltage sequence of power batteries shows quasi-periodicity during the charging and discharging cycle, and the golden section point corresponds exactly to the nonlinear change inflection point region. However, there is currently no research that introduces the deterministic splitting strategy of the Golden Section Search into the isolation forest framework to address the real-time and stability contradiction in power battery fault detection. SUMMARY
[0005] Therefore, the purpose of the present application is to provide a power battery fault detection method based on an improved isolated forest algorithm, which realizes real-time and effective detection of power battery faults of electric vehicles and accurately locates the faulty single body, and is suitable for fault detection of power batteries in real vehicle working conditions.
[0006] To achieve the above purpose, the present application provides the following technical solutions.
[0007] A power battery fault detection method based on an improved isolated forest algorithm, specifically comprising the following steps:
[0008] S1: Collecting power battery data of a normal running electric vehicle, including operation data of each single battery in a power battery pack, and establishing a power battery database;
[0009] S2: Standardizing the single body voltage according to the collected battery data, and using the standardized single body voltage as a feature;
[0010] S3: Based on the features extracted in step S2, an improved golden section isolated forest algorithm is used to train a real-time fault detection model, and the features selected in step S2 are used as input variables;
[0011] S4: Inputting the real-time running battery data of the electric vehicle into the trained real-time fault detection model, judging whether the single body voltage exceeds the set threshold interval output by the model, if not, the battery single body is normal, if yes, the battery single body is abnormal.
[0012] Further, step S1 specifically comprises: collecting power battery data of a normal running electric vehicle, including time and voltage and other battery parameters; collecting single body operation data of the power battery, including single body voltage of all single batteries in the power battery pack; and establishing a power battery database according to the collected battery data.
[0013] Further, step S2 specifically comprises: according to battery system knowledge and theoretical analysis, initially selecting relevant data that may affect the single body voltage as candidate features; performing Z-Score standardization processing on the selected single body voltage data, i.e. standardizing the data with a mean of 0 and a variance of 1, to eliminate dimensional differences and extract more stable features; and using the standardized single body voltage value as an input feature for model training.
[0014] Further, step S3 specifically comprises: using an improved golden section isolated forest algorithm as a target machine learning algorithm, which isolates abnormal points by selecting features and constructing a decision tree set, and has good real-time detection performance; and training a real-time fault detection model based on the standardized single body voltage feature data obtained in step S2 using the improved golden section isolated forest algorithm.
[0015] Furthermore, in step S3, in the improved golden section isolation forest algorithm, each time a value is segmented, the value is segmented according to the golden section coefficient.
[0016] Furthermore, in step S3, the improved golden section isolation forest algorithm is specifically as follows: for each training time t, the standardized monomer voltage array is recorded as Z (t) ={z1(t),z2(t),...,z N (t)}, where z N (t) is the value of the Nth battery cell voltage at time t after Z-Score standardization, N is the number of cells in the battery pack; if Z (t) If the element in is less than or equal to 1 or all the elements are the same, the cell node ends the division; otherwise, calculate the minimum value a of the current subset (t) With the maximum value b (t) :a (t) =min{Z (t)},b (t) =max{Z (t)}; Let the golden section coefficient α be: Among them, φ is the famous “golden ratio” in mathematics, which is used to determine the fixed position of the isolated tree cutting point; the threshold θ (t) =a (t) +α×(b (t) -a (t) ) to Z (t) Split into two subsets: in, is the "left subset" generated based on the golden section split, is the “right subset” generated based on the golden section segmentation; then and Recursively construct the lower layer single battery nodes, and increase the depth by 1 until the subset Z (t) The elements in are less than or equal to 1 or all the elements are the same.
[0017] Furthermore, step S4 specifically includes: using the trained real-time fault detection model to detect the single cell voltage data collected in real time, and determining whether there is a fault by judging whether the single cell voltage exceeds the threshold set by the model; if it exceeds the threshold, it indicates that a fault has occurred; otherwise, it indicates that it is normal; if a fault is detected, the position of the faulty single cell is determined based on the single cell voltage exceeding the threshold, thereby locating the faulty single cell.
[0018] Furthermore, in step S4, the condition for exceeding the threshold is that the score output by the model is lower than 0.
[0019] The beneficial effects of the present invention are:
[0020] 1. Real-time breakthrough, solve the efficiency bottleneck;
[0021] (1) The operation speed is improved significantly: the golden section method replaces the random search with a deterministic cutting strategy, eliminates the repeated invalid cutting in the traditional algorithm, and greatly improves the efficiency; the golden section point is generated directly through a fixed coefficient, which saves the random number generation and range verification process, and reduces the calculation amount of single cutting.
[0022] (2) The complexity is optimized: in the recursive splitting process, the golden section makes the search interval converge exponentially, and the convergence speed is improved.
[0023] 2. Stability is enhanced, false alarm caused by randomness is solved;
[0024] (1) The consistency of fault determination is improved: the abnormal score fluctuation of the same fault monomer in different operation periods is reduced (because the fixed cutting point eliminates random interference); and the abnormal threshold determination formula is set, and the false alarm rate is reduced.
[0025] (2) The noise resistance is optimized: for the high-frequency interference (such as charge and discharge voltage jitter) of the actual vehicle working condition, the golden section point is located in the nonlinear inflection point area of the sequence, which effectively filters fluctuating noise.
[0026] In summary, the present application can effectively realize real-time detection of electric vehicle power battery faults and accurately locate the fault monomer.
[0027] Other advantages, objects and features of the present application will be set forth in part in the following specification, and in part will become apparent to those skilled in the art from a consideration of the following specification, or can be learned from practice of the present application. The objects and other advantages of the present application can be realized and obtained by the following description. BRIEF DESCRIPTION OF DRAWINGS
[0028] In order to make the purpose, technical scheme and advantages of the present application clearer, the preferred detailed description of the present application will be combined with the drawings as follows, wherein:
[0029] Figure 1 The overall flowchart of the improved isolated forest algorithm-based power battery fault detection method of the present application;
[0030] Figure 2 The fault monomer curve of different time diagnosis in the embodiment of the present application;
[0031] Figure 3 The voltage time sequence and abnormal point labeling curve in the embodiment of the present application. DETAILED DESCRIPTION
[0032] Following, the advantages and effects of the present application can be easily understood by those skilled in the art from the description. The present application can also be implemented or applied by different specific embodiments, and various modifications or changes can be made based on different views and applications without departing from the spirit of the present application. It should be noted that the drawings provided in the following examples only illustrate the basic concept of the present application in a schematic manner, and the following examples and features in the examples can be combined with each other without conflict.
[0033] The drawings are only used for illustrative description, and the representation is only a schematic diagram, not a physical diagram, and cannot be understood as a limitation of the present application. In order to better illustrate the embodiments of the present application, some components in the drawings may be omitted, enlarged or reduced, and do not represent the actual size of the product. It is understandable for those skilled in the art that some well-known structures and their descriptions in the drawings may be omitted.
[0034] The same or similar reference numerals in the drawings of the embodiments of the present application correspond to the same or similar components; in the description of the present application, it should be understood that if the terms "upper", "lower", "left", "right", "front", "back" and the like indicate the orientation or positional relationship shown in the drawings, only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, therefore the terms describing the positional relationship in the drawings are only used for illustrative description, and cannot be understood as a limitation of the present application. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0035] Please refer to Figure 1 The present application provides a fault detection method for power battery, which can be divided into the following steps:
[0036] S1: Collecting power battery data of electric vehicle in normal operation, including operation data of each single body in power battery pack, establishing power battery database;
[0037] S2: According to the collected battery data, standardizing the single body voltage, using the standardized single body voltage as the feature;
[0038] S3: Based on the features extracted in step S2, using the improved golden section isolated forest algorithm to train real-time fault detection model, using the selected features in step S2 as input variables;
[0039] S4: input the real-time running battery data of the electric vehicle into the trained real-time fault detection model, judge whether the single voltage exceeds the set threshold interval output by the model, if not, the battery single is normal, if yes, the battery single is abnormal.
[0040] Embodiment 1:
[0041] The above step S1 specifically includes the following steps:
[0042] S11: collect complete power battery running data of an electric vehicle, including time and voltage and other battery parameters;
[0043] S12: collect single running data of the power battery, including single voltage of all singles in the power battery pack;
[0044] S13: establish a power battery database according to the collected battery data.
[0045] Embodiment 2:
[0046] The above step S2 specifically includes the following steps:
[0047] S21: according to the knowledge and theoretical analysis of the battery system, initially select the related data that may affect the single voltage as the candidate features;
[0048] S22: perform Z-Score standardization processing on the selected single voltage data, that is, standardize the data with a mean of 0 and a variance of 1, so as to eliminate the dimensional difference and extract more stable features; the standardized single voltage value is used as the input feature of the model training.
[0049] The formula of Z-Score standardization processing is as follows:
[0050]
[0051] Wherein, X i is the original voltage of single i, μ is the mean, and σ is the standard deviation.
[0052] Embodiment 3:
[0053] The above step S3 specifically includes the following steps:
[0054] S31: select the improved golden section isolated forest algorithm as the target machine learning algorithm, which isolates the abnormal points by selecting features and constructing a set of decision trees, and has good real-time detection performance;
[0055] S32: based on the standardized single voltage feature data obtained in step S2, train a real-time fault detection model by using the improved golden section isolated forest algorithm;
[0056] The improved golden section isolation forest algorithm is different from the traditional isolation forest in the "isolation tree construction principle":
[0057] For each training moment t, the normalized single cell voltage array is denoted as:
[0058] Z (t) = {z1(t), z2(t),..., z N (t)}
[0059] If the elements in Z (t) are less than or equal to 1 or all elements are the same, the node ends the division; otherwise, the minimum value and the maximum value of the current subset are calculated.
[0060] a (t) = min{Z (t)}, b (t) = max{Z (t)}
[0061] Let the golden section coefficient be:
[0062]
[0063] With the threshold
[0064] θ (t) = a (t) + α × (b (t) - a (t) )
[0065] Z (t) is cut to form two subsets
[0066]
[0067] Then recursively construct the lower nodes for Z and Z , increase the depth by 1, until the elements in Z (t) are less than or equal to 1 or all elements are the same. The same α = 0.618 is used for each split, eliminating the randomness of the split point in the traditional isolation forest.
[0068] Embodiment 4:
[0069] The above step S4 specifically includes the following steps:
[0070] S41: Use the trained real-time fault detection model to detect the real-time collected single cell voltage data, and determine whether there is a fault by judging whether the single cell voltage exceeds the threshold set by the model; if it exceeds the threshold, it means that a fault has occurred; otherwise, it means normal.
[0071] The threshold score can be that the abnormal score is lower than 0, and the abnormal score is higher than 0, and the normal monomer is obtained. The expression is as follows:
[0072]
[0073] Wherein, s (i) The abnormal score of the ith monomer is represented as T, and the threshold value is set.
[0074] S42: If a fault is detected, the position of the fault monomer is determined according to the monomer voltage exceeding the threshold value, and the fault monomer positioning is realized.
[0075] Verification experiment: Finally, in order to illustrate the effectiveness of the present application, the present experiment prepares a running data of a fault battery pack, in which one battery monomer fails. Figure 2 The fault monomers diagnosed at different times in the battery pack diagnosed by the algorithm of the present application. On the fault battery pack, the running time of the traditional isolated forest algorithm is: 63.99 seconds; the running time of the isolated forest algorithm based on the golden section proposed in the present application is: 20.61 seconds; the running time is reduced by 43.38 seconds, and the running efficiency is increased by about 3 times. The detection results are shown in Figure 3 Therefore, the present application realizes real-time detection of faults and realizes fault monomer positioning at the same time.
[0076] Finally, it should be pointed out that the above embodiments are only used to illustrate the technical solutions of the present application and are not limited. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced by equivalents without departing from the purpose and scope of the present technical solutions, which should be covered in the scope of the claims of the present application.
Claims
1. A power battery fault detection method based on an improved isolation forest algorithm, characterized in that: The method specifically comprises the following steps: S1: Collect the power battery data of the normal operation of the electric vehicle, including the operating data of each single cell in the power battery pack, and establish a power battery database; S2: Based on the collected battery data, the cell voltage is normalized and the normalized cell voltage is used as a feature; S3: Based on the features extracted in step S2, the improved golden section isolation forest algorithm is used to train the real-time fault detection model, and the features selected in step S2 are used as input variables; S4: Input the real-time battery data of the electric vehicle into the trained real-time fault detection model to determine whether the single cell voltage exceeds the set threshold range output by the model. If it does not exceed, the battery cell is normal; if it exceeds, it indicates that the battery cell is abnormal.
2. The power battery fault detection method according to claim 1, characterized in that: Step S1 specifically includes: collecting power battery data of the normal operation of the electric vehicle, including time and voltage; collecting single-cell operation data of the power battery, including single-cell voltages of all single cells in the power battery pack; and establishing a power battery database based on the collected battery data.
3. The power battery fault detection method according to claim 1, characterized in that: Step S2 specifically includes: based on battery system knowledge and theoretical analysis, preliminarily selecting relevant data that affects cell voltage as candidate features; performing Z-Score normalization on the selected cell voltage data, that is, normalizing the data with a mean of 0 and a variance of 1; and the normalized cell voltage value is used as an input feature for model training.
4. The power battery fault detection method according to claim 1, characterized in that: Step S3 specifically includes: using an improved golden section isolation forest algorithm as the target machine learning algorithm, which isolates abnormal points by selecting features and constructing a decision tree ensemble; based on the standardized single-cell voltage feature data obtained in step S2, using the improved golden section isolation forest algorithm to train a real-time fault detection model.
5. The power battery fault detection method according to claim 1 or 4, characterized in that: In step S3, in the improved golden section isolation forest algorithm, each time a value is segmented, the value is segmented according to the golden section coefficient.
6. The power battery fault detection method according to claim 1 or 4, characterized in that: In step S3, the improved golden section isolation forest algorithm is specifically as follows: for each training time t, the standardized monomer voltage array is recorded as Z (t) ={z1(t),z2(t),...,z N (t)}, where z N (t) is the value of the Nth battery cell voltage at time t after Z-Score standardization, N is the number of cells in the battery pack; if Z (t) If the element in is less than or equal to 1 or all the elements are the same, the cell node ends the division; otherwise, calculate the minimum value a of the current subset (t) With the maximum value b (t) :a (t) =min{Z (t) },b (t) =max{Z (t) }; Let the golden section coefficient α be: Among them, φ is the mathematical "golden ratio", which is used to determine the fixed position of the isolated tree cutting point; the threshold θ (t) =a (t) +α×(b (t) -a (t) ) to Z (t) Split into two subsets: in, is the "left subset" generated based on the golden section split, is the "right subset" generated by the golden section segmentation; then and Recursively construct the lower layer single battery nodes, and increase the depth by 1 until the subset Z (t) The elements in are less than or equal to 1 or all the elements are the same.
7. The power battery fault detection method according to claim 1, characterized in that: Step S4 specifically includes: using the trained real-time fault detection model to detect the real-time collected single cell voltage data, and determining whether there is a fault by judging whether the single cell voltage exceeds the threshold set by the model; if it exceeds the threshold, it indicates that a fault has occurred; otherwise, it indicates that it is normal; if a fault is detected, the position of the faulty single cell is determined based on the single cell voltage that exceeds the threshold, thereby locating the faulty single cell.
8. The power battery fault detection method according to claim 7, characterized in that: In step S4, the condition for exceeding the threshold is that the score output by the model is lower than 0.
Citation Information
Patent Citations
Lithium battery fault identification method based on isolated forest algorithm
CN114720883A
Electric vehicle battery pack fault detection method and system
CN117148194A
Fault detection method for power battery
CN117825957A
New energy automobile battery fault detection method
CN119024168A
Cited By
A power battery fault sensitive feature selection method and a fault detection method
CN122430708A
A power battery fault sensitive feature selection method and a fault detection method
CN122430708B