A method for predicting the remaining useful life of a battery based on the MTCN algorithm

Through the multi-channel time convolution network model based on the MTCN algorithm, problems such as data acquisition difficulty, modeling difficulty and gradient disappearance in the remaining life prediction of lithium-ion batteries are solved, and more accurate and reliable life prediction is achieved.

CN114660495BActive Publication Date: 2025-06-13SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210103427.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-27
Publication Date
2025-06-13
Estimated Expiration
2042-01-27

AI Technical Summary

Technical Problem

The existing lithium-ion battery residual life prediction methods have problems such as difficulty in obtaining data, modeling difficulties, large calculation volume, and disappearance or explosion of gradients. Most algorithms can only perform point estimation and lack credible general range prediction.

Method used

A battery residual life prediction method based on the MTCN algorithm is proposed. By acquiring the battery data set, a multi-channel time convolution network model is constructed, data preprocessing and model training is performed, and the multi-channel time convolution network model is used to predict the remaining life.

Benefits of technology

This method can effectively process multi-channel input through a multi-channel time convolution network model, avoid gradient disappearance or explosion, provide more accurate residual life prediction, and impart uncertain expression of prediction results through sampling, enhancing the persuasiveness and reference significance of prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114660495B_ABST
    Figure CN114660495B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for predicting the remaining life of a battery based on the MTCN algorithm. The method includes the following steps: obtaining a battery dataset; constructing a multi-channel temporal convolutional network model; preprocessing the data in the battery dataset; training the multi-channel temporal convolutional network model to obtain a trained multi-channel temporal convolutional network model; and using the multi-channel temporal convolutional network model to predict the remaining life. Most remaining life prediction methods are point estimations, and the present invention is also a point estimation. A single several prediction starting points cannot fully illustrate the quality of the prediction performance. Therefore, the present invention endows the ability of uncertainty expression through sampling, so that the prediction result is more persuasive and has more reference significance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of lithium-ion batteries, and particularly relates to a method for predicting the remaining life of a battery based on the MTCN algorithm. Background Art

[0002] Lithium-ion batteries are widely used due to their advantages of high energy density, low cost, and long life, and are commonly used in scenarios such as manned spaceflight, electric vehicles, and power systems.

[0003] The Battery Management System (BMS) also needs to understand the health of the battery for consistent coordination management. Therefore, the health management and life prediction of the battery are important issues in the field of battery technology.

[0004] The assessment of the State of Health (SOH) of the battery is a prerequisite for the prediction of the Remaining Useful Life (RUL). For the prediction of the RUL of lithium-ion batteries, there are mainly two methods: model-based and data-driven. Since the former has problems such as difficult modeling, large computational complexity, and hard-to-obtain data, while the latter does not require modeling, data-driven has become the preferred method for RUL prediction. Usually, many scholars will construct a large number of health factors through feature engineering to achieve the SOH assessment of lithium-ion batteries, and then achieve the prediction of RUL. However, it is difficult to obtain data itself, so this method is not conducive to actual operation. In addition, the mathematical essence of the RUL prediction of lithium-ion batteries is a typical time series problem. The mainstream solution is to use relevant algorithms of the recursive neural network family. However, when the data volume is large, the gradient disappearance or explosion is likely to occur. Finally, the RUL prediction is not only a point estimate, but also a credible approximate range should be given. Most of the algorithms developed by data-driven only perform point estimates, which have certain fluctuations. However, most algorithms do not study this kind of fluctuation. Only a few algorithms such as RVM, GPR, and PF that use the Bayesian framework can give a confidence interval.

[0005] The time convolutional network has been proposed in the existing literature (Zhou, D., et al., State of Health Monitoring and Remaining Useful Life Prediction of Lithium-ion batteries Based on Temporal Convolutional Network. IEEE Access, 2020. PP(99): p. 1-1.). However, on the one hand, it is applied to the single-channel time series input, with insufficient scalability. On the other hand, since its input is capacity, in practice, the capacity needs to be obtained by the ampere-hour estimation method, which is not easy to obtain and there are cumulative errors, so it is not suitable as an input. Summary of the Invention

[0006] The object of the present invention is to overcome the deficiencies of the existing technology and propose a method for predicting the remaining life of a battery based on the MTCN (Multi-channel Temporal Convolution Network) algorithm.

[0007] The object of the present invention is achieved by at least one of the following technical solutions.

[0008] A method for predicting the remaining life of a battery based on the MTCN algorithm includes the following steps:

[0009] S1. Obtain a battery dataset;

[0010] S2. Construct a multi-channel time convolutional network model;

[0011] S3. Preprocess the data in the battery dataset;

[0012] S4. Train the multi-channel time convolutional network model to obtain a trained multi-channel time convolutional network model;

[0013] S5. Use the multi-channel time convolutional network model to predict the remaining life.

[0014] Further, in step S1, the battery dataset refers to the battery charge and discharge historical monitoring data obtained by carrying out a constant voltage and constant current charge and discharge test according to the standard charge and discharge test configuration file, including voltage, current, and temperature.

[0015] Further, in step S2, it includes the following steps:

[0016] S2.1. Construct a one-dimensional causal convolutional network;

[0017] S2.2. Construct a dilated convolution on the basis of the one-dimensional causal convolutional network;

[0018] S2.3. Perform residual connection;

[0019] S2.4. Construct a multi-channel temporal convolutional network model.

[0020] Furthermore, in step S2.1, a temporal convolutional network is constructed using a one-dimensional fully convolutional neural network (FCN);

[0021] The mathematical expression of a single-layer one-dimensional fully convolutional neural network is:

[0022] y t = w 1 ·x t+1-k + w 2 ·x t+2-k +… w k ·x t ;

[0023] where k is the length of the convolutional kernel of the first-layer one-dimensional causal convolutional network. When k = 3, y t = w 1 ·x t-2 + w 2 ·x t-1 + w 3 ·x t , where y t is the output corresponding to time t after passing through the single-layer one-dimensional fully convolutional neural network, w k is the k-th element of the convolutional kernel, and x t+1-k is the corresponding value of the k-th element in the convolutional kernel at time t acting on the input time series;

[0024] Furthermore, in step S2.2, based on the single-layer one-dimensional causal convolutional network, the networks are stacked. The output time series of the previous-layer one-dimensional causal convolutional network is used as the input of the next-layer one-dimensional causal convolutional network, and so on, thus forming a deep network. However, this operation of stacking one-dimensional causal convolutional networks is not for a fixed convolutional kernel. Instead, as the number of layers increases, b i - 1 zero elements are inserted between two adjacent elements of the convolutional kernel of the previous-layer one-dimensional causal convolutional network to form the convolutional kernel of the current layer, and its length is (b i - 1)·(k - 1)+ k, where b is the base dilation factor, i is the depth of the stacked one-dimensional causal convolutional network up to the current layer, that is, the number of layers of the one-dimensional causal convolutional network, and k is the length of the convolutional kernel of the first-layer one-dimensional causal convolutional network. Through this operation, the receptive field of the current-layer one-dimensional causal convolutional network, that is, the length of the corresponding input elements of the current-layer one-dimensional causal convolutional network, is rapidly expanded. This operation is called dilated convolution, and the mathematical expression is:

[0025] F(s)=(x*d f)(s); (1)

[0026] d = b i ; (2)

[0027] where f: {0,..., k - 1} is the convolution kernel, d is the dilation factor; f represents the convolution operation, s represents the length of the input sequence; b is the reference dilation factor;

[0028] The receptive field w is then:

[0029]

[0030] where n is the number of layers of the one-dimensional causal convolutional network; in addition, when the values of the reference dilation factor b and the convolution kernel length k are not appropriate, a receptive field with 'holes' will appear, that is, there are elements in the receptive field that are not mapped to future output values. To solve this problem, the values of the reference dilation factor b and the length k of the convolution kernel of the first layer of the one-dimensional causal convolutional network must satisfy the following inequality:

[0031]

[0032] Thus, the minimum number of layers n of the one-dimensional causal convolutional network required to form the deep temporal convolutional network is:

[0033]

[0034] In the formula, represents rounding up;

[0035] To ensure that the output of the temporal convolutional network has the same length as the input of the temporal convolutional network, the input of the temporal convolutional network refers to the time series input to each layer of the temporal convolutional network, and the output of the temporal convolutional network refers to the output time series of each layer of the temporal convolutional network. It is also necessary to introduce a padding operation padding to supplement b i ·(k - 1) zero elements on both the left and right sides of the time series input to each layer of the temporal convolutional network. However, at this time, the length of the time series output by the temporal convolutional network is not equal to the length of the input sequence before the padding operation. It is necessary to remove the right padding part of the time series input to this layer of the temporal convolutional network to ensure that the output of this layer of the temporal convolutional network is the same as the length of the input of this layer of the temporal convolutional network before padding.

[0036] Furthermore, in step S2.3, a residual block includes two parallel branches, namely, a residual branch and a direct mapping branch:

[0037] where the residual branch consists of two one-dimensional causal convolutional networks with the same convolution kernel size and dilation factor and a non-linear mapping (it has been proven in practice that a single layer does not work):

[0038] To standardize the input of the hidden layers, that is, the other intermediate temporal convolutional network layers except the first and the last temporal convolutional network layers (to counteract the problem of gradient explosion), through reparameterization, weight normalization is applied to each one-dimensional causal convolutional network;

[0039] To make the temporal convolutional network more than just an overly complex linear regression model, activation functions need to be added respectively to the tops of the two one-dimensional causal convolutional networks in the residual branch to introduce non-linearity, and ReLU activation is added respectively after the two one-dimensional causal convolutional networks in the residual branch;

[0040] To prevent overfitting and vanishing gradients and accelerate model training, regularization is introduced through dropout operations after each one-dimensional causal convolutional network in each residual block;

[0041] Then the structure of the residual branch is in the form of a series connection of one-dimensional causal convolutional network - weight normalization - non-linear activation - dropout - one-dimensional causal convolutional network - weight normalization - non-linear activation - dropout, and the mathematical expression is denoted as F(x);

[0042] For the direct mapping branch, as the name implies, it directly maps the input to the output. Since there may be a phenomenon of inconsistent number of channels between the input time series and the output time series of the temporal convolutional network, the output and the input cannot be directly added. To solve this problem, 1×1 convolution can be introduced to ensure the same shape of the two tensors, and the mathematical expression is denoted as x;

[0043] The residual block is defined as:

[0044] y = activation(F(x) + x) (6)

[0045] where y is the output vector of the residual block, F(x) F(x) is the residual mapping to be learned, x is the input vector, and F(x) + x reflects the residual connection;

[0046] The residual block obtains longer dependencies by using fewer layers, making the residual block easier to train and converge, and avoiding the problem of vanishing gradients in deep learning models.

[0047] Furthermore, in step S2.4, since the input of the temporal convolutional network is for a single channel, to further make the temporal convolutional network scalable, the temporal convolutional network needs to be adjusted accordingly so that the temporal convolutional network algorithm is applicable to multiple channels, specifically as follows:

[0048] Based on the first-layer one-dimensional causal convolutional network, the convolutional kernel is correspondingly changed to multi-channels, and the number of channels is equal to the dimension of the time series. Through one-dimensional convolution, it extends backward along the time dimension, and performs a product operation on the corresponding position elements, that is, multiplies the input matrix of any time window with the convolutional kernel of the one-dimensional causal convolutional network of the same size, and then sums the multiplication results under different channels at the same moment, so as to obtain a single-channel time series output result. The subsequent one-dimensional causal convolutional network is exactly the same as the single-channel time convolutional network, thus finally completing the construction of the multi-channel time convolutional network model.

[0049] Further, step S3 includes the following steps:

[0050] S3.1. Data cleaning: Since there are phenomena of continuous charging and continuous discharging in the battery dataset, the cycles where continuous charging or continuous discharging occurs are redefined by geometric mean, thus strictly complying with the definition of charge-discharge cycles.

[0051] S3.2. Perform feature engineering to select features.

[0052] S3.3. Standardize the data of the selected features.

[0053] S3.4. Dataset division: Since the dataset includes data on battery failure, and what needs to be predicted is the number of discharges before the battery is about to fail, 50% - 70% of the data in the dataset is taken as the training set, and n samples are taken as the validation set for parameter tuning, while the remaining samples are used for testing.

[0054] S3.5. Prediction evaluation metrics.

[0055] Further, step S3.2 includes the following steps:

[0056] S3.2.1. Feature selection: By programming to visualize the voltage and temperature during the discharge process respectively, it is initially found that the constant current discharge time, the moment of maximum temperature, the total discharge duration, and the number of discharges have a good correlation with the maximum charge-discharge capacity of the lithium-ion battery. The selected features include the constant current discharge time, the moment of maximum temperature, the total discharge duration, and the number of discharges; record the constant current discharge time, the moment of maximum temperature, the total discharge duration, and the number of discharges during each discharge process, thus forming the original time series of each feature, including the constant current discharge time series, the moment of maximum temperature time series, the total discharge duration time series, and the number of discharges time series;

[0057] At the same time, record the maximum charge-discharge capacity of the lithium-ion battery during each charge-discharge process, and constitute the original time series of the maximum charge-discharge capacity of the lithium-ion battery.

[0058] S3.2.2, Correlation Analysis: Obtain the correlation coefficient between the features selected in step S3.2.1 and the maximum charge-discharge capacity of the lithium-ion battery according to the Pearson correlation analysis method;

[0059]

[0060] wherein, is the mean value of each feature X selected in step S3.2.1, X is the original time series of each feature selected in step S3.2.1, is the mean value of the maximum charge-discharge capacity of the lithium-ion battery, Y is the original time series of the maximum charge-discharge capacity of the lithium-ion battery, and ρ X,Y is the correlation coefficient between X and Y selected in step S3.2.1;

[0061] Select the features whose absolute value of the correlation coefficient with the maximum charge-discharge capacity of the lithium-ion battery is above 0.9. In addition, since there is redundancy among different features, that is, a strong correlation phenomenon, it is necessary to calculate the correlation coefficient between every two features. If the correlation coefficient between every two features is greater than 0.95, then select the feature with a higher correlation coefficient with the maximum charge-discharge capacity of the lithium-ion battery, and the other feature is regarded as a redundant feature; otherwise, neither of the two features is discarded.

[0062] Furthermore, in step S3.3, to avoid too large a difference in the order of magnitude and solve the problem of different dimensions, perform z-score standardization on the data obtained in step S3.2 as follows:

[0063]

[0064] wherein, A refers to the original time series of the features selected in step S3.2.2 and the original time series of the maximum charge-discharge capacity of the lithium-ion battery, μ is the mean value of the original time series, σ is the standard deviation of the original time series, is the standardized sequence of the original time series.

[0065] Furthermore, in step S3.5, adopt the mean absolute error MAE (Mean Absolute Error), root mean square error RMSE (Root Mean Error), and remaining useful life prediction error RE (RUL Error) prediction evaluation indicators as follows:

[0066]

[0067]

[0068] RE = RUL predict - RUL true(11)

[0069] α is the α-th cycle, y α is the actual value of the maximum charge-discharge capacity of the lithium-ion battery in the α-th cycle, y predict,α is the predicted value of the maximum charge-discharge capacity of the lithium-ion battery corresponding to the α-th cycle. predict represents the predicted value using the temporal convolutional network algorithm, true is the actual value, and β is the number of samples in the test set. is the mean of y α and RUL predict is the predicted remaining useful life and RUL true is the actual remaining useful life.

[0070] Furthermore, step S4 includes the following steps:

[0071] S4.1. Fix the random seed and determine the benchmark dilation factor, and set the number of iteration epochs to be 50 - 100;

[0072] S4.2. Select the length k of the convolutional kernel of the first-layer one-dimensional causal convolutional network to be 2 - 10, batch the training set according to the batch size, obtain the minimum number of layers n of the one-dimensional causal convolutional network required to form the deep temporal convolutional network according to step S2, and sequentially send the data of each batch into the multi-channel temporal convolutional network model for training;

[0073] S4.3. Use the mean square function as the loss function:

[0074] loss(y α , y predict ) = (y α - y predict ) 2 (12)

[0075] By calculating the loss, further perform backpropagation of the gradient to correct the multi-channel temporal convolutional network model;

[0076] S4.4. Verify the multi-channel temporal convolutional network model that has undergone training on the validation set and draw the curve of the loss changing with the epoch, that is, the loss curve. When the loss curve converges, record the configuration parameters and change the convolutional kernel size;

[0077] S4.5. Repeat steps S4.1 - S4.4 until the loss of the multi-channel temporal convolutional network model on the validation set is minimized;

[0078] S4.6. Use the early stopping technique to terminate the training in advance to obtain the trained multi-channel temporal convolutional network model.

[0079] The beneficial technical effects of the present invention are as follows:

[0080] (1) Time series problems are mostly processed using algorithms related to the recurrent neural network family. The proposed temporal convolutional neural network in the present invention provides new ideas and methods, and the temporal series network also has outstanding effects in terms of accuracy and memory;

[0081] (2) Temporal convolutional networks are mostly single-channel, which is not conducive to expansion. Based on the original single-channel, the present invention has been expanded, so that the temporal convolutional network has the practical value of supporting multi-channel input;

[0082] (3) Most remaining useful life prediction methods are point estimates, and the present invention is also a point estimate. A single few prediction starting points cannot fully illustrate the quality of the prediction performance. Therefore, the present invention endows the ability of uncertainty expression through sampling, so that the prediction results are more persuasive and have more reference significance. Brief Description of the Drawings

[0083] Figure 1 It is a schematic diagram of a method for predicting the remaining useful life of a battery based on the MTCN algorithm in an embodiment of the present invention;

[0084] Figure 2 It is a schematic diagram of the aging trend of the B0005 battery dataset in an embodiment of the present invention;

[0085] Figure 3 It is a schematic diagram of the battery discharge voltage in an embodiment of the present invention;

[0086] Figure 4 It is a schematic diagram of the battery discharge temperature in an embodiment of the present invention;

[0087] Figure 5 It is a schematic diagram of a single-channel one-dimensional causal convolution in an embodiment of the present invention;

[0088] Figure 6 It is a schematic diagram of a three-layer causal convolution in an embodiment of the present invention;

[0089] Figure 7 It is a schematic diagram of a two-layer dilated causal convolution in an embodiment of the present invention;

[0090] Figure 8 It is a schematic diagram of the TCN structure in an embodiment of the present invention;

[0091] Figure 9 It is a schematic diagram of promoting a single channel to multiple (two) channels in an embodiment of the present invention;

[0092] Figure 10a It is a schematic diagram of the prediction effects of different algorithms when the prediction starting point of the B0005 battery in an embodiment of the present invention is 80;

[0093] Figure 10bSchematic diagram of the prediction effects of different algorithms when the prediction starting point of the B0005 battery in the embodiment of the present invention is 90;

[0094] Figure 10c Schematic diagram of the prediction effects of different algorithms when the prediction starting point of the B0005 battery in the embodiment of the present invention is 100;

[0095] Figure 10d Schematic diagram of the prediction effects of different algorithms when the prediction starting point of the B0005 battery in the embodiment of the present invention is 110;

[0096] Figure 11a Uncertainty expression of the B0005 battery using the MTCN algorithm in the embodiment of the present invention (prediction starting point is 80);

[0097] Figure 11b Uncertainty expression of the B0005 battery using the MTCN algorithm in the embodiment of the present invention (prediction starting point is 90);

[0098] Figure 11c Uncertainty expression of the B0005 battery using the MTCN algorithm in the embodiment of the present invention (prediction starting point is 100);

[0099] Figure 11d Uncertainty expression of the B0005 battery using the MTCN algorithm in the embodiment of the present invention (prediction starting point is 110). Detailed implementation manners

[0100] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0101] Embodiment 1:

[0102] A method for predicting the remaining life of a battery based on the MTCN algorithm, as Figure 1 shown, includes the following steps:

[0103] S1. Obtain a battery dataset;

[0104] The battery dataset refers to the battery charge and discharge historical monitoring data obtained by conducting a constant voltage and constant current charge and discharge test according to a standard charge and discharge test configuration file, including voltage, current, and temperature.

[0105] In this embodiment, an existing battery dataset provided by NASA is used to conduct a simulation experiment with the battery capacity as the life prediction index. Figure 2 That is, the battery capacity degradation data of the NASA B0005 battery dataset adopted in this embodiment. This battery capacity data is the stored data corresponding to the battery capacity and the cycle number.

[0106] As Figure 3 and Figure 4As shown, they are respectively the schematic diagram of the voltage change curve during the battery discharge process and the schematic diagram of the temperature change curve during the battery discharge process.

[0107] S2. Construct a multi-channel temporal convolutional network model, including the following steps:

[0108] S2.1. Construct a one-dimensional causal convolutional network;

[0109] Use a one-dimensional fully convolutional neural network (FCN) to construct a temporal convolutional network;

[0110] In this embodiment, as Figure 5 and Figure 6 shown, use a one-dimensional fully convolutional neural network (FCN) to construct a temporal convolutional network, where the one-dimensional refers to the direction of convolution, which is performed backward along the passage of time, and the output at any time t depends on the sub-input sequence of the length of the convolutional kernel including the current moment, that is, causal convolution, so as to ensure that the prediction of the previous time step does not use future information. Combining the two characteristics of one-dimensional and causal, it is called one-dimensional causal convolution.

[0111] The mathematical expression form of a single-layer one-dimensional fully convolutional neural network is:

[0112] y t = w 1 ·x t+1-k + w 2 ·x t+2-k +… w k ·x t ;

[0113] where k is the length of the convolutional kernel of the first-layer one-dimensional causal convolutional network. When k = 3, y t = w 1 ·x t-2 + w 2 ·x t-1 + w 3 ·x t , where y t is the output corresponding to time t after passing through the single-layer one-dimensional fully convolutional neural network, w k is the kth element of the convolutional kernel, and x t+1-k is the corresponding value of the kth element in the convolutional kernel acting on the input time series at time t. In this embodiment, PyTorch is an excellent deep learning programming framework, and this function can be implemented through the "torch.nn.Conv1d" command.

[0114] S2.2. Construct dilated convolution on the basis of the one-dimensional causal convolutional network;

[0115] In this embodiment, as Figure 6 and Figure 7As shown, based on a single-layer one-dimensional causal convolutional network, the networks are stacked. The output time series of the previous layer of the one-dimensional causal convolutional network is used as the input of the next layer of the one-dimensional causal convolutional network. The convolutional kernel size corresponding to each layer of the one-dimensional causal convolutional network is 2. After 3 layers of stacking, an output with a receptive field of 4 is obtained, and so on, thus forming a deep network. However, this operation of stacking convolutional layers is not for a fixed convolutional kernel. Instead, as the number of layers increases, on the basis of the convolutional kernel length of the previous layer of the one-dimensional causal convolutional network, b i -1 zero elements are inserted between two adjacent elements of the convolutional kernel of the previous layer of the one-dimensional causal convolutional network, thus forming the convolutional kernel of the current layer, whose length is (b i -1)·(k - 1) + k, where b is the base dilation factor, i is the depth stacked up to the current layer of the one-dimensional causal convolutional network, that is, the number of layers of the one-dimensional causal convolutional network, and k is the length of the convolutional kernel of the first layer of the one-dimensional causal convolutional network. Through this operation, the receptive field of the current layer of the one-dimensional causal convolutional network, that is, the length of the corresponding input elements of the current layer of the one-dimensional causal convolutional network, is quickly expanded. This operation is called dilated convolution, and the mathematical expression is:

[0116] F(s) = (x * d f)(s); (1)

[0117] d = b i ; (2)

[0118] where f: {0,..., k - 1} is the convolutional kernel, d is the dilation factor; f represents the convolution operation, s represents the input sequence length; b is the base dilation factor;

[0119] And the receptive field w is:

[0120]

[0121] where n is the number of layers of the one-dimensional causal convolutional network. In addition, when the values of the base dilation factor b and the convolutional kernel length k are not appropriate, a receptive field with 'holes' will appear, that is, there are elements in the receptive field that are not mapped to future output values. To solve this problem, the values of the base dilation factor b and the convolutional kernel length k must satisfy the following inequality:

[0122]

[0123] Thus, the minimum number of layers n of the one-dimensional causal convolutional network required to form a deep temporal convolutional network is obtained as:

[0124]

[0125] In the formula, represents rounding up;

[0126] To ensure that the output of the temporal convolutional network has the same length as the input of the temporal convolutional network, where the input of the temporal convolutional network refers to the time series input to each layer of the temporal convolutional network, and the output of the temporal convolutional network refers to the output time series of each layer of the temporal convolutional network, it is also necessary to introduce a padding operation. b i ·(k - 1) zeros are added to both the left and right sides of the time series input to each layer of the temporal convolutional network. However, at this time, the length of the time series output by the temporal convolutional network is not equal to the length of the input sequence before the padding operation. By removing the right padding part of the time series input to this layer of the temporal convolutional network, it is possible to ensure that the output of this layer of the temporal convolutional network is the same as the length of the input to this layer of the temporal convolutional network before padding.

[0127] S2.3. Perform residual connection;

[0128] In this embodiment, combined with Figure 8 , a residual block includes two parallel branches, namely the residual branch and the direct mapping branch:

[0129] Among them, the residual branch consists of two one-dimensional causal convolutional networks with the same convolutional kernel size and dilation factor and a non-linear mapping (it has been proven in practice that a single layer does not work):

[0130] To normalize the input of the hidden layers, that is, the other intermediate temporal convolutional network layers except the first and the last temporal convolutional network layers (to counteract the problem of gradient explosion), through reparameterization, the weight normalization is applied to each convolutional layer. In this embodiment, the output of each layer of the network in step S2.2 is normalized by the torch.nn.utils.weight_norm command;

[0131] To make the temporal convolutional network more than just an overly complex linear regression model, activation functions need to be added respectively to the tops of the two one-dimensional causal convolutional networks in the residual branch to introduce non-linearity, and ReLU activation is added respectively after the two one-dimensional causal convolutional networks in the residual branch. In this embodiment, it is implemented through torch.nn.ReLU.

[0132] To prevent overfitting and gradient vanishing and accelerate model training, regularization is introduced through dropout operation after each one-dimensional causal convolutional network in each residual block. In this embodiment, it is implemented through torch.nn.Dropout;

[0133] Then the structure of the residual branch is a series form of one-dimensional causal convolutional network - weight normalization - non-linear activation - dropout - one-dimensional causal convolutional network - weight normalization - non-linear activation - dropout, and its mathematical expression form is denoted as F(x);

[0134] For the direct mapping branch, as the name implies, the input is directly mapped to the output. Since there may be a phenomenon of inconsistent number of channels between the input time series and the output time series of the temporal convolutional network, the output and the input cannot be directly added. To solve this problem, a 1×1 convolution can be introduced to ensure that the shapes of the two tensors are the same, and the mathematical expression is denoted as x;

[0135] The residual block is defined as:

[0136] y = activation(F(x) + x) (6)

[0137] Among them, y is the output vector of the residual block, F(x) is the residual mapping to be learned, x is the input vector, and F(x) + x reflects the residual connection;

[0138] The residual block obtains a long dependence relationship by using fewer layers, making the residual block easier to train and converge, and avoiding the problem of gradient disappearance in the deep learning model.

[0139] S2.4. Construct a multi-channel temporal convolutional network model;

[0140] Since the input of the temporal convolutional network is for a single channel, to further make the temporal convolutional network scalable, the temporal convolutional network needs to be adjusted accordingly so that the temporal convolutional network algorithm is applicable to multiple channels. The specific steps are as follows:

[0141] Based on the first layer of one-dimensional causal convolutional network, the convolutional kernel is also changed to multi-channel accordingly, and the number of its channels is equal to the dimension of the time series. Through one-dimensional convolution, it extends backward along the time dimension, and performs a product operation on the corresponding position elements, that is, multiplies the input matrix of any time window with the convolutional kernel of the one-dimensional causal convolutional network of the same size, and then sums the dot product results under different channels at the same moment to obtain a single-channel time series output result. The subsequent one-dimensional causal convolutional network is exactly the same as the single-channel temporal convolutional network, thus finally completing the construction of the multi-channel temporal convolutional network model, as Figure 9 shown.

[0142] S3. Preprocess the data in the battery dataset, including the following steps:

[0143] S3.1. Data cleaning: In this embodiment, since there are phenomena of continuous charging and continuous discharging in the NASA data, the cycles where continuous charging or continuous discharging occurs are redefined by the geometric mean method, so as to strictly comply with the definition of charge and discharge cycles;

[0144] S3.2. Perform feature engineering to select features, including the following steps:

[0145] S3.2.1. Feature Selection: By performing visualization operations on the voltage and temperature during the discharge process through programming respectively, it is initially found that the constant current discharge time, the moment of maximum temperature, the total discharge duration, and the number of discharges have a good correlation with the maximum charge-discharge capacity of the lithium-ion battery. The selected features include the constant current discharge time, the moment of maximum temperature, the total discharge duration, and the number of discharges; record the constant current discharge time, the moment of maximum temperature, the total discharge duration, and the number of discharges during each discharge process, so as to form the original time series of each feature, including the constant current discharge time series, the moment of maximum temperature time series, the total discharge duration time series, and the number of discharges time series;

[0146] At the same time, record the maximum charge-discharge capacity of the lithium-ion battery during each charge-discharge process to constitute the original time series of the maximum charge-discharge capacity of the lithium-ion battery;

[0147] S3.2.2. Correlation Analysis: As shown in Table 1, obtain the correlation coefficients between the features selected in step S3.2.1 and the maximum charge-discharge capacity of the lithium-ion battery according to the Pearson correlation analysis method;

[0148]

[0149] Among them, is the mean value of each feature X selected in step S3.2.1, X is the original time series of each feature selected in step S3.2.1, is the mean value of the maximum charge-discharge capacity of the lithium-ion battery, Y is the original time series of the maximum charge-discharge capacity of the lithium-ion battery, and ρ X,Y is the correlation coefficient between X and Y selected in step S3.2.1;

[0150] Select the features whose absolute value of the correlation coefficient with the maximum charge-discharge capacity of the lithium-ion battery is above 0.9. In addition, since there is also redundancy among different features, that is, the phenomenon of strong correlation, it is necessary to calculate the correlation coefficients between pairwise features. If the correlation coefficient between pairwise features is greater than 0.95, then select the feature with a higher correlation coefficient with the maximum charge-discharge capacity of the lithium-ion battery, and the other feature is regarded as a redundant feature; otherwise, neither of the two features is discarded.

[0151] Table 1 Correlation between each feature and capacity

[0152] B0005 B0006 B0007 B0018 Maximum discharge temperature -0.9358 -0.8524 -0.7522 -0.6952 Total discharge time 0.9776 0.9180 0.9280 0.9927 Time at maximum discharge temperature 0.9997 0.9996 0.9989 0.9994 Constant current discharge time 0.9999 0.9705 0.9764 0.9998

[0153] In this embodiment, the correlation between any two indicators is investigated. Through calculation, it is found that the correlations between the constant current discharge time of each battery and the maximum moment of the discharge temperature are 0.9999, 0.9714, 0.9822, and 0.9998 respectively. The two indicators are relatively close. Considering Table 1, it is considered that the constant current discharge time is slightly inferior to the maximum moment of the discharge temperature, so it is excluded. At the same time, the maximum discharge temperature is excluded. Therefore, the total discharge time and the maximum temperature moment are finally selected.

[0154] S3.3. Standardize the selected features;

[0155] To avoid too large a difference in the order of magnitude and solve the problem of different dimensions, perform z-score standardization on the data obtained in step S3.2 as follows:

[0156]

[0157] Among them, A refers to the original time series of the features selected in step S3.2.2 and the original time series of the maximum charge-discharge capacity of the lithium-ion battery, μ is the mean of the original time series, σ is the standard deviation of the original time series, is the standardized series of the original time series.

[0158] S3.4. Dataset division: In this embodiment, since the dataset includes data on battery failure, and what needs to be predicted is the number of discharges before the battery is about to fail, take 50% - 70% of the data in the dataset as the training set, take n samples as the validation set for parameter tuning, and the remaining samples are used for testing, so as to roughly determine 4 prediction starting points, which are the number of discharges 80, 90, 100, and 110 respectively;

[0159] S3.5. Prediction evaluation indicators;

[0160] Adopt the mean absolute error MAE (Mean Absolute Error), root mean square error RMSE (Root Mean Error), and remaining useful life prediction error RE (RUL Error) prediction evaluation indicators respectively, as follows:

[0161]

[0162]

[0163] RE = RUL predict -RUL true (11)

[0164] α is the α-th cycle, y α is the actual value of the maximum charge-discharge capacity of the lithium-ion battery in the α-th cycle, ypredict,α is the predicted value of the maximum charge-discharge capacity of the lithium-ion battery corresponding to the α-th cycle. predict represents the predicted value using the temporal convolutional network algorithm, true is the actual value, β is the number of samples in the test set, is y α mean, RUL predict is the predicted remaining useful life and RUL true is the actual remaining useful life.

[0165] S4. Train the multi-channel temporal convolutional network model to obtain the trained multi-channel temporal convolutional network model, including the following steps:

[0166] S4.1. Fix the random seed and determine the reference dilation factor, and set the number of iterations epoch to 50 - 100; in this embodiment, the default reference dilation factor is 2, and epoch is selected as 100;

[0167] S4.2. Select the length k of the convolutional kernel of the first-layer one-dimensional causal convolutional network to be 2 - 10, and batch the training set according to the batch size. According to step S2, obtain the minimum number of one-dimensional causal convolutional network layers n required to form the deep temporal convolutional network, and send the data of each batch into the multi-channel temporal convolutional network model in turn for training;

[0168] S4.3. Use the mean square function as the loss function. In this embodiment, the function is implemented through the torch.nn.functional.mse_loss programming command:

[0169] loss(y α ,y predict )=(y α -y predict ) 2 (12)

[0170] By calculating the loss, further perform backpropagation of the gradient to correct the multi-channel temporal convolutional network model. In this embodiment, this step is implemented through the backward and optimizer.step programming commands;

[0171] S4.4. Verify the multi-channel temporal convolutional network model that has undergone training on the validation set, and plot the curve of the loss changing with epoch, that is, the loss curve. When the loss curve converges, record the configuration parameters and change the convolutional kernel size; in this embodiment, the key parameter configuration of the multi-channel temporal convolutional network model is shown in Table 2.

[0172] Table 2 Key parameter configuration of the model

[0173] Convolution kernel size Number of network layers Reference expansion factor Optimizer Dropout Learning rate Batch size Stride 3 5 2 Adam 0.2 5e-3 10 1

[0174] S4.5. Repeat steps S4.1 - S4.4 until the loss of the multi-channel temporal convolutional network model on the validation set is minimized;

[0175] S4.6. Use early stopping technology to terminate the training in advance and obtain the trained multi-channel temporal convolutional network model.

[0176] S5. Perform remaining useful life prediction using the multi-channel temporal convolutional network model, including the following steps:

[0177] S5.1. The prediction results of the multi-channel temporal convolutional network model are shown in Table 3.

[0178] Table 3 Evaluation indicators of MTCN prediction effects with different prediction starting points

[0179]

[0180] In Table 3, "none" indicates that the prediction curve exceeds the capacity failure limit or the battery has not failed throughout; the intuitive effects are as shown in Figure 10a 、 Figure 10b 、 Figure 10c and Figure 10d shown;

[0181] S5.2. Comparison of different algorithms;

[0182] Since the mathematical essence of battery life prediction is a time series regression problem, and the most mainstream method for this type of problem is the recursive neural network family algorithm, TCN is selected for comparison with LSTM, GRU, and CNN + LSTM in the recursive neural network family;

[0183] The comparison results are shown in Table 4, and the intuitive effects are as shown in Figure 10a 、 Figure 10b 、 Figure 10c and Figure 10d shown;

[0184] Table 4 Comparison of prediction results of different algorithms

[0185]

[0186] S5.3. Uncertainty expression, including the following steps:

[0187] S5.3.1. Cancel the fixed random seed, resample 100 times, and record the prediction results of 100 times;

[0188] S5.3.2. Calculate the mean and variance of the prediction results, fit them using a normal distribution, and give the confidence interval of the remaining useful life prediction results, as shown in Table 5;

[0189] Table 5 Uncertainty Expressions of Prediction Results for Different Batteries with Different Prediction Starting Points

[0190]

[0191] S5.3.3. Plot the prediction curve and the normal distribution curve, as Figure 11a 、 Figure 11b 、 Figure 11c 、 Figure 11d shown. It can be observed that the prediction curve can basically fall well within the confidence interval;

[0192] The present invention has been described in detail above in conjunction with the accompanying drawings and embodiments. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those of ordinary skill in the art, various changes can be made without departing from the spirit of the present invention. The content not described in detail in the present invention can all adopt the prior art.

[0193] Example 2:

[0194] For other batteries of the same type under the same working conditions, the relevant data of the battery with operating data obtained under this working condition (such as the total discharge time, the maximum temperature moment, and the corresponding discharge capacity under each cycle) can be used. The total discharge time and the maximum temperature moment are used as the inputs of the multi-channel time convolutional network. Different from Example 1, according to the maximum charge-discharge capacity of the lithium-ion battery, the number of remaining cycle lives is obtained and used as the output (label), so as to predict the remaining cycle life.

[0195] Example 3:

[0196] The output of Example 3 is the same as that of Example 2. The difference is that Example 3 selects the total discharge time or the maximum temperature moment obtained in consecutive r cycles (r is determined through training) as the inputs of r channels. Therefore, Example 3 can be applied to different working conditions.

[0197] The above embodiments are preferred embodiments of the present invention. However, the embodiments of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement methods and are all included in the protection scope of the present invention.

Claims

1. A method for predicting the remaining useful life of a battery based on the MTCN algorithm, characterized in that, it includes the following steps: S1. Obtain a battery dataset; The battery dataset refers to the battery charge and discharge historical monitoring data obtained by carrying out a constant voltage and constant current charge and discharge test according to a standard charge and discharge test configuration file, including voltage, current, and temperature; S2. Construct a multi-channel temporal convolutional network model, including the following steps: S2.

1. Construct a one-dimensional causal convolutional network; Use a one-dimensional fully convolutional neural network to construct a temporal convolutional network; The mathematical expression form of a single-layer one-dimensional fully convolutional neural network is: y t = w 1 · x t+1-k + w 2 · x t+2-k + … w k · x t ; Among them, k is the length of the convolutional kernel of the first-layer one-dimensional causal convolutional network, where y t is the output corresponding to the t-th moment after passing through the single-layer one-dimensional fully convolutional neural network, w k is the k-th element of the convolutional kernel, x t+1-k is the corresponding value of the k-th element in the convolutional kernel at the t-th moment acting on the input time series; S2.

2. Construct a dilated convolution based on the one-dimensional causal convolutional network; Based on the single-layer one-dimensional causal convolutional network, the networks are stacked. The output time series of the previous one-dimensional causal convolutional network is used as the input of the next one-dimensional causal convolutional network, and so on, thus forming a deep network. Based on the convolutional kernel length of the previous one-dimensional causal convolutional network, b i -1 zero elements are inserted between two adjacent elements of the convolutional kernel of the previous one-dimensional causal convolutional network, thus forming the convolutional kernel of the current layer, whose length is (b i -1)·(k - 1)+k, where b is the base dilation factor, i is the depth stacked up to the current one-dimensional causal convolutional network, that is, the number of layers of the one-dimensional causal convolutional network, and k is the length of the convolutional kernel of the first one-dimensional causal convolutional network. Through dilated convolution, the receptive field of the current one-dimensional causal convolutional network is rapidly expanded, that is, the length of the corresponding input elements of the current one-dimensional causal convolutional network; The receptive field w is as follows: where d = b i ; d is the dilation factor; b is the reference dilation factor; n is the number of layers of the one-dimensional causal convolutional network; the values of the reference dilation factor b and the length k of the convolutional kernel of the first layer of the one-dimensional causal convolutional network must satisfy the following inequality: Thus, the minimum number of layers n of the one-dimensional causal convolutional network required to form a deep temporal convolutional network is obtained as: In the formula, represents rounding up; To ensure that the output of the temporal convolutional network has the same length as the input of the temporal convolutional network, where the input of the temporal convolutional network refers to the time series input to each layer of the temporal convolutional network, and the output of the temporal convolutional network refers to the output time series of each layer of the temporal convolutional network, it is also necessary to introduce a padding operation. b i ·(k - 1) zeros are added to both the left and right sides of the time series input to each layer of the temporal convolutional network. However, at this time, the length of the time series output by the temporal convolutional network is not equal to the length of the input sequence before the padding operation. By removing the right-side padding part of the time series input to this layer of the temporal convolutional network, it is possible to ensure that the output of this layer of the temporal convolutional network is the same length as the input before padding for this layer of the temporal convolutional network; S2.

3. Perform residual connection; A residual block includes two parallel branches, namely a residual branch and a direct mapping branch: Among them, the residual branch consists of two layers of one-dimensional causal convolutional networks with the same convolutional kernel size and dilation factor and a non-linear mapping: In order to normalize the input of the hidden layer, that is, other intermediate temporal convolutional network layers except the first temporal convolutional network layer and the last temporal convolutional network layer, through reparameterization, the weight normalization is thus applied to each one-dimensional causal convolutional network; Add activation functions to the tops of the two layers of one-dimensional causal convolutional networks in the residual branch to introduce non-linearity, and add ReLU activation after the two layers of one-dimensional causal convolutional networks in the residual branch; Introduce regularization through the dropout operation after each one-dimensional causal convolutional network in each residual block; Then the residual branch includes one-dimensional causal convolutional networks connected in series, weight normalization, non-linear activation, dropout, one-dimensional causal convolutional networks, weight normalization, non-linear activation, and dropout, and the mathematical expression form is denoted as F(x); For the direct mapping branch, as the name implies, it directly maps the input to the output, and introduces a 1×1 convolution to ensure that the shapes of the two tensors are the same; The residual block is defined as: y = activation(F(x) + x) where y is the output vector of the residual block, F(x) is the residual mapping to be learned, x is the input vector, and F(x) + x reflects the residual connection; S2.

4. Construct a multi-channel temporal convolutional network model; S3. Preprocess the data in the battery dataset; S4. Train the multi-channel temporal convolutional network model to obtain a trained multi-channel temporal convolutional network model; S5. Use the multi-channel temporal convolutional network model to predict the remaining useful life.

2. A method for predicting the remaining useful life of a battery based on the MTCN algorithm according to claim 1, characterized in that, When k = 3, y t = w 1 ·x t-2 + w 2 ·x t-1 + w 3 ·x t .

3. A method for predicting the remaining useful life of a battery based on the MTCN algorithm according to claim 1, characterized in that, In step S2.4, since the input of the temporal convolutional network is for a single channel, in order to further make the temporal convolutional network scalable, it is necessary to correspondingly adjust the temporal convolutional network so that the temporal convolutional network algorithm is applicable to multiple channels, specifically as follows: Based on the first-layer one-dimensional causal convolutional network, the convolutional kernel is correspondingly changed to multi-channels, and the number of channels is equal to the dimension of the time series. Through one-dimensional convolution, it extends backward along the time dimension, and performs a product operation on the corresponding position elements, that is, multiplies the input matrix of any time window with the convolutional kernel of the one-dimensional causal convolutional network of the same size, and then sums the multiplication results under different channels at the same moment, so as to obtain a single-channel time series output result. The subsequent one-dimensional causal convolutional network is exactly the same as the single-channel time convolutional network, thus finally completing the construction of the multi-channel time convolutional network model.

4. A method for predicting the remaining battery life based on the MTCN algorithm according to claim 1, characterized in that: Step S3 includes the following steps: S3.

1. Data cleaning: Since there are phenomena of continuous charging and continuous discharging in the battery dataset, the continuous charging or continuous discharging is redefined by the geometric mean method for the cycles where continuous charging and continuous discharging occur, so as to strictly comply with the definition of charge and discharge cycles; S3.

2. Perform feature engineering to select features; S3.

3. Standardize the data of the selected features; S3.

4. Dataset division: Since the dataset includes data on battery failure, and what needs to be predicted is the number of discharges before the battery is about to fail, take the first 50% - 70% of the data in the dataset as the training set, take n samples as the validation set for parameter tuning, and the remaining samples are used for testing; S3.

5. Prediction evaluation index.

5. A method for predicting the remaining battery life based on the MTCN algorithm according to claim 3, characterized in that, Step S3.2 includes the following steps: S3.2.

1. Feature selection: The selected features include constant current discharge time, maximum temperature moment, total discharge duration, and number of discharges; record the constant current discharge time, maximum temperature moment, total discharge duration, and number of discharges during each discharge process, so as to form the original time series of each feature, including the constant current discharge time series, maximum temperature moment time series, total discharge duration time series, and number of discharges time series; At the same time, record the maximum charge-discharge capacity of the lithium-ion battery during each charge-discharge process to constitute the original time series of the maximum charge-discharge capacity of the lithium-ion battery; S3.2.

2. Correlation analysis: Obtain the correlation coefficients between the features selected in step S3.2.1 and the maximum charge-discharge capacity of the lithium-ion battery according to the Pearson correlation analysis method; Among them, is the mean value of each feature X selected in step S3.2.1, where X is the original time series of each feature selected in step S3.2.

1. is the mean value of the maximum charge-discharge capacity of the lithium-ion battery, Y is the original time series of the maximum charge-discharge capacity of the lithium-ion battery, and ρ X,Y is the correlation coefficient between X and Y selected in step S3.2.

1. Select the features whose absolute value of the correlation coefficient with the maximum charge-discharge capacity of the lithium-ion battery is above 0.

9. In addition, since there is also redundancy between different features, that is, a strong correlation phenomenon, it is necessary to calculate the correlation coefficients between pairwise features. If the correlation coefficient between pairwise features is greater than 0.95, then select the feature with a higher correlation coefficient with the maximum charge-discharge capacity of the lithium-ion battery, and the other feature is regarded as a redundant feature; otherwise, neither of the two features is discarded; In step S3.3, to avoid too large a difference in the order of magnitude and solve the problem of different dimensions, perform standard deviation standardization on the data obtained in step S3.2, specifically as follows: Wherein, A refers to the original time series of the features selected in step S3.2.2 or the original time series of the maximum charge-discharge capacity of the lithium-ion battery, μ is the mean value of the original time series, σ is the standard deviation of the original time series, is the series after the original time series is standardized.

6. A method for predicting the remaining battery life based on the MTCN algorithm according to claim 5, characterized in that, in step S3.5, the mean absolute error MAE, root mean square error RMSE, and remaining life prediction error RE prediction evaluation indicators are respectively used, as follows: RE = RUL predict -RUL true α is the α-th cycle, y α is the actual value of the maximum charge-discharge capacity of the lithium-ion battery in the α-th cycle, y predict,α is the predicted value of the maximum charge-discharge capacity of the lithium-ion battery corresponding to the α-th cycle, predict represents the predicted value using the time convolutional network algorithm, true is the actual value, β is the number of test set samples, is the mean of y α and RUL predict are the predicted remaining useful life and RUL true is the actual remaining useful life.

Citation Information

Patent Citations

  • Lithium battery capacity online estimation method based on convolutional neural network

    CN111579993A

  • Lithium battery health state prediction method

    CN112949164A