Retired battery thermal runaway early warning method based on AI data reconstruction and integer optimization
Patent Information
- Application Number
- CN202311663628.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-06
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-12-06
AI Technical Summary
[0004]本发明的目的在于针对现有的精准预警退役电池热失控技术瓶颈的问题,提出基于AI数据重构和整数优化退役电池热失控预警方法,以实现高效退役电池热失控提前预警
[0099] First, the variational neural network-based data reconstruction proposed in this invention can provide better data understanding, data expansion, anomaly detection, and dimensionality reduction in the prediction of decommissioned batteries, and has significant advantages for the design of hidden mapping f in the encoder and decoder of decommissioned batteries.
Smart Images

Figure CN117743970B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of safety early warning for decommissioned batteries, and relates to a method for early warning of thermal runaway of decommissioned batteries based on AI data reconstruction and integer optimization. Background Technology
[0002] Currently, the causes of thermal runaway in retired batteries can be summarized into three aspects: mechanical failure, electrical failure, and thermal failure. A common characteristic of these problems is internal short circuits. The evolution of an internal short circuit typically takes hundreds of hours, and while the initial abnormalities are not obvious, they can rapidly lead to combustion and explosion in the later stages. Therefore, early warning and prevention of thermal runaway are of great significance. To address the early warning and prevention of thermal runaway, the academic community mainly employs three mainstream methods: experimental methods, model-based methods, and data-driven methods. Experimental methods can derive the temperature safety boundary of retired batteries, thereby guiding the design of retired battery systems. However, the accuracy of experimental methods is limited by the large number of experiments, posing safety hazards and high economic costs, thus hindering widespread application. Model-based methods mainly estimate parameters such as temperature rise, voltage change, or temperature distribution of retired batteries to indirectly predict thermal runaway. Their advantage lies in their clear physical meaning. However, existing model methods are usually only applicable to specific operating conditions and are difficult to apply to real-world complex operating scenarios.
[0003] Data-driven approaches are a current emerging research hotspot in this field. By utilizing historical data, data models can be established to illustrate the relationship between parameters such as voltage, temperature, and state of charge (SOC) of retired batteries and their thermal runaway. The advantage of this method is that it reflects the actual operating conditions of retired batteries and avoids in-depth research into the complex electrochemical mechanisms within the batteries. Currently, data-driven approaches are primarily supervised learning methods. The research idea is to obtain data on thermal runaway retired batteries under specific operating conditions through experiments and use this data as labels to train a neural network model, thereby identifying the thermal runaway status of retired batteries. However, the aforementioned supervised learning methods have the following problems: although the operational data of retired batteries is vast, the data on thermal runaway retired batteries is relatively small, leading to a small sample problem, which affects the accuracy of the model. Therefore, supervised learning methods have certain limitations in this regard. In contrast, unsupervised learning methods can learn from unlabeled datasets and have a certain robustness to imbalanced data. This method is suitable for the problem of anomaly identification in retired batteries containing a large number of normal samples. However, the differences between data from decommissioned batteries in the early to mid-stages of thermal runaway and data from normally decommissioned batteries are slight, making it difficult to effectively distinguish between thermally runaway decommissioned batteries using simple distance calculation methods (such as K-means). In conclusion, unsupervised learning methods capable of effectively capturing the differences between thermal runaway and normally decommissioned battery data have significant application potential in early warning of thermal runaway in electrochemically decommissioned batteries. Summary of the Invention
[0004] The purpose of this invention is to address the bottlenecks in existing technologies for accurate early warning of thermal runaway in decommissioned batteries by proposing an AI-based data reconstruction and integer optimization method for early warning of thermal runaway in decommissioned batteries, so as to achieve efficient early warning of thermal runaway in decommissioned batteries.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] A method for early warning of thermal runaway in decommissioned batteries based on AI data reconstruction and integer optimization includes the following steps:
[0007] S1: Perform data preprocessing on normally retired batteries, including deleting data from the explosion stage and normalizing features with different dimensions;
[0008] S2: The retired battery management system monitors the time-series variable features that affect the operating status of retired batteries in real time from the data preprocessed in S1, and combines the obtained time-series variable features into a multi-dimensional time-series feature.
[0009] S3: Standardize the time series variables in the multidimensional time series features obtained from the training sample set composed of normally retired batteries and use them as the feature variables for input to the basic model to train the basic model for reconstruction error.
[0010] S4: Select several groups of different normal retired battery training samples, repeat S1-S3 for each group of training samples to form several basic reconstruction error models, that is, form a preliminary ensemble model, and perform integer optimization on the ensemble model;
[0011] S5: Input the retired battery sample to be judged into the integrated model optimized by integer in S4, calculate the reconstruction error of the retired battery sample, give the reconstruction error threshold, judge the output y(0 / 1) of each basic model, and calculate the warning probability based on the output results of each basic model.
[0012] Furthermore, the time-series variable characteristics in S2 include: total voltage V t Total current I t State of charge (SOC) of retired battery packs t Temperature T of retired battery packs t and statistical variable M t .
[0013] Furthermore, in S3, the time-series variables in the multi-dimensional time-series features obtained from the training sample set composed of normally retired batteries are standardized and used as feature variables for the input of the basic model. Specifically, the input of the basic model is denoted as:
[0014] X in,t =[V t ,I t SOC t ,T t M t (1)
[0015] Among them, X in,t The input data at time t includes the total voltage V of the retired battery pack at time t. t Total current I t State of charge (SOC) of retired battery packs t Temperature T of retired battery packs t and statistical variable M t ;
[0016] Using statistical methods to analyze M t The data was constructed using a set of retired battery data, containing voltage and temperature data for 96 retired battery cells. t This includes statistical variables such as the variance, mean, maximum, and minimum of the voltage of all individual cells at time t in a set of retired battery data; and the variance, maximum, and minimum of the temperature of all individual cells.
[0017] The output of the basic model is the reconstructed data of the input features, denoted as:
[0018]
[0019] Furthermore, the training of the basic model for reconstructing the error in S3 specifically includes:
[0020] The basic model is a variational neural network for data reconstruction. An autoencoder is built, which includes building a compiler, a decoder, and setting an optimization target.
[0021] The encoder and decoder are constructed as follows:
[0022] y = h(X) in (3)
[0023]
[0024] Where f is an implicit function, and h is a generalized mapping relationship;
[0025] The variational encoder suitable for thermal runaway early warning of retired batteries is designed for X. in Construct its joint probability distribution P(X) in ), P(X in The process of constructing the objective function includes: maximum likelihood estimation, latent variable model, Monte Carlo sampling, and variational inference.
[0026] Furthermore, the maximum likelihood estimation mentioned in the construction of the objective function is achieved through statistical modeling methods, assuming P(X) in It follows a Gaussian distribution. μ represents the mean of the data, σ 2 Represents the variance of the data, when P(X) in Once the distribution of is determined, the probability distribution estimation problem is transformed into a parameter estimation problem. Maximum likelihood estimation assumes that the training data samples follow independent and identically distributed (i.i.d.) distributions. Therefore, the joint probability distribution is decomposed into a likelihood function, expressed as:
[0027]
[0028] Where, x i This represents the i-th sample data;
[0029] The maximum likelihood estimation criterion is to maximize the likelihood function, which is equivalent to minimizing the negative log-likelihood function. Taking the logarithm of formula (5) transforms the product into an addition, thus optimizing the parameter set. Represented as:
[0030]
[0031] The gradient with respect to parameter θ is calculated during the optimization process, and is expressed as:
[0032]
[0033] The optimized parameter set θ is obtained by using maximum likelihood estimation, and the probability distribution is obtained, thus completing the sampling of the probability distribution;
[0034] The maximum likelihood estimation process is extended using the latent variable model, specifically including:
[0035] Suppose X in There are z important latent variables. The process of generating a new probability distribution based on the latent variables is expressed as:
[0036] P(X in )=∫P(X in |z,θ)P(z)dz (8)
[0037] A latent variable model is one in which any probability distribution can be mapped to any probability distribution after passing through a sufficiently complex function. Therefore, by continuing the idea of the maximum likelihood function to optimize the latent variable z, the negative log-likelihood function of the latent variable model is expressed as:
[0038]
[0039] The parameters can be optimized based on the gradient in equation (9). After substituting the optimization parameters, the latent variable model is obtained.
[0040] The Monte Carlo sampling method is used to replace the integral process in calculating the negative log-likelihood function using the variable model. Specifically, this includes: expressing the integral in the calculation of the negative log-likelihood function using the variable model in expectation form, as follows:
[0041] ∫p(x i |z,θ)p(z)dz=E z~p(z) [p(x|z,θ)] (10)
[0042] The integral is obtained by sampling multiple times z1, z2, ... z from P(z) using the expectation method. m Calculate x1, x2, ... x based on p(x|z,θ). m Let the mean of x be used to express the expected value as follows:
[0043]
[0044] By sampling z multiple times, we obtain ▽ θ L(θ,X in Approximate value of ).
[0045] Monte Carlo sampling suffers from the problem of requiring a large number of sampling times (m). Variational inference is used to reduce m and decrease computational complexity. Specifically, this includes:
[0046] Variational inference uses the KL divergence to measure the similarity between two probability distributions, i.e., p(z|x) and q. θThe distance between (z|x) is as follows:
[0047]
[0048] Simplifying the above equation, we get:
[0049]
[0050] Equation (13) is to set an optimization target;
[0051] For the optimization objective KL(q) θ (z|x)||p(z)) is specifically expressed as:
[0052]
[0053] Let the dimension of the battery data be d, represented as:
[0054]
[0055] Let the total data duration be T, then the cumulative reconstruction error is expressed as:
[0056]
[0057] The overall objective function is expressed as:
[0058]
[0059] Furthermore, in step S4, integer optimization is performed on the ensemble model, specifically including:
[0060] Determine the optimal ensemble model composition and clarify the relationship between the accuracy of the base model, the diversity of the base model, and the accuracy of the ensemble model;
[0061] Error-split theory derives the relationship between the accuracy of an ensemble model and the base models, i.e., the optimal ensemble model, specifically described as: using n base models h1,...,h i ,...,h n To form an ensemble model, when using this ensemble model, the output is obtained through weighted averaging, expressed as:
[0062]
[0063] Among them, w i Based on model h i The weights, and determined by w i ≥0 and constraint;
[0064] Given a sample x, the divergence of the i-th base model is defined as:
[0065] A(hi |x)=(h i (x)-H(x)) 2 (19)
[0066] Where H(x) represents the output of the ensemble model;
[0067] The divergence of the ensemble model is defined as a weighted average of the divergences of the base models:
[0068]
[0069] The error of the base model is measured using the mean squared error. Assuming the true discrimination result of sample x is f(x), then the base model h... i The errors between H(x) and the ensemble model H(x) are expressed as follows:
[0070] E(h i |x)=(f(x)-h i (x)) 2 (twenty one)
[0071] E(H|x)=(f(x)-H(x)) 2 (twenty two)
[0072] The weighted average error of the entire basic model across the entire sample is expressed as:
[0073]
[0074] Transforming equations (20) and (23) yields:
[0075]
[0076] Combining equations (23)(18)-(22)(22) and constraints Further transformation of equation (24) yields:
[0077]
[0078] From equations (25) and (26), we can see that the error of the ensemble model is determined by the weighted average error of all basic models in the overall sample and the weighted average of the divergence of the basic models; and the second term on the right side of the equation is positive and is subtracted from the first term, which ensures that the error after ensemble is lower than the weighted average error of the basic models, and the higher the accuracy of each basic model and the greater the difference between them, the higher the accuracy of the ensemble model.
[0079] Based on the results obtained from equation (25), an integrated model optimization method is adopted. Given M basic models and m samples of decommissioned batteries to be judged, the judgment results are recorded in matrix P, where the element in the i-th row and j-th column of P is... ij , is represented as:
[0080]
[0081] Let U = P T P, then the diagonal element U of U ii Representative basic model h i The number of incorrect judgments reflects the weighted average error of the entire base model across the entire sample, with the off-diagonal element U... ij,i≠j Then it represents the basic model h i with h j The number of errors reflects the divergence of the ensemble model; therefore, U contains both the errors of each basic model and their divergence, thus effectively measuring the error of the ensemble model.
[0082] The elements in U are normalized using formulas (27) and (28); according to the definition of ensemble model error in formulas (25) and (26), then... Represented as:
[0083]
[0084] Where m is the number of samples to be judged;
[0085] when The ensemble model performs best when every element is minimized; therefore, the ensemble model optimization problem is transformed into a quadratic integer programming problem, expressed as:
[0086]
[0087]
[0088] x i ={0,1} (30)
[0089] Where, x T The transpose of the 0-1 variable matrix represents whether the i-th base model needs to be selected into the ensemble model.
[0090] binary scalar x i This indicates whether the i-th base model is selected into the ensemble model, and the parameter s is the size of the optimized ensemble model.
[0091] Furthermore, in S5, the reconstruction error threshold is obtained by training different normal retired battery samples on each basic model in the optimization ensemble model to obtain the corresponding reconstruction error. The obtained reconstruction errors form a reconstruction error set. The average value and standard deviation of the reconstruction error set are calculated, and the reconstruction error value that is exactly two standard deviations greater than the average value is selected as the threshold, denoted as K.
[0092] Furthermore, in S5, the output y(0 / 1) of each sub-model is determined, which is represented as:
[0093]
[0094] Where y represents the judgment result of the basic model on the decommissioned battery to be judged; if its reconstruction error is greater than or equal to the set threshold K, the decommissioned battery is judged as thermal runaway and assigned a value of 1; if its reconstruction error is less than the set threshold K, the decommissioned battery is judged as normal and assigned a value of 0.
[0095] Furthermore, in step S5, the early warning probability is calculated based on the output results of each basic model, and is expressed as follows:
[0096]
[0097] Where P is the probability that a retired battery is judged to have thermal runaway; y k The judgment result of the k-th basic model on the retired battery can be calculated by formula (31); n is the total number of basic models.
[0098] The beneficial effects of this invention are as follows:
[0099] First, the variational neural network-based data reconstruction proposed in this invention can provide better data understanding, data expansion, anomaly detection, and dimensionality reduction in the prediction of decommissioned batteries, and has significant advantages for the design of hidden mapping f in the encoder and decoder of decommissioned batteries.
[0100] Second, the present invention proposes to define the degree of difference between retired batteries by calculating the reconstruction error of time-series data of retired batteries based on variational neural network data reconstruction. It uses the idea that the reconstruction error of normal data is small and the reconstruction error of abnormal data is large to construct a basic model of variational neural network data reconstruction error, which can preliminarily identify thermal runaway batteries in retired batteries.
[0101] Third, this invention proposes an integer-optimized early warning framework for thermal runaway of decommissioned batteries, which quantifies the probability of thermal runaway of decommissioned batteries, enhances model stability, and further optimizes the ensemble model, enabling the ensemble model to achieve higher early warning accuracy for thermal runaway of decommissioned batteries with a smaller number of basic model combinations.
[0102] Fourth, this invention not only effectively distinguishes between normal and abnormal battery states, reducing false alarm and false negative rates, but also optimizes the integrated model, achieving more efficient early warning. This helps to promptly detect and address safety hazards in retired batteries, extend battery life, improve utilization, and promote the reuse of retired batteries, which is of great significance for promoting the development of a circular economy.
[0103] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0104] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:
[0105] Figure 1 A diagram illustrating the basic model of reconstruction error based on variational neural network data reconstruction;
[0106] Figure 2 A framework for early warning of thermal runaway in electrochemically decommissioned batteries based on integer optimization;
[0107] Figure 3 This is a flowchart of a method for early warning of thermal runaway in decommissioned batteries based on variational neural network data reconstruction and integer optimization. Detailed Implementation
[0108] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0109] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0110] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0111] Please see Figures 1-3 This is a method for early warning of thermal runaway in decommissioned batteries based on AI data reconstruction and integer optimization.
[0112] The basic model for early warning of thermal runaway in decommissioned batteries based on variational neural network data reconstruction and the early warning framework for thermal runaway in decommissioned batteries based on integer optimization designed in this invention are as follows:
[0113] I. Basic Model for Early Warning of Thermal Runaway in Decommissioned Batteries Based on Variational Neural Network Data Reconstruction
[0114] This invention utilizes the reconstruction error of retired battery data to assess the risk of thermal runaway in retired batteries. The specific approach is as follows: First, a basic reconstruction model is trained using operational data from normally retired batteries. Then, the operational state of the retired battery is determined by calculating the reconstruction error of the data to be judged. In the field of anomaly detection, normal data typically has a sufficient sample size, so the basic model based on normal data does not face the problem of small sample size. For normal retired battery data, the reconstruction error is relatively small because the basic reconstruction model has already learned the corresponding features. However, for thermal runaway retired battery data, the reconstruction error is larger because the basic model has never encountered thermal runaway data, and thermal runaway data differs from normal data. Therefore, the reconstruction error can be used as a basis for judgment to identify thermal runaway retired batteries. Through this method, we can use the reconstruction error of retired battery data to assess the risk of thermal runaway without prior in-depth research into the complex electrochemical mechanisms inside the battery. This reconstruction error-based method can provide an effective early warning means for thermal runaway in retired batteries, providing strong support for battery management and safety control. The specific process is as follows: The operating status of a retired battery can be described by variables such as its voltage (V), current (I), state of charge (SOC), and temperature (T). These variables can be monitored in real time by a retired battery management system (BMS). Because these variables have different dimensions and significant numerical differences, directly using the original data to train the basic model will lead to numerical problems, which is detrimental to training the basic reconstruction model.
[0115] The standardized variables are used as the input feature variables of the base model, such as Figure 1 As shown. The model input is denoted as X. in,t =[V t ,I t SOC t ,T t M t ], where X in,t The input data at time t includes the total voltage V of the retired battery pack at time t. t Total current I t State of charge (SOC) of retired battery packs t Temperature T of retired battery packs t and statistical variable M t This invention uses statistical methods to analyze M. t The data was constructed using a set of retired battery data, containing voltage and temperature data for 96 retired battery cells. t This includes statistical variables such as the variance, mean, maximum, and minimum of all individual cell voltages at time t, and the variance, maximum, and minimum of all individual cell temperatures from a set of retired battery data. The output is the reconstructed data of the input features, denoted as... The dimensions of the input and output variables are equal.
[0116] This invention uses a variational neural network for data reconstruction as its basic model. Building an autoencoder requires three steps: building the encoder, building the decoder, and setting an optimization objective to measure the information lost due to compression. The parameters of the encoder and decoder can be optimized by minimizing the loss function; this invention uses the Adam optimizer. The encoder and decoder are constructed as follows:
[0117] y = h(X) in (1)
[0118]
[0119] This invention designs the latent function f, and variational neural network data reconstruction offers several advantages in early warning of decommissioned batteries. First, variational neural network data reconstruction can learn the latent representation of decommissioned batteries from a large amount of data, enabling a better understanding of their characteristics and change patterns. Second, it can generate new decommissioned battery samples, which is very useful for expanding limited decommissioned battery datasets and generating synthetic data for simulation and testing. Furthermore, variational neural network data reconstruction can be used for anomaly detection in decommissioned batteries; by comparing decommissioned battery data with model-generated data, abnormal behavior can be detected and diagnosed promptly. Finally, variational neural network data reconstruction also has compression and dimensionality reduction capabilities, transforming high-dimensional decommissioned battery data into a low-dimensional latent space representation, thereby reducing computational and storage costs. In summary, variational neural network data reconstruction provides better data understanding, data augmentation, anomaly detection, and dimensionality reduction in decommissioned battery prediction, offering significant advantages for the design of the latent mapping f in the decommissioned battery encoder and decoder.
[0120] Variational encoders suitable for thermal runaway early warning in decommissioned batteries are primarily designed for X. in Construct its joint probability distribution P(X) in The objective function is constructed in four steps: maximum likelihood estimation, latent variable model, Monte Carlo sampling, and variational inference.
[0121] ①Maximum likelihood estimation
[0122] Using statistical modeling methods, we assume P(X) in It follows a Gaussian distribution. When P(X) in Once the distribution of the probability distribution is determined, the problem of probability distribution estimation is transformed into a parameter estimation problem. Maximum likelihood estimation assumes that the training data samples follow independent and identically distributed (i.i.d.) patterns; therefore, the joint probability distribution can be decomposed into a likelihood function:
[0123]
[0124] The maximum likelihood estimation criterion is to maximize the likelihood function, which is equivalent to minimizing the negative log-likelihood function. For ease of calculation, we take the logarithm of the above equation, transforming the product into a summation. Therefore, the parameter set to be optimized... It can be represented as follows:
[0125]
[0126] The optimization process requires solving for the gradient with respect to the parameter θ:
[0127]
[0128] The optimized parameter set θ can be obtained by using maximum likelihood estimation, thus obtaining the probability distribution, which means the probability distribution has been sampled. However, the above process has the problem of distribution assumption. If the selected distribution is inconsistent with the true distribution, the model effect will be reduced. Therefore, the above process needs to be extended, which will be introduced in the dependent variable model.
[0129] ② Latent variable model
[0130] Suppose X in There are z important latent variables. The process of generating a new probability distribution based on the latent variables can be described as follows:
[0131] P(X in )=∫P(X in |z,θ)P(z)dz (6)
[0132] Latent variable models transform the probability density estimation problem into a function approximation problem, which is easier to solve. The key idea behind latent variable models is that any probability distribution can be mapped to any probability distribution after passing through a sufficiently complex function. Therefore, continuing the idea of the maximum likelihood function to optimize the latent variable z, the negative log-likelihood function of the latent variable model is:
[0133]
[0134] Based on the gradient described above, the parameters can be optimized. Substituting these optimized parameters yields the latent variable model. The calculation of the negative log-likelihood function in the dependent variable model involves an integration process, which generally cannot be solved precisely. Therefore, Monte Carlo sampling is often used as a substitute in practical engineering.
[0135] ③ Monte Carlo sampling
[0136] The integrals involved in the above process can be written in the expected value form as follows:
[0137] ∫p(x i |z,θ)p(z)dz=E z~p(z) [p(x|z,θ)] (8)
[0138] Then, the integral is calculated using the expectation method, sampling z1, z2, ... z from P(z) multiple times. m Then, calculate x1, x2, ... x based on p(x|z,θ). m Finally, the mean of x is used to express the expected value as follows:
[0139]
[0140] By sampling z multiple times, we can obtain The approximation is obtained by using Monte Carlo methods. However, Monte Carlo methods require a large number of sampling times (m). Therefore, variational inference is used to reduce m and decrease the computational complexity.
[0141] ④ Variational inference
[0142] Variational inference essentially substitutes the prior probability distribution of z with the posterior probability distribution. Since the posterior distribution is generally difficult to determine accurately, variational inference can estimate the desired distribution using another distribution. The KL divergence is used to measure the similarity between the two probability distributions, i.e., p(z|x) and q. θ The distance between (z|x) is as follows:
[0143]
[0144] Simplifying the above equation, we get:
[0145]
[0146] The above formula is the optimization objective of this invention. Since KL(q) θ The divergence term (z|x)||p(z)) is an abstract statement; its specific expression is given below:
[0147]
[0148] The divergence described above applies to samples with a single dimension. In this invention, the battery data dimension is set to d, which can be expressed as:
[0149]
[0150] Let the total data duration be T, then the cumulative reconstruction error is described by the following formula, as shown in formula (14).
[0151]
[0152] Therefore, the overall objective function can be rewritten as:
[0153]
[0154] Once the basic model for data reconstruction using the aforementioned variational neural network is trained, it can be used to determine thermal runaway in decommissioned batteries, such as... Figure 1 As shown, the reconstruction error of the battery to be judged is obtained after calculation by the basic model. A threshold needs to be set for the reconstruction error as the criterion for judging thermal runaway of the battery. This invention obtains the corresponding reconstruction error set by training different normal retired battery samples, calculates the mean and standard deviation of the set, and selects the reconstruction error value that is exactly two standard deviations greater than the mean as the threshold, denoted as K. The specific judgment rule is shown in Equation (16):
[0155]
[0156] In the formula, y represents the judgment result of the basic model for the decommissioned battery to be judged. If its reconstruction error is greater than or equal to the set threshold K, the decommissioned battery is judged as thermal runaway and assigned a value of 1; if its reconstruction error is less than the set threshold K, the decommissioned battery is judged as normal and assigned a value of 0. In summary, the basic model can make thermal runaway judgments by measuring the reconstruction error of the data of the decommissioned battery to be judged.
[0157] II. A Holistically Optimized Early Warning Framework for Thermal Runaway in Decommissioned Batteries
[0158] The stability of the basic model for thermal runaway early warning of decommissioned batteries refers to the model's ability to accurately identify thermally runaway decommissioned batteries across different test datasets. Since the parameters of the basic model are significantly affected by the input sample set, ensuring its stability is difficult. However, in thermal runaway early warning for decommissioned batteries, the basic model needs to be applied multiple times; insufficient stability increases the probability of misjudgments and missed judgments during the early warning process. To enhance model stability, integer optimization methods are introduced. This method performs thermal runaway assessment by integrating the judgment results of multiple basic models. Integer optimization can effectively reduce the bias and uncertainty of individual basic models, thereby improving the overall model stability. Through integer optimization, we can obtain more reliable and consistent judgment results in thermal runaway early warning for decommissioned batteries, reducing the risk of misjudgments and missed judgments. This method can effectively improve the stability of the basic model, providing more reliable performance for the thermal runaway early warning system for decommissioned batteries. Therefore, to ensure the stability of the basic model, this invention further proposes a thermal runaway early warning framework based on the idea of integer optimization, such as... Figure 2 As shown in the figure. By combining the discrimination results of the basic model trained from multiple different normal retired battery sample sets, the thermal runaway probability P can be obtained, as shown in equation (17):
[0159]
[0160] In the formula: P is the probability that a retired battery is judged to be in thermal runaway; y k The judgment result of the k-th basic model on the retired battery can be calculated by formula (16); n is the total number of basic models. Figure 2 The architecture of each basic model in the ensemble model shown is the same, and the training sample sets of each basic model are taken from different normal retired battery data.
[0161] The integer optimization approach trains a corresponding number of thermal runaway failure early warning ensemble models by integrating data from multiple normal retired batteries of the same type, and calculates the thermal runaway failure early warning probability using equation (17). Therefore, the accuracy of the safety early warning for retired batteries depends on the accuracy of the ensemble model. However, the above method cannot determine the optimal ensemble model, i.e., there is no standard for selecting the basic models that constitute the ensemble model. To determine the optimal ensemble model, it is necessary to clarify the relationship between the accuracy of the basic models, the diversity of the basic models, and the accuracy of the ensemble model. Error-divergence theory provides the relationship between the accuracy of the ensemble model and the basic models, providing a theoretical basis for selecting the optimal ensemble model. Specifically, it is described as follows: using n basic models h1,...,h i ,...,h n To form an integrated model, the output is obtained by weighted averaging when using the integrated model, as shown in equation (18):
[0162]
[0163] In the formula: w i Based on model h i The weights, and determined by w i ≥0 and Constraints. Given a sample x, the divergence of the i-th base model can be defined as:
[0164] A(h i |x)=(h i (x)-H(x)) 2 (19)
[0165] In the formula: H(x) represents the output of the ensemble model.
[0166] The divergence of the ensemble model can be defined as a weighted average of the divergences of the basic models:
[0167]
[0168] Clearly, the discrepancy defines the difference between the base models and the samples. While there are many definitions of error, this paper uses mean squared error to measure the error of the base model. Assuming the true discrimination result of sample x is f(x), then the error of the base model h... i The errors between H(x) and the ensemble model H(x) can be expressed as follows:
[0169] E(h i |x)=(f(x)-h i (x)) 2 (twenty one)
[0170] E(H|x)=(f(x)-H(x)) 2 (twenty two)
[0171] The weighted average error of the entire basic model across the entire sample can be expressed as:
[0172]
[0173] Transforming equation (23) yields:
[0174]
[0175] Combining equations (18)-(22) and constraints Further transformation of equation (24) yields:
[0176]
[0177] Summarized as follows:
[0178]
[0179] As shown in equation (26), the error of the ensemble model is determined by the weighted average error of all basic models in the overall sample and the weighted average of the divergences of the basic models. Since the second term on the right side of the equation is positive and subtracted from the first term, it is theoretically guaranteed that the error after ensemble is lower than the weighted average error of the basic models. Furthermore, the higher the accuracy of each basic model and the greater the difference between them, the higher the accuracy of the ensemble model. Therefore, in order to further optimize the early warning model for thermal runaway failure of decommissioned batteries based on the bagging algorithm, this invention adopts the ensemble model optimization method based on the conclusion of equation (26). Given M basic models and m decommissioned battery samples to be judged, the judgment results are recorded in matrix P, where the element P in the i-th row and j-th column of P is... ij As shown in equation (27):
[0180]
[0181] Let U = P T P, then the diagonal element U of U ii Representative basic model h i The number of incorrect judgments reflects the weighted average error of the entire base model across the entire sample, with the off-diagonal element U... ij,i≠j Then it represents the basic model h i with h j The number of simultaneous errors reflects the divergence of the ensemble model. Therefore, U contains both the errors of each basic model and their divergence, thus effectively measuring the error of the ensemble model. The elements in U are normalized using equation (28). According to the definition of ensemble model error in equation (26), when... The ensemble model performs best when every element in the model is minimized.
[0182]
[0183] In the formula: m is the number of samples to be judged.
[0184] The ensemble model optimization problem can be transformed into the following quadratic integer programming problem:
[0185]
[0186]
[0187] x i ={0,1} (31)
[0188] Where: binary scalar x i This indicates whether the i-th base model is selected into the ensemble model, and the parameter s is the size of the optimized ensemble model.
[0189] The following experiment was conducted on the proposed method for early warning of thermal runaway in decommissioned batteries based on neural network data reconstruction and ensemble learning:
[0190] 1. Sample Acquisition and Data Preprocessing
[0191] This invention collected actual retired battery data from a domestic company, totaling 48 sets of retired batteries, including parameters such as voltage, current, state of charge (SOC), and temperature. The time span for each set of retired battery data was six months, with a sampling frequency of 10 seconds per set. Among these data, two sets of retired batteries experienced thermal runaway, leading to combustion and explosion. To perform data preprocessing, this invention adopted the following steps: First, because the thermal runaway explosion phase is extremely short and the parameters of the retired batteries change significantly, this invention deleted the data from the explosion phase to eliminate the influence of these abnormal data on model judgment. Second, because retired batteries involve many operating conditions in their non-charging state, the model might misclassify retired batteries in different operating conditions as abnormal. During the charging process, the operating conditions of retired batteries are relatively simple, and the data characteristics are relatively stable; therefore, we selected the data from the charging portion of the retired batteries for analysis. Finally, to eliminate the influence of differences in the dimensions of different features on the calculation reconstruction error, the features of different dimensions were normalized. Through the above preprocessing steps, we obtained filtered and normalized retired battery data, providing a reliable foundation for subsequent research and analysis.
[0192] 2. Model Setup
[0193] The examples of this invention will compare the following methods (M1-M3), with the objectives set as shown in Table 1.
[0194] M1: A model for judging thermal runaway of decommissioned batteries based on unsupervised learning ( Figure 2The model uses a variational autoencoder neural network. It has four hidden layers: an encoder layer and a decoder layer. The encoder layer has 30 neurons in the first layer and 15 neurons in the second layer; the decoder layer has 15 neurons in the first layer and 30 neurons in the second layer. The input and output layers have the same number of neurons. The initial learning rate is set to 0.001, and an improved training algorithm with an adaptive learning rate is used as the optimizer.
[0195] M2: Based on M1, it further adopts an ensemble learning framework;
[0196] M3: Based on M2, further improvements are made using an overall optimization method.
[0197] Table 1 shows the method comparison settings and objectives.
[0198] Calculation example 1 M1, M2 Verify the effectiveness and stability of the ensemble model. Calculation example 2 M2, M3 Verify the necessity of overall optimization
[0199] 3. Indicator Setting
[0200] To evaluate the performance of the algorithm proposed in this invention, the following explanation is provided: The thermal runaway early warning system for decommissioned batteries is essentially a binary classification problem, dividing all decommissioned batteries into two categories: normally decommissioned batteries and thermally runaway decommissioned batteries. The confusion matrix is a fundamental tool for evaluating the reliability of a binary classifier. Table 2 shows the confusion matrix, which displays all possible classification results of the classifier. Here, TP indicates that both the true class and the model's classification are normal; TN indicates that the true class is abnormal and the model classifies it as normal; FP indicates that the true value is abnormal and the model classifies it as normal; and FN indicates that the true value is normal and the model classifies it as abnormal.
[0201] Table 2 is the confusion matrix.
[0202]
[0203] Based on the confusion matrix, several evaluation metrics for binary classifiers can be obtained: accuracy, precision, recall, and a comprehensive metric, as shown in the following formula:
[0204] ACC=(TP+TN) / (TP+TN+FP+FN) (32)
[0205] PRE=TP / (TP+FP) (33)
[0206] REC=TP / (TP+FN) (34)
[0207] F1=2×PRE×REC / (PRE+REC) (35)
[0208] In industry, there are high requirements for the aforementioned metrics. For example, if the recall rate of a model fails to meet the requirements, it indicates a large number of missed detections of thermally runaway decommissioned batteries, posing a serious threat to public safety. Besides recall rate, the probability of accurately predicting real thermally runaway decommissioned batteries is also an indicator for evaluating the effectiveness of an ensemble model. Higher values for these metrics indicate better model classification performance. Furthermore, this invention sets a ranking metric for predicting thermally runaway decommissioned batteries. By calculating the reconstruction error of all decommissioned batteries in the same test set and ranking them from highest to lowest, the serial numbers of the two groups of thermally runaway decommissioned batteries are recorded. A lower value indicates better model performance and more accurate identification of thermally runaway decommissioned batteries. The setting and ranking of these metrics effectively evaluate the model's performance in predicting thermally runaway decommissioned batteries, helping industry accurately assess the model's reliability and application effectiveness.
[0209] 4. Stability Comparison of the Integrated Model and the Basic Model of this Invention
[0210] To illustrate the stability of the ensemble model, the following case study is provided. In 48 sets of decommissioned battery data, M1 randomly selected 20 sets of normally decommissioned battery samples as the training set, and the remaining 28 sets of decommissioned battery samples (including 2 sets of thermal runaway decommissioned battery data) as the test set. Compared to M1, M2 has the same training and test sets, but the difference is that M2 uses 20 base models trained on each set of normally decommissioned battery data. This invention performs three tests on M1 and M2, randomly selecting a different 20 sets of normally decommissioned batteries as the training set and the remaining 28 sets of decommissioned batteries (including two sets of thermal runaway decommissioned batteries) as the test set in each test. The training and test sets for M2 remain consistent with those of M1 in each test. The test results are shown in Table 3. For M1, the evaluation metrics fluctuated significantly across the three tests, with lower accuracy in the first and third evaluations and higher accuracy in the second evaluation. In contrast, M2's evaluation metrics were higher across all three tests, with the exception of a slight fluctuation in the thermal runaway decommissioned battery warning ranking metric; all other metrics remained unchanged. The above results demonstrate that the ensemble model for early warning of thermal runaway in decommissioned batteries exhibits higher stability compared to the basic model. Furthermore, although the training and testing time of M2 is significantly longer than that of M1, the additional time spent by M2 is negligible compared to the time required for early warning of thermal runaway in decommissioned batteries. Through these examples, this invention demonstrates that the ensemble model possesses higher stability than the basic model, and the additional time cost is negligible.
[0211] Table 3 compares the early warning results indicators for M1 and M2.
[0212]
[0213] To address the challenge of effectively predicting thermal runaway in retired batteries, this invention proposes a method for early warning of thermal runaway in retired batteries based on neural network data reconstruction and ensemble learning. The effectiveness of the proposed method is verified using real-world operational data from retired electric vehicle batteries. First, this invention proposes a basic model for early warning of thermal runaway in retired batteries based on variational neural network data reconstruction. The reconstruction error of the retired battery data is used to define the degree of difference between retired batteries, forming a basic model for discriminative analysis. Furthermore, an ensemble learning-based early warning technique for thermal runaway in retired batteries is proposed, quantifying the probability of thermal runaway. Comparison with the basic model and numerical examples demonstrate that, while maintaining model accuracy, the model's variance is reduced, and its stability is improved. These results demonstrate the effectiveness of the proposed data-driven method for early warning of thermal runaway in retired batteries.
[0214] 5. Comparison of the stability of the integrated model and the overall optimized model of this invention
[0215] The thermal runaway early warning method based on overall optimization proposed in this invention aims to provide an optimal ensemble model based on error-divergence theory, given a specific ensemble model size. To illustrate the improvement in ensemble model accuracy, the following calculation example is set: M2 randomly selects 24 normal energy storage battery samples from 48 battery data sets as the training set (as the original ensemble model), and the remaining 24 energy storage battery samples (including 2 sets of thermal runaway battery data) as the test set. The optimized ensemble model size k is set to 12. As a control, three models with an ensemble model size of 12 are randomly selected from the 24 training sets for combination, while the test set remains unchanged. The results are shown in Table 4.
[0216] Table 4 shows the performance comparison of the ensemble model before and after optimization.
[0217] Overall optimization (M3) 12 93 100 no Randomized ensemble 1 (M2) 12 93 100 no Randomized Integration 2 (M2) 12 86 50 yes Randomized ensemble 3(M2) 12 86 50 yes Original ensemble model (M2) 24 86 100 no
[0218] Table 4 shows that the optimized pruned ensemble (M3) achieved higher accuracy with half the ensemble size compared to the original ensemble model (M2). Compared to random ensemble 2 and random ensemble 3, it did not miss any thermal runaway batteries, and its accuracy and recall were both higher. In summary, the overall optimization improved the accuracy of the original model and was more accurate than the random ensemble model.
[0219] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for early warning of thermal runaway in decommissioned batteries based on AI data reconstruction and integer optimization, characterized by: The method includes the following steps: S1: Perform data preprocessing on normally retired batteries, including deleting data from the explosion stage and normalizing features with different dimensions; S2: The retired battery management system monitors the time-series variable features that affect the operating status of retired batteries in real time from the data preprocessed in S1, and combines the obtained time-series variable features into a multi-dimensional time-series feature. S3: Standardize the time series variables in the multidimensional time series features obtained from the training sample set composed of normally retired batteries and use them as the feature variables for input to the basic model to train the reconstruction error basic model; the basic model selects variational neural network data reconstruction to build an autoencoder. Building the autoencoder includes: building a codec, building a decoder, and setting an optimization target. The encoder and decoder are constructed as follows: (3) (4) in, f It is an implicit function. h A generalized mapping relationship; A variational encoder suitable for thermal runaway early warning in decommissioned batteries is designed for... Construct their joint probability distribution , The process of constructing the objective function includes: maximum likelihood estimation, latent variable model, Monte Carlo sampling, and variational inference; S4: Select several groups of different normal retired battery training samples, repeat S1-S3 for each group of training samples to form several basic reconstruction error models, that is, form a preliminary ensemble model, and perform integer optimization on the ensemble model; Determine the optimal ensemble model composition and clarify the relationship between the accuracy of the base model, the diversity of the base model, and the accuracy of the ensemble model; Error-divergence theory derives the relationship between the accuracy of the ensemble model and the base model, i.e., the optimal ensemble model, as described below: Using Basic Models To form an ensemble model, when using this ensemble model, the output is obtained through weighted averaging, expressed as: (18) in, Basic Model The weights, and by and constraint; Given sample Then the first i The divergence of the basic models is defined as follows: (19) in, This represents the output of the ensemble model; The divergence of the ensemble model is defined as a weighted average of the divergences of the basic models: (20) The error of the basic model is measured using the mean squared error, assuming the sample The true judgment result is Then the basic model With the integration model The errors are expressed as follows: (21) (22) The weighted average error of the entire basic model across the entire sample is expressed as: (23) Transforming equations (20) and (23) yields: (24) Combining equations (23) and (18) with equation (22) and constraints Further transformation of equation (24) yields: (25) Equation (25) shows that the error of the ensemble model is determined by the weighted average error of all basic models in the overall sample and the weighted average of the divergence of the basic models; and the second term on the right side of the equation is positive and is subtracted from the first term, which ensures that the error after ensemble is lower than the weighted average error of the basic models, and the higher the accuracy of each basic model and the greater the difference between them, the higher the accuracy of the ensemble model. Based on the results obtained from equation (25), an integrated model optimization method is adopted, given... A basic model and m A sample of batteries to be decommissioned will be identified, and the identification results will be recorded in a matrix. middle, Middle i Line 1 j Column elements , is represented as: (26) make ,but diagonal element Representative basic model The number of incorrect judgments reflects the weighted average error of the entire base model across the entire sample, with off-diagonal elements. This represents the basic model. and The number of simultaneous errors reflects the divergence in the ensemble model; therefore It includes both the errors of each basic model and their discrepancies, thus effectively measuring the error of the ensemble model. Use formula (27) to The elements in the middle are normalized; according to the definition of integrated model error in formula (25), then Represented as: (27) in ,m The number of samples to be judged; when The ensemble model performs best when every element is minimized; therefore, the ensemble model optimization problem is transformed into a quadratic integer programming problem, expressed as: (28) (29) (30) in, Does this mean we need to select the first option? i Whether a base model is selected into the ensemble model depends on the transpose of the 0-1 variable matrix. binary scalar Indicates the first i Whether a base model is selected into the ensemble model, parameters s The optimized ensemble model size; S5: Input the retired battery sample to be judged into the integer-optimized ensemble model of S4, calculate the reconstruction error of the retired battery sample, give a reconstruction error threshold, and judge the output of each basic model. (0 / 1), calculate the early warning probability based on the output results of each basic model.
2. The method for early warning of thermal runaway in decommissioned batteries based on AI data reconstruction and integer optimization according to claim 1, characterized in that: The time-series variable characteristics in S2 include: total voltage. Total current State of charge of retired battery packs Temperature of retired battery packs and statistical variables .
3. The method for early warning of thermal runaway in decommissioned batteries based on AI data reconstruction and integer optimization according to claim 2, characterized in that: In S3, the time-series variables in the multi-dimensional time-series features obtained from the training sample set composed of normally retired batteries are standardized and used as the feature variables for the input of the basic model. Specifically, the input of the basic model is denoted as: (1) in, represent t Input data at any time, including retired battery packs t Total voltage at any moment Total current State of charge of retired battery packs Temperature of retired battery packs and statistical variables ; Using statistical methods to The data was constructed using a set of retired battery data, containing voltage and temperature data for 96 retired battery cells. This includes a set of retired battery data. t The statistical variables are the variance, mean, maximum, and minimum values of all individual unit voltages and the variance, maximum, and minimum values of all individual unit temperatures at any given time. The output of the basic model is the reconstructed data of the input features, denoted as: (2)。 4. The method for early warning of thermal runaway in decommissioned batteries based on AI data reconstruction and integer optimization according to claim 3, characterized in that: The maximum likelihood estimation mentioned in the construction of the objective function is based on statistical modeling methods, assuming... Follows Gaussian distribution , This represents the mean of the data. 2 Represents the variance of the data, when Once the distribution is determined, the probability distribution estimation problem is transformed into a parameter estimation problem. Maximum likelihood estimation assumes that the training data samples follow independent and identically distributed (i.i.d.) distributions. Therefore, the joint probability distribution is decomposed into a likelihood function, expressed as: (5) in, This represents the i-th sample data; The maximum likelihood estimation criterion is to maximize the likelihood function, which is equivalent to minimizing the negative log-likelihood function. Taking the logarithm of formula (5) transforms the product into an addition, thus optimizing the parameter set. Represented as: (6) Solving for parameters during optimization The gradient is expressed as: (7) The optimized parameter set is obtained using maximum likelihood estimation. Once the probability distribution is obtained, the probability distribution can be sampled. The maximum likelihood estimation process is extended using the latent variable model, specifically including: Assumption There exists z The process of generating a new probability distribution based on three important latent variables can be represented as follows: (8) Latent variable models, where any probability distribution can be mapped to any probability distribution after passing through a sufficiently complex function, thus continuing the idea of maximum likelihood function optimization for latent variables. z Then the negative log-likelihood function of the latent variable model is expressed as: (9) The parameters can be optimized based on the gradient in equation (9). After substituting the optimization parameters, the latent variable model is obtained. The Monte Carlo sampling method is used to replace the integral process in calculating the negative log-likelihood function using the variable model. Specifically, this includes: expressing the integral in the calculation of the negative log-likelihood function using the variable model in expectation form, as follows: (10) Using the expectation method to find the integral, from Multiple samplings z 1, z 2,… z m ,according to calculate x 1, x 2,… x m ,beg x The expected value is expressed as the mean as follows: (11) Through the z Multiple samplings were obtained Approximate value; Monte Carlo sampling has a sampling number m The problem of high demand is addressed by using variational inference to narrow down the scope. m To reduce the computational difficulty, specifically including: Variational inference uses the KL divergence to measure the similarity between two probability distributions, i.e. and The distances between them are as follows: (12) Simplifying the above equation, we get: (13) Equation (13) is to set an optimization target; For optimization objectives Specifically, it can be expressed as follows: (14) Let the battery data dimension be... d, Represented as: (15) Let the total data duration be T The cumulative reconstruction error is expressed as: (16) The overall objective function is expressed as: (17)。 5. The method for early warning of thermal runaway in decommissioned batteries based on AI data reconstruction and integer optimization according to claim 4, characterized in that: The reconstruction error threshold in S5 is obtained by training different normal retired battery samples on each basic model in the optimization ensemble model to obtain the corresponding reconstruction error. The obtained reconstruction errors form a reconstruction error set. The average value and standard deviation of the reconstruction error set are calculated, and the reconstruction error value that is exactly two standard deviations greater than the average value is selected as the threshold, denoted as K.
6. The method for early warning of thermal runaway in decommissioned batteries based on AI data reconstruction and integer optimization according to claim 5, characterized in that: In step S5, the output of each sub-model is determined. (0 / 1) is represented as: (31) in, y This indicates the judgment result of the basic model on the decommissioned battery to be judged; if its reconstruction error is greater than or equal to the set threshold... If the battery fails to reconstruct properly, it is considered thermally runaway and assigned a value of 1; otherwise, its reconstruction error is less than the set threshold. If the value is 0, the retired battery is judged as normal and assigned a value of 0.
7. The method for early warning of thermal runaway in decommissioned batteries based on AI data reconstruction and integer optimization according to claim 6, characterized in that: In step S5, the early warning probability is calculated based on the output results of each basic model, and is expressed as follows: (32) in, P It is the probability that a retired battery is judged to be in thermal runaway; For the first k The judgment result of the basic model on the retired battery can be calculated by formula (31); n The total number of basic models.