Movatterモバイル変換


[0]ホーム

URL:


CN119749253A - A fault warning method for automotive lithium batteries based on multivariate prediction and anomaly detection - Google Patents

A fault warning method for automotive lithium batteries based on multivariate prediction and anomaly detection
Download PDF

Info

Publication number
CN119749253A
CN119749253ACN202411826294.3ACN202411826294ACN119749253ACN 119749253 ACN119749253 ACN 119749253ACN 202411826294 ACN202411826294 ACN 202411826294ACN 119749253 ACN119749253 ACN 119749253A
Authority
CN
China
Prior art keywords
data
voltage
temperature
value
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202411826294.3A
Other languages
Chinese (zh)
Other versions
CN119749253B (en
Inventor
申江卫
陈鑫
陈峥
沈世全
魏福星
夏雪磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kunming University of Science and Technology
Original Assignee
Kunming University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kunming University of Science and TechnologyfiledCriticalKunming University of Science and Technology
Priority to CN202411826294.3ApriorityCriticalpatent/CN119749253B/en
Publication of CN119749253ApublicationCriticalpatent/CN119749253A/en
Application grantedgrantedCritical
Publication of CN119749253BpublicationCriticalpatent/CN119749253B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

Translated fromChinese

本发明公开了一种基于多元预测与异常检测的车用锂电池故障预警方法,包括:通过大数据平台采集车辆电池系统的运行数据;对采集到的数据进行数据清洗并形成数据集;将数据集划分为训练集和测试集;通过训练集构建预测模型;将测试集输入预测模型,以最高单体电压和最高探针温度为预测标签值得到预测结果;输出预警结果。本发明对电池的电压和温度进行了高精度同步前向预测,实验结果表明,相较于现有的电池管理系统(BMS)预警方法,本发明可提前4.5分钟实现电压过限预警,提前83.5分钟实现欠压前电压异常升降预警,提前24.6分钟实现温度报警,并在故障发生前35.1分钟实现温度预警,为驾驶人员提供了充足的反应时间,显著增强了车辆的安全性能。

The present invention discloses a vehicle lithium battery fault warning method based on multivariate prediction and anomaly detection, including: collecting the operating data of the vehicle battery system through a big data platform; cleaning the collected data and forming a data set; dividing the data set into a training set and a test set; building a prediction model through the training set; inputting the test set into the prediction model, and obtaining the prediction result with the highest single cell voltage and the highest probe temperature as the prediction label value; and outputting the warning result. The present invention performs high-precision synchronous forward prediction of the voltage and temperature of the battery. The experimental results show that compared with the existing battery management system (BMS) warning method, the present invention can realize voltage over-limit warning 4.5 minutes in advance, realize abnormal voltage rise and fall warning before undervoltage 83.5 minutes in advance, realize temperature alarm 24.6 minutes in advance, and realize temperature warning 35.1 minutes before the failure occurs, providing sufficient reaction time for the driver and significantly enhancing the safety performance of the vehicle.

Description

Vehicle lithium battery fault early warning method based on multi-element prediction and anomaly detection
Technical Field
The invention relates to the field of fault diagnosis of battery management technology, in particular to a vehicle lithium battery fault early warning method based on multi-element prediction and anomaly detection.
Background
The accurate battery fault diagnosis and early warning are carried out before dangerous faults occur, which is the key for guaranteeing the safe, stable and reliable operation of the power battery system of the electric automobile, and simultaneously, the theory, the method and the technical support are provided for the accurate operation and maintenance of the battery system. At present, power battery fault diagnosis and early warning methods are mainly divided into three main categories, namely a method based on statistical analysis, a method based on a battery model and a method based on data driving. The statistical analysis-based method directly analyzes the collected data by using various statistical methods such as entropy, gaussian distribution, correlation coefficient, maximum likelihood and the like through the data information collected by different sensors, and finally realizes fault diagnosis by setting reasonable thresholds. The core of the battery model-based method is to establish an accurate battery model, and realize fault alarm by comparing residual errors between a model predicted value and an actual value. In contrast, data-driven based methods utilize techniques such as machine learning and statistical analysis to analyze historical and real-time data of the battery to detect and predict potential faults.
However, the method of statistical analysis generally depends on some simple threshold or specific statistical index, but in the face of complex, nonlinear, and multivariable tasks of diagnosing faults of lithium ion batteries, effective detection cannot be performed at an early stage. The battery model-based method has the defects that a high-precision battery model is relied on, and early warning capability for faults is weak. The data-driven method overcomes the difficulty of building complex battery models, particularly electrochemical models, uses a large amount of vehicle operating data for analysis, and has significant advantages in processing nonlinear systems. Although there have been a great deal of research on data-driven methods, most of the research has focused on fault diagnosis using historical data, and prediction of data often only enables real-time prediction or single-step prediction (i.e., predicting data at a future point in time in advance), which makes the research biased toward diagnosis after the occurrence of a fault, whereas fault early warning can only be achieved in real time or only in a short period of early warning. In addition, most researches only consider the influence of a single output result on faults, so that the early warning effect is limited to a single dimension, such as diagnosing or early warning only voltage or temperature faults, and cannot fully consider the progressive relationship between the voltage faults and the temperature faults, so that the early warning effect is single and limited. Whereas the warning time of the vehicle Battery Management System (BMS) itself tends to be warning when various levels of faults (typically three levels) occur or relatively late. For the research of multi-fault early warning, the problem of low early warning accuracy caused by the fact that accuracy is reduced when multi-element long-term prediction is carried out is solved, and at the present stage, the research of multi-fault long-term early warning of a lithium ion battery is still relatively deficient, or high-accuracy multi-fault long-term early warning cannot be realized. The method which accords with the actual application scene is established, a technology capable of realizing accurate multi-fault long-time early warning of the lithium ion battery is developed, and the method has important significance for guaranteeing personal safety and promoting development of electric vehicles.
Disclosure of Invention
The invention provides a vehicle lithium battery fault early-warning method based on multi-element prediction and anomaly detection, which aims to solve the problems that voltage and temperature two important parameters early-warning faults are single, accuracy is reduced during multi-fault early-warning and long-time early-warning cannot be performed.
In order to realize the technical scheme, the method comprises the following steps:
S1, acquiring operation data of a vehicle battery system through a big data platform;
The vehicle battery system comprises a battery system of a normal vehicle and a vehicle with fault alarm;
the fault types include voltage faults and temperature faults;
the voltage faults comprise overvoltage, undervoltage and too fast voltage change of the battery unit;
the temperature fault comprises that the temperature rises too fast and exceeds a set threshold value;
Collecting operation data of a vehicle battery system, including a vehicle ID, a sampling time, a total battery pack voltage (TV), a Highest Cell Voltage (HCV), a Lowest Cell Voltage (LCV), an SOC, a total current (C), a highest probe temperature (HT) and a lowest probe temperature (LT);
S2, data cleaning is carried out on the collected data, and a data set is generated;
Due to the complex operating conditions, the acquired data needs to be cleaned as necessary;
The data cleaning method comprises the following steps:
(1) The method comprises the steps of filling the missing data of the lost frames smaller than three frames by using linear interpolation, and removing the missing fragments larger than three frames, namely six data in one minute are sampled once every ten seconds, if 1-3 data are lost in the fragments, the fragments are missing, linear interpolation is selected for filling the missing values, and the fragments with the missing values larger than 3 data are directly deleted;
(2) The normal range of the SOC is [200V,500V ], [ -1000A,1000A ], [2V,5V ], [ -40 ℃ and 210 ℃ and [0,100] respectively, and the data exceeding the range are regarded as abnormal acquisition data of the sensor to be removed;
(3) Performing noise reduction processing on all data by using wavelet transformation;
The generation of the data set is that the highest voltage (HCV) of a single body, the Highest Temperature (HT) of a probe is randomly used as the last two columns, the Total Voltage (TV) of a battery pack, the total current (C), the SOC, the lowest voltage (LCV) of the single body, the Lowest Temperature (LT) of the probe and the front five data sequences do not have fixed requirements to form a matrix X with the dimension of [ N,7 ];
The expression is as follows:
the highest voltage of a single battery is selected as a predicted label value Y1, the highest temperature of a probe is selected as a predicted label value Y2, and the expression is as follows:
Wherein N represents the total length of the matrix formed by all data and is equal to the sum of the rows of the matrix of the training set and the test set;
S3, dividing the data set into a training set and a testing set;
Specifically, the normal vehicle data is used as a training set to obtain a training matrix Xtr, the fault vehicle is used as a testing set to obtain a testing matrix Xte, and the training set and the testing set keep the same data form;
Namely, a data matrix formed by the No. 1 normal vehicle and the No. 2 normal vehicle is used as a training set, and a data matrix formed by the No. 3 fault vehicle is used as a test set;
The expression is as follows:
Wherein n represents the total number of rows of the training set matrix;
S4, constructing a prediction model through a training set, wherein the method comprises the following steps:
S4.1, inputting a training set into a TCN model and carrying out causal convolution to extract input features, wherein an output formula of the causal convolution is as follows:
In the formula,Cin is the number of input channels equal to the number of input features, 7;cout is the number of output channels equal to the number of convolution kernels, 256 is the value representing the conversion of the extracted features into 256-dimensional data, z is the size of the convolution kernels, 3 is the value, and in the time convolution this value determines how many time steps the convolution kernels cover; The weight of the convolution kernel is represented by weight parameters at the positions i of the output channel cout, the input channel cin and the convolution kernel, the initial value is a random value which is 0 as a mean value and 0.01 as a standard deviation and accords with normal distribution, and the weight determines how the convolution kernel performs weighted summation on the input characteristics so as to generate output; Is the value of the input data at time step t-i and input channel cin, where t-i represents the input value of a lag amount relative to the current time step t; the offset term representing each output channel is 0 in initial value and has no fixed value, the offset term can be continuously adjusted in the training process, and the offset term is used for adding an additional linear offset to the weighted sum result of convolution so as to increase the flexibility of a model;
S4.2, taking the output after the input features are extracted as the input of the LSTM, and obtaining the hidden state of the current time step t;
Specifically, the output after the input features are extracted is used as the input of the LSTM, the input gate, the forgetting gate, the candidate cell state, the cell state update, the output gate and the hidden state update calculation are sequentially carried out after the features enter the LSTM, the long-term dependency relationship is further captured through the LSTM model, and finally, the predicted value is output through the full-connection layer, and the expression is as follows:
Wherein it represents the activation value of the input gate for controlling the amount of new information added to the cell state, sigma represents the sigmoid activation function, the output value is between 0 and 1 for controlling the proportion of input information added, Wi represents the weight matrix of the input gate, and zt-1 represents the hiding state of the last time step, and the value is 128; values representing the output sequence at time step t and output channel cout, used as inputs to the LSTM model; The method comprises the steps of showing that the hidden state of the last time step is spliced with the characteristics extracted by TCN of the current time step, bi showing the bias item of the input gate, ft showing the activation value of the forgetting gate, Wf showing the weight matrix of the forgetting gate, bf showing the bias item of the forgetting gate; Is a candidate cell state, tanh represents a hyperbolic tangent activation function, Wc is a weight matrix used to generate candidate cell states, bc is a bias term for candidate cell states, ct is the cell state of the current time step, ft⊙ct-1 is the ratio ft of the previous cell state, representing a selective forgetting portion; Is a candidate state update under the state of the input gate, according to element multiplication, ot is the activation value of the output gate, Wo is the weight matrix of the output gate, bo is the bias term of the output gate, zt is the hidden state of LSTM at the current time step t, and tan h (ct) represents nonlinear change of the cell state;
S4.3, after calculating to obtain the hidden state of the current time step t, the hidden state is transferred to a full connection layer, and the hidden state is mapped to a target prediction space to obtain a predicted value, wherein the expression is as follows:
In the formula,Is the predicted result of voltage or temperature of time step t, Wy is the weight matrix of the full connection layer, zt is the hidden state of LSTM at the current time step t, by is the bias term of the full connection layer, because binary data (voltage and temperature) is predicted, the dimension of the bias term is 2, representing that the hidden state is mapped to two output targets;
S4.4, after the training set is input into the model, initializing and assigning all weight matrixes and bias items in S4.1-S4.3, calculating the input by using the currently initialized parameter values in forward propagation by the model according to the formula until a final prediction result is output, and obtaining a prediction value through forward propagationAnd the error is calculated through the loss function, then back propagation is carried out for calculating the gradient of the loss function on each parameter, the back propagation can transfer the influence of the loss function on each parameter, then the weight and the bias term parameters obtained in the steps are updated through an Adam optimizer, so that the loss function is reduced, the Mean Square Error (MSE) is used as a training set loss function, and the expression is as follows:
where n represents the length of the data of the training set, where n has a value of 907578, Yt represents the true value of the voltage or temperature at time step t,Is the predicted voltage or temperature value at time t;
s5, inputting the test set into a prediction model, and obtaining a prediction result by taking the highest monomer voltage and the highest probe temperature as prediction label values;
specifically, after the test set is input into the prediction model, the model can repeat the formula obtained by bringing the previous training set into the model to calculate and call the obtained training parameters, and the step of obtaining the prediction result by taking the highest monomer voltage and the highest probe temperature as the prediction label value is as follows:
S5.1, inputting the test set into a TCN model and carrying out causal convolution to extract input features, wherein the expression of the extracted features is as follows:
In the formula,Xt-τ+1:t represents a test set input sequence of past τ time steps, τ being the time window size, and the value being 126;
S5.2, transmitting the features extracted from the TCN as input to the LSTM to obtain a hidden state zt of the time step, wherein the expression is as follows:
wherein zt-τ+1:t represents a hidden state sequence obtained after accepting the feature input;
S5.3, generating predicted values of delta time steps in the future by inputting the hidden state into the full connection layer, wherein the expression is as follows:
In the formula,The method comprises the steps of representing the highest voltage of a monomer and the highest temperature value of a probe, wherein the highest voltage and the highest temperature value of the probe comprise delta time steps in the future, delta is 24, [ HCVt+1:t+Δ,HTt+1:t+Δ ] is a prediction vector of delta time steps in the future of voltage and temperature, Wy is a weight matrix of a full-connection layer, zt is a hidden state of LSTM at the current time step t, only the hidden state obtained at the moment of the last time step t is used here, by is a bias term of the full-connection layer, the bias term is continuously adjusted in the training process, and the bias term is used for adding an additional linear offset to the weighted sum result of convolution so as to increase the flexibility of a model;
Specifically, when the test set enters the TCN-LSTM model, the data is divided into M samples, each sample comprises a sliding window with a length of 126 and a label output with a predicted length of 24, and as sample data 1 enters the model, model parameters obtained by training are called to obtain the highest monomer voltage label dataThen the sample data 2 enters a model to repeat the process to obtain label dataAnd so on for the last sampleObtaining tag dataM is the number of samples, the value is N-N-126-24+1= 29766, and the specific prediction flow is as follows:
similarly, the predicted data of the probe maximum temperature can be obtained according to the methodSuch asThe prediction flow of (1) is as follows:
Wherein Xte represents a test set matrix; representing the first sample of the test set into the TCN-LSTM model, and so onThe method comprises the steps of representing an Mth sample of a test set entering a model and also representing a last sample, wherein N represents the data length of a training set and is equal to the number of rows of a matrix, N represents the total length of the training set and the data of the test set, Y1(1) represents the highest monomer voltage prediction data vector obtained by the first sample, and Y1(M) represents the highest monomer voltage prediction data vector obtained by the Mth sample in a analogized way;
in order to better quantify the difference between the predicted value and the true value obtained by the test set, a Root Mean Square Error (RMSE) is adopted as an evaluation index for evaluating the predicted performance of the model test set, and the calculation formula of the RMSE is as follows:
where N-N represents the length of the data of the test set, Yt represents the true value of the voltage or temperature,Is the predicted voltage or temperature value at time step t;
S6, outputting an early warning result;
Specifically, when the predicted voltage or temperature value exceeds the set upper and lower limits, triggering overvoltage, undervoltage or temperature abnormality alarm, when the predicted value does not exceed the set upper and lower limits, but the predicted value obtains a local abnormality detection algorithm (LOF) to obtain an LOF outlier factor value exceeding 1, triggering voltage abnormality elevation alarm or temperature abnormality elevation alarm;
The method comprises the following steps:
S6.1, carrying out standardization processing on the prediction result;
Specifically, after the predicted values of the voltage data and the temperature data are obtained, the input data need to be standardized to ensure that the data are compared on the same scale, and the standardized formula is as follows:
In the formula,Is the predicted voltage or temperature value obtained at time t, muj is the mean value of the voltage or temperature signature j, sigmaj is the standard deviation of the voltage or temperature signature j, zj is the normalized voltage or temperature value;
S6.2, respectively combining the standardized voltage data or temperature data into a data set D and a data set U, and calculating local outlier factors of each point in the data set D and the data set U to obtain an early warning result, wherein the method comprises the following steps of:
S6.2.1, defining Euclidean distance, namely taking any point o except p in one data point p, D or U in the set, defining the Euclidean distance between the point p and the point o as D(p,o), and for any two points p= (p1,p2,...,pm) and o= (o1,o2,...,om), obtaining the Euclidean distance formula in m-dimensional space:
s6.2.2 defining a kth distance, namely defining the distance between the point p and the nearest k points as d1~k(p),d1~k (p), dk (p), and dk (p) as the kth distance of the point p;
dk (p) is required to satisfy the following two points (1) that at least k points o ' except the point p in D or U enable Dk(p,o′)≤dk (p, o); (2) that at most k-1 points o ' except the point k enable D (p, o ') < D (p, o); wherein the k value is taken as 25, and the distance between the adjacent 25 points is calculated;
S6.2.3 defining a kth distance neighborhood Nk (p), namely a set of all points of which the distance of a kth distance field Nk (p) point p of the point p is less than or equal to the kth distance of the point p, wherein the expression representing the kth distance field is:
Nk(p)={o′|d(p,o′)≤dk(p)}
Where d (p, o ') is the Euclidean distance of point p from point o', dk (p) is the kth distance of point p;
S6.2.4, calculating a kth reachable distance dk,reach (p, o), wherein the kth reachable distance has a calculation formula:
dk,reach(p,o)=max{d(p,o),dk(o)}
Wherein d (p, o) is the Euclidean distance between the point p and the point o, dk (o) is the kth distance of the point o, and max is the maximum value of the two;
s6.2.5, calculating a kth local reachable density lrdk (p) of the point p, wherein the local reachable density is calculated according to the following formula:
Wherein Nk (p) is the number of Nk (p) points in the field of point p, dk,reach (p, o) is the kth reachable distance from point p to point o;
S6.2.6, calculating a kth local outlier factor LOFk (p) of the point p, wherein the calculation formula of the kth local outlier factor is as follows:
wherein, lrdk (o) is the k local reachable density of the point o, lrdk (p) is the k local reachable density of the point p, and I Nk (p) is the number of Nk (p) points in the field of the point p;
S6.2.7, separating points into outliers and normal points based on the calculated local outlier factor value, setting the threshold value of the local outlier factor to be 1, and determining the points to be outliers when the calculated LOFk (p) is greater than 1;
The rule of outputting the early warning result is that when the predicted value of the highest voltage of the monomer is larger than the upper limit cut-off voltage, the overvoltage warning is triggered, and when the predicted value is in the normal range but the LOF outlier factor value is larger than 1, the abnormal voltage fluctuation early warning is triggered, when the predicted value of the highest temperature of the monomer is larger than the upper limit of the temperature, the abnormal temperature warning is triggered, and when the temperature value is in the normal range but the LOF outlier factor value is larger than 1, the abnormal temperature fluctuation early warning is triggered;
The upper cutoff voltage is 4.25V, and the lower cutoff voltage is 3.4V;
the upper temperature limit is 55 ℃.
The beneficial effects of the invention are that
The invention provides a vehicle lithium battery fault early warning method based on multiple prediction and anomaly detection, and experimental results show that on the basis of accurate prediction, accurate multi-step (24 steps, namely 4 minutes in advance) prediction on future data of voltage faults and temperature faults is realized, so that the early warning range is expanded from the voltage faults to the temperature faults with larger influence on safety, and more sufficient emergency treatment time is provided for drivers. Experiment results show that compared with the existing Battery Management System (BMS) early warning method, the method can early warn voltage overrun by 4.5 minutes, early warn voltage abnormal rise and fall before undervoltage by 83.5 minutes, early warn temperature abnormality by 24.6 minutes, and early warn temperature by 35.1 minutes before faults occur.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a schematic diagram of the method of the present invention;
FIG. 3 is a schematic diagram of a model structure of the present invention, wherein (a) is a schematic diagram of a Time Convolutional Network (TCN), (b) is a residual convolutional block diagram of the TCN model, and (c) is a schematic diagram of a long-short-term memory neural network (LSTM);
FIG. 4 shows the predicted result of the highest probe temperature and the comparison result with the actual value, wherein (a) part represents the actual value of the temperature, (b) part represents the predicted value of the temperature, and (c) part represents the error between the actual value and the predicted value;
FIG. 5 shows the result of predicting the highest voltage of the single body and the result of comparing the highest voltage with the actual value, wherein, (a) part represents the actual value of the voltage, (b) part represents the predicted value of the voltage, and (c) part represents the error between the actual value and the predicted value;
FIG. 6 is an overpressure warning result obtained by the practice of the present invention;
FIG. 7 is an under-voltage warning result obtained by the implementation of the present invention;
FIG. 8 shows the result of temperature warning obtained by the implementation of the present invention.
Detailed Description
The present invention will be described in further detail with reference to specific examples.
As shown in fig. 1 and 2, the method for early warning the fault of the lithium battery for the vehicle based on the multi-element prediction and the anomaly detection comprises the following steps:
S1, acquiring operation data of a vehicle battery system through a big data platform;
The vehicle battery system comprises a battery system of a normal vehicle and a vehicle with fault alarm;
the fault types include voltage faults and temperature faults;
the voltage faults comprise overvoltage, undervoltage and too fast voltage change of the battery unit;
the temperature fault comprises that the temperature rises too fast and exceeds a set threshold value;
The method comprises the steps of collecting vehicle operation data based on a big data platform and extracting actual operation data of a power battery, wherein the collected vehicles comprise normal vehicles and vehicles with fault alarm, fault types comprise voltage faults and temperature faults, the voltage faults comprise overvoltage, undervoltage and too fast voltage changes of battery cells, and the temperature faults comprise too fast temperature rise and temperature exceeding a set threshold (-20 ℃ to 55 ℃);
Collecting operation data of a vehicle battery system, including a vehicle ID, a sampling time, a total battery pack voltage (TV), a Highest Cell Voltage (HCV), a Lowest Cell Voltage (LCV), an SOC, a total current (C), a highest probe temperature (HT) and a lowest probe temperature (LT);
in the embodiment, the real data condition of three electric automobile battery systems running for half a year is acquired through a big data detection platform, the data acquisition process strictly follows the protocol of electric automobile remote service and management technical specification, the data acquisition process comprises two vehicles (No. 1 vehicle and No. 2 vehicle) which normally run and one vehicle (No. 3 vehicle) which have fault alarm, the No. 1 vehicle runs in a summer high-temperature environment, the No. 2 vehicle runs in a winter low-temperature environment, the No. 3 vehicle has BMS fault alarm, the fault types comprise voltage faults (single battery overvoltage, undervoltage and voltage change rate are too fast) and temperature faults (temperature rise is too fast and the temperature exceeds a set threshold), the data sampling frequency of the three vehicles is once every 10 seconds, the charge cut-off voltage (upper limit cut-off voltage) of the battery is 4.25V, the discharge cut-off voltage (lower limit cut-off voltage) is 3.4V, and the temperature upper limit and lower limit range is-20 ℃ to 55 ℃;
S2, data cleaning is carried out on the collected data, and a data set is generated;
Due to the complex operating conditions, the acquired data needs to be cleaned as necessary;
The data cleaning method comprises the following steps:
(1) The method comprises the steps of filling the missing data of the lost frames smaller than three frames by using linear interpolation, and removing the missing fragments larger than three frames, namely six data in one minute are sampled once every ten seconds, if 1-3 data are lost in the fragments, the fragments are missing, linear interpolation is selected for filling the missing values, and the fragments with the missing values larger than 3 data are directly deleted;
(2) The normal range of the SOC is [200V,500V ], [ -1000A,1000A ], [2V,5V ], [ -40 ℃ and 210 ℃ and [0,100] respectively, and the data exceeding the range are regarded as abnormal acquisition data of the sensor to be removed;
(3) Performing noise reduction processing on all data by using wavelet transformation;
The generation of the data set is that the highest voltage (HCV) of a single body, the Highest Temperature (HT) of a probe is randomly used as the last two columns, the Total Voltage (TV) of a battery pack, the total current (C), the SOC, the lowest voltage (LCV) of the single body, the Lowest Temperature (LT) of the probe and the front five data sequences do not have fixed requirements to form a matrix X with the dimension of [ N,7 ];
The expression is as follows:
the highest voltage of a single battery is selected as a predicted label value Y1, the highest temperature of a probe is selected as a predicted label value Y2, and the expression is as follows:
Wherein N represents the total length of the matrix formed by all data and is equal to the sum of the matrix rows of the training set and the testing set, and N is 937433 in the embodiment;
The data set part record data constructed is shown in table 1:
table 1 construction of data set partial data
S3, dividing the data set into a training set and a testing set;
Specifically, the normal vehicle data is used as a training set to obtain a training matrix Xtr, the fault vehicle is used as a testing set to obtain a testing matrix Xte, and the training set and the testing set keep the same data form;
Namely, a data matrix formed by the No. 1 normal vehicle and the No. 2 normal vehicle is used as a training set, and a data matrix formed by the No. 3 fault vehicle is used as a test set;
The expression is as follows:
in the formula, n represents the total row number of the training set matrix, wherein n is 907578 in the embodiment;
S4, constructing a prediction model through a training set, wherein the method comprises the following steps:
S4.1, inputting a training set into a TCN model and carrying out causal convolution to extract input features, wherein an output formula of the causal convolution is as follows:
In the formula,Cin is the number of input channels equal to the number of input features, 7;cout is the number of output channels equal to the number of convolution kernels, 256 is the value representing the conversion of the extracted features into 256-dimensional data, z is the size of the convolution kernels, 3 is the value, and in the time convolution this value determines how many time steps the convolution kernels cover; The weight of the convolution kernel is represented by weight parameters at the positions i of the output channel cout, the input channel cin and the convolution kernel, the initial value is a random value which is 0 as a mean value and 0.01 as a standard deviation and accords with normal distribution, and the weight determines how the convolution kernel performs weighted summation on the input characteristics so as to generate output; Is the value of the input data at time step t-i and input channel cin, where t-i represents the input value of a lag amount relative to the current time step t; the offset term representing each output channel is 0 in initial value and has no fixed value, the offset term can be continuously adjusted in the training process, and the offset term is used for adding an additional linear offset to the weighted sum result of convolution so as to increase the flexibility of a model;
S4.2, taking the output after the input features are extracted as the input of the LSTM, and obtaining the hidden state of the current time step t;
Specifically, the output after the input features are extracted is used as the input of the LSTM, the input gate, the forgetting gate, the candidate cell state, the cell state update, the output gate and the hidden state update calculation are sequentially carried out after the features enter the LSTM, the long-term dependency relationship is further captured through the LSTM model, and finally, the predicted value is output through the full-connection layer, and the expression is as follows:
Wherein it represents the activation value of the input gate for controlling the amount of new information added to the cell state, sigma represents the sigmoid activation function, the output value is between 0 and 1 for controlling the proportion of input information added, Wi represents the weight matrix of the input gate, and zt-1 represents the hiding state of the last time step, and the value is 128; values representing the output sequence at time step t and output channel cout, used as inputs to the LSTM model; The method comprises the steps of showing that the hidden state of the last time step is spliced with the characteristics extracted by TCN of the current time step, bi showing the bias item of the input gate, ft showing the activation value of the forgetting gate, Wf showing the weight matrix of the forgetting gate, bf showing the bias item of the forgetting gate; Is a candidate cell state, tanh represents a hyperbolic tangent activation function, Wc is a weight matrix used to generate candidate cell states, bc is a bias term for candidate cell states, ct is the cell state of the current time step, ft⊙ct-1 is the ratio ft of the previous cell state, representing a selective forgetting portion; Is a candidate state update under the state of the input gate, according to element multiplication, ot is the activation value of the output gate, Wo is the weight matrix of the output gate, bo is the bias term of the output gate, zt is the hidden state of LSTM at the current time step t, and tan h (ct) represents nonlinear change of the cell state;
S4.3, after calculating to obtain the hidden state of the current time step t, the hidden state is transferred to a full connection layer, and the hidden state is mapped to a target prediction space to obtain a predicted value, wherein the expression is as follows:
In the formula,Is the predicted result of voltage or temperature of time step t, Wy is the weight matrix of the full connection layer, zt is the hidden state of LSTM at the current time step t, by is the bias term of the full connection layer, because binary data (voltage and temperature) is predicted, the dimension of the bias term is 2, representing that the hidden state is mapped to two output targets;
S4.4, after the training set is input into the model, initializing and assigning all weight matrixes and bias items in S4.1-S4.3, calculating the input by using the currently initialized parameter values in forward propagation by the model according to the formula until a final prediction result is output, and obtaining a prediction value through forward propagationAnd the error is calculated through the loss function, then back propagation is carried out for calculating the gradient of the loss function on each parameter, the back propagation can transfer the influence of the loss function on each parameter, then the weight and the bias term parameters obtained in the steps are updated through an Adam optimizer, so that the loss function is reduced, the Mean Square Error (MSE) is used as a training set loss function, and the expression is as follows:
where n represents the length of the data of the training set, where n has a value of 907578, Yt represents the true value of the voltage or temperature at time step t,Is the predicted voltage or temperature value at time t;
The method mainly comprises the steps that the built TCN-LSTM hybrid neural network voltage and temperature prediction model is used for capturing local time dependence of an input sequence, the local time dependence is achieved through multi-layer time residual convolution blocks, each convolution block comprises two convolution layers, a ReLU activation function and a Dropout layer, the size of the convolution kernel is 3, the number of the convolution kernels is 256, window moving step length is 1, in the TCN, the output of each layer serves as the input of the next layer, characteristics in a time sequence are extracted layer by layer, finally, the output shape is converted into a shape and dimension suitable for the input of the LSTM model through a full connection layer map, the LSTM model is designed to process long-term dependence in time sequence data, the LSTM model consists of an input layer, a hidden layer containing 128 hidden units, a linear layer and an output layer, the data after the TCN convolution is input to the input layer and the hidden layer of the LSTM, final output is obtained through the ReLU activation function and the full connection layer, super-parameters of the model comprise the number of hidden layers, the number of iterative steps is set, the number of the training steps is 128,16,50,126,24,0.001, and the time step length is set up, and the number of the training steps is 35 respectively;
The training model uses a built training set, and parameters for model training and storage comprise convolution kernel weights and bias items of a TCN model part, wherein the LSTM model part comprises input gates, forgetting gates, candidate memory units and weights of output gates, and bias of the input gates, the forgetting gates, the candidate memory units and the output gates;
Further, as shown in fig. 3, part a shows a structural schematic diagram of a Time Convolution Network (TCN), and when the expansion rate is 1, the model performs causal convolution without skipping time steps, and performs expansion convolution when the expansion rate is greater than 1;
in the embodiment, the training set used by the model is only data of two electric vehicles running for half a year, the data quantity and the data running range of the training set can be increased in the model training process, so that the model fully learns the data characteristics of the vehicle under different environments and driving behavior habits, and the steps can be repeated for different vehicle types to train a plurality of models;
Furthermore, the normal vehicle data used for training the model should contain more vehicle data and vehicle data with larger operating range as much as possible, so that the model can learn different driving habits, different operating conditions and the influence on the change of battery data under the external environment, and the model can obtain more parameters, thereby achieving higher prediction precision;
furthermore, the training model adopts a training-testing mode, so that training vehicles can be increased at any time or periodically or the data quality can be improved to update model parameters;
Furthermore, for higher training precision, different vehicle data of different vehicle types can be acquired for different vehicle types to perform general feature training of the vehicle;
s5, inputting the test set into a prediction model, and obtaining a prediction result by taking the highest monomer voltage and the highest probe temperature as prediction label values;
specifically, after the test set is input into the prediction model, the model can repeat the formula obtained by bringing the previous training set into the model to calculate and call the obtained training parameters, and the step of obtaining the prediction result by taking the highest monomer voltage and the highest probe temperature as the prediction label value is as follows:
S5.1, inputting the test set into a TCN model and carrying out causal convolution to extract input features, wherein the expression of the extracted features is as follows:
In the formula,Xt-τ+1:t represents a test set input sequence of past τ time steps, τ being the time window size, and the value being 126;
S5.2, transmitting the features extracted from the TCN as input to the LSTM to obtain a hidden state zt of the time step, wherein the expression is as follows:
wherein zt-τ+1:t represents a hidden state sequence obtained after accepting the feature input;
S5.3, generating predicted values of delta time steps in the future by inputting the hidden state into the full connection layer, wherein the expression is as follows:
In the formula,The method comprises the steps of representing the highest voltage of a monomer and the highest temperature value of a probe, wherein the highest voltage and the highest temperature value of the probe comprise delta time steps in the future, delta is 24, [ HCVt+1:t+Δ,HTt+1:t+Δ ] is a prediction vector of delta time steps in the future of voltage and temperature, Wy is a weight matrix of a full-connection layer, zt is a hidden state of LSTM at the current time step t, only the hidden state obtained at the moment of the last time step t is used here, by is a bias term of the full-connection layer, the bias term is continuously adjusted in the training process, and the bias term is used for adding an additional linear offset to the weighted sum result of convolution so as to increase the flexibility of a model;
Specifically, when the test set enters the TCN-LSTM model, the data is divided into M samples, each sample comprises a sliding window with a length of 126 and a label output with a predicted length of 24, and as sample data 1 enters the model, model parameters obtained by training are called to obtain the highest monomer voltage label dataThen the sample data 2 enters a model to repeat the process to obtain label dataAnd so on for the last sampleObtaining tag dataM is the number of samples, the value is N-N-126-24+1= 29766, and the specific prediction flow is as follows:
similarly, the predicted data of the probe maximum temperature can be obtained according to the methodSuch asThe prediction flow of (1) is as follows:
Wherein Xte represents a test set matrix; representing the first sample of the test set into the TCN-LSTM model, and so onThe method comprises the steps of representing an Mth sample of a test set entering a model and also representing a last sample, wherein N represents the data length of a training set and is equal to the number of rows of a matrix, N represents the total length of the training set and the data of the test set, Y1(1) represents the highest monomer voltage prediction data vector obtained by the first sample, and Y1(M) represents the highest monomer voltage prediction data vector obtained by the Mth sample in a analogized way;
in order to better quantify the difference between the predicted value and the true value obtained by the test set, a Root Mean Square Error (RMSE) is adopted as an evaluation index for evaluating the predicted performance of the model test set, and the calculation formula of the RMSE is as follows:
where N-N represents the length of the data of the test set, Yt represents the true value of the voltage or temperature,Is the predicted voltage or temperature value at time step t;
The result of the temperature prediction of the test set is shown in fig. 4, part a shows the true value of the temperature, part b is the predicted value of the temperature, part C is the error between the true value and the predicted value (error = true value-predicted value), and the RMSE of the temperature prediction is 0.4616 ℃;
The result of the voltage prediction is shown in fig. 5, the part a shows the true value of the voltage, the part b is the predicted value of the voltage, the part c is the error between the true value and the predicted value, and the RMSE of the voltage prediction is 0.0117V, which proves that the prediction method provided by the invention still has higher accuracy when the 24-step forward prediction is kept;
S6, outputting an early warning result;
Specifically, when the predicted voltage or temperature value exceeds the set upper and lower limits, triggering overvoltage, undervoltage or temperature abnormality alarm, when the predicted value does not exceed the set upper and lower limits, but the predicted value obtains a local abnormality detection algorithm (LOF) to obtain an LOF outlier factor value exceeding 1, triggering voltage abnormality elevation alarm or temperature abnormality elevation alarm;
The method comprises the following steps:
S6.1, carrying out standardization processing on the prediction result;
Specifically, after the predicted values of the voltage data and the temperature data are obtained, the input data need to be standardized to ensure that the data are compared on the same scale, and the standardized formula is as follows:
In the formula,Is the predicted voltage or temperature value obtained at time t, muj is the mean value of the voltage or temperature signature j, sigmaj is the standard deviation of the voltage or temperature signature j, zj is the normalized voltage or temperature value;
S6.2, respectively combining the standardized voltage data or temperature data into a data set D and a data set U, and calculating local outlier factors of each point in the data set D and the data set U to obtain an early warning result, wherein the method comprises the following steps of:
S6.2.1, defining Euclidean distance, namely taking any point o except p in one data point p, D or U in the set, defining the Euclidean distance between the point p and the point o as D(p,o), and for any two points p= (p1,p2,...,pm) and o= (o1,o2,...,om), obtaining the Euclidean distance formula in m-dimensional space:
S6.2.2, defining the kth distance, namely defining the distance between a point p and the nearest k points as D1~k(p),d1~k (p), defining the maximum value of Dk (p), defining Dk (p) as the kth distance of the point p, wherein Dk (p) is required to satisfy the following two points that (1) at least k points o ' except the point p in D or U enable Dk(p,o′)≤dk (p, o), and (2) at most k-1 points o ' except the point k in D or U enable D (p, o ') < D (p, o), wherein the k value is taken as 25 and represents the distance of 25 adjacent points;
S6.2.3 defining a kth distance neighborhood Nk (p), namely a set of all points of which the distance of a point p in a kth distance field Nk (p) of the point p is less than or equal to the kth distance of the point p, wherein the expression representing the kth distance field is:
Nk(p)={o′|d(p,o′)≤dk(p)}
Where d (p, o ') is the Euclidean distance of point p from point o', dk (p) is the kth distance of point p;
s6.2.4, calculating a kth reachable distance dk,reach (p, o), wherein the kth reachable distance has a calculation formula:
dk,reach(p,o)=max{d(p,o),dk(o)}
Wherein d (p, o) is the Euclidean distance between the point p and the point o, dk (o) is the kth distance of the point o, and max is the maximum value of the two;
S6.2.5, calculating the kth local reachable density lrdk (p) of the point p, wherein the local reachable density is calculated according to the formula:
Wherein Nk (p) is the number of Nk (p) points in the field of point p, dk,reach (p, o) is the kth reachable distance from point p to point o;
s6.2.6, calculating a kth local outlier factor LOFk (p) of the point p, wherein the calculation formula of the kth local outlier factor is as follows:
wherein, lrdk (o) is the k local reachable density of the point o, lrdk (p) is the k local reachable density of the point p, and I Nk (p) is the number of Nk (p) points in the field of the point p;
S6.2.7, separating points into outliers and normal points based on the calculated local outlier factor value, setting the threshold value of the local outlier factor to be 1, and determining the points to be outliers when the calculated LOFk (p) is greater than 1;
As shown in fig. 6 and 7, the voltage fault early warning result obtained in the embodiment is shown in fig. 6, the end data (29400 to 29915 frames) of the voltage predicted value is 4.26V at 29444 frames, the upper limit cutoff voltage of the battery is 4.25V, the overvoltage early warning is triggered at this time according to the output rule of the early warning result in the step six, and the BMS warning point of the vehicle is 29447 frames, which proves that compared with the detection method of the original BMS of the vehicle, the early warning method provided by the invention is advanced by 4.5 minutes [ (29447-29444+24) ×10×60] to realize overvoltage warning, and the voltage predicted value is 3.6V at 257 frames, although the voltage predicted value is not lower than the lower limit cutoff voltage, but the calculated LOF outlier is 1.35 exceeding the set threshold, the voltage abnormal warning is triggered, and the BMS 734 frames trigger the undervoltage warning, which is advanced by [ (734-257-24) ×10×60] to realize the voltage abnormal warning trend before the undervoltage warning.
As shown in fig. 8, the temperature fault early warning result obtained in this embodiment is that, in 29728 frames, a temperature anomaly is detected for the first time and an anomaly point is marked, at this time, the LOF calculated value of the point is 752.34, which exceeds the threshold value set by the set LOF anomaly detection, and the temperature predicted value is 26.7 ℃, which does not exceed the upper temperature limit, and then a significant and rapid battery temperature rise occurs, but when the voltage data at this time is compared, the true value of the voltage is in the normal range, and the predicted value of the voltage only has an abnormal rise trend but the value is still within the normal range, so that only the voltage data is focused on to have limitations on fault early warning;
From the first detection of the abnormal value (29728 frames) to the data termination point 29915 frames, the multi-step prediction model based on TCN-LSTM and the LOF local abnormality detection algorithm realize the temperature early warning duration of 35.1 minutes [ (29915-29728+24) x 10/60 ], and compared with the early warning of BMS, the early warning duration is 24.6 minutes [ (29852-29728+24) x 10/60 ], which provides sufficient time for the driver to respond emergently.

Claims (7)

Translated fromChinese
1.一种基于多元预测与异常检测的车用锂电池故障预警方法,其特征在于:包括以下步骤:1. A vehicle lithium battery fault warning method based on multivariate prediction and anomaly detection, characterized in that it includes the following steps:S1、通过大数据平台采集车辆电池系统的运行数据;S1. Collect the operating data of the vehicle battery system through the big data platform;所述车辆电池系统包括:正常车辆与曾发生故障报警的车辆的电池系统;The vehicle battery system includes: a battery system of a normal vehicle and a vehicle that has had a fault alarm;所述故障类型包括:电压故障和温度故障;The fault types include: voltage fault and temperature fault;所述电压故障包括:电池单体过压、欠压、电压变化过快;The voltage faults include: battery cell overvoltage, undervoltage, and rapid voltage change;所述温度故障包括:温升过快、温度超出设定阈值;The temperature faults include: temperature rise too fast, temperature exceeding the set threshold;所述电池系统的运行数据包括:车辆ID、采样时间、电池组总电压、单体最高电压、单体最低电压、SOC、总电流、探针最高温度和探针最低温度;The operating data of the battery system includes: vehicle ID, sampling time, total voltage of the battery pack, maximum voltage of a single cell, minimum voltage of a single cell, SOC, total current, maximum temperature of the probe, and minimum temperature of the probe;S2、对采集到的数据进行数据清洗并生成数据集;S2, clean the collected data and generate a data set;S3、将数据集划分为训练集和测试集;S3, divide the data set into training set and test set;S4、通过训练集构建预测模型;S4, build a prediction model through the training set;S5、将测试集输入预测模型,以最高单体电压和最高探针温度为预测标签值得到预测结果;S5, input the test set into the prediction model, and obtain the prediction result by taking the highest monomer voltage and the highest probe temperature as the prediction label value;S6、输出预警结果。S6. Output warning results.2.根据权利要求1所述的一种基于多元预测与异常检测的车用锂电池故障预警方法,其特征在于:所述对采集到的数据进行数据清洗包括:2. The method for early warning of lithium battery failure for vehicles based on multivariate prediction and anomaly detection according to claim 1, characterized in that: the data cleaning of the collected data comprises:(1)使用线性插值填充丢失帧小于三帧的空缺数据,大于三帧的缺失片段对片段进行剔除;(1) Linear interpolation is used to fill in the missing data of missing frames less than three frames, and the missing fragments of more than three frames are eliminated;(2)对比正常范围和所采集到数据的总电压,总电流,单体最高及最低电压,探针最高及最低温度;SOC的正常范围分别为[200V,500V],[-1000A,1000A],[2V,5V],[-40℃,210℃],[0,100],超过范围的数据视为传感器异常采集数据应当剔除;(2) Compare the total voltage, total current, maximum and minimum voltage of the single cell, and maximum and minimum temperature of the probe with the data collected within the normal range; the normal range of SOC is [200V, 500V], [-1000A, 1000A], [2V, 5V], [-40℃, 210℃], [0, 100], and data outside the range is considered as abnormal sensor data and should be discarded;(3)使用小波变换对所有数据进行降噪处理。(3) Use wavelet transform to reduce noise on all data.3.根据权利要求1所述的一种基于多元预测与异常检测的车用锂电池故障预警方法,其特征在于:所述数据集的生成具体为:将电池组总电压、单体最高电压、单体最低电压、SOC、总电流、探针最高温度和探针最低温度形成一个维度为[N,7]的矩阵;其中,将单体最高电压和探针最高温度作为最后两列。3. According to claim 1, a method for early warning of automotive lithium battery faults based on multivariate prediction and anomaly detection is characterized in that: the data set is generated specifically as follows: the total voltage of the battery pack, the maximum voltage of the single cell, the minimum voltage of the single cell, the SOC, the total current, the maximum temperature of the probe and the minimum temperature of the probe form a matrix with a dimension of [N,7]; wherein the maximum voltage of the single cell and the maximum temperature of the probe are used as the last two columns.4.根据权利要求1所述的一种基于多元预测与异常检测的车用锂电池故障预警方法,其特征在于:所述数据集的划分方式为:将正常车辆数据作为训练集得到训练矩阵,故障车辆作为测试集得到测试矩阵。4. According to claim 1, a method for early warning of automotive lithium battery faults based on multivariate prediction and anomaly detection is characterized in that: the data set is divided in such a way that normal vehicle data is used as a training set to obtain a training matrix, and faulty vehicle data is used as a test set to obtain a test matrix.5.根据权利要求1所述的一种基于多元预测与异常检测的车用锂电池故障预警方法,其特征在于:所述通过训练集构建预测模型的步骤如下:5. The method for early warning of automotive lithium battery failure based on multivariate prediction and anomaly detection according to claim 1 is characterized in that: the step of constructing a prediction model through a training set is as follows:S4.1、将训练集输入TCN模型并进行因果卷积提取输入特征;S4.1. Input the training set into the TCN model and perform causal convolution to extract input features.因果卷积的输出公式为:The output formula of causal convolution is:式中,表示输出序列在时间步t和输出通道cout上的值;cin是输入通道的数量,等于输入特征的数量;cout是输出通道数量,等于卷积核数量;z为卷积核的大小;i表示卷积核在时间维度上的位置;是卷积核的权重,表示在输出通道cout,输入通道cin,卷积核位置i上的权重参数;是输入数据在时间步t-d·i和输入通道cin上的值;d表示膨胀率,d为1时进行因果卷积,不为1时进行膨胀卷积;表示每个输出通道的偏置项;In the formula, Represents the value of the output sequence at time step t and output channel cout ; cin is the number of input channels, which is equal to the number of input features; cout is the number of output channels, which is equal to the number of convolution kernels; z is the size of the convolution kernel; i represents the position of the convolution kernel in the time dimension; is the weight of the convolution kernel, which represents the weight parameter at the output channel cout , the input channel cin , and the convolution kernel position i; is the value of the input data at time step td·i and input channel cin ; d represents the dilation rate, causal convolution is performed when d is 1, and dilated convolution is performed when d is not 1; Represents the bias term of each output channel;S4.2、将提取输入特征后的输出作为LSTM的输入,特征进入LSTM后会先后进行输入门,遗忘门,候选细胞状态,细胞状态更新,输出门,隐藏状态更新计算,通过LSTM模型进一步捕捉长时依赖关系,最终通过全连接层输出预测值,LSTM的计算公式如下:S4.2. The output after extracting the input features is used as the input of LSTM. After the features enter the LSTM, the input gate, forget gate, candidate cell state, cell state update, output gate, hidden state update calculation are performed in sequence. The LSTM model is used to further capture long-term dependencies, and finally the prediction value is output through the fully connected layer. The calculation formula of LSTM is as follows:式中,it表示输入门的激活值;σ表示sigmoid激活函数;Wi表示输入门的权重矩阵;zt-1表示上一时间步的隐藏状态;表示输出序列在时间步t和输出通道cout上的值,用作LSTM模型的输入;表示将上一时间步的隐藏状态和当前时间步由TCN提取的特征拼接起来;bi表示输入门的偏置项;ft是遗忘门的激活值;Wf是遗忘门的权重矩阵;bf是遗忘门的偏置项;是候选细胞状态;tanh表示双曲正切激活函数;Wc是用于生成候选细胞状态的权重矩阵;bc是候选细胞状态的偏置项;ct是当前时间步的细胞状态;ft⊙ct-1是前一个细胞状态的比例ft,表示选择性遗忘部分;是输入门状态下的候选状态更新;⊙表示按照元素相乘;ot是输出门的激活值;Wo是输出门的权重矩阵;bo是输出门的偏置项;zt是LSTM在当前时间步t的隐藏状态;tanh(ct)表示对细胞状态进行非线性变化;Where,it represents the activation value of the input gate; σ represents the sigmoid activation function;Wi represents the weight matrix of the input gate; zt-1 represents the hidden state of the previous time step; Represents the value of the output sequence at time step t and output channel cout , which is used as the input of the LSTM model; represents the concatenation of the hidden state of the previous time step and the features extracted by TCN at the current time step;bi represents the bias term of the input gate;ft is the activation value of the forget gate;Wf is the weight matrix of the forget gate;bf is the bias term of the forget gate; is the candidate cell state; tanh represents the hyperbolic tangent activation function;Wc is the weight matrix used to generate the candidate cell state;bc is the bias term of the candidate cell state;ct is the cell state at the current time step;ft⊙ct-1 is the proportion of the previous cell stateft , indicating the selective forgetting part; is the candidate state update under the input gate state; ⊙ represents element-wise multiplication; ot is the activation value of the output gate; Wo is the weight matrix of the output gate; bo is the bias term of the output gate; zt is the hidden state of LSTM at the current time step t; tanh(ct ) represents the nonlinear change of the cell state;S4.3、LSTM计算得到当前时间步t的隐藏状态zt之后被传递到全连接层,将隐藏状态映射到目标预测空间从而得到预测值,表达式如下:S4.3, LSTM calculates the hidden state zt at the current time step t and passes it to the fully connected layer, mapping the hidden state to the target prediction space to obtain the predicted value. The expression is as follows:式中,是时间步t的电压或温度的预测结果;Wy是全连接层的权重矩阵;zt是LSTM在当前时间步t的隐藏状态;by是全连接层的偏置项;In the formula, is the predicted result of voltage or temperature at time step t; Wy is the weight matrix of the fully connected layer; zt is the hidden state of LSTM at the current time step t;by is the bias term of the fully connected layer;S4.4、训练集输入模型后,前面步骤中所有的权重矩阵和偏置项会进行初始化赋值,在前向传播中模型会使用当前初始化的参数值,对输入进行上述公式计算,直到输出最终的预测结果,通过前向传播得到的预测值和真实标签之间会通过损失函数来计算误差,之后进行反向传播用于计算损失函数关于每个参数的梯度,反向传播会将损失函数对每个参数的影响传递回去,之后通过Adam优化器对上述步骤中得到的权重和偏置项参数进行更新,使损失函数变小,本发明使用均方误差(MSE)作为训练集损失函数,表达式如下:S4.4. After the training set is input into the model, all weight matrices and bias items in the previous steps will be initialized and assigned values. In the forward propagation, the model will use the currently initialized parameter values to calculate the above formula for the input until the final prediction result is output. The prediction value obtained by forward propagation The error between the real label and the real label is calculated through the loss function, and then back propagation is performed to calculate the gradient of the loss function with respect to each parameter. Back propagation will pass back the influence of the loss function on each parameter. Then, the weight and bias parameters obtained in the above steps are updated through the Adam optimizer to reduce the loss function. The present invention uses the mean square error (MSE) as the training set loss function, and the expression is as follows:式中,n表示训练集的数据的长度,Yt表示电压或温度在时间步t处的真实值,是在时间t处的预测电压或温度值。In the formula, n represents the length of the training set data,Yt represents the true value of voltage or temperature at time step t, is the predicted voltage or temperature value at time t.6.根据权利要求1所述的一种基于多元预测与异常检测的车用锂电池故障预警方法,其特征在于:所述将测试集输入预测模型,以最高单体电压和最高探针温度为预测标签值得到预测结果的步骤如下:6. The method for early warning of automotive lithium battery failure based on multivariate prediction and anomaly detection according to claim 1 is characterized in that: the step of inputting the test set into the prediction model and obtaining the prediction result by taking the highest cell voltage and the highest probe temperature as the prediction label values is as follows:S5.1、将测试集输入TCN模型并进行因果卷积提取输入特征;提取特征的表达式如下:S5.1. Input the test set into the TCN model and perform causal convolution to extract input features. The expression of extracted features is as follows:式中,表示对输入序列Xt-τ+1:t进行特征提取之后的输出值;Xt-τ+1:t表示过去τ个时间步的测试集输入序列;τ是时间窗口大小;In the formula, represents the output value after feature extraction of the input sequence Xt-τ+1:t ; Xt-τ+1:t represents the test set input sequence of the past τ time steps; τ is the time window size;S5.2、将从TCN提取到的特征作为输入传递给LSTM,得到时间步的隐藏状态zt;表达式如下:S5.2. Pass the features extracted from TCN as input to LSTM to obtain the hidden state zt of the time step; the expression is as follows:式中,zt-τ+1:t表示接受特征输入后获得的隐藏状态序列;In the formula, zt-τ+1:t represents the hidden state sequence obtained after receiving the feature input;S5.3、通过将隐藏状态输入到全连接层,生成未来Δ个时间步的预测值;表达式如下:S5.3. Generate the predicted value of the next Δ time steps by inputting the hidden state into the fully connected layer; the expression is as follows:式中,表示包含未来Δ个时间步的单体最高电压和探针最高温度值;[HCVt+1:t+Δ,HTt+1:t+Δ]是电压及温度未来Δ个时间步的预测向量;Wy是全连接层的权重矩阵;zt是LSTM在当前时间步t的隐藏状态,这里只使用最后一个时间步t时刻所获得的隐藏状态;by是全连接层的偏置项。In the formula, represents the maximum voltage of the monomer and the maximum temperature of the probe in the next Δ time steps; [HCVt+1:t+Δ ,HTt+1:t+Δ ] is the prediction vector of the voltage and temperature in the next Δ time steps; Wy is the weight matrix of the fully connected layer; zt is the hidden state of LSTM at the current time step t, and only the hidden state obtained at the last time step t is used here;by is the bias term of the fully connected layer.7.根据权利要求1所述的一种基于多元预测与异常检测的车用锂电池故障预警方法,其特征在于:所述输出预警结果的步骤如下:7. The method for early warning of lithium battery failure for vehicle based on multivariate prediction and anomaly detection according to claim 1, characterized in that the step of outputting the early warning result is as follows:S6.1、对预测结果进行标准化处理;S6.1, standardize the prediction results;S6.2、将标准化后的电压数据或温度数据分别组合为数据集D和U,计算出数据集D和U中每一个点的局部离群因子,从而得出预警结果;具体如下:S6.2. The standardized voltage data or temperature data are combined into data sets D and U respectively, and the local outlier factor of each point in the data sets D and U is calculated to obtain the warning result; the details are as follows:S6.2.1、定义欧式距离;任取集合中一个数据点p,D或U中除p以外的任意一点o,将点p与点o之间的欧式距离定义为d(p,o)S6.2.1. Define the Euclidean distance: Take any data point p in the set and any point o in D or U except p, and define the Euclidean distance between point p and point o as d(p, o) ;S6.2.2、定义第k个距离;将点p与其最近的k个点的距离定义为d1~k(p),d1~k(p)中的最大值定义为dk(p),将dk(p)定义为点p的第k个距离;k值取为25,表示计算其临近25个点的距离;S6.2.2. Define the kth distance. The distance between point p and its nearest k points is defined as d1~k (p). The maximum value among d1~k (p) is defined as dk (p). Dk (p) is defined as the kth distance of point p. The value of k is 25, which means that the distances to the 25 nearest points are calculated.dk(p)需满足以下两点:(1)D或U中除点p外至少有k个点o'使得dk(p,o′)≤dk(p,o);(2)D或U中除第k个点外至多有k-1个点o'使d(p,o′)<d(p,o);dk (p) must satisfy the following two conditions: (1) In addition to point p, there are at least k points o' in D or U such that dk (p,o') ≤d k (p,o); (2) In addition to the kth point, there are at most k-1 points o' in D or U such that d(p,o') <d(p,o);S6.2.3、定义第k个距离邻域Nk(p);点p的第k个距离领域Nk(p)点p的距离小于或等于点p的第k个距离的所有点的集合;表示第k个距离领域的表达式为:S6.2.3. Define the kth distance neighborhood Nk (p); the kth distance domain Nk (p) of point p is the set of all points whose distance to point p is less than or equal to the kth distance to point p; the expression for the kth distance domain is:Nk(p)={o′|d(p,o′)≤dk(p)}Nk (p)={o′|d(p,o′)≤dk (p)}式中,d(p,o′)是点p与点o'的欧式距离,dk(p)点p的第k个距离;Where d(p,o′) is the Euclidean distance between point p and point o′, dk (p) is the kth distance of point p;S6.2.4、计算第k个可达距离dk,reach(p,o);第k个可达距离计算公式为:S6.2.4. Calculate the k-th reachable distance dk,reach (p,o); the calculation formula for the k-th reachable distance is:dk,reach(p,o)=max{d(p,o),dk(o)}dk,reach (p,o)=max{d(p,o),dk (o)}式中,d(p,o)是点p与点o之间的欧式距离;dk(o)是点o的第k个距离;max表示取二者中的最大值;Where d(p,o) is the Euclidean distance between point p and point o;dk (o) is the kth distance of point o; max means taking the maximum value of the two.S6.2.5、计算点p的第k个局部可达密度lrdk(p);局部可达密度计算公式为:S6.2.5. Calculate the kth local reachability density lrdk (p) at point p. The formula for calculating the local reachability density is:式中,|Nk(p)|为点p的领域Nk(p)点的数量;dk,reach(p,o)为点p到点o的第k个可达距离;Where |Nk (p)| is the number of points in the neighborhood of point p, Nk (p); dk,reach (p,o) is the kth reachable distance from point p to point o;S6.2.6、计算点p的第k个局部离群因子LOFk(p);第k个局部离群因子的计算公式如下:S6.2.6. Calculate the k-th local outlier factor LOFk (p) of point p. The calculation formula of the k-th local outlier factor is as follows:式中,lrdk(o)点o的第k个局部可达密度;lrdk(p)式点p的第k个局部可达密度;|Nk(p)|为点p的领域Nk(p)点的数量;Where lrdk (o) is the kth local reachability density of point o; lrdk (p) is the kth local reachability density of point p; |Nk (p)| is the number ofpoints in the neighborhood of point p.S6.2.7、基于计算的局部离群因子值,将点分离为离群点和正常点,设置局部离群因子的阈值为1,当计算得到的LOFk(p)大于1则被认定为是离群点;S6.2.7. Based on the calculated local outlier factor value, separate the points into outliers and normal points, set the threshold of the local outlier factor to 1, and identify the points as outliers when the calculated LOFk (p) is greater than 1;输出预警结果的规则为,当单体最高电压预测值大于上限截止电压,触发过压报警,小于下限截止电压触发欠压报警;当预测值处于正常值范围内但是离群因子值大于1则触发电压异常波动预警;当探针最高温度预测值大于温度上限则触发温度异常预警;当温度值处于正常范围但是LOF离群因子值大于1触发温度异常波动预警;The rules for outputting warning results are as follows: when the predicted value of the single cell maximum voltage is greater than the upper cut-off voltage, an overvoltage alarm is triggered, and when it is less than the lower cut-off voltage, an undervoltage alarm is triggered; when the predicted value is within the normal value range but the outlier factor value is greater than 1, an abnormal voltage fluctuation warning is triggered; when the predicted value of the probe maximum temperature is greater than the upper temperature limit, an abnormal temperature warning is triggered; when the temperature value is within the normal range but the LOF outlier factor value is greater than 1, an abnormal temperature fluctuation warning is triggered;所述上限截止电压为4.25V,下限截止电压为3.4V;The upper cut-off voltage is 4.25V, and the lower cut-off voltage is 3.4V;所述温度上限为55℃。The upper temperature limit is 55°C.
CN202411826294.3A2024-12-122024-12-12Vehicle lithium battery fault early warning method based on multi-element prediction and anomaly detectionActiveCN119749253B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202411826294.3ACN119749253B (en)2024-12-122024-12-12Vehicle lithium battery fault early warning method based on multi-element prediction and anomaly detection

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202411826294.3ACN119749253B (en)2024-12-122024-12-12Vehicle lithium battery fault early warning method based on multi-element prediction and anomaly detection

Publications (2)

Publication NumberPublication Date
CN119749253Atrue CN119749253A (en)2025-04-04
CN119749253B CN119749253B (en)2025-09-23

Family

ID=95190008

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202411826294.3AActiveCN119749253B (en)2024-12-122024-12-12Vehicle lithium battery fault early warning method based on multi-element prediction and anomaly detection

Country Status (1)

CountryLink
CN (1)CN119749253B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN120316629A (en)*2025-06-182025-07-15湖南电气职业技术学院 Data anomaly detection method based on multi-scale feature extraction

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116482536A (en)*2023-01-302023-07-25吉林大学Power battery fault early warning and safety risk assessment method based on data driving
CN118914849A (en)*2024-07-012024-11-08长安大学Electric automobile power battery state early warning method, system, equipment and medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116482536A (en)*2023-01-302023-07-25吉林大学Power battery fault early warning and safety risk assessment method based on data driving
CN118914849A (en)*2024-07-012024-11-08长安大学Electric automobile power battery state early warning method, system, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN120316629A (en)*2025-06-182025-07-15湖南电气职业技术学院 Data anomaly detection method based on multi-scale feature extraction

Also Published As

Publication numberPublication date
CN119749253B (en)2025-09-23

Similar Documents

PublicationPublication DateTitle
Wang et al.State of health estimation based on modified Gaussian process regression for lithium-ion batteries
CN113343633B (en)Thermal runaway fault classification and risk prediction method and system for power lithium battery
CN112763929B (en)Method and device for predicting health of battery monomer of energy storage power station system
Zhang et al.State of charge prediction of lithium-ion batteries for electric aircraft with swin transformer
CN116391131B (en)Battery temperature prediction method and system
Xu et al.State-of-charge estimation and health prognosis for lithium-ion batteries based on temperature-compensated Bi-LSTM network and integrated attention mechanism
CN114325450A (en)Lithium ion battery health state prediction method based on CNN-BilSTM-AT hybrid model
Chen et al.A health index construction framework for prognostics based on feature fusion and constrained optimization
Niu et al.Lebesgue sampling based deep belief network for lithium-ion battery diagnosis and prognosis
Wang et al.Health diagnosis for lithium-ion battery by combining partial incremental capacity and deep belief network during insufficient discharge profile
CN112611976A (en)Power battery state of health estimation method based on double differential curves
CN119749253B (en)Vehicle lithium battery fault early warning method based on multi-element prediction and anomaly detection
CN114036647A (en)Power battery safety risk assessment method based on real vehicle data
Bhalaji et al.Remaining Useful Life (RUL) estimation of lead acid battery using bayesian approach
CN118897212B (en) Lithium-ion battery health status assessment method and system based on time decomposition and feature fusion
Zhang et al.Fault diagnosis of energy storage batteries based on dual driving of data and models
CN113791351A (en) Lithium battery life prediction method based on transfer learning and difference probability distribution
CN116660757A (en)Battery voltage estimation method, device and storage medium
CN119577611B (en) New energy vehicle battery fault identification and early warning method based on hybrid deep learning
CN117313532A (en)Lithium ion battery SOC estimation method based on neural network
Myilsamy et al.State-of-health prediction for Li-ion batteries for efficient battery management system using hybrid machine learning model
CN119179919A (en)On-line monitoring and diagnosing system for hydroelectric equipment
CN119780720A (en) Unsupervised health assessment and remaining life prediction method for lithium batteries based on physics knowledge
Nie et al.An early fault detection method of series battery packs based on multi-feature clustering and unsupervised scoring
CN115902642A (en)Battery state of charge estimation method and device, electronic equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp