New energy vehicle lithium battery life and fault prediction method and system based on deep learning
By adopting a deep learning model in lithium battery life and fault prediction, combining CNN and LSTM to extract the spatiotemporal characteristics of lithium battery data, the problems of low prediction accuracy and poor adaptability in the prior art are solved, and high-accuracy life and fault prediction are achieved, reducing maintenance costs.
Patent Information
- Application Number
- CN202411987687.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
AI Technical Summary
The existing lithium battery life and fault prediction methods have insufficient trade-offs on model complexity and accuracy, data requirements and adaptability issues, and the timeliness and reliability of fault prediction.
A deep learning-based method is adopted to build a hybrid deep learning model through the combination of convolutional neural network (CNN) and long and short-term memory network (LSTM) to extract spatiotemporal features in lithium battery data and perform life and fault prediction.
It significantly improves the accuracy of lithium battery life and fault prediction, reduces prediction errors, enhances the universality and practicality of the model, realizes early fault warning, and reduces maintenance costs.
Smart Images

Figure CN119780733A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of lithium batteries and relates to a method and system for predicting the life and failure of lithium batteries for new energy vehicles based on deep learning. Background Art
[0002] As the global demand for clean energy continues to grow, lithium batteries have been widely used in many fields such as electric vehicles, portable electronic devices, energy storage systems, etc. due to their advantages such as high energy density, long cycle life, and low self-discharge rate.
[0003] However, during the use of lithium batteries, their performance will gradually decline, their lifespan is limited, and various failures may occur, which not only affects the normal operation of the equipment, but also may bring safety hazards. Therefore, accurately predicting the life and failure of lithium batteries is of great significance for optimizing battery management systems, improving equipment reliability, and reducing maintenance costs.
[0004] In the prior art, lithium battery life and failure prediction methods mainly include physical model-based methods and data-driven methods.
[0005] The physical model-based method usually establishes complex electrochemical models to describe the physical and chemical processes inside lithium batteries, predicts the performance and life of the battery by solving these models, and describes the physical and chemical processes such as lithium ion diffusion, migration and electrochemical reactions inside lithium batteries by establishing complex partial differential equations.
[0006] However, the prior art still has the following defects during use:
[0007] The trade-off between model complexity and accuracy: Although the physical model-based method can deeply understand the physical and chemical processes inside the battery, the model is complex, requires a large number of experimental parameters for calibration, and has high computational costs. In practical applications, in order to simplify the calculation, it is often necessary to approximate the model, which affects the accuracy of the prediction. For example, the equivalent circuit model has certain limitations in describing the dynamic characteristics of the battery and cannot accurately capture the complex behavior of the battery under different operating conditions.
[0008] Data demand and adaptability issues: Data-driven methods rely on a large amount of historical data for training, and have high requirements for data quality and quantity. In practical applications, different batteries have different production processes, usage environments, etc., which leads to uneven data distribution and limited generalization of the model. In addition, traditional machine learning algorithms have limited feature extraction capabilities when processing high-dimensional, nonlinear data, making it difficult to fully tap the potential information in battery data.
[0009] Insufficient timeliness and reliability of fault prediction: Existing technologies can only make judgments on fault prediction after the battery performance has obviously declined or the fault has occurred, and lack the ability to effectively identify early signs of faults. Moreover, the reliability of the prediction results is low, and false positives and false negatives are prone to occur, which brings risks to the safe operation of the battery system. Summary of the invention
[0010] The purpose of the present invention is to provide a method and system for predicting the life and fault of lithium batteries of new energy vehicles based on deep learning, so as to solve the problems of complex existing models, low accuracy and poor data adaptability.
[0011] In order to achieve the above object, the basic scheme of the present invention is: a method for predicting the life and failure of lithium batteries for new energy vehicles based on deep learning, comprising the following steps:
[0012] Collect the voltage, current, temperature, cycle number and usage time data set of new energy vehicle lithium batteries during driving, and perform preprocessing;
[0013] Based on the convolutional neural network (CNN) and the long short-term memory (LSTM) network, a hybrid deep learning model is constructed, in which CNN is used to extract spatial features from lithium battery data, and LSTM is used to process the time series features of the lithium battery usage process;
[0014] The preprocessed data set is divided into a training set and a test set, and the training parameters are set. The Adam optimization algorithm is used to train the hybrid deep learning model to obtain the optimized hybrid deep learning model.
[0015] The voltage, current, temperature, number of cycles and usage time of the lithium battery to be predicted are collected, input into the optimized hybrid deep learning model after preprocessing, and the lithium battery life and fault prediction results are output.
[0016] The working principle and beneficial effect of this basic solution are: this technical solution can fully extract the spatiotemporal characteristics of battery operation data through the combination of convolutional neural network and long short-term memory network, better capture the changing laws of battery performance, and thus significantly improve the accuracy of battery life and fault prediction. Compared with the existing technology, the prediction error can be reduced by more than 8%.
[0017] The hybrid deep learning model has powerful automatic feature learning capabilities and can adapt to lithium battery data of different types and working conditions. There is no need to make complex model adjustments for each battery and working condition, which greatly improves the versatility and practicality of the model. Real-time analysis of battery data based on the hybrid deep learning model can promptly detect slight changes in battery performance, predict potential failures in advance, and provide users with enough time to take maintenance measures, effectively avoiding equipment downtime and safety accidents caused by battery failures.
[0018] Furthermore, the method for preprocessing the collected data of voltage, current, temperature, number of cycles and usage time of the lithium battery is as follows:
[0019] Outlier processing: Identify and remove outliers by setting a reasonable threshold range. For voltage data, if the voltage value at a certain moment exceeds the normal charging and discharging voltage range, the data point is marked as an outlier and replaced with the average value of adjacent data points.
[0020] For current data, if the current value exceeds 1.5 times the maximum allowable charge and discharge current of the battery, it is also regarded as an abnormal value and is also replaced;
[0021] Missing value processing: If a small amount of data is missing during the data collection process, linear interpolation is used to supplement it. If the current data at a certain moment in the time series is missing, the current value at the missing moment is calculated through a linear function based on the current values at the two moments before and after it;
[0022] Filtering:
[0023] Based on the sliding average filtering algorithm, for the voltage and current data, a sliding window with a length of 5 is used for average filtering. Suppose the original voltage data sequence is V = [v 1 ,v 2 ,v 3 ,v 4 ,v 5 ,v 6 ,...], then the voltage data sequence V′[i] after sliding average filtering is:
[0024]
[0025] Wherein, i, j represent the serial number of the original voltage data;
[0026] Normalization:
[0027] Minimum-maximum normalization: Normalize the voltage, current, temperature, number of cycles and usage time information data to the [0,1] interval. Let the original data be x and the normalized data be x′, which is:
[0028]
[0029] Among them, min(x) and max(x) are the minimum and maximum values in the original data respectively.
[0030] The threshold method is used to clean data, the sliding average filter is used to reduce noise, and the minimum-maximum normalization is used to unify the scale, providing high-quality input for the deep learning model and enhancing the accuracy and reliability of the prediction system.
[0031] Furthermore, the convolutional neural network CNN includes:
[0032] Convolutional Layer:
[0033] Convolution kernel settings: Three one-dimensional convolution kernels of different sizes are used, namely 3, 5 and 7, to extract features at different time scales. The number of each convolution kernel is 32, the step size is 1, and the padding mode is 'same' to ensure that the length of the output feature map is the same as the length of the input data;
[0034] Activation function: The convolutional layer is followed by the ReLU activation function. The ReLU function is defined as f(x) = max(0, x), that is, for each element of the input, the maximum value is 0 and the element itself, where x is the original data;
[0035] Max Pooling Layer:
[0036] Add a maximum pooling layer after the convolution layer, with a pooling window size of 2 and a step size of 2. The maximum pooling operation can be used to downsample the feature map;
[0037] Fully connected layer:
[0038] Feature fusion and dimensionality reduction: The multiple feature maps after the pooling layer are expanded and spliced, and then passed through a fully connected layer for feature fusion and dimensionality reduction. The number of neurons in the fully connected layer is 64, and a linear activation function is used, that is, the input feature vector is multiplied by the weight matrix and then directly output without nonlinear transformation.
[0039] Design one-dimensional convolution kernels of specific size and number, match them with appropriate step size and padding method, and use ReLU activation function and maximum pooling layer to extract local features of battery data.
[0040] Furthermore, the long short-term memory network LSTM includes an LSTM unit structure and an LSTM network structure, and the LSTM unit structure includes:
[0041] Input gate: controls the input of new information, which is:
[0042] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0043] Among them, i t is the output of the input gate at time t, σ is the sigmoid function, which compresses the output value to the interval [0,1], and W i is the weight matrix of the input gate, h t-1 is the hidden state at the previous moment, x tis the input feature at the current moment, b i is the bias term;
[0044] Forget gate: decides whether to keep or forget the memory information of the previous moment, which is:
[0045] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0046] Among them, f t is the output of the forget gate at time t, W f and b f They are the weight matrix and bias term of the forget gate respectively;
[0047] Output gate: controls the output value at the current moment, which is:
[0048] o t =σ(W o ·[h t-1 ,x t ]+b o )
[0049] Among them, t is the output of the output gate at time t, W o and b o They are the weight matrix and bias term of the output gate respectively;
[0050] Memory unit: Update the information of the memory unit to:
[0051]
[0052] in, is the candidate memory cell value at the current moment, which is transformed nonlinearly through the tanh function. t is the memory cell value at the current moment, ⊙ represents element-wise multiplication, i.e., corresponding elements are multiplied; W C and b C is the weight matrix and bias term of the memory unit;
[0053] Hidden state: Calculate the hidden state h at the current moment based on the memory unit and output gate t ,for:
[0054] h t =o t ⊙tanh(C t );
[0055] The LSTM network structure includes:
[0056] Number of stacking layers: A 2-layer LSTM stacking structure is used. The input of the first layer LSTM is the feature vector output by CNN, with a dimension of 64 and a hidden state dimension of 32. The input of the second layer LSTM is the output of the first layer, and the hidden state dimension is also 32.
[0057] Fully connected layer and output: A fully connected layer is connected after the LSTM layer to map the hidden state of the LSTM output to the final output dimension. For the remaining battery life prediction, the number of neurons in the fully connected layer is 1, and the linear activation function is used to directly output the predicted remaining life value; for the fault probability prediction, the number of neurons in the fully connected layer is 1, and the output value is compressed to the [0,1] interval through the sigmoid activation function as the predicted value of the fault probability.
[0058] A two-layer LSTM network is built to learn the long-term dependencies of battery data through a unique gating mechanism and hidden state settings, thereby effectively extracting the spatiotemporal characteristics of battery operation data and laying the foundation for accurate prediction.
[0059] Further, the steps of training the hybrid deep learning model to obtain the optimized hybrid deep learning model are as follows:
[0060] The preprocessed lithium battery dataset is divided into training set, test set and validation set in a ratio of 70:15:15;
[0061] For the remaining battery life prediction, the mean square error MSE is used as the loss function, which is:
[0062]
[0063] Where n is the number of samples, y i is the true remaining life value of the i-th sample, is the remaining life value predicted by the model;
[0064] For fault probability prediction, binary cross entropy BCE is used as the loss function, which is:
[0065]
[0066] Among them, i1 is the sample number, y i1 is the true fault label of the i1th sample, 0 means no fault, 1 means fault, is the failure probability value predicted by the model;
[0067] The Adam optimization algorithm is used, and its parameters are set as follows: the initial value of the learning rate is 0.001, and the exponential decay rate of the gradient first-order moment estimate is β 1= 0.9, exponential decay rate of gradient second-order moment estimate β 2 = 0.999, constant ∈ = 1e-8, the Adam optimization algorithm dynamically adjusts the learning rate of each parameter according to the first-order moment estimate and the second-order moment estimate of the gradient during the training process. The specific update is:
[0068] m k =β 1 m k-1 +(1-β 1 ) k
[0069]
[0070] Among them, m k and v k are the first-order moment estimate and the second-order moment estimate of the gradient, respectively. and is its revised estimate, g k is the gradient of the current iteration, θ k is the model parameter, α is the learning rate, and k is the number of iterations;
[0071] Using the early stopping method, during the training process, the loss function value is calculated on the validation set every 10 epochs. If the validation set loss function value does not decrease for 5 consecutive epochs, the training is stopped and the parameters of the current model are saved as the final model.
[0072] Use the Adam optimization algorithm to reasonably set the initial learning rate and related parameters, dynamically adjust the learning rate according to the gradient moment estimation, and accelerate training convergence; combine the early stopping method, verify the loss function with a specific epoch as the cycle to prevent overfitting, ensure model performance and generalization ability, and improve training efficiency and stability.
[0073] The present invention also provides a new energy vehicle lithium battery life and fault prediction system based on deep learning, comprising a data acquisition module and a processing module, wherein the data acquisition module is used to collect a data set of voltage, current, temperature, number of cycles and usage time of a lithium battery and voltage, current, temperature, number of cycles and usage time information of a lithium battery to be predicted;
[0074] The input end of the processing module is connected to the output end of the data acquisition module, and the processing module executes the method of the present invention to perform lithium battery life and fault prediction.
[0075] This system uses data acquisition modules and processing modules to build an efficient deep learning model, fully utilizing the spatiotemporal characteristics of battery operation data to improve the accuracy, timeliness and reliability of predictions, while enhancing the model's adaptability to different batteries and operating conditions.
[0076] Further, the data acquisition module includes a voltage sensor, a current sensor, a temperature sensor and a timer;
[0077] The voltage sensor is used to collect the terminal voltage of the lithium battery during the charging and discharging process, and the current sensor is used to collect the charging and discharging current of the lithium battery;
[0078] The temperature sensors are arranged at a plurality of different positions on the surface of the lithium battery, and the timer starts timing from the time when the lithium battery is first put into use, and records the accumulated use time of the lithium battery.
[0079] High-precision sensors are used, the collection frequency is set according to the battery characteristics, and wired and wireless communication methods are combined to ensure real-time and accurate data transmission.
[0080] Furthermore, a hybrid deep learning model is provided in the processing module, and the hybrid deep learning model includes an input layer, a convolution layer, a pooling layer, a CNN fully connected layer, a first LSTM layer, a second LSTM layer, an LSTM fully connected layer and an output layer connected in sequence.
[0081] The hybrid deep learning model builds a two-layer LSTM network. Through a unique gating mechanism and hidden state setting, it learns the long-term dependencies of battery data, effectively extracts the spatiotemporal characteristics of battery operation data, and lays the foundation for accurate prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] Figure 1 It is a flow chart of a method for predicting life and failure of lithium batteries for new energy vehicles based on deep learning of the present invention;
[0083] Figure 2 It is a structural block diagram of the hybrid deep learning model of the new energy vehicle lithium battery life and fault prediction system based on deep learning of the present invention. DETAILED DESCRIPTION
[0084] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0085] In the description of the present invention, it is necessary to understand that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0086] In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal connection between two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.
[0087] The present invention discloses a method for predicting the life and failure of lithium batteries for new energy vehicles based on deep learning. By constructing an efficient deep learning model, the spatiotemporal characteristics of battery operation data are fully utilized to improve the accuracy, timeliness and reliability of the prediction, while enhancing the adaptability of the model to different batteries and working conditions. Figure 1 As shown, the life and failure prediction method of lithium batteries for new energy vehicles based on deep learning includes the following steps:
[0088] Collect the voltage, current, temperature, cycle number and usage time data set of new energy vehicle lithium batteries during driving, and perform preprocessing;
[0089] Based on the convolutional neural network (CNN) and the long short-term memory (LSTM) network, a hybrid deep learning model is constructed, in which CNN is used to extract spatial features from lithium battery data, and LSTM is used to process the time series features of the lithium battery usage process;
[0090] The preprocessed data set is divided into a training set and a test set, and the training parameters are set. The Adam optimization algorithm is used to train the hybrid deep learning model to obtain the optimized hybrid deep learning model.
[0091] The voltage, current, temperature, number of cycles and usage time of the lithium battery to be predicted are collected, input into the optimized hybrid deep learning model after preprocessing, and the lithium battery life and fault prediction results are output.
[0092] In a preferred embodiment of the present invention, the method for preprocessing the collected data of voltage, current, temperature, number of cycles and usage time of the lithium battery is:
[0093] Outlier processing: Identify and remove outliers by setting a reasonable threshold range. For voltage data, if the voltage value at a certain moment exceeds the normal charge and discharge voltage range (such as lower than 2V or higher than 4.5V), the data point is marked as an outlier and replaced with the average value of adjacent data points;
[0094] For current data, if the current value exceeds 1.5 times the maximum allowable charge and discharge current of the battery, it is also regarded as an abnormal value and is also replaced;
[0095] Missing value processing: If a small amount of data is missing during the data collection process, linear interpolation is used to supplement it. If the current data at a certain moment in the time series is missing, the current value at the missing moment is calculated through a linear function based on the current values at the two moments before and after it;
[0096] Filtering:
[0097] Based on the sliding average filtering algorithm, for the voltage and current data, a sliding window with a length of 5 is used for average filtering. Suppose the original voltage data sequence is V = [v 1 ,v 2 ,v 3 ,v 4 ,v 5 ,v 6 ,...], then the voltage data sequence V′[i] after sliding average filtering is:
[0098]
[0099] Wherein, i, j represent the serial number of the original voltage data;
[0100] Normalization:
[0101] Minimum-maximum normalization: Normalize the voltage, current, temperature, number of cycles and usage time information data to the [0,1] interval. Let the original data be x and the normalized data be x′, which is:
[0102]
[0103] Among them, min(x) and max(x) are the minimum and maximum values in the original data respectively.
[0104] The threshold method is used to clean data, the sliding average filter is used to reduce noise, and the minimum-maximum normalization is used to unify the scale, providing high-quality input for the deep learning model and enhancing the accuracy and reliability of the prediction system.
[0105] In a preferred embodiment of the present invention, the convolutional neural network CNN comprises:
[0106] Convolutional Layer:
[0107] Convolution kernel setting: Three one-dimensional convolution kernels of different sizes are used, namely 3, 5 and 7, to extract features at different time scales. The number of each convolution kernel is 32, the step size is 1, and the padding method is 'same' to ensure that the length of the output feature map is the same as the length of the input data; for example, for a voltage data sequence with a length of 100, after convolution with a convolution kernel of size 3, the dimension of the feature map obtained is (32, 100), where 32 is the number of convolution kernels and 100 is the length of the feature map.
[0108] Activation function: The convolutional layer is followed by the ReLU activation function. The ReLU function is defined as f(x)=max(0,x), that is, for each element of the input, the maximum value is 0 and the element itself, where x is the original data; for example, if the input feature map element values are -2, 0, 3, they become 0, 0, 3 after ReLU activation.
[0109] Max Pooling Layer:
[0110] A maximum pooling layer is added after the convolution layer, with a pooling window size of 2 and a step size of 2. The maximum pooling operation can downsample the feature map, reduce the amount of data, and retain the main features. For example, if the input feature map dimension is (32,100), after maximum pooling, the output feature map dimension becomes (32,50), that is, the maximum value in each pooling window is taken as the element value of the corresponding position of the output feature map.
[0111] Fully connected layer:
[0112] Feature fusion and dimensionality reduction: The multiple feature maps after the pooling layer are expanded and spliced, and then passed through a fully connected layer for feature fusion and dimensionality reduction. The number of neurons in the fully connected layer is 64, and a linear activation function is used, that is, the input feature vector is multiplied by the weight matrix and then directly output without nonlinear transformation.
[0113] Design one-dimensional convolution kernels of specific size and number, match them with appropriate step size and padding method, and use ReLU activation function and maximum pooling layer to extract local features of battery data.
[0114] In a preferred embodiment of the present invention, the long short-term memory network LSTM includes an LSTM unit structure and an LSTM network structure, and the LSTM unit structure includes:
[0115] Input gate: controls the input of new information, which is:
[0116] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0117] Among them, i t is the output of the input gate at time t, σ is the sigmoid function, which compresses the output value to the interval [0,1], and W i is the weight matrix of the input gate, h t-1 is the hidden state at the previous moment, x t is the input feature at the current moment, b i is the bias term;
[0118] Forget gate: decides whether to keep or forget the memory information of the previous moment, which is:
[0119] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0120] Among them, f t is the output of the forget gate at time t, W f and b f They are the weight matrix and bias term of the forget gate respectively;
[0121] Output gate: controls the output value at the current moment, which is:
[0122] o t =σ(W o ·[h t-1 ,x t ]+b o )
[0123] Among them, t is the output of the output gate at time t, W o and b o They are the weight matrix and bias term of the output gate respectively;
[0124] Memory unit: Update the information of the memory unit to:
[0125]
[0126] in, is the candidate memory cell value at the current moment, which is transformed nonlinearly through the tanh function. t is the memory cell value at the current moment, ⊙ represents element-wise multiplication, i.e., corresponding elements are multiplied; W C and b C is the weight matrix and bias term of the memory unit;
[0127] Hidden state: Calculate the hidden state h at the current moment based on the memory unit and output gate t ,for:
[0128] ht =o t ⊙tanh(C t ).
[0129] The LSTM network structure includes:
[0130] Number of stacking layers: A 2-layer LSTM stacking structure is used. The input of the first layer LSTM is the feature vector output by CNN, with a dimension of 64 and a hidden state dimension of 32. The input of the second layer LSTM is the output of the first layer, and the hidden state dimension is also 32.
[0131] Fully connected layer and output: A fully connected layer is connected after the LSTM layer to map the hidden state of the LSTM output to the final output dimension. For the remaining battery life prediction, the number of neurons in the fully connected layer is 1, and the linear activation function is used to directly output the predicted remaining life value; for the fault probability prediction, the number of neurons in the fully connected layer is 1, and the output value is compressed to the [0,1] interval through the sigmoid activation function as the predicted value of the fault probability.
[0132] A two-layer LSTM network is built to learn the long-term dependencies of battery data through a unique gating mechanism and hidden state settings, thereby effectively extracting the spatiotemporal characteristics of battery operation data and laying the foundation for accurate prediction.
[0133] In a preferred embodiment of the present invention, the steps of training the hybrid deep learning model to obtain an optimized hybrid deep learning model are as follows:
[0134] The preprocessed lithium battery data set is divided into training set, test set and validation set in a ratio of 70:15:15; for example, if there are 1000 groups of battery data, the first 700 groups are selected as training sets. 15% of the data is selected as the validation set to evaluate the performance of the model during the training process to prevent overfitting. That is, the 701st to 850th groups of data are selected as the validation set. The remaining 15% of the data is used as the test set for the final evaluation of the generalization ability of the model after the model training is completed. That is, the 851st to 1000th groups of data are selected as the test set.
[0135] For the remaining battery life prediction, the mean square error MSE is used as the loss function, which is:
[0136]
[0137] Where n is the number of samples, y i is the true remaining life value of the i-th sample, is the remaining life value predicted by the model;
[0138] For fault probability prediction, binary cross entropy BCE is used as the loss function, which is:
[0139]
[0140] Among them, i1 is the sample number, y i1 is the true fault label of the i1th sample, 0 means no fault, 1 means fault, is the failure probability value predicted by the model;
[0141] The Adam optimization algorithm is used, and its parameters are set as follows: the initial value of the learning rate is 0.001, and the exponential decay rate of the gradient first-order moment estimate is β 1 = 0.9, exponential decay rate of gradient second-order moment estimate β 2 = 0.999, constant ∈ = 1e-8, the Adam optimization algorithm dynamically adjusts the learning rate of each parameter according to the first-order moment estimate and the second-order moment estimate of the gradient during the training process. The specific update is:
[0142] m k =β 1 m k-1 +(1-β 1 ) k
[0143]
[0144] Among them, m k and v k are the first-order moment estimate and the second-order moment estimate of the gradient, respectively. and is its revised estimate, g k is the gradient of the current iteration, θ k is the model parameter, α is the learning rate, and k is the number of iterations;
[0145] Using the Early Stopping method, during the training process, after every 10 epochs (a complete data set training), the loss function value is calculated on the validation set. If the validation set loss function value does not decrease for 5 consecutive epochs, the training is stopped and the parameters of the current model are saved as the final model. For example, if the validation set loss function value does not decrease between the 50th epoch and the 59th epoch, the training is stopped after the 59th epoch, and the model parameters of the 59th epoch are saved.
[0146] Use the Adam optimization algorithm to reasonably set the initial learning rate and related parameters, dynamically adjust the learning rate according to the gradient moment estimation, and accelerate training convergence; combine the early stopping method, verify the loss function with a specific epoch as the cycle to prevent overfitting, ensure model performance and generalization ability, and improve training efficiency and stability.
[0147] Optimize and set up a fault warning mechanism:
[0148] Remaining life threshold setting: Set a reasonable remaining life threshold according to the battery type and application scenario. For example, for lithium batteries used in electric vehicles, when the remaining life is less than 70% of the initial capacity, it is considered that the battery performance has deteriorated to a level that requires attention. At this time, the remaining life threshold is set to 70%.
[0149] Failure probability threshold setting: A failure probability threshold is determined by analyzing and counting a large amount of battery failure data. For example, after data analysis, it is found that when the failure probability is higher than 0.3, the battery is more likely to fail in the near future, so the failure probability threshold is set to 0.3.
[0150] Warning signal output: When the remaining life predicted by the model is lower than the set remaining life threshold or the failure probability is higher than the set failure probability threshold, the prediction module issues a warning signal. The warning signal can be output in a variety of ways, such as displaying the warning information on the display screen, sending text messages to notify relevant personnel, or triggering the alarm device of the equipment, so that users can take corresponding maintenance measures in time, such as replacing batteries, adjusting charging and discharging strategies, etc.
[0151] The present invention also provides a new energy vehicle lithium battery life and fault prediction system based on deep learning, including a data acquisition module and a processing module. The data acquisition module is used to collect the voltage, current, temperature, number of cycles and usage time data sets of the lithium battery and the voltage, current, temperature, number of cycles and usage time information of the lithium battery to be predicted.
[0152] The input end of the processing module is electrically connected to the output end of the data acquisition module, and the processing module executes the method of the present invention to perform lithium battery life and fault prediction.
[0153] In a preferred embodiment of the present invention, the data acquisition module includes a voltage sensor, a current sensor, a temperature sensor and a timer. The voltage sensor is used to collect the terminal voltage of the lithium battery during the charging and discharging process, and the current sensor is used to collect the charging and discharging current of the lithium battery.
[0154] Preferably, a high-precision voltage sensor is used to accurately measure the terminal voltage of the lithium battery during the charge and discharge process. The measurement range depends on the battery type. For example, the common lithium-ion battery voltage range is between 2.5V-4.2V, and the measurement accuracy can reach ±0.01V. The battery charge and discharge current is collected by a Hall effect current sensor. The range of the current sensor is selected according to the maximum charge and discharge current of the battery, and the accuracy can reach ±0.1A. Bidirectional current can be measured to distinguish between the charge and discharge processes.
[0155] Temperature sensors are set at different locations on the surface of lithium batteries. The timer starts from the first time the lithium battery is put into use and records the cumulative use time of the lithium battery. High-precision sensors are used, and the collection frequency is set according to the battery characteristics. Combined with wired and wireless communication methods, it ensures real-time and accurate data transmission.
[0156] Preferably, a thermistor or thermocouple is used to monitor the battery surface temperature. The measurement range is generally -40°C to 125°C with an accuracy of ±0.5°C. Multiple temperature sensors are placed at different locations of the battery to obtain more comprehensive temperature information, because the temperature distribution of the battery may be uneven during the charging and discharging process. The number of cycles is counted by recording the complete charge and discharge cycle of the battery. Each time the process from full charge to discharge cut-off voltage and then charging back to full charge is completed, the number of cycles is increased by 1.
[0157] During the rapid charge and discharge stage, the voltage and current information of the lithium battery is collected every 0.1 second; during the constant current or constant voltage charge and discharge stage, the collection frequency of the voltage and current of the lithium battery is reduced to once every 1 second.
[0158] Because the temperature changes relatively slowly, the temperature data of the lithium battery is collected every 5 seconds, starting from the time the lithium battery is first put into use, to obtain the usage time information of the lithium battery.
[0159] The number of cycles is counted by recording the complete charge and discharge cycle of the battery. The number of cycles is increased by 1 each time the battery is charged from a fully charged state to a discharge cut-off voltage and then charged back to a fully charged state.
[0160] More preferably, high-speed RS485 or CAN bus is used for data transmission, which has the advantages of strong anti-interference ability, long transmission distance (RS485 can reach 1200 meters, CAN bus can reach 10 kilometers), high data transmission rate (RS485 can reach up to 10Mbps, CAN bus can reach up to 1Mbps), etc., and is suitable for scenes with high reliability requirements such as industrial sites.
[0161] Alternatively, Wi-Fi or Bluetooth technology can be used for data transmission. Wi-Fi has a high transmission rate and is suitable for fast transmission of large amounts of data. Bluetooth has the characteristics of low power consumption and convenient connection, and is suitable for some portable devices that have power consumption requirements. For example, Wi-Fi can use the 802.11n protocol with a transmission rate of up to 300Mbps, and Bluetooth can use the low-power Bluetooth (BLE) version with a data transmission rate of about 1Mbps.
[0162] In a preferred embodiment of the present invention, a hybrid deep learning model is provided in the processing module, such as Figure 2 As shown, the hybrid deep learning model includes an input layer, a convolutional layer, a pooling layer, a CNN fully connected layer, a first LSTM layer, a second LSTM layer, an LSTM fully connected layer and an output layer, which are connected in sequence.
[0163] The present invention can improve prediction accuracy: by combining convolutional neural networks and long short-term memory networks, it can fully extract the spatiotemporal characteristics of battery operation data and better capture the changing laws of battery performance, thereby significantly improving the accuracy of battery life and fault prediction. Compared with the existing technology, the prediction error can be reduced by more than 8%.
[0164] Enhanced model adaptability: The deep learning model has powerful automatic feature learning capabilities and can adapt to lithium battery data of different types and working conditions. There is no need to make complex model adjustments for each battery and working condition, which greatly improves the versatility and practicality of the model.
[0165] Realize early fault warning: Real-time analysis of battery data based on deep learning models can promptly detect slight changes in battery performance and predict potential faults in advance, providing users with enough time to take maintenance measures and effectively avoiding equipment downtime and safety accidents caused by battery failure.
[0166] Reduce maintenance costs: Accurate life prediction and timely fault warning help optimize battery usage and maintenance strategies, reasonably arrange battery replacement and repair time, reduce unnecessary maintenance operations, and thus reduce the overall maintenance cost of the battery system.
[0167] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0168] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A method for predicting the life and failure of lithium batteries for new energy vehicles based on deep learning, characterized in that: The steps include: Collect the voltage, current, temperature, cycle number and usage time data set of new energy vehicle lithium batteries during driving, and perform preprocessing; Based on the convolutional neural network (CNN) and the long short-term memory (LSTM) network, a hybrid deep learning model is constructed, in which CNN is used to extract spatial features from lithium battery data, and LSTM is used to process the time series features of the lithium battery usage process; The preprocessed data set is divided into a training set and a test set, and the training parameters are set. The Adam optimization algorithm is used to train the hybrid deep learning model to obtain the optimized hybrid deep learning model. The voltage, current, temperature, number of cycles and usage time of the lithium battery to be predicted are collected, input into the optimized hybrid deep learning model after preprocessing, and the lithium battery life and fault prediction results are output.
2. The method for predicting the life and failure of lithium batteries for new energy vehicles based on deep learning according to claim 1, characterized in that: The method for preprocessing the collected data of voltage, current, temperature, number of cycles and usage time of lithium batteries is as follows: Outlier processing: Identify and remove outliers by setting a reasonable threshold range. For voltage data, if the voltage value at a certain moment exceeds the normal charging and discharging voltage range, the data point is marked as an outlier and replaced with the average value of adjacent data points. For current data, if the current value exceeds 1.5 times the maximum allowable charge and discharge current of the battery, it is also regarded as an abnormal value and is also replaced; Missing value processing: If a small amount of data is missing during the data collection process, linear interpolation is used to supplement it. If the current data at a certain moment in the time series is missing, the current value at the missing moment is calculated through a linear function based on the current values at the two moments before and after it; Filtering: Based on the sliding average filtering algorithm, for the voltage and current data, a sliding window with a length of 5 is used for average filtering. Assuming that the original voltage data sequence is V = [v1, v2, v3, v4, v5, v6, ...], the voltage data sequence V′[i] after sliding average filtering is: Wherein, i, j represent the serial number of the original voltage data; Normalization: Minimum-maximum normalization: Normalize the voltage, current, temperature, number of cycles and usage time information data to the [0,1] interval. Let the original data be x and the normalized data be x′, which is: Among them, min(x) and max(x) are the minimum and maximum values in the original data respectively.
3. The method for predicting the life and failure of lithium batteries for new energy vehicles based on deep learning according to claim 1, characterized in that: The convolutional neural network CNN includes: Convolutional Layer: Convolution kernel settings: Three one-dimensional convolution kernels of different sizes are used, namely 3, 5 and 7, to extract features at different time scales. The number of each convolution kernel is 32, the step size is 1, and the padding mode is 'same' to ensure that the length of the output feature map is the same as the length of the input data; Activation function: The convolutional layer is followed by the ReLU activation function. The ReLU function is defined as f(x) = max(0, x), that is, for each element of the input, the maximum value is 0 and the element itself, where x is the original data; Max Pooling Layer: Add a maximum pooling layer after the convolution layer, with a pooling window size of 2 and a step size of 2. The maximum pooling operation can be used to downsample the feature map; Fully connected layer: Feature fusion and dimensionality reduction: The multiple feature maps after the pooling layer are expanded and spliced, and then passed through a fully connected layer for feature fusion and dimensionality reduction. The number of neurons in the fully connected layer is 64, and a linear activation function is used, that is, the input feature vector is multiplied by the weight matrix and then directly output without nonlinear transformation.
4. The method for predicting the life and failure of lithium batteries for new energy vehicles based on deep learning according to claim 1, characterized in that: The long short-term memory network LSTM includes an LSTM unit structure and an LSTM network structure. The LSTM unit structure includes: Input gate: controls the input of new information, which is: i t =σ(W i ·[h t-1 ,x t ]+b i ) Among them, i t is the output of the input gate at time t, σ is the sigmoid function, which compresses the output value to the interval [0,1], and W i is the weight matrix of the input gate, h t-1 is the hidden state at the previous moment, x t is the input feature at the current moment, b i is the bias term; Forget gate: decides whether to keep or forget the memory information of the previous moment, which is: f t =σ(W f ·[h t-1 ,x t ]+b f ) Among them, f t is the output of the forget gate at time t, W f and b f They are the weight matrix and bias term of the forget gate respectively; Output gate: controls the output value at the current moment, which is: the t =σ(W o ·[h t-1 ,x t ]+b o ) Among them, t is the output of the output gate at time t, W o and b o They are the weight matrix and bias term of the output gate respectively; Memory unit: Update the information of the memory unit to: in, is the candidate memory cell value at the current moment, which is transformed nonlinearly through the tanh function. t is the memory cell value at the current moment, ⊙ represents element-wise multiplication, i.e., corresponding elements are multiplied; W C and b C is the weight matrix and bias term of the memory unit; Hidden state: Calculate the hidden state h at the current moment based on the memory unit and output gate t ,for: h t =o t ⊙tanh(C t ); The LSTM network structure includes: Number of stacking layers: A 2-layer LSTM stacking structure is used. The input of the first layer LSTM is the feature vector output by CNN, with a dimension of 64 and a hidden state dimension of 32. The input of the second layer LSTM is the output of the first layer, and the hidden state dimension is also 32. Fully connected layer and output: A fully connected layer is connected after the LSTM layer to map the hidden state of the LSTM output to the final output dimension. For the remaining battery life prediction, the number of neurons in the fully connected layer is 1, and the linear activation function is used to directly output the predicted remaining life value; for the fault probability prediction, the number of neurons in the fully connected layer is 1, and the output value is compressed to the [0,1] interval through the sigmoid activation function as the predicted value of the fault probability.
5. The method for predicting the life and failure of lithium batteries for new energy vehicles based on deep learning according to claim 1, characterized in that: The steps to train the hybrid deep learning model and obtain the optimized hybrid deep learning model are as follows: The preprocessed lithium battery dataset is divided into training set, test set and validation set in a ratio of 70:15:15; For the remaining battery life prediction, the mean square error MSE is used as the loss function, which is: Where n is the number of samples, y i is the true remaining life value of the i-th sample, is the remaining life value predicted by the model; For fault probability prediction, binary cross entropy BCE is used as the loss function, which is: Among them, i1 is the sample number, y i1 is the true fault label of the i1th sample, 0 means no fault, 1 means fault, is the failure probability value predicted by the model; The Adam optimization algorithm is used, and its parameters are set as follows: the initial value of the learning rate is 0.001, the exponential decay rate of the gradient first-order moment estimate β1 = 0.9, the exponential decay rate of the gradient second-order moment estimate β2 = 0.999, and the constant ∈ = 1e-8. The Adam optimization algorithm dynamically adjusts the learning rate of each parameter according to the first-order moment estimate and the second-order moment estimate of the gradient during the training process. The specific update is: m k =β1m k-1 +(1-β1)g k Among them, m k and v k are the first-order moment estimate and the second-order moment estimate of the gradient, respectively. and is its revised estimate, g k is the gradient of the current iteration, θ k is the model parameter, α is the learning rate, and k is the number of iterations; Using the Early Stopping method, during the training process, the loss function value is calculated on the validation set every 10 epochs. If the validation set loss function value does not decrease for 5 consecutive epochs, the training is stopped and the parameters of the current model are saved as the final model.
6. A new energy vehicle lithium battery life and fault prediction system based on deep learning, characterized in that: It includes a data acquisition module and a processing module, wherein the data acquisition module is used to collect the voltage, current, temperature, number of cycles and usage time data set of the lithium battery and the voltage, current, temperature, number of cycles and usage time information of the lithium battery to be predicted; The input end of the processing module is connected to the output end of the data acquisition module, and the processing module executes the method described in any one of claims 1-5 to perform lithium battery life and fault prediction.
7. The deep learning-based new energy vehicle lithium battery life and fault prediction system according to claim 6, characterized in that: The data acquisition module includes a voltage sensor, a current sensor, a temperature sensor and a timer; The voltage sensor is used to collect the terminal voltage of the lithium battery during the charging and discharging process, and the current sensor is used to collect the charging and discharging current of the lithium battery; The temperature sensors are arranged at a plurality of different positions on the surface of the lithium battery, and the timer starts timing from the time when the lithium battery is first put into use, and records the accumulated use time of the lithium battery.
8. The deep learning-based new energy vehicle lithium battery life and fault prediction system according to claim 6, characterized in that: A hybrid deep learning model is provided in the processing module, and the hybrid deep learning model includes an input layer, a convolution layer, a pooling layer, a CNN fully connected layer, a first LSTM layer, a second LSTM layer, an LSTM fully connected layer and an output layer connected in sequence.
Citation Information
Cited By
Lithium battery abnormity identification method based on multivariate signal reconstruction
CN120028702A
A method for abnormal recognition of lithium batteries based on multi-source signal reconstruction
CN120028702B
Method and system for predicting fatigue life of compressed air energy storage cavern and storage equipment
CN120337801A
Method and device for predicting remaining service life of lithium battery
CN120370199A
Lithium ion battery temperature prediction based on hybrid model ConvLSTM-NARX
CN120671562A