Next Article in Journal
Current Sensor Fault Diagnosis and Tolerant Control for Nine-Phase PMSM Drives Based on Improved Axis Rotation
Previous Article in Journal
Numerical Analysis of Aeroacoustic Phenomena Generated by Heterogeneous Column of Vehicles
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Lithium Battery State-of-Charge Estimation Based on a Bayesian Optimization Bidirectional Long Short-Term Memory Neural Network

1
Faculty of Information Engineering and Automation, Kunming University of Science and Technology, Kunming 650500, China
2
Yunnan Provincial Key Laboratory of Artificial Intelligence, Kunming University of Science and Technology, Kunming 650500, China
3
Key Laboratory of Unconventional Metallurgy, Ministry of Education, Kunming University of Science and Technology, Kunming 650093, China
*
Author to whom correspondence should be addressed.
Energies 2022, 15(13), 4670; https://doi.org/10.3390/en15134670
Submission received: 26 May 2022 / Revised: 21 June 2022 / Accepted: 22 June 2022 / Published: 25 June 2022

Abstract

:
State of charge (SOC) is the most important parameter in battery management systems (BMSs), but since the SOC is not a directly measurable state quantity, it is particularly important to use advanced strategies for accurate SOC estimation. In this paper, we first propose a bidirectional long short-term memory (BiLSTM) neural network, which enhances the comprehensiveness of information by acquiring both forward and reverse battery information compared to the general one-way recurrent neural network (RNN). Then, the parameters of this network are optimized by introducing a Bayesian optimization algorithm to match the data characteristics of lithium batteries with the network topology. Finally, two sets of lithium battery public data sets are used to carry out experiments under different constant temperature and variable temperature environments. The experimental results show that the proposed model can effectively fit the actual measurement curve. Compared with traditional long short-term memory network (LSTM) and BiLSTM models, the prediction accuracy of the Bayes-BiLSTM model is the best, with a root mean square error (RMSE) within 1%, achieving a better ability for capturing long-term dependencies. Overall, the model exhibits high accuracy, adaptability, and generalization for the SOC estimation of batteries with different chemical compositions.

1. Introduction

With the increasing severity of the global energy crisis and the environmental pollution caused by transportation energy consumption, the world’s demand for efficient and clean energy is also increasing year by year. As a type of reusable, rechargeable battery, lithium batteries greatly reduce carbon emissions and chemical fuel consumption. In addition, due to the advantages of high energy density, low self-discharge rate, and long service life, lithium batteries are widely used in electric vehicles [1,2]. As one of the most important state quantities of lithium batteries, the SOC is not only an important parameter for measuring the remaining power of batteries but also an important index for ensuring the safety and service life of batteries [3]. Therefore, accurate lithium battery SOC estimation is currently a key problem to be solved.
The SOC is defined as the ratio of the remaining capacity to the nominal capacity of a battery [4], which is usually calculated by Equation (1). It should be noted that SOC is a state quantity that cannot be measured directly, and there are highly nonlinear relationships between the SOC and observable variables, such as voltage, current, temperature, and other measured data. Using these observable variables, the SOC value can be obtained indirectly. However, these variables also change with battery aging, ambient temperature, and driving conditions, which makes accurate SOC estimation a challenge [5].
SOC = Q c Q i × 100 %
where Q c is the current remaining capacity of the battery and Q i is the nominal capacity of the battery. The SOC value range is between [0,1]. When the SOC is 0, the battery is completely discharged. When the SOC is 1, the battery is fully charged.
At present, there are four main types of SOC estimation methods proposed by scholars: the ampere-hour integration method, the open-circuit voltage method, the model-based estimation method, and the data-driven method [6]. The ampere-hour integration method mainly involves calculating the amount of electricity released by the battery over a period of time by measuring the discharge current of the battery and integrating the current over time, thus achieving battery SOC estimation [7]. The open-circuit voltage method is mainly used to find the relationship between the open-circuit voltage (OCV) and the battery SOC, and a corresponding OCV–SOC table is established by using discharge experiments to further estimate the SOC according to the mapping relationship between them. The model-based method characterizes the internal characteristics of the battery by establishing a battery model to establish a time-domain space state equation to estimate the SOC [8,9,10]. However, due to high computational complexity, the model’s requirement for prior knowledge, and the variations of a large number of parameters in the model with operating conditions, it is difficult to accurately estimate the SOC of the battery throughout its life cycle using the model-based method. In recent years, the data-driven approach has received much attention from scholars because it does not require a specific battery model and an accurate formula. The data-driven approach treats the battery as a black box and only requires the lithium battery measurement signal to achieve the estimation of SOC [11]. Many scholars have used many traditional machine learning methods to simulate the nonlinear characteristics of batteries, which have suitable data integrity, and the relationships between the battery SOC and the observable variables (voltage, charge/discharge current, resistance, etc.) can be learned autonomously from the data. Common learning algorithms include support vector machines, semi-supervised learning, artificial neural networks, etc. [12,13]. Reference [14] uses a multi-hidden layer backpropagation (BP) neural network to learn the nonlinear relationship between battery SOC and Li-ion battery measurable variables (i.e., current, voltage, and temperature). Using a genetic algorithm to denoise the prediction error, this method successfully captures the long-term dependence between the observable variables and the battery SOC. Reference [15] uses the least-squares support vector machine (LS–SVM) model to train the dynamic characteristics of lithium-ion batteries with a small sample and realize the online application of the modeling method. However, these shallow learning architectures lack comprehensiveness when considering the redundancy of feature information, which ultimately leads to low accuracy.
In particular, with the booming development of artificial neural networks, deep learning is also widely used for battery SOC estimation. Deep learning, as an important branch of machine learning, can easily capture the relationships between the measured signals and the SOC by building multilayer deep neural networks with nonlinear transformations to extract feature information from input samples. RNN is a deep learning method based on neural networks, which has been favored by many scholars in recent years in regard to the prediction problem of sequence data. Reference [16] proposed an SOC estimation method based on RNN by using the time-series memory capability of RNN. Through the data obtained from the lithium battery performance test experiment, a battery SOC estimation simulation experiment was carried out under high-power discharge conditions. Reference [17] proposed an SOC estimation model combining RNN with the Coulomb counting method. The model takes voltage, current, and temperature as inputs and considers the effect of battery degradation during charging and discharging to estimate battery SOC under three different operating conditions. However, the structure of RNN is relatively shallow, and a typical RNN is unable to learn the intrinsic features of the measured data layer by layer upon encountering the extended sequence problem. To improve the capability of RNNs in handling sequential data, an LSTM, gated recurrent unit (GRU) structure can be added to RNN to solve the vanishing gradient phenomenon problem. Reference [18] proposed a method to accurately estimate lithium battery SOC by using LSTM and formed a single network that correctly estimated the SOC under different ambient temperature conditions by encoding the time-dependent term. Reference [19] estimated lithium-ion battery SOC based on a gated recurrent neural network (GRU-RNN) and established mapping relationships between the battery observable variables and SOC to achieve battery SOC estimation at different temperatures. In the literature [2], a gated recurrent neural network model with an activation functional layer (GRU-ATL) was proposed to estimate the battery charge state, and a stable and accurate SOC estimation performance was achieved by estimating the battery SOC online under different operating conditions without relying on the battery model. Reference [1] proposed a method combining a denoising auto-encoder (DAE) with a GRU to estimate lithium battery SOC. By reducing noise and increasing the dimension of battery measurement data to obtain useful data information and then using GRU-RNN for training, experimental results were obtained that showed that the proposed DAE-GRU had suitable robustness. All of these studies achieved suitable results for battery SOC estimation, but most of these studies only focus on the correlation of forward series data, while the correlation study of reverse series data acquisition is lacking. Reference [20] proposed an SOC estimation method combining multichannel convolution and bidirectional recurrent neural network (MCNN-BRNN) to sequentially estimate SOC by extracting multi-scale local robust features and using the BRNN to capture effective time-varying signals. This reduced the accumulation of errors and improved the overall estimation accuracy. Reference [21] proposed a stacked bidirectional long short-term memory (SBLSTM) model for estimating lithium battery SOC. This method captured the forward and reverse battery information through the bidirectional structure and improved the depth of the model by stacking the bidirectional structure, which further improved the estimation performance of the model. It is worth mentioning that the network setting of the model in this document is highly random. Artificially setting the super parameters of the network will not only increase the training cost of the model but also affect the prediction effect of the model. Therefore, the parameter adjustment of the model needs to be further resolved. In this paper, a Bayesian optimization-based bidirectional long short-term memory (Bayes-BiLSTM) neural network model is proposed for lithium battery SOC estimation. Compared with the unidirectional LSTM network, this model uses a bidirectional structure to summarize the temporal dependence of past and future contexts by capturing the forward and reverse battery information. In addition, compared with other methods, the proposed model also introduces a Bayesian optimization algorithm. The introduction of this optimization algorithm assists in finding the optimal network parameters to improve the network performance and compensates for the defect of manually setting the network parameters. In particular, this paper adopts the Bayesian optimization algorithm to optimize the parameters of the BiLSTM model. The optimization parameters include the number of hidden layer neurons I s , the maximum number of iterations MaxEpochs, the initial learning rate I r and the learning decline rate factor I r d f . Finally, this paper evaluates the effectiveness and applicability of the proposed method by conducting multiple sets of comparative experiments using two public lithium battery data sets, and the experimental results show that under different constant temperature and variable temperature environments, the proposed method has better accuracy, adaptability, and generalizability for the SOC estimation of different types of lithium batteries.
The rest of the paper is organized as follows: the second part details the LSTM, BiLSTM, and Bayes-BiLSTM models. The third part introduces the lithium battery data set and experimental procedure. The fourth part analyzes and discusses the experimental results. The fifth part comprises the conclusion of this paper.

2. SOC Estimation Methods

2.1. LSTM Network

The models of traditional neural networks will only focus on the processing of information in the current moment and will not infer whether the processing of information in the previous moment will help in the next moment, and the problems of local minima, gradient disappearance, and gradient explosion are prevalent when performing model training. For example, the gradient disappearance generated by RNN during backpropagation can lead to the inability to capture long-term dependence [17]. LSTM networks effectively solve this problem. LSTM is a special implementation of RNN, which improves the implicit layer and introduces the concept of temporal order on top of RNN neural networks so that the output of one moment can have a direct impact on the input of the next moment.
The structure of the LSTM hidden unit is shown in Figure 1, which includes a forgetting gate f t , an input gate i t , an output gate o t , and a memory cell C t . The sigmoid layer determines which values need to be updated, and the tanh layer determines what new values to add. The transfer and control of information is achieved through three gates. The forgetting gate f t in the cell state transfer determines what information should be discarded. The input gate i t controls the decision of what new information to add to the “cell state”. The output gate o t controls the storing of the information of the cell at the moment t to the hidden state of h t [21,22]; that is, the output is obtained. Equations (2)–(5) demonstrate the execution process of updating the internal unit by LSTM.
f t = σ ( w f x x t + w f h h t 1 + b f )
i t = σ ( w i x x t + w i h h t 1 + b i )
o t = σ ( w o x x t + w o h h t 1 + b o )
s t = t a n h ( w c x x t + w c h h t 1 + b c )
where w and b with subscripts represent the weight matrices and deviation vectors of the three gates; σ ( ) is a sigmoid activation function with a function value of a vector between (0,1) that acts as a gate, with 0 representing discard and 1 representing retention; t a n h ( ) normalizes the values to between (−1,1) and is used to update the internal cells and cell outputs, and s t is a vector of candidate values created after the tanh layer.
In the whole information flow, the process of cell state from C t 1 to C t is similar to a conveyor belt, and the cell update rule from C t 1 to C t is as follows:
(a)
Select the part of old cell information forgotten through the “forgetting gate”, multiply the old state with f t , and discard the information determined to be discarded.
(b)
Add the candidate cell information s t through the “input gate” and then add i t × s t to obtain the cell state C t as in Equation (6).
C t = f t C t 1 + i t s t
The output of the LSTM cell is calculated by Equation (7):
h t = o t t a n h ( C t )

2.2. Bidirectional LSTM Network

LSTM improves the gradient disappearance or explosion problem that occurs in traditional RNNs due to its complex gated memory mechanism and outperforms other recurrent architectures in dealing with sequential tasks with long-term dependencies. However, it is worth noting that the LSTM structure can only use positive dependencies, and some useful information will be filtered in the long-term gated memory chain. To solve this problem, this paper adopts a bidirectional LSTM, which consists of two LSTM layers in different directions, two independent LSTM layers, one for inputting the forward sequence and the other for inputting the reverse sequence. The structure of the BiLSTM is shown in Figure 2. This structure makes up for the lack of information in LSTM, can better capture contextual long-term dependencies in sequence tasks, and can facilitate more accurate predictions.
The input data of this model are selected as two parameters, voltage and current, and the input sequence x t = { v t , I t } consists of voltage and current with t as the time step, and the output sequence is SOC t . In Equation (8), h t 1 , h t , and h t + 1 denote the hidden layer neuron nodes for the forward propagation of the model, and in Equation (9), h t 1 , h t , and h t + 1 denote the hidden layer neuron nodes for the reverse propagation of the model. Then, the forward and reverse implied state outputs of the BiLSTM are connected and fed into the same fully connected layer, and the output implied layer state is considered as input using the fully connected layer. Its dimensionality reduction is calculated with the activation function of the sigmoid function, and the final output is the predicted charge state. The SOC estimation of the model output is shown in Equation (10).
h t = LSTM ( x t , h t 1 )
h t = LSTM ( x t , h t + 1 )
SOC t = w 0 h f + b 0
where h f denotes the output of the fully connected layer, w 0 denotes the weight matrix, and b 0 denotes the deviation of the output regression layer.

2.3. SOC Estimation Based on Bayes-BiLSTM

Some hyperparameters of the BiLSTM model control the generalization of the network structure. If the number of neurons in the hidden layer is too small, the information acquisition required by the sample training process cannot be satisfied; if the number is too large, overfitting will occur, resulting in a decrease in the generalization ability of the network. The number of iterations is the number of times that the data in the training set is trained in the network, and the setting of the maximum number of iterations is the termination condition of the optimization algorithm; there is also an optimal value for the setting of the initial learning rate. If this value is too large, the model will not converge, or the model will not converge. The convergence rate is too slow. The learning decline rate factor is that after the model performs multiple iterations, the model will multiply the initial learning rate by this factor according to the current situation to reduce the learning rate to obtain the best convergence effect of the model [23,24]. To match the network model structure with the data, improve the network training speed, and improve the network performance, it has become a new challenge to determine the optimal parameters of BiLSTM. Bayesian optimization can combine past evaluation results to obtain better results with fewer iterations. In parameter combination optimization problems, this optimization method is widely used because it can quickly and accurately find the optimal solution of hyperparameters [25]. This paper adopts the idea of Bayesian optimization and realizes the overall optimization of hyperparameters based on the BiLSTM network to further improve the efficiency of lithium battery SOC estimation. The model structure is shown in Figure 3.
As a global optimization algorithm, the Bayesian optimization algorithm estimates the posterior distribution of the objective function by using Bayes’ theorem and then selects the next combination of hyperparameters to be sampled based on this distribution. The method uses the sampling results of the previous sampling points to continuously refine the objective function until the globally optimal hyperparameters are found. That is, the next evaluation is performed only after the completion of one evaluation, which is able to find the near-optimal solution with less evaluation cost [25]. The proposed model is set to χ = x 1 , x 2 , x n as a set of hyperparameter combinations, and Equation (11) is the hyperparameter combination selection representation of the model.
x * = a r g min x χ f ( x )
where x * denotes the optimized hyperparameter combination and f ( x ) is the minimization objective function with respect to the hyperparameter x. The Bayes’ theorem used in the Bayesian optimization process is shown in Equation (12).
P ( f | D ) = P ( D | f ) P ( f ) P ( D )
where f denotes the unknown objective function; D denotes the set of observations, D = { ( x 1 , y 1 ) , ( x 2 , y 2 ) ( x n , y n ) } ; P ( f | D ) denotes the posterior probability of f; P(f) denotes the prior probability of f; P ( D | f ) denotes the likelihood distribution of y; and P(D) denotes the marginal likelihood distribution of the marginalized f. In Bayesian optimization, this marginal likelihood is mainly used to optimize the hyperparameters.

3. Data and Experiments

3.1. Battery Data Set

To verify the effectiveness of the proposed model, two public data sets of lithium batteries are used for evaluation, and the main specifications of the two batteries are shown in Table 1. The first data set is the INR 18650-20R data set, which was constructed by the Center for Advanced Life Cycle Engineering (CALCE) at Columbia University [26]. Each battery data contains parameters such as time, current, voltage, temperature, and capacity. In this experiment, the battery INR 18650-20R was tested at three different ambient temperatures (0 °C, 25 °C, 45 °C) by performing four dynamic driving cycles under different operating conditions, including the dynamic stress test (DST), Federal Urban Driving Program (FUDS), US06, and the Beijing dynamic stress test (BJDST). Figure 4 reflects the current and voltage distributions recorded in the FUDS test at 45 °C, which includes the charging, discharging, and suspending phases of the battery, where positive currents indicate the state of charge and negative currents indicate the state of discharge.
The second data set is the path-dependent battery degradation data set provided by the Information Office of the Battery Laboratory of Oxford University [27]. The experiment was conducted on lithium-ion 18650 NCA batteries, and the experimental temperature was set at 24 °C. The data set contains four sets of long-term degradation data, each containing three 18650 NCA cells, electrochemical impedance spectroscopy EIS data, and half-cell data. The half-cell data were obtained by constructing half-cells from the electrode materials collected from the original 18650 NCA batteries and tested at C/24.

3.2. Experimental Process

The experimental process of this study is shown in Figure 5.
(1) Data pre-processing: Data pre-processing is the basis for building the network model. Since the obtained battery data indicators of voltage, current, and SOC have different magnitudes and magnitude units, the existing numerical differences will affect the training speed and training effect of the model. Therefore, to eliminate the influence of scale between the indicators, it is necessary to normalize the data samples to ensure the accuracy and generalization ability of the model. Moreover, the normalized data set is divided. Specifically, the discharge stage data of the three working conditions of FUDS, US06, and BJDST in the first data set are used as the training set, and the DST discharge stage data are used as the test set. The mapminmax function maps the measured values to the [0,1] interval, as shown in Equation (13):
x * = x x min x max x min
where x * is the normalized data; x is the actual measurement data, and x min and x max are the minimum and maximum values in the actual measurement data.
(2) Model building: The BiLSTM model consists of an input layer, a dual LSTM layer, a dropout layer, a fully connected layer, and an output layer. To explore the impacts of different parameter settings on the model estimation performance, this paper constructs different parameter settings for SOC estimation and specifically discusses the impacts of different hidden layer neuron numbers on the model in Section 4.1. In the Bayes-BiLSTM model, for optimizing the parameter range settings, the parameter setting in reference [28] is used and combined with the training test, and the value range is continuously narrowed according to the accuracy. The parameter ranges include the number of neurons in the hidden layer I S [ 64 , 128 ] , the maximum number of iterations M a x E p o c h s [ 20 , 200 ] , the initial learning rate I r [ 0.0001 , 0.1 ] , and the learning decline rate factor I r d f [ 0.1 , 1 ] .
(3) Model training: In model training, Adam is used as the model optimization algorithm, and the mean absolute error is used as the loss function, as shown in Equation (14). Finally, the hyperparameters obtained from Bayes optimization are used to complete the training of the model.
LOSS = 1 n t = 1 n | y t ^ y t |
(4) Performance evaluation: On the one hand, to evaluate the generalization of the model, a second data set is used for validation testing in Section 4.5; on the other hand, to evaluate the accuracy of the model for estimating the effect of lithium battery SOC, three metrics are used to evaluate the performance of the model, including the mean absolute percentage error (MAPE), root mean square error (RMSE), and mean absolute error (MAE).
MAPE = 100 % n t = 1 n | y t ^ y t y t |
RMSE = 1 n t = 1 n ( y t ^ y t ) 2
MAE = 1 n t = 1 n | y t ^ y t |
where n is the measurement data time-series length and y t ^ and y t are the estimated and actual measured values of the battery SOC at moment t, respectively.
Experiment description: All experiments are carried out in the CPU simulation environment of MATLAB 2019. The computer processor is an Intel i5-4590 3.30 GHz, and the memory is 8.0 GB DDR3.

4. Analysis and Discussion of Experimental Results

4.1. SOC Estimation under Different Hidden Layer Units

In a bidirectional LSTM, the number of hidden layer neurons determines the width of the model; if this number is too small, the amount of information acquisition required for the sample training process cannot be met; if this number is too large, overfitting will occur, leading to a decrease in the generalization ability of the network. In this section, different BiLSTM models are constructed to evaluate the effect of the number of hidden layer neurons on the estimation accuracy of the model. The setting regarding the number of hidden layer units in recurrent neural networks is usually performed using multiple consecutive powers of 2 [21]. In this section, five BiLSTM models with 16, 32, 64, 128, and 256 implied layers are constructed, and the maximum number of iterations is set to 2000. Table 2 summarizes the comparison results of the five different structural models. As seen from the table, with the increase in the number of hidden layer neurons, the estimation accuracy is the highest when the number of hidden layer neurons is 64 compared with the other models; when the number of hidden layer neurons is 128, the estimation accuracy starts to decrease.
Figure 6 shows the one-time estimation results and errors of the models with different structures at three different constant temperatures. Where (a), (c), and (e) are the estimated results of the model based on the number of units of different hidden layers at 45 °C, 25 °C, and 0 °C, respectively. (b), (d), and (f) represent the corresponding errors. Moreover, it can be seen from the figure that the curve of the estimation results is relatively smooth at room temperature; but the degree of fitting with the actual measurement curve is relatively poor, and the estimation accuracy is low; when the temperature is too high or too low, especially at the end of the discharge, the curve of the model estimation result is relatively steep, but the overall fitting degree with the actual measurement curve is suitable. This instability is due to the strong nonlinear polarization of the lithium battery at the end of discharge and the fact that the dynamic characteristics inside the battery also become more complex at lower temperatures, with a lag in the battery response, which in turn leads to an increase in the error. Therefore, to obtain a higher estimation accuracy, we can tentatively determine that the optimal number of implied layer neurons should be between [64,128].

4.2. SOC Estimation of Improved Circulation Blocks at Different Temperatures

The Bayesian optimization algorithm is used to improve the circulation block and to verify the effectiveness of the proposed strategy. This section estimates the optimized model by subjecting it to three different constant temperatures in a one-time estimation. Table 3 shows all of the MAE, MAPE, and RMSE after improving the circulation block, and the results show that the average absolute error of the estimation accuracy is within 1.2%. The estimation results and errors of the model at 45 °C are shown in Figure 7. The RMSE and MAPE of the circulation block are 0.89% and 6.56%, respectively, which are 0.41% and 21.49% higher than those of the BiLSTM model with 64 implied layer cell counts in Section 4.1, respectively. Figure 8 and Figure 9 represent the estimation results and errors at 25 °C and 0 °C, respectively. As shown in the figures, the model estimates slightly deviate from the true SOC value and fluctuate around it because the polarization of the cell becomes progressively more severe as the temperature decreases. However, overall, compared with those of the model before optimization, the RMSE and MAPE of the model at 25 °C are increased by 0.8% and 14.31%, respectively, and the RMSE and MAPE of the model at 0 °C are increased by 0.5% and 24.08%, respectively. The loop block exhibits high accuracy and stability at different constant temperatures.

4.3. SOC Estimation in a Variable Temperature Environment

The experimental results in the previous section show that the proposed Bayes-BiLSTM can achieve accurate battery SOC estimation at different constant temperatures. In fact, the lithium-ion battery’s internal temperature is continuously changing during the whole operation, and the temperature has a very important influence on the battery, especially in the battery SOC estimation, which is a key factor that cannot be ignored regardless of the model adopted. Therefore, it is necessary to evaluate the estimation performance of the proposed method under a variable temperature environment. We selected some data corresponding to three different temperatures of 45 °C, 25 °C, and 0 °C under each working discharge in the first data set to form a new variable temperature environment data set; the data of the three DST, US06, and FUDS working conditions were used for model training, and the data of BJDST working conditions were used for model testing. Table 4 shows the results based on the variable temperature environment, and it can be seen that, through training, the estimation error of the model is small even in a variable temperature environment, and the MAE is controlled within 1%. Figure 10 shows the estimation results of the model based on the new data set, and it is obvious that the estimation curve of the proposed strategy can better fit the actual measurement curve, showing suitable fitting ability.

4.4. Comparison of Different Methods

To verify the superiority of the proposed method, different methods are used for one-time battery SOC estimation, including a comparison of three strategies, LSTM, BiLSTM, and Bayes-BiLSTM. To ensure the fairness of the comparison experiments, both the first data set and the same training and test sets are used for evaluation, where the LSTM model and BiLSTM model have the same implied layer structure, and the number of implied layer neurons is set to 64; Adam is the model optimization algorithm, and the mean absolute error is used as the loss function. Figure 11 shows the accuracy comparison of the one-time estimation results of different methods at 45 °C, and each method shows a suitable fitting ability. Table 5 shows the results of hyperparameters after Bayesian Optimization of the BiLSTMnetwork. Figure 12 shows the error of battery SOC estimation under different methods. In the whole estimation period, the error of the proposed method is relatively stable; that is, the error is the smallest. As seen in Table 6, compared with LSTM and BiLSTM, the Bayes-BiLSTM model has the best prediction accuracy and achieves a better ability to capture long-term dependencies.

4.5. Experiments on the Generalizability of the Models

To evaluate the generalization of the model, a second lithium battery data set was used for SOC estimation. In this experiment, we chose to study the discharge phase of the half-cell in the second data set. In the experiment with a total discharge time of up to 25 h, a total of 92,422 sets of battery data were recorded every 1 s; for the model, a greater amount of data is not necessarily better. Too much data will not only increase the training time but also sometimes cause the deterioration of the model. Therefore, we obtain a set of battery data every 50 s, including three parameters of half-cell voltage, current, and SOC; after completing the data screening, 90% of the data set is used for model training, and 10% is used for model testing. After training, it can be seen from Figure 13 that the model achieves a satisfactory effect on the half-cell SOC estimation. Specifically, the MAE is 0.65%, the RMSE is 0.79%, and the overall error is controlled within 1%. This experiment further verifies that the model shows high accuracy and adaptability for the SOC estimation of batteries with different chemical compositions.

5. Conclusions

In this paper, we propose a method for lithium battery state-of-charge estimation based on Bayesian optimized bidirectional long- and short-term memory neural networks. The proposed method breaks the mold of traditional RNN studies that have been using only forward dependencies and further summarizes the temporal dependencies in the context of lithium battery sequence data by adding reverse dependencies. This study uses two publicly available lithium battery data sets, the CALCE data set, and the Oxford path-dependent battery degradation data set, and establishes mapping relationships between the observable voltage, current, and temperature variables of the battery and the battery SOC through the data provided by the data sets. The training results of different network models and a combination of previous experiences are used to determine the parameter intervals of the network, and then a Bayesian optimization algorithm is introduced to obtain the optimal parameters of the network. Through a large number of comparative experiments, including battery SOC estimation under different constant temperatures, a variable temperature environment, and different methods, the experimental results show that the proposed Bayes-BiLSTM model has a suitable fitting ability, and the SOC of batteries with different chemical compositions is estimated with higher accuracy and adaptability.
Future work will focus on verifying the applicability of the model for battery SOC estimation based on the collected data by adding a battery testing experimental platform; furthermore, the structure of the proposed model will be further improved to enhance its battery SOC estimation accuracy in low-temperature environments.

Author Contributions

Conceptualization, B.Y. and Y.W.; methodology, B.Y.; software, Y.W.; validation, B.Y., Y.W. and Y.Z.; formal analysis, Y.Z.; investigation, Y.W.; writing—original draft preparation, B.Y. and Y.W.; writing—review and editing, Y.Z.; visualization, Y.W.; supervision, Y.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China, grant number 61863020.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data were obtained from the Center for Advanced Life Cycle Engineering (CALCE) at Columbia University [26] and the path-dependent battery degradation data set provided by the Information Office of the Battery Laboratory of Oxford University [27].

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

SOCState of charge
LSTMLong short-term memory
BiLSTMBidirectional long short-term memory
Bayes-BiLSTMBayesian optimization-based bidirectional long short-term memory
BMSBattery management system
RNNRecurrent neural network
LS–SVMLeast-squares support vector machine
GRUGated recurrent unit
GRU-ATLGated recurrent neural network model with an activation functional layer
DAEDenoising auto-encoder
MCNN-BRNNMultichannel convolution and bidirectional recurrent neural network
SBLSTMStacked bidirectional long short-term memory
OCVOpen-circuit voltage
RMSERoot mean square error
MAPEMean absolute percentage error
MAEMean absolute error

References

  1. Chen, J.; Feng, X.; Jiang, L.; Zhu, Q. State of charge estimation of lithium-ion battery using denoising autoencoder and gated recurrent unit recurrent neural network. Energy 2021, 227, 120451. [Google Scholar] [CrossRef]
  2. Duan, W.; Song, C.; Peng, S.; Xiao, F.; Shao, Y.; Song, S. An Improved Gated Recurrent Unit Network Model for State-of-Charge Estimation of Lithium-Ion Battery. Energies 2020, 13, 6366. [Google Scholar] [CrossRef]
  3. Espedal Ingvild, B.; Asanthi, J.; Burheim Odne, S.; Lamb Jacob, J. Current Trends for State-of-Charge (SoC) Estimation in Lithium-Ion Battery Electric Vehicles. Energies 2021, 14, 3284. [Google Scholar] [CrossRef]
  4. Chemali, E.; Kollmeyer, P.J.; Preindl, M.; Emadi, A. State-of-charge estimation of Li-ion batteries using deep neural networks: A machine learning approach. J. Power Sources 2018, 400, 242–255. [Google Scholar] [CrossRef]
  5. Samarendra, P.S.; Praveen, P.S.; Sri, N.S.; Prabhakar, T. State of charge and health estimation of batteries for electric vehicles applications: Key issues and challenges. Glob. Energy Interconnect. 2021, 4, 145–157. [Google Scholar]
  6. Rui, X.; Jiayi, C.; Quanqing, Y.; Hongwen, H.; Fengchun, S. Critical Review on the Battery State of Charge Estimation Methods for Electric Vehicles. IEEE Access 2018, 6, 1832–1843. [Google Scholar]
  7. Li, Z.; Huang, J.; Liaw, B.Y.; Zhang, J. On state-of-charge determination for lithium-ion batteries. J. Power Sources 2017, 348, 281–301. [Google Scholar] [CrossRef] [Green Version]
  8. Sun, D.; Yu, X.; Wang, C.; Zhang, C.; Huang, R.; Zhou, Q.; Amietszajew, T.; Bhagat, R. State of Charge Estimation for Lithium-Ion Battery based on an Intelligent Adaptive Extended Kalman Filter with improved noise estimator. Energy 2020, 214, 11199–11218. [Google Scholar] [CrossRef]
  9. Deng, Z.; Yang, L.; Cai, Y.; Deng, H. Online Identification with Reliability Criterion and State of Charge Estimation Based on a Fuzzy Adaptive Extended Kalman Filter for Lithium-Ion Batteries. Energies 2016, 9, 472. [Google Scholar] [CrossRef] [Green Version]
  10. Zhang, S.; Guo, X.; Zhang, X. An improved adaptive unscented kalman filtering for state of charge online estimation of lithium-ion battery. J. Energy Storage 2020, 32, 101980. [Google Scholar] [CrossRef]
  11. Chen, J.; Lu, C.; Chen, C.; Cheng, H.; Xuan, D. An Improved Gated Recurrent Unit Neural Network for State-of-Charge Estimation of Lithium-Ion Battery. Appl. Sci. 2022, 12, 2305. [Google Scholar] [CrossRef]
  12. Alvarez Anton, J.C.; Garcia Nieto, P.J.; Blanco Viejo, C.; Vilan Vilan, J.A. Support Vector Machines Used to Estimate the Battery State of Charge. IEEE Trans. Power Electron. 2013, 28, 5919–5926. [Google Scholar] [CrossRef]
  13. Li, Y.; Sheng, H.; Cheng, Y.; Stroe, D.; Teodorescu, R. State-of-health estimation of lithium-ion batteries based on semi-supervised transfer component analysis. Appl. Energy 2020, 277, 115504. [Google Scholar] [CrossRef]
  14. Liu, X.; Dai, Y. Energy storage battery SOC estimate based on improved BP neural network. J. Phys. Conf. Ser. 2022, 2187, 012042. [Google Scholar] [CrossRef]
  15. Zhang, L.; Li, K.; Du, D.; Zhu, C.; Zheng, M. A sparse least squares support vector machine used for SOC estimation of Li-ion Batteries. IFAC Pap. 2019, 52, 256–261. [Google Scholar] [CrossRef]
  16. Li, C.; Xiao, F.; Fan, Y. Approach to lithium battery SOC estimation based on recurrent neural network. J. Nav. Univ. Eng. 2019, 31, 107–112. [Google Scholar]
  17. Li, S.; Ju, C.; Li, J.; Fang, R.; Tao, Z.; Li, B.; Zhang, T. State-of-Charge Estimation of Lithium-Ion Batteries in the Battery Degradation Process Based on Recurrent Neural Network. Energies 2021, 14, 306. [Google Scholar] [CrossRef]
  18. Ephrem, C.; Kollmeyer Phillip, J.; Matthias, P.; Ryan, A.; Ali, E. Long Short-Term Memory Networks for Accurate State-of-Charge Estimation of Li-ion Batteries. IEEE Trans. Ind. Electron. 2018, 65, 6730–6739. [Google Scholar]
  19. Li, C.; Xiao, F.; Fan, Y. An Approach to State of Charge Estimation of Lithium-Ion Batteries Based on Recurrent Neural Networks with Gated Recurrent Unit. Energies 2019, 12, 1592. [Google Scholar] [CrossRef] [Green Version]
  20. Chong, B.; Shunkun, Y.; Jie, L.; Enrico, Z. Robust state-of-charge estimation of Li-ion batteries based on multichannel convolutional and bidirectional recurrent neural networks. Appl. Soft Comput. J. 2022, 116, 108401. [Google Scholar]
  21. Bian, C.; He, H.; Yang, S. Stacked bidirectional long short-term memory networks for state-of-charge estimation of lithium-ion batteries. Energy 2020, 191, 116538. [Google Scholar] [CrossRef]
  22. Feng, X.; Chen, J.; Zhang, Z.; Miao, S.; Zhu, Q. State-of-charge estimation of lithium-ion battery based on clockwork recurrent neural network. Energy 2021, 236, 121360. [Google Scholar] [CrossRef]
  23. Alessandro, R.; Nicolò, G.; Antonio, C.; Matteo, B. Bayesian optimization and deep learning for steering wheel angle prediction. Sci. Rep. 2022, 12, 8739. [Google Scholar]
  24. Xiong, X.; Guo, X.; Zeng, P.; Zou, R.; Wang, X. A Short-Term Wind Power Forecast Method via XGBoost Hyper-Parameters Optimization. Front. Energy Res. 2022, 10, 574. [Google Scholar] [CrossRef]
  25. Cui, J.; Yang, B. Survey on Optimization Methodology and Applications. J. Softw. 2018, 29, 3068–3090. [Google Scholar]
  26. Kollmeyer, P. Panasonic 18650pf li-ion battery data. Mendeley Data 2018. [Google Scholar] [CrossRef]
  27. Raj, T.; Wang, A.A.; Monroe, C.W.; Howey, D.A. Investigation of Path-Dependent Degradation in Lithium-Ion Batteries. Batter. Supercaps 2020, 3, 1377–1385. [Google Scholar] [CrossRef]
  28. Ren, X.; Liu, S.; Yu, X.; Dong, X. A method for state-of-charge estimation of lithium-ion batteries based on PSO-LSTM. Energy 2021, 234, 121236. [Google Scholar] [CrossRef]
Figure 1. LSTM network structure diagram.
Figure 1. LSTM network structure diagram.
Energies 15 04670 g001
Figure 2. Structure of the BiLSTM network.
Figure 2. Structure of the BiLSTM network.
Energies 15 04670 g002
Figure 3. Bayes-BiLSTM model structure.
Figure 3. Bayes-BiLSTM model structure.
Energies 15 04670 g003
Figure 4. Battery FUDS cycle test data at 45 °C: current (a) and voltage (b).
Figure 4. Battery FUDS cycle test data at 45 °C: current (a) and voltage (b).
Energies 15 04670 g004
Figure 5. Experimental process.
Figure 5. Experimental process.
Energies 15 04670 g005
Figure 6. Estimation results and errors of five BiLSTM models based on different numbers of hidden layer units.
Figure 6. Estimation results and errors of five BiLSTM models based on different numbers of hidden layer units.
Energies 15 04670 g006
Figure 7. SOC estimation of the Bayes-BiLSTM model at 45 °C: estimated results (a) and estimated errors (b).
Figure 7. SOC estimation of the Bayes-BiLSTM model at 45 °C: estimated results (a) and estimated errors (b).
Energies 15 04670 g007
Figure 8. SOC estimation of the Bayes-BiLSTM model at 25 °C: estimated results (a) and estimated errors (b).
Figure 8. SOC estimation of the Bayes-BiLSTM model at 25 °C: estimated results (a) and estimated errors (b).
Energies 15 04670 g008
Figure 9. SOC estimation of the Bayes-BiLSTM model at 0 °C: estimated results (a) and estimated errors (b).
Figure 9. SOC estimation of the Bayes-BiLSTM model at 0 °C: estimated results (a) and estimated errors (b).
Energies 15 04670 g009
Figure 10. Estimated results of BJDST in a variable temperature environment: estimated results (a) and estimated errors (b).
Figure 10. Estimated results of BJDST in a variable temperature environment: estimated results (a) and estimated errors (b).
Energies 15 04670 g010
Figure 11. Comparison of the one-time battery SOC estimation results of different methods at 45 °C.
Figure 11. Comparison of the one-time battery SOC estimation results of different methods at 45 °C.
Energies 15 04670 g011
Figure 12. Estimation errors of different methods at 45 °C.
Figure 12. Estimation errors of different methods at 45 °C.
Energies 15 04670 g012
Figure 13. One-time half-cell SOC estimation results (a) and errors (b).
Figure 13. One-time half-cell SOC estimation results (a) and errors (b).
Energies 15 04670 g013
Table 1. Main specifications of different batteries.
Table 1. Main specifications of different batteries.
Battery TypeINR 18650-20R18650 NCA
Nominal capacity2000 mAh3000 mAh
Nominal voltage3.6 V3.6 V
Charge cut-off voltage4.2 V4.2 V
Discharge cut-off voltage2.5 V2.5 V
Table 2. Comparison of results for different numbers of hidden layer units.
Table 2. Comparison of results for different numbers of hidden layer units.
Number of Hidden Layer UnitsEvaluation
Indicators
Temperature
45 °C25 °C0 °C
16MAE (%)1.182.081.27
MAPE (%)24.3928.6035.75
RMSE (%)1.562.401.74
32MAE (%)0.972.011.11
MAPE (%)30.2225.1342.47
RMSE (%)1.432.191.85
64MAE (%)0.831.971.01
MAPE (%)28.0520.7033.11
RMSE (%)1.302.091.57
128MAE (%)0.822.111.53
MAPE (%)32.6641.8244.76
RMSE (%)1.362.572.53
256MAE (%)0.901.991.44
MAPE (%)24.1639.2050.16
RMSE (%)1.482.522.69
Table 3. Comparison of the model estimation results after improving the recurrent block.
Table 3. Comparison of the model estimation results after improving the recurrent block.
Improved Model45 °C25 °C0 °C
MAE (%)0.61.160.85
MAPE (%)6.566.399.03
RMSE (%)0.891.291.07
Table 4. Model evaluation index in a variable temperature environment.
Table 4. Model evaluation index in a variable temperature environment.
Test ConditionsMAE (%)MAPE (%)RMSE (%)
BJDST0.9310.051.24
Table 5. Hyperparameter optimization results.
Table 5. Hyperparameter optimization results.
Method I S M a x E p o c h s I r I r d f
Bayes-BiLSTM82940.0003960.18722
Table 6. Comparison of the estimation results of different methods.
Table 6. Comparison of the estimation results of different methods.
MethodsMAE (%)MAPE (%)RMSE (%)
LSTM1.2614.521.46
BiLSTM0.8328.051.30
Bayes-BiLSTM0.606.560.89
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Yang, B.; Wang, Y.; Zhan, Y. Lithium Battery State-of-Charge Estimation Based on a Bayesian Optimization Bidirectional Long Short-Term Memory Neural Network. Energies 2022, 15, 4670. https://doi.org/10.3390/en15134670

AMA Style

Yang B, Wang Y, Zhan Y. Lithium Battery State-of-Charge Estimation Based on a Bayesian Optimization Bidirectional Long Short-Term Memory Neural Network. Energies. 2022; 15(13):4670. https://doi.org/10.3390/en15134670

Chicago/Turabian Style

Yang, Biao, Yinshuang Wang, and Yuedong Zhan. 2022. "Lithium Battery State-of-Charge Estimation Based on a Bayesian Optimization Bidirectional Long Short-Term Memory Neural Network" Energies 15, no. 13: 4670. https://doi.org/10.3390/en15134670

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop