A method for estimating discharge capacity of lithium batteries without temperature sensor
By using the TCN-GRU model to predict the lithium-ion battery temperature and transformer model to establish a capacity estimation model, the problem of discharge capacity estimation of lithium-ion battery in the absence of temperature sensor is solved, and accurate capacity estimation and battery life management are achieved.
Patent Information
- Application Number
- CN202410502836.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-04-25
AI Technical Summary
The prior art is difficult to accurately estimate the discharge capacity without a temperature sensor in lithium-ion batteries, which affects the energy output characteristics and life management of the battery.
By obtaining the aging data of lithium-ion batteries, the battery temperature is predicted using the TCN-GRU model, the temperature characteristics are extracted, and the capacity estimation model is established in combination with the transformer model to realize the discharge capacity estimation without a temperature sensor.
Accurate estimation of the discharge capacity of lithium-ion batteries without temperature sensors is achieved, reducing the cost of the battery management system and improving the reliability of battery life management.
Smart Images

Figure CN118393361B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lithium battery discharge capacity estimation, and in particular to a method for estimating the discharge capacity of a lithium battery without a temperature sensor. Background Art
[0002] Lithium-ion batteries have the advantages of high energy density, long life, no memory effect and low self-discharge rate, and have become the preferred solution for energy storage systems. Unfortunately, with the use of the battery, the loss of active materials and lithium deposition will inevitably occur, resulting in the gradual attenuation of the life of the lithium-ion battery. The attenuation of the life of the lithium-ion battery is mainly manifested as a decrease in capacity. The decrease in discharge capacity significantly affects the energy output characteristics of the battery. Therefore, accurate and reliable discharge capacity estimation is crucial to battery operation, maintenance and safety. At present, in the process of battery grouping, in order to reduce costs, not every battery is equipped with a temperature sensor, and the obtained battery temperature fails to cover all battery temperatures. Summary of the invention
[0003] 1. Technical issues to be resolved
[0004] In view of the deficiencies in the prior art, the present invention provides a method for estimating the discharge capacity of a lithium battery without a temperature sensor, which has the advantages of being able to accurately estimate the discharge capacity at different temperatures without a temperature sensor being installed on the battery, thereby solving the above technical problems.
[0005] (II) Technical solution
[0006] To achieve the above object, the present invention provides the following technical solution: a method for estimating the discharge capacity of a lithium battery without a temperature sensor, comprising the following steps:
[0007] S1. Obtaining lithium-ion battery aging data: Performing cyclic charge and discharge tests on lithium-ion batteries until the discharge capacity is less than 80% of the nominal capacity, and recording the voltage, current, temperature, state of charge and discharge capacity data of the battery during the charge and discharge process in real time;
[0008] S2. Use the TCN-GRU model to predict temperature. The specific steps are as follows:
[0009] S2.1. Combining the voltage, current and state of charge obtained in step S1 into a temperature prediction factor ;
[0010] S2.2. The temperature prediction factor in step S2.1 And the corresponding temperature form a prediction data set, and the first 70% of the data in the prediction data set is used as the training set, and the last 30% of the data is used as the test set. The specific expression is as follows:
[0011] Training set:
[0012]
[0013] Test set:
[0014]
[0015] in, and Respectively represent the temperature prediction factor and the corresponding predicted temperature in the training set, and Respectively represent the temperature prediction factor and the corresponding predicted temperature in the test set, Represents dimension;
[0016] S2.3. Run the TCN-GRU model using the training set to obtain a trained TCN-GRU model.
[0017] S2.4. Temperature prediction factor Input into the trained TCN-GRU model and output the battery temperature during each charge and discharge cycle;
[0018] S3. Extract the health characteristics during the cyclic charge and discharge process. The specific steps are as follows:
[0019] S3.1, averaging the battery temperature in each charging cycle output in step S2 to obtain the average temperature of the charging cycle;
[0020] S3.2. Construct the battery temperature in each cycle charging process in step S2 into a temperature curve: Use the temperature increment method to convert the temperature curve into a temperature increment curve. The calculation expression for calculating the temperature increment curve is as follows:
[0021]
[0022] in, express The temperature increment at time, express The battery temperature at the moment, express The battery temperature at the moment, represents the sampling interval;
[0023] S3.3, filtering the discrete temperature increment curve, and obtaining a smooth temperature increment curve using an equiripple FIR filter based on the Parks-Mclellan algorithm;
[0024] S3.4, obtaining the peak value of the smoothed temperature increment curve in step S3.3;
[0025] S3.5, the average temperature of the charging process cycle in step S3.1 and the peak value of the smoothed temperature increment curve in step S3.4 are combined to form a battery health factor set The specific expression is as follows:
[0026]
[0027] in, Represents a set of battery health factors, Indicates the average temperature of the charging process cycle, Represents the peak of the smoothed temperature increment curve;
[0028] S3.6. Combine the battery health factors The discharge capacity corresponding to each cycle constitutes a capacity data set, and the capacity data set is divided into a capacity training set and a capacity test set. The specific expression is as follows:
[0029] Capacity training set:
[0030]
[0031] Capacity test set:
[0032]
[0033] in, and Represent the capacity training set and the capacity test set respectively, and are the health factor and the corresponding discharge capacity value in the capacity training set, and are the health factor in the capacity test set and the corresponding discharge capacity value, Represents dimension;
[0034] S4, establish a capacity estimation model through the transformer model;
[0035] S5, optimizing the hyperparameters of the transformer model in step S4 by using an ant colony optimization algorithm;
[0036] S6, using the training set in step S3.6 as input to train the capacity estimation model;
[0037] S7. Input the actually collected health factors into the trained capacity estimation model, output the battery capacity value, and complete the estimation of the available battery capacity.
[0038] As a preferred technical solution of the present invention, the TCN-GRU model in step S2 is composed of a TCN model and a BiGRU model;
[0039] The TCN model consists of causal convolution, dilated convolution and residual block. The residual block includes two dilated causal convolution layers, two ReLU layers, two normalization layers and two dropout layers. The expression of dilated convolution in the TCN model is as follows:
[0040]
[0041] in, represents a one-dimensional sequence input, Represents a dilation factor The dilated convolution operation, represents the filter size, Represents a filter, represents the input sequence, Indicates the direction of the past
[0042] The update equation of the BiGRU model is expressed as follows:
[0043]
[0044]
[0045]
[0046]
[0047] in, Indicates the reset gate at the current moment, represents the input at time t, represents the update gate at the current moment, Indicates the hidden state at the previous moment, Indicates the hidden state at the current moment, Indicates new memory information. , , Represent the weight matrices of the reset gate, update gate, and hidden state, respectively. , , Represent the bias of reset gate, update gate and hidden state respectively, represents the activation function, represents the hyperbolic tangent function;
[0048] The BiGRU model also includes forward propagation GRU units and back propagation GRU units. The specific calculation expressions are as follows:
[0049]
[0050]
[0051]
[0052] in, represents the GRU network, and Respectively expressed as The weight of the forward GRU output and the weight of the reverse GRU output at each moment, Indicates positive output, Indicates reverse output, represents the bias of the output layer.
[0053] As a preferred technical solution of the present invention, the transformer model in step S4 includes an encoder and a decoder, each layer of the encoder is composed of a multi-head self-attention mechanism and a feedforward neural network, and the decoder uses the representation generated by the encoder to generate an output sequence, and each layer of the decoder is composed of a multi-head self-attention mechanism, an encoder-decoder attention mechanism and a feedforward neural network.
[0054] As a preferred technical solution of the present invention, the calculation expression of the self-attention mechanism is as follows:
[0055]
[0056] in, represents the self-attention mechanism, denote the query matrix, key matrix and value matrix respectively, represents the dimension of the key, and the superscript T represents the transpose of the matrix. Represents the normalization function.
[0057] As a preferred technical solution of the present invention, the expression of the feedforward neural network is as follows:
[0058]
[0059] in, represents a feed-forward neural network, represents the linear rectification function, , represents two different weights, , represents two different bias parameters, Represents the ReLU network input.
[0060] Compared with the prior art, the present invention provides a method for estimating the discharge capacity of a lithium battery without a temperature sensor, which has the following beneficial effects:
[0061] The present invention predicts the battery temperature using the TCN-GRU model in the absence of a temperature sensor, then extracts the predicted temperature value to calculate the average temperature of the charging process and the peak value of the temperature increment curve as input, and uses the transformer model to estimate the battery capacity, thereby achieving a more accurate capacity value in the absence of a temperature sensor and reducing the cost of the battery management system. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 is the temperature result predicted by the present invention;
[0063] Figure 2 is an unfiltered temperature increment curve during the implementation of the present invention;
[0064] Figure 3 is a temperature increment curve after filtering during the implementation of the present invention;
[0065] Figure 4 is a comparison curve between the capacity value obtained by implementing the present invention and the actual capacity value;
[0066] Figure 5 It is the error curve obtained by implementing the present invention.
[0067] Figure 6 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0069] See also Figure 1-6 , a method for estimating the discharge capacity of a lithium battery without a temperature sensor, comprising the following steps:
[0070] S1. Obtaining lithium-ion battery aging data: Performing cyclic charge and discharge tests on lithium-ion batteries until the discharge capacity is less than 80% of the nominal capacity, and recording the voltage, current, temperature, state of charge and discharge capacity data of the battery during the charge and discharge process in real time;
[0071] S2. Use the TCN-GRU model to predict temperature. The specific steps are as follows:
[0072] S2.1. Combining the voltage, current and state of charge obtained in step S1 into a temperature prediction factor ;
[0073] S2.2. The temperature prediction factor in step S2.1 And the corresponding temperature form a prediction data set, and the first 70% of the data in the prediction data set is used as the training set, and the last 30% of the data is used as the test set. The specific expression is as follows:
[0074] Training set:
[0075]
[0076] Test set:
[0077]
[0078] in, and Respectively represent the temperature prediction factor and the corresponding predicted temperature in the training set, and Respectively represent the temperature prediction factor and the corresponding predicted temperature in the test set, Represents dimension;
[0079] S2.3. Run the TCN-GRU model using the training set to obtain a trained TCN-GRU model.
[0080] S2.4. Temperature prediction factor Input into the trained TCN-GRU model and output the battery temperature during each charge and discharge cycle;
[0081] The TCN-GRU model in step S2 consists of a TCN model and a BiGRU model;
[0082] The TCN model consists of causal convolution, dilated convolution and residual blocks. The causal convolution is used to prevent information leakage. The residual block includes two dilated causal convolution layers, two ReLU layers, two normalization layers and two dropout layers. The expression of dilated convolution in the TCN model is as follows:
[0083]
[0084] in, represents a one-dimensional sequence input, Represents a dilation factor The dilated convolution operation, represents the filter size, Represents a filter, represents the input sequence, Indicates the past direction. The acceptance field can be increased by increasing the dilation factor. The value of the dilation factor is generally set to ;
[0085] The update equation of the BiGRU model is expressed as follows:
[0086]
[0087]
[0088]
[0089]
[0090] in, Indicates the reset gate at the current moment, represents the input at time t, represents the update gate at the current moment, Indicates the hidden state at the previous moment, Indicates the hidden state at the current moment, Indicates new memory information. , , Represent the weight matrices of the reset gate, update gate, and hidden state, respectively. , , Represent the bias of reset gate, update gate and hidden state respectively, represents the activation function, represents the hyperbolic tangent function;
[0091] The BiGRU model also includes forward propagation GRU units and back propagation GRU units. The specific calculation expressions are as follows:
[0092]
[0093]
[0094]
[0095] in, represents the GRU network, and Respectively expressed as The weight of the forward GRU output and the weight of the reverse GRU output at each moment, Indicates positive output, Indicates reverse output, Represents the bias of the output layer. The output of Bi-GRU is related to the forward GRU hidden state, and the reverse GRU hidden state is related to the input at the moment.
[0096] S3. Extract the health characteristics during the cyclic charge and discharge process. The specific steps are as follows:
[0097] S3.1, averaging the battery temperature in each charging cycle output in step S2 to obtain the average temperature of the charging cycle;
[0098] S3.2. Construct the battery temperature in each cycle charging process in step S2 into a temperature curve: Use the temperature increment method to convert the temperature curve into a temperature increment curve. The calculation expression for calculating the temperature increment curve is as follows:
[0099]
[0100] in, express The temperature increment at time, express The battery temperature at the moment, express The battery temperature at the moment, represents the sampling interval;
[0101] S3.3, filtering the discrete temperature increment curve, and obtaining a smooth temperature increment curve using an equiripple FIR filter based on the Parks-Mclellan algorithm;
[0102] S3.4, obtaining the peak value of the smoothed temperature increment curve in step S3.3;
[0103] S3.5, the average temperature of the charging process cycle in step S3.1 and the peak value of the smoothed temperature increment curve in step S3.4 are combined to form a battery health factor set The specific expression is as follows:
[0104]
[0105] in, Represents a set of battery health factors, Indicates the average temperature of the charging process cycle, Represents the peak of the smoothed temperature increment curve;
[0106] S3.6. Combine the battery health factors The discharge capacity corresponding to each cycle constitutes a capacity data set, and the capacity data set is divided into a capacity training set and a capacity test set. The specific expression is as follows:
[0107] Capacity training set:
[0108]
[0109] Capacity test set:
[0110]
[0111] in, and Represent the capacity training set and the capacity test set respectively, and are the health factor and the corresponding discharge capacity value in the capacity training set, and are the health factor in the capacity test set and the corresponding discharge capacity value, Represents dimension;
[0112] S4, establish a capacity estimation model through the transformer model;
[0113] The transformer model in step S4 includes an encoder and a decoder. Each layer of the encoder consists of a multi-head self-attention mechanism and a feedforward neural network. The self-attention mechanism allows the encoder to dynamically focus on different parts of the input sequence when generating each representation, while the feedforward neural network is used to perform nonlinear transformation on the representation at each position.
[0114] The decoder uses the representation generated by the encoder to generate the output sequence. Each layer of the decoder consists of a multi-head self-attention mechanism, an encoder-decoder attention mechanism, and a feedforward neural network. The encoder-decoder attention mechanism allows the decoder to pay weighted attention to different parts of the input sequence when generating the representation of each position to help generate the correct output;
[0115] The calculation expression of the self-attention mechanism is as follows:
[0116]
[0117] in, represents the self-attention mechanism, denote the query matrix, key matrix and value matrix respectively, represents the dimension of the key, and the superscript T represents the transpose of the matrix. Represents the normalization function.
[0118]
[0119] in, represents a feed-forward neural network, represents the linear rectification function, , represents two different weights, , represents two different bias parameters, Represents the ReLU network input.
[0120] S5, optimizing the hyperparameters of the transformer model in step S4 by using an ant colony optimization algorithm;
[0121] The specific steps of the ant colony optimization algorithm are as follows
[0122] S5.1. Initialization: Set the number of ants to , Iterations , pheromone volatility coefficient , pheromone initial value and heuristic information weight Initialize the pheromone concentration for each path (i, j)
[0123] S5.2. Construct solution space (performed by each ant): For each ant, starting from the starting city, the probability of going to the next city j is calculated according to the path selection probability formula:
[0124] P i j k ( t ) = [ τ i j ( t ) ] α ⋅ [ η i j ] β ∑ s ∈ a l l o w e d . [ τ i s ( t ) ] α ⋅ [ η i s ] β
[0125] The next city is selected according to the selection probability until the ant completes the construction of the entire path.
[0126] S5.3. Local update of pheromone (after each ant completes path construction): For each path (i, j) that ant k passes through, update the pheromone concentration according to the local update rule:
[0127]
[0128] in is the pheromone increment left by ant k on path (i, j).
[0129] S5.4. Calculate the path quality (such as path length) of each ant: For each path constructed by an ant, calculate its path length or other evaluation indicators.
[0130] S5.5. Global update of pheromone (after all ants have completed path construction): Select the best path in the current iteration (usually the ant with the shortest path length) and update the pheromone concentration according to the global update rule:
[0131]
[0132] in is the sum of the pheromone increments left by all ants on the path (i, j);
[0133] S5.6, iteration: If the maximum number of iterations NCmax is not reached, return to step S5.2 to continue the next round of iteration. During the iteration process, the currently found optimal solution can be recorded and updated;
[0134] S5.7, Output: When the maximum number of iterations is reached or other termination conditions are met, the currently found optimal path and its corresponding solution are output. Through the combination of these steps and formulas, the ant colony optimization algorithm can simulate the foraging behavior of ants, gradually search in the solution space and find the optimal transformer hyperparameter combination
[0135] S6, using the training set in step S3.6 as input to train the capacity estimation model;
[0136] S7. Input the actually collected health factors into the trained capacity estimation model, output the battery capacity value, and complete the estimation of the available battery capacity.
[0137] Although 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 appended claims and their equivalents.
Claims
1. A method for estimating the discharge capacity of a lithium battery without a temperature sensor, characterized in that: The following steps are involved: S1. Obtaining lithium-ion battery aging data: Performing cyclic charge and discharge tests on lithium-ion batteries until the discharge capacity is less than 80% of the nominal capacity, and recording the voltage, current, temperature, state of charge and discharge capacity data of the battery during the charge and discharge process in real time; S2. Use the TCN-GRU model to predict temperature. The specific steps are as follows: S2.1, the voltage, current and state of charge obtained in step S1 are combined into a temperature prediction factor {x}; S2.2, the temperature prediction factor {x} and the corresponding temperature in step S2.1 form a prediction data set, and the first 70% of the data in the prediction data set is used as a training set, and the last 30% of the data is used as a test set. The specific expression is as follows: Training set: Test set: Among them, x i and i Respectively represent the temperature prediction factor and the corresponding predicted temperature in the training set, x i * and i * They represent the temperature prediction factors and the corresponding predicted temperatures in the test set, respectively, and m represents the dimension; S2.
3. Run the TCN-GRU model using the training set to obtain a trained TCN-GRU model. S2.4, input the temperature prediction factor {x} into the trained TCN-GRU model, and output the battery temperature during each cycle of charge and discharge; S3. Extract the health characteristics during the cyclic charge and discharge process. The specific steps are as follows: S3.1, averaging the battery temperature in each charging cycle output in step S2 to obtain the average temperature of the charging cycle; S3.
2. Construct the battery temperature in each cycle charging process in step S2 into a temperature curve: Use the temperature increment method to convert the temperature curve into a temperature increment curve. The calculation expression for calculating the temperature increment curve is as follows: in, Indicates the temperature increment at time t, T t represents the battery temperature at time t, T t-M Indicates the battery temperature at time tM, where M represents the sampling interval; S3.3, filtering the discrete temperature increment curve, and obtaining a smooth temperature increment curve using an equiripple FIR filter based on the Parks-Mclellan algorithm; S3.4, obtaining the peak value of the smoothed temperature increment curve in step S3.3; S3.5, the average temperature of the charging process cycle in step S3.1 and the peak value of the smoothed temperature increment curve in step S3.4 are combined to form a battery health factor set {x cap The specific expression is as follows: x cap =[T mean ,IV peak ] Among them, x cap Represents the battery health factor set, T mean Indicates the average temperature of the charging process cycle, IV peak Represents the peak of the smoothed temperature increment curve; S3.
6. Set the battery health factor {x cap } and the discharge capacity corresponding to each cycle constitute a capacity data set, and the capacity data set is divided into a capacity training set and a capacity test set. The specific expression is as follows: Capacity training set: Capacity test set: Among them, D train,cap and D teat,cap Respectively represent the capacity training set and the capacity test set, x i,cap and i,cap are the health factor and the corresponding discharge capacity value in the capacity training set, respectively, i,cap * and i,cap * are the health factors and corresponding discharge capacity values in the capacity test set, respectively, and m represents the dimension; S4, establish a capacity estimation model through the transformer model; S5, optimizing the hyperparameters of the transformer model in step S4 by using an ant colony optimization algorithm; S6, using the training set in step S3.6 as input to train the capacity estimation model; S7. Input the actually collected health factors into the trained capacity estimation model, output the battery capacity value, and complete the estimation of the available battery capacity.
2. The method for estimating the discharge capacity of a lithium battery without a temperature sensor according to claim 1, characterized in that: The TCN-GRU model in step S2 is composed of a TCN model and a BiGRU model; The TCN model consists of causal convolution, dilated convolution and residual block. The residual block includes two dilated causal convolution layers, two ReLU layers, two normalization layers and two dropout layers. The expression of dilated convolution in the TCN model is as follows: Where k represents the filter size, f k-1 represents the filter, x t-(k-1+i)d represents the input sequence, t-(k-1+i)d represents the past direction; The update equation of the BiGRU model is expressed as follows: Among them, r t Indicates the reset gate at the current moment, represents the input at time t, z t represents the update gate at the current moment, h t-1 represents the hidden state at the previous moment, h t represents the output at time t, Indicates new memory information, W r , W z , W h Represent the weight matrices of the reset gate, update gate and hidden state, respectively, b r , b z , b h Respectively represent the bias of reset gate, update gate and hidden state, σ(*) represents the activation function, and tanh(*) represents the hyperbolic tangent function; The BiGRU model also includes forward propagation GRU units and back propagation GRU units. The specific calculation expressions are as follows: Among them, G(*) represents the GRU network, w t and v t They are respectively represented as the weight of the forward GRU output and the weight of the reverse GRU output at time t, Indicates positive output, Indicates reverse output, b t represents the bias of the output layer, x t Represents the input data of the model.
3. The method for estimating the discharge capacity of a lithium battery without a temperature sensor according to claim 1, characterized in that: The transformer model in step S4 includes an encoder and a decoder, each layer of the encoder consists of a multi-head self-attention mechanism and a feedforward neural network, and the decoder uses the representation generated by the encoder to generate an output sequence, and each layer of the decoder consists of a multi-head self-attention mechanism, an encoder-decoder attention mechanism and a feedforward neural network.
4. The method for estimating the discharge capacity of a lithium battery without a temperature sensor according to claim 3, characterized in that: The calculation expression of the self-attention mechanism is as follows: Among them, Attention(Q,K,V) represents the self-attention mechanism, Q, K, V represent the query matrix, key matrix and value matrix respectively, d k represents the dimension of the key, the superscript T represents the transpose of the matrix, and softmax(*) represents the normalization function.
5. The method for estimating the discharge capacity of a lithium battery without a temperature sensor according to claim 4, characterized in that: The expression of the feedforward neural network is as follows: FFN(x)=ReLU(xW1+b1)W2+b2 Among them, FFN(x) represents a feedforward neural network, ReLU represents a linear rectification function, W1 and W2 represent two different weights, b1 and b2 represent two different bias parameters, and x represents the ReLU network input.
Citation Information
Patent Citations
Lithium battery aging prediction method and system based on multi-task learning
CN116298902A
Transform-based lithium battery health state estimation method and system
CN116299002A