Power battery pack anomaly detection method and system combining VAE model and OT algorithm constraint

By combining the VAE-OT model with the variational autoencoder and the optimal transmission algorithm, the OT distance is used to determine the threshold, which solves the problems of difficulty in early detection of small anomalies and high false alarm rate in the existing technology, and realizes the detection of lithium battery packs. Fast and accurate abnormality detection ensures the safe operation of the battery pack.

CN118585931AActive Publication Date: 2024-09-03YANCHENG INST OF TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410489591.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-23
Publication Date
2024-09-03
Estimated Expiration
2044-04-23

AI Technical Summary

Technical Problem

Existing over-limit early warning technology is difficult to detect early minor abnormalities in lithium battery packs in a timely and accurate manner, and the difficulty in threshold setting results in many false alarms, which may lead to major failures and thermal runaway in the lithium battery system during use.

Method used

Combining the variational autoencoder (VAE) and the optimal transmission (OT) algorithm, through multi-dimensional time series signal detection, a VAE-OT model is constructed, and the OT distance is used to determine the optimal threshold to achieve fast and accurate detection of early potential anomalies in the lithium battery pack. detection.

Benefits of technology

It achieves timely detection of early minor anomalies in the lithium battery pack, reduces the false alarm rate, improves the accuracy and robustness of detection, and ensures the safe operation of the battery pack.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585931A
    Figure CN118585931A
Patent Text Reader

Abstract

The invention discloses a VAE model and OT algorithm constraint-combined power battery pack anomaly detection method and system, and the method comprises the steps: obtaining battery time sequence data during the actual operation of an electric vehicle, carrying out the preprocessing, and dividing the data into a model training set, a threshold training set and a test set; building a VAE-OT model, and training the VAE-OT model by adopting the model training set to obtain a trained VAE-OT anomaly detection model; inputting the threshold training set into a VAE-OT anomaly detection model to obtain a theoretical normal reconstruction data set of normal battery time sequence data and abnormal battery time sequence data, calculating OT distances corresponding to the normal battery time sequence data and the abnormal battery time sequence data in the threshold training set, finding out the OT distance enabling the resolution of the abnormal battery time sequence data to be maximum, and calculating the abnormal battery time sequence data; determining a hyper-parameter lambda in a VAE-OT anomaly detection model according to the OT distance to obtain an optimal threshold value of the VAE-OT anomaly detection model; and inputting real-time battery time sequence data when the electric vehicle runs into the tested VAE-OT anomaly detection model to obtain a real-time battery detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of abnormality detection of electric vehicle power battery packs, and specifically relates to a power battery pack abnormality detection method and system combining variational autoencoder (VAE) and optimal transport. Background Art

[0002] Safe operation is the primary consideration for lithium battery packs in electric vehicle applications. Affected by inherent defects in components, improper use and adverse operating conditions, as well as the degradation and aging of power battery performance, electric vehicle lithium-ion battery systems are prone to various types of failures, and even catastrophic accidents such as combustion and explosion. Through abnormal detection technology, abnormal battery conditions can be discovered in a timely manner and optimized and managed to prevent more serious failures. This is of great significance to ensuring the safe, reliable and stable operation of battery systems and even electric vehicles, as well as the safety of life and property of drivers and passengers.

[0003] At present, although BMS already has the fault detection function of over-limit alarm, that is, by monitoring a certain electrical characteristic parameter of the battery, such as voltage, current, internal resistance, or capacity, to determine whether a unit in the battery pack is abnormal or faulty, it can usually only detect major abnormalities or faults such as overvoltage, overcurrent and overheating of the battery. Limited by the complex structure and operation mechanism of the lithium-ion battery system, the current over-limit warning technology still has two major shortcomings: First, the characteristics of early minor abnormalities (faults) are hidden in the multidimensional time series and are easily masked by noise, making it difficult to detect them in a timely and accurate manner; second, it is difficult to set thresholds. The thresholds of different scenarios, different working conditions, and different systems may be significantly different, resulting in many false alarms. In addition, multiple faults are prone to coupling, and their characteristics are mixed together and difficult to distinguish, making it difficult to set reasonable thresholds.

[0004] If early minor anomalies cannot be detected promptly and accurately, they will continue to accumulate and develop during the subsequent use of the battery pack, further deteriorating and inducing major failures or even thermal runaway, resulting in uncontrollable consequences. Therefore, timely detection of early minor anomalies in battery packs is crucial to preventing potential problems. Summary of the invention

[0005] Purpose of the invention: In order to solve the problems of the existing over-limit warning technology, such as the inability to detect early minor anomalies (faults) in a timely and accurate manner, and the difficulty in setting thresholds, which leads to many false alarms, the present invention proposes a power battery pack anomaly detection method and system combining variational autoencoder (VAE) and optimal transport. By using multi-dimensional time series signals, it can quickly and accurately detect all early potential anomalies that may cause lithium battery pack failures.

[0006] Technical solution: A power battery pack anomaly detection method combining VAE model and OT algorithm constraints, including the following steps:

[0007] Step 1: Obtain battery timing data during actual operation of the electric vehicle, wherein the battery timing data includes normal battery timing data and abnormal battery timing data;

[0008] Step 2: preprocessing the battery time series data obtained in step 1 to obtain preprocessed battery time series data;

[0009] Step 3: Take the preprocessed normal battery time series data to build a model training set, and take the preprocessed normal battery time series data and abnormal battery time series data of equal quantity to build a threshold training set and a test set;

[0010] Step 4: Build a VAE-OT model and use the model training set to train the VAE-OT model to obtain a VAE-OT anomaly detection model;

[0011] Step 5: Input the threshold training set into the VAE-OT anomaly detection model to obtain the theoretical normal reconstruction data set of normal battery time series data and abnormal battery time series data, calculate the OT distance corresponding to the normal battery time series data and the abnormal battery time series data in the threshold training set, find the OT distance that maximizes the resolution of the abnormal battery time series data, determine the hyperparameter λ in the VAE-OT anomaly detection model based on the OT distance, and obtain the optimal threshold of the VAE-OT anomaly detection model;

[0012] Step 6: Use the test set to test the anomaly detection accuracy of the VAE-OT anomaly detection model adjusted in step 5;

[0013] Step 7: Input the real-time battery timing data of the electric vehicle during operation into the tested VAE-OT anomaly detection model to obtain the real-time battery detection results.

[0014] Furthermore, the battery time series data includes: current time series data with a time stamp, voltage time series data with a time stamp, and temperature time series data with a time stamp.

[0015] Furthermore, the battery time series data obtained in step 1 is preprocessed, and the specific operations include:

[0016] Delete pure empty and duplicate data rows;

[0017] Use interpolation methods to estimate missing values ​​and perform interpolation;

[0018] Perform normalization processing;

[0019] Using the sliding window method, the battery time series data obtained in step 1 is processed into a time window series data set with aligned points and consistent sampling point lengths.

[0020] Furthermore, the VAE-OT model includes: a VAE reconstruction model and an OT constraint model;

[0021] The VAE reconstruction model includes a GRU encoder and a GRU decoder; wherein the GRU encoder maps a multivariate observation sequence x with multiple time steps to a latent space that obeys a certain probability distribution based on the GRU variational inference network, and the latent variable z is stored as a posterior distribution p(z|x) that only belongs to the multivariate observation sequence x. By using the KL divergence, the posterior distribution p(z|x) is constrained to obey as much as possible. The normal distribution of 2 Respectively represent the mean and variance of the posterior distribution in the latent space, the mean μ and variance σ of the posterior distribution in the latent space 2 It is learned from the output of the GRU layer by two parallel dense layers using ReLU and SoftPlus activation functions respectively, and then uses a reparameterization technique to determine the posterior normal distribution Randomly sample hidden variables z in , and all hidden variables z form Z space;

[0022] The decoder randomly extracts elements from the Z space distribution according to the conditional probability distribution Parameters to generate reconstructed data similar to x

[0023] The OT constraint model is used to calculate the multivariate observation sequence x and the reconstructed data The OT distance between them.

[0024] Furthermore, the VAE-OT model is trained using the model training set to obtain the VAE-OT anomaly detection model, which specifically includes:

[0025] The optimization goal of the VAE-OT model is to maximize ELBO and minimize the OT distance of the generated samples, which can be expressed as:

[0026]

[0027] in:

[0028]

[0029] Where λ represents the hyperparameter of the VAE-OT anomaly detection model, represents the loss function of the VAE reconstruction model, θ represents the parameters of the encoder, φ represents the parameters of the decoder, x represents the input data, represents the expectation, z represents the hidden variable, represents the conditional distribution of the decoder-generated data, Represents the reconstructed data corresponding to the input data, q θ (z|x) represents the latent variable distribution under the input data x, p φ (z) represents the prior distribution of the latent variable, D KL [q θ (z|x)||p φ (z)] represents the latent variable distribution q generated by the encoder θ (z|x) and the prior distribution p φ (z) KL divergence between;

[0030] represents the loss function of the OT constraint model, P model represents the sample distribution generated by the VAE reconstruction model, P target represents the distribution of normal data, T represents the distribution from P model To P target The joint distribution of Π(P model ,P target ) indicates P model and P target The set of all possible joint distributions between represents the distance measure between the input data and the reconstructed data, Expressing expectation.

[0031] Furthermore, the real-time battery timing data of the electric vehicle during operation is input into the tested VAE-OT anomaly detection model to obtain the real-time battery detection results, which specifically include:

[0032] The real-time battery timing data of the electric vehicle during operation is input into the tested VAE-OT anomaly detection model to obtain the corresponding reconstructed data;

[0033] Calculate the OT distance between the real-time battery timing data of the electric vehicle during operation and the corresponding reconstructed data;

[0034] The OT distance is compared with the optimal threshold value. If the OT distance is greater than the optimal threshold value, the real-time battery detection result is abnormal; if the OT distance is not greater than the optimal threshold value, the real-time battery detection result is normal.

[0035] The present invention discloses a power battery pack abnormality detection system combining VAE model and OT algorithm constraints, comprising:

[0036] A real-time battery timing data acquisition module is used to acquire real-time battery timing data when the electric vehicle is running;

[0037] The battery anomaly detection module is used to input the real-time battery time series data acquired by the real-time battery time series data acquisition module into the VAE-OT anomaly detection model to obtain the corresponding reconstructed data;

[0038] The battery anomaly determination module is used to calculate the OT distance between the real-time battery timing data acquired by the real-time battery timing data acquisition module and the reconstructed data obtained by the battery anomaly detection module, and compare the OT distance with a predetermined optimal threshold. If the OT distance is greater than the optimal threshold, the real-time battery detection result is abnormal; if the OT distance is not greater than the optimal threshold, the real-time battery detection result is normal.

[0039] Furthermore, the VAE-OT anomaly detection model is constructed and trained according to the following steps:

[0040] Build a VAE-OT model;

[0041] Construct a model training set; use the model training set to train the VAE-OT model to obtain a VAE-OT anomaly detection model;

[0042] Wherein, the VAE-OT model includes: a VAE reconstruction model and an OT constraint model;

[0043] The VAE reconstruction model includes a GRU encoder and a GRU decoder; wherein the GRU encoder maps a multivariate observation sequence x with multiple time steps to a latent space that obeys a certain probability distribution based on the GRU variational inference network, and the latent variable z is stored as a posterior distribution p(z|x) that only belongs to the multivariate observation sequence x. By using the KL divergence, the posterior distribution p(z|x) is constrained to obey as much as possible. The normal distribution of 2 Respectively represent the mean and variance of the posterior distribution in the latent space, the mean μ and variance ρ of the posterior distribution in the latent space 2 It is learned from the output of the GRU layer by two parallel dense layers using ReLU and SoftPlus activation functions respectively, and then uses a reparameterization technique to determine the posterior normal distribution Randomly sample hidden variables z in , and all hidden variables z form Z space;

[0044] The decoder randomly extracts elements from the Z space distribution according to the conditional probability distribution Parameters to generate reconstructed data similar to x

[0045] The OT constraint model is used to calculate the multivariate observation sequence x and the reconstructed data The OT distance between them.

[0046] Furthermore, the VAE-OT model is trained using the model training set to obtain the VAE-OT anomaly detection model, which specifically includes:

[0047] The optimization goal of the VAE-OT model is to maximize ELBO and minimize the OT distance of the generated samples, which can be expressed as:

[0048]

[0049] in:

[0050]

[0051] Where λ represents the hyperparameter of the VAE-OT anomaly detection model, represents the loss function of the VAE reconstruction model, θ represents the parameters of the encoder, φ represents the parameters of the decoder, x represents the input data, represents the expectation, z represents the hidden variable, represents the conditional distribution of the decoder-generated data, Represents the reconstructed data corresponding to the input data, q θ (z|x) represents the latent variable distribution under the input data x, p φ (z) represents the prior distribution of the latent variable, D KL [q θ (z|x)||p φ (z)] represents the latent variable distribution q generated by the encoder θ (z|x) and the prior distribution p φ (z) KL divergence between;

[0052] represents the loss function of the OT constraint model, P model represents the sample distribution generated by the VAE reconstruction model, P target represents the distribution of normal data, T represents the distribution from P model To P target The joint distribution of Π(P model ,P target ) indicates Pmodel and P target The set of all possible joint distributions between represents the distance measure between the input data and the reconstructed data, Expressing expectation.

[0053] Further, the optimal threshold is determined in advance according to the following steps:

[0054] Construct threshold training set;

[0055] The threshold training set is input into the VAE-OT anomaly detection model to obtain the theoretical normal reconstruction data set of normal battery timing data and abnormal battery timing data, and the OT distance corresponding to the normal battery timing data and the abnormal battery timing data in the threshold training set is calculated to find the OT distance that maximizes the resolution of the abnormal battery timing data. The hyperparameter λ in the VAE-OT anomaly detection model is determined according to the OT distance to obtain the optimal threshold of the VAE-OT anomaly detection model.

[0056] Beneficial effects: Compared with the prior art, the present invention has the following advantages:

[0057] (1) The method of the present invention combines VAE and OT. In the multi-dimensional time series anomaly detection task, VAE can effectively learn the potential patterns and features of the data by mapping high-dimensional time series data to low-dimensional latent space, identify abnormal data points by generating new samples that conform to the distribution, and has good generalization ability and adaptability. The method of the present invention adds OT constraints to the loss function of VAE, which solves the problem that the latent space of VAE is continuous and data is generated by random sampling. Therefore, there is a certain uncertainty in the latent space of VAE, which will cause the model to represent abnormal data unclearly, so that the accuracy of anomaly detection is affected. The method of the present invention uses the OT method to calculate the distance or similarity between the generated new samples and the normal data samples, combines the reconstruction error of VAE and the distance or similarity calculated by OT, and comprehensively considers the reconstruction quality of the data and the difference between the data, so as to more accurately reconstruct the original normal data, realize more accurate and robust abnormal data detection, make the samples generated in the training process closer to the distribution of normal samples, so as to more accurately identify small potential anomalies in the test process, realize effective early detection and processing of abnormal conditions of the battery pack, and ensure the safe operation of the battery pack;

[0058] (2) In the training phase of the method of the present invention, the VAE model learns the potential representation of the data, and the OT model learns the characteristics of the data distribution; in the data distribution matching phase, the OT method is used to match and align different data distributions; in the anomaly detection phase, the detection and location of abnormal data points are achieved by combining the reconstruction capability of VAE and the distribution matching capability of OT. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 A flowchart of a battery pack abnormality detection method combining Variational Autoencoder (VAE) and Optimal Transport (OT) according to the present invention;

[0060] Figure 2 This is a schematic diagram of the structure of the GRU-based VAE reconstruction model;

[0061] Figure 3 Schematic diagram of the structure of the VAE reconstruction model with OT constraints added. DETAILED DESCRIPTION

[0062] The technical solution of the present invention is further described in conjunction with the accompanying drawings and embodiments.

[0063] Embodiment 1:

[0064] This embodiment discloses a battery pack abnormality detection method combining Variational Autoencoder (VAE) and Optimal Transport (OT), which can detect abnormalities of power battery packs in real time, improve the detection rate, and reduce the false alarm rate. It mainly includes the following steps:

[0065] Step 1: Obtain normal and abnormal time series data of the electric vehicle power battery pack during operation; the data acquisition covers various normal and abnormal situations as much as possible to ensure that the model has sufficient generalization ability and can accurately detect new abnormal situations. Specifically, normal time series data refers to normal data under various operating conditions in order to train the VAE-OT model, including but not limited to: real-time monitoring data of basic parameters such as current, voltage, and temperature, as well as timestamp information, with a collection frequency of 10s; specifically, abnormal time series data refers to various types of abnormal data under various operating conditions, which helps the model to conduct supervised learning to distinguish between normal and abnormal situations in order to set abnormal detection thresholds, including but not limited to: real-time monitoring data of basic parameters such as current, voltage, and temperature, as well as timestamp information, with a collection frequency of 10s.

[0066] Step 2: In the process of data collection, transmission, and recording, there may be problems such as missing data, data duplication, outliers, and misaligned data timestamps in the original data due to equipment failure, human error, system failure, or data corruption. Therefore, it is necessary to preprocess the normal and abnormal time series data to improve the quality and reliability of the data and ensure that the model can accurately learn and predict. The preprocessing includes but is not limited to the following operations, including: deleting pure empty and duplicate data rows, using interpolation methods (such as mean, median, mode) to estimate missing values, and interpolating, normalizing, and using the sliding window method to process the original data into a time window series data set with each point aligned and a sampling point length of 20;

[0067] Step 3: Divide the preprocessed data into model training set, threshold training set and test set; the specific division criteria are: the data in the model training set are all normal time series data, which are used for training the VAE-OT model; the threshold training set and test set contain normal time series data and abnormal time series data, and the number of normal time series data and abnormal time series data is equal; the threshold training set is used to determine the optimal threshold with the highest anomaly detection resolution; the test set is used to test the anomaly detection effect.

[0068] Step 4: Use Python to build Figure 2 The VAE-OT model shown in the figure mainly consists of two parts, including a GRU-based VAE reconstruction model and an OT constraint model;

[0069] Among them, the GRU-based VAE reconstruction model is a generative model that combines the ideas of autoencoder and variational inference to learn the potential representation of data and generate new data samples with similar features. The autoencoder consists of two parts: the encoder and the decoder. The encoder maps the input data to the encoded representation in the latent space, and the decoder maps this encoded representation back to the original data space to reconstruct the original data. The autoencoder is a method for approximately inferring the posterior distribution of a probability model. Its goal is to estimate the posterior distribution of the model parameters given the data and the model. In the GRU-based VAE reconstruction model, variational inference is used to estimate the probability distribution in the latent space of the encoder output.

[0070] Specifically, the encoder in the GRU-based VAE reconstruction model uses a GRU-based variational inference network to map a multivariate observation sequence x with multiple time steps to a latent space that obeys a certain probability distribution (such as a Gaussian distribution), and the latent variable z is stored as the posterior distribution p(z|x) that only belongs to x. By using the Kullback Leibler (KL) divergence, p(z|x) is constrained to obey as much as possible. The normal distribution of 2 denote the mean and variance of the posterior distribution in the latent space, respectively, and are learned from the output of the GRU layer by two parallel dense layers using ReLU and SoftPlus activation functions, respectively. A reparameterization technique is then used to determine the posterior normal distribution Randomly sample z from the Z space, and all z form the Z space. The decoder randomly extracts elements from the Z space distribution according to the trained conditional probability distribution Parameters to generate reconstructed data similar to x

[0071] Among them, the OT constraint model, also known as the Wasserstein distance, is a method for measuring the similarity between two probability distributions. Mathematically, the OT algorithm solves the problem of how to map one distribution to another in the best way so that the mapping cost is minimized. Specifically, the OT constraint model measures the difference between the generated new samples and the normal data distribution by calculating the minimum transmission cost between them, and uses it as part of the VAE loss function. When combined with the GRU-based VAE reconstruction model, the OT constraint model can further improve the performance and accuracy of the model, providing a more powerful solution to complex data distribution matching and anomaly detection problems. The steps for processing multidimensional time series data using Optimal Transport (OT) can be briefly summarized as follows:

[0072] Data representation: Assume that there are two matrices X consisting of multidimensional time series data = {x 1 ;x 2 ;...;x n} and Y={y 1 ;y 2 ;...;y m}, where the row vector Represents multidimensional data at each time point, and each column in the matrix represents a time series of one dimension.

[0073] Cost matrix construction: Define the cost matrix based on the distance or similarity between two multidimensional time series data. Among them, C ij Indicates that the time point x i Map to yj Each element represents the cost of mapping a time point from one sequence to another. Common cost functions include L p Distance, Euclidean distance, Mahalanobis distance, etc. The construction of the cost matrix can select the appropriate distance metric according to the specific application requirements.

[0074] Calculate the transportation plan: Based on the cost matrix, define the transportation plan Among them, γ ij Indicates that from x i to y j The transmission plan needs to meet the following constraints:

[0075] Rows and constraints:

[0076]

[0077] Among them, μ i Represents x i quality;

[0078] Columns and constraints:

[0079]

[0080] Among them, v i Represents y j quality;

[0081] Non-negativity constraint: γ ij ≥0.

[0082] The transmission schedule γ is calculated by solving the following optimization problem:

[0083] min r≥0 C,γ

[0084] The minimum total transmission cost that satisfies the constraints.

[0085] Calculate distance or similarity: According to the transmission plan γ, calculate the transmission cost TC (transportation cost) between two multidimensional time series data:

[0086]

[0087] Distance or similarity measure: Based on the transfer cost TC, the Wasserstein distance between two probability distributions is calculated. This distance represents the minimum cost required to transform one distribution into another.

[0088] Secondly, the OT method is used to calculate the observed sequence x and the reconstructed data The distance or similarity between them.

[0089] Step 5: Use the model training set to train the VAE-OT model to obtain the trained VAE-OT model; the specific operations include:

[0090] The input data passes through the encoder and the hidden layer of the GRU neural network layer by layer, and finally obtains the mean vector μ and variance vector σ in the latent space.

[0091] Then a random vector z is sampled from the latent space, passed through the decoder network, and passed through the hidden layers of the neural network layer by layer to finally generate reconstructed data.

[0092] In order to make the learned latent space more continuous and regular, the KL divergence loss is introduced into the loss function to measure the difference between the distribution in the latent space and the standard normal distribution; at the same time, in order to make the generated samples closer to the distribution of normal samples, the OT constraint is also introduced into the loss function.

[0093] Specifically include:

[0094] The training objective of the GRU-based VAE reconstruction model is to maximize the variational lower bound (ELBO), which consists of two parts: reconstruction error and KL divergence. The reconstruction error measures the difference between the generated sample and the original data, while the KL divergence is used to keep the latent variable distribution close to the prior distribution. The loss function for training the VAE model is:

[0095]

[0096] In the formula, θ represents the parameters of the encoder, φ represents the parameters of the decoder, and x represents the given input data. represents the expectation, z represents the hidden variable, represents the conditional distribution of the decoder-generated data, Represents the reconstructed data corresponding to the input data, q θ (z|x) represents the latent variable distribution under the given input data x, p φ (z) represents the prior distribution of the latent variable, D KL [q θ (z|x)||p φ (z)] represents the latent variable distribution q generated by the encoder θ (z|x) and the prior distribution p φ (z).

[0097] During the training process of the GRU-based VAE reconstruction model, the generated samples are adjusted by adding OT constraints to make them closer to the normal data distribution. The expression of OT constraints is:

[0098]

[0099] Where P model represents the sample distribution generated by the VAE reconstruction model, P target represents the distribution of normal data, T represents the distribution from P model To P target The joint distribution of Π(P model ,P target ) indicates P model and P target The set of all possible joint distributions between represents the distance measure between two samples, Expressing expectation.

[0100] In summary, the optimization goal of the VAE-OT model is to maximize ELBO and minimize the OptimalTransport distance of the generated samples:

[0101]

[0102] Among them, λ represents a hyperparameter that weighs the two parts of the loss.

[0103] In this step, the model training set is used for model training. The specific execution flow chart of the VAE-OT model is as follows: Figure 3 First, the model training set is input into the reconstruction model composed of the GRU-based VAE network for training, and the model parameters of each layer are determined, thereby determining the VAE-OT model; the VAE-OT model framework diagram is shown in Figure 3 shown.

[0104] Step 6: The trained VAE-OT model reconstructs the threshold training set to obtain the theoretical normal reconstructed data set corresponding to normal data and abnormal data, and calculates the reconstruction errors corresponding to the normal data and abnormal data in the threshold training set respectively, analyzes the distribution range of the reconstruction errors corresponding to the normal data and abnormal data in the threshold training set, and uses the clustering method to find the reconstruction error value that can maximize the resolution of abnormal data. The hyperparameter λ is determined based on the reconstruction error value, thereby determining the optimal threshold of the VAE-OT model; after determining the optimal threshold, in the subsequent operation process, the relationship between the reconstruction error between the input sample data and its reconstructed data and the threshold will be compared to determine whether the input data has an abnormality.

[0105] Step 7: After determining the optimal threshold, input the test set into the trained VAE-OT reconstruction model to obtain the reconstructed data set corresponding to the test set. By comparing the relationship between the reconstruction error between the input sample data and its reconstructed data and the threshold, it is determined whether the input data is abnormal, and the abnormality detection result of the test set is obtained. When it is greater than the optimal threshold, an abnormality is detected. At this time, the electric vehicle should be stopped and powered off for further observation and inspection; when it is less than the optimal threshold, the battery pack can operate normally. The method of this embodiment uses multi-dimensional time series signals to quickly, accurately and effectively detect all early potential anomalies that may cause lithium battery pack failures. The samples generated by VAE are adjusted through OT constraints to better match the original normal data distribution. When the abnormal sample passes through the trained VAE-OT model, its reconstruction error is amplified compared to using VAE alone, which helps to more easily identify small potential anomalies, can warn of potential problems in advance, and ensure the safe operation of the battery pack.

[0106] Embodiment 2:

[0107] Based on Example 1, this example proposes a power battery pack abnormality detection system that combines the VAE model and the OT algorithm constraints, including:

[0108] A real-time battery timing data acquisition module is used to acquire real-time battery timing data when the electric vehicle is running;

[0109] The battery anomaly detection module is used to input the real-time battery time series data acquired by the real-time battery time series data acquisition module into the VAE-OT anomaly detection model to obtain the corresponding reconstructed data;

[0110] The battery anomaly determination module is used to calculate the OT distance between the real-time battery timing data acquired by the real-time battery timing data acquisition module and the reconstructed data obtained by the battery anomaly detection module, and compare the OT distance with a predetermined optimal threshold. If the OT distance is greater than the optimal threshold, the real-time battery detection result is abnormal; if the OT distance is not greater than the optimal threshold, the real-time battery detection result is normal.

[0111] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0112] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A power battery pack abnormality detection method combining VAE model and OT algorithm constraints, characterized by: The following steps are involved: Step 1: Obtain battery timing data during actual operation of the electric vehicle, wherein the battery timing data includes normal battery timing data and abnormal battery timing data; Step 2: preprocessing the battery time series data obtained in step 1 to obtain preprocessed battery time series data; Step 3: Take the preprocessed normal battery time series data to build a model training set, take the preprocessed normal battery time series data and abnormal battery time series data of equal quantity to build a threshold training set, and take part of the preprocessed battery time series data to build a test set; Step 4: Build a VAE-OT model and use the model training set to train the VAE-OT model to obtain a VAE-OT anomaly detection model; Step 5: Input the threshold training set into the VAE-OT anomaly detection model to obtain the theoretical normal reconstruction data set of normal battery time series data and abnormal battery time series data, and calculate the OT distance corresponding to the normal battery time series data and the abnormal battery time series data in the threshold training set based on the theoretical normal reconstruction data set, find the OT distance that maximizes the resolution of the abnormal battery time series data, adjust the hyperparameter λ in the VAE-OT anomaly detection model according to the OT distance, and obtain the optimal threshold of the VAE-OT anomaly detection model; Step 6: Use the test set to test the anomaly detection accuracy of the VAE-OT anomaly detection model adjusted in step 5; Step 7: Input the real-time battery timing data of the electric vehicle during operation into the tested VAE-OT anomaly detection model to obtain the real-time battery detection results.

2. According to claim 1, a power battery pack abnormality detection method combining VAE model and OT algorithm constraints is characterized by: The battery time series data includes: current time series data with a time stamp, voltage time series data with a time stamp, and temperature time series data with a time stamp.

3. According to claim 1, a power battery pack abnormality detection method combining VAE model and OT algorithm constraints is characterized by: The preprocessing of the battery time series data obtained in step 1 specifically includes: Delete pure empty and duplicate data rows; Use interpolation methods to estimate missing values ​​and perform interpolation; Perform normalization processing; Using the sliding window method, the battery time series data obtained in step 1 is processed into a time window series data set with aligned points and consistent sampling point lengths.

4. According to claim 1, a power battery pack abnormality detection method combining VAE model and OT algorithm constraints is characterized by: The VAE-OT model includes: a VAE reconstruction model and an OT constraint model; The VAE reconstruction model includes a GRU encoder and a GRU decoder; wherein the GRU encoder maps a multivariate observation sequence x with multiple time steps to a latent space that obeys a certain probability distribution based on the GRU variational inference network, and the latent variable z is stored as a posterior distribution p(z|x) that only belongs to the multivariate observation sequence x. By using the KL divergence, the posterior distribution p(z|x) is constrained to obey as much as possible. The normal distribution of 2 Respectively represent the mean and variance of the posterior distribution in the latent space, the mean μ and variance σ of the posterior distribution in the latent space 2 It is learned from the output of the GRU layer by two parallel dense layers using ReLU and SoftPlus activation functions respectively, and then uses a reparameterization technique to determine the posterior normal distribution Randomly sample hidden variables z in , and all hidden variables z form Z space; The decoder randomly extracts elements from the Z space distribution according to the conditional probability distribution Parameters to generate reconstructed data similar to x The OT constraint model is used to calculate the multivariate observation sequence x and the reconstructed data The OT distance between them.

5. According to claim 4, a power battery pack abnormality detection method combining VAE model and OT algorithm constraints is characterized in that: The VAE-OT model is trained using the model training set to obtain the VAE-OT anomaly detection model, which specifically includes: The optimization goal of the VAE-OT model is to maximize ELBO and minimize the OT distance of the generated samples, which can be expressed as: in: Where λ represents the hyperparameter of the VAE-OT anomaly detection model, represents the loss function of the VAE reconstruction model, θ represents the parameters of the encoder, φ represents the parameters of the decoder, x represents the input data, represents the expectation, z represents the hidden variable, represents the conditional distribution of the decoder-generated data, Represents the reconstructed data corresponding to the input data, q θ (z|x) represents the latent variable distribution under the input data x, p φ (z) represents the prior distribution of the latent variable, D KL [q θ (z|x)||p φ (z)] represents the latent variable distribution q generated by the encoder θ (z|x) and the prior distribution p φ (z) KL divergence between; represents the loss function of the OT constraint model, P model represents the sample distribution generated by the VAE reconstruction model, P target represents the distribution of normal data, T represents the distribution from P model To P target The joint distribution of ∏(P model ,P target ) indicates P model and P target The set of all possible joint distributions between represents the distance measure between the input data and the reconstructed data, Expressing expectation.

6. The power battery pack abnormality detection method combining VAE model and OT algorithm constraints according to claim 1 is characterized in that: The real-time battery timing data of the electric vehicle during operation is input into the tested VAE-OT anomaly detection model to obtain the real-time battery detection results, which specifically include: The real-time battery timing data of the electric vehicle during operation is input into the tested VAE-OT anomaly detection model to obtain the corresponding reconstructed data; Calculate the OT distance between the real-time battery timing data of the electric vehicle during operation and the corresponding reconstructed data; The OT distance is compared with the optimal threshold value. If the OT distance is greater than the optimal threshold value, the real-time battery detection result is abnormal; if the OT distance is not greater than the optimal threshold value, the real-time battery detection result is normal.

7. A power battery pack anomaly detection system combining VAE model and OT algorithm constraints, characterized by: include: A real-time battery timing data acquisition module is used to acquire real-time battery timing data when the electric vehicle is running; The battery anomaly detection module is used to input the real-time battery time series data acquired by the real-time battery time series data acquisition module into the VAE-OT anomaly detection model to obtain corresponding reconstructed data; The battery anomaly determination module is used to calculate the OT distance between the real-time battery timing data acquired by the real-time battery timing data acquisition module and the reconstructed data obtained by the battery anomaly detection module, and compare the OT distance with a predetermined optimal threshold. If the OT distance is greater than the optimal threshold, the real-time battery detection result is abnormal; if the OT distance is not greater than the optimal threshold, the real-time battery detection result is normal.

8. The power battery pack abnormality detection system combining VAE model and OT algorithm constraints according to claim 7 is characterized in that: The VAE-OT anomaly detection model is constructed and trained according to the following steps: Build a VAE-OT model; Construct a model training set; use the model training set to train the VAE-OT model to obtain a VAE-OT anomaly detection model; Wherein, the VAE-OT model includes: a VAE reconstruction model and an OT constraint model; The VAE reconstruction model includes a GRU encoder and a GRU decoder; wherein the GRU encoder maps a multivariate observation sequence x with multiple time steps to a latent space that obeys a certain probability distribution based on the GRU variational inference network, and the latent variable z is stored as a posterior distribution p(z|x) that only belongs to the multivariate observation sequence x. By using the KL divergence, the posterior distribution p(z|x) is constrained to obey as much as possible. The normal distribution of 2 Respectively represent the mean and variance of the posterior distribution in the latent space, the mean μ and variance σ of the posterior distribution in the latent space 2 It is learned from the output of the GRU layer by two parallel dense layers using ReLU and SoftPlus activation functions respectively, and then uses a reparameterization technique to determine the posterior normal distribution Randomly sample hidden variables z in , and all hidden variables z form Z space; The decoder randomly extracts elements from the Z space distribution according to the conditional probability distribution Parameters to generate reconstructed data similar to x The OT constraint model is used to calculate the multivariate observation sequence x and the reconstructed data The OT distance between them.

9. The power battery pack abnormality detection system combining VAE model and OT algorithm constraints according to claim 8 is characterized in that: The VAE-OT model is trained using the model training set to obtain the VAE-OT anomaly detection model, which specifically includes: The optimization goal of the VAE-OT model is to maximize ELBO and minimize the OT distance of the generated samples, which can be expressed as: in: Where λ represents the hyperparameter of the VAE-OT anomaly detection model, represents the loss function of the VAE reconstruction model, θ represents the parameters of the encoder, φ represents the parameters of the decoder, x represents the input data, represents the expectation, z represents the hidden variable, represents the conditional distribution of the decoder-generated data, Represents the reconstructed data corresponding to the input data, q θ (z|x) represents the latent variable distribution under the input data x, p φ (z) represents the prior distribution of the latent variable, D KL [q θ (z|x)||p φ (z)] represents the latent variable distribution q generated by the encoder θ (z|x) and the prior distribution p φ (z) KL divergence between; represents the loss function of the OT constraint model, P model represents the sample distribution generated by the VAE reconstruction model, P target represents the distribution of normal data, T represents the distribution from P model To P target The joint distribution of Π(P model ,P target ) indicates P model and P target The set of all possible joint distributions between represents the distance measure between the input data and the reconstructed data, Expressing expectation.

10. The power battery pack abnormality detection system combining VAE model and OT algorithm constraints according to claim 9 is characterized in that: Follow these steps to predetermine the optimal threshold: Construct threshold training set; The threshold training set is input into the VAE-OT anomaly detection model to obtain the theoretical normal reconstruction data set of normal battery timing data and abnormal battery timing data, and the OT distance corresponding to the normal battery timing data and the abnormal battery timing data in the threshold training set is calculated to find the OT distance that maximizes the resolution of the abnormal battery timing data. The hyperparameter λ in the VAE-OT anomaly detection model is determined according to the OT distance to obtain the optimal threshold of the VAE-OT anomaly detection model.

Citation Information

Patent Citations

  • Lithium battery anomaly detection method integrating variational auto-encoder and dynamic normalization

    CN115469227A

  • Hyperspectral anomaly detection method of variational background inference generative adversarial network

    CN116385351A

  • Variable auto-encoder power battery anomaly detection method, system and device and storage medium

    CN117074961A

  • Learning deep latent variable models by short-run MCMC inference with optimal transport correction

    US20220398446A1

  • System and Method for Automated Transfer Learning with Domain Disentanglement

    US20230162023A1