Anomaly Detection Method for Lithium Batteries Based on Long Short-Term Memory Autoencoder

Through the lithium battery abnormality detection method based on long and short-term memory autoencoder, the problem of low automation degree and accuracy in the prior art is solved, unsupervised learning and adaptive threshold setting are realized, and the automation and accuracy of lithium battery abnormality detection are improved.

CN114565008BActive Publication Date: 2025-06-27XIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210034601.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-12
Publication Date
2025-06-27
Estimated Expiration
2042-01-12

AI Technical Summary

Technical Problem

The existing lithium battery abnormality detection methods have low automation and accuracy, and require manual design of characteristics and set thresholds, which are poor in popularity.

Method used

The lithium battery abnormality detection method based on long and short-term memory autoencoder is adopted. By obtaining the cross-current charging voltage curves of normal and abnormal lithium batteries, a long and short-term memory autoencoder model is constructed, and the model is trained to determine the optimal threshold to realize automated abnormality detection.

Benefits of technology

Without prior knowledge building, by only unsupervised learning of normal charging data, the thresholds of normal and abnormal states can be adaptively derived, which improves the degree of automation and accuracy of abnormality detection of lithium batteries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114565008B_ABST
    Figure CN114565008B_ABST
Patent Text Reader

Abstract

The lithium battery anomaly detection method based on the long short-term memory autoencoder disclosed by the present invention is specifically as follows: Obtain the constant current charging voltage curves within the standard service life of normal and abnormal lithium batteries; Divide the charging voltage curves into a training set and a test set; Build a long short-term memory autoencoder model; Input the constant current charging voltage curves of normal lithium batteries into the autoencoder model for training; Use the trained autoencoder model to combine normal and abnormal voltage curves to determine the optimal threshold; Combine the optimal threshold with the autoencoder model to perform anomaly detection on lithium batteries. The method of the present invention improves the accuracy and automation degree of battery anomaly detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of lithium battery detection methods, and particularly relates to a lithium battery anomaly detection method based on a long short-term memory autoencoder. Background Art

[0002] Due to the characteristics of long cycle life, small size, and high energy density of lithium-ion batteries, they have become the most commonly used battery type in energy storage battery packs. However, the safety of the batteries poses challenges to the use of lithium-ion power batteries. As the complexity of battery usage scenarios continues to increase, it is inevitable that the power battery will experience abnormal states such as unstable charging voltage, intermittent current, or abnormal temperature during operation, which may cause battery thermal runaway, physical failure, or internal short circuit, etc. These can lead to the offline of the equipment in use or battery explosion, seriously endangering the safety of the user's person and property. Therefore, the battery management system should be able to accurately identify whether the current working state of the lithium battery is abnormal during the charging and discharging process and give an early warning in a timely manner. Battery users can, based on the early warning, further detect the state of the battery, further analyze the reasons for battery failure, and decide whether to replace the battery or perform cascade utilization on the current battery. Therefore, the lithium-ion battery anomaly detection technology can not only provide reliable guarantee for the safe operation of lithium batteries, but also effectively improve the service life and utilization rate of the batteries, and has important value for the management of lithium-ion power batteries.

[0003] The anomaly detection of lithium-ion power batteries is to judge the anomalies shown by the batteries through models and testing methods. Currently, the main methods include anomaly detection based on parameter identification, statistical anomaly detection, and data-driven anomaly detection methods. The parameter identification method uses a pre-established model and takes the measured values of the current and voltage of the current battery and the estimation of the state of charge (SOC) as inputs to identify the key characteristics of the lithium battery to determine whether the battery is abnormal. The statistical method uses statistical parameters such as the standard deviation and range of battery voltage attributes as a benchmark and defines a method of deviating from the threshold for anomaly detection.

[0004] Data-driven methods have great potential in the abnormal detection of lithium-ion batteries. By using machine learning methods, the intrinsic properties of batteries are mined from the daily detection data of the Battery Management System (BMS). Under artificially calibrated conditions, a supervised learning model for normal batteries is established or an unsupervised clustering method is directly used to achieve the abnormal detection of lithium batteries. This type of method has greatly improved the real-time performance and accuracy of lithium battery abnormal detection. However, when using data-driven methods to detect lithium-ion battery abnormalities, whether using supervised or unsupervised learning methods, most of the features used to judge whether the battery is abnormal need to be manually designed, and the generalization ability for promotion is poor. In addition, most of the thresholds for battery abnormality judgment need to be manually reset according to the change of battery types, and the degree of automation is low. Summary of the Invention

[0005] The purpose of the present invention is to provide a method for abnormal detection of lithium batteries based on long short-term memory autoencoders, which solves the problems of low automation and accuracy in existing detection methods.

[0006] The technical solution adopted by the present invention is that the method for abnormal detection of lithium batteries based on long short-term memory autoencoders is specifically implemented according to the following steps:

[0007] Step 1: Obtain the constant-current charging voltage curves of normal and abnormal lithium batteries within the standard lifespan.

[0008] Step 2: Divide the charging voltage curves in Step 1 into a training set and a test set.

[0009] Step 3: Construct a long short-term memory autoencoder model.

[0010] Step 4: Input the constant-current charging voltage curves of normal lithium batteries into the autoencoder model for training.

[0011] Step 5: Use the trained autoencoder model to combine normal and abnormal voltage curves to determine the optimal threshold.

[0012] Step 6: Combine the optimal threshold and the autoencoder model to perform abnormal detection on lithium batteries.

[0013] The features of the present invention also lie in that

[0014] Step 1 is specifically implemented as follows:

[0015] Under constant current conditions, cyclic charge and discharge are performed on two types of batteries calibrated as normal and abnormal respectively. Each time a charge is carried out, a set of charging voltage data is obtained. Each set of charging voltage data forms a constant current charging voltage curve. Eventually, n constant current charging voltage curves are constructed. According to the observation and comparison of the characteristics of each charging curve, the n constant current charging voltage curves are labeled as the normal charging curve set D n , and the abnormal charging curve set D u .

[0016] Step 2 is specifically implemented according to the following steps:

[0017] Randomly select 60% of the voltage curves of lithium batteries in normal state as the training set X, and the remaining 40% of the normal lithium battery voltage curves and all abnormal lithium battery voltage curves form the test set B. The label set of the lithium batteries in the test set is where y s ∈ {0, 1}, 1 indicates that the lithium battery belongs to normal, and 0 indicates that it belongs to abnormal.

[0018] Step 3 is specifically implemented according to the following steps:

[0019] Step 3.1: Establish an encoder of a long short-term memory neural network. This long short-term memory network includes a forget gate, an input gate, an output gate, a hidden state, a memory cell, and a candidate memory cell. The input layer is a single-sequence time series tensor of (b, t, 1), where b is the size of the data batch during the training process, and the number of hidden layers is set to 1. The hidden layer h e of the encoder has the setting interval k e ∈ [1, 100], and the encoder output is where t represents the size of the voltage curve sliding window;

[0020] Step 3.2: Establish an expansion layer to expand . Repeat t times to expand into a tensor of size (b, t, k e );

[0021] Step 3.3: Establish a decoder of a long short-term memory neural network. The input of this long short-term neural network is the tensor completed in Step 3.2, and the number of hidden layers is set to 1. The hidden layer h d of the decoder has the setting interval k d = k e , and the output of the decoder is a sequence set of each hidden layer vector

[0022] Step 3.4: Establish an output layer. In this layer, first establish a fully connected layer Dense. The input size of this fully connected layer is k d, the output size is 1. The role of the output layer is to repeat t times, input each vector in the set H into the fully connected layer Dense, and splice the results of the t outputs into a tensor (b, t, 1).

[0023] Step 4 is specifically implemented according to the following steps:

[0024] Set the data batch size b, and use the normal state set D′ in the training set n Train the constructed autoencoder. The loss function used during training is the mean square error between the input data and the output data, which is expressed as follows:

[0025]

[0026] where is the true value of the training sample, is the output value of the long short-term memory network autoencoder, and this reconstruction error needs to be minimized during the training process.

[0027] Step 5 is specifically implemented as follows:

[0028] Step 5.1: Set the starting value θ of the threshold start , the step size θ step and the ending value θ end , and establish a threshold set Θ = [θ start : θ step : θ end (2);

[0029] Step 5.2: According to the test set B, assume that the threshold is θ′ ∈ Θ during each loop, and the construction error of the autoencoder for each sample in the test set is AE MSE (z i ), then the predicted value y′ of whether each group of samples is abnormal i is given according to the following conditions:

[0030] y′ i = 1 if AE MSE (z i ) > θ′ (3) y′ i = 0 if AE MSE (z i ) < θ′ (4)

[0031] where the label 1 indicates abnormality;

[0032] Step 5.3: According to the test set B, the prediction result Y′ of whether it is abnormal and the true sample label Y, count the following indicators:

[0033] TP: The number of samples where the true sample is abnormal and is also predicted to be abnormal by the long short-term memory neural network;

[0034] FP: The number of samples that are actually normal but predicted as abnormal by the long short - term memory neural network;

[0035] TN: The number of samples that are actually normal and predicted as normal by the long short - term memory neural network;

[0036] FN: The number of samples that are actually abnormal but predicted as normal by the long short - term memory neural network;

[0037] Step 5.4: According to the metrics calculated in Step 5.3, calculate FPR and TPR according to the following formula:

[0038] FPR = FP / (FP + TN) (5)

[0039] TPR = TP / (TP + FN) (6)

[0040] Step 5.5: According to formula (2), repeat Steps 5.2 to 5.4 to obtain the FPR and TPR sets for all thresholds;

[0041] Step 5.6: Using the FPR set as the abscissa and the TPR set as the ordinate, plot the ROC curve, and select the point (FPR i , TPR i ) closest to (0, 1), and the corresponding threshold θ o is the final threshold.

[0042] Step 6 is specifically implemented as follows:

[0043] For the new cross - current voltage curve x′ of the lithium battery, input it into the long short - term memory auto - encoder established in Step 4, calculate the MSE value AE MSE (x′) between this voltage curve and the voltage curve constructed by the auto - encoder, and refer to the threshold θ o obtained in Step 5, and determine whether the lithium battery is abnormal according to the following conditions:

[0044] y′ = 1 if AE MSE (x′)>θ o (7)

[0045] y′ = 0 if AE MsE (x′)<θ o (8)

[0046] Where y′ = 1 indicates that the battery is operating abnormally, otherwise it is normal.

[0047] The beneficial effects of the present invention are as follows: The lithium battery anomaly detection method based on the long short-term memory autoencoder of the present invention can unsupervised learn the long short-term memory neural network autoencoder only from normal charging data as the estimation model representing the current normal state of the battery. By using only a small amount of abnormal charging data, the thresholds between the normal state and the abnormal state can be adaptively obtained. The present invention does not need to establish prior knowledge about the normal state of lithium-ion batteries in advance, and directly obtains normal data from the daily lithium-ion charging process, which is of great significance for the discrimination of abnormal charging and discharging scenarios in the actual management of lithium-ion batteries. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a flowchart of the lithium battery anomaly detection method based on the long short-term memory autoencoder of the present invention;

[0049] Figure 2 is an overall schematic diagram of the lithium battery anomaly detection method based on the long short-term memory autoencoder of the present invention;

[0050] Figure 3 is a schematic diagram of the unit structure of the long short-term memory neural network in the lithium battery anomaly detection method based on the long short-term memory autoencoder of the present invention;

[0051] Figure 4 is a schematic diagram of the threshold selection method in the lithium battery anomaly detection method based on the long short-term memory autoencoder of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0052] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0053] The lithium battery anomaly detection method based on the long short-term memory autoencoder of the present invention is specifically implemented according to the following steps:

[0054] Step 1: Obtain the constant-current charging voltage curves of normal and abnormal lithium batteries within the standard service life;

[0055] Step 1 is specifically implemented as follows:

[0056] Under constant-current conditions, cyclic charge and discharge are performed on two types of batteries that have been calibrated as normal and abnormal respectively. Each time a charge is performed, a set of charging voltage data is obtained, and each set of charging voltage data forms a constant-current charging voltage curve. Finally, n constant-current charging voltage curves are constructed. According to the observation and comparison of the characteristics of each charging curve, the n constant-current charging voltage curves are labeled as the normal charging curve set D n , and the abnormal charging curve set D u .

[0057] Step 2: Divide the charging voltage curves in Step 1 into a training set and a test set;

[0058] Step 2 is specifically implemented according to the following steps:

[0059] Randomly select 60% of the voltage curves of lithium batteries with normal status as the training set X, and the remaining 40% of the normal lithium battery voltage curves and all abnormal lithium battery voltage curves form the test set B. The label set of the lithium batteries in the test set is where y s ∈ {0, 1}, 1 indicates that the lithium battery is normal, and 0 indicates that it is abnormal

[0060] Step 3: Construct a long short-term memory autoencoder model;

[0061] Step 3 is specifically implemented according to the following steps:

[0062] Step 3.1: Establish an encoder Encoder of a long short-term memory neural network. This long short-term memory network includes a forget gate, an input gate, an output gate, a hidden state, a memory cell, and a candidate memory cell. The input layer is a single-sequence time series tensor of (b, t, 1), where b is the size of the data batch (Batch size) during the training process, and the number of hidden layers is set to 1. Among them, h e represents the hidden layer of the encoder. The number of neurons in this encoder hidden layer h e is set in the range k e ∈ [1, 100]. The output of the encoder Encoder is where t represents the size of the voltage curve sliding window;

[0063] Step 3.2: Establish an expansion layer to expand and repeat it t times to expand into a tensor of size (b, t, k e );

[0064] Step 3.3: Establish a decoder Decoder of a long short-term memory neural network. The input of this long short-term neural network is the tensor after Step 3.2 is completed, and the number of hidden layers is set to 1. Among them, h d represents the hidden layer of the decoder. The number of neurons in this decoder hidden layer h d is set in the range k d = k e , and the output of the decoder is a sequence set of each hidden layer vector

[0065] Step 3.4: Establish an output layer. In this layer, first establish a fully connected layer Dense. The input size of this fully connected layer is k d , and the output size is 1. The role of the output layer is to repeat it t times, input each vector in the set H into the fully connected layer Dense, and splice the results of the t outputs into a tensor of (b, t, 1).

[0066] Step 4: Input the normal lithium battery constant current charging voltage curve into the autoencoder model for training;

[0067] Step 4 is specifically implemented according to the following steps:

[0068] Set the data batch size b, and use the normal state set D' in the training set n Train the constructed autoencoder. The loss function used during training is the mean square error between the input data and the output data, which is expressed as follows:

[0069]

[0070] where is the true value of the training sample, is the output value of the long short-term memory network autoencoder, and this reconstruction error needs to be minimized during the training process.

[0071] Step 5: Use the trained autoencoder model to combine the normal and abnormal voltage curves to determine the optimal threshold;

[0072] Step 5 is specifically implemented as follows:

[0073] Step 5.1: Set the starting value θ start , the step size θ step and the ending value θ end , and establish a threshold set Θ = [θ start :θ step :θ end (2);

[0074] Step 5.2: According to the test set B, assume that the threshold is θ' ∈ Θ during each loop. The construction error of each sample in the test set by the autoencoder is AE MSE (z i ), then the predicted value y' i of whether each group of samples is abnormal is given according to the following conditions:

[0075] y' i = 1 if AE MSE (z i )>θ' (3) y' i = 0 if AE MSE (z i )<θ' (4)

[0076] where the label of 1 indicates abnormality;

[0077] Step 5.3: According to the test set B, the prediction result Y' of whether it is abnormal and the true sample label Y, count the following indicators:

[0078] TP (True Positive): The number of samples where the true sample is abnormal and is predicted to be abnormal by the long short - term memory neural network;

[0079] FP (False Positive): The number of samples where the true sample is normal but is predicted to be abnormal by the long short - term memory neural network;

[0080] TN (True Negative): The number of samples where the true sample is normal and is predicted to be normal by the long short - term memory neural network;

[0081] FN (False Negative): The number of samples where the true sample is abnormal but is predicted to be normal by the long short - term memory neural network;

[0082] Step 5.4: According to the metrics calculated in Step 5.3, calculate the false positive rate FPR (True positive rate) and the true positive rate TPR (True positive rate) according to the following formulas:

[0083] FPR = FP / (FP + TN) (5)

[0084] TPR = TP / (TP + FN) (6)

[0085] Step 5.5: According to formula (2), repeat Steps 5.2 to 5.4 to obtain the FPR and TPR sets for all thresholds;

[0086] Step 5.6: Using the FPR set as the abscissa and the TPR set as the ordinate, draw the ROC curve (Receiver operating characteristic curve), and select the point (FPR i , TPR i ) closest to the upper left corner (0, 1). The corresponding threshold θ o is the final threshold.

[0087] Step 6: Combine the optimal threshold with the auto - encoder model to perform anomaly detection on lithium batteries;

[0088] For the new cross - current voltage curve x′ of the lithium battery, input it into the long short - term memory auto - encoder established in Step 4, calculate the MSE value AE MSE (x′) between this voltage curve and the voltage curve constructed by the auto - encoder, and refer to the threshold θ o obtained in Step 5. According to the following conditions, determine whether the lithium battery is abnormal:

[0089] y′ = 1 if AE MSE (x′)>θ o(7)

[0090] y′ = 0 if AE MsE (x′) < θ o (8)

[0091] Among them, y′ = 1 indicates that the battery is malfunctioning, otherwise it is normal.

Claims

1. A method for abnormal detection of lithium batteries based on a long short-term memory autoencoder, characterized in that, The implementation is specifically carried out according to the following steps: Step 1: Obtain the constant-current charging voltage curves within the standard lifetimes of normal and abnormal lithium batteries; Step 2: Divide the charging voltage curves in Step 1 into a training set and a test set; Step 3: Construct a long short-term memory autoencoder model; Step 3 is specifically carried out according to the following steps: Step 3.

1. Establish an encoder of a long short-term memory neural network. The long short-term memory network includes a forgetting gate, an input gate, an output gate, a hidden state, a memory cell, and a candidate memory cell. The input layer is a single-sequence time series tensor of ( b , , 1), where is the size of the data batch during the training process. The number of hidden layers is set to 1. The setting range of the number of neuron parameters of the hidden layer of the encoder is . The output of the encoder is , where represents the size of the sliding window of the voltage curve; Step 3.2, establish an extended layer, and perform extension on , and repeat times to expand into a tensor of size ( , , ); Step 3.3: Establish a decoder for the long short-term memory neural network. The input of this long short-term neural network is the tensor after Step 3.2, and the number of hidden layers is set to 1. The parameter setting range of the number of neurons in the hidden layer of this decoder is = . The output of the decoder is a sequence set of each hidden layer vector ; Step 3.4: Establish an output layer. In this layer, first establish a fully connected layer. The input size of this fully connected layer is , and the output size is 1. The role of the output layer is to repeat times, input each vector in the set into the fully connected layer, and splice the results of outputs into a tensor ; Step 4: Input the constant-current charging voltage curves of normal lithium batteries into the autoencoder model for training; Step 4 is specifically carried out according to the following steps: Set the data batch size , and use the normal state set in the training set to train the constructed autoencoder. The loss function used during training is the mean square error between the input data and the output data, which is expressed as follows: (1) wherein is the true value of the training sample, is the output value of the long short-term memory network autoencoder, and this reconstruction error needs to be minimized during the training process; Step 5: Use the trained autoencoder model combined with normal and abnormal voltage curves to determine the optimal threshold; Step 5 is specifically implemented as follows: Step 5.1: Set the starting value of the threshold , the step size and the ending value , and establish a threshold set (2); Step 5.

2. According to the test set , assuming that the threshold value is during each loop, and the reconstruction error of each sample in the test set by the autoencoder is , then the predicted value of whether each group of samples is abnormal is given according to the following conditions: (3) (4) Among them, the label of 1 indicates abnormality; Step 5.3, according to the test set , the prediction result of whether it is abnormal and the true sample label , count the following metrics: TP: The number of samples with real samples being abnormal and being predicted as abnormal by the long short-term memory neural network; FP: The number of samples with real samples being normal and being predicted as abnormal by the long short-term memory neural network; TN: The number of samples with real samples being normal and being predicted as normal by the long short-term memory neural network; FN: The number of samples with real samples being abnormal and being predicted as normal by the long short-term memory neural network; Step 5.4: According to the indicators counted in Step 5.3, calculate FPR and TPR according to the following formula: (5) (6) Step 5.5: According to formula (2), repeat Step 5.2 to Step 5.4 to obtain the FPR and TPR sets of all thresholds; Step 5.6: Using the FPR set as the abscissa and the TPR set as the ordinate, plot the ROC curve and select the threshold corresponding to the point ) closest to (0, 1) , which is the final threshold; Step 6: Combine the optimal threshold and the autoencoder model to perform anomaly detection on lithium batteries; Step 6 is specifically implemented as follows: For the new cross-current voltage curve of the lithium battery , input it into the long short-term memory autoencoder established in step 4, and calculate the MSE value between this voltage curve and the voltage curve constructed by the autoencoder , and refer to the threshold value obtained in step 5 , and judge whether the lithium battery is abnormal according to the following conditions: (7) (8) Among them, indicates that the battery is malfunctioning, otherwise it is normal.

2. The method for abnormal detection of lithium batteries based on long short-term memory autoencoder according to claim 1, characterized in that Step 1 is specifically implemented as follows: Under constant current conditions, two types of batteries calibrated as normal and abnormal are cyclically charged and discharged. Each time a charge is performed, a set of charging voltage data is obtained. Each set of charging voltage data forms a constant current charging voltage curve. Finally, constant current charging voltage curves are constructed. By observing and comparing the characteristics of each charging curve, constant current charging voltage curves are labeled as the normal charging curve set , and the abnormal charging curve set .

3. The method for abnormal detection of lithium batteries based on long short-term memory autoencoder according to claim 1, wherein Step 2 is specifically carried out according to the following steps: Randomly select 60% of the voltage curves of lithium batteries with normal status as the training set , The remaining 40% of the voltage curves of normal lithium batteries and all the voltage curves of abnormal lithium batteries form the test set , and the label set of the lithium batteries in the test set is , where , 1 indicates that the lithium battery is normal, and 0 indicates that it is abnormal.

Citation Information

Patent Citations

  • Integrated estimation method for health state of lithium battery pack

    CN113093013A

  • Battery fault prediction method

    CN113791350A