A lithium battery fault diagnosis method based on multi-scale flow improved local outlier factor

By employing a multi-scale streaming processing framework and an improved local outlier factor algorithm, combined with time-adaptive normalization and dynamic time warping, the inefficiency and false alarm problems in concurrent diagnosis of multiple faults in lithium batteries are solved, achieving highly sensitive fault detection and accurate early warning.

CN122109891APending Publication Date: 2026-05-29KUNMING UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
KUNMING UNIV OF SCI & TECH
Filing Date
2026-04-27
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing lithium battery fault diagnosis technologies suffer from low efficiency in diagnosing multiple concurrent faults, missed detection of continuous abnormal signals, insufficient generalization ability of static models, and low efficiency in multi-scale streaming feature fusion, making it difficult to achieve accurate location and early warning of lithium battery faults.

Method used

By constructing a multi-scale streaming processing framework and employing an improved local outlier factor algorithm (MS-RILOF), combined with time adaptive normalization and dynamic time warping (DTW), lithium battery fault diagnosis is performed. This approach integrates voltage, rate of change, kurtosis, and residual features to dynamically adapt to complex operating conditions and improve the accuracy of concurrent multi-fault diagnosis.

Benefits of technology

It achieves highly sensitive parallel detection of various faults in lithium batteries, such as early internal short circuits and performance degradation, dynamically tracks changes in operating conditions, suppresses false alarms due to collective fluctuations, improves robustness and real-time performance in complex environments, and provides reliable safety warnings and maintenance methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122109891A_ABST
    Figure CN122109891A_ABST
Patent Text Reader

Abstract

The application discloses a lithium battery fault diagnosis method based on a multi-scale flow improved local outlier factor, and belongs to the field of battery management technology fault diagnosis. The method first collects battery operation data from a big data platform, extracts voltage, voltage change rate, voltage kurtosis and voltage residual after cleaning to form a four-dimensional feature matrix; then a multi-scale sliding window flow processing framework is constructed, and an improved local outlier factor abnormal score is calculated in parallel on multiple time scales; based on the super threshold value distribution fitting, a global threshold value is determined, and a dynamic joint threshold value is formed in combination with a time guardrail mechanism to realize online fault judgment; a dynamic time warping (DTW) distance is introduced to measure the voltage trajectory difference between the fault monomer and the reference monomer, and the fault degree is quantitatively evaluated. The application can realize real-time detection with high precision under complex working conditions and multi-fault concurrent scenes, reduce fault exposure time, improve identification accuracy, and provide reliable support for power battery system safety warning and intelligent operation and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fault diagnosis in battery management technology, and in particular to a lithium battery fault diagnosis method based on multi-scale flow cytometry to improve local outlier factors. Background Technology

[0002] As the large-scale application of electric vehicles deepens, the accuracy and timeliness of fault diagnosis for power battery systems have become core challenges restricting the industry's safe development. Lithium-ion batteries involve multi-physical field coupling processes such as electrochemical reactions and thermal conduction, and their fault evolution exhibits complex characteristics of multi-stage progression and strong coupling of multiple factors. If accurate location and early warning cannot be achieved in the nascent stage of a fault, it will not only lead to a sharp decline in battery performance but may also trigger a chain of safety risks such as thermal runaway, fire, and explosion, posing a serious threat to the lives of passengers and public property. Currently, the mainstream fault diagnosis technologies in the industry can be divided into three categories: statistical analysis-based, battery model-based, and data-driven methods. Among them, the statistical analysis-based method is based on data such as voltage, current and temperature collected by sensors, and identifies anomalies through statistical indicators such as entropy analysis and correlation coefficient calculation. However, its ability to extract features of nonlinear and high-dimensional battery systems is limited, and it is difficult to cope with scenarios with multiple concurrent faults. The battery model-based method realizes diagnosis by constructing physical or electrochemical models to calculate the residual between theoretical output and actual output. However, its effectiveness is highly dependent on the accuracy of the model, and its adaptability to dynamic factors such as battery aging and degradation and fluctuations in complex operating conditions is obviously insufficient.

[0003] In recent years, relying on the rapid development of in-vehicle big data platforms, data-driven fault diagnosis methods, leveraging the advantages of machine learning and deep learning algorithms, have demonstrated engineering application potential in real-time condition monitoring and fault identification. However, existing technologies still suffer from three key shortcomings that urgently need to be addressed. First, while most algorithms perform well in diagnosing single faults such as internal short circuits, lithium plating, and connection anomalies, they struggle to effectively distinguish the coupling and superposition effects between multiple faults, leading to low efficiency in concurrent fault diagnosis. Second, traditional outlier detection algorithms are prone to missed detections when processing adjacent or consecutively occurring abnormal signals due to overlapping time windows or feature confusion, affecting the timeliness of early fault identification. Third, existing methods often employ fixed thresholds or static rules, failing to fully incorporate dynamic parameters such as battery state of health (SOH), ambient temperature, and load changes, resulting in insufficient generalization ability of diagnostic models under complex operating conditions. Furthermore, the low efficiency of multi-scale feature fusion in real-time streaming data and the weak correlation analysis between local anomalies and the overall battery operating state further restrict the reliability of early fault identification. Developing a novel fault diagnosis method that can integrate multi-scale flow characteristics, dynamically adapt to complex operating conditions, and significantly improve the accuracy of concurrent multi-fault diagnosis has become an urgent need in the field of power battery safety. Summary of the Invention

[0004] To address the problems of difficulty in diagnosing multiple concurrent faults, missed detection of continuous abnormal signals, insufficient generalization ability of static models, and low efficiency in fusing multi-scale streaming cytometry features in existing technologies, this invention provides a lithium battery fault diagnosis method based on multi-scale streaming cytometry to improve local outlier factors.

[0005] To achieve the above technical solution, the specific steps are as follows:

[0006] S1. Collect vehicle battery system operation data through a big data platform;

[0007] The vehicle battery system includes: the battery systems of normal vehicles and vehicles that have previously experienced fault alarms;

[0008] The fault types include: voltage faults;

[0009] The voltage faults include: overvoltage, undervoltage, and rapid voltage change of individual battery cells;

[0010] The battery system's operating data includes: vehicle ID, sampling time, voltage of each individual cell, total voltage of the battery pack, highest voltage of each individual cell, lowest voltage of each individual cell, SOC, and total current.

[0011] S2. Perform data cleaning on the collected battery system operating data to generate a high-quality voltage dataset;

[0012] The data cleaning operations include: time series normalization, wavelet denoising, interpolation completion, and signal smoothing.

[0013] S3. Based on a high-quality voltage dataset, the voltage change rate, voltage kurtosis, and voltage residual features are calculated and then concatenated according to individual dimensions to form a four-dimensional feature vector.

[0014] S4. Common-mode suppression is performed on the original voltage features, while the three derived features of voltage change rate, voltage kurtosis and voltage residual remain unchanged. Time-adaptive normalization is adopted to construct a multi-scale sliding window streaming processing framework. The improved MS-RILOF score is calculated in streaming mode on three time scales of 120, 240 and 480 to obtain the multi-scale fused anomaly score matrix.

[0015] S5. Input the multi-scale fusion anomaly score matrix, calculate the battery representative score, obtain the global threshold based on the over-threshold distribution (POT) fitting, combine it with the time guardrail threshold to make a single-cell fault judgment, and introduce the dynamic time warping (DTW) distance to quantitatively evaluate the fault degree of the faulty battery, output the DTW distance of the faulty battery, and complete the lithium battery fault diagnosis method.

[0016] As a preferred embodiment of the present invention, step S2 includes the following steps:

[0017] S2.1 Time series normalization: Based on the collected operating data of the battery system, the voltage of individual cells is analyzed, the timestamp is parsed, and the normalized voltage time series is obtained.

[0018] The timestamp parsing specifically involves parsing the original timestamp sequence into a strictly monotonic time sequence, removing unparseable and missing items, and rearranging them in ascending order of time.

[0019] S2.2 Based on the normalized voltage time series, wavelet denoising is performed, noise is estimated based on the highest frequency detail subband and soft thresholding is applied to shrink it, and then linear interpolation is used to fill the missing data within the preset range to obtain the denoised voltage time series. Savitzky-Golay smoothing is performed on the denoised voltage series to generate a high-quality voltage dataset.

[0020] The expression for performing wavelet denoising is as follows:

[0021]

[0022] In the formula, This is the level 1 detail coefficient; for Wavelet decomposition / reconstruction operators; Decomposition layer number; These are approximate coefficients; For the first Layer detail factor; Estimation of noise standard deviation; This is the threshold scaling factor; This represents the number of non-missing samples for that single entity. This is the voltage after noise reduction; Represents any wavelet coefficient.

[0023] This invention uses linear interpolation to fill missing data for frames less than five, uses forward / backward padding to fill boundaries, and performs Savitzky-Golay smoothing on the denoised voltage sequence.

[0024] As a preferred embodiment of the present invention, the rate of change of voltage is calculated for each individual voltage sequence, defined as the ratio of the difference between the beginning and end of the window to the window length. The specific expression for the voltage rate of change characteristic is as follows:

[0025]

[0026] In the formula, This represents the voltage value at the current moment; t-1 represents the previous sampling time. This indicates the voltage value at the previous moment; Indicates the time interval (unit: seconds).

[0027] As a preferred technical solution of the present invention, the rolling kurtosis of each individual voltage sequence is calculated using a robust implementation of a centered and normalized fourth moment minus 3. The specific expression of the voltage kurtosis feature is as follows:

[0028]

[0029] In the formula, Indicates a single voltage value; This represents the average voltage. This represents the number of voltage sampling points contained in the current sliding window; for The index; where subtracting 3 is to make the kurtosis of the normal distribution zero.

[0030] As a preferred embodiment of the present invention, for each individual voltage sequence, its residual relative to the common-mode voltage is calculated, defined as the difference between the current voltage value and the median voltage of all individuals at that time. The specific expression for the voltage residual characteristic is as follows:

[0031]

[0032] In the formula, Indicates the first One battery in Voltage residual at time; Indicates the first One battery in The voltage value at that moment; This indicates the median operation; This represents the total number of batteries. Subtracting the common-mode voltage can effectively suppress systemic fluctuations and highlight individual cell-specific anomalies.

[0033] As a preferred technical solution of the present invention, the voltage rate of change kurtosis and residuals The dimension is obtained by concatenating the individual dimensions. The three-channel feature tensor, of which For time frame count, This refers to the number of batteries.

[0034] As a preferred technical solution of the present invention, common mode suppression is performed on the feature tensor, and the median of the individual units at the sample time is used as the common mode and is removed.

[0035] As a preferred embodiment of the present invention, step S4 includes the following steps:

[0036] S4.1 Based on the four-dimensional feature vector, perform multi-scale time window division and in-window standardization to obtain standardized three-level time window scale data;

[0037] The three time window scales are 120, 240, and 480 time frames, respectively.

[0038] The data within the window is standardized. Within each sliding window, the four-channel features of original voltage, voltage rate of change, voltage kurtosis, and voltage residual are standardized. StandardScaler is used to adjust the feature mean to 0 and the variance to 1 to eliminate the influence of dimensions, outputting the standardized multi-scale window data. The calculation expression for standardization within the window is as follows:

[0039]

[0040] In the formula, These are the original eigenvalues. This is the arithmetic mean of all samples of this feature within the sliding window, used to characterize the center position of the data. The standard deviation of this feature within the window is used to characterize the dispersion of the data.

[0041] S4.2 Input the standardized three-level time window scale data, and output the normalized three-level time window scale data through the time adaptive normalization module;

[0042] To further enhance the algorithm's adaptability to different operating conditions, this invention introduces a time-adaptive normalization module. This module dynamically corrects the current features based on the mean and standard deviation of normal battery data in the historical window, eliminating the overall feature distribution shift caused by changes in operating conditions. The time-adaptive normalization formula is:

[0043]

[0044] In the formula, for The feature vector at time step; for The median estimate of the characteristics of a normal battery at any given time. for Robust estimates of the median absolute deviation (MAD) of normal battery characteristics at any given time are typically converted to a standard deviation estimate by multiplying MAD by 1.4826.

[0045] S4.3 Based on the normalized three-level time window scale data, the improved local outlier factor ILOF algorithm score calculation is used to output the improved local outlier factor scores at three scales.

[0046] The improved Local Outlier Factor (ILOF) algorithm score calculation includes: calculating the feature space distance, determining... Nearest neighbor region, calculate local reachability density and calculate ILOF score;

[0047] The present invention improves the ILOF (Local Outlier Factor) algorithm calculation; it introduces a numerical smoothing factor and a reachability distance smoothing mechanism to enhance resistance to noise.

[0048] The specific steps include:

[0049] S4.3.1 Calculate the feature space distance using Euclidean distance; measure the distance between objects using Euclidean distance. and The absolute difference in the feature space, the formula for calculating the distance in the feature space is:

[0050]

[0051] in, and They are objects and object The 1 eigenvalue, The total number of features.

[0052] S4.3.2, Determine Nearest neighbor region; set the number of nearest neighbors object of Distance d k (x) is its number up to the... Distance between nearest neighbors; objects of Nearby Neighborhood Defined as:

[0053]

[0054] In the formula, D represents the dataset within the current window.

[0055] S4.3.3 After calculating the reachable distance by smoothing local density fluctuations and taking the maximum value, calculate the local reachable density;

[0056] First, the reachable distance is calculated to smooth local density fluctuations, defined as follows: By taking the maximum value, the interference of a few extremely close points in the nearest neighborhood on the overall density is reduced. Then, the locally reachable density is calculated. And introduce a smoothing factor Enhanced numerical robustness objects The locally attainable density is its The local reachability density is calculated using the reciprocal of the average reachability distance of the nearest neighbors, as shown in the following formula:

[0057]

[0058] In the formula, Given a pre-defined, minimal constant; locally attainable density It intuitively reflects the object The density of the surrounding area; the lower the density, the greater the likelihood of an anomaly.

[0059] S4.3.4, Based on feature space distance ILOF score is calculated using the nearest neighbor neighborhood and local reachability density;

[0060] The final improved local outlier factor (ILOF) score is for the object. The ILOF score is calculated by taking the ratio of the average local reachability density of a neighborhood to its own local reachability density.

[0061]

[0062] Among them, an ILOF score greater than 1 indicates that the object If the local density of an object is lower than the average local density of its neighboring objects, it suggests that the object may be an outlier; the higher the score, the more significant the anomaly.

[0063] S4.4. Improve the local outlier factor score based on three scales. Obtain the multi-scale fused anomaly score matrix through multi-scale score weighted fusion and smoothing.

[0064] Multi-scale score fusion: The ILOF scores calculated for each scale window are fused using a weighted averaging strategy, assigning different weights to different time scales. The weights are dynamically adjusted based on the signal-to-noise ratio of the features at each scale. The weighted fusion formula is as follows:

[0065]

[0066] In the formula, For the first ILOF score matrix at each scale, The fusion weights are the corresponding scales, and satisfy the following conditions: , For scale quantity.

[0067] As a preferred embodiment of the present invention, step S5 includes the following steps:

[0068] S5.1 To comprehensively characterize the degree of anomaly of the battery throughout the entire observation period, a stable representative value needs to be extracted from the time-series anomaly score. This invention calculates the time-series anomaly score for each battery j. The 95th percentile is used as its representative score. The formula for calculating the battery's representative fraction is as follows:

[0069]

[0070] In the formula, Indicates battery The representative score is used to characterize the overall anomaly level of the battery over the complete observation period; It is a battery At any moment Multi-scale fusion of ILOF anomaly scores; This represents the total number of time frames. This represents the 95th percentile operation function.

[0071] S5.2 Based on the representative score of the battery, select the over-threshold data and fit it with the generalized Pareto distribution (GPD) and calculate the global fault threshold based on the fitted GPD, and output the global fault detection threshold.

[0072] The specific steps include the following:

[0073] S5.2.1 Based on the representative score of the battery, select the over-threshold data and fit it with the generalized Pareto distribution (GPD), and output the basic threshold, shape parameter, scale parameter and the fitted GPD distribution;

[0074] This invention employs a super-threshold distribution method to perform tail fitting on representative scores of normal batteries; a base threshold is selected. (Typically, the fraction represented by a normal battery) After reaching a higher quantile (such as the 85th quantile), the excess data... (in The generalized Pareto distribution is fitted. The specific formula for the fitted GPD distribution is as follows:

[0075]

[0076] In the formula, This represents the excess amount, that is, the portion of the sample value that exceeds the baseline threshold u; For shape parameters; The scale parameter controls the degree of dispersion of the distribution.

[0077] This invention uses the maximum likelihood estimation method to fit the distribution parameters. and This is done to maximize the likelihood function of the observed data, ensuring the accuracy and stability of parameter estimation.

[0078] S5.2.2 Calculate the significance level corresponding to the fitted GPD distribution. Global fault detection threshold Output the global fault detection threshold;

[0079] The specific expression for the global fault detection threshold is as follows:

[0080]

[0081] In the formula, This represents the global fault detection threshold, which is the primary standard for determining whether a battery is abnormal. The significance level is adjusted beyond probability, where It is a preset significance level used to control the false alarm rate; The score represents the base threshold. The empirical probability, This is an estimate of the probability exceeding the threshold; this threshold represents the value exceeding the tail distribution where the representative fraction of normal batteries follows a fitted pattern. The probability is approximately This provides a rigorous statistical basis for fault diagnosis.

[0082] S5.3 Based on the global fault detection threshold, a dynamically adjustable threshold is obtained by introducing a time-barrier threshold mechanism;

[0083] This invention introduces a time-based guardrail threshold mechanism; the specific formula for dynamically adjusting the threshold is as follows:

[0084]

[0085] In the formula, Indicates time The time-based guardrail threshold, i.e., the dynamically adjusted threshold; Indicates time All normal batteries scored abnormally. Quantiles reflect the upper limit of the abnormal level of the normal battery group at the current moment; To provide an additional protective buffer for the preset safety margin, this mechanism ensures that the threshold is dynamically adjusted. Always not lower than the global fault detection threshold When a brief disturbance in the system causes an abnormal increase in the overall score of the normal battery group, It will automatically adjust upwards, thus effectively preventing normal collective fluctuations from being misjudged as individual faults.

[0086] S5.4. Based on dynamic time warping, the fault degree is quantitatively evaluated, and the DTW distance of the faulty battery is output as an auxiliary evaluation index of the fault degree to complete the lithium battery fault diagnosis method.

[0087] The DTW distance formula for a faulty battery is as follows:

[0088]

[0089] In the formula, Indicates battery The DTW distance between the voltage sequence and the reference template sequence; Indicates the alignment path between two sequences; It is a battery At any moment The actual voltage value; It is a reference template at any time The voltage value.

[0090] Beneficial effects of the present invention

[0091] This invention constructs a four-dimensional feature system of voltage, rate of change, kurtosis, and residual, and combines a multi-scale sliding window with an improved ILOF algorithm to achieve highly sensitive parallel detection of various faults such as early internal short circuits and performance degradation. By introducing time-adaptive normalization and a POT-time guardrail dual-threshold mechanism, the system can dynamically track changes in operating conditions, effectively suppress false alarms due to collective fluctuations, and significantly improve robustness under complex operating environments. Employing a streaming processing framework and a multi-scale fusion strategy, it ensures real-time performance while capturing transient and trend anomalies. DTW distance quantification of fault severity forms a closed loop of "detection-judgment-evaluation," providing a reliable technical means for safety early warning and precise operation and maintenance of power battery systems. Attached Figure Description

[0092] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0093] Figure 1 This is a flowchart of the method of the present invention;

[0094] Figure 2 This is a schematic diagram of the method of the present invention;

[0095] Figure 3 This is a schematic diagram of the battery voltage-time curve after data processing by the cloud big data platform of this invention;

[0096] Figure 4 This is a schematic diagram of the multi-scale MS-RILOF fusion anomaly score and dynamic threshold of the present invention;

[0097] Figure 5This is a schematic diagram comparing the terminal voltage behavior of the reference cell and the faulty cell of the present invention. In this diagram, (a) is a comparison diagram of the smooth terminal voltage curves of the faulty battery during the same charging process, and (b) is a timing diagram of the voltage difference between the faulty battery and the reference battery.

[0098] Figure 6 This is a schematic diagram of the DTW distance distribution of each individual cell relative to the reference template cell. Detailed Implementation

[0099] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0100] Please see Figures 1-6 A lithium battery fault diagnosis method based on multi-scale flow cytometry to improve local outlier factors includes the following steps:

[0101] S1. Collect vehicle battery system operation data through a big data platform;

[0102] The vehicle battery system includes: the battery systems of normal vehicles and vehicles that have experienced voltage fault alarms;

[0103] The voltage faults include: battery cell overvoltage, battery cell undervoltage, and excessively rapid voltage changes;

[0104] The battery system's operating data includes: vehicle ID, sampling time, voltage of each individual cell, total voltage of the battery pack, highest voltage of each individual cell, lowest voltage of each individual cell, SOC, and total current.

[0105] S2. Perform data cleaning on the collected battery system operating data to generate a high-quality voltage dataset;

[0106] The data cleaning operations include: time series normalization, wavelet denoising, interpolation completion, and signal smoothing.

[0107] Due to the complex operating conditions, the collected data needs to be cleaned. This invention analyzes the voltage of individual cells, completes timestamp parsing, invalid time removal and sorting, performs wavelet denoising and interpolation completion on each individual cell voltage sequence, and smooths and generates a high-quality voltage dataset.

[0108] Specifically, the following steps are included:

[0109] S2.1 Time series normalization: Based on the collected operating data of the battery system, the voltage of individual cells is analyzed, the timestamp is parsed, and the normalized voltage time series is obtained.

[0110] This invention parses the original timestamp sequence into a strictly monotonic time series, removes unparseable and missing items, and rearranges them in ascending order of time;

[0111] S2.2 Based on the normalized voltage time series, wavelet denoising is performed, noise is estimated based on the highest frequency detail subband and soft thresholding is applied to shrink it, and then linear interpolation is used to fill the missing data within the preset range to obtain the denoised voltage time series. Savitzky-Golay smoothing is performed on the denoised voltage series to generate a high-quality voltage dataset.

[0112] This invention performs wavelet denoising on each individual voltage sequence, estimates noise based on the highest frequency detail subband, and applies soft thresholding.

[0113] The expression for performing wavelet denoising is as follows:

[0114]

[0115] In the formula, For the level 1 detail coefficients, for Wavelet decomposition / reconstruction operators; Decomposition layer number; These are approximate coefficients; For the first Layer detail factor; Estimation of noise standard deviation; This is the threshold scaling factor; This represents the number of non-missing samples for that single entity. This is the voltage after noise reduction; Represents any wavelet coefficient.

[0116] This embodiment uses a 10-second sampling interval from the power battery management system to fill in missing data for frames less than five using linear interpolation. Five frames correspond to an actual time span of 50 seconds. Within this range, the voltage changes of fault-free batteries are constrained by the electrochemical reaction mechanism, exhibiting continuous and smooth characteristics. The linear interpolation error can be controlled within ±0.01V, meeting the accuracy requirements for fault diagnosis. Forward / backward padding is used to fill in the boundaries, and the denoised voltage sequence is smoothed using Savitzky-Golay to generate a high-quality voltage dataset. Partially recorded data from the dataset constructed in this embodiment is shown in Table 1.

[0117] Table 1. Partial data from the constructed dataset.

[0118]

[0119] S3. Based on a high-quality voltage dataset, after calculating the voltage change rate, voltage kurtosis and voltage residual features, the features are concatenated according to the individual dimensions to form a four-dimensional feature vector.

[0120] Specifically, the following steps are included:

[0121] (1) Calculate the rate of change of voltage for each individual voltage sequence, which is defined as the ratio of the difference between the beginning and end of the window to the length of the window;

[0122] The expression for calculating the rate of change of voltage is:

[0123]

[0124] In the formula, This represents the voltage value at the current moment; t-1 represents the previous sampling time. This indicates the voltage value at the previous moment; Indicates the time interval (unit: seconds);

[0125] (2) Calculate the rolling kurtosis of each individual voltage sequence, using a robust implementation of the fourth moment minus 3 after centering and normalization;

[0126] The expression for calculating voltage kurtosis is:

[0127]

[0128] In the formula, Indicates a single voltage value; This represents the average voltage. This represents the number of voltage sampling points contained in the current sliding window; for The index; where subtracting 3 is to make the kurtosis of the normal distribution zero.

[0129] (3) For each individual voltage sequence, calculate its residual relative to the common-mode voltage, which is defined as the difference between the current voltage value and the median voltage of all individuals at that time;

[0130] The formula for calculating voltage residual is:

[0131]

[0132] In the formula, Indicates the first One battery in Voltage residual at time; Indicates the first One battery in The voltage value at that moment; This indicates the median operation; This represents the total number of batteries. Subtracting the common-mode voltage can effectively suppress systemic fluctuations and highlight individual cell-specific anomalies.

[0133] (4) Voltage rate of change kurtosis and residuals The dimension is obtained by concatenating the individual dimensions. The three-channel feature tensor, of which For time frame count, This refers to the number of batteries;

[0134] (5) Preferably, common-mode suppression is performed on the four-dimensional feature vector. The specific operation is as follows: For each sample time, the median of the original voltage values ​​of all individual cells at that time is calculated and used as the common-mode voltage; the common-mode voltage is subtracted from the original voltage features to obtain the updated voltage features, while the three derived features of voltage change rate, voltage kurtosis, and voltage residual remain unchanged. The core logic is that the common-mode voltage mainly reflects the overall fluctuations at the system level (such as the synchronous shift of all individual cell voltages caused by operating condition switching and changes in ambient temperature). By removing the common-mode voltage from the original voltage, systemic interference can be eliminated, and the physical meaning of the derived features can be avoided, thereby focusing more accurately on the abnormal features of the individual cells themselves.

[0135] S4. Common-mode suppression is performed on the original voltage features, while the three derived features of voltage change rate, voltage kurtosis and voltage residual remain unchanged. Time-adaptive normalization is adopted to construct a multi-scale sliding window streaming processing framework. The improved MS-RILOF score is calculated in streaming mode on three time scales of 120, 240 and 480 to obtain the multi-scale fused anomaly score matrix.

[0136] The specific steps are as follows:

[0137] S4.1 Based on the four-dimensional feature vector, perform multi-scale time window division and in-window standardization to obtain standardized three-level time window scale data;

[0138] The three time window scales are 120, 240, and 480 time frames, respectively.

[0139] This invention employs a three-tiered time window scale (120, 240, and 480 time frames) for multi-scale time window division. This scale is selected to closely match the multi-time-scale characteristics of lithium battery fault evolution. Combined with a sampling interval of 10 seconds / frame, 120 frames (20 minutes), 240 frames (40 minutes), and 480 frames (80 minutes) correspond to the typical evolution cycles of instantaneous fluctuation faults (such as voltage surges caused by poor contact), progressive degradation faults (such as the initial stage of internal short circuits and capacity decay), and long-term drift faults (such as consistency deterioration), respectively, enabling the complete capture of fault characteristics throughout the entire cycle. Simultaneously, this scale design balances real-time performance and detection accuracy. The 120-frame base scale ensures rapid response to instantaneous faults, the 240-frame intermediate scale balances the detection requirements of transient and progressive faults, and the 480-frame long-term scale focuses on trend anomalies to avoid misjudgment due to short-term operating condition disturbances. Furthermore, it is compatible with the data storage and transmission characteristics of the power battery management system (BMS) and the mainstream charge-discharge cycles in the industry. The signal-to-noise ratio of features such as voltage and voltage change rate is optimal at this three-level scale. Multi-scale fusion can effectively suppress noise interference at a single scale and significantly improve the discriminative power of anomaly scores. Multi-granularity sliding window analysis is performed on dynamic battery data; each window slides in a streaming manner, processing data point by point in time to ensure real-time performance.

[0140] The data within the window is standardized. Within each sliding window, the four-channel features of original voltage, voltage rate of change, voltage kurtosis, and voltage residual are standardized. StandardScaler is used to adjust the feature mean to 0 and the variance to 1 to eliminate the influence of dimensions, outputting standardized multi-scale window data. In this embodiment, a three-level time window is used. The calculation expression for standardization within the window is as follows:

[0141]

[0142] In the formula, These are the original eigenvalues. This is the arithmetic mean of all samples of this feature within the sliding window, used to characterize the center position of the data. The standard deviation of this feature within the window is used to characterize the dispersion of the data.

[0143] S4.2 Input the standardized three-level time window scale data, and output the normalized three-level time window scale data through the time adaptive normalization module;

[0144] To further enhance the algorithm's adaptability to different operating conditions, this invention introduces a time-adaptive normalization module. This module dynamically corrects the current features based on the mean and standard deviation of normal battery data in the historical window, eliminating the overall feature distribution shift caused by changes in operating conditions. The time-adaptive normalization formula is:

[0145]

[0146] In the formula, for The feature vector at time step; for The median estimate of the characteristics of a normal battery at any given time. for The robust estimate of the median absolute deviation (MAD) of normal battery characteristics at all times is usually converted to a standard deviation estimate by MAD × 1.4826; this module can effectively track the natural fluctuations of the system's normal operating state and ensure that the anomaly detection threshold matches the current operating conditions.

[0147] S4.3 Based on the normalized three-level time window scale data, the improved local outlier factor ILOF algorithm score calculation is used to output the improved local outlier factor scores at three scales.

[0148] The improved local outlier factor ILOF score calculation includes: calculating the feature space distance, determining... Nearest neighbor region, calculate local reachability density and calculate ILOF score;

[0149] The present invention improves the ILOF (Local Outlier Factor) algorithm calculation; it introduces a numerical smoothing factor and a reachability distance smoothing mechanism to enhance resistance to noise.

[0150] The specific steps include:

[0151] S4.3.1 Calculate the feature space distance using Euclidean distance; measure the distance between objects using Euclidean distance. and The absolute difference in the feature space is expressed by the formula:

[0152]

[0153] in, and They are objects and The 1 eigenvalue, The total number of features.

[0154] S4.3.2, Determine Nearest neighbor region; set the number of nearest neighbors In this embodiment Take 30, object of Distance d k (x) is its number up to the... Distance between nearest neighbors; objects of Nearby Neighborhood Defined as:

[0155]

[0156] In the formula, D represents the dataset within the current window.

[0157] S4.3.3 After calculating the reachable distance by smoothing local density fluctuations and taking the maximum value, calculate the local reachable density;

[0158] First, the reachable distance is calculated to smooth local density fluctuations, defined as follows: By taking the maximum value, the interference of a few extremely close points in the nearest neighborhood on the overall density is reduced. Then, the locally reachable density is calculated. And introduce a smoothing factor Enhanced numerical robustness objects The locally attainable density is its The local reachability density is calculated using the reciprocal of the average reachability distance of the nearest neighbors, as shown in the following formula:

[0159]

[0160] In the formula, In this embodiment, the constant is a preset, extremely small value. Values This is used to ensure numerical stability; locally reachable density It intuitively reflects the object The density of the surrounding area; the lower the density, the greater the likelihood of an anomaly.

[0161] S4.3.4, Based on feature space distance ILOF score is calculated using the nearest neighbor neighborhood and local reachability density;

[0162] The final improved local outlier factor (ILOF) score is for the object. The ILOF score is calculated by taking the ratio of the average local reachability density of a neighborhood to its own local reachability density.

[0163]

[0164] Among them, an ILOF score greater than 1 indicates that the object If the local density of an object is lower than the average local density of its neighboring objects, it suggests that the object may be an outlier; the higher the score, the more significant the anomaly.

[0165] S4.4. Improve the local outlier factor score based on three scales. Obtain the multi-scale fused anomaly score matrix through multi-scale score weighted fusion and smoothing.

[0166] Multi-scale score fusion: The ILOF scores calculated for each scale window are fused using a weighted averaging strategy, assigning different weights to different time scales. The weights are dynamically adjusted based on the signal-to-noise ratio of the features at each scale. The weighted fusion formula is as follows:

[0167]

[0168] In the formula, For the first ILOF score matrix at each scale, The fusion weights are the corresponding scales, and satisfy the following conditions: , For the scale quantity, in this embodiment Weighted fusion can comprehensively utilize the advantages of information at different scales, thereby improving the robustness of detection.

[0169] Smoothing: The fusion score is smoothed by applying a Savitzky-Golay filter to eliminate short-term fluctuations; this filter is based on local polynomial fitting and preserves the signal trend.

[0170] S5. Input the multi-scale fusion anomaly score matrix, calculate the battery representative score, obtain the global threshold based on the over-threshold distribution (POT) fitting, combine it with the time guardrail threshold to make a single-unit fault judgment, and use the DTW distance to quantify the fault degree of the faulty battery, and output the DTW distance of the faulty battery.

[0171] S5.1 Based on the multi-scale fusion anomaly score matrix, the representative score of the battery is obtained by calculating the representative score of the battery;

[0172] To comprehensively characterize the degree of anomaly of a battery throughout the entire observation period, a stable representative value needs to be extracted from the time-series anomaly score; this invention calculates the time-series anomaly score for each battery j. The 95th percentile is used as its representative score. The formula for calculating the battery's representative fraction is as follows:

[0173]

[0174] In the formula, Indicates battery The representative score; used to characterize the overall anomaly level of the battery over the complete observation period; It is a battery At any moment The multi-scale fusion ILOF anomaly score integrates anomaly information from multiple feature dimensions, including voltage, voltage rate of change, voltage kurtosis, and voltage residual. The total number of time frames represents the total length of the observation period. The 95th percentile operation function can effectively capture periods of high abnormal performance of batteries by extracting the upper tail features of abnormal score sequences.

[0175] S5.2 Based on the representative score of the battery, select the over-threshold data and fit it with the generalized Pareto distribution (GPD) and calculate the global fault threshold based on the fitted GPD, and output the global fault detection threshold.

[0176] Over-threshold (POT) distribution fitting and global threshold calculation; representative score set based on normal batteries. The over-threshold distribution method is adopted;

[0177] The specific steps include the following:

[0178] S5.2.1 Based on the representative score of the battery, select the over-threshold data and fit it with the generalized Pareto distribution (GPD), and output the basic threshold, shape parameter, scale parameter and the fitted GPD distribution;

[0179] This invention employs a super-threshold distribution method to perform tail fitting on representative scores of normal batteries; a base threshold is selected. (Typically, the fraction represented by a normal battery) After reaching a higher quantile (such as the 85th quantile), the excess data... (in The generalized Pareto distribution is fitted. The specific formula for the fitted GPD distribution is as follows:

[0180]

[0181] In the formula, This represents the excess amount, that is, the portion of the sample value that exceeds the baseline threshold u; The shape parameter determines the tail characteristics of the distribution. The time distribution has a heavy-tailed property, making it suitable for describing extreme events; The scale parameter controls the degree of dispersion of the distribution.

[0182] This invention uses the maximum likelihood estimation method to fit the distribution parameters. and This is done to maximize the likelihood function of the observed data, ensuring the accuracy and stability of parameter estimation.

[0183] S5.2.2 Calculate the significance level corresponding to the fitted GPD distribution. Global fault detection threshold Output the global fault detection threshold;

[0184] The specific expression for the global fault detection threshold is as follows:

[0185]

[0186] In the formula, This represents the global fault detection threshold, which is the primary standard for determining whether a battery is abnormal. The significance level is adjusted beyond probability, where It is a preset significance level used to control the false alarm rate; The score represents the base threshold. The empirical probability, This is an estimate of the probability exceeding the threshold; this threshold represents the value exceeding the tail distribution where the representative fraction of normal batteries follows a fitted pattern. The probability is approximately This provides a rigorous statistical basis for fault diagnosis.

[0187] S5.3 Based on the global fault detection threshold, a dynamically adjustable threshold is obtained by introducing a time-barrier threshold mechanism;

[0188] To enhance the system's robustness in responding to instantaneous operating disturbances and collective fluctuations, and to avoid false alarms, this invention introduces a time-barrier threshold mechanism; the specific formula for dynamically adjusting the threshold is as follows:

[0189]

[0190] In the formula, Indicates time The time-based guardrail threshold, i.e., the dynamically adjusted threshold; Indicates time All normal batteries scored abnormally. Quantiles reflect the upper limit of the abnormal level of the normal battery group at the current moment; To provide an additional protective buffer for the preset safety margin, this mechanism ensures that the threshold is dynamically adjusted. Always not lower than the global fault detection threshold When a brief disturbance in the system causes an abnormal increase in the overall score of the normal battery group, It will automatically adjust upwards, thus effectively preventing normal collective fluctuations from being misjudged as individual faults.

[0191] Safety margin in this embodiment The setting is based on the following: considering the inherent measurement noise (±5mV level) of the onboard BMS voltage acquisition sensor and the permissible inconsistency in aging between battery cells, after multi-scale streaming characteristic transformation, these normal fluctuations will manifest as a base noise of approximately 0.2 in the abnormal score space. If no safety margin is set or the margin is too small, the dynamic threshold will overfit the envelope of a normal battery pack, causing normal sensor jitter or minor operating condition fluctuations to trigger false alarms. It can effectively build a fault-tolerant buffer, ensuring that the system only responds to structural anomalies that significantly exceed background noise and normal statistical fluctuations, thereby greatly reducing the false alarm rate while ensuring a high detection rate.

[0192] S5.4. Based on dynamic time warping, the fault degree is quantitatively evaluated, and the DTW distance of the faulty battery is output as an auxiliary evaluation index of the fault degree to complete the lithium battery fault diagnosis method.

[0193] To quantitatively assess the anomaly severity of faulty batteries, Dynamic Time Warping (DTW) distance is introduced as an auxiliary evaluation index. This method objectively reflects the degree of voltage curve distortion of faulty batteries by calculating the morphological differences between the voltage sequences of each battery and the reference template sequence. The formula for the DTW distance of a faulty battery is as follows:

[0194]

[0195] In the formula, Indicates battery The DTW distance between the voltage sequence and the reference template sequence; This represents the alignment path between two sequences, which satisfies boundary conditions, continuity, and monotonicity constraints. It is a battery At any moment The actual voltage value; It is a reference template at any time The voltage value. DTW distance finds the optimal alignment path through dynamic programming, effectively solving the problem of scaling and distortion of time series on the time axis, accurately capturing the morphological differences of voltage curves, and reflecting the fault degree of individual cells.

[0196] Specifically, in this embodiment, voltage and time data of vehicle No. 7 during the charging and discharging process were obtained from a cloud-based big data platform. Figure 3 The data shows the voltage and time data of a normal vehicle after data cleaning and noise reduction.

[0197] For this vehicle, fault diagnosis was performed on the time corresponding to the first 30,000 frames of data. Then, voltage data was used to calculate its voltage change rate, voltage kurtosis, and voltage residual characteristics to construct a four-dimensional feature matrix. Subsequently, an improved MS-RILOF score was calculated in parallel at three time scales of 120, 240, and 480 using a multi-scale streaming processing framework. These scores represent the degree of anomaly of each individual battery cell, and by comparing them with preset dynamic thresholds, abnormal batteries were successfully identified. Figure 4The gray curve represents the abnormal score trajectory of the remaining normal cells, while the red and orange curves represent the abnormal score trajectories of cells number 29 and 51, respectively. The black dashed line represents the global threshold obtained by fitting using the POT method and adaptively updating using a time-barrier mechanism. ≈56.0; from Figure 4 It can be seen that the fusion anomaly scores of most individual cells are consistently far below the threshold, with only slight fluctuations occurring during sudden changes in operating conditions. In contrast, cells 29 and 51 exhibit significant anomalous peaks across multiple time periods, repeatedly exceeding the threshold and forming clusters of high-amplitude anomalies near multiple frames, indicating that the voltage behavior of these two cells during charging is significantly inconsistent with the overall group. The results show that the scores of individual cells 29 and 51 significantly exceed the set threshold, indicating abnormal voltage fluctuations in these cells, possibly due to internal short circuits or battery performance degradation.

[0198] To further verify the above judgment results from the perspective of physical quantities and to analyze the specific performance characteristics of the faulty battery, after determining the reference cell, this invention directly compares and performs differential analysis on the terminal voltage curves of the reference battery and the two faulty batteries. Figure 5 (a) A comparison of the smoothed terminal voltage curves of reference battery No. 18 and faulty batteries No. 29 and No. 51 during the same charging process is given. Figure 5 (b) provides the timing of the voltage difference between the two faulty cells relative to the reference cell. Figure 5 (a) It can be seen that during multiple charging stages (including the instantaneous current change and the subsequent constant current / constant voltage stage), the reference battery voltage generally maintains a relatively smooth decreasing (or increasing) trajectory, while batteries No. 29 and No. 51 show obvious deviations under the same operating conditions: in the constant current stage, the voltage of the two faulty batteries is slightly lower than that of the reference cell, reflecting the characteristics of inconsistent capacity or increased polarization; at the current step and turning point, the voltage of battery No. 29 shows obvious transient "peaks" or "valleys".

[0199] To further analyze the voltage behavior of these two abnormal batteries, their fault status was further verified by calculating their DTW distance from the normal battery. Figure 6 The DTW distance between cells 29 and 51 and the reference template cell is shown. Figure 6 It can be seen that the DTW distance of most individual cells is concentrated in the lower range, with only a few cells showing slight deviations under local operating conditions. Among them, the DTW distances of cells No. 29 and No. 51 are significantly higher than those of the other cells, forming two main peaks in the entire cell range. This indicates that their voltage change trajectories differ significantly from the group's "median behavior," and are consistent with... Figure 4The high anomaly scores provided corroborate each other. Based on this, battery number 18 was selected as the reference cell for the vehicle, and batteries number 29 and 51 were ultimately identified as faulty batteries. Furthermore, the degree of fault could be differentiated based on the DTW distance, with battery number 51 exhibiting a relatively more severe anomaly. This indicates that their voltage changes differ significantly from the behavior of normal batteries, further confirming the fault diagnosis results.

[0200] This invention selects four key features that can comprehensively characterize the health status of a battery: voltage value, voltage change rate, voltage kurtosis, and voltage residual. Voltage value reflects the potential level of the cell during operation and can be used to identify overall performance differences and health degradation trends. Voltage change rate characterizes the dynamic changes in voltage over time and has high sensitivity in detecting abnormal behaviors such as enhanced polarization effects and sluggish dynamic response. Voltage kurtosis describes the sharpness of voltage fluctuation distribution and is used to reflect abnormal fluctuations or sudden deviations, such as micro-short circuits or polarization abrupt changes. Voltage residual, obtained by removing the common-mode component, represents the degree of deviation of each cell's voltage from the group's median, effectively highlighting inconsistencies and local anomalies between cells. By combining these four features, the operating status of a single battery cell can be comprehensively evaluated from multiple perspectives, including steady-state level, dynamic response, statistical fluctuations, and relative differences, providing more reliable feature support for anomaly identification and early fault diagnosis.

[0201] Step S4 proposes an improved local anomaly factor algorithm to enhance the accuracy and stability of battery operation data anomaly detection. Traditional LOF algorithms suffer from sensitivity to feature scale, inability to reflect temporal changes, and high computational complexity when processing multi-dimensional battery features, easily leading to noise interference or slow response to dynamic anomalies. Therefore, this invention makes several improvements to the traditional LOF algorithm: First, it introduces a time-sliding window mechanism, extending static sample analysis to streaming detection over time series to capture the temporal evolution of voltage and related features; second, it employs standardization and common-mode suppression to reduce dimensional differences and global drift between different features, highlighting relative differences between cells; third, it uses a multi-scale fusion strategy to calculate local anomaly scores in parallel and weighted fusion across different time windows, balancing short-term fluctuations and long-term trends to achieve comprehensive cross-scale characterization; and fourth, it incorporates improved neighborhood constraints and distance correction terms in the calculation of local reachability density to improve the identification of boundary-type and intra-cluster anomalies. Through the above improvements, the ILOF algorithm can stably characterize the differences in cell behavior in a multi-dimensional feature space, significantly enhance the ability to identify early degradation and potential faults, and has higher real-time performance and robustness.

[0202] DTW distance is used to measure the temporal similarity between individual battery cells, overcoming the shortcomings of traditional Euclidean distance, which is sensitive to time axis misalignment and cannot reflect dynamic waveform differences. DTW can non-linearly align the voltage change trajectories of different cells in the time dimension, calculate the minimum matching cost between them and the group's "median template," and thus obtain a dynamic distance index reflecting voltage behavior differences. This distance is used to automatically select the reference cell that is closest to the overall behavior, serving as the benchmark for subsequent abnormal cell identification and feature comparison. Simultaneously, it allows for quantitative analysis of the temporal deviation degree of detected abnormal cells. In this way, DTW distance effectively enhances the algorithm's adaptability to changes in charging and discharging conditions, load fluctuations, and asynchronous sampling, significantly improving the stability and physical interpretability of anomaly detection results.

[0203] In summary, the lithium battery fault diagnosis method based on multi-scale streaming cytometry to improve local outlier factors proposed in this invention utilizes vehicle-mounted cloud big data as a foundation, combining multi-source statistical features such as voltage value, voltage change rate, voltage kurtosis, and voltage residual. It constructs a multi-scale sliding window streaming cytometry detection framework through common-mode suppression and time-adaptive standardization, and uses MS-RILOF anomaly scores and POT-time guardrail joint thresholds to achieve real-time fault determination of individual cells. Furthermore, DTW distance is used to quantitatively assess the degree of fault. This method does not rely on complex electrochemical mechanism models and can maintain high diagnostic accuracy and robustness in real-world operating environments with varying operating conditions, poor cell consistency, and multiple concurrent faults. It is suitable for online monitoring and operation and maintenance management of large-scale new energy vehicle fleets. Without departing from the spirit and essence of this invention, those skilled in the art can make various equivalent substitutions or modifications to the above embodiments, and all such equivalent substitutions or modifications should fall within the protection scope of this invention.

Claims

1. A lithium battery fault diagnosis method based on multi-scale flow cytometry to improve local outlier factors, characterized in that, Includes the following steps: S1. Collect vehicle battery system operation data through a big data platform; The vehicle battery system includes: the battery systems of normal vehicles and vehicles that have previously experienced fault alarms; The fault types include: voltage faults; The voltage faults include: overvoltage, undervoltage, and rapid voltage change of individual battery cells; The battery system's operating data includes: vehicle ID, sampling time, voltage of each individual cell, total voltage of the battery pack, highest voltage of each individual cell, lowest voltage of each individual cell, SOC, and total current. S2. Perform data cleaning on the collected battery system operating data to generate a high-quality voltage dataset; The data cleaning operations include: time series normalization, wavelet denoising, interpolation completion, and signal smoothing. S3. Based on a high-quality voltage dataset, after calculating the voltage change rate, voltage kurtosis and voltage residual features, the features are concatenated according to the individual dimensions to form a four-dimensional feature vector. S4. Common-mode suppression is performed on the original voltage features, while the three derived features of voltage change rate, voltage kurtosis and voltage residual remain unchanged. Time-adaptive normalization is adopted to construct a multi-scale sliding window streaming processing framework. The improved MS-RILOF score is calculated in streaming mode on three time scales of 120, 240 and 480 to obtain the multi-scale fused anomaly score matrix. S5. Input the multi-scale fusion anomaly score matrix, calculate the battery representative score, obtain the global threshold based on the over-threshold POT distribution fitting, combine it with the time guardrail threshold to make a single-cell fault judgment, and introduce the dynamic time warping (DTW) distance to quantitatively evaluate the fault degree of the faulty battery, output the DTW distance of the faulty battery, and complete the lithium battery fault diagnosis method.

2. The lithium battery fault diagnosis method based on multi-scale flow cytometry to improve local outlier factors according to claim 1, characterized in that, S2 specifically includes the following steps: S2.1 Time series normalization: Based on the collected operating data of the battery system, the voltage of individual cells is analyzed, the timestamp is parsed, and the normalized voltage time series is obtained. The timestamp parsing specifically involves parsing the original timestamp sequence into a strictly monotonic time sequence, removing unparseable and missing items, and rearranging them in ascending order of time. S2.2 Based on the normalized voltage time series, wavelet denoising is performed, noise is estimated based on the highest frequency detail subband and soft thresholding is applied to shrink it, and then linear interpolation is used to fill the missing data within the preset range to obtain the denoised voltage time series. Savitzky-Golay smoothing is performed on the denoised voltage series to generate a high-quality voltage dataset. The expression for performing wavelet denoising is as follows: In the formula, This is the level 1 detail coefficient; for Wavelet decomposition / reconstruction operators; Decomposition layer number; These are approximate coefficients; For the first Layer detail factor; Estimation of noise standard deviation; This is the threshold scaling factor; This represents the number of non-missing samples for that single entity. This is the voltage after noise reduction; Represents any wavelet coefficient.

3. The lithium battery fault diagnosis method based on multi-scale flow cytometry to improve local outlier factors according to claim 1, characterized in that, S3 specifically includes the following steps: The expression for calculating the rate of change of voltage is: In the formula, This represents the voltage value at the current moment; t-1 represents the previous sampling time. This indicates the voltage value at the previous moment; Indicates a time interval; The expression for voltage kurtosis is: In the formula, Indicates a single voltage value; This represents the average voltage. This represents the number of voltage sampling points contained in the current sliding window; for The index; where subtracting 3 is to make the kurtosis of the normal distribution zero; The expression for calculating voltage residual is: In the formula, Indicates the first One battery in Voltage residual at time; Indicates the first One battery in The voltage value at that moment; This indicates the median operation; This represents the total number of batteries.

4. The lithium battery fault diagnosis method based on multi-scale flow cytometry to improve local outlier factor according to claim 1, characterized in that, S4 specifically includes the following steps: S4.1 Based on the four-dimensional feature vector, perform multi-scale time window division and in-window standardization to obtain standardized three-level time window scale data; The three time window scales are 120, 240, and 480 time frames, respectively. The standardized calculation expression within the window is: In the formula, These are the original eigenvalues. This is the arithmetic mean of all samples of this feature within the sliding window, used to characterize the center position of the data. The standard deviation of this feature within the window is used to characterize the dispersion of the data; S4.2 Input the standardized three-level time window scale data, and output the normalized three-level time window scale data through the time adaptive normalization module; The time-adaptive normalization formula is: In the formula, for The feature vector at time step; for The median estimate of the characteristics of a normal battery at any given time. for Robust estimate of the median absolute deviation (MAD) of normal battery characteristics at any given time; S4.3 Based on the normalized three-level time window scale data, the improved local outlier factor ILOF algorithm score calculation is used to output the improved local outlier factor scores at three scales. The improved local outlier factor ILOF score calculation includes: calculating the feature space distance, determining... Nearest neighbor region, calculate local reachability density and calculate ILOF score; S4.

4. Improve the local outlier factor score based on three scales. Obtain the multi-scale fused anomaly score matrix through multi-scale score weighted fusion and smoothing. The weighted fusion formula is: In the formula, For the first ILOF score matrix at each scale, The fusion weights are the corresponding scales, and satisfy the following conditions: , For scale quantity.

5. The lithium battery fault diagnosis method based on multi-scale flow cytometry to improve local outlier factor according to claim 4, characterized in that, S4.3 specifically includes the following steps: S4.3.1 Calculate the feature space distance using Euclidean distance; The formula for calculating the feature space distance is: in, and They are objects and object The 1 eigenvalue, The total number of features; S4.3.2, Determine Nearest neighbor area; Set the number of nearest neighbors object of Nearby Neighborhood Defined as: In the formula, D represents the dataset within the current window. For object The distance to its k-th nearest neighbor; S4.3.3 After calculating the reachable distance by smoothing local density fluctuations and taking the maximum value, calculate the local reachable density; The formula for calculating the locally reachable density is as follows: In the formula, It is a pre-defined, extremely small constant; S4.3.4, Based on feature space distance ILOF score is calculated using the nearest neighbor neighborhood and local reachability density; The formula for calculating the ILOF score is: Among them, an ILOF score greater than 1 indicates that the object If the local density of an object is lower than the average local density of its neighboring objects, it suggests that the object may be an outlier; the higher the score, the more significant the anomaly.

6. The lithium battery fault diagnosis method based on multi-scale flow cytometry to improve local outlier factors according to claim 1, characterized in that, S5 specifically includes the following steps: S5.1 Based on the multi-scale fusion anomaly score matrix, the representative score of the battery is obtained by calculating the representative score of the battery; The formula for calculating the battery's fractional power is as follows: In the formula, Indicates battery The representative score; used to characterize the overall anomaly level of the battery over the complete observation period; It is a battery At any moment Multi-scale fusion of ILOF anomaly scores; This represents the total number of time frames. Functions representing 95th percentile operations; S5.2 Based on the representative score of the battery, select the over-threshold data and fit it with the generalized Pareto distribution GPD, and calculate the global fault threshold based on the fitted GPD, and output the global fault detection threshold. S5.3 Based on the global fault detection threshold, a dynamically adjustable threshold is obtained by introducing a time-barrier threshold mechanism; S5.

4. Based on dynamic time warping, the fault severity is quantitatively evaluated, and the DTW distance of the faulty battery is output as an auxiliary evaluation index of the fault severity to complete the lithium battery fault diagnosis method.

7. The lithium battery fault diagnosis method based on multi-scale flow cytometry to improve local outlier factor according to claim 6, characterized in that, S5.2 specifically includes the following steps: S5.2.1 Based on the representative score of the battery, select the over-threshold data and fit it with the generalized Pareto distribution GPD, and output the basic threshold, shape parameter, scale parameter and fitted GPD distribution; The specific formula for the fitted GPD distribution is as follows: In the formula, This represents the excess amount, that is, the portion of the sample value that exceeds the baseline threshold u; For shape parameters; For scale parameters; S5.2.2 Calculate the significance level corresponding to the fitted GPD distribution. Global fault detection threshold Output the global fault detection threshold; The specific expression for the global fault detection threshold is as follows: In the formula, This represents the global fault detection threshold; The significance level is adjusted beyond probability, where It is a preset significance level used to control the false alarm rate; The score represents the base threshold. The empirical probability, This is an estimate that exceeds the probability. To fit the shape distribution parameters, The parameters are for fitting the scale distribution.

8. The lithium battery fault diagnosis method based on multi-scale flow cytometry to improve local outlier factor according to claim 6, characterized in that, In S5.3, the specific formula for dynamically adjusting the threshold is as follows: In the formula, Indicates time Time-limited guardrail threshold; Indicates time All normal batteries scored abnormally. quantiles; To pre-determine a safety margin.

9. A lithium battery fault diagnosis method based on multi-scale flow cytometry to improve local outlier factors according to claim 6, characterized in that, In S5.4, the DTW distance formula for the faulty battery is as follows: In the formula, Indicates battery The DTW distance between the voltage sequence and the reference template sequence; Indicates the alignment path between two sequences; It is a battery At any moment The actual voltage value; It is a reference template at any time The voltage value.