Lithium ion power battery on-line and off-line inconsistency detection method

By combining Z-score and One-Class SVM detection methods, the inconsistency score is calculated using voltage ratio characteristics, and the battery inconsistency is judged by optimizing weights and dynamic thresholds, the existing detection methods are solved, and the problems of low accuracy and high cost are achieved, achieving more accurate and efficient lithium-ion battery inconsistency detection.

CN119511090APending Publication Date: 2025-02-25HUZHOU COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411513721.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing inconsistency detection methods for lithium-ion power batteries have problems such as low detection accuracy, high cost, and poor battery aging adjustment ability, making it difficult to effectively identify small differences and local abnormalities in the battery system.

Method used

Using a detection method combining Z-score and One-Class SVM, the inconsistency scores of Z-score and One-Class SVM are calculated by using the voltage ratio between a single battery and a battery pack as a feature, and the two scores are optimized to fusion, and dynamic thresholds are used to determine whether there is inconsistency in the battery.

Benefits of technology

It significantly improves the accuracy and efficiency of inconsistency detection of lithium-ion batteries, can more effectively identify inconsistent single cells in the battery, and improves the efficiency of cascade utilization and the safety of in-service batteries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119511090A_ABST
    Figure CN119511090A_ABST
Patent Text Reader

Abstract

The invention discloses a lithium ion power battery on-line and off-line inconsistency detection method so as to improve the safety and reliability of an electric vehicle lithium ion battery. For off-line detection, firstly, data points obviously deviating from a mean value are recognized by combining Z-score according to the voltage ratio characteristic between a single battery and a battery pack, and local anomaly is detected by using One-Class SVM (Support Vector Machine). And a final fusion result optimizes a fusion weight through variance minimization, and identifies inconsistent single batteries based on a dynamic threshold value of quartile distance. In online detection, a sliding window is adopted to read data, an inconsistency evaluation result is obtained by applying the same fusion method, and abnormity is judged through a dynamic threshold value. According to the method, the fixed threshold value and modeling dependence of a traditional method are overcome, and the gradient utilization efficiency and safety of the battery are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an online and offline inconsistency detection method for a lithium-ion power battery, and belongs to the field of lithium-ion power battery state assessment for new energy vehicles. Background Art

[0002] The inconsistency problem of lithium-ion power batteries has always been an important challenge in the design, manufacturing and application of battery systems. Lithium-ion batteries are widely used in high-power demand equipment such as electric vehicles and energy storage systems, and are usually composed of multiple battery cells connected in series or in parallel. In actual use, due to differences in manufacturing processes, material properties, aging process and use environment, the performance of each battery cell often varies to varying degrees, mainly manifested in inconsistencies in capacity, internal resistance, charge and discharge efficiency, temperature response and attenuation rate.

[0003] Inconsistency has a significant impact on the overall performance of the battery pack. If some cells in the battery pack have a smaller capacity, they will run out of energy earlier, which will affect the battery life of the entire battery pack. Cells with larger internal resistance will generate more heat, which will reduce the energy conversion efficiency. As the inconsistency increases, the life of the battery pack will also be shortened, and some cells may enter the overcharge or over-discharge state earlier, further aggravating the degradation of the battery. Not only that, this inconsistency will also bring safety hazards. Overcharged or over-discharged battery cells may cause thermal runaway, or even cause fire or explosion. Therefore, maintaining the consistency of battery cells in the battery pack is crucial to improving system performance and ensuring safety.

[0004] In order to monitor and manage battery inconsistencies, it is particularly important to develop online or offline detection methods. Online detection is to monitor the working status of battery cells in real time when the battery is actually in use, and analyze the differences between cells through parameters such as voltage, current, and temperature. Offline detection is to evaluate the battery through special testing equipment when the battery stops running to determine the health of each cell. Common detection technologies include voltage and current monitoring, internal resistance measurement, capacity testing, and temperature monitoring, which can identify potential battery problems and analyze them.

[0005] Existing inconsistency detection methods have some obvious shortcomings. For example, traditional statistical methods rely on fixed simple thresholds, which make it difficult to detect small differences in battery systems. Fixed thresholds cannot be adjusted according to the aging of the battery, resulting in a decrease in detection accuracy as the battery degrades. Model-based methods are highly dependent on the accuracy of the model, while the complexity and nonlinear characteristics of lithium batteries often make accurate modeling very difficult. Although data-driven detection methods use big data and machine learning techniques to identify inconsistencies, they are highly dependent on high-quality data and large-scale samples. Insufficient data or data noise will significantly affect the detection effect. In addition, the implementation cost of these methods is also high, especially when large amounts of data need to be processed. Summary of the invention

[0006] In view of some obvious deficiencies of the above-mentioned existing inconsistency detection methods, the present invention provides an online and offline inconsistency detection method for lithium-ion power batteries.

[0007] The technical solution adopted by the present invention is:

[0008] A method for detecting inconsistency of a lithium-ion power battery online and offline comprises the following steps:

[0009] The offline detection part of this method has the following steps:

[0010] Step 1: Data loading and preprocessing,

[0011] Step 1.1: Input the historical voltage data of the lithium-ion battery, and V pack ;

[0012] Step 1.2: The missing values ​​NaN and 0 in the data set are processed differently according to the length of time they appear continuously: In order to avoid the influence of abnormal values ​​or 0 values ​​in the data on the detection results, if the length of time for which zero or missing values ​​appear continuously is greater than or equal to 60 seconds, the linear interpolation method (1) is used to fill them in, and the complete voltage ratio data set is recorded as D clean .

[0013]

[0014] Wherein, V(i) represents the voltage value at time t(i), V(i-1) and V(i+1) are the known voltage values ​​at time t(i-1) and t(i+1).

[0015] Step 2: Calculate the ratio of the single cell voltage to the battery pack voltage.

[0016]

[0017] in, is the voltage of single cell i, V pack is the voltage of the battery pack.

[0018] Step 3: Process the battery voltage ratio data R i Formula (3) is used to calculate the inconsistency score of Z-score for subsequent algorithm combination.

[0019]

[0020] Among them, S Z-score is the inconsistency score output by Z-score, x ij is the observed value of the i-th j-th column sample, μ j is the mean of the samples in the jth column, σ j is the standard deviation of the samples in the jth column.

[0021] Step 4: Use One-Class SVM to train the battery voltage ratio data. The model is based on the battery voltage ratio R i To identify anomalies;

[0022] Step 4.1: The optimization objective function in model training is defined as Equation (4). Considering that the cell voltage data has certain noise or variability, v = 0.01 is selected to adapt to the particularity of the data. In particular, in the presence of noise or fluctuations, a smaller v can improve the robustness and fault tolerance of the model. The exact proportion of inconsistent cells in the target data is unknown during detection, but γ controls the influence range of the RBF kernel. Setting γ to 'auto' will assign it a value of 1 / n, thus providing a reasonable initial range of kernel influence;

[0023]

[0024] Among them, ω is the normal vector of the hyperplane, which determines the direction of the separation boundary, ζ i is a slack variable, that is, abnormal data is allowed to exist, ρ is the offset, which represents the offset of the hyperplane, v controls the proportion of abnormal data allowed in the training set, and n is the number of training data.

[0025] Step 4.2: When solving the above optimization problem, One-Class SVM has the following constraints:

[0026] ω·φ(x i )≥ρ-ζ i ,ζ i ≥0,i=1,2,...,n

[0027] Among them, φ(x i ) is the input data x i High-dimensional feature representation after a certain mapping function φ.

[0028] Step 4.3: The kernel function is the radial basis function (RBF), and its formula is as shown in formula (5).

[0029] K(x,x′)=exp(-γ||xx′|| 2 ) Formula (5)

[0030] Among them, K(x,x′) is the kernel function value between samples x and x′, ||xx′|| 2 It represents the square of the Euclidean distance between samples x and x′, and γ is the parameter of the RBF kernel, which controls the influence range of the kernel function.

[0031] Step 4.4: After the training is completed, One-Class SVM uses the decision function to classify the new data points to determine whether the new data points are abnormal. The formula is shown in Equation (6).

[0032]

[0033] Among them, S′ OCSVM is the inconsistency score output by One-Class SVM, a i It is the Lagrange multiplier that determines the influence of the support vector on the classification decision, K(x,x i ′) is the current data point x and the support vector x i The kernel function value between ′.

[0034] Step 4.5: In order to combine the anomaly detection results of Z-score and eliminate the differences in dimensions, the inconsistent scores of One-Class SVM are normalized using formula (7).

[0035]

[0036] Among them, S OCSVM is the normalized inconsistency score, S′ MAX and S′ min are the maximum and minimum values ​​of all inconsistency scores, respectively.

[0037] Step 5: The final inconsistency evaluation is performed by weighted combination of the normalized One-Class SVM and Z-score inconsistency scores. The combined inconsistency score is calculated using the optimized adaptive weights, and a higher fusion score indicates a higher degree of inconsistency. The calculation process is summarized as follows:

[0038] S=ω1S Z-score +ω2S OCSVM Formula (8)

[0039] The weights ω1 and ω2 are determined by minimizing the variance of the combined score, ensuring a balance between the contributions of the two algorithms and minimal score fluctuations. The optimization process is shown in Equation (9).

[0040]

[0041] Among them, S is the final inconsistency score, ω1 and ω2 are algorithm weights, is the minimum value of the variance.

[0042] Step 6: For each single battery, the interquartile range is calculated by formula (10) to determine the dynamic threshold, and the threshold is used to determine whether the battery is inconsistent.

[0043] IQR=Q3-Q1,

[0044] θupper=Q3+1.5·IQR Formula (10)

[0045] Among them, Q1 is the 25% percentile position of the data, Q3 is the 75% percentile position of the data, and θupper is the dynamic threshold.

[0046] Step 7: Output the serial numbers of the inconsistent batteries for subsequent recycling of lithium-ion batteries.

[0047] The online detection part of this method has the following steps:

[0048] Step 1: Initialize the sliding window. By comparing the experimental results, set the optimal sliding window size to W = 10.

[0049] Step 2: Input the real-time data transmitted by the lithium battery management system into formula (2) to calculate the voltage ratio.

[0050] Step 3: To better adapt to the reception of real-time data, set the sliding step size to 1 and start sliding the window.

[0051] Step 4: Calculate the Z-score inconsistency score for the voltage ratio data in the current window using formula (3).

[0052] Step 5: Calculate the inconsistency score of One-Class SVM through equations (4), (5), (6) and (7).

[0053] Step 6: Combine the Z-score and One-Class SVM calculated in the current window through formula (8), and optimize the algorithm weight through formula (9) to obtain the final inconsistency score.

[0054] Step 7: Calculate the threshold value through formula (10) to determine whether there are single cells with inconsistent scores exceeding the threshold value in the current window. If so, issue an early warning and slide the window. If not, continue sliding the window for monitoring.

[0055] Step 8: When the real-time data is no longer transmitted, the detection ends.

[0056] The beneficial effects of the present invention are:

[0057] The present invention combines Z-score and One-Class SVM to provide an online and offline detection method for the inconsistency of lithium-ion power batteries. The voltage ratio between a single cell and a battery pack is selected as a feature to ensure the consistency of the voltage scale. Z-score identifies data points that deviate significantly from the overall mean, while One-Class SVM detects local anomalies in the data distribution. The inconsistency evaluation results of the two methods are then combined, and the fusion weights are optimized by minimizing the variance to obtain the final inconsistency evaluation. Subsequently, a dynamic threshold based on the interquartile range is used to more effectively identify inconsistent single cells in lithium-ion batteries in different usage scenarios. Offline and online experiments using real voltage data of lithium-ion power batteries in 9 electric vehicles show that the present invention more accurately detects inconsistent lithium-ion batteries in electric vehicles compared with other methods. The present invention significantly improves the efficiency of cascade utilization of lithium batteries and improves the safety of lithium batteries in service. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 It is a schematic diagram of the overall process of the method of the present invention.

[0059] Figure 2 Schematic diagram of single cell voltage distribution.

[0060] Figure 3 This is the data preprocessing flow chart.

[0061] Figure 4 The following is the actual voltage data of 9 electric vehicles.

[0062] Figure 5 This is the offline inconsistency detection result diagram.

[0063] Figure 6 This is a verification diagram of offline inconsistency detection results based on actual voltage data.

[0064] Figure 7 A comparison chart of the results of offline detection of inconsistent single cells using different methods.

[0065] Figure 8 This is a verification diagram of the online inconsistency detection results based on actual voltage data. DETAILED DESCRIPTION

[0066] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings and examples. The data used in the present invention comes from 9 pure electric passenger cars of a certain brand, over a period of 6 months, with a sampling interval of 20 seconds. The lithium-ion battery pack of each vehicle consists of 96 lithium iron phosphate cells connected in series and parallel.

[0067] like Figure 2 As shown in the figure, taking the voltage data of vehicle 1 as an example, there is a slight inconsistency in each battery cell, which manifests as small random fluctuations. Over time, these fluctuations gradually accumulate, and frequent random events form a probability pattern according to the law of large numbers, and the internal resistance and voltage of the battery tend to obey the normal distribution.

[0068] The inconsistency detection method of lithium-ion power batteries is integrated with Z-score and One-Class SVM. The offline detection steps are as follows: Figure 1 As shown in part (a) of , the specific steps of this fusion algorithm are as follows:

[0069] Step 1: Data loading and preprocessing,

[0070] Step 1.1: Input the historical voltage data of the lithium-ion battery, and V pack ;

[0071] Step 1.2: The missing values ​​NaN and 0 in the data set are processed differently according to the length of time they appear continuously: If the length of time that the zero value or missing value appears continuously is greater than or equal to 60 seconds, the linear interpolation method (1) is used to fill it. The processing process is as follows: Figure 3 As shown in Figure 2, the complete voltage ratio data set obtained after preprocessing is denoted as D clean .

[0072]

[0073] Wherein, V(i) represents the voltage value at time t(i), V(i-1) and V(i+1) are the known voltage values ​​at time t(i-1) and t(i+1).

[0074] Step 2: Calculate the ratio of the single cell voltage to the battery pack voltage.

[0075]

[0076] in, is the voltage of single cell i, V pack is the voltage of the battery pack.

[0077] Step 3: Process the battery voltage ratio data R iFormula (3) is used to calculate the inconsistency score of Z-score for subsequent algorithm combination.

[0078]

[0079] Among them, S Z-score is the inconsistency score output by Z-score, x ij is the observed value of the i-th j-th column sample, μ j is the mean of the samples in the jth column, σ j is the standard deviation of the samples in the jth column.

[0080] Step 4: Use One-Class SVM to train the battery voltage ratio data. The model is based on the battery voltage ratio R i To identify anomalies;

[0081] Step 4.1: The optimization objective function in model training is defined as Equation (4). Considering that the cell voltage data has certain noise or variability, v = 0.01 is selected to adapt to the particularity of the data. In particular, in the presence of noise or fluctuations, a smaller v can improve the robustness and fault tolerance of the model. The exact proportion of inconsistent cells in the target data is unknown during detection, but γ controls the influence range of the RBF kernel. Setting γ to 'auto' will assign it a value of 1 / n, thus providing a reasonable initial range of kernel influence;

[0082]

[0083] Among them, ω is the normal vector of the hyperplane, which determines the direction of the separation boundary, ζ i is a slack variable, that is, abnormal data is allowed to exist, ρ is the offset, which represents the offset of the hyperplane, v controls the proportion of abnormal data allowed in the training set, and n is the number of training data.

[0084] Step 4.2: When solving the above optimization problem, One-Class SVM has the following constraints:

[0085] ω·φ(x i )≥ρ-ζ i ,ζ i ≥0,i=1,2,...,n

[0086] Among them, φ(x i ) is the input data x i High-dimensional feature representation after a certain mapping function φ.

[0087] Step 4.3: The kernel function is the radial basis function (RBF), and its formula is as shown in formula (5).

[0088] K(x,x′)=exp(-γ||xx′|| 2 ) Formula (5)

[0089] Among them, K(x,x′) is the kernel function value between samples x and x′, ||xx′|| 2 It represents the square of the Euclidean distance between samples x and x′, and γ is the parameter of the RBF kernel, which controls the influence range of the kernel function.

[0090] Step 4.4: After the training is completed, One-Class SVM uses the decision function to classify the new data points to determine whether the new data points are abnormal. The formula is shown in Equation (6).

[0091]

[0092] Among them, S′ OCSVM is the inconsistency score output by One-Class SVM, a i It is the Lagrange multiplier that determines the influence of the support vector on the classification decision, K(x,x i ′) is the current data point x and the support vector x i The kernel function value between ′.

[0093] Step 4.5: In order to combine the anomaly detection results of Z-score and eliminate the differences in dimensions, the inconsistent scores of One-Class SVM are normalized using formula (7).

[0094]

[0095] Among them, S OCSVM is the normalized inconsistency score, S′ MAX and S′ min are the maximum and minimum values ​​of all inconsistency scores, respectively.

[0096] Step 5: The final inconsistency evaluation is achieved by weighted combination of the normalized One-Class SVM and Z-score inconsistency scores. The combined inconsistency score is calculated using the optimized adaptive weights, and a higher fusion score indicates a higher degree of inconsistency. The calculation process is outlined as follows:

[0097] S=ω1S Z-score +ω2S OCSVM Formula (8)

[0098] The weights ω1 and ω2 are determined by minimizing the variance of the combined score, ensuring a balance between the contributions of the two algorithms and minimal score fluctuations. The optimization process is shown in Equation (9).

[0099]

[0100] Among them, S is the final inconsistency score, ω1 and ω2 are algorithm weights, is the minimum value of the variance.

[0101] Step 6: For each single battery, the interquartile range is calculated by formula (10) to determine the dynamic threshold, and the threshold is used to determine whether the battery is inconsistent.

[0102] IQR=Q3-Q1,θupper=Q3+1.5·IQR Formula (10)

[0103] Among them, Q1 is the 25% percentile position of the data, Q3 is the 75% percentile position of the data, and θupper is the dynamic threshold.

[0104] Step 7: Output the serial numbers of the inconsistent batteries for subsequent recycling of lithium-ion batteries.

[0105] The online detection part of this method is as follows Figure 1 The specific steps shown in part (b) are as follows:

[0106] Step 1: Initialize the sliding window and set the optimal sliding window size to W = 10.

[0107] Step 2: Input the real-time data transmitted by the lithium battery management system into formula (2) to calculate the voltage ratio.

[0108] Step 3: Set the sliding step size to 1 and start sliding the window.

[0109] Step 4: Calculate the Z-score inconsistency score for the voltage ratio data in the current window using formula (3).

[0110] Step 5: Calculate the inconsistency score of One-Class SVM through equations (4), (5), (6) and (7).

[0111] Step 6: Combine the Z-score and One-Class SVM calculated in the current window through formula (8), and optimize the algorithm weight through formula (9) to obtain the final inconsistency score.

[0112] Step 7: Calculate the threshold value through formula (10) to determine whether there are single cells with inconsistent scores exceeding the threshold value in the current window. If so, issue an early warning and slide the window. If not, continue sliding the window for monitoring.

[0113] Step 8: When the real-time data is no longer transmitted, the detection ends.

[0114] The following example uses the single cell voltage data of 9 pure electric passenger cars of a certain brand to verify the accuracy and reliability of the lithium-ion power battery inconsistency detection method of V fusion Z-score and One-Class SVM. Figure 4 The battery voltage of vehicles 1 to 9 varies with driving time, reflecting the different usage frequencies and driving durations of different vehicles. Figure 4 Except for vehicle 2 in (b), the batteries of other vehicles all have overvoltage or undervoltage faults. The focus of the present invention is to detect the inconsistency of lithium-ion battery cells, so the existence of alarm data can further verify the accuracy of the detection results.

[0115] The purpose of offline testing is to evaluate the inconsistency of retired batteries and is a key step in cascade utilization. By analyzing historical data, it can be determined that batteries with stable performance and high reliability are ideal for new battery packs. This selection ensures the best performance and longer service life of new battery packs in subsequent applications. Batteries that show obvious inconsistencies should be replaced in a timely manner and disassembled and recycled. This approach not only improves the overall performance of new battery packs, but also promotes the sustainable use of resources by recovering valuable materials from batteries that are no longer reliable.

[0116] like Figure 5 The results of offline testing are shown. Due to the different aging conditions of the lithium battery packs in the vehicles, the inconsistency scores of vehicles 1-9 vary significantly. Figure 5 In (a) and (b), it is clearly observed that the cells are not consistent in vehicles 1 and 2. Figure 5 The cells identified as inconsistent in (c), (d), (h), and (i) have only small differences in scores compared to the other cells, but the overall dynamic threshold still classifies some cells as inconsistent. Figure 5 (e) shows a low and tightly clustered distribution of inconsistency scores, indicating that the battery pack is in good condition. Figure 5 (e) shows two cells with higher scores, but they are not classified as inconsistent because the dynamic threshold of the present invention takes into account the overall inconsistent scores of all cells. Figure 5 In (g), the inconsistency scores of two single cells are close to 0.9, while the scores of the remaining single cells show significant distribution differences, indicating that serious inconsistencies within the battery pack may affect the conditions of other batteries.

[0117] Table 1 Different thresholds and weights for offline detection inconsistency evaluation

[0118]

[0119]

[0120] Table 1 shows different thresholds and weights for inconsistency evaluation across different vehicles. When the inconsistency scores are densely distributed, the threshold is lower, and when the inconsistency scores are sparsely distributed, the threshold is higher. This shows that the present invention fully considers the variation of inconsistency due to battery usage conditions of different vehicles. In addition, the adaptive weight selection minimizes the variance of the comprehensive score and improves the accuracy of inconsistency evaluation. The results of offline detection are verified using actual voltage, such as Figure 6 As shown, the results show that the actual voltage of the single battery with overvoltage or undervoltage is consistent with the results of the single battery detected by the offline detection method of the present invention, which proves the accuracy of the present invention in offline detection.

[0121] Table 2 Comparison of offline inconsistency detection results of different methods

[0122]

[0123] Table 3 Online inconsistency detection sliding window selection

[0124]

[0125]

[0126] Table 4 Online inconsistency detection results

[0127]

[0128] In order to further verify the reliability of the method of the present invention, three detection methods were used to conduct comparative experiments with the method proposed in the present invention using the same data set, and the results are shown in Table 2. The detection method of Z-score is very effective in detecting prominent global inconsistencies. For example, in vehicle 1 in Table 4, it marks that single battery 89 is inconsistent, demonstrating the effectiveness of this method in identifying large-scale inconsistencies. However, its sensitivity to local fluctuations is limited. For example, in vehicle 2 in Table 4, Z-score identifies single battery 11 as inconsistent, while the detection result of other methods is single battery 39. In contrast, One-Class SVM performs well in detecting local inconsistencies. It identifies some or all inconsistent single batteries in each vehicle, indicating a high sensitivity to small fluctuations. However, One-Class SVM may also produce too many abnormal signs, as shown in vehicles 4 and 7 in Table 4, where multiple local inconsistencies are detected. This may lead to an increased risk of false positives and complicate the interpretation of the results. The Shannon entropy method tends to over-detect anomalies, identifying more inconsistencies in vehicles 1 to 9 than other methods. This behavior suggests that Shannon entropy may misclassify small inconsistencies, which may distort the assessment of battery health and thus affect the work of lithium-ion battery recycling.

[0129] In contrast, the fusion method proposed in the present invention takes advantage of the advantages of both the Z-score and One-Class SVM methods. It captures global inconsistencies identified by the Z-score, for example, anomaly 89 in vehicle 1, as shown in Table 4, while also detecting local fluctuations marked by the One-Class SVM. The threshold in this method is dynamically adjusted to account for the unique degree of inconsistency of each single cell. For another example, in vehicle 5, the consistency of the single cells is generally high and no obvious inconsistency is detected. Compared with other methods, the proposed fusion method shows higher accuracy in verifying the actual voltage data, effectively reduces misclassification, and provides more accurate and robust inconsistency detection.

[0130] like Figure 7 As shown, the inconsistent cells detected by different methods are compared with the number of overvoltage and undervoltage cells in the actual voltage data. Although the battery management system marks cells 62 and 63 in vehicle 5 as undervoltage, the proposed method sets a higher threshold by considering the overall inconsistent distribution of all cells, so these batteries are not classified as inconsistent. This shows that the proposed method has strong robustness and accuracy in detecting inconsistencies. Compared with other methods, this method not only improves the detection accuracy, but also significantly reduces the false alarm rate, effectively reducing the risk of misclassification due to small fluctuations. This provides a more reliable basis for accurately assessing the health of batteries.

[0131] The key to online inconsistency detection lies in the selection of sliding windows. Smaller sliding windows respond faster to data changes and improve the real-time performance of the system, while larger sliding windows smooth short-term fluctuations and provide more stable detection results. In order to determine the optimal sliding window size, the present invention compares the effects of different window sizes on the inconsistency detection accuracy of lithium-ion single cells. The results shown in Table 3 show that window sizes between 2 and 8 lead to false judgments by capturing short-term voltage fluctuations, erroneously indicating that the inconsistency between batteries is high. Window sizes between 10 and 14 did not lead to misjudgments, indicating that this range effectively captures persistent inconsistency issues while minimizing the impact of short-term fluctuations. Although window sizes between 16 and 26 do not lead to misjudgments, longer calculation times may affect real-time performance. Based on these results, a sliding window size of 10 provides the best balance between calculation time and detection accuracy.

[0132] Therefore, in practical applications, it is recommended to set the sliding window size to 10 time points and the sliding step size to 1 to ensure the real-time and accuracy of detection. At each time point, the latest data enters the window, and the oldest data is deleted, keeping the window size unchanged. Within each real-time sliding window, the inconsistency score of each single cell is calculated using Z-score and One-Class SVM. In order to calculate the final inconsistency score, an adaptive weight optimization method integrates multiple detection indicators. Then a dynamic threshold method based on the interquartile range is applied to determine whether the single cell is judged to be inconsistent. If the comprehensive score of the single cell at all time points in the current window exceeds the threshold, an alarm is triggered.

[0133] Table 4 gives the detailed information of the cells whose inconsistent faults are detected by online detection within a specific time window, including the threshold and weight. Figure 8 This is the online monitoring verification result based on real battery voltage data. Figure 8 As shown in (a), within the fault window of 1-11, the inconsistency score of single battery 89 in vehicle 1 exceeded the threshold, indicating an inconsistent fault. Due to changes in vehicle condition and mileage, the battery was detected as inconsistent in the first time window, indicating that it had already shown abnormal characteristics in previous use. The optimal weights at this time are 0.4287 and 0.5713, respectively, and the corresponding threshold is 0.4298, indicating that the inconsistency scores of other single batteries are relatively low, and only single battery 89 shows significant inconsistency. Figure 8(b) shows that the single cell 39 in vehicle 2 also has an inconsistent fault within the fault window of 12-22, which shows that the proposed method is effective in detecting the inconsistency of single cells under different vehicles and operating conditions. Figures 8(c)-8(o) are the online inconsistency verification results of the batteries of vehicles 3-9. The verification results of the real battery voltage data are consistent with the detection results in Table 4.

[0134] Comparison of the test results from nine vehicles with the actual battery voltage verification results shows the wide applicability of the invention across different vehicles and conditions, providing valuable insights for further analysis and action. Comparison of the online test results with the offline test results shows that the online test can accurately trigger inconsistent fault warnings. These warnings are consistent with the cells identified as overvoltage or undervoltage by the battery management system in the actual battery voltage. This confirms the accuracy and reliability of the invention and highlights the practical advantages of real-time evaluation. Unlike offline detection methods, online inconsistency evaluation can continuously monitor the battery status, allowing immediate response to anomalies and ensuring safe and efficient operation of the battery pack. This approach not only extends the battery life and improves performance, but also reduces maintenance costs, which is particularly important for electric vehicles and energy storage systems.

[0135] The present invention aims at the inconsistency problem of lithium-ion single cells and proposes an online and offline inconsistency detection method for lithium-ion power batteries based on the fusion of Z-score and One-Class SVM. The present invention adopts the voltage ratio between the single cell and the battery pack as a feature to ensure the consistency of the voltage scale. Z-score detects data points that deviate significantly from the overall average, while One-Class SVM detects local anomalies in the data distribution. The inconsistent evaluation results of the two methods are then combined, and the fusion weights are optimized by minimizing the variance to obtain the final inconsistency score. Subsequently, a dynamic threshold based on the interquartile range is adopted, so that the present invention can more effectively identify inconsistent single cells in the vehicle. In the embodiment, offline and online experiments using real voltage data of 9 electric vehicles show that compared with other methods, this method more accurately detects inconsistent lithium-ion batteries in electric vehicles. This method significantly improves the efficiency of lithium battery recycling and improves the safety of in-service batteries.

[0136] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, all of which belong to the protection scope of the present invention. The protection scope of the present invention is given by the attached claims and any equivalent technical solutions thereof.

Claims

1. A method for detecting inconsistency of lithium-ion power batteries online and offline, characterized in that: Combining Z-score and One-Class SVM algorithms, it includes online and offline inconsistency detection. The steps of offline inconsistency detection are as follows: Step A1: Data loading and preprocessing, Step A1.1: Input the historical voltage data of the lithium battery. Step A1.2: Perform data preprocessing. If the duration of consecutive zero or missing values ​​is greater than or equal to 60 seconds, use linear interpolation to fill in the gaps. If the duration is less than 60 seconds, delete the abnormal data. Step A2: Calculate the ratio of the single cell voltage to the battery pack voltage. Step A3: Calculate the Z-score inconsistency score and the One-Class SVM-based inconsistency score respectively. Step A4: Calculate the final inconsistency score using an adaptive weighting algorithm based on variance minimization. Step A5: If the final inconsistency score is greater than the dynamic threshold, cascade utilization or disassembly and recycling is performed; The steps of online inconsistency detection are as follows: Step B1: Initialize the sliding window W and receive real-time voltage data. Step B2: Calculate the voltage ratio of the single cell to the battery pack and set the sliding step size. Step B3: Calculate the Z-score inconsistency score and the One-Class SVM-based inconsistency score respectively. Step B4: Calculate the final inconsistency score using an adaptive weighting algorithm based on variance minimization, Step B5: If the score is greater than the dynamic threshold, an alarm is issued; if the data has been transmitted, the process ends; otherwise, continue to process the data of the next window.

2. A lithium-ion power battery online and offline inconsistency detection method according to claim 1, characterized in that: The offline inconsistency detection steps are as follows: Step A1: Data loading and preprocessing, Step A1.1: Input the historical voltage data of the lithium-ion battery, V celli and V pack ; Step A1.2: The missing values ​​NaN and 0 in the data set are processed differently according to the length of time they appear continuously: In order to avoid the influence of abnormal values ​​or 0 values ​​in the data on the detection results, if the length of time of continuous zero values ​​or missing values ​​is greater than 1, the linear interpolation method (1) is used to fill them, or the abnormal data is deleted, and the complete voltage ratio data set is recorded as D clean ; Wherein, V(i) represents the voltage value at time t(i), V(i-1) and V(i+1) are the known voltage values ​​at time t(i-1) and t(i+1); Step A2: Calculate the ratio of the single cell voltage to the battery pack voltage. in, is the voltage of single cell i, V pack is the voltage of the battery pack; Step A3: Process the battery voltage ratio data R i Formula (3) is used to calculate the inconsistency score of Z-score for subsequent algorithm combination; Among them, S Z-score is the inconsistency score output by Z-score, x ij is the observed value of the i-th j-th column sample, μ j is the mean of the samples in the jth column, σ j is the standard deviation of the samples in the jth column; Step A4: Use One-Class SVM to train the battery voltage ratio data. The model is based on the battery voltage ratio R i To identify anomalies; Step A4.1: The optimization objective function in model training is defined as formula (4), and the One-Class SVM parameters are set; Among them, ω is the normal vector of the hyperplane, which determines the direction of the separation boundary, ζ i is a slack variable, that is, abnormal data is allowed to exist, ρ is the offset, which represents the offset of the hyperplane, v controls the proportion of abnormal data allowed in the training set, and n is the number of training data; Step A4.2: When solving the above optimization problem, the One-Class SVM has the following constraints: ω·φ(x i )≥r-z i ,g i ≥0,i=1,2,...,n Among them, φ(x i ) is the input data x i High-dimensional feature representation after a certain mapping function φ; Step A4.3: The kernel function is the radial basis function (RBF), and its formula is as shown in formula (5); K(x,x′) = exp(-γ||x - x′|| 2 ) Equation (5) Among them, K(x,x′) is the kernel function value between samples x and x′, ||xx′|| 2 represents the square of the Euclidean distance between samples x and x′, γ is the parameter of the RBF kernel, which controls the influence range of the kernel function; Step A4.4: After the training is completed, the One-Class SVM uses the decision function to classify the new data point to determine whether the new data point is abnormal, as shown in formula (6); Among them, S′ OCSVM is the inconsistency score output by One-Class SVM, a i It is the Lagrange multiplier that determines the influence of the support vector on the classification decision, K(x,x i ′) is the current data point x and the support vector x i ′The kernel function value between Step A4.5: In order to combine the anomaly detection results of Z-score and eliminate the differences in dimensions, the inconsistent scores of One-Class SVM are normalized by formula (7); Among them, S OCSVM is the normalized inconsistency score, S′ MAX and S′ min are the maximum and minimum values ​​among all the inconsistency scores, respectively; Step A5: The final inconsistency evaluation is performed by weighted combination of the normalized One-Class SVM and Z-score inconsistency scores; the combined inconsistency score is calculated using the optimized adaptive weights, and the higher the fusion score, the higher the degree of inconsistency; the calculation process is summarized as follows: S=ω1S Z-score +ω2S OCSVM Formula (8) The weights ω1 and ω2 are determined by minimizing the variance of the combined score, ensuring the balance of the contributions of the two algorithms and the minimum score fluctuation; the optimization process is shown in formula (9); Among them, S is the final inconsistency score, ω1 and ω2 are algorithm weights, is the minimum value of variance; Step A6: For each single battery, the interquartile range is calculated by formula (10) to determine the dynamic threshold, and whether the battery is inconsistent is determined by the threshold; IQR=Q3-Q1, θ upper = Q3 + 1.5·IQR Equation (10) Among them, Q1 is the 25% percentile position of the data, Q3 is the 75% percentile position of the data, and θ upper is the dynamic threshold; Step A7: Outputting the serial numbers of the inconsistent batteries for subsequent recycling of lithium-ion batteries; The steps of the online inconsistency detection part are as follows: Step B1: Initialize the sliding window and set the optimal sliding window according to the results of the comparative experiment; Step B2: input the real-time data transmitted by the lithium battery management system into formula (2) to calculate the voltage ratio; Step B3: Set the sliding step size and start sliding the window; Step B4: Calculate the inconsistency score of the Z-score for the voltage ratio data in the current window using formula (3); Step B5: Calculate the inconsistency score of One-Class SVM through equations (4), (5), (6) and (7); Step B6: Combine the Z-score and One-Class SVM calculated in the current window through formula (8), and optimize the algorithm weight through formula (9) to obtain the final inconsistency score; Step B7: Calculate the threshold value by formula (10) to determine whether there is a single battery with an inconsistent score exceeding the threshold value in the current window. If so, issue an early warning and slide the window; if not, continue sliding the window for monitoring; Step B8: When the real-time data is no longer transmitted, the detection ends.

3. A lithium-ion power battery online and offline inconsistency detection method according to claim 1, characterized in that: The power battery is a lithium-ion power battery for new energy electric vehicles. The connection between the batteries is series-parallel, and the historical voltage data includes the instantaneous voltage, discharge voltage, and charging voltage of the single battery during operation. The real-time voltage data is transmitted in real time by the battery management system for voltage analysis and processing during online detection.