An electric vehicle battery thermal runaway diagnosis method based on unsupervised adversarial learning
This paper proposes a diagnostic method for thermal runaway of electric vehicle batteries that combines unsupervised adversarial learning and two-stage adversarial training with Bi-LSTM and attention mechanisms. This method solves the problems of sample imbalance and insufficient model robustness in the diagnosis of thermal runaway of electric vehicle batteries, and achieves higher diagnostic accuracy and stability.
Patent Information
- Application Number
- CN202411633186.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-11-15
AI Technical Summary
Existing diagnostic methods for thermal runaway in electric vehicle batteries suffer from an imbalance between the number of normal and faulty samples, and existing ensemble models lack robustness, resulting in low accuracy of diagnostic results.
A method for diagnosing thermal runaway in electric vehicle batteries based on unsupervised adversarial learning is adopted. This method involves constructing an ensemble model for two-stage adversarial training, combining Bi-LSTM and attention mechanisms for battery data feature mining, and using an adaptive ensemble voting method for thermal runaway diagnosis.
The model improved recall and accuracy, enhanced sensitivity to thermal runaway electric vehicle batteries, reduced the impact of non-potential thermal runaway electric vehicles and vehicles already identified as having thermal runaway on diagnostic results, and improved the model's stability and accuracy.
Smart Images

Figure CN119758089B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the cross field of battery and artificial intelligence, and relates to a battery thermal runaway diagnosis method for electric vehicles based on unsupervised adversarial learning. BACKGROUND
[0002] Developing electric vehicles is one of the necessary means to cope with the problems of fossil energy depletion and carbon emissions. An important part of electric vehicles is the battery system, which plays a key role in many aspects such as vehicle safety. With the continuous development of new energy vehicles, the number of vehicle fire accidents is increasing, more than 90% of which are induced by battery thermal runaway, which seriously threatens the property and life safety of drivers and passengers.
[0003] To solve the problem of thermal runaway warning, existing methods can be divided into four categories: rule-based methods, experiment-based methods, model-based methods and data-driven methods. Among them, the data-driven method can avoid complex mechanism analysis by adaptively mining electric vehicle battery thermal runaway data features from massive data, has the advantages of simple calculation and strong scalability, and therefore has attracted more and more attention and become one of the emerging research hotspots in this field.
[0004] At present, the data-driven method is mostly a supervised method, which learns the mapping relationship between the operating characteristics of the electric vehicle battery and the thermal runaway occurrence probability through traditional machine learning and neural network methods. However, these supervised methods have two main problems: i) first, due to the scarcity of thermal runaway battery data, there is a serious imbalance between normal samples and fault samples. ii) More importantly, due to the diversity of thermal runaway types, the existing thermal runaway data cannot cover all possible thermal runaways. Therefore, the existing thermal runaway fault diagnosis supervised method is difficult to apply in practice.
[0005] Unsupervised methods can mine patterns from data sets without label annotation, and are not sensitive to the scarcity of thermal runaway battery data. This method is suitable for electric vehicle battery abnormality judgment problems containing a large number of normal samples. At present, the main method is to diagnose battery faults by clustering, which classifies batteries by feature distance, but the difference between electric vehicle batteries in the early and middle stages of thermal runaway and normal batteries is small, so it is difficult to distinguish thermal runaway electric vehicle batteries by using simple distance calculation method for unsupervised clustering. The integrated model can effectively avoid the one-sidedness of single model judgment and improve the stability of the overall model according to the prediction results of multiple base models combined by the integrated method.
[0006] However, the existing integrated model lacks robustness, and its integrated method is usually voting, averaging or weighted averaging, which fails to consider the dynamic adjustment of voting weights of each base model in the test stage, resulting in low accuracy of the diagnosis result. SUMMARY
[0007] To solve the above-mentioned prior art problems, the application adopts an electric vehicle battery thermal runaway diagnosis method based on unsupervised adversarial learning, comprising:
[0008] S1, obtaining an electric vehicle battery data set, preprocessing the electric vehicle battery data set to obtain a training sample set and a test sample set; each training sample in the training sample set is normal electric vehicle battery data;
[0009] S2, constructing an integrated model, using the training sample set to perform two-stage adversarial training on the integrated model to obtain a trained integrated model; the integrated model comprises N basic models; the two-stage adversarial training comprises: first-stage reconstruction training and second-stage adversarial training;
[0010] S3, inputting the test sample set into the trained integrated model to obtain the reconstruction result of each basic model; using an adaptive ensemble voting method to obtain a thermal runaway diagnosis result according to the reconstruction result.
[0011] The training sample set comprises N sub-training sample sets; the basic model n comprises: model ED n,1 and model ED n,2 , ED is an encoder-decoder model; the two-stage adversarial training process of each basic model n comprises:
[0012] S21, inputting the training sample X of the nth sub-training sample set into ED n,1 and ED n,2 for reconstruction training to obtain first reconstruction results and second reconstruction results;
[0013] S22, inputting the first reconstruction results into ED n,2 for adversarial training to obtain generated results;
[0014] S23, calculating a loss function value according to the sample X, the first reconstruction results, the second reconstruction results and the generated results, updating the model parameters according to the loss function value, and obtaining the trained basic model n when the number of iterations reaches a pre-set maximum number of iterations.
[0015] The loss function is:
[0016]
[0017] wherein, is the loss function of ED n,1 , and is the loss function of ED n,2 .
[0018] ED n,1The encoder Encoder n and the decoder Decoder n,1 , ED n,2 The encoder Encoder n and the decoder Decoder n,2 ; the ED n,1 Processing the training sample X includes: inputting the training sample X into the encoder Encoder n , inputting the output of the encoder Encoder n into the decoder Decoder n,1 , and obtaining a first reconstruction result.
[0019] The encoder Encoder n , the decoder Decoder n,1 and the decoder Decoder n,2 all include: Bi-LSTM, attention layer and fully connected layer; wherein the encoder Encoder n Processing the training sample X includes: inputting the training sample X into the Bi-LSTM, inputting the output of the Bi-LSTM into the attention layer, and inputting the output of the attention layer into the fully connected layer to obtain an output result; the Bi-LSTM is a bidirectional long short-term memory network.
[0020] The electric vehicle battery data includes: battery voltage, state of charge, current and temperature.
[0021] The test sample set includes battery data of M electric vehicles; calculating the thermal runaway diagnosis result according to the reconstruction result includes: calculating the reconstruction error of each basic model for the battery data of each electric vehicle according to the reconstruction result, constructing a reconstruction error vector of each basic model according to the reconstruction error, and constructing a reconstruction error matrix according to the reconstruction error vector of each basic model; calculating the thermal runaway diagnosis result according to the reconstruction error matrix; each column of the reconstruction error matrix is a reconstruction error vector of a basic model, and the reconstruction error vector of the basic model is a reconstruction error of the basic model for the battery data of all electric vehicles.
[0022] Calculating the thermal runaway diagnosis result includes:
[0023] S31, sorting the reconstruction error of each column in the reconstruction error matrix Q from large to small to obtain a reconstruction error matrix Q';
[0024] S32, replacing the reconstruction error in the reconstruction error matrix Q' with the corresponding electric vehicle to obtain an electric vehicle matrix V; setting a threshold according to the 3 Sigma rule, and marking the electric vehicle with a reconstruction error greater than the threshold in the electric vehicle matrix V as a potential thermal runaway electric vehicle to obtain a potential thermal runaway electric vehicle matrix;
[0025] S33, count the initial total number of votes in the first row of the potential thermal runaway electric vehicle matrix, count the number of times each electric vehicle in the first row is marked as a potential thermal runaway electric vehicle, and when the proportion of the number of times the electric vehicle is marked to the initial total number of votes is greater than 50%, the electric vehicle is determined to be a thermal runaway electric vehicle;
[0026] S34, count the effective total number of votes in the i+1th row of the potential thermal runaway electric vehicle matrix, count the number of times each electric vehicle in the i+1th row is marked as a potential thermal runaway electric vehicle, and when the proportion of the number of times the electric vehicle is marked to the effective total number of votes is greater than 50%, the electric vehicle is determined to be a thermal runaway electric vehicle; Wherein, i is the iteration number of step S34;
[0027] S35, repeat step S34 until there is no electric vehicle marked as a potential thermal runaway electric vehicle in the potential thermal runaway electric vehicle matrix.
[0028] The effective total number of votes in the i+1th row of the potential thermal runaway electric vehicle matrix is equal to the number of base models minus the number of electric vehicles that have been determined to be thermal runaway electric vehicles.
[0029] Setting the threshold value comprises: calculating the average value μ and the standard deviation σ of the reconstruction error in the reconstruction error matrix Q ′ , and setting the threshold value μ+3σ according to the average value and the standard deviation.
[0030] Advantages:
[0031] 1. The adaptive integrated voting method of the application sorts the reconstruction errors in each column of the reconstruction error matrix Q from large to small, so that the first few rows of the sorted reconstruction error matrix have a high probability of being determined as thermal runaway vehicles, and then the 3σ rule is used to mark potential thermal runaway electric vehicles in the sorted reconstruction error matrix; When determining the thermal runaway vehicles in each row in turn, the number of base models is reduced by the number of vehicles that have been determined to be thermal runaway vehicles as the effective total number of votes, and the thermal runaway electric vehicles are determined according to the proportion of the number of times the electric vehicle is marked as a potential thermal runaway electric vehicle to the effective total number of votes, which can further reduce the influence of non-potential thermal runaway electric vehicles and vehicles that have been determined to be thermal runaway vehicles on subsequent voting, enhance the sensitivity of the model to thermal runaway vehicles, and thus improve the recall rate and accuracy of the model.
[0032] 2. The application adopts a base model of electric vehicle battery data feature mining based on Bi-LSTM and attention mechanism; Bi-LSTM can effectively extract the time sequence characteristics of electric vehicle battery voltage, temperature, SOC and other data in the thermal runaway process; The attention mechanism realizes the differential weight learning of the electric vehicle battery data at different times, further reducing the missed judgment and misjudgment of the base model on the thermal runaway electric vehicle battery;
[0033] 3、The application adopts an electric vehicle battery abnormality mining two-stage adversarial training algorithm; the first stage is a reconstruction training stage, each basic model is trained respectively with the minimum reconstruction error as the target, to provide stable and reliable initial parameters for the second-stage adversarial training; the second stage is an adversarial training stage, gradually improving the model discrimination ability in the maximum confrontation between the fake high-quality electric vehicle battery data and the real electric vehicle battery data. BRIEF DESCRIPTION OF DRAWINGS
[0034] Figure 1 A flowchart of an electric vehicle battery thermal runaway diagnosis method based on unsupervised adversarial learning is provided for the embodiments of the application.
[0035] Figure 2 A battery thermal runaway early warning framework based on unsupervised and ensemble learning is provided for the embodiments of the application.
[0036] Figure 3 A basic model schematic diagram based on Bi-LSTM and attention mechanism is provided for the embodiments of the application.
[0037] Figure 4 A two-stage adversarial training method schematic diagram is provided for the embodiments of the application.
[0038] Figure 5 A reconstruction error difference schematic diagram of M6, M7 and M8 thermal runaway samples and normal samples is provided for the embodiments of the application. DETAILED DESCRIPTION
[0039] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.
[0040] The reconstruction error can quantify the difference between the original data of the electric vehicle battery and the reconstructed data of the model output. The normal electric vehicle battery data is used as the training set in the application, and the trained model can well reconstruct the normal electric vehicle battery data, and the reconstruction error is small. When the thermal runaway data is input, the reconstruction error will obviously increase due to the inconsistent distribution of the thermal runaway data and the normal data. Therefore, the size of the electric vehicle battery reconstruction error is an important basis for judging whether the battery is in thermal runaway.
[0041] As shown in Figure 1 , Figure 2 , the application adopts an electric vehicle battery thermal runaway diagnosis method based on unsupervised adversarial learning, which comprises:
[0042] S1, obtain an electric vehicle battery data set, preprocess the electric vehicle battery data set to obtain a training sample set and a test sample set; each training sample in the training sample set is normal electric vehicle battery data;
[0043] S2, construct an integrated model, perform two-stage adversarial training on the integrated model using the training sample set to obtain a trained integrated model; the integrated model includes N base models; the two-stage adversarial training includes first-stage reconstruction training and second-stage adversarial training;
[0044] S3, input the test sample set into the trained integrated model to obtain a reconstruction result of each base model; and obtain a thermal runaway diagnosis result by using an adaptive ensemble voting method according to the reconstruction result.
[0045] The electric vehicle battery data includes but is not limited to: battery voltage (V), state of charge (SOC), current (I), temperature (T), i.e. X = [V, SOC, I, T...].
[0046] The preprocessing of the electric vehicle battery data set includes: maximum and minimum normalization of the electric vehicle battery data, and dividing the normalized data into a training sample set and a test sample set.
[0047] The training sample set includes N sub-training sample sets; as shown in Figure 4 each base model includes: a model ED1 and a model ED2, ED1 includes: an encoder Encoder and a decoder Decoder1, and ED2 includes an encoder Encoder and a decoder Decoder2; the base model n includes: a model ED n,1 and a model ED n,2 , ED is an encoder-decoder model; ED n,1 includes: an encoder Encoder n and a decoder Decoder n,1 , ED n,2 includes an encoder Encoder n and a decoder Decoder n,2 ; the two-stage adversarial training process of each base model n includes:
[0048] S21, input the training sample X of the nth sub-training sample set into ED n,1 and ED n,2 for first-stage reconstruction training to obtain first reconstruction results and second reconstruction results;
[0049] ED n,1 processing the training sample X includes: inputting the training sample X into the encoder Encoder nThe output of the encoder Encoder n is input into the decoder Decoder n,1 to obtain a first reconstruction result;
[0050] The training target is:
[0051]
[0052] wherein, is a loss function, ED n,1 is a neural network parameter of the encoder Encoder n,2 , and the neural network parameter of the decoder Decoder n,2 is denoted as θ2. After the parameters are initialized, the optimization is passed between the two stages.
[0053] S22, inputting the first reconstruction result into the ED n,2 for second-stage adversarial training to obtain a generated fake sample;
[0054] The training target of this stage is:
[0055]
[0056] In the adversarial training stage, the Decoder n,1 serves as a generator and aims to minimize the difference between the training sample X and the output of the Decoder n,2 to generate fake data as close to the real data as possible; the Decoder n,2 serves as a discriminator and aims to maximize this difference and separate the real data from the reconstructed data of the ED n,1 to improve the ability to distinguish between the complex scene noise of the hot runaway sample and the normal sample with complex scene noise, and finally to expand the reconstruction error difference between the hot runaway sample and the normal sample;
[0057] S23, calculating a loss function value according to the training sample X, the first reconstruction result, the second reconstruction result, and the generated result, updating the model parameters according to the loss function value, and obtaining a trained basic model n when the number of iterations reaches a pre-set maximum number of iterations.
[0058] It should be noted that the first stage and the second stage are alternately performed, and the reconstruction stage and the adversarial stage mutually benefit each other in each iteration training. The reconstruction stage provides stability and reliability for the adversarial stage, and the adversarial stage further clarifies the boundary between the normal data and the hot runaway data for the reconstruction stage. Therefore, the reconstruction stage and the adversarial stage are considered to be equally important for the electric vehicle battery anomaly mining adversarial training, and the coefficients are set to 1. Therefore, the total training target of the two-stage training algorithm is:
[0059]
[0060] wherein, is a loss function of ED n,1 , is a loss function of ED n,2 , θ1 is a neural network parameter of ED n,1 , n,2 is a neural network parameter of ED n , represents calculating the value of the parameter θ1 that makes minimum.
[0061] As shown in Figure 3 , the encoder Encoder n , the decoder Decoder n,1 and the decoder Decoder n,2 each include a Bi-LSTM, an attention layer and a fully connected layer; wherein the Bi-LSTM is obtained by combining two layers of Long Short-Term Memory (LSTM) networks, and the encoder Encoder n processing the training sample X includes:
[0062] inputting the training sample X into the Bi-LSTM to extract the time sequence characteristics of each dimension of the electric vehicle in the thermal runaway process:
[0063] h t = LSTM(X, h t-1 )
[0064] h i = LSTM(X, h i+1 )
[0065] h′ t = a t h t + b t h i + c t
[0066] wherein h t , h t-1 are respectively the output of the first layer of the Bi-LSTM at t time and t-1 time, h i , h i+1 are respectively the output of the second layer of the Bi-LSTM at t time and t+1 time, h′ t is the output of the output layer of the Bi-LSTM, a t , b t are weights, c t is a bias, and LSTM(·) represents the operation process of the LSTM network. The LSTM unit realizes the update and utilization of the multi-dimensional historical information of the electric vehicle battery through three gate structures.
[0067] The output of the Bi-LSTM is input into an attention layer:
[0068] The Bi-LSTM can effectively extract the time sequence correlation of the electric vehicle battery, but does not effectively consider that the importance of each operation data of the electric vehicle battery at different times to the thermal runaway early warning is different. In fact, when calculating the cumulative reconstruction error of the electric vehicle battery in multiple periods, the relative importance of each input variable of the electric vehicle battery in the current time reconstruction error is different, and it is not reasonable to directly consider the reconstruction error calculation of the multi-dimensional time sequence of the electric vehicle battery as the reconstruction error accumulation of the single variable time sequence data anomaly judgment, and it is necessary to give dynamic weights to each dimension reconstruction error at the current time with the change of time. Therefore, the application adds an attention mechanism in the Bi-LSTM network, and after the attention mechanism layer, different weight coefficients are distributed to the feature vectors. The weight coefficient calculation formula is:
[0069]
[0070] Wherein, h′ t , t, h′ j,t , h′ k,t respectively represent the i, j and k elements of h′ t in the output layer of Bi-LSTM at t time, and l is the dimension of the output layer of Bi-LSTM; the weight coefficient of the obtained electric vehicle battery attention mechanism is distributed to the Bi-LSTM output layer data, and h″ t is obtained, and the distribution process is:
[0071] h″ t =A t h′ t
[0072] Wherein, A t is the weight matrix of the attention mechanism layer, which is composed of weight coefficient elements alpha i,j .
[0073] The output of the attention layer is input into a full connection layer to obtain the output result:
[0074] X out =W fc ×h″ t +b fc
[0075] Wherein, W fc is the weight, and b fc is the bias.
[0076] The test sample set includes battery data of M electric vehicles; the calculating the thermal runaway diagnosis result according to the reconstruction result includes: calculating reconstruction errors of each base model for battery data of each electric vehicle according to the reconstruction result, constructing a reconstruction error vector of each base model according to the reconstruction errors, and constructing a reconstruction error matrix according to the reconstruction error vectors of the base models; and the calculating the thermal runaway diagnosis result according to the reconstruction error matrix.
[0077] The calculating the thermal runaway diagnosis result includes:
[0078] S31, sorting the reconstruction errors in each column of the reconstruction error matrix Q from large to small to obtain a reconstruction error matrix Q';
[0079] S32, replacing the reconstruction errors in the reconstruction error matrix Q' with corresponding electric vehicles to obtain an electric vehicle matrix V; and marking the electric vehicles with reconstruction errors greater than a threshold in the electric vehicle matrix V as potential thermal runaway electric vehicles according to the reconstruction error matrix Q' and the 3 Sigma rule to set the threshold, and obtaining a potential thermal runaway electric vehicle matrix.
[0080] S33, counting an initial total number of votes in the first row of the potential thermal runaway electric vehicle matrix, and counting the number of times each electric vehicle in the first row is marked as a potential thermal runaway electric vehicle; when the proportion of the number of times each electric vehicle is marked to the initial total number of votes is greater than 50%, the electric vehicle is determined as a thermal runaway electric vehicle.
[0081] S34, counting an effective total number of votes in the i+1th row of the potential thermal runaway electric vehicle matrix, and counting the number of times each electric vehicle in the i+1th row is marked as a potential thermal runaway electric vehicle; when the proportion of the number of times each electric vehicle is marked to the effective total number of votes is greater than 50%, the electric vehicle is determined as a thermal runaway electric vehicle; wherein i is the iteration number of step S34.
[0082] S35, repeating step S34 until there is no electric vehicle marked as a potential thermal runaway vehicle in the potential thermal runaway electric vehicle matrix.
[0083] The effective total number of votes in the i+1th row of the potential thermal runaway electric vehicle matrix is equal to the number of base models minus the number of electric vehicles determined as thermal runaway electric vehicles.
[0084] The setting the threshold includes: calculating the average value μ and the standard deviation σ of the reconstruction errors in the reconstruction error matrix Q ′ ; and setting the threshold as μ+3σ according to the average value and the standard deviation.
[0085] In one embodiment, the open-source electric vehicle battery data of the National New Energy Vehicle Monitoring and Management Center (NMMC-NEV) is used for experimental result verification. The NMMC-NEV public data set involves 21 groups of batteries, each group of batteries including voltage, current, state of charge, temperature and battery cell data, and the time span is about half a year, and the sampling frequency is 0.1 Hz. Among them, 7 groups of electric vehicle batteries caused combustion due to thermal runaway.
[0086] In one embodiment, the following methods (M1-M8) are compared, and the settings are as shown in Table 1, wherein M8 is the method proposed in the present application.
[0087] M1: supervised method; using a fully connected neural network, the number of hidden layers is 2, the number of neurons in each layer is 32, the learning rate is selected as 0.001, and the optimizer is selected as Adam (Adaptive Method);
[0088] M2: unsupervised clustering method (K-means method);
[0089] M3: unsupervised method based on reconstruction error; using a fully connected neural network, other parameter settings are the same as M1;
[0090] M4: electric vehicle battery thermal runaway early warning framework based on unsupervised and ensemble learning; based on M3, further using an ensemble learning framework to form an ensemble model;
[0091] M5: electric vehicle battery data feature mining basic model based on Bi-LSTM; based on M4, replacing the hidden layer neural network with Bi-LSTM, the number of Bi-LSTM layers is 2, and other parameter settings are the same as M1.
[0092] M6: electric vehicle battery data feature mining basic model based on Bi-LSTM and attention mechanism; based on M5, adding an attention layer after the Bi-LSTM neural network, and the number of neurons is also 32.
[0093] M7: unsupervised anomaly detection (USAD method) of multivariate time series; using three fully connected neural network models (the number of neural network layers is the same as M6) to build an adversarial algorithm.
[0094] M8: the method proposed in the present application; based on M6, using three M6 models to build a two-stage adversarial algorithm, and other parameter settings are the same as M7.
[0095] Table 1 Comparison of method settings and purposes
[0096]
[0097] Because the focus of the anomaly detection task is to focus on abnormal samples, the following indicators are selected:
[0098]
[0099]
[0100]
[0101] Among them, TP represents normal samples identified as normal samples by the model, TN represents abnormal samples identified as abnormal samples by the model, FP represents abnormal samples identified as normal samples by the model, and FN represents normal samples identified as abnormal samples by the model. TNR is the true negative rate, also known as the negative sample recall rate; NPV is the negative predictive value, also known as the negative sample prediction accuracy; MCC is the Matthew correlation coefficient, which can provide more accurate performance evaluation in unbalanced data sets. The larger the above index value, the better the model classification performance.
[0102] 1. Effectiveness verification of unsupervised algorithm based on reconstruction error
[0103] To compare the effect of the electric vehicle battery thermal runaway early warning basic model based on unsupervised learning and the unsupervised clustering method based on distance calculation, M1, M2 and M3 are compared. The following examples are set: M1 and M3 randomly select 7 groups of normal electric vehicle battery samples from the 21 groups of NMMC-NEV public battery data set as the training set, and the test set data is the remaining 14 groups of electric vehicle battery data (including 7 groups of thermal runaway batteries); M2 does not need to be trained and directly analyzes the test set clustering, the test set data value is consistent with M1 and M3. M1, M2 and M3 are tested for 3 times respectively, and the average value is taken as the result. The 3 tests randomly select different normal batteries as the training set, and the remaining batteries as the test set. The NMMC-NEV public data set battery thermal runaway prediction results of M1, M2 and M3 are shown in Table 2.
[0104] Table 2 Comparison of M1, M2 and M1 thermal runaway fault diagnosis results on NMMC-NEV public data set
[0105]
[0106] The negative sample recall rate of the M2 method is increased by 7% compared with the M1 method, the negative sample prediction accuracy is increased by 56% compared with the M1 method, and the Matthew correlation coefficient is also increased by 27% compared with the M1, which can effectively prove that the unsupervised method in the battery thermal runaway detection field has the superiority of dealing with unbalanced data and complex and variable abnormalities compared with the supervised method. The negative sample prediction accuracy of the M3 method is increased by 29% compared with the M2 method, and the Matthew correlation coefficient is also increased by 14% compared with the M2 method, which can prove that the unsupervised thermal runaway anomaly detection method based on reconstruction error can distinguish the slight difference between the data of the electric vehicle battery in the early and middle stages of thermal runaway and the normal battery data, and has the superiority compared with the simple distance calculation unsupervised clustering method. The above results verify the effectiveness of the unsupervised algorithm based on reconstruction error.
[0107] 2, Stability verification of thermal runaway early warning integrated model
[0108] In order to illustrate the stability performance of the integrated model, the application compares the early warning indicators of M and M4. The following examples are set: the training set and the test set of M3 are set as above, the training set and the test set of M4 are the same as M3, and the difference is that M4 respectively trains one basic model by using each group of normal battery data. The NMMC-NEV public data set includes 7 basic models. M3 and M4 are tested for 3 times respectively and are displayed one by one to verify the stability of the M4 integrated model. The 3 tests respectively randomly select different normal batteries as the training set, and the remaining batteries as the test set.
[0109] According to the battery thermal runaway prediction results of the NMMC-NEV public data set of M3 and M4 shown in Table 3, the evaluation indicators of M3 have large fluctuations in the 3 tests, among which the evaluation accuracy of the 1st and 3rd times is low, and the evaluation accuracy of the 2nd time is high. In contrast, the evaluation indicators of the integrated model M4 in the 3 tests are all high, and no fluctuation is detected. The above results show that the electric vehicle battery thermal runaway early warning integrated model has higher stability compared with the basic model.
[0110] Table 3 Comparison of thermal runaway fault diagnosis results of M3 and M4 on NMMC-NEV public data set
[0111]
[0112] 3, Effectiveness verification of the basic model based on Bi-LSTM and attention mechanism
[0113] The early warning accuracy of the integrated framework depends on the feature mining capability of the basic model. In order to effectively improve the feature mining capability of the basic model, the application proposes an electric vehicle battery data feature mining method based on Bi-LSTM and attention mechanism, and takes it as a basic model. In order to illustrate the improvement effect of the method on the model accuracy, the following algorithm is set: the training set and test set of M4 are set as above, and the training set and test set of M5 and M6 are the same as M4. M4, M5 and M6 are tested for 3 times respectively, and the average value is taken as the result. 3 tests are randomly selected from different normal batteries as the training set, and the remaining batteries are taken as the test set. The battery thermal runaway prediction results of M4, M5 and M6 on the NMMC-NEV public data set are as shown in Table 5;
[0114] Table 5 Comparison of M4, M5 and M6 thermal runaway fault diagnosis results on NMMC-NEV public data set
[0115]
[0116] As can be seen from Table 5, compared with M4, the negative sample recall rate and the comprehensive evaluation index Matthew correlation coefficient are increased by 3% and 17% respectively due to the consideration of the time sequence characteristics of the data by M6. The Bi-LSTM network set by M5 and the attention mechanism set by M6 effectively improve the model accuracy, which verifies the effectiveness of the electric vehicle battery data feature mining basic model based on Bi-LSTM and attention mechanism.
[0117] 4. Effectiveness verification of two-stage training algorithm for electric vehicle battery anomaly mining based on adversarial training
[0118] The two-stage training algorithm for electric vehicle battery anomaly mining based on adversarial training aims to improve the ability to distinguish the complex scene noise between the thermal runaway samples and the normal samples with complex scene noise, improve the reconstruction error difference between the thermal runaway samples and the normal samples, and finally improve the model accuracy. In order to illustrate the improvement effect of the method on the model accuracy, the following algorithm is set: the training set and test set of M6 are set as above, and the training set and test set of M7 and M8 are the same as M6. M6, M7 and M8 are tested for 3 times respectively, and the average value is taken as the result. 3 tests are randomly selected from different normal batteries as the training set, and the remaining batteries are taken as the test set.
[0119] The reconstruction error difference of M6, M7 and M8 thermal runaway samples and normal samples is as shown in Table 6. Figure 5 Compared with M6 and M7, the reconstruction error difference of M8 thermal runaway samples and normal samples is obviously improved: in M6 and M7, the reconstruction error value of the thermal runaway sample is about 2-2.5 times that of the normal sample; after two-stage electric vehicle battery anomaly mining adversarial training, in M8, the reconstruction error value of the thermal runaway sample is about 6-8 times that of the normal sample, and the model discrimination ability is obviously improved.
[0120] The battery thermal runaway prediction results of M6, M7 and M8 on the NMMC-NEV public dataset are shown in Table 6, which proves the effectiveness of the two-stage training algorithm for electric vehicle battery anomaly mining based on adversarial training.
[0121] Table 6 Comparison of thermal runaway fault diagnosis results of M6 and M7 on the NMMC-NEV public dataset
[0122]
[0123] The negative sample recall rate of the adversarial training method of M7 and M8 is 11% higher than that of the M6 method, reaching 100%, that is, all thermal runaway vehicles can be completely detected without missing. The negative sample prediction accuracy of M8 is 17% higher than that of M7, that is, the robustness is improved, and the thermal runaway vehicle can be more accurately selected. The Matthew correlation coefficient of M8 is 6% higher than that of M6 and 11% higher than that of M7, which can explain the effectiveness of the two-stage training algorithm for electric vehicle battery anomaly mining based on adversarial training in the field of battery thermal runaway detection.
[0124] In summary, the unsupervised learning method based on reconstruction error and ensemble learning can solve the problem of data scarcity of thermal runaway batteries, improve the stability and reliability of the diagnosis results; the two-stage adversarial training algorithm can expand the difference in reconstruction error between thermal runaway battery data and normal battery data, and improve the robustness and accuracy of the model; the adaptive ensemble voting method uses effective total votes and 3σ rule for ensemble voting, which improves the recall rate and accuracy of the model.
[0125] The above examples further illustrate the purpose, technical solutions and advantages of the present application. It should be understood that the above examples are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made to the present application within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A battery thermal runaway diagnosis method for electric vehicles based on unsupervised adversarial learning, characterized in that, The method comprises the following steps: S1, obtaining an electric vehicle battery data set, preprocessing the electric vehicle battery data set to obtain a training sample set and a test sample set; Each training sample in the training sample set is normal electric vehicle battery data; S2, constructing an ensemble model, performing two-stage adversarial training on the ensemble model using the training sample set to obtain a trained ensemble model; the ensemble model comprises N base models; S3, inputting the test sample set into the trained ensemble model to obtain a reconstruction result of each base model; and obtaining a thermal runaway diagnosis result using an adaptive ensemble voting method according to the reconstruction result; The training sample set includes N sub-training sample sets; the base model n includes: a model and a model , ED is an encoder-decoder model; the two-stage adversarial training process of each base model n includes: S21, input the training samples X of the nth sub-training sample set into the first trained model respectively and perform reconstruction training to obtain a first reconstruction result and a second reconstruction result; S22, input the first reconstruction result into performing the adversarial training to obtain a generation result; S23, calculating a loss function value according to the sample X, the first reconstruction result, the second reconstruction result and the generation result, updating the model parameters according to the loss function value, and obtaining the trained base model n when the number of iterations reaches a pre-set maximum number of iterations; The loss function is: ; ; wherein is a loss function, is a loss function; comprising an encoder and a decoder , comprising an encoder and a decoder ; processing the training sample X comprises inputting the training sample X into the encoder , inputting an output of the encoder into the decoder , to obtain a first reconstruction result; Encoder Decoder and Decoder all comprise: a Bi-LSTM, an attention layer, and a fully connected layer; wherein the Encoder Processing the training sample X comprises: inputting the training sample X into the Bi-LSTM, inputting the output of the Bi-LSTM into the attention layer, and inputting the output of the attention layer into the fully connected layer to obtain an output result; the Bi-LSTM is a bidirectional long short-term memory network. The test sample set comprises battery data of M electric vehicles; calculating the thermal runaway diagnosis result according to the reconstruction result comprises: calculating a reconstruction error of each base model for the battery data of each electric vehicle according to the reconstruction result, constructing a reconstruction error vector of each base model according to the reconstruction error, and constructing a reconstruction error matrix according to the reconstruction error vector of each base model; and calculating the thermal runaway diagnosis result according to the reconstruction error matrix; each column of the reconstruction error matrix is a reconstruction error vector of a base model, and the reconstruction error vector of the base model comprises a reconstruction error of the base model for the battery data of the M electric vehicles; The calculation of the thermal runaway diagnosis result comprises: S31, reconfigure error matrix reconstruct error of each column in the matrix, and obtain a reconfigure error matrix ; S32, replace the reconstruction error in the reconstruction error matrix with the corresponding electric vehicle to obtain an electric vehicle matrix ; set a threshold according to the 3σ rule, mark the electric vehicles with reconstruction errors greater than the threshold in the electric vehicle matrix as potential thermal runaway electric vehicles to obtain a potential thermal runaway electric vehicle matrix; S33, counting the initial total number of votes in the first row of the potential thermal runaway electric vehicle matrix, counting the number of times each electric vehicle in the first row is marked as a potential thermal runaway electric vehicle, and determining that the electric vehicle is a thermal runaway electric vehicle when the proportion of the number of times the electric vehicle is marked to the initial total number of votes is greater than 50%; S34, the first in the statistical matrix of electric vehicles with potential thermal runaway. The total number of valid votes for each row, statistics for the first row. Each electric vehicle in the row is marked as a potential thermal runaway electric vehicle a certain number of times. When the ratio of the number of times an electric vehicle is marked to the total number of valid votes is greater than 50%, it is determined to be a thermal runaway electric vehicle; where i is the iteration number of step S34. S35, repeating step S34 until there is no electric vehicle in the potential thermal runaway electric vehicle matrix that is marked as a potential thermal runaway electric vehicle. 2.The electric vehicle battery thermal runaway diagnosis method based on unsupervised adversarial learning of claim 1, wherein, The electric vehicle battery data comprises: battery voltage, battery state of charge, battery current and battery temperature. 3.The electric vehicle battery thermal runaway diagnosis method based on unsupervised adversarial learning of claim 1, wherein, The number of rows in the potential thermal runaway electric vehicle matrix is equal to the number of base models minus the number of electric vehicles that have been determined to be a thermal runaway electric vehicle. The number of rows in the potential thermal runaway electric vehicle matrix is equal to the number of base models minus the number of electric vehicles that have been determined to be a thermal runaway electric vehicle. 4.The electric vehicle battery thermal runaway diagnosis method based on unsupervised adversarial learning of claim 1, wherein, Setting the threshold comprises calculating a mean value μ and a standard deviation σ of the reconstruction errors in the reconstruction error matrix Setting the threshold comprises calculating a mean value μ and a standard deviation σ of the reconstruction errors in the reconstruction error matrix .
Citation Information
Patent Citations
Method for predicting residual life of power lithium battery in data incomplete scene
CN115032544A
Anomalous battery node detection and mitigation system
US20240319277A1