Battery fault unsupervised detection method based on diffusion Transform and confidence coefficient calibration

Through the method of diffusion Transformer and confidence calibration, the problem of insufficient data quality and feature extraction in battery fault detection is solved, unsupervised high-precision fault detection is realized, adapting to the time-varying characteristics of battery performance, and reducing the false alarm rate and missed alarm rate.

CN120490880AInactive Publication Date: 2025-08-15YANGTZE UNIVERSITY
View PDF 0 Cites 9 Cited by

Patent Information

Application Number
CN202510758282.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-08-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing battery fault detection technology, there are problems such as poor data quality, difficulty in aligning multi-source data, strong dependence on labeled data, inflexible detection thresholds, and insufficient feature extraction capabilities.

Method used

Using a method based on diffusion Transformer and confidence calibration, by obtaining multimodal timing data, physical rule verification, normalization processing and dynamic time alignment, a diffusion Transformer self-supervised learning framework is constructed, and the optimal detection threshold is dynamically determined in combination with the Bayesian optimization framework to realize unsupervised fault detection.

Benefits of technology

It realizes high-precision fault detection without fault sample labels, improves the robustness and adaptability of the detection system, can adapt to the time-varying characteristics of battery performance, reduces false alarm rates and missed alarm rates, and simplifies deployment complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120490880A_ABST
    Figure CN120490880A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of battery health management, in particular to a battery fault unsupervised detection method based on diffusion Transform and confidence coefficient calibration, which comprises the following steps: acquiring multi-modal time sequence data in a battery operation process, and performing preprocessing, including data cleaning, normalization processing, alignment and sampling; a diffusion Transform self-supervised learning framework is constructed, and the framework comprises a diffusion process based on a cosine scheduling strategy, multi-scale Transform architecture coding and a cross-modal self-adaptive fusion mechanism. Through the framework, potential space representation is optimized, and the battery state confidence coefficient is calculated; the optimal detection threshold value is dynamically determined by adopting a Bayesian optimization framework, whether the battery state is normal or faulty is judged according to the comparison result of the battery state confidence coefficient and the optimal detection threshold value, dependence on a fault sample label is completely eliminated, and a high-performance fault detection model can be trained only by utilizing normal sample data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of battery health management technology, and more specifically to an unsupervised battery fault detection method based on diffusion Transformer and confidence calibration. The method is applied to the early detection and diagnosis of battery faults in scenarios such as electric vehicles and energy storage systems. Background Art

[0002] With the rapid development of the new energy industry, battery health monitoring and fault detection, as core components, are crucial to ensuring system safety and reliability. Currently, battery fault detection methods are mainly divided into physical model-based methods and data-driven methods.

[0003] Traditional physical model-based methods require precise establishment of electrochemical and thermodynamic models of the battery. However, due to the complex nonlinear characteristics of the battery and the diversity of external operating conditions, such methods often find it difficult to accurately describe the actual operating status of the battery, resulting in limited accuracy in fault detection.

[0004] Although data-driven approaches avoid complex mechanism modeling, existing technologies still have significant shortcomings. First, the quality of multimodal data directly affects the detection effect. Data such as voltage, current, temperature, and state of charge generated during battery operation often contain outliers due to sensor noise, hardware errors, or environmental interference. Simple data cleaning methods are difficult to effectively eliminate these interferences. Second, the inconsistent sampling frequencies and timestamps of different sensors make it difficult to accurately align multi-source data. Traditional time series processing methods cannot accurately capture the temporal correlation between data.

[0005] Third, latent space-based confidence assessment technology utilizes generative models to map high-dimensional battery data into a low-dimensional latent space. By decoupling features and modeling the probability distribution of normal data, it quantifies the confidence of new data points and identifies outliers that deviate from the normal distribution. Latent space visualization is also combined to improve interpretability, providing a new approach to intelligent detection for battery health management.

[0006] Fourth, supervised learning methods are widely used in fault detection, but they rely heavily on large amounts of labeled data. In practice, battery failure samples are scarce and expensive to obtain, while normal operating condition data is relatively abundant. This data imbalance leads to insufficient generalization capabilities of supervised learning models. More importantly, battery failure modes are diverse and dynamically evolving, making existing supervised learning methods difficult to cover unknown fault types and unable to adapt to the complex changes in real-world scenarios.

[0007] Fifth, in the fault determination phase, traditional methods typically use a fixed threshold strategy. However, battery performance changes dynamically with factors such as cycle number, ambient temperature, and charge / discharge rate. Static thresholds are difficult to adapt to these time-varying characteristics, which can easily lead to false positives or missed detections. Although some improved methods have introduced adaptive threshold mechanisms, they lack a systematic optimization framework. Threshold adjustment often relies on experience or simple rules, which cannot achieve optimal detection performance.

[0008] Finally, existing feature extraction methods also have significant flaws. Traditional statistical features or hand-crafted features struggle to fully characterize the nonlinear time series characteristics of battery data. While deep learning methods can automatically learn feature representations, they are susceptible to noise interference in unsupervised scenarios, resulting in unstable feature quality. Furthermore, most methods treat feature extraction and anomaly detection as separate steps, failing to establish an end-to-end optimization mechanism, which limits improvements in overall detection performance.

[0009] Therefore, there is an urgent need for a new battery fault detection method that can solve the above problems. Summary of the Invention

[0010] The purpose of the present invention is to provide an unsupervised battery fault detection method based on diffusion Transformer and confidence calibration. This method aims to solve the problems existing in existing battery fault detection technologies, such as poor data quality, difficulty in aligning multi-source data, strong dependence on labeled data, inflexible fixed detection thresholds, and insufficient feature extraction capabilities.

[0011] This paper proposes an unsupervised battery fault detection method based on diffusion Transformer and confidence calibration, including:

[0012] Acquire multimodal time series data during battery operation, including voltage, current, state of charge, and temperature data;

[0013] Preprocessing the multimodal time series data includes:

[0014] Cleaning the multimodal time series data based on a physical rule verification mechanism;

[0015] Normalize the cleaned multimodal time series data;

[0016] Aligning the preprocessed multimodal time series data based on a dynamic time warping algorithm and sampling using a sliding window technique to obtain aligned sampled data;

[0017] Build a diffusion transformer self-supervised learning framework, including:

[0018] performing a nonlinear transformation on the aligned sampled data based on a diffusion process of a cosine scheduling strategy;

[0019] Based on the multi-scale Transformer architecture, the transformed data is encoded to obtain the latent space representation;

[0020] Utilizing a cross-modal adaptive fusion mechanism combined with an adversarial reconstruction learning strategy to optimize the latent space representation;

[0021] Calculating battery state confidence by Mahalanobis distance based on the optimized latent space representation;

[0022] Adopting Bayesian optimization framework, based on kernel density estimation and Gaussian process regression, combined with expected improvement strategy, the optimal detection threshold is dynamically determined;

[0023] According to the comparison result of the battery status confidence and the optimal detection threshold, the battery status is determined to be normal or faulty, and the fault cause location analysis is performed in combination with the original multimodal data.

[0024] Preferably, the cleaning of the multimodal time series data based on a physical rule verification mechanism specifically includes:

[0025] Performing range and monotonicity checks on the voltage data, wherein the range check ensures that the voltage value is within a preset safe operating range, and the monotonicity check ensures that the voltage shows an overall upward trend during the charging phase;

[0026] Performing a range check and a stability check on the current data, wherein the range check ensures that the absolute value of the current does not exceed the rated maximum value, and the stability check ensures that the standard deviation of the current within the sliding window is lower than a set threshold;

[0027] Perform range check and temperature rise rate check on the temperature data, wherein the range check ensures that the temperature is within the allowable range, and the temperature rise rate check ensures that the temperature change per unit time does not exceed a safe rate;

[0028] The state of charge data is range checked and current consistency checked, wherein the range check ensures that the state of charge value is between 0 and 1, and the current consistency check ensures that the current direction during charging is consistent with the change in the state of charge.

[0029] Preferably, the normalization processing of the cleaned multimodal time series data specifically includes:

[0030] Calculating the mean and standard deviation of each feature dimension in the cleaned multimodal time series data;

[0031] Based on the mean and standard deviation, Z-score standardization is performed on each feature dimension data so that the mean of each feature dimension after transformation is 0 and the variance is 1;

[0032] Only valid data verified by the physical rules are used to calculate statistics, and abnormal data are not involved in normalization calculations.

[0033] Preferably, the aligning the preprocessed multimodal time series data based on the dynamic time warping algorithm specifically includes:

[0034] Normalize the distance between observations of the same sensor at different time points to construct a unimodal distance metric;

[0035] The multimodal alignment cost function is constructed by dynamically allocating weight coefficients based on the inverse of the variance of each modal data.

[0036] The minimum cumulative cost is calculated recursively through dynamic programming, and the optimal alignment path is determined by backtracking from the end point to the starting point.

[0037] According to the optimal alignment path, a time-consistent alignment sequence of four dimensions, namely voltage, current, state of charge and temperature, is generated.

[0038] Preferably, the sampling by the sliding window technology specifically includes:

[0039] Set a fixed-size sliding window whose length is a predetermined number of time steps and whose step size is a preset value;

[0040] Starting from the start position of the aligned sequence, the preset step size is slid along the time axis each time, and the continuous time points within the coverage of the window are extracted to form a subsequence;

[0041] Repeat the sliding process until the window cannot completely cover the remaining sequence, generating multiple local time series subsequences;

[0042] The length and step size of the sliding window are adaptively adjusted according to the battery charge and discharge cycle characteristics.

[0043] Preferably, the diffusion process based on the cosine scheduling strategy specifically includes:

[0044] Set the total number of diffusion steps and define the cumulative attenuation coefficient and noise injection intensity of each step, so that the noise is added slowly in the early stage of the diffusion process and accelerated in the later stage;

[0045] gradually adding controlled noise to the aligned sampled data, and gradually converting the original data distribution into a standard normal distribution through a T-step diffusion process;

[0046] The noise addition process is implemented through reparameterization techniques to ensure that gradients can be backpropagated and support end-to-end training;

[0047] The attenuation coefficient of the cosine scheduling strategy matches the characteristics of the battery performance degradation curve, enhancing the model's ability to model the battery degradation mechanism.

[0048] Preferably, encoding the transformed data based on the multi-scale Transformer architecture to obtain a latent space representation specifically includes:

[0049] The transformed data is mapped to a high-dimensional feature space through an embedding matrix, and position encoding is added to preserve the temporal information;

[0050] Design a multi-head self-attention mechanism so that each attention head focuses on feature patterns at different time scales and captures both long-term and short-term dependencies.

[0051] Enhance nonlinear expression capabilities through feedforward neural networks, and ensure training stability by combining residual connections and layer normalization;

[0052] A variational inference network is designed to map the encoded features to the distribution parameters of the latent variables, and KL divergence regularization is introduced to constrain the latent space structure.

[0053] Preferably, the calculating the battery state confidence by Mahalanobis distance based on the optimized latent space representation specifically includes:

[0054] Using the latent variables of normal samples, we calculate the mean vector and covariance matrix of the latent space and construct the benchmark distribution.

[0055] For the latent variable of the test sample, calculate its standardized distance from the center of the benchmark distribution as the Mahalanobis distance confidence;

[0056] Design a nonlinear mapping function to convert the Mahalanobis distance into a standardized confidence value between 0 and 1;

[0057] The Mahalanobis distance confidence reflects the degree of deviation of the test sample from the normal state distribution, and a larger value indicates a higher possibility of failure.

[0058] Preferably, the Bayesian optimization framework is used to dynamically determine the optimal detection threshold, specifically including:

[0059] The objective function is defined as the proportion of normal samples whose confidence does not exceed the threshold, which represents the acceptance rate of normal samples under the threshold;

[0060] The kernel density estimation technique is used to smooth the discrete confidence samples into a continuous probability distribution, and a regularization term is introduced to avoid the threshold being too loose.

[0061] Establish a Gaussian process regression model, treat the objective function as a Gaussian process, and estimate the global optimal solution through a small number of sample points;

[0062] The design expects to improve the acquisition function, balance the use of known information and exploration of unknown areas, and iteratively search for the optimal threshold;

[0063] When the expected improvement value converges or reaches the maximum number of iterations, the threshold that maximizes the objective function is selected as the final detection threshold.

[0064] Preferably, the determining whether the battery status is normal or faulty based on the comparison result of the battery status confidence and the optimal detection threshold, and performing fault cause location analysis in combination with the original multimodal data, specifically includes:

[0065] Compare the confidence value of the test sample with the optimal detection threshold. If the confidence value is lower than the threshold, it is judged as a normal state, and if it is higher than the threshold, it is judged as a fault state.

[0066] For samples judged to be in a fault state, analyze the abnormal contribution of their latent space representation in each dimension;

[0067] Combine the raw voltage, current, temperature, and state of charge data to identify the feature dimensions that contribute most to anomaly determination;

[0068] Based on the abnormal feature dimensions and patterns, the possible fault type and cause are determined, and a diagnostic report is generated that includes the fault severity, possible causes, and treatment suggestions.

[0069] This paper innovatively combines the generative capabilities of diffusion models with the temporal modeling capabilities of Transformers to construct an end-to-end self-supervised learning framework, achieving high-precision fault detection without the need for fault sample labels. Furthermore, a dynamic threshold mechanism based on Bayesian optimization is introduced to effectively adapt to the time-varying characteristics of battery performance, significantly improving the robustness and adaptability of the detection system.

[0070] The present invention has the following beneficial effects:

[0071] 1. Completely eliminate the reliance on fault sample labels and train high-performance fault detection models using only normal sample data, solving the problem of scarce fault samples in practical applications.

[0072] 2. The innovative combination of physical rule verification and dynamic time warping algorithms significantly improves the quality and temporal consistency of multimodal data, laying a solid foundation for subsequent feature learning.

[0073] 3. Through the complementary synergy of the cosine scheduling diffusion process and the multi-scale Transformer architecture, accurate modeling of the complex nonlinear characteristics of battery time series data is achieved, enhancing the ability to detect unknown failure modes;

[0074] 4. The combination of Mahalanobis distance-based confidence assessment and Bayesian optimization dynamic thresholding enables the detection system to adaptively adjust sensitivity, effectively balancing false positive and false negative rates, and adapting to dynamic changes in battery performance over time and in the environment.

[0075] 5. The end-to-end integrated design enables closed-loop optimization of feature learning and fault detection, improving overall system efficiency and simplifying deployment complexity. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 Schematic diagram of the overall process of the method of the present invention;

[0077] Figure 2 Schematic diagram of the multimodal data preprocessing process of the present invention;

[0078] Figure 3 This is a schematic diagram of the diffusion transformer self-supervised learning framework structure of the present invention;

[0079] Figure 4 This is a schematic diagram of the Bayesian dynamic threshold optimization process of the present invention;

[0080] Figure 5 This is a flow chart of battery fault detection and cause location analysis in the present invention. DETAILED DESCRIPTION

[0081] Please refer to the attached Figure 1-5 , the specific implementation of the present invention is further described in detail below with reference to the accompanying drawings.

[0082] like Figure 1 As shown in the figure, the unsupervised battery fault detection method based on diffusion Transformer and confidence calibration proposed in the present invention includes the following main steps: multimodal data acquisition and preprocessing, data alignment and sampling, diffusion Transformer self-supervised learning framework construction, confidence calculation, Bayesian dynamic threshold optimization, and fault detection and cause location analysis.

[0083] The method of the present invention first obtains multimodal time series data during the operation of the battery, including voltage, current, state of charge and temperature data; then preprocesses these data, including data cleaning and normalization based on physical rules; then uses a dynamic time warping algorithm to align the preprocessed multimodal data and samples them through a sliding window technique; then constructs a diffusion Transformer self-supervised learning framework, models the data through a cosine scheduling diffusion process and a multi-scale Transformer architecture, and obtains an optimized latent space representation; calculates the battery state confidence based on the representation; uses a Bayesian optimization framework to dynamically determine the optimal detection threshold; finally, determines the battery state based on the comparison result between the confidence and the threshold, and performs fault cause location analysis.

[0084] The present invention first acquires multimodal time-series data during battery operation, specifically including time-series data in four dimensions: voltage (V), current (I), state of charge (SOC), and temperature (T). This data is typically collected by a sensor network within a battery management system (BMS). In practical applications, the sampling frequency may need to be adjusted for different battery types (e.g., lithium-ion batteries, lead-acid batteries, etc.). For lithium-ion batteries used in electric vehicles, the sampling frequency is typically set to 1Hz, meaning data is collected once per second to balance data accuracy and computational load.

[0085] The acquired raw data usually has problems such as noise, outliers and time asynchrony, and needs to be preprocessed. This paper uses a physical rule-based verification mechanism to clean multimodal time series data. The mechanism includes four dimensions of verification rules:

[0086] For voltage data, range check and monotonicity check are performed. Range check ensures that the voltage value is within the preset safe operating range. For example, for a typical lithium-ion battery, the voltage range is usually 2.5V to 4.2V. Monotonicity check ensures that the voltage shows an overall upward trend during the charging phase, allowing for small noise fluctuations. In specific implementation, a small tolerance threshold can be set. (such as 0.01V), the test formula is:

[0087] ,

[0088] in: is the voltage value at the i-th time point, is the voltage value at the i-1th time point, is the voltage change, is the tolerance threshold, which indicates the range of small fluctuations allowed. In actual battery systems, this threshold is usually set according to the battery type and sensor accuracy. For example, for high-precision sensors, Set to 0.005V.

[0089] For current data, perform range check and stability check. Range check ensures that the absolute value of the current does not exceed the rated maximum value. The check formula is:

[0090] ,

[0091] in: is the current value at the i-th time point, is the maximum rated current value of the battery. For example, for a certain model of lithium-ion battery for electric vehicles, Maybe set to 10A.

[0092] Stability check ensures that the current does not fluctuate violently in a short period of time. This is achieved by calculating the standard deviation within a sliding window and comparing it with a preset threshold:

[0093] ,

[0094] in: is the standard deviation of the current in the sliding window, is the window size (e.g. 10 time points), is the current value at the jth time point in the window, is the mean current in the window, is the standard deviation threshold. In practical applications, It can be set to 0.5A, which indicates the allowable current fluctuation range. This test is particularly important for identifying problems such as current sensor failure or internal battery short circuit.

[0095] For temperature data, perform range check and temperature rise rate check. Range check ensures that the temperature is within the allowable range. The check formula is:

[0096] ,

[0097] in: is the temperature value at the i-th time point, and For lithium-ion batteries, usually , .

[0098] The temperature rise rate check ensures that the temperature change per unit time does not exceed the safe rate. The test formula is:

[0099] ,

[0100] in: is the temperature change, is the time interval, and are the i-th and i-1-th time points respectively, is the temperature rise rate threshold. Preferably, The test can be set to 0.5°C / minute. This test is crucial for early detection of battery overheating problems and is especially valuable during rapid charging or extreme operating conditions.

[0101] For the state of charge data, a range check and a current consistency check are performed. The range check ensures that the SOC value is between 0 and 1 (or 0% to 100%). The check formula is:

[0102] ,

[0103] in: is the state of charge value at the first time point.

[0104] The current consistency check ensures that the current direction during charging is consistent with the SOC change trend. The verification formula is:

[0105] ,

[0106] in: is the current value at the i-th time point (charging is positive, discharging is negative), This test can effectively identify SOC estimation anomalies, especially when the SOC algorithm is inaccurate due to battery aging.

[0107] Through the above physical rule verification, a Boolean mask is generated to mark valid data points and outliers. Only data points that pass all verification rules are retained, and outliers are eliminated to ensure the quality of training data. On this basis, the cleaned multimodal time series data is normalized and the mean μ and standard deviation σ of each feature dimension are calculated:

[0108] ,

[0109] ,

[0110] in: is the number of valid data points, Represents the i-th valid data point of a certain feature, is the mean value of the feature, is the standard deviation of the feature. For example, for an electric vehicle battery pack, the voltage data collected during a working cycle may be = 3600 valid points (i.e. one hour of data), calculated V, V.

[0111] Then, each feature is transformed by Z-score standardization:

[0112] ,

[0113] in: is the standardized eigenvalue, is the original eigenvalue, is the mean value of the feature, is the standard deviation of the feature. After normalization, the distribution of each feature dimension has a mean of 0 and a standard deviation of 1. This eliminates scale differences between different physical quantities, enabling the model to better learn the relative relationships between features. It is important to note that only valid data that has been verified by physical rules is used to calculate statistics. Abnormal data is excluded from normalization calculations to avoid statistical contamination.

[0114] Due to the different sampling frequencies and response times of different sensors, the acquired multimodal data often suffers from time asynchrony. This paper uses the Dynamic Time Warping (DTW) algorithm to align the preprocessed multimodal time series data.

[0115] First, the distance between observations of the same sensor at different time points is normalized to construct a unimodal distance metric:

[0116] ,

[0117] in: is the standardized single-dimensional distance, and For the same sensor at a point in time and The observed value of is the standard deviation of the sensor data, and X represents the sensor type, which can be voltage (V), current (I), state of charge (S), or temperature (T). For example, , represents the normalized distance between two voltage values.

[0118] Then, the weight coefficient is dynamically assigned based on the inverse of the variance of each modal data to construct the multimodal alignment cost function:

[0119] ,

[0120] in: For time point and The alignment cost, 、 、 、 is the weight coefficient, satisfying The weight coefficients can be dynamically assigned by calculating the inverse of the variance of each mode:

[0121] ,

[0122] in: is the weight factor of each mode, is the standard deviation of each modal data, is the weight factor of each mode, is the standard deviation of each modal data, is the sum of the weight factors. This distribution method gives greater weight to modes with small variance (i.e., high data stability), thereby improving alignment accuracy. In practical applications, for example, the data of an electric vehicle battery system may have , , , , then the corresponding weight coefficient is approximately , , , , reflecting the importance of voltage and SOC data to alignment.

[0123] Next, the minimum cumulative cost is calculated recursively through dynamic programming:

[0124] ,

[0125] in: The minimum cumulative cost from the starting point (1,1) to the current point (i,j) is calculated by comparing the minimum value of the three possible leading paths (left, top, top-left) and adding the cost of the current point The boundary conditions are:

[0126] ,

[0127] ,

[0128] ,

[0129] From the end point (n,m) back to the starting point (1,1), determine the optimal alignment path and generate a time-consistent alignment sequence for the four dimensions of voltage, current, SOC, and temperature:

[0130] ,

[0131] in: is the kth data point after alignment, containing four modal values, 、 、 The original time index corresponding to the alignment path. For example, in an electric vehicle battery monitoring system, the original asynchronous sampling data (voltage sampled every 0.5 seconds, current sampled every 0.2 seconds, temperature sampled every 1 second, and SOC updated every 1 second) may be aligned to a unified 1Hz time series.

[0132] Based on the aligned time series data, the present invention employs a sliding window technique for sampling to capture local time series features. Specifically, a fixed-size sliding window is set, and its length m and step size k can be adjusted based on the battery's charge and discharge cycle characteristics. Preferably, for typical lithium-ion batteries used in electric vehicles, the window length can be set to 300 to 600 seconds (i.e., 5 to 10 minutes) with a step size of 60 seconds (i.e., 1 minute) to balance local feature capture with computational efficiency.

[0133] In addition to the basic sliding window (5-10 minutes), a hierarchical temporal feature extraction mechanism is also designed:

[0134] ,

[0135] in: It is a short-term window feature (5 to 10 minutes) to capture immediate fluctuations; It is a medium time window feature (1 to 6 hours), capturing a single complete charge and discharge process; It is a long-term window feature (1 to 7 days) that captures the cyclic decay trend. The features of each time scale are fused through feature pooling and resampling to the same dimension.

[0136] Starting from the start of the aligned sequence, the algorithm slides k time steps along the time axis at a time, extracting m consecutive time points within the window coverage to form a subsequence, until the window no longer fully covers the remaining sequence. This method generates a large number of local time series subsequences, providing a rich sample for subsequent feature learning. For the aforementioned electric vehicle battery system, one day of data (86,400 time points) is processed using a sliding window with a window length of 300 seconds and a step size of 60 seconds, resulting in approximately 1,430 subsequence samples.

[0137] The core innovation of this invention lies in the construction of a diffusion Transformer self-supervised learning framework, which innovatively combines the generative capabilities of the diffusion model and the temporal modeling capabilities of the Transformer. By modeling the data distribution, it achieves high-precision feature learning without the need for fault sample labels.

[0138] First, the present invention designs a diffusion process based on a cosine scheduling strategy. The core concept of the diffusion process is to gradually add noise to the original data, ultimately making the data conform to a standard normal distribution. Unlike traditional linear diffusion, the present invention uses a cosine scheduling strategy to control the intensity of the noise addition, resulting in slow noise addition in the early stages of the diffusion process and accelerated noise addition in the later stages. This nonlinear noise addition strategy is highly compatible with the performance degradation characteristics of batteries (slow degradation in the early stages and accelerated decay in the later stages).

[0139] Specifically, set the total number of diffusion steps T (such as 1000 steps) and define the cumulative attenuation coefficient of each step t∈[1,T] And the noise injection intensity :

[0140] ,

[0141] Where: is the cumulative attenuation coefficient at the t-th step, with a value range of (0, 1). The larger t is, the smaller it is; is the noise injection intensity at the t-th step, with a value range of (0, 1). The larger t is, the larger it is; T is the total number of diffusion steps, usually set to 1000; t is the current step number, with a range of is the pi. This scheduling method performs excellently in the modeling of the gradual degradation of battery performance. For example, in the early stage (t < T / 3), is close to 1, and the noise addition is slow. While in the later stage (t > 2T / 3), rapidly decreases, and the noise addition accelerates.

[0142] During the diffusion process, controlled noise is gradually added to the original data The data after t steps can be expressed as:

[0143] ,

[0144] Where: is the data after diffusion at the t-th step, with the same dimension as ; is the original noise-free data, corresponding to the normal operation data of the battery, such as a time series data segment with a dimension of [300, 4] (300 time points, 4 features per point); is the cumulative attenuation coefficient, obtained by multiplying the of the previous t steps; is the standard normal distribution noise, with the same dimension as ; I is the identity matrix, indicating that the noise in each dimension is independently and identically distributed. When t = T, approximately follows the standard normal distribution . This diffusion process based on cosine scheduling provides data transformation that matches the battery degradation mechanism, enhancing the model's ability to model the battery state.

[0145] Next, the present invention designs a multi-scale Transformer architecture to encode the transformed data and obtain the latent space representation. First, the transformed data is mapped to a high-dimensional feature space through the embedding matrix , and position encoding is added to retain the time series information. The time embedding method introduces periodic and long-term trend information:

[0146] ,

[0147] in: is the feature representation after embedding, the dimension is Usually set to 512; is the data after diffusion, and the dimension is is the embedding matrix with dimension is the relative position encoding, the dimension is Cycle position encoding, encoding the relative position within the charge and discharge cycle; It encodes the trend position and the number of battery cycles to reflect the degree of aging.

[0148] Introduce a cross-window memory module to store and update long-term features:

[0149] ,

[0150] in: is the time step The memory state matrix has the dimension is the memory length (e.g. 50); update is the memory update function, combining the previous moment memory and the current hidden state; is the updated hidden state; It means concatenating the current key matrix with the memory matrix in the first dimension, so that the attention mechanism can access historical information.

[0151] Then, a multi-head self-attention mechanism is designed so that each attention head focuses on feature patterns at different time scales:

[0152] ,

[0153] ,

[0154] ,

[0155] in: is the multi-head attention output, with a dimension of [300, ]; For the splicing operation, the outputs of h heads are spliced together; is the output of the ith attention head, with a dimension of [300, / h]; is the scaled dot product attention function; Q, K, and V are query, key, and value matrices, respectively, and all have dimensions [300, ]; is the weight matrix of the i-th head, and its dimensions are 、 and ,generally ; is the output weight matrix, with dimension ; is the attention dimension, which is used to scale the dot product to prevent the gradient from disappearing; softmax is the softmax activation function; is the dot product of the query and the key, indicating the correlation between each time point, It is a time-aware mask that encourages different attention heads to focus on dependencies at different time scales.

[0156] Different attention heads are designed to focus on different time scales. For example, heads 1 to 3 focus on short-term dependencies (fluctuations within 5 to 10 minutes), heads 4 to 6 focus on medium-term dependencies (single charge and discharge cycle), and heads 7 to 8 focus on long-term dependencies (multiple cycles) through a memory enhancement mechanism.

[0157] Preferably, eight attention heads can be set, with an attention dimension of 64 and a total model dimension of 512. This multi-head structure can simultaneously capture short-term fluctuations (such as voltage fluctuations during a single charge and discharge cycle) and long-term trends (such as capacity decay trends after multiple cycles). In electric vehicle battery management systems, these features correspond to different failure modes. For example, internal short circuits are usually manifested as short-term abnormal voltage fluctuations, while lithium deposition is manifested as long-term capacity decay.

[0158] Enhance nonlinear expression capabilities through feedforward neural networks, and ensure training stability by combining residual connections and layer normalization:

[0159] ,

[0160] ,

[0161] ,

[0162] in: It is the output of the feedforward network, and its dimension is the same as the input x; is the ReLU activation function; and is the weight matrix, and its dimensions are and , Usually 4 times, such as 2048; and is the bias vector; LayerNorm is the layer normalization function; The output Sublayer of a Transformer layer can be a multi-head self-attention layer or a feedforward network layer; and are the mean and standard deviation of the input x respectively; and These layers are learnable scaling and offset parameters. In battery fault detection, these layers are able to learn complex nonlinear features, such as the nonlinear relationship between the voltage and current curves, which is crucial for identifying faults such as overcharging and over-discharging.

[0163] Based on the coding features, the present invention designs a variational inference network, which converts the coding features into Mapping to the distribution parameters of the latent variables:

[0164] ,

[0165] in: is the mean vector of the latent variable, with dimension [300,d_z], Usually set to 64; is the logarithmic variance vector of the latent variables, with the same dimension as same; is a fully connected layer, encoding features (The dimension is [300, ]) are mapped to the distribution parameters.

[0166] Sampling latent variables via the reparameterization trick:

[0167] ,

[0168] in: is the latent variable obtained by sampling, with a dimension of [300, ]; is element-wise multiplication; is the standard normal distribution noise, and its dimension is same; is the standard deviation vector. This probabilistic representation enables the model to estimate the uncertainty of the battery state. For example, when the battery enters an unstable state (such as approaching the failure point), the variance of the latent variable will increase, reflecting the increased uncertainty in the state estimate.

[0169] In order to optimize the potential space structure, the KL divergence regularization constraint is introduced to make the potential variable distribution close to the standard normal distribution:

[0170] ,

[0171] in: is the KL divergence loss; represents the expectation over all samples and time steps; is the latent space dimension, i.e. ; and are the mean and standard deviation of the latent variable in the i-th dimension, respectively. This variational representation enhances the model's ability to model battery state uncertainty and improves the robustness of the feature representation. In battery health monitoring, this uncertainty modeling is crucial for identifying potential faults, as faults often first manifest as increased instability in the system state.

[0172] Furthermore, the present invention designs a cross-modal adaptive fusion mechanism. The latent variable z is combined with the time step embedding information to form the decoder input:

[0173] ,

[0174] in: Decoder input, the dimension is [300, ]; is the time step embedding, with dimension Same, it carries the information of the number of diffusion steps t.

[0175] Through the cross attention layer, the encoder output is realized With decoder input Information interaction:

[0176] ,

[0177] in: Decoder output, dimension is the same as the original data Same, that is, [300,4]; The Transformer decoder includes multiple layers of cross-attention and self-attention mechanisms. In battery management systems, this decoding mechanism can reconstruct the multimodal data patterns of normal battery operation, laying the foundation for subsequent anomaly detection.

[0178] Adaptive fusion weights are designed for the four modes of voltage, current, SOC, and temperature to automatically adjust the importance of each mode under different working conditions:

[0179] ,

[0180] in: is the modal importance matrix, which is dynamically calculated according to the current working condition and has the same dimension as For example, in high-temperature environments, the weight of the temperature mode is automatically increased; in fast-charging scenarios, the weights of the current and voltage modes are correspondingly increased. In electric vehicle applications, this adaptive weighting enables the system to optimize fault detection performance under different driving conditions (such as high-speed cruising, urban congestion, and fast charging).

[0181] Finally, this paper combines the adversarial reconstruction learning strategy to design a multi-objective learning framework. The reconstruction loss is defined to measure the difference between the original data and the reconstructed data:

[0182] ,

[0183] in: For the reconstruction loss, the mean squared error metric is used; is the original noise-free data; Reconstructed data for the model.

[0184] Introducing adversarial learning mechanism to enhance feature discrimination capabilities:

[0185] ,

[0186] in: To combat losses; The discriminator determines whether the data is original data or generated data; is the generator, which is the decoding part of this model; This adversarial training framework forces the model to generate samples that are closer to real battery data, helping to capture subtle fault characteristics. For example, in electric vehicle batteries, this mechanism can help distinguish normal charge and discharge fluctuations from abnormal voltage drops, increasing sensitivity to early faults.

[0187] Combining diffusion loss, KL divergence loss and reconstruction loss, we get the final total loss function:

[0188] ,

[0189] in: is the total loss function; is the diffusion loss, defined as:

[0190] ,

[0191] in: For the noise prediction network, predict the noise added to the data; is the actual noise added. 、 and To balance the hyperparameters of different losses. In the actual application of battery fault detection, the optimal parameter is set to , , This set of parameters balances reconstruction accuracy and feature discriminability, effectively modeling the typical correlation patterns among battery voltage, current, temperature, and SOC. Training uses the Adam optimizer with an initial learning rate of 0.0001, 100 training epochs, and a batch size of 64. Training typically completes in about four hours on a GPU with 8GB of video memory.

[0192] Based on the optimized latent space representation, the present invention calculates the battery state confidence by Mahalanobis distance. First, using the latent variables of normal samples, the mean vector and covariance matrix of the latent space are calculated to construct the benchmark distribution:

[0193] ,

[0194] in: is the mean vector of the latent space, with dimension (e.g. 64); is the sample covariance matrix, with dimension ; N is the normal sample size; For the The latent variables of normal samples have the dimension For example, in an electric vehicle battery monitoring system, 1,000 normal operating samples might be used to establish a baseline distribution covering different charge and discharge states and environmental conditions.

[0195] Before calculating the Mahalanobis distance, principal component analysis (PCA) is first applied to reduce the feature dimension:

[0196] ,

[0197] in: is the feature matrix after dimensionality reduction, and its dimension is is the original latent feature matrix, with dimension is the principal component analysis function; To retain the number of principal components, the minimum dimension that retains 95% of the variance is selected, which is usually much smaller than the original dimension. , and ensure To avoid singularity.

[0198] Use an improved covariance estimation method to ensure that the matrix is nonsingular:

[0199] ,

[0200] in is the regularized covariance matrix, with dimension is the sample covariance matrix, and the calculation formula is diag for The diagonal matrix of ; is the identity matrix; is the shrinkage parameter, which controls the degree of shrinkage to the diagonal matrix. Its value range is [0,1], and is usually set to Load the diagonal parameters to ensure that the minimum eigenvalue is greater than zero, usually set to This regularization method combines the Ledoit-WoIf shrinkage estimation and diagonal loading techniques.

[0201] Compute the robust Mahalanobis distance based on the regularized covariance matrix:

[0202] ,

[0203] in: is the Mahalanobis distance value, scalar; is the dimensionality reduction latent variable of the test sample, with dimension is the mean vector of the latent space after dimensionality reduction, and the dimension is , the calculation formula is is the inverse matrix of the regularized covariance matrix, with dimension , is the difference vector between the test sample and the mean; is the inverse matrix of the covariance matrix; Represents the vector transpose. This distance metric considers the correlation between dimensions in the latent space and is more suitable for characterizing the degree of deviation in multidimensional distributions than the simple Euclidean distance. For example, in battery fault diagnosis, voltage anomalies are often correlated with temperature anomalies. The Mahalanobis distance can capture this correlation and improve detection accuracy.

[0204] Additionally, numerical stability checks for the eigendecomposition are implemented:

[0205] ,

[0206] in is the eigenvector matrix; is the diagonal eigenvalue matrix; in the calculation When the value is less than the threshold (like The eigenvalues of are truncated to ensure numerical stability.

[0207] Then, a nonlinear mapping function is designed to convert the Mahalanobis distance into a standardized confidence value between 0 and 1:

[0208] ,

[0209] in: is the standardized confidence value, ranging from (0,1); is a scaling factor that controls the steepness of the mapping. ,This value can obtain a good confidence distribution on a variety of battery types, so that the confidence of normal samples is mostly concentrated above 0.8, while the confidence of abnormal samples is mostly below 0.5.

[0210] The Mahalanobis distance confidence level reflects the degree of deviation of a test sample from the normal distribution; larger values indicate a higher probability of fault. In practical applications, simply setting a fixed threshold often fails to adapt to dynamic changes in battery performance. Therefore, this paper employs a Bayesian optimization framework to dynamically determine the optimal detection threshold.

[0211] First, the objective function is defined as the proportion of normal samples whose confidence level does not exceed the threshold, which represents the acceptance rate of normal samples under the threshold. The present invention designs an adaptive normal sample identification mechanism that does not require manual labeling:

[0212] ,

[0213] in: For samples The probability of being considered normal; For samples The distance to the data center is measured by the inverse of the data density in the kernel density estimation; is the temperature parameter, which controls the concentration of the probability distribution and is usually set to 2.0; This is the total amount.

[0214] Based on the above probability, a soft indicator function is designed:

[0215] ,

[0216] in: is the improved objective function; is a smooth approximate indicator function, defined as is the smoothing coefficient, which controls the steepness of the function and is usually set to For samples The confidence level of the Mahalanobis distance.

[0217] Introducing a pollution-tolerant robust Bayesian optimization framework:

[0218] ,

[0219] in: is the robust objective function; is the basic objective function, which represents the normal sample acceptance rate; To balance the parameters and control the regularization strength, it is usually set to 0.05; is the risk regularization term, defined as:

[0220] ,

[0221] in: is a normalization constant that makes the first term in the range [0,1]; is the variance weight, usually set to 1.0; is the variance of the objective function estimate, provided by the Gaussian process, reflecting the uncertainty of the threshold decision.

[0222] Kernel density uses adaptive bandwidth selection:

[0223] ,

[0224] in: Confidence The probability density function of As the kernel function, Gaussian kernel is used ; is the adaptive bandwidth parameter, which is automatically adjusted based on the local density. The calculation formula is: , is the basic bandwidth (such as 0.05), is the prior density constant, For samples The density estimate at .

[0225] Introducing a confidence self-calibration mechanism to reduce reliance on initial normal sample judgment:

[0226] ,

[0227] in: is the confidence level after calibration; is the cumulative distribution function of the standard normal distribution; and are the mean and standard deviation of the reference distribution, estimated using extreme value theory rather than relying on known normal samples. Specifically, Taken as the median of the confidence distribution of all samples, Based on the interquartile range estimation of the distribution, this method is robust to the presence of outliers.

[0228] The objective function is transformed into a continuous integral form:

[0229] ,

[0230] Among them: the first is the cumulative distribution function of the normal sample confidence, indicating that the confidence level does not exceed The normal sample ratio of is a regularization term to avoid the problem of being too loose due to a too large threshold. ,This value can effectively prevent the threshold from being excessively relaxed and maintain appropriate ,fault detection sensitivity in electric vehicle battery management.

[0231] Next, we build a Gaussian process regression model and consider the objective function as a Gaussian process:

[0232] ,

[0233] in: represents a Gaussian process; is the mean function, which means The prior mean at is usually initialized to a constant, such as ; is the covariance function, which means and The correlation of the function value at , choose the radial basis kernel function:

[0234] ,

[0235] in: is the signal variance, which controls the fluctuation range of the function value; is the length scale, controlling the smoothness of the function, and the larger The value corresponds to a smoother function. Preferably, , ,This set of parameters performs well in the threshold optimization task for ,various battery types and can capture the impact of threshold changes on ,the objective function.

[0236] Based on the observed sample points, calculate the posterior distribution of the Gaussian process:

[0237] ,

[0238] ,

[0239] in: is the posterior mean function, which means that after observing t sample points, The predicted mean at ; is the posterior covariance function; is the covariance matrix of the observation point, with a dimension of t×t and elements is the covariance vector of the observation point and the candidate point, with a dimension of t and elements is the observed objective function value vector; is the observed threshold point.

[0240] The design expects to improve the acquisition function and balance the use of known information and exploration of unknown areas:

[0241] ,

[0242] in: is the expected improvement value, which means The expected return of observations at is the current optimal target value, is the mean of the posterior distribution of the Gaussian process is the standard deviation of the posterior distribution of the Gaussian process; and The first term of the expected improvement function encourages the selection of points with high predicted means (using known information), while the second term encourages the selection of points with high uncertainty (exploring unknown areas).

[0243] Iterative search for the optimal threshold: Initial random sampling threshold points (such as 10), the range covers the possible threshold interval, such as [1,20], calculate the corresponding Each iteration selects the point with the largest expected improvement Evaluate and update the Gaussian process model; repeat the iteration until the expected improvement value converges (e.g. Or reach the maximum number of iterations (such as 50 times); finally select the threshold that maximizes the objective function as the optimal detection threshold .

[0244] In practical applications, such as an electric vehicle battery management system, the Bayesian optimization framework may start with an initial threshold set (2, 4, 6, 8, 10, 12, 14, 16, 18, 20) and converge to the optimal threshold after about 30 iterations. ,at this time , which means that 95% of normal samples are correctly accepted while minimizing the false alarm rate.

[0245] Based on the calculated battery status confidence and the dynamically optimized optimal detection threshold, the present invention realizes intelligent determination of the battery status and location analysis of the fault cause.

[0246] First, the confidence value of the test sample is compared with the optimal detection threshold. If the confidence value is lower than the threshold, it is judged as a normal state, and if it is higher than the threshold, it is judged as a fault state:

[0247] ,

[0248] in: The battery status determination result; is the Mahalanobis distance confidence of the test sample; is the optimal threshold value obtained by Bayesian optimization. In an electric vehicle application, if the Mahalanobis distance of a test sample is 9.2 and the optimal threshold is 7.3, the battery is considered to be in a faulty state.

[0249] For samples that are judged to be in a fault state, the present invention further analyzes the abnormal contribution of their latent space representation in each dimension. The standardized deviation of the test sample from the normal distribution in each latent dimension is calculated:

[0250] ,

[0251] in: is the standardized deviation of the i-th dimension; d is the dimension of the latent space; is the value of the latent variable of the test sample in the i-th dimension; and are the mean and standard deviation of the normal sample in dimension i, respectively. For example, if the mean of the normal distribution of a dimension is 0 and the standard deviation is 1, and the value of the test sample in this dimension is 3, then the standardized deviation of this dimension is 3, indicating that this is a significantly abnormal dimension.

[0252] Through feature attribution analysis, the abnormal dimension of the latent space is mapped back to the original feature space to identify the feature dimension that contributes most to the abnormality judgment. Specifically, the feature importance score can be calculated:

[0253] ,

[0254] in: is the importance score of feature X; is the mapping weight of feature X to potential dimension i, from the embedding matrix of the model Extracted from. Higher The value indicates that feature X contributes more to the abnormality judgment. For example, in a certain fault case, , , , , which indicates that voltage and temperature characteristics are the main factors leading to fault determination.

[0255] Combined with the time series changes in the original voltage, current, SOC, and temperature data, we further analyze the specific manifestation patterns of abnormal features, such as abnormal fluctuations in the voltage curve and abnormal temperature increases. Based on the feature importance scores and abnormal patterns, we determine the possible fault type and cause.

[0256] For example, if the voltage characteristic contributes the most ( Highest) and an abnormal voltage plateau at the end of charging may indicate lithium deposition in the lithium battery. In electric vehicle applications, this fault often occurs during rapid charging in low-temperature environments, manifesting as a deviation of the voltage curve at the end of charging from the normal charging curve. Reducing the charge rate or increasing the ambient temperature is generally recommended.

[0257] If the temperature signature contributes the most and exhibits localized abnormal temperature rise, a diagnosis of an internal battery short circuit is possible. This is a serious fault that can cause a fire in electric vehicles. The system will typically immediately reduce the charge and discharge currents and, if necessary, disconnect the battery pack.

[0258] If the SOC characteristic contributes the most and differs significantly from the actual capacity, a battery capacity decay fault may be diagnosed. This is a common aging phenomenon that manifests as a decrease in range in electric vehicles. A battery health assessment is generally recommended, and replacement of severely aged battery modules may be considered.

[0259] Finally, the present invention generates a diagnostic report including the severity of the fault, possible causes, and treatment suggestions. The severity of the fault can be quantitatively assessed based on the difference between the confidence level and the threshold, for example:

[0260] ,

[0261] in: is the percentage of the fault severity. For example, if ,but , indicating a fault of medium severity.

[0262] Possible causes are given based on feature contribution and pattern analysis. For example, an abnormal voltage feature (contribution 55%) is manifested as a premature appearance of a voltage platform at the end of charging. Combined with the low temperature environment (-5°C), it is diagnosed as a lithium precipitation failure, which may lead to rapid capacity decay and increased internal resistance.

[0263] The handling suggestions provide corresponding maintenance or replacement guidance based on the fault type, such as: 1) immediately reduce the charge rate to below 0.3C; 2) increase the charging environment temperature to above 10°C; 3) arrange battery health testing to assess capacity loss; 4) if the capacity loss exceeds 20%, consider replacing the affected battery module.

[0264] The method of the present invention has demonstrated excellent performance across a variety of battery types and application scenarios. Taking lithium-ion batteries for electric vehicles as an example, compared to traditional supervised learning methods, the method of the present invention improves fault detection accuracy to 94.8%, reduces false alarm rate to 3.2%, and miss rate to 2.0%, without the need for fault sample labels. During battery aging, the dynamic threshold mechanism enables the system to adaptively adjust the judgment criteria to maintain stable detection performance. In particular, for unknown types of faults, the method of the present invention demonstrates significant advantages, with a detection rate over 15% higher than that of traditional methods.

[0265] The method also offers advantages in computational efficiency. The optimized diffusion Transformer framework achieves real-time latency of less than 200 milliseconds on typical edge computing hardware (e.g., embedded systems equipped with Cortex-A72 processors), meeting the real-time monitoring requirements of battery management systems.

[0266] In summary, this paper proposes an unsupervised battery fault detection method based on a diffusion Transformer and confidence calibration. By innovatively combining the diffusion model with the Transformer architecture, high-precision fault detection is achieved without the need for fault sample labels. It also uses confidence levels for fault identification, providing new insights into battery fault detection. Furthermore, through a dynamic threshold mechanism based on Bayesian optimization, it effectively adapts to the time-varying characteristics of battery performance. This method provides a new technical path for battery health management and has broad application prospects.

[0267] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. An unsupervised battery fault detection method based on diffusion transformer and confidence calibration, characterized by: include: Acquire multimodal time series data during battery operation, including voltage, current, state of charge, and temperature data; Preprocessing the multimodal time series data includes: Cleaning the multimodal time series data based on a physical rule verification mechanism; Normalize the cleaned multimodal time series data; Aligning the preprocessed multimodal time series data based on a dynamic time warping algorithm and sampling using a sliding window technique to obtain aligned sampled data; Build a diffusion transformer self-supervised learning framework, including: performing a nonlinear transformation on the aligned sampled data based on a diffusion process of a cosine scheduling strategy; Based on the multi-scale Transformer architecture, the transformed data is encoded to obtain the latent space representation; Utilizing a cross-modal adaptive fusion mechanism combined with an adversarial reconstruction learning strategy to optimize the latent space representation; Calculating battery state confidence by Mahalanobis distance based on the optimized latent space representation; Adopting Bayesian optimization framework, based on kernel density estimation and Gaussian process regression, combined with expected improvement strategy, the optimal detection threshold is dynamically determined; According to the comparison result of the battery status confidence and the optimal detection threshold, the battery status is determined to be normal or faulty, and the fault cause location analysis is performed in combination with the original multimodal data.

2. The method according to claim 1, characterized in that The cleaning of the multimodal time series data based on the physical rule verification mechanism specifically includes: Performing range and monotonicity checks on the voltage data, wherein the range check ensures that the voltage value is within a preset safe operating range, and the monotonicity check ensures that the voltage shows an overall upward trend during the charging phase; Performing a range check and a stability check on the current data, wherein the range check ensures that the absolute value of the current does not exceed the rated maximum value, and the stability check ensures that the standard deviation of the current within the sliding window is lower than a set threshold; Perform range check and temperature rise rate check on the temperature data, wherein the range check ensures that the temperature is within the allowable range, and the temperature rise rate check ensures that the temperature change per unit time does not exceed a safe rate; The state of charge data is range checked and current consistency checked, wherein the range check ensures that the state of charge value is between 0 and 1, and the current consistency check ensures that the current direction during charging is consistent with the change in the state of charge.

3. The method according to claim 1, characterized in that The normalization processing of the cleaned multimodal time series data specifically includes: Calculating the mean and standard deviation of each feature dimension in the cleaned multimodal time series data; Based on the mean and standard deviation, Z-score standardization is performed on each feature dimension data so that the mean of each feature dimension after transformation is 0 and the variance is 1; Only valid data verified by the physical rules are used to calculate statistics, and abnormal data are not involved in normalization calculations.

4. The method according to claim 1, wherein The aligning of the pre-processed multimodal time series data based on the dynamic time warping algorithm specifically includes: Normalize the distance between observations of the same sensor at different time points to construct a unimodal distance metric; The multimodal alignment cost function is constructed by dynamically allocating weight coefficients based on the inverse of the variance of each modal data. The minimum cumulative cost is calculated recursively through dynamic programming, and the optimal alignment path is determined by backtracking from the end point to the starting point. According to the optimal alignment path, a time-consistent alignment sequence of four dimensions, namely voltage, current, state of charge and temperature, is generated.

5. The method according to claim 1, wherein The sampling by the sliding window technology specifically includes: Set a fixed-size sliding window whose length is a predetermined number of time steps and whose step size is a preset value; Starting from the start position of the aligned sequence, the preset step size is slid along the time axis each time, and the continuous time points within the coverage of the window are extracted to form a subsequence; Repeat the sliding process until the window cannot completely cover the remaining sequence, generating multiple local time series subsequences; The length and step size of the sliding window are adaptively adjusted according to the battery charge and discharge cycle characteristics.

6. The method according to claim 1, characterized in that The diffusion process based on the cosine scheduling strategy specifically includes: Set the total number of diffusion steps and define the cumulative attenuation coefficient and noise injection intensity of each step, so that the noise is added slowly in the early stage of the diffusion process and accelerated in the later stage; gradually adding controlled noise to the aligned sampled data, and gradually converting the original data distribution into a standard normal distribution through a T-step diffusion process; The noise addition process is implemented through reparameterization techniques to ensure that gradients can be backpropagated and support end-to-end training; The attenuation coefficient of the cosine scheduling strategy matches the characteristics of the battery performance degradation curve, enhancing the model's ability to model the battery degradation mechanism.

7. The method according to claim 1, characterized in that The multi-scale Transformer architecture is used to encode the transformed data and obtain the latent space representation, which specifically includes: The transformed data is mapped to a high-dimensional feature space through an embedding matrix, and position encoding is added to preserve the temporal information; Design a multi-head self-attention mechanism so that each attention head focuses on feature patterns at different time scales and captures both long-term and short-term dependencies. Enhance nonlinear expression capabilities through feedforward neural networks, and ensure training stability by combining residual connections and layer normalization; A variational inference network is designed to map the encoded features to the distribution parameters of the latent variables, and KL divergence regularization is introduced to constrain the latent space structure.

8. The method according to claim 1, characterized in that The battery state confidence is calculated based on the optimized latent space representation by Mahalanobis distance, specifically including: Using the latent variables of normal samples, we calculate the mean vector and covariance matrix of the latent space and construct the benchmark distribution. For the latent variable of the test sample, calculate its standardized distance from the center of the benchmark distribution as the Mahalanobis distance confidence; Design a nonlinear mapping function to convert the Mahalanobis distance into a standardized confidence value between 0 and 1; The Mahalanobis distance confidence reflects the degree of deviation of the test sample from the normal state distribution, and a larger value indicates a higher possibility of failure.

9. The method according to claim 1, characterized in that The Bayesian optimization framework is used to dynamically determine the optimal detection threshold, specifically including: The objective function is defined as the proportion of normal samples whose confidence does not exceed the threshold, which represents the acceptance rate of normal samples under the threshold; The kernel density estimation technique is used to smooth the discrete confidence samples into a continuous probability distribution, and a regularization term is introduced to avoid the threshold being too loose. Establish a Gaussian process regression model, treat the objective function as a Gaussian process, and estimate the global optimal solution through a small number of sample points; The design expects to improve the acquisition function, balance the use of known information and exploration of unknown areas, and iteratively search for the optimal threshold; When the expected improvement value converges or reaches the maximum number of iterations, the threshold that maximizes the objective function is selected as the final detection threshold.

10. The method according to claim 1, characterized in that The method of determining whether the battery state is normal or faulty based on the comparison result of the battery state confidence and the optimal detection threshold, and performing fault cause location analysis in combination with the original multimodal data, specifically includes: Compare the confidence value of the test sample with the optimal detection threshold. If the confidence value is lower than the threshold, it is judged as a normal state, and if it is higher than the threshold, it is judged as a fault state. For samples judged to be in a fault state, analyze the abnormal contribution of their latent space representation in each dimension; Combine the raw voltage, current, temperature, and state of charge data to identify the feature dimensions that contribute most to anomaly determination; Based on the abnormal feature dimensions and patterns, the possible fault type and cause are determined, and a diagnostic report is generated that includes the fault severity, possible causes, and treatment suggestions.

Citation Information

Cited By

  • Network performance anomaly detection method based on fused multi-source data

    CN120825421A

  • Low-voltage series arc fault detection method, system and equipment

    CN121276272A

  • Storage battery degradation evaluation method based on threshold self-consistency of normal distribution

    CN121299513A

  • Method, device and equipment for predicting health state of battery of electric vehicle

    CN121299514A

  • An electric vehicle battery state of health prediction method, device and equipment

    CN121299514B