Power battery fault prediction method based on LSTM-BNN model
By combining the LSTM-BNN model with a battery management system, the problems of dependence and insufficient real-time performance of traditional power battery fault detection methods are solved, achieving efficient and accurate fault prediction and early warning, improving battery safety and lifespan, and making it suitable for new energy vehicles, drones and portable electronic devices.
Patent Information
- Application Number
- CN202511004220.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-11-25
AI Technical Summary
Traditional power battery fault detection methods rely on human experience, lack consistency, cannot predict early faults, have insufficient real-time performance, are difficult to handle data interference under complex operating conditions, and cannot adapt to battery aging, resulting in high false alarm and false alarm rates, and failing to meet the high safety requirements of electric vehicles and other applications.
By employing an LSTM-BNN model in conjunction with a battery management system, data acquisition, preprocessing, fault prediction, and risk assessment are integrated into the battery management system to achieve efficient and accurate prediction and early warning of battery faults.
It improves the accuracy and timeliness of power battery fault prediction, significantly enhances battery safety and lifespan, and is applicable to new energy vehicles, drones, and portable electronic devices.
Smart Images

Figure CN121009407A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of power battery health management and fault prediction, and particularly relates to a power battery fault prediction method based on an LSTM-BNN model. BACKGROUND
[0002] Lithium batteries are an important part of electric vehicles, and power battery fault monitoring technology is an important means to ensure the reliable operation of electric vehicles. According to incomplete statistics, more than about 33% of safety accidents are related to the power battery system of electric vehicles. Therefore, power battery fault monitoring technology is a key technical means to ensure the reliable operation of electric vehicles. The faults of power batteries include internal short circuit, external short circuit, thermal runaway, etc., which are usually caused by mechanical stress, overcharge and overdischarge, thermal management system failure, chemical aging, etc. If such faults cannot be monitored and controlled in time, they may cause serious safety accidents such as fire and explosion. In recent years, there have been several safety accidents related to electric vehicle batteries around the world. Therefore, real-time monitoring and fault prediction of battery health status are of great significance for preventing and reducing electrical accidents.
[0003] Traditional battery fault detection methods mainly monitor current, voltage, temperature and other basic parameters to determine the battery state, usually using threshold monitoring, internal resistance measurement and electrochemical impedance spectroscopy (EIS) analysis. However, these methods have significant limitations: first, they rely too much on the experience of professionals, often requiring experienced battery engineers to interpret data and diagnose faults, which has a long talent training cycle and high cost; second, the diagnosis results are affected by human factors and lack consistency, different technicians may have different results for the same data; third, they cannot effectively predict early signs of failure, traditional methods can only identify faults that have already appeared, and almost cannot detect problems in the early stages, resulting in missed opportunities for optimal intervention; fourth, they lack real-time performance, especially complex analysis methods such as electrochemical impedance spectroscopy, which may take several minutes for a single measurement, making it difficult to meet the millisecond-level fast response requirements of vehicle-mounted systems; fifth, they are difficult to handle data interference under complex conditions, when the battery is in a dynamic environment such as charging and discharging, temperature change, etc., the accuracy of traditional methods decreases significantly; sixth, they lack self-adaptive ability and cannot automatically adjust detection parameters and standards for battery aging and other long-term changes, making the system gradually ineffective as the battery usage time increases. These limitations result in high false positive and false negative rates in traditional methods, which cannot meet the needs of high safety scenarios such as electric vehicles. Therefore, it is urgent to develop a new power battery fault prediction method that can effectively capture the time series characteristics of battery data and accurately quantify uncertainty to meet the high reliability requirements of real-time health monitoring and early warning of power batteries in new energy vehicles, unmanned aerial vehicles, portable electronic devices and other fields.
[0004] With the rapid development of computer technology, the power battery fault prediction technology has experienced three stages of development: from the initial rule-based threshold judgment method, to the traditional machine learning method (such as support vector machine SVM, decision tree, etc.), to the application of deep learning methods in recent years, especially LSTM and BNN, which has brought revolutionary changes to battery fault prediction. The LSTM network, with its unique gating mechanism (input gate, forget gate and output gate), effectively solves the problems of gradient disappearance and gradient explosion of traditional RNN and the bottleneck of short-term memory, and can capture the long and short term dependencies in the state changes of the battery, making it particularly suitable for analyzing battery data with long time dependencies. BNN introduces Bayesian theory into traditional neural networks, providing a probability distribution of the prediction result rather than a single deterministic value, making the model more robust when facing noisy data and abnormal situations. SUMMARY
[0005] Based on the above background, the present application proposes a power battery fault prediction method based on LSTM-BNN model. This method combines the advantages of LSTM time series modeling and the uncertainty quantification ability of BNN, and integrates it into the battery management system (BMS) to achieve efficient and accurate prediction and early warning of battery faults. This innovation not only improves the accuracy and reliability of fault detection, but also can be widely applied in new energy vehicles, unmanned aerial vehicles and portable electronic devices, significantly improving the safety and service life of power batteries. Specifically, the present application includes the following steps:
[0006] Data collection: through the battery management system including data collection unit, vehicle data recorder, CAN bus and data storage system, the real-time basic performance indicators and usage of power battery are collected, multi-dimensional feature data are obtained, and a power battery full life cycle state database is established based on the data;
[0007] Data preprocessing and labeling: the data in the database is processed for noise cleaning, normalization, standardization, missing value filling, labeling, etc., the data is preprocessed using Kalman filtering algorithm, maximum and minimum normalization, Z-score standardization and linear interpolation method, and the time series data is labeled using long short-term memory network autoencoder;
[0008] Fault prediction: the data preprocessed and labeled is processed using the LSTM-BNN model to predict the fault probability distribution of the power battery;
[0009] Fault risk assessment and warning: based on the predicted fault probability distribution, the fault probability mean and confidence interval are calculated; according to the fault probability mean, the confidence interval width and the preset risk threshold, the fault risk is assessed, and the warning information is output according to the assessment result.
[0010] Further, the data acquisition operation is: connecting the battery management system through the CAN bus, reading the sensor data containing voltage, current and temperature parameters processed by the data acquisition unit, and then outputting to the data storage system.
[0011] Further, the basic performance indicators include but are not limited to: single battery voltage, charge and discharge current, battery surface temperature, battery health state and state of charge, and internal resistance change rate.
[0012] Further, the Kalman filtering algorithm is used to smooth the data, including:
[0013] (a) According to the actual characteristics of the data, determine the state quantity and the observation quantity, and establish the state transition equation:
[0014] X t =F t X t-1 +B t U t +W t
[0015] Wherein, X t is the true state vector at time t, X t-1 is the true state vector at time t-1, F t is the state transition matrix, B t is the control input matrix, U t is the control input vector, W t is the process noise subject to W t ~N(0, Q);
[0016] (b) Analyze the relationship between the data collected by the sensor and the true value, and establish the observation equation:
[0017] Z t =H t X t +V t
[0018] Wherein, Z t is the observation value at the current time, H t is the measurement transition matrix, V t is the observation noise subject to V t ~N(0, R);
[0019] (c) Prediction stage:
[0020]
[0021] P t - =F t P t-1 Ft T +Q t
[0022] wherein, is the predicted state at the current time t, F t is the state transition matrix, is the posterior estimate at the previous time t-1, B t is the control input matrix, P t - is the prior covariance matrix at the current time t, P t-1 is the posterior covariance matrix at the previous time t-1, F t T represents the transpose matrix of F t , Q t is the process noise covariance matrix;
[0023] (d) update stage:
[0024] K t = P t - H T (HP t - H T +R) -1
[0025] wherein, K t is the Kalman gain at the current time, and R is the measurement noise covariance;
[0026]
[0027] wherein, is the corrected estimate, represents the difference between the measurement value and the predicted value;
[0028] P t =(I-K t H)P t -
[0029] wherein, P t is the updated covariance, and I is the unit matrix;
[0030] (e) After the equation is constructed, the parameters are initialized according to the actual characteristics of the data, brought into the formula for iteration, and the parameters are adjusted according to the iteration results.
[0031] Further, the data is preprocessed by using maximum-minimum normalization, Z-score standardization and linear interpolation, including:
[0032] The maximum-minimum normalization method is used to normalize the voltage, current and state of charge, so that the data in each dimension is comparable.
[0033]
[0034] Y norm represents the data after parameter normalization, Y represents the original data of the parameter, Y max represents the maximum value of all data of the parameter, Y min represents the minimum value of all data of the parameter.
[0035] The temperature data is processed by Z-score standardization, and the formula is:
[0036]
[0037] T std is the standardized temperature data, T represents the original data of the temperature, σ is the standard deviation of the temperature data, and μ is the mean value of the temperature data.
[0038] For the data missing in the collection process, linear interpolation method is used to complete the data points before and after:
[0039]
[0040] t1,y1 represents the time point and the corresponding data value of the known data before the data missing point, t2,y2 represents the time point and the corresponding data value of the known data after the data missing point, Y t represents the calculated missing value.
[0041] Further, the data is labeled with fault by long short-term memory self-encoder, including:
[0042] (a) Given a time series, input x=(x1,x2,…,x t ), where x t represents a multi-dimensional feature vector at a certain time;
[0043] (b) Construct the LSTM encoding layer h t =f(W e x t +b e ); where W e ,b e are the weight parameters of the encoder, and f is the nonlinear activation function of the LSTM unit;
[0044] (c) Construct the LSTM decoding layer where W d ,b dare the weight parameters of the decoder, g is the nonlinear activation function of the LSTM unit;
[0045] (d) Time-based backpropagation algorithm, each weight gradient updates the network weight using optimization algorithm, using mean square error as loss function L, reconstruction error e t :
[0046]
[0047] (e) Set the reconstruction error threshold, when the reconstruction error of a certain time window data exceeds the threshold, it is marked as a potential fault state, otherwise it is marked as a normal state.
[0048] Further, the LSTM-BNN model network structure comprises: an LSTM feature extraction part and a BNN prediction part; wherein the LSTM network comprises an input layer and a plurality of LSTM layers, the input layer receives the preprocessed multi-dimensional time series data, and the hidden state vector output at the last time step is extracted as a time series feature vector; the BNN network structure comprises an input layer, a hidden layer and an output layer, the feature vector output by the LSTM is taken as input, and a fault probability distribution is obtained through multiple forward propagations.
[0049] Further, the LSTM and the BNN are connected through a fully connected layer; the BNN network comprises a plurality of Bayesian fully connected layers, and a ReLU activation function is used between each fully connected layer to perform nonlinear feature conversion on the input feature vector; finally, the output layer outputs a fault probability distribution, and a Sigmoid function is used to compress the result to between 0 and 1.
[0050] Further, a plurality of prediction values are obtained through multiple forward propagations, and the mean and variance of the prediction values are calculated, wherein the prediction mean is taken as the final prediction result, and the prediction variance is taken as the uncertainty measure of the prediction, and then the confidence interval under the normal distribution is calculated, and the formula is as follows:
[0051]
[0052] Confidence interval
[0053] where y represents the mean of the fault probability, represents the prediction value obtained by the i-th forward propagation, σ represents the standard deviation of the fault probability, and n represents the number of forward propagations.
[0054] Further, the fault risk assessment mechanism is:
[0055] (a) When the mean of the fault probability P is greater than or equal to 0.7 and the confidence interval is narrow, it is determined that the system is in a high-risk state, indicating that the system is highly confident that there is a fault risk, and an emergency warning is triggered;
[0056] (b) When the average failure probability 0.3 < P < 0.7 or the confidence interval is wide, it is determined that the system is in a medium risk state, indicating that the system has medium confidence in the prediction result, and a warning prompt is issued;
[0057] (c) When the average failure probability P ≤ 0.3 and the confidence interval is narrow, it is determined that the system is in a low risk state, indicating that the system is highly confident that the battery is in a safe state, and normal monitoring is maintained.
[0058] Compared with the prior art, the beneficial effects of the present application are as follows:
[0059] 1. The hybrid model combining LSTM-BNN is introduced, which improves the accuracy and timeliness of the power battery failure prediction and effectively prevents the occurrence of safety accidents.
[0060] 2. Uncertainty quantification is introduced to improve the reliability of the prediction result.
[0061] 3. The method can be integrated into the battery management system (BMS) to improve the intelligent level of the battery management system. BRIEF DESCRIPTION OF DRAWINGS
[0062] Figure 1 The flowchart of the power battery failure detection method in the present application: shows the basic process of the LSTM-BNN model detection method, including data acquisition and database establishment, data preprocessing and fault label, LSTM-BNN network construction, uncertainty quantification, fault judgment and other main links;
[0063] Figure 2 The structural diagram of the LSTM time sequence feature extraction network in the present application: shows the basic form of the LSTM network structure, and the number of hidden layers and the number of neurons can be determined according to the actual situation;
[0064] Figure 3 The structural diagram of the BNN failure prediction network in the present application: shows the basic form of the BNN network structure, and the number of hidden layers and the number of neurons is not unique and can be adjusted according to the actual situation;
[0065] Figure 4 The flowchart of risk assessment decision in the present application. DETAILED DESCRIPTION
[0066] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0067] The embodiment provides a power battery fault prediction method based on a long short-term memory network-Bayesian neural network (LSTM-BNN) model. The method can be integrated in a battery management system (BMS) of an electric vehicle, and relevant algorithms are executed by a vehicle-mounted processor. The method can also be deployed on an edge computing device or a cloud computing platform to adapt to different application scenarios and computing resource conditions.
[0068] Figure 1 The operation flowchart of the method is shown in FIG. 1. As shown in FIG. 1, main steps of fault prediction are as follows. Figure 1
[0069] S1 data acquisition and database establishment: working data of the power battery are collected through various sensors and operation logs of the BMS system to establish a power battery operation database. The collected data include but are not limited to the following parameters: voltage of each single battery, total current of the battery pack, multi-point temperature, SOC value, SOH value and charge-discharge cycle number, etc. The frequency of data acquisition can be set according to actual application requirements, and the preferred sampling frequency range can be from 1 Hz to 20 Hz, so as to balance data accuracy and system load.
[0070] Preferably, real-time basic performance indicators and use cases of the power battery are collected through the battery management system (BMS), full-life cycle data and operation logs of the power battery are acquired, and a state database of the full-life cycle of the power battery is established based on the acquired data. The basic performance indicators include but are not limited to the following key parameters: single battery voltage, charge-discharge current, battery surface temperature, battery health state (SOH) and state of charge (SOC) and internal resistance change rate, etc. The battery management system includes a data acquisition unit (MCU), a vehicle-mounted data recorder, a CAN bus and a data storage system, etc. The operation of data acquisition is as follows: the BMS is connected through the CAN bus, sensor data of the voltage, current and temperature parameters processed by the MCU are read, and then output to the data storage system.
[0071] S2 data preprocessing and fault labeling: The collected voltage, current, temperature, SOC value and SOH value data in the database are combined and arranged in chronological order. Kalman filter algorithm is used to smooth the data and eliminate the interference of equipment and environmental factors on the data set; maximum and minimum normalization and Z-score standardization method are used to preprocess the data of different dimensions such as voltage, current and temperature, eliminate the scale difference between different physical quantities, reduce the model training time, and enhance the robustness of the model prediction result; the missing data of each feature quantity in the time series is completed by linear interpolation method, which solves the problem of partial missing of each feature quantity in the time line and ensures the continuity and integrity of the data set. The processed data (voltage, current, SOC, etc.) are divided into multiple time periods according to the sliding window to form a time sample sequence. LSTM-AE method is used to label the samples, normal marking as 0 and fault marking as 1. At the same time, the running log and maintenance record are compared, 10% of the data are randomly selected for labeling inspection, and the misjudged time periods are manually intervened and corrected. Finally, the pretreated data set is divided according to time sequence for subsequent fault prediction in BNN network.
[0072] Optionally, the S2 data preprocessing and fault labeling of the embodiment, since the collected raw data usually contains noise and abnormal values, it needs to be preprocessed. The preprocessing steps include:
[0073] B1. Noise filtering: Kalman filter algorithm can be used to smooth the data, and the filtering parameters can be adjusted according to the noise characteristics of each feature quantity. Kalman filter algorithm is used to smooth the voltage, current, SOC and other data, and the errors existing in the state transition process and observation process are considered to obtain the best estimation of the system state. The data smoothing by Kalman filter algorithm is realized through the following steps:
[0074] 1. According to the actual characteristics of the data, determine the state quantity and observation quantity, and establish the state transition equation:
[0075] X t =F t X t-1 +B t U t +W t
[0076] Where, X t is the true state vector at time t, X t-1 is the true state vector at time t-1, F t is the state transition matrix, B t is the control input matrix, U t is the control input vector, and W t is a random variable subject to W tProcess noise ~N(0, Q).
[0077] 2. Analyze the relationship between the data collected by the sensor and the true value, and establish the observation equation:
[0078] Z t = H t X t + V t
[0079] Where Z t is the observation value at the current time, H t is the measurement transition matrix, V t is the observation noise subject to V t ~N(0, R).
[0080] 3. Prediction stage:
[0081]
[0082] P t - = F t P t-1 F t T + Q t
[0083] Where, is the predicted state (prior estimate) at the current time t, F t is the state transition matrix, is the posterior estimate at the previous time t-1, B t is the control input matrix, P t - is the prior covariance matrix at the current time t, P t-1 is the posterior covariance matrix at the previous time t-1, F t T represents the transpose matrix of F t , Q t is the process noise covariance matrix.
[0084] 4. Update stage:
[0085] K t = P t - H T (HP t - H T + R) -1
[0086] Where K t is the Kalman gain at the current time, and R is the measurement noise covariance.
[0087]
[0088] wherein, is the revised estimated value, represents the gap between the measured value and the predicted value.
[0089] P t =(I-K t H)P t -
[0090] wherein, P t is the updated covariance, I is the unit matrix.
[0091] The above is the basic formula of Kalman filtering algorithm, and for the smoothing processing of voltage, current, SOC and other data, the state variable, state transition matrix, measurement transition matrix, process noise covariance and measurement noise covariance and other parameters and state equation need to be determined according to the actual situation of the processed data.
[0092] Optionally, the Kalman filtering algorithm realizes the SOC smoothing through the following steps:
[0093] 1. According to the physical characteristics that the SOC of the power battery is mainly affected by the coulomb integral, a state space model is established. The battery state of charge SOC is selected as the state variable, and the ampere-hour integral method is considered. The discrete time state equation is:
[0094]
[0095] wherein, SOC t is the true state of charge at t, SOC t-1 is the true state of charge at t-1, I t-1 is the current at t-1 (usually defined as positive for charging and negative for discharging), η is the coulomb efficiency (charging and discharging efficiency), Δt is the sampling time interval, C 额 is the rated capacity of the battery. w t-1 is the process noise subject to w t-1 ~N(0,Q), which represents the uncertainty caused by the unmodeled dynamics such as current measurement error and efficiency variation.
[0096] The battery terminal voltage or other parameters that can indirectly reflect the SOC is selected as the observation. The observation equation of the SOC is:
[0097] Z t =H·SOC t +V t
[0098] wherein, Z t is the observation value, H is the measurement transition matrix, Vt is subject to V t ~ N(0, R), which represents sensor measurement error, etc.
[0099] 2. The formula in the prediction stage is:
[0100]
[0101] Here, the state transition matrix F t is 1 because the current SOC directly depends on the SOC at the last time. The control input matrix B t The control input U t is the current I t-1 , P t - is the covariance of the prior SOC estimation, and Q is the covariance of the process noise.
[0102] 3. The formula in the update stage is:
[0103] K t = P t - · H T · (H t · P T · H -1 + R)
[0104]
[0105] P t + = (I - K t · H) · P t -
[0106] where K t is the Kalman gain at time t, R is the covariance of the observation noise, and I is the identity matrix (in this case, the scalar 1). is the corrected estimation value (posterior estimation) of the SOC at time t, P t + is the updated covariance.
[0107] 4. By initializing and , the smoothed SOC estimation sequence can be obtained by iterative calculation using the above prediction and update formulas according to the collected current I t and observation value Z t sequence. During the process, the noise covariance Q and R and the Coulomb efficiency η may need to be adjusted and optimized according to the actual data characteristics.
[0108] B2. Data normalization and standardization: In order to make the model gradient update stable and more robust, the parameters of different dimensions are normalized and standardized to eliminate the scale difference between different physical quantities. The maximum and minimum normalization method is used to normalize the parameters with explicit range such as voltage, current and SOC, so that the data in each dimension has comparability;
[0109]
[0110] where Y norm represents the data after parameter normalization, Y represents the original data of the parameter, Y max represents the maximum value of all data of the parameter, Y min represents the minimum value of all data of the parameter.
[0111] Since the temperature is affected by environmental factors, the Z-score standardization is used to process the temperature data, and the formula is:
[0112]
[0113] where T std is the standardized temperature data, T' represents the original data of the temperature, σ is the standard deviation of the temperature data, and μ is the mean value of the temperature data.
[0114] B3. Data missing processing: For the data missing that may occur in the collection process, linear interpolation method can be used to complete the data before and after the data point:
[0115]
[0116] where t1, y1 represents the time point and the corresponding data value of the known data before the missing data point, t2, y2 represents the time point and the corresponding data value of the known data after the missing data point, Y t represents the calculated missing value.
[0117] B4. Time window division: The continuous time series is divided into fixed length time windows, and the window length can be set according to the dynamic characteristics of the battery. The preferred window length range can be from 30 seconds to 300 seconds. The sliding window technology is used, and there is a certain overlap between adjacent windows to enhance the model's ability to capture time series characteristics.
[0118] After the data is preprocessed, the specific implementation of data labeling and data set division is as follows: Figure 1As shown, the method of this invention uses a Long Short-Term Memory Autoencoder (LSTM-AE) for anomaly detection and labeling. The LSTM-AE consists of three parts: an encoding layer, a latent feature representation layer, and a decoding layer. The encoder compresses the input sequence into a low-dimensional representation, and the decoder attempts to reconstruct the original sequence from this representation. Data from normal operating conditions can usually be reconstructed relatively well, while the reconstruction error of abnormal state data is larger.
[0119] Optionally, LSTM-AE is implemented through the following steps:
[0120] 1. Given a time series, input x = (x1, x2, ..., x...) t );
[0121] Where x t A multidimensional feature vector representing a specific moment in time.
[0122] 2. Construct the LSTM encoding layer: h t =f(W e x t +b e );
[0123] Among them W e ,b e is the weight parameter of the encoder, and f is the nonlinear activation function of the LSTM unit.
[0124] 3. Construct the LSTM decoding layer:
[0125] Among them W d ,b d is the weight parameter of the decoder, and g is the nonlinear activation function of the LSTM unit.
[0126] 4. The training process of LSTM-AE is based on the time-based backpropagation algorithm. The gradients of each weight are updated using an optimization algorithm. The mean squared error (MSE) is used as the loss function L, and the reconstruction error e is... t :
[0127]
[0128]
[0129] 5. Set a reconstruction error threshold. When the reconstruction error of data within a certain time window exceeds this threshold, mark it as a potential fault state (marked as 1); otherwise, mark it as a normal state (marked as 0). The threshold can be set based on the statistical distribution on the validation set, taking the P-value of the reconstruction error distribution. 95 (e) is used as a threshold.
[0130] After the labeling is completed, the dataset is divided into training set, validation set and test set in chronological order. In a preferred embodiment, the first 70% of the data can be used as the training set, the middle part of the data as the validation set, and the last 30% as the test set. This time sequence division method conforms to the data distribution characteristics in actual application.
[0131] S3 Construction of LSTM-BNN model and fault prediction:
[0132] S31 Specific implementation of LSTM network time series feature extraction: the LSTM network is used to learn the preprocessed dataset to extract the time-varying feature variables. The present application constructs a multi-layer LSTM network to extract the time series features of the power battery data, and effectively captures the long and short term dependencies through the gating mechanism of LSTM. The output of the last time step of the LSTM network is extracted as a time series feature vector, which is used as input in the BNN network.
[0133] Referring to Figure 2 the LSTM time series feature extraction structure, the LSTM network includes an input layer and multiple LSTM layers, and the present application uses a multi-layer LSTM network to extract the time series features of the power battery data. The specific extraction process is as follows:
[0134] S311 Input data preparation: input the processed multi-dimensional time series data, including but not limited to voltage, current, temperature, state of charge, etc. These variables constitute a multi-dimensional time series data X = [V(t), I(t), T(t), …]. A sliding window mechanism can be used to set the time window length and sliding step value according to actual conditions.
[0135] S312 LSTM network structure: as shown in Figure 2 , the LSTM network includes an input layer and multiple LSTM layers. The input layer receives the preprocessed multi-dimensional time series data, each LSTM layer includes multiple LSTM units, and each LSTM unit has three gating mechanisms, i.e. input gate, forget gate and output gate. These gating mechanisms enable LSTM to selectively remember and forget information, thereby effectively capturing long and short term dependencies.
[0136] The LSTM network can be designed as a two-layer structure, and the number of neurons in the first and second layers can be adjusted according to the input feature dimension and computing resources. To prevent overfitting, a Dropout layer can be added between the LSTM layers to randomly discard a portion of the neurons, and the Dropout rate can be adjusted according to the size of the training set. To improve the stability of the model, L2 regularization can be used to constrain the weights of LSTM. The training objective of the network is to minimize the prediction error, and the cross-entropy loss function and appropriate optimization algorithm can be used.
[0137] S313 LSTM extracted features: The hidden state vector of the last time step output of the LSTM network is extracted as the time series feature vector, which contains the key time series information of the battery state, and will be used as the input of the BNN to determine whether the battery is faulty.
[0138] S32 BNN fault prediction and uncertainty quantification: A BNN network is constructed to perform fault prediction and uncertainty quantification on the features extracted by the LSTM. The LSTM is connected to the BNN through a fully connected layer. The BNN network contains multiple Bayesian fully connected layers, and a ReLU activation function is used between each layer to perform nonlinear feature transformation on the input feature vector. Finally, the output layer outputs a probability distribution of fault occurrence, which is compressed to 0-1 using a Sigmoid function.
[0139] Referring to Figure 3 The BNN fault prediction structure shown in the figure, the method of the present application uses a Bayesian neural network to perform fault probability prediction and uncertainty quantification on the features extracted by the LSTM. The specific fault prediction process is as follows:
[0140] S321 BNN receives LSTM extracted features as input: After the initial input data is processed by the LSTM, a time series feature vector of corresponding dimensions is output, which is used as the input of the BNN.
[0141] S322 BNN performs fault probability prediction; the BNN network structure contains input layer, hidden layer and output layer, and each layer uses appropriate activation function. The dimension of the input layer should be the same as the feature dimension output by the LSTM, the number of layers and neurons in the hidden layer is set according to the actual situation, and the output layer is a single node using Sigmoid activation function to output the probability of fault occurrence. BNN fault prediction can be divided into two stages of training and prediction. In a preferred embodiment, the network parameters are initialized to set the prior distribution as a Gaussian distribution where μ0 is the initial mean of the weight, usually set to 0, is the initial variance of the weight, in order to prevent large fluctuations at the beginning of training, usually set a small number (such as 0.1) to approximate the posterior distribution by variational inference method. In specific implementation, Monte Carlo Dropout technology can be used to maintain Dropout activation during inference phase, and the distribution of prediction results is obtained by multiple forward propagation. In the training phase, the loss function of BNN contains prediction error term and KL divergence regularization term, and the weights of the two can be adjusted according to the importance of the task. In the prediction phase, the probability distribution is obtained by multiple sampling, and the mean is calculated as the final prediction result, and the variance is calculated as the uncertainty measure of the prediction.
[0142] S323 uncertainty quantification: multiple predictions are obtained by multiple forward propagation, and the mean and variance of the predictions are calculated, where the prediction mean is taken as the final prediction result, and the prediction variance is taken as the uncertainty measure of the prediction, and then the confidence interval under the normal distribution is calculated, as shown in the following formula:
[0143]
[0144] Confidence interval
[0145] Where y represents the mean of the failure probability, represents the prediction value obtained by the i-th forward propagation, σ represents the standard deviation of the failure probability, and n represents the number of forward propagations.
[0146] S4 risk assessment decision: based on the prediction results and uncertainty quantification of BNN, the method of the application realizes a multi-level risk assessment decision mechanism.
[0147] Preferably, the risk assessment and early warning are based on the output results of the LSTM-BNN network. The BNN outputs a probability distribution, and the mean and variance are calculated by multiple Monte Carlo sampling, and the confidence interval under the normal distribution condition is calculated. The width of the confidence interval is one of the quantitative indicators of the prediction uncertainty, and the narrower the confidence interval, the higher the accuracy of the prediction result; the wider the confidence interval, the greater the uncertainty of the prediction result. Combined with the failure probability and the width of the confidence interval, the application designs a multi-level risk assessment mechanism, which can set the corresponding risk threshold according to the actual application requirements.
[0148] Specifically, the mean and standard deviation of the failure probability are calculated by multiple Monte Carlo sampling, and the confidence interval is estimated based on the normal distribution assumption. The width of the confidence interval and the failure probability P are used as quantitative indicators of prediction uncertainty.
[0149] In a preferred embodiment, a three-level risk assessment mechanism can be designed:
[0150] 1. High risk state: when the mean failure probability P is greater than or equal to 0.7 and the confidence interval is narrow, it indicates that the system is highly confident that there is a risk of failure, and triggers an emergency warning;
[0151] 2. Medium risk state: when the mean failure probability is 0.3<P<0.7 or the confidence interval is wide, it indicates that the system has a medium degree of confidence in the prediction result, and an alert is issued;
[0152] 3. Low risk state: when the mean failure probability P is less than or equal to 0.3 and the confidence interval is narrow, it indicates that the system is highly confident that the battery is in a safe state, and normal monitoring is maintained.
[0153] The specific thresholds for each risk level can be adjusted according to application scenarios and security requirements to balance security and false positive rates.
[0154] Finally, it should be noted that the above examples are only used to illustrate the technical solutions of the present application, but not to limit them. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can still be modified or equivalently replaced, and these modifications or equivalent replacements should not make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present application.
Claims
1. A power battery fault prediction method based on an LSTM-BNN model, characterized in that, include: Data Acquisition: Through the battery management system, which includes a data acquisition unit, an on-board data recorder, a CAN bus, and a data storage system, real-time basic performance indicators and usage of the power battery are collected, multi-dimensional feature data is obtained, and a power battery full life cycle status database is established based on the data. Data preprocessing and labeling: The data in the database is cleaned of noise, normalized, standardized, missing values are filled, and labeled. Kalman filtering algorithm, maximum-minimum normalization, Z-score standardization and linear interpolation are used to preprocess the data. Long short-term memory network autoencoder is used to label the time series data for faults. Fault prediction: The preprocessed and labeled data is processed using an LSTM-BNN model to predict the fault probability distribution of the power battery. Fault risk assessment and early warning: Based on the predicted fault probability distribution, calculate the mean fault probability and confidence interval; Based on the mean failure probability, the confidence interval width, and the preset risk threshold, a failure risk assessment is performed, and a warning message is output based on the assessment results.
2. The power battery fault prediction method based on the LSTM-BNN model according to claim 1, characterized in that, The data acquisition process involves connecting to the battery management system via a CAN bus, reading sensor data containing voltage, current, and temperature parameters processed by the data acquisition unit, and then outputting the data to the data storage system.
3. The power battery fault prediction method based on the LSTM-BNN model according to claim 1, characterized in that, The basic performance indicators include, but are not limited to: single cell voltage, charge and discharge current, battery surface temperature, battery health status and state of charge, and internal resistance change rate.
4. The power battery fault prediction method based on the LSTM-BNN model according to claim 1, characterized in that, The Kalman filter algorithm is used to smooth the data, including: (a) Based on the actual characteristics of the data, determine the state variables and observations, and establish the state transition equations: X t =F t X t-1 +B t U t +W t Among them, X t X is the true state vector at time t. t-1 F is the true state vector at time t-1. t It is the state transition matrix, B t It is the control input matrix, U t It is the control input vector, W t It is to obey W t ~N(0,Q) process noise; (b) Analyze the relationship between the data collected by the sensor and the actual values, and establish the observation equation: Z t =H t X t +V t Among them, Z t H is the observation value at the current moment. t It is the measurement transition matrix, V t Is it obeying V t ~N(0,R) observation noise; (c) Prediction phase: P t - =F t P t-1 F t T +Q t in, F is the predicted state at the current time t. t It is the state transition matrix. B is the posterior estimate of the previous time step t-1. t It is the control input matrix, P t - P is the prior covariance matrix at the current time t. t-1 F is the posterior covariance matrix of the previous time step t-1. t T It represents F t The transpose matrix, Q t It is the process noise covariance matrix; (d) Update phase: K t =P t - H T (HP t - H T +R) -1 Among them, K t R is the Kalman gain at the current moment, and R is the measurement noise covariance. in, It is a revised estimate. This indicates the difference between the measured value and the predicted value; P t =(I-K t H)P t - Among them, P t It is the updated covariance, where I is the identity matrix; (e) After constructing the equation, initialize the parameters according to the actual characteristics of the data, substitute them into the formula for iteration, and adjust the parameters according to the iteration results.
5. The power battery fault prediction method based on the LSTM-BNN model according to claim 1, characterized in that, Data preprocessing was performed using max-min normalization, Z-score standardization, and linear interpolation, including: The voltage, current, and state of charge are normalized using the maximum-minimum normalization method to make the data in each dimension comparable. Among them, Y norm Y represents the normalized data of the parameters, and Y represents the original data of the parameters. max Y represents the maximum value among all the data for the parameter. min This represents the minimum value among all the data for the parameter; The temperature data was processed using Z-score normalization, with the following formula: Among them, T std These are standardized temperature data, where T represents the original temperature data, σ is the standard deviation of the temperature data, and μ is the mean of the temperature data. For data gaps that occur during the data collection process, linear interpolation is used to fill in the missing data points. Where t1, y1 represent the time points and corresponding data values of known data before the missing data point, and t2, y2 represent the time points and corresponding data values of known data after the missing data point. t This indicates the missing values obtained from the calculation.
6. The power battery fault prediction method based on the LSTM-BNN model according to claim 1, characterized in that, Data is fault-labeled using a Long Short-Term Memory (LSTM) autoencoder, including: (a) Given a time series, input x = (x1, x2, ..., x...) t ), where x t A multidimensional feature vector representing a specific moment in time; (b) Constructing the LSTM coding layer h t =f(W e x t +b e ); where W e ,b e is the weight parameter of the encoder, and f is the nonlinear activation function of the LSTM unit; (c) Constructing the LSTM decoding layer Among them W d ,b d is the weight parameter of the decoder, and g is the nonlinear activation function of the LSTM unit; (d) A time-based backpropagation algorithm is used, where the gradient of each weight is updated using an optimization algorithm, and the mean squared error is used as the loss function L, with the reconstruction error e. t : (e) Set a reconstruction error threshold. When the reconstruction error of data in a certain time window exceeds the threshold, it is marked as a potential fault state; otherwise, it is marked as a normal state.
7. The power battery fault prediction method based on the LSTM-BNN model according to claim 1, characterized in that, The network structure of the LSTM - BNN model includes: an LSTM feature extraction part and a BNN prediction part; among them, the LSTM network contains an input layer and multiple LSTM layers. The input layer receives the pre - processed multi - dimensional time - series data, and the hidden - state vector output at the last time step is extracted as the time - series feature vector. The BNN network structure consists of three parts: an input layer, a hidden layer, and an output layer. The feature vector output by the LSTM is used as the input, and after multiple forward propagations, the fault probability distribution is obtained.
8. The power battery fault prediction method based on the LSTM-BNN model according to claim 7, characterized in that, The LSTM and BNN are connected through a fully - connected layer; the BNN network contains multiple Bayesian fully - connected layers. Between each layer of the fully - connected layers, the ReLU activation function is used to perform non - linear feature transformation on the input feature vector; finally, the output layer outputs the fault occurrence probability distribution, and the Sigmoid function is used to compress the result to between 0 and 1.
9. The power battery fault prediction method based on the LSTM-BNN model according to claim 7, characterized in that, Multiple prediction values are obtained through multiple forward propagations, and the mean and variance of the prediction values are calculated. Among them, the prediction mean is used as the final prediction result, and the prediction variance is used as the measure of prediction uncertainty. Then, the confidence interval under the normal distribution is calculated. The formula is as follows: Confidence interval Where y represents the mean probability of failure. Let represent the predicted value obtained in the i-th forward propagation, σ represent the standard deviation of the failure probability, and n represent the number of forward propagations.
10. The power battery fault prediction method based on the LSTM-BNN model according to claim 1, characterized in that, The fault risk assessment mechanism is as follows: (a) When the mean fault probability P≥0.7 and the confidence interval is narrow, it is determined that the system is in a high - risk state, indicating that the system is highly confident that there is a fault risk, and an emergency warning is triggered; (b) When the mean fault probability 0.3<P<0.7 or the confidence interval is wide, it is determined that the system is in a medium - risk state, indicating that the system has a medium level of confidence in the prediction result, and a warning prompt is issued; (c) When the mean fault probability P≤0.3 and the confidence interval is narrow, it is determined that the system is in a low - risk state, indicating that the system is highly confident that the battery is in a safe state, and normal monitoring is maintained.
Citation Information
Cited By
Deep learning-based lithium battery internal short circuit fault early warning and positioning method and system
CN121232039A
Unmanned aerial vehicle lithium battery remaining life prediction method and device based on deep learning
CN122172059A
