An abnormal battery cell detection method and device, computer equipment and storage medium
By constructing a convolutional reconstruction model to extract deep features from multidimensional time series data of lithium battery cells, calculating reconstruction errors and setting error thresholds, the problem of low accuracy in lithium battery anomaly detection in existing technologies is solved, achieving higher detection accuracy and adaptability.
Patent Information
- Application Number
- CN202310411580.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-17
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2043-04-17
AI Technical Summary
Existing lithium battery anomaly detection methods suffer from low detection accuracy, especially since the VAE-LSTM-DTW model cannot effectively extract deep features from the data, resulting in insufficient detection accuracy.
By acquiring multiple battery cell time series data, a convolutional reconstruction model is constructed. The deep features of the multidimensional time series data are extracted by alternating convolutional and pooling layers. The reconstruction results are obtained through deep feature reconstruction. After training, the reconstruction error of normal and abnormal battery cells is calculated, and an error threshold is set to identify abnormal battery cells.
It significantly improves the detection accuracy of abnormal battery cells. By using precise error thresholds to determine whether an unknown battery cell is abnormal, it reduces false positives, adapts to changes in the charge and discharge cycle of the battery cell, and improves the accuracy of detection.
Smart Images

Figure CN116430237B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of batteries, and more specifically to a method, apparatus, computer equipment, and storage medium for detecting abnormal battery cells. Background Technology
[0002] Lithium-ion battery energy storage devices play a crucial role in power grids, performing peak shaving, valley filling, frequency regulation, and power supply assurance. They are widely used as a common form of energy storage in power grids. However, as lithium-ion batteries age, their internal resistance increases, leading to a greater risk of thermal runaway and an increased possibility of explosion. Therefore, it is necessary to monitor their operating status to provide a basis for developing subsequent operation, maintenance, and repair plans.
[0003] Anomaly detection methods for lithium batteries are mainly divided into two types: analytical model methods and data-driven methods. Analytical model methods, based on a defined system data model, use particle filters to estimate the system state and achieve fault diagnosis through residuals and thresholds. Data-driven methods, on the other hand, use filters or observers to realize the system state based on the system model and then combine threshold methods for system fault diagnosis. However, these methods cannot determine accurate system thresholds, and the thresholds vary depending on different operating conditions. Unreasonable thresholds can seriously lead to missed or false alarms in system fault detection, severely impacting the safety of energy storage systems.
[0004] Data-driven methods implemented using local outlier factors, clustering algorithms, or machine learning algorithms offer higher reliability and are currently widely studied. Document CN115469227A presents a lithium battery anomaly detection method that integrates variational autoencoders and dynamic warping. This method first acquires the constant-current charging voltage time-series data of normal and abnormal batteries during lithium battery production. Then, it feeds the normal battery data into a constructed VAE-LSTM-DTW model for training, using the data itself as a label to judge the differences between the original data and the reconstructed data. Based on these differences, the reconstruction model is adjusted to make the input and output data as similar as possible. After the reconstruction model is built, both normal and abnormal data are input into the model for reconstruction, and the reconstruction errors for normal and abnormal data are calculated separately. Finally, an optimal threshold is determined based on the difference between the reconstruction errors of abnormal and normal data. In practical use, if the reconstruction error obtained after reconstructing the cell's voltage data is greater than the optimal threshold, the cell is considered an abnormal cell.
[0005] While this detection method has achieved some results, the VAE-LSTM-DTW model used for reconstruction is more suitable for one-dimensional chain data. This model cannot extract deep features of the data, resulting in some errors in detection accuracy. Further improvement and enhancement are needed. Summary of the Invention
[0006] In view of this, the present invention provides a method, apparatus, computer equipment and storage medium for detecting abnormal battery cells, so as to solve the problem of low accuracy in detecting abnormal battery cells.
[0007] In a first aspect, the present invention provides a method for detecting abnormal battery cells. The method includes: acquiring multiple time-series data of various battery cells, including normal and abnormal battery cells; concatenating the time-series data of each type of battery cell according to their categories to generate multi-dimensional time-series data corresponding to each battery cell; training a convolutional reconstruction model by simultaneously using the multi-dimensional time-series data of normal battery cells as input samples and sample labels, the convolutional reconstruction model including convolutional layers, pooling layers, upsampling layers, and fully connected layers; inputting the multi-dimensional time-series data of normal and abnormal battery cells into the convolutional reconstruction model, and calculating the reconstruction errors of normal and abnormal battery cells respectively based on the reconstruction results; determining an error threshold based on the reconstruction errors of normal and abnormal battery cells; inputting the multi-dimensional time-series data of unknown battery cells into the convolutional reconstruction model, and determining the target reconstruction error of unknown battery cells based on the reconstruction results of unknown battery cells; and determining the detection result of unknown battery cells based on the relationship between the target reconstruction error and the error threshold.
[0008] This embodiment acquires a large amount of time-series data of both normal and abnormal battery cells, concatenating these data into a time-related multidimensional time-series dataset. A convolutional reconstruction model is then created based on a convolutional neural network. During training, the multidimensional time-series data of normal battery cells is analogized to an image. Deep features are extracted from the data based on the characteristics of convolutional operations, and the reconstruction results are obtained through deep feature reconstruction. This makes the reconstruction results more similar to the multidimensional time-series data, resulting in higher reconstruction accuracy for the trained convolutional reconstruction model. The reconstruction errors of normal and abnormal battery cell data are calculated separately according to the convolutional reconstruction model. An error threshold is determined based on the reconstruction errors of normal and abnormal battery cells, making the error threshold more accurate. Finally, the detection result of the unknown battery cell is determined based on the relationship between the target reconstruction error and the error threshold, identifying whether the unknown battery cell is abnormal. This significantly improves the detection accuracy of abnormal battery cells.
[0009] In one optional implementation, multidimensional time-series data of normal battery cells are used simultaneously as input samples and sample labels to train a convolutional reconstruction model. This includes: inputting the multidimensional time-series data of normal battery cells into an encoder for downsampling feature extraction to obtain deep features. The encoder consists of multiple alternating convolutional layers and pooling layers, where the first layer of the encoder is a first convolutional layer with a kernel width equal to the number of columns in the multidimensional time-series data. Each column of the multidimensional time-series data is convolved individually by a convolutional kernel. The deep features are then input into a decoder for upsampling reconstruction to obtain reconstructed sequence data of the normal battery cells. The decoder includes fully connected layers and alternating upsampling layers and convolutional layers, where the first layer of the decoder is an upsampling layer and the last layer is a fully connected layer. The reconstructed sequence data has the same dimension as the multidimensional time-series data. Based on the error between the reconstructed sequence data and the multidimensional time-series data of the normal battery cells, the parameters of the encoder and decoder are adjusted. When a preset stopping training condition is met, a convolutional reconstruction model including the encoder and decoder is output.
[0010] The convolutional reconstruction model created in this embodiment extracts deep features from multidimensional time-series data using alternating convolutional and pooling layers. This reduces the size of intermediate features and thus the computational load while ensuring no feature information is lost. Alternating pooling layers increase the receptive field for recognizing data features, improving the model's ability to identify changing data characteristics, and also prevent overfitting to some extent, reducing data reconstruction errors. Furthermore, the encoder's first layer is a convolutional layer with a kernel width equal to the number of columns in the multidimensional time-series data, and the decoder's last layer is also a convolutional layer. This ensures that the output reconstructed sequence data has the same dimensions as the multidimensional time-series data, facilitating data alignment before and after reconstruction and ensuring the accuracy of calculating reconstruction errors. Additionally, each column of the multidimensional time-series data is convolved individually with a single kernel, meaning that a single kernel convolves data of the same type within the multidimensional time-series data. Different types of data do not interfere with each other, preserving the deep features of each type, resulting in clear data distinctions in the reconstruction result. This facilitates comparison of data before and after reconstruction and further ensures the accuracy of calculating reconstruction errors.
[0011] In one optional implementation, multidimensional time-series data of normal and abnormal battery cells are input into a convolutional reconstruction model, and reconstruction errors of normal and abnormal battery cells are calculated respectively based on the reconstruction results; multiple sub-series data are extracted from the multidimensional time-series data of the current battery cell; for each sub-series data, the sub-reconstruction result corresponding to each sub-series data is obtained by reconstructing it through the convolutional reconstruction model; the sub-reconstruction error between each sub-series data and the corresponding sub-reconstruction result is calculated, and the obtained multiple sub-reconstruction errors are sorted from smallest to largest to obtain the reconstruction error sequence of the current battery cell.
[0012] In one optional implementation, the error threshold is determined by the reconstruction errors of normal and abnormal cells, including: determining the quartile error corresponding to the upper quartile from the reconstruction error sequence of each cell according to the box plot algorithm; deleting the maximum and minimum values in each quartile error and calculating the mean error of the remaining quartile errors; calculating a preset multiple of the mean error to obtain the error threshold, wherein the preset multiple ranges from 1.5 to 2.
[0013] After the convolutional reconstruction model training is completed, when setting an error threshold, this embodiment further extracts multiple sub-sequence data from the multi-dimensional time series data of each normal and abnormal cell. A reconstruction error is calculated for each sub-sequence, resulting in multiple reconstruction errors for each cell. These multiple reconstruction errors for the same cell are sorted in ascending order to obtain a reconstruction error sequence for each cell. Then, based on a box plot algorithm, the quartile errors corresponding to the upper quartiles are selected from the reconstruction error sequences of each cell, improving the accuracy of the reconstruction error for each cell. Analysis of the reconstruction error values shows that the reconstruction errors of abnormal cells are generally greater than those of normal cells. To quantitatively analyze the greater reconstruction errors of abnormal cells compared to normal cells, this embodiment first removes the maximum and minimum values from each quartile error, then calculates the mean error of the remaining quartile errors. This mean error can be used as a baseline to analyze the multiple of the reconstruction error of most abnormal cells relative to the mean error. A preset multiple is then set to amplify the mean error, thereby accurately quantifying the difficult-to-quantify error threshold and improving its accuracy. In this embodiment, the range of the preset multiple is determined to be 1.5 to 2 based on the mean, median, and other methods.
[0014] In one alternative implementation, the multiple cell time series data for each cell are all data from the same charge-discharge cycle.
[0015] In this embodiment, the cell time-series data collected are all from the same charge-discharge cycle, ensuring that the subsequently calculated error threshold is applicable to cell detection within the current charge-discharge cycle. As cell performance degrades with use, the cell time-series data changes. If the cell time-series data were from the entire charge-discharge cycle, the error threshold would be inaccurate, leading to detection errors. Therefore, this embodiment calculates the error threshold only for data from the same charge-discharge cycle. A new error threshold is calculated for each charge-discharge cycle, allowing the calculated error threshold to adaptively change with the cell's charge-discharge cycle, further improving the accuracy of abnormal cell detection.
[0016] In one optional implementation, multidimensional time-series data of an unknown battery cell is input into a convolutional reconstruction model, and a target reconstruction error of the unknown battery cell is determined based on the reconstruction result of the unknown battery cell. This includes: extracting multiple segments of subsequence data of the unknown battery cell from the multidimensional time-series data of the unknown battery cell; reconstructing each segment of the unknown battery cell subsequence data using a convolutional reconstruction model to obtain a sub-reconstruction result corresponding to each segment of the unknown battery cell subsequence data; calculating the sub-reconstruction error between each segment of the unknown battery cell subsequence data and the corresponding sub-reconstruction result; and using the set of multiple sub-reconstruction errors of the unknown battery cell as the target reconstruction error.
[0017] In one optional implementation, the detection result of the unknown cell is determined based on the relationship between the target reconstruction error and the error threshold, including: when the number of sub-reconstruction errors exceeding the error threshold in the target reconstruction error reaches a preset number, the unknown cell is determined to be an abnormal cell.
[0018] When an unknown battery cell is detected, this embodiment also extracts multiple sub-sequence data of the unknown battery cell from the multi-dimensional time series data of the unknown battery cell. Then, a sub-reconstruction error is calculated for each sub-sequence data, resulting in multiple sub-reconstruction errors of the unknown battery cell. Then, it is determined whether the number of sub-reconstruction errors exceeding the error threshold reaches a certain preset number. Only if the preset number is reached is the unknown battery cell determined to be an abnormal battery cell. This avoids the situation of misjudgment in a single detection and further improves the accuracy of abnormal battery cell detection.
[0019] Secondly, the present invention provides an abnormal battery cell detection device, comprising: a data acquisition module for acquiring multiple battery cell time series data, the battery cells including normal battery cells and abnormal battery cells; a data splicing module for splicing the battery cell time series data of each type of battery cell in parallel according to type to generate multidimensional time series data corresponding to each battery cell; and a reconstruction model creation module for using the multidimensional time series data of normal battery cells as both input samples and sample labels to train a convolutional reconstruction model, the convolutional reconstruction model including convolutional layers, pooling layers, upsampling layers and fully connected layers; The threshold setting preparation module is used to input multidimensional time series data of normal and abnormal battery cells into the convolutional reconstruction model, and calculate the reconstruction error of normal and abnormal battery cells respectively based on the reconstruction results; the threshold setting module is used to determine the error threshold through the reconstruction errors of normal and abnormal battery cells; the target error determination module is used to input multidimensional time series data of unknown battery cells into the convolutional reconstruction model, and determine the target reconstruction error of unknown battery cells based on the reconstruction results of unknown battery cells; the detection result module is used to determine the detection result of unknown battery cells based on the relationship between the target reconstruction error and the error threshold.
[0020] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the abnormal cell detection method of the first aspect or any corresponding embodiment described above.
[0021] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the abnormal cell detection method of the first aspect or any corresponding embodiment described above. Attached Figure Description
[0022] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0023] Figure 1 This is a flowchart illustrating an abnormal battery cell detection method according to an embodiment of the present invention;
[0024] Figure 2 This is a schematic diagram of the structure of multidimensional time series data according to an embodiment of the present invention;
[0025] Figure 3 This is a schematic diagram of the structure of a convolutional reconstruction model according to an embodiment of the present invention;
[0026] Figure 4 This is a schematic diagram of a convolutional structure according to an embodiment of the present invention;
[0027] Figure 5 This is a schematic diagram of an abnormal battery cell detection device according to an embodiment of the present invention;
[0028] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] According to an embodiment of the present invention, an embodiment of an abnormal battery cell detection method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0031] This embodiment provides a method for detecting abnormal battery cells, which can be used in computer devices such as mobile terminals, personal computers, and servers. Figure 1 This is a flowchart of an abnormal battery cell detection method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0032] Step S101: Obtain multiple time series data of various battery cells, including normal battery cells and abnormal battery cells.
[0033] Specifically, based on the data reconstruction detection methods of related technologies, this embodiment proposes an improved detection method that focuses more on deep data features, improves reconstruction accuracy and error threshold, thereby improving detection accuracy. First, it acquires various time-series data of multiple battery cells, including data from normal and abnormal cells. For each cell, it reads preset types of cell time-series data, including but not limited to voltage, current, battery state of charge (SOC), and temperature. This embodiment uses voltage time-series data and SOC time-series data as examples. On the one hand, this data is used to construct data graphs suitable for convolution; on the other hand, it analyzes the abnormal conditions of the battery cells from multiple perspectives, improving detection accuracy. To ensure the accuracy of subsequent calculations, this embodiment also preprocesses the acquired data. First, it removes empty data from the original dataset. Second, it arranges the original data in chronological order to form time-series data. Third, it divides the entire time period into multiple charge-discharge cycles consisting of each charging, resting, and discharging process according to the positive and negative values of the current. The battery cell time-series data processed in this embodiment includes 260 segments, each containing the cyclic charge-discharge voltage and SOC data of 210 cells, totaling 260 * 210 = 54,600 charge-discharge cycle sample data cells, with a time granularity of minutes. Furthermore, this embodiment uses data from 70% of the normal battery cells as the training dataset to train the reconstruction model; the remaining 15% of normal cells and 50% of abnormal cells as the validation dataset to set the error threshold; and the last 15% of normal data and the remaining 50% of abnormal data as the test dataset to test the model's detection performance.
[0034] Step S102: The time series data of each type of battery cell corresponding to each battery cell are concatenated in parallel according to the type to generate multi-dimensional time series data corresponding to each battery cell.
[0035] Specifically, in this embodiment of the invention, one-dimensional time series data are concatenated side-by-side according to categories, such as... Figure 2 As shown, for example, the first column is voltage data, the second column is SOC data, and each column is a time series, with data in the same row corresponding to the same time point. This data concatenation method transforms one-dimensional time series data into multi-dimensional time series data, analogous to an image, and extracts deep features from the data using a convolutional sliding window approach. Furthermore, multi-dimensional time series data includes multiple data types, enabling deep feature extraction and reconstruction from multiple perspectives. Based on this, a convolutional reconstruction model is created using a convolutional neural network, resulting in a more accurate reconstruction model with smaller errors compared to the original data, thus improving the accuracy of subsequent error threshold calculations. In addition, to improve the training effect of the convolutional reconstruction model, this embodiment also normalizes the multi-dimensional time series data before using the normalized data to train the reconstruction model. Normalization is performed using the following formula:
[0036]
[0037] In the formula, x im This represents the sequence after the feature sequence has been normalized. Represents the original feature sequence. This represents the minimum value of the feature sequence in the sample. This represents the maximum value of the feature sequence in the sample.
[0038] in, Save it as a pkl file, which will be used later to perform inverse normalization on the output of the reconstructed model to obtain reconstructed data in the same form as the original data.
[0039] Step S103: Use the multidimensional time series data of normal battery cells as both input samples and sample labels to train a convolutional reconstruction model. The convolutional reconstruction model includes convolutional layers, pooling layers, upsampling layers, and fully connected layers.
[0040] Specifically, this embodiment constructs a convolutional reconstruction model comprising convolutional layers, pooling layers, upsampling layers, and fully connected layers. The convolutional and pooling layers form an encoder to extract deep features from multidimensional time-series data, while the upsampling, convolutional, and fully connected layers form a decoder to recover the multidimensional time-series data based on these deep features. Then, multidimensional time-series data from normal battery cells are used simultaneously as input samples and sample labels to train the convolutional reconstruction model until the reconstruction result output by the model closely approximates the multidimensional time-series data from normal battery cells. Through the convolutional reconstruction model, features can be extracted from multidimensional time-series data using a sliding window approach, analogous to image processing. This allows the model to be trained based on the extracted deep features, adjusting its parameters to focus more on the detailed patterns in the time-series data, thus improving the model's accuracy. This, in turn, improves the computational accuracy of subsequent steps and accelerates the detection of abnormal battery cells.
[0041] In some optional implementations, step S103 above includes:
[0042] Step a1: Input the multidimensional time series data of normal battery cells into the encoder for downsampling feature extraction to obtain deep features. The encoder is composed of multiple convolutional layers and multiple pooling layers alternately. The first layer of the encoder is the first convolutional layer. The width of the convolutional kernel of the first convolutional layer is the same as the number of columns of the multidimensional time series data. Each column of the multidimensional time series data is convolved separately by the convolutional kernel.
[0043] Step a2: Input the deep features into the decoder for upsampling reconstruction to obtain the reconstructed sequence data of the normal battery cell. The decoder includes a fully connected layer and multiple alternating upsampling layers and multiple convolutional layers. The first layer of the decoder is an upsampling layer and the last layer is a fully connected layer. The reconstructed sequence data has the same dimension as the multidimensional time series data.
[0044] Step a3: Based on the error between the reconstructed sequence data and the multidimensional time series data of the normal battery cell, adjust the parameters of the encoder and decoder. When the preset stop training condition is met, output the convolutional reconstruction model including the encoder and decoder.
[0045] Specifically, the convolutional reconstruction model provided in this embodiment of the invention includes an encoder and a decoder. The encoder consists of alternating convolutional layers and pooling layers, while the decoder consists of alternating upsampling layers and convolutional layers. The use of alternating convolutional and pooling layers to extract deep features from multidimensional time-series data can reduce the size of intermediate features while ensuring no loss of feature information, thereby reducing computational load. Alternating pooling layers can increase the receptive field for recognizing data features, improving the model's ability to identify changing data characteristics, and to some extent preventing overfitting and reducing data reconstruction errors. Figure 3 As shown, apart from the input and output layers, this embodiment adopts a 9-layer network structure. The encoder includes a first convolutional layer, a first pooling layer, a second convolutional layer, and a second pooling layer. The decoder includes a first upsampling layer, a third convolutional layer, a second upsampling layer, and a fourth convolutional layer. Finally, the reconstructed structure is output through a fully connected layer.
[0046] In addition, such as Figure 4 As shown, the first layer of the encoder is a convolutional layer, and the width of the convolution kernel is the same as the number of columns in the multidimensional time series data. Each column of the multidimensional time series data is convolved individually by the convolution kernel. This ensures that the data type of the result after convolution is consistent with that of the data before convolution (it should be noted that in order to ensure that the size before and after convolution is the same, the input data is also appropriately expanded before convolution in this embodiment). Although the traditional convolution operation method merges all data points in the convolution kernel into one data, which can make the data of different cells more distinguishable, this embodiment considers that different types of data usually have different units and inconsistent data ranges. If large data and small data are merged together, the differences between small data will be buried. In addition, it is not easy to trace the source when there is a problem with the data. Therefore, this embodiment uses a convolution kernel with the same width as the number of columns in the multidimensional time series data, and the length can be customized. Then, each column of the multidimensional time series data is convolved individually by the convolution kernel. For example: Set the input to multidimensional time series data with a time length of 35, including voltage data and SOC data (i.e., a 35*2 matrix). Set the convolution kernel size to a 4*2 matrix. The convolution kernel slides along the time direction with a stride of 1 on the input data, such that each element in the voltage data column is multiplied by the corresponding element in the convolution kernel column, and then summed. Similarly, each element in the SOC data column is multiplied by the corresponding element in the convolution kernel column, and then summed. Assume the input multidimensional time series data is X = [x1,…,x…]. t The convolution kernel is F = (f1, ..., f2). K Therefore, the output of the first convolutional layer is: In the first convolutional layer, K=4 and t=35. To ensure that the reconstructed data has the same size as the original data, the number of neurons and the kernel size of the last convolutional layer are the same as those of the first convolutional layer (in a 9-layer network structure, the last convolutional layer is the fourth convolutional layer). This facilitates data alignment before and after reconstruction and ensures the accuracy of calculating the reconstruction error. Furthermore, each column of the multidimensional time series data is convolved separately using a single kernel. This means that a single kernel is used to convolve data of the same type in the multidimensional time series data, preventing interference between different types of data and preserving their respective deep features. This ensures that the data types in the reconstruction result remain distinct, facilitating data comparison before and after reconstruction and further guaranteeing the accuracy of calculating the reconstruction error.
[0047] Furthermore, taking a 9-layer network structure as an example, for the first and second pooling layers, average pooling is used, with a kernel size of 2*2. This means a sliding window operation of size 2 is applied to the output of the first convolutional layer, and the mean value in each window is used as the output of that layer. Therefore, the number of neurons in these two layers is set to 18 and 9, respectively. For the second and third convolutional layers, the number of neurons is set to 18, the input time step is set to 18, and the kernel size is set to 3*2, i.e., K=3, t=18, according to the above formula... The output signal of the next layer is calculated. For the first and second upsampling layers, the output value of the previous layer is amplified using a linear interpolation algorithm, with the number of output neurons set to 18 and 35, respectively. The last layer is a fully connected layer with the ReLU activation function set, the mean absolute error function set as the loss function, and the Adam optimizer set as the model optimizer.
[0048] Based on the above model results, utilizing a large amount of normal battery cell data, and adjusting the encoder and decoder parameters according to the error between the reconstructed sequence data and the multidimensional time series data of normal battery cells, when a preset stopping training condition is met (e.g., the error is less than a preset threshold or the number of training iterations is greater than a preset number of iterations), a convolutional reconstruction model composed of the encoder and decoder is output. This embodiment, based on the characteristics of convolutional operations, extracts deep features from the data from multiple angles and obtains the reconstruction result through deep feature reconstruction, making the reconstruction result more similar to the multidimensional time series data. The reconstruction accuracy of the trained convolutional reconstruction model is higher. Therefore, the reconstruction errors of normal and abnormal battery cell data are calculated separately according to the convolutional reconstruction model. Then, the error threshold is determined by the reconstruction errors of normal and abnormal battery cells, making the error threshold more accurate. Finally, the detection result of the unknown battery cell is determined based on the relationship between the target reconstruction error and the error threshold, identifying whether the unknown battery cell is an abnormal battery cell, which can significantly improve the detection accuracy of abnormal battery cells.
[0049] Step S104: Input the multidimensional time series data of normal and abnormal battery cells into the convolutional reconstruction model, and calculate the reconstruction error of normal and abnormal battery cells respectively based on the reconstruction results.
[0050] Specifically, after the convolutional reconstruction model is trained, this step inputs the multi-dimensional time-series data of both normal and abnormal battery cells from the verification dataset into the convolutional reconstruction model, resulting in multiple reconstruction results. Then, the reconstruction error between each reconstruction result and the corresponding multi-dimensional time-series data is calculated, yielding the reconstruction errors for multiple normal battery cells and multiple abnormal battery cells. The reconstruction error can be calculated using error algorithms such as mean absolute error, mean squared error, and mean absolute percentage error. This embodiment uses the mean absolute error algorithm to calculate the reconstruction error, with the formula: Where x t Let x be the input value of x at time t, and x′ be the input value of x. t Let t be the model output value at time t, n be the number of model input features (n=2 in this embodiment), and T be the time series length of the model input (T=35 in this embodiment).
[0051] Step S105: Determine the error threshold by the reconstruction error of normal cells and abnormal cells.
[0052] Specifically, since the convolutional reconstruction model is trained based on data from normal battery cells, if the input model uses normal battery cell data, the output reconstructed data should be close to the input data, resulting in a smaller reconstruction error. Conversely, if the input model uses abnormal battery cell data, the output reconstructed data should differ significantly from the input data, resulting in a larger reconstruction error. This embodiment determines an error threshold that characterizes battery cell abnormalities by measuring the distance between the reconstruction errors of normal and abnormal battery cells. When the reconstruction error of a battery cell exceeds or falls below the error threshold (in this embodiment, exceeding the error threshold is used), the battery cell is considered abnormal.
[0053] Step S106: Input the multidimensional time series data of the unknown battery cell into the convolutional reconstruction model, and determine the target reconstruction error of the unknown battery cell based on the reconstruction result of the unknown battery cell.
[0054] Step S107: Determine the detection result of the unknown cell based on the relationship between the target reconstruction error and the error threshold.
[0055] Specifically, once the error threshold is set, for any unknown battery cell, the target reconstruction error of the cell can be calculated using a convolutional reconstruction model. Then, the magnitude of the error threshold and the target reconstruction error are compared to determine the detection result of the unknown battery cell. For example, if the target reconstruction error exceeds the error threshold, the unknown battery cell is determined to be an abnormal battery cell; if the target reconstruction error does not exceed the error threshold, the unknown battery cell is determined to be a normal battery cell.
[0056] This embodiment acquires a large amount of time-series data of both normal and abnormal battery cells, concatenating these data into a time-related multidimensional time-series dataset. A convolutional reconstruction model is then created based on a convolutional neural network. During training, the multidimensional time-series data of normal battery cells is analogized to an image. Deep features are extracted from the data based on the characteristics of convolutional operations, and the reconstruction results are obtained through deep feature reconstruction. This makes the reconstruction results more similar to the multidimensional time-series data, resulting in higher reconstruction accuracy for the trained convolutional reconstruction model. The reconstruction errors of normal and abnormal battery cell data are calculated separately according to the convolutional reconstruction model. An error threshold is determined based on the reconstruction errors of normal and abnormal battery cells, making the error threshold more accurate. Finally, the detection result of the unknown battery cell is determined based on the relationship between the target reconstruction error and the error threshold, identifying whether the unknown battery cell is abnormal. This significantly improves the detection accuracy of abnormal battery cells.
[0057] In some alternative implementations, step S104 includes:
[0058] Step b1: Extract multiple sub-sequence data from the current multi-dimensional time series data of the battery cell;
[0059] Step b2: For each subsequence data segment, the sub-reconstruction result corresponding to each subsequence data segment is obtained by reconstructing it using a convolutional reconstruction model;
[0060] Step b3: Calculate the sub-reconstruction error between each sub-sequence data segment and the corresponding sub-reconstruction result, and sort the obtained sub-reconstruction errors from smallest to largest to obtain the reconstruction error sequence of the current cell.
[0061] Meanwhile, in this embodiment of the invention, step S105 includes:
[0062] Step c1: Determine the quartile error corresponding to the upper quartile from the reconstruction error sequence of each cell using the box plot algorithm;
[0063] Step c2: Delete the maximum and minimum values of each quartile error, and calculate the mean error of the remaining quartile errors;
[0064] Step c3: Calculate the preset multiple of the mean error to obtain the error threshold. The preset multiple ranges from 1.5 to 2.
[0065] Specifically, for ease of explanation of the principle and discussion of the beneficial effects, steps b1-b3 and c1-c3 are described as a whole. To further improve the accuracy of the error threshold, compared with the related technology that uses a single reconstruction error to determine the threshold, this embodiment of the invention proposes an error threshold determination method that calculates multiple thresholds and then filters them. First, multiple sub-sequence data segments are extracted from the multidimensional time series data of the current battery cell. For example, the multidimensional time series data of the current battery cell includes data from 500 time points. After extracting data from time points 1 to 35, data from time points 2 to 36 are extracted, and so on, to extract multiple sub-sequence data segments. Then, for each sub-sequence data segment, a convolutional reconstruction model is used to obtain the sub-reconstruction result corresponding to each sub-sequence data segment, and the reconstruction error between each sub-reconstruction result and the corresponding sub-sequence data is analyzed. Multiple reconstruction errors can be calculated for the current battery cell. Then, the obtained reconstruction errors are sorted from smallest to largest to obtain the reconstruction error sequence of the current battery cell. For each normal and abnormal battery cell, each battery cell is traversed to obtain the reconstruction error sequence of each battery cell.
[0066] Next, for each cell, a box plot is plotted using the cell's reconstruction error sequence. The quartile error corresponding to the upper quartile of each reconstruction error sequence is determined. The quartile error for each cell is then used as its reconstruction error. Reconstruction errors exceeding the quartile error for any cell are considered outliers, indicating an abnormal cell. In the validation sample set, which cells are normal and which are abnormal are known in advance. Since the reconstruction errors of abnormal cells are generally larger than those of normal cells, analyzing the distance and variation patterns between the quartile errors of abnormal and normal cells allows us to determine the most representative abnormal reconstruction error. Using this abnormal reconstruction error as the error threshold is accurate and reasonable. Based on this, in order to quantitatively analyze the distance between the quartile errors of abnormal cells and normal cells, this embodiment first deletes the maximum and minimum values of each quartile error (to eliminate unreasonable data), then calculates the mean error of the remaining quartile errors, and uses the mean error as a baseline to analyze the multiple of the reconstruction error of most abnormal cells relative to the baseline. In this way, a preset multiple is set to amplify the mean error, thereby accurately quantifying the error threshold, which is difficult to quantify, and improving the accuracy of the error threshold. Specifically, the preset multiple can be determined based on the average or median distance of the reconstruction error of abnormal cells relative to the baseline. This embodiment does not impose special limitations on the calculation method. The range of the preset multiple determined by the difference in the average absolute error obtained from the test set, abnormal cells, and normal cells should be between 1.5 and 2, with 1.6 being optimal.
[0067] In some optional implementations, the time series data of various battery cells used in training and testing in steps S101 to S107 are all data from the same charge-discharge cycle.
[0068] Specifically, in this embodiment, the cell time-series data collected all use data from the same charge-discharge cycle, ensuring that the subsequently calculated error threshold is applicable to cell detection within the current charge-discharge cycle. Since cell performance degrades with use, its time-series data changes. If the cell time-series data were full-cycle data, it would lead to inaccurate error threshold settings and detection errors. Therefore, the error threshold set in this embodiment is calculated only for data from the same charge-discharge cycle. This embodiment also calculates a new error threshold for each charge-discharge cycle using cell samples, allowing the calculated error threshold to adaptively change with the cell's charge-discharge cycle. For the detection of unknown cells, an appropriate error threshold is selected based on the current charge-discharge cycle sequence of the unknown cell, further improving the accuracy of abnormal cell detection.
[0069] In some optional implementations, step S106 above includes:
[0070] Step d1: Extract multiple segments of subsequence data of unknown battery cells from the multidimensional time series data of unknown battery cells.
[0071] Step d2: For each sub-sequence data of the unknown battery cell, the sub-reconstruction result corresponding to each sub-sequence data of the unknown battery cell is obtained by reconstructing it through a convolutional reconstruction model.
[0072] Step d3: Calculate the sub-reconstruction error between each sub-sequence data segment of the unknown battery cell and the corresponding sub-reconstruction result, and take the set of multiple sub-reconstruction errors of the unknown battery cell as the target reconstruction error.
[0073] In this embodiment, step S107 includes:
[0074] Step e1: When the number of sub-reconstruction errors exceeding the error threshold in the target reconstruction error reaches a preset number, the unknown cell is determined to be an abnormal cell.
[0075] Specifically, when detecting an unknown battery cell, this embodiment of the invention further extracts multiple sub-sequence data segments of the unknown battery cell from its multi-dimensional time-series data. Then, for each sub-sequence data segment of the unknown battery cell, a convolutional reconstruction model is used to reconstruct the corresponding sub-reconstruction result. By calculating the sub-reconstruction error between each sub-sequence data segment and the corresponding sub-reconstruction result, multiple sub-reconstruction errors of the unknown battery cell are obtained. Then, it is determined whether the number of sub-reconstruction errors exceeding an error threshold reaches a certain preset number. Only if the preset number is reached is the unknown battery cell determined to be an abnormal battery cell, thus avoiding misjudgment in a single detection and further improving the accuracy of abnormal battery cell detection.
[0076] This embodiment also provides an abnormal cell detection device, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0077] This embodiment provides an abnormal battery cell detection device, such as... Figure 5 As shown, it includes:
[0078] The data acquisition module 501 is used to acquire various time-series data of multiple battery cells, including normal and abnormal cells. For details, please refer to the relevant description of step S101 in the above method embodiment, which will not be repeated here.
[0079] The data splicing module 502 is used to splice the time series data of each type of battery cell in parallel according to the type, to generate multi-dimensional time series data for each battery cell. For details, please refer to the relevant description of step S102 in the above method embodiment, which will not be repeated here.
[0080] The reconstruction model creation module 503 is used to train a convolutional reconstruction model by simultaneously using multidimensional time-series data of normal battery cells as input samples and sample labels. The convolutional reconstruction model includes convolutional layers, pooling layers, upsampling layers, and fully connected layers. For details, please refer to the relevant description of step S103 in the above method embodiment, which will not be repeated here.
[0081] The threshold setting preparation module 504 is used to input multidimensional time series data of normal and abnormal battery cells into the convolutional reconstruction model, and calculate the reconstruction error of normal and abnormal battery cells respectively based on the reconstruction results. For details, please refer to the relevant description of step S104 in the above method embodiment, which will not be repeated here.
[0082] The threshold setting module 505 is used to determine the error threshold based on the reconstruction error of normal and abnormal battery cells. For details, please refer to the relevant description of step S105 in the above method embodiment, which will not be repeated here.
[0083] The target error determination module 506 is used to input the multidimensional time series data of the unknown battery cell into the convolutional reconstruction model, and determine the target reconstruction error of the unknown battery cell based on the reconstruction result of the unknown battery cell. For details, please refer to the relevant description of step S106 in the above method embodiment, which will not be repeated here.
[0084] The detection result module 507 is used to determine the detection result of the unknown battery cell based on the relationship between the target reconstruction error and the error threshold. For details, please refer to the relevant description of step S107 in the above method embodiment, which will not be repeated here.
[0085] In this embodiment, the abnormal cell detection device is presented in the form of a functional unit. Here, a unit refers to an ASIC circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0086] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0087] This invention also provides a computer device having the above-described features. Figure 5 The abnormal cell detection device shown.
[0088] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 6 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take a processor 10 as an example.
[0089] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0090] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0091] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device as shown by a landing page for an app. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0092] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0093] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0094] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0095] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for detecting abnormal battery cells, characterized in that, The method includes: Acquire multiple time-series data of various battery cells, including normal and abnormal battery cells; The time series data of each type of battery cell are concatenated in parallel according to the type to generate multi-dimensional time series data for each battery cell. Using the multidimensional time-series data of the normal battery cell as both input samples and sample labels, a convolutional reconstruction model is trained. The convolutional reconstruction model includes convolutional layers, pooling layers, upsampling layers, and fully connected layers. The process of using the multidimensional time-series data of the normal battery cell as both input samples and sample labels to train the convolutional reconstruction model includes: inputting the multidimensional time-series data of the normal battery cell into an encoder for downsampling feature extraction to obtain deep features. The encoder consists of multiple convolutional layers and multiple pooling layers alternating between them. The first layer of the encoder is a first convolutional layer, and the kernel width of the first convolutional layer is the same as the number of columns in the multidimensional time-series data. Each column of the multidimensional time-series data is convolved individually by a convolutional kernel. The process involves inputting multidimensional time-series data of the normal and abnormal battery cells into the convolutional reconstruction model, and calculating the reconstruction errors of the normal and abnormal battery cells based on the reconstruction results. This includes: extracting multiple sub-series data from the current battery cell's multidimensional time-series data; reconstructing each sub-series data segment using the convolutional reconstruction model to obtain a corresponding sub-reconstruction result; calculating the sub-reconstruction error between each sub-series data segment and its corresponding sub-reconstruction result; and sorting the obtained sub-reconstruction errors from smallest to largest to obtain the current battery cell's reconstruction error sequence. An error threshold is determined by the reconstruction errors of the normal and abnormal battery cells. This determination includes: determining the quartile error corresponding to the upper quartile from the reconstruction error sequence of each battery cell using a box plot algorithm; deleting the maximum and minimum values from each quartile error and calculating the mean error of the remaining quartile errors; calculating a preset multiple of the mean error to obtain the error threshold, where the preset multiple ranges from 1.5 to 2. The multidimensional time series data of the unknown battery cell is input into the convolutional reconstruction model, and the target reconstruction error of the unknown battery cell is determined based on the reconstruction result of the unknown battery cell. The detection result of the unknown battery cell is determined based on the relationship between the target reconstruction error and the error threshold; the determination of the detection result of the unknown battery cell based on the relationship between the target reconstruction error and the error threshold includes: when the number of sub-reconstruction errors exceeding the error threshold in the target reconstruction error reaches a preset number, the unknown battery cell is determined to be an abnormal battery cell.
2. The method according to claim 1, characterized in that, The step of using the multidimensional time-series data of the normal battery cell as both input samples and sample labels to train the convolutional reconstruction model further includes: The deep features are input into the decoder for upsampling and reconstruction to obtain the reconstructed sequence data of the normal battery cell. The decoder includes a fully connected layer and multiple alternating upsampling layers and multiple convolutional layers. The first layer of the decoder is an upsampling layer, and the last layer is a fully connected layer. The reconstructed sequence data has the same dimension as the multidimensional time series data. Based on the error between the reconstructed sequence data and the multidimensional time series data of the normal battery cell, the parameters of the encoder and the decoder are adjusted. When the preset training stop condition is met, the convolutional reconstruction model including the encoder and the decoder is output.
3. The method according to any one of claims 1 or 2, characterized in that, The time series data for each battery cell are all data from the same charge-discharge cycle.
4. The method according to claim 3, characterized in that, The step of inputting multidimensional time-series data of the unknown battery cell into the convolutional reconstruction model and determining the target reconstruction error of the unknown battery cell based on the reconstruction result includes: Extract multiple segments of sub-sequence data of the unknown battery cell from the multi-dimensional time series data of the unknown battery cell; For each sub-sequence data of an unknown battery cell, the sub-reconstruction result corresponding to each sub-sequence data of the unknown battery cell is obtained by reconstructing it through the convolutional reconstruction model; Calculate the sub-reconstruction error between each sub-sequence data segment of the unknown battery cell and the corresponding sub-reconstruction result, and take the set of multiple sub-reconstruction errors of the unknown battery cell as the target reconstruction error.
5. An abnormal battery cell detection device, characterized in that, The device includes: The data acquisition module is used to acquire multiple time-series data of various battery cells, including normal battery cells and abnormal battery cells; The data stitching module is used to stitch together the time series data of each type of battery cell according to the category, and generate multi-dimensional time series data for each battery cell. A reconstruction model creation module is used to train a convolutional reconstruction model by simultaneously using the multidimensional time-series data of the normal battery cell as input samples and sample labels. The convolutional reconstruction model includes convolutional layers, pooling layers, upsampling layers, and fully connected layers. The process of simultaneously using the multidimensional time-series data of the normal battery cell as input samples and sample labels to train the convolutional reconstruction model includes: inputting the multidimensional time-series data of the normal battery cell into an encoder for downsampling feature extraction to obtain deep features. The encoder consists of multiple convolutional layers and multiple pooling layers alternating between them. The first layer of the encoder is a first convolutional layer, and the width of the convolutional kernel of the first convolutional layer is the same as the number of columns of the multidimensional time-series data. Each column of the multidimensional time-series data is convolved individually by a convolutional kernel. The threshold setting preparation module is used to input the multidimensional time series data of the normal battery cell and the abnormal battery cell into the convolutional reconstruction model, and calculate the reconstruction error of the normal battery cell and the abnormal battery cell respectively based on the reconstruction result. The step of inputting the multidimensional time series data of the normal battery cell and the abnormal battery cell into the convolutional reconstruction model and calculating the reconstruction error of the normal battery cell and the abnormal battery cell respectively based on the reconstruction result includes: extracting multiple sub-sequence data from the multidimensional time series data of the current battery cell; for each sub-sequence data segment, reconstructing it through the convolutional reconstruction model to obtain the corresponding sub-reconstruction result; calculating the sub-reconstruction error between each sub-sequence data segment and the corresponding sub-reconstruction result, and sorting the obtained multiple sub-reconstruction errors from smallest to largest to obtain the reconstruction error sequence of the current battery cell. A threshold setting module is used to determine an error threshold based on the reconstruction errors of the normal and abnormal battery cells. The determination of the error threshold based on the reconstruction errors of the normal and abnormal battery cells includes: determining the quartile error corresponding to the upper quartile from the reconstruction error sequence of each battery cell using a box plot algorithm; deleting the maximum and minimum values from each quartile error and calculating the mean error of the remaining quartile errors; calculating a preset multiple of the mean error to obtain the error threshold, wherein the preset multiple ranges from 1.5 to 2. The target error determination module is used to input the multidimensional time series data of the unknown battery cell into the convolutional reconstruction model, and determine the target reconstruction error of the unknown battery cell based on the reconstruction result of the unknown battery cell. The detection result module is used to determine the detection result of the unknown battery cell based on the relationship between the target reconstruction error and the error threshold; the step of determining the detection result of the unknown battery cell based on the relationship between the target reconstruction error and the error threshold includes: when the number of sub-reconstruction errors exceeding the error threshold in the target reconstruction error reaches a preset number, the unknown battery cell is determined to be an abnormal battery cell.
6. A computer device, characterized in that, include: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method of any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the method of any one of claims 1 to 4.
Citation Information
Patent Citations
Lithium battery anomaly detection method integrating variational auto-encoder and dynamic normalization
CN115469227A
Method for establishing battery anomaly detection model and battery anomaly detection method
CN115358295A
Method and system for anomaly detection and diagnosis in industrial processes and equipment
US20220179406A1