Battery fault early warning method and system based on controllable causes

By constructing a battery fault early warning model based on generative adversarial networks and long short-term memory networks, and using controllable causal vectors to train the model, the accuracy and robustness problems of battery fault early warning in existing technologies are solved, and efficient identification and prediction of battery faults are achieved.

CN122017603APending Publication Date: 2026-05-12HANGZHOU XINRUITE TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU XINRUITE TECHNOLOGY CO LTD
Filing Date
2026-04-07
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing battery fault early warning methods are ineffective in handling complex battery operating conditions and early weak fault characteristics, making it difficult to meet practical application needs. They also lack effective fault precursor feature extraction and suffer from a scarcity of severe fault samples.

Method used

A battery fault early warning model based on generative adversarial networks and long short-term memory networks is constructed. By acquiring the physical causes and state attributes of the battery, a controllable cause vector is constructed. The model is trained using a generator and a discriminator to improve the ability to identify battery faults.

Benefits of technology

It improves the accuracy and precision of battery fault early warning, can accurately predict battery faults in a short period of time in most cases, has strong robustness, and can effectively capture the long-term dependence of battery data to assist in simulating the fault evolution process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122017603A_ABST
    Figure CN122017603A_ABST
Patent Text Reader

Abstract

The invention discloses a battery fault early warning method and system based on controllable causes, and the method comprises the steps: collecting the physical parameters of a battery in an operation process, and obtaining the multivariate time series data of the battery in different time periods; after multivariate time sequence data of a battery is preprocessed, a controllable cause vector is constructed according to the preprocessed data. According to the method, the battery fault early warning model comprising the generator and the discriminator is constructed, the generator and the discriminator take the long-short-term memory network as the core, and the long-short-term memory network is introduced into the generator, so that the dependency relationship of the battery data on a long time span can be effectively captured, and the accuracy of simulating the battery data is improved. And inputting the cause vector and the random noise into a generator to generate a simulation data sequence, and inputting the simulation data sequence and the real data sequence into a discriminator for adversarial training to obtain a final discriminator model. And predicting the fault occurrence probability of the tested battery by using the final discriminator model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of battery fault early warning technology, specifically relating to a battery fault early warning method and system based on controllable causes. Background Technology

[0002] In recent years, with the rapid development of new energy technologies and computer science, battery safety early warning technology has received increasing attention. Lithium-ion batteries are a common energy storage device, characterized by high energy density but also accompanied by safety risks such as thermal runaway. Although battery failure mechanisms are complex and diverse, effective battery fault prediction can significantly improve system safety and reduce the harm caused by accidents. Currently, research on battery fault early warning mainly focuses on the analysis of voltage, current, and temperature (BMS) signals, because these signals can directly reflect the electrochemical state of the battery and often exhibit abnormal changes before battery failure occurs.

[0003] Traditional battery early warning methods are mostly based on fixed safety thresholds or simple machine learning algorithms. These methods often perform poorly when dealing with complex battery operating conditions and early, subtle fault characteristics, making them difficult to meet the needs of practical applications. Therefore, how to extract effective fault precursor features from complex BMS time-series signals, address the problem of scarce severe fault samples, improve the accuracy of battery fault early warning, and utilize advanced deep learning algorithms for intelligent battery early warning has become a current research hotspot and challenge. Summary of the Invention

[0004] To address the aforementioned technical problems, the present invention aims to provide a battery fault early warning method and system based on controllable causes, thereby solving the technical problem of battery fault detection and identification based on battery timing signals.

[0005] In a first aspect, the present invention proposes a battery fault early warning method based on controllable causes, the method comprising:

[0006] Obtain a dataset containing different battery physical parameters, preprocess the data in the dataset to obtain battery data sequences, obtain the physical causes and state attributes of the battery based on the battery data sequences, and construct a controllable cause vector based on the physical causes and state attributes.

[0007] A battery fault early warning model is constructed; the battery fault early warning model includes a generator G and a discriminator D; the generator G is used to map random noise vectors and controllable cause vectors together into a simulated battery data sequence; the discriminator D is used to determine whether the battery data sequence matches its corresponding controllable cause vector.

[0008] The battery fault warning model is trained using different battery data sequences and their corresponding controllable cause vectors, and the trained discriminator is used to provide fault warnings for the tested battery.

[0009] Preferably, the physical causes include operating state components, health state components, operating rate components, and ambient temperature components; the state attributes adopt the fault type component.

[0010] Preferably, the method for obtaining the operating state component is as follows: the operating state of the battery is determined based on the magnitude of the current, and the operating state is uniquely encoded to obtain the operating state component; the health state component is the ratio of the battery's current maximum available capacity to its rated capacity; the operating rate component is the ratio of the average current to the rated capacity; and the ambient temperature component is obtained by normalizing the battery's operating temperature.

[0011] Preferably, the training process of the battery fault early warning model is as follows:

[0012] A subset of battery data sequences and their corresponding controllable causal vectors are selected to form a real data batch. Noise vectors are randomly sampled, and controllable causal vectors corresponding one-to-one with the noise vectors are sampled from the distribution of controllable causal vectors. Different noise vectors and their corresponding controllable causal vectors are input into a generator to obtain a simulated battery data sequence. A simulated data batch is constructed based on the simulated battery data sequence and its corresponding controllable causal vectors. Both the real data batch and the simulated data batch are input into a discriminator, and the discriminator's loss function L is obtained based on the discriminator's discrimination result. D Based on loss function L D Update the network weights of the discriminator;

[0013] Reacquire the sampled random noise vector and construct the corresponding controllable cause vector; input the different noise vectors and the corresponding simulated controllable cause vectors into the generator G to obtain the simulated battery data sequence; input the simulated battery data sequence and the corresponding controllable cause vectors into the discriminator, and obtain the generator's loss function L based on the discriminator's discrimination result. G Based on loss function L G Update the generator's network weights;

[0014] Repeat the above process until the training termination condition is met, thus completing the training of the generator and discriminator in the battery fault warning model.

[0015] Preferably, in the controllable causal vector, the state attributes constituting the controllable causal vector are all in the normal state.

[0016] Preferably, the generator includes an input layer, an intermediate layer, and an output layer connected in sequence. The input layer is used to concatenate a random noise vector and a controllable cause vector into a fusion vector, which is then input into the intermediate layer. In the intermediate layer, the fusion vector is processed sequentially through one or more fully connected layers and a reshaping layer, and the processing result is subjected to a nonlinear transformation of temporal features through a long short-term memory network to obtain the output sequence of the intermediate layer. The output layer is used to process the output sequence of the intermediate layer using an activation function to generate a simulated battery data sequence.

[0017] Preferably, the discriminator includes an input layer, an intermediate layer, and an output layer connected in sequence. The input layer is used to broadcast the controllable cause vector in the time dimension and then concatenate it with the battery data sequence in the feature dimension to obtain a fused sequence. The intermediate layer processes the fused sequence through a long short-term memory network to obtain a condensed representation of the entire sequence. The output layer processes the condensed representation through one or more fully connected layers and activation functions in sequence to obtain the discriminator's discrimination result.

[0018] Preferably, the battery physical parameters include total voltage, total current, maximum temperature, minimum temperature, state of charge, and state of health.

[0019] Preferably, the preprocessing method is as follows: outliers are identified and removed using the interquartile range method, and then missing values ​​are filled using one or more of the following methods: linear interpolation, forward filling, and backward filling.

[0020] Secondly, this invention proposes a battery fault early warning system based on controllable causes, which is used to execute the aforementioned battery fault early warning method. The battery fault early warning system includes a battery data acquisition module, a data preprocessing module, a data enhancement module, and a battery fault early warning module. The battery data acquisition module is used to acquire battery operating physical parameters and obtain battery data sequences for different time periods. The data preprocessing module is used to preprocess the battery data sequences. The data enhancement module is used to construct a controllable cause vector based on the battery data sequences. The battery fault early warning module is used to predict the probability of battery fault occurrence based on the battery data sequences and the controllable cause vector.

[0021] The beneficial effects of this invention are:

[0022] 1. This invention constructs a controllable cause vector based on the physical causes and state attributes of the battery, and trains a battery fault early warning model with the controllable cause vector as a condition. By improving the model to conform to the physical mechanism, the ability to identify normal and abnormal patterns in the data is improved, thereby making the final prediction results more accurate.

[0023] 2. This invention constructs a battery fault early warning model based on the joint construction of generative adversarial networks and long short-term memory networks, which improves the accuracy of battery fault early warning. In most cases, it can accurately predict whether the battery will fail in a short period of time. The model has strong robustness and high application value in the field of battery fault early warning. At the same time, the core timing processing unit of the generator, by using long short-term memory networks, can effectively capture the dependence of battery data (such as voltage, current, and temperature) over a long period of time, thereby assisting in simulating the battery fault evolution process and improving the accuracy of generating simulated battery data sequences. Attached Figure Description

[0024] Figure 1 This is a flowchart of the present invention.

[0025] Figure 2 This is a diagram of the battery fault early warning model in this invention.

[0026] Figure 3 This is a schematic diagram of the prediction results of a multi-class battery fault early warning model.

[0027] Figure 4 This is a bar chart showing the four predictive classification indicators of this invention in a single sample.

[0028] Figure 5 This is a line graph comparing the four predictive classification indicators of this invention under different samples.

[0029] Figure 6 This is a line graph comparing the accuracy of the present invention and a single LSTM model on different samples.

[0030] Figure 7 This is a line graph comparing the accuracy of the present invention and the standard GAN-LSTM on different samples.

[0031] Figure 8 This is a diagram of the confusion matrix of the present invention. Detailed Implementation

[0032] The present invention will be further described below with reference to the accompanying drawings.

[0033] A battery fault early warning method based on controllable causes is proposed. The battery fault early warning system includes a battery data acquisition module, a data preprocessing module, a data augmentation module, and a battery fault early warning module. The battery data acquisition module collects battery operating physical parameters to obtain battery data sequences over different time periods. The data preprocessing module preprocesses the battery data sequences; the data augmentation module constructs a controllable cause vector based on the battery data sequences. The battery fault early warning module predicts the probability of battery fault occurrence based on the battery data sequences and the controllable cause vector.

[0034] like Figure 1 As shown, the battery fault warning method includes the following steps:

[0035] Step 1: Building the dataset

[0036] A dataset containing different battery physical parameters is acquired, ensuring that the time frame of this dataset can predict battery failures in advance, thus providing sufficient warning time for intervention. Battery physical parameters include total voltage, total current, maximum temperature, minimum temperature, state of charge (SOC), and state of health (SOH). Continuous sampling points in the dataset are divided into multiple time windows, and an initial matrix is ​​constructed using data from each time window to facilitate subsequent calculations.

[0037] In this embodiment, the time window length is 10 seconds.

[0038] To ensure data quality, the initial matrix is ​​preprocessed. First, the IQR (interquartile range) method is used to identify and remove extreme outliers. Then, linear interpolation or forward / backward filling methods are used to fill in the original missing values ​​and the blank values ​​generated after removing outliers to ensure the continuity of the time series.

[0039] Step 2: Data Augmentation

[0040] The core purpose of constructing a controllable causal vector is to match a structured conditional vector representing the "cause" and "background state" of each time-series data window. This vector is key to achieving "controllable" generation; it couples the physical mechanism with the data-driven model, making the subsequent training of the Generative Adversarial Network (GAN) no longer a blind data fitting, but a pattern learning under physically meaningful conditional constraints. The construction of the controllable causal vector c is a multi-dimensional feature engineering process; its dimensions and specific values ​​originate from the dataset in step one, or are derived from the basic parameters in the dataset. This is achieved by... (The sentence is incomplete in the original text.) i Construct a corresponding high-dimensional controllable causal vector c. i , forming a group containing (X) i ,c i The controllable cause vector consists of a set of sample pairs. The controllable cause vector comprises physical causes and state attributes. Physical causes include operating state components, health state components, operating rate components, and ambient temperature components; state attributes are fault type components. The specific construction process of each component in the controllable cause vector is as follows:

[0041] 2-1. Operating Status Components

[0042] The battery's operating state (e.g., charging, discharging, resting) is fundamental to determining its data pattern. This feature is extracted from preprocessed data using the following method: the current I within a time window is assessed; if the current... If so, it is determined to be a discharge state; if If so, it is determined to be in a charging state; if If so, it is determined to be in a static state; The preset current threshold is used. One-hot encoding is employed to extract the operating state components for different states. ;in, This is a charging status identifier; This is a discharge state identifier; This is the identifier for the static state.

[0043] In this embodiment, the operating state components corresponding to the charging state, discharging state, and stationary state are respectively: , , .

[0044] 2-2. Health Status Component

[0045] The State of Health (SOH) of a battery is a macroscopic characterization of its internal aging and is crucial for early warning models. This data can be directly obtained from the SOH channel in the dataset and estimated in advance by the BMS (Battery Management System) based on the ampere-hour integration method or internal resistance estimation algorithm. Since the battery's state of health remains essentially unchanged within a short time window (e.g., a few minutes), the initial state of health or the average state of health within the time window is used as the maximum usable capacity for that time window. The state of health is defined as a continuous value and normalized to the interval [0, 1] (e.g., 95% is represented as 0.95) to obtain the state of health components. for:

[0046]

[0047] in, As a component of health status; This represents the current maximum available capacity. This is the rated capacity.

[0048] 2-3. Running rate component

[0049] Charge-discharge rate (C-rate) is a key physical quantity characterizing battery load intensity. High charge-discharge rates are a significant cause of battery abnormalities (especially thermal abnormalities). The operating rate component c for each time window is obtained by comparing the average current with the battery's rated capacity within that time window. rate It is represented as:

[0050]

[0051] Among them, I avg This represents the average current.

[0052] In this embodiment, the discharge rate is positive and the charge rate is negative.

[0053] 2-4. Ambient temperature components

[0054] Battery operating temperature (especially extreme temperatures) is a core environmental factor affecting its safety and lifespan. The average or highest temperature within a single time window is used as the operating temperature for that window, and the operating temperatures of different time windows are normalized, for example, scaled to the [-1, 1] interval, to characterize the degree of deviation from the normal operating temperature; the normalized operating temperature is used as the ambient temperature component c. temp .

[0055] 2-5. Fault Type Components

[0056] The fault type component is the core of achieving "controllable" early warning. It defines the "target state" that the model needs to learn. One-hot encoding is used to encode the normal state and different fault states to obtain the fault type component. ;in, This is the normal state identifier; For fault status identifier; ; The number of fault state types.

[0057] In this embodiment, the fault states include overcurrent warning and low capacity warning; the fault type component corresponding to the overcurrent warning is: The fault type component corresponding to the low capacity warning is: .

[0058] Step 3: Construct a battery fault early warning model

[0059] like Figure 2 As shown, the battery fault early warning model includes a generator G and a discriminator D. The generator G is used to map the random noise vector z and the controllable cause vector c together into a simulated battery data sequence X. fake Discriminator D is used to determine whether the battery data sequence matches its corresponding controllable causal vector c.

[0060] The generator consists of an input layer, an intermediate layer, and an output layer connected in sequence. The input layer concatenates the random noise vector z and the controllable causation vector c into a fused vector, which is then input to the intermediate layer. In the intermediate layer, the fused vector is processed by one or more fully connected layers, and the result is reshaped into a three-dimensional tensor (batch size, sequence length, features) suitable for input to the Long Short-Term Memory (LSTM) network through a reshape layer. The LSM network then performs a nonlinear transformation on the reshaped result to obtain the output sequence of the intermediate layer. The output layer processes the output sequence of the intermediate layer using an activation function to generate a simulated battery data sequence. The simulated battery data sequence is identical to the real battery data sequence (the data in a single time window in step one), both having a size of T×F; where T is the time step and F is the number of feature channels, i.e., the number of battery physical parameters.

[0061] In this embodiment, the random noise vector z is obtained by sampling from a standard normal distribution N(0, 1) or a uniform distribution U(-1, 1), which provides randomness to the generation process to ensure the diversity of the generated samples.

[0062] The discriminator consists of an input layer, an intermediate layer, and an output layer connected in sequence. The input layer broadcasts the controllable causal vector *c* over time, transforming it to a shape of T×K. This T×K vector is then concatenated with the battery data sequence along the feature dimension to obtain a fused sequence of size T×(F+K), where K is the number of feature channels of the controllable causal vector *c*. The intermediate layer uses a layer containing L... D Layer (e.g., L) D A stacked long short-term memory network (LSM) with a resolution of 2 is used to process the fused sequence and obtain a condensed representation of the entire sequence. The output layer then processes the condensed representation through one or more fully connected layers and a sigmoid activation function to obtain a scalar probability value p between [0, 1] as the discrimination result of the discriminator.

[0063] Step 4: Train the battery fault early warning model

[0064] The battery fault early warning model is trained using the set of sample pairs obtained in step two. The specific training process is as follows:

[0065] 4-1. Update the discriminator

[0066] 4-1-1. Randomly select a batch (batch size, M) of real data samples from the set of sample pairs. As a batch of real data; among them. This is a sequence of real battery data; The true controllable causal vector; ; This represents the number of real data samples in a single batch.

[0067] In this embodiment, the real battery data sequences in the real data samples are all normal operating data.

[0068] 4-1-2. Randomly sample M Z-dimensional noise vectors M simulated controllable cause vectors are sampled from the distribution of controllable cause vectors. Each noise vector corresponds one-to-one with a noise vector. Different noise vectors and their corresponding simulated controllable causative vectors are input into the generator G to obtain M simulated battery data sequences. Simulated data batches are constructed based on simulated battery data sequences and their corresponding controllable causal vectors.

[0069] 4-1-3. Input both the real data batch and the simulated data batch into the discriminator, and obtain the discriminator's loss function L based on the discriminator's discrimination results. D The goal of the discriminator is to distinguish the true sample (X) from the real sample. real c) is judged as "true" (probability D(X) real , c)→1), and simulated sample (X) fake c) is judged as "false" (probability D(X) fake (c)→0). Based on the above objective, obtain the loss function L. D The expression is:

[0070]

[0071] in, This indicates the processing procedure of the discriminator.

[0072] 4-1-4. Based on the loss function L D Obtain the network weights θ of the discriminator D d The gradient is calculated, and the Adam optimizer is used to optimize the network weights θ. d Perform a backpropagation and update.

[0073] 4-2. Update the generator

[0074] 4-2-1. Reacquire the sampled random noise vector and construct the corresponding simulated controllable cause vector; input the different noise vectors and the corresponding simulated controllable cause vectors into the generator G to obtain the simulated battery data sequence.

[0075] 4-2-2. Input the simulated battery data sequence and the simulated controllable causal vector into the discriminator, and obtain the generator's loss function L based on the discriminator's discrimination result. G The goal of the generator is to simulate samples (X). fake c) is judged as "true" (probability D(X)fake c)→1). Based on the above objective, obtain the loss function L. G The expression is:

[0076]

[0077] 4-2-3. Based on the loss function L G Obtain the network weights θ of the generator G g The gradient is calculated, and the optimizer is used to optimize the network weights θ. g Perform a backpropagation and update.

[0078] 4-3. Repeat the alternating training process of 4-1 and 4-2 until the preset number of training epochs is reached or the discriminator loss and generator loss reach Nash equilibrium.

[0079] A key technical feature of this invention is that, due to X in the training set real Since the data is only normal, the discriminator D is forced to learn a high-dimensional, non-linear "normal pattern" boundary. That is, the discriminator D learns to determine whether an input data sequence X conforms to the "normal" behavior pattern that should be exhibited under its corresponding cause c.

[0080] Step 5: Battery Fault Warning

[0081] The physical parameters of the battery in real time are collected, and after preprocessing, feature samples containing battery data sequences and controllable cause vectors are constructed. The feature samples are then input into the trained discriminator to predict the probability of battery failure and obtain the prediction results.

[0082] Step Six: Method Evaluation

[0083] The battery fault warning identification results of the model were evaluated using accuracy (acc), precision (pre), recall (rec), F1 score (S), and confusion matrix (Conf), respectively.

[0084] The expression for battery fault identification accuracy is:

[0085]

[0086] Wherein, TP is the number of segments correctly detected as battery faults; FP is the number of non-fault segments incorrectly detected as battery faults; FN is the number of fault segments incorrectly detected as non-faults; and TN is the number of non-fault segments correctly detected as non-faults.

[0087] The expression for the accuracy of battery fault identification is:

[0088]

[0089] The expression for battery fault identification recall rate is:

[0090]

[0091] The expression for the F1 score for battery fault identification is:

[0092]

[0093] Definition rules for confusion matrix (Conf):

[0094] Conf Real fault True and fault-free Predicting Faults TP FN Predicting no failure FP TN

[0095] The discriminator in this invention is used to analyze data, thereby obtaining battery fault early warning evaluation indicators under different experimental parameters and conditions. This invention designs four experiments to evaluate the accuracy and robustness of the controllable causal GAN-LSTM early warning model. The first experiment mainly studies the fluctuation relationship between the model's performance under multiple samples and under a single sample. The second experiment uses the controllable causal GAN-LSTM (this invention) to compare the accuracy with a single LSTM model. The third experiment studies the change in recognition accuracy between models that introduce controllable causal vectors (this invention) and those that do not (such as standard GAN-LSTM classifiers). The fourth experiment mainly compares the classification indicators of this invention with traditional classifiers, including Support Vector Machine (SVM), XGBoost, and Random Forest (RF). For the SVM classifier, the RBF kernel function is used, and the penalty coefficient C is set to 1.0; for XGBoost, the number of trees is set to 100, and the learning rate is set to 0.1. In RF, the number of decision trees is set to 100, and training is performed using Gini mode; for the single LSTM model, the number of LSTM layers is set to 2, and the number of hidden units is 128.

[0096] from Figure 3 As can be seen, the model's predictions are divided into four categories: normal (0), low capacity (1), and overcurrent (2), with the latter two coexisting (3). The figure shows the difference between the predicted results (orange dashed line) and the true labels (blue solid line). The model is able to correctly predict the battery state in the vast majority of cases.

[0097] from Figure 4As can be seen, the accuracy of this invention is 99.47%, precision is 94.08%, recall is 93.64%, and F1 score is 93.70%. All indicators show excellent performance, especially the accuracy, which is almost perfect. These results demonstrate that the performance of this invention is effectively validated in battery fault prediction tasks, particularly in maintaining good stability and a low false alarm rate when handling different battery states. Considering all indicators, the model exhibits high reliability and can effectively cope with different battery fault scenarios.

[0098] from Figure 5 As can be seen, the model exhibits variations in accuracy, precision, recall, and F1 score across different samples. Overall, accuracy shows relatively small fluctuations and remains stable across multiple samples, indicating high consistency and reliability of the model on these samples. Its average accuracy, average precision, average recall, and F1 score are 98.49%, 92.78%, 92.84%, and 92.79%, respectively. Particularly noteworthy is the near-100% accuracy on certain samples (e.g., s1, s8, s17), reflecting extremely high prediction precision for these samples. In summary, the model demonstrates excellent performance across various samples, indicating good generalizability and robustness.

[0099] from Figure 6 As can be seen, the present invention exhibits higher and more stable accuracy across all samples, with an average accuracy improvement of 10.55%. This indicates that, in battery fault prediction tasks, this method, compared to the standard LSTM, is better able to adapt to the characteristics of different samples, especially when dealing with scarce data or high noise levels. Specifically, the accuracy of GAN-LSTM is significantly higher on samples such as s1, s9, and s11, with the largest improvement of 14.77% on sample s11. The overall trend is relatively stable, indicating its strong generalization ability and stability across multiple samples. In contrast, the accuracy of the standard LSTM exhibits significant fluctuations, indicating that the single LSTM model is less adaptable to certain samples.

[0100] from Figure 7As can be seen, across different samples, the overall trend shows that the accuracy of this invention is significantly higher than that of the standard GAN-LSTM on almost all samples, with an average accuracy improvement of 5.38%, demonstrating its superior capability in fault detection tasks. In contrast, the accuracy of the standard GAN-LSTM fluctuates significantly and fails to consistently provide high-quality predictions. The advantage of this invention lies mainly in enhancing the model's adaptability to different battery fault types by introducing a "controllable cause" vector, enabling it to more accurately simulate various complex battery operating conditions and fault scenarios. In this way, this invention not only improves the overall accuracy of the model but also reduces prediction errors caused by data imbalance or extreme fault samples, especially performing better when dealing with complex or extreme battery fault scenarios, exhibiting stronger robustness.

[0101] Furthermore, this invention demonstrates significantly superior accuracy compared to the other three methods on most samples, with accuracy improvements of 5.91%, 3.55%, and 4.02% respectively compared to the other three prediction and classification models, showcasing higher accuracy and reliability. While other models also performed well in terms of accuracy, they were slightly inferior on some samples and exhibited greater fluctuations, particularly XGBoost and SVM, which performed slightly worse on these samples.

[0102] In addition, from Figure 8 It is evident that the "normal" category prediction is accurate, with 23,489 predicted values ​​correctly classified as "normal." This demonstrates that the model's predictions under normal conditions are highly accurate, with virtually no false positives. Furthermore, low capacity and overcurrent also show high correct prediction rates, with 478 and 382 correct predictions respectively, indicating strong classification ability for these two categories.

[0103] As can be seen, this invention is practiced and described through some examples. Those skilled in the art will recognize that appropriate changes or equivalent substitutions can be made to these embodiments and features without departing from the scope and spirit of this invention. Furthermore, under the teachings of this invention, these features and embodiments can be appropriately modified to adapt to specific situations and corresponding materials, so as not to depart from the scope and spirit of this invention. Therefore, this invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of this invention.

Claims

1. A battery fault early warning method based on controllable causes, characterized in that: The method includes: Obtain a dataset containing different battery physical parameters, preprocess the data in the dataset to obtain battery data sequences, obtain the physical causes and state attributes of the battery based on the battery data sequences, and construct a controllable cause vector based on the physical causes and state attributes. A battery fault early warning model is constructed; the battery fault early warning model includes a generator G and a discriminator D; the generator G is used to map random noise vectors and controllable cause vectors together into a simulated battery data sequence; the discriminator D is used to determine whether the battery data sequence matches its corresponding controllable cause vector. The battery fault warning model is trained using different battery data sequences and their corresponding controllable cause vectors, and the trained discriminator is used to provide fault warnings for the tested battery.

2. The battery fault early warning method based on controllable causes according to claim 1, characterized in that: The physical causes include operating state components, health state components, operating rate components, and ambient temperature components; the state attributes adopt the fault type component.

3. The battery fault early warning method based on controllable causes according to claim 2, characterized in that: The method for obtaining the operating state component is as follows: the operating state of the battery is determined based on the magnitude of the current, and the operating state is individually encoded to obtain the operating state component. The health status component is the ratio of the battery's current maximum usable capacity to its rated capacity; The operating rate component is the ratio of average current to rated capacity; The ambient temperature component is obtained by normalizing the battery's operating temperature.

4. The battery fault early warning method based on controllable causes according to claim 1, characterized in that: The training process of the battery fault early warning model is as follows: A subset of battery data sequences and their corresponding controllable causal vectors are selected to form a real data batch. Noise vectors are randomly sampled, and controllable causal vectors corresponding one-to-one with the noise vectors are sampled from the distribution of controllable causal vectors. Different noise vectors and their corresponding controllable causal vectors are input into a generator to obtain a simulated battery data sequence. A simulated data batch is constructed based on the simulated battery data sequence and its corresponding controllable causal vectors. Both the real data batch and the simulated data batch are input into a discriminator, and the discriminator's loss function L is obtained based on the discriminator's discrimination result. D Based on loss function L D Update the network weights of the discriminator; Reacquire the sampled random noise vector and construct the corresponding controllable cause vector; input the different noise vectors and the corresponding simulated controllable cause vectors into the generator G to obtain the simulated battery data sequence; input the simulated battery data sequence and the corresponding controllable cause vectors into the discriminator, and obtain the generator's loss function L based on the discriminator's discrimination result. G Based on loss function L G Update the generator's network weights; Repeat the above process until the training termination condition is met, thus completing the training of the generator and discriminator in the battery fault warning model.

5. The battery fault early warning method based on controllable causes according to claim 1, characterized in that: In the controllable causal vector, the state attributes constituting the controllable causal vector are all normal states.

6. The battery fault early warning method based on controllable causes according to claim 1, characterized in that: The generator includes an input layer, an intermediate layer, and an output layer connected in sequence; the input layer is used to concatenate a random noise vector and a controllable cause vector into a fusion vector, which is then input to the intermediate layer. In the intermediate layer, the fusion vector is processed sequentially through one or more fully connected layers and a reshaping layer, and the processing result is subjected to a nonlinear transformation of temporal features through a long short-term memory network to obtain the output sequence of the intermediate layer; the output layer is used to process the output sequence of the intermediate layer with an activation function to generate a simulated battery data sequence.

7. The battery fault early warning method based on controllable causes according to claim 1, characterized in that: The discriminator comprises an input layer, an intermediate layer, and an output layer connected in sequence. The input layer broadcasts the controllable cause vector in the time dimension and then concatenates it with the battery data sequence in the feature dimension to obtain a fused sequence. The intermediate layer processes the fused sequence through a long short-term memory network to obtain a condensed representation of the entire sequence. The output layer processes the condensed representation through one or more fully connected layers and activation functions in sequence to obtain the discriminator's discrimination result.

8. The battery fault early warning method based on controllable causes according to claim 1, characterized in that: The battery physical parameters include total voltage, total current, maximum temperature, minimum temperature, state of charge, and state of health.

9. The battery fault early warning method based on controllable causes according to claim 1, characterized in that: The preprocessing method is as follows: outliers are identified and removed using the interquartile range method, and then missing values ​​are filled using one or more of the following methods: linear interpolation, forward filling, and backward filling.

10. A battery fault early warning system based on controllable causes, characterized in that: The battery fault early warning system is used to execute the battery fault early warning method based on controllable causes as described in claim 1; the battery fault early warning system includes a battery data acquisition module, a data preprocessing module, a data enhancement module, and a battery fault early warning module; The battery data acquisition module is used to collect the physical parameters of battery operation and obtain battery data sequences at different time periods; the data preprocessing module is used to preprocess the battery data sequences; the data augmentation module is used to construct a controllable cause vector based on the battery data sequences; and the battery fault early warning module is used to predict the probability of battery fault occurrence based on the battery data sequences and the controllable cause vector.