Next Article in Journal
Comparative Analysis of Protection Schemes for Shunt Reactors: Addressing Turn-to-Ground and Turn Faults with Parametric Sensitivity and Transient Evaluations
Previous Article in Journal
Research on Reliability Improvement Method of Mountainous Power Grid Considering Electrified Railways Access
Previous Article in Special Issue
Grid Peak Shaving and Energy Efficiency Improvement: Advances in Gravity Energy Storage Technology and Research on Its Efficient Application
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Combined State-of-Charge Estimation Method for Lithium-Ion Batteries Using Long Short-Term Memory Network and Unscented Kalman Filter

1
School of Mechanical Engineering, Sichuan University of Science and Engineering, Zigong 643000, China
2
Sichuan Provincial Key Lab of Process Equipment and Control, Sichuan University of Science and Engineering, Zigong 643000, China
*
Author to whom correspondence should be addressed.
Energies 2025, 18(5), 1106; https://doi.org/10.3390/en18051106
Submission received: 19 January 2025 / Revised: 12 February 2025 / Accepted: 21 February 2025 / Published: 24 February 2025

Abstract

:
The state of charge (SOC) of lithium-ion batteries (LIBs) is a pivotal metric within the battery management system (BMS) of electric vehicles (EVs). An accurate SOC is crucial to ensuring both the safety and the operational efficiency of a battery. The unscented Kalman filter (UKF) is a classic and commonly used method among the various SOC estimation algorithms. However, an unscented transform (UT) utilized in the algorithm struggles to completely simulate the probability density function of actual data. Additionally, inaccuracies in the identification of battery model parameters can lead to performance degradation or even the divergence of the algorithm in SOC estimation. To address these challenges, this study introduces a combined UKF-LSTM algorithm that integrates a long short-term memory (LSTM) network with the UKF for the precise SOC estimation of LIBs. Firstly, the particle swarm optimization (PSO) algorithm was utilized to accurately identify the parameters of the battery model. Secondly, feature parameters that exhibited a high correlation with the estimation error of the UKF were selected to train an LSTM network, which was then combined with the UKF to establish the joint algorithm. Lastly, the effectiveness of the UKF-LSTM was confirmed under various conditions. The outcomes demonstrate that the average absolute error (MAE) and the root mean square error (RMSE) for the SOC estimation by the algorithm were less than 0.7%, indicating remarkable estimation accuracy and robustness.

1. Introduction

Amid escalating environmental degradation and dwindling oil reserves, electric vehicles (EVs) have gained widespread adoption, owing to their high efficiency, environmental friendliness, and energy-conservation benefits [1]. Meanwhile, the popularity of EVs has also driven a boom in research on energy storage devices. Lithium-ion batteries (LIBs), as one of the power source types in EVs, have gradually become the focus of research due to their high energy density, long cycle life, and minimal self-discharge rate [2,3,4,5]. The state of charge (SOC) plays an important role in the battery management system (BMS), essential for ensuring that a battery operates safely and stably. However, this parameter cannot be measured directly by sensors. Therefore, an accurate SOC estimation method is key in battery research [6].
An accurate SOC value is crucial for ensuring the stable operation of the BMS. Accordingly, to enhance the precision and robustness of SOC estimation, researchers have proposed various methods. Currently, the primary SOC estimation methods are categorized into the following three types.
Experiment-based methods are utilized to establish the mapping relationship between experimental test parameters and the SOC, which includes the open-circuit voltage method and the Coulomb counting method. The open-circuit voltage (OCV) method utilizes the nonlinear relationship between the OCV and the SOC to determine the SOC value. Nevertheless, during the measurement of the OCV, the battery must be allowed a prolonged resting period. Therefore, the method is unsuitable for use in online SOC estimation [7]. The Coulomb counting method uses current-to-time integration to achieve SOC estimation, but it has cumulative errors over time [8]. Although experiment-based methods are reliable, their applications are limited, making them difficult to be widely used [9]. Therefore, the methods are primarily employed to acquire benchmark data for comparative analysis with alternative methods or for utilization during laboratory calibration sessions.
Model-based methods primarily utilize Kalman filter (KF) algorithms combined with battery models to obtain the SOC. The main KF includes the extended Kalman filter (EKF) and the unscented Kalman filter (UKF) [10,11]. In contrast to the EKF, the UKF is widely used because it can avoid linearization errors and provide an accurate value of battery SOC estimation with relatively low computational cost [12]. For example, Sangeetha et al. [13] employed the Thevenin model in conjunction with the EKF to obtain a battery SOC. Results indicated that this approach could effectively estimate the battery SOC. However, the EKF relies on Taylor series expansion to linearize the nonlinear system, inevitably introducing linear errors in the process. To address the issue, Vedhanayaki et al. [14] proposed the UKF combined with the Coulomb counting method. Unlike the EKF, the UKF applies the unscented transform (UT) to simulate a linear system, enhancing the precision of the estimation results. Additionally, the method utilizes Coulomb counting to circumvent the issue of capacity degradation due to battery usage, maintaining the error of the SOC estimation within 1%. Wang et al. [15] introduced an online algorithm for SOC estimation utilizing a modified square root-untraced Kalman filter (SR-UKF). Accurate SOC estimates are obtained by avoiding the negative definite of the state matrix during the state update process and by considering the impact of the temperature on battery capacity changes. However, although the UKF demonstrates superior performance in SOC estimation, it requires higher model accuracy and is more sensitive to system noise. Consequently, these constraints hinder the effectiveness of the UKF in estimating battery SOCs. To overcome this issue, the UKF is frequently integrated with alternative techniques to improve the precision of SOC estimation.
Data-driven methods use machine learning and deep learning techniques to construct a correlation between the SOC and battery characteristic parameters [16,17,18]. Meanwhile, the methods can obtain more accurate estimation results and demonstrate strong nonlinear processing capabilities. For instance, Mao et al. [19] utilized a particle swarm optimization algorithm optimized by Levy’s flight strategy (LPSO) to determine the weights and thresholds within the backpropagation (BP) neural network for estimating the LIB SOC. The results indicate that the BP network, refined with the LPSO, achieves some improvements in SOC prediction accuracy. However, this method still has the potential to further improve due to the simplistic structure of the BP network and the absence of consideration for temporal variations in the information transfer process. To avoid this issue, Almaita et al. [20] used a long short-term memory (LSTM) neural network to estimate the SOC in a high-capacity LIB storage system. The LSTM network was trained and validated using actual data from the Al-Manara photovoltaic power plant. The results indicated that the mean squared error (MSE) for the feedforward neural network ranged from 5.37% to 9.22%, while for the deep feedforward neural network, it ranged from 4.03% to 7.37%. In contrast, the MSE of the LSTM network was less than 0.62%. This significant reduction was attributed to the memory cell and forget gate of the LSTM network, which enhanced prediction performance for time-varying battery data. In addition, Chai et al. [21] enhanced the LSTM network by employing a random search algorithm to select optimal network parameters, thereby improving the SOC estimation precision of the LSTM network. However, data-driven methods lack clear explicit physical interpretation and comprehensibility, and their efficacy is profoundly affected by the quality of the data [22]. Therefore, the methods exhibit a strong dependence on training sets and lack reliability.
The analysis above indicates that although various SOC estimation methods rely on their respective characteristics to estimate battery SOCs, achieving accurate SOC estimation through a singular method continues to be challenging. Consequently, with ongoing innovations in research methods, certain combined estimation methods have gained significant attention from researchers. For instance, Zhao et al. [23] integrated the EKF with the Coulomb counting method to develop an SOC estimation method that identifies errors and formulated error equations under various error sources. Based on this, the method is proposed for sensor fault identification correction and model parameter error estimation. However, the study overlooks the issue of linear errors introduced by the EKF when approximating the linearization of the model in the Taylor expansion. Additionally, Zeng et al. [24] introduced an integrated SOC estimation method that combines modeling and dual data driving. The approach simultaneously inputs SOC estimates from both the UKF and the LSTM network into another LSTM network to achieve optimal SOC estimation. However, the method overlooks the problem of error accumulation over time, and its practical value still needs further verification. Meanwhile, Pei et al. [25] utilized a BP network optimized through the tuna swarm optimization (TSO) algorithm to perform online error compensation in the EKF. The validation indicated that the TSO-BP can effectively reduce the estimation error of the EKF and enhance SOC estimation accuracy due to the error correction principle. However, the BP network in the method does not take into account the influence of time on the data model and fails to capture the time-varying information during the battery charge and discharge process. Consequently, the SOC estimation accuracy of the method will gradually decrease over time.
In studies of joint-method SOC estimation, certain joint methods have enhanced SOC estimation accuracy compared to traditional algorithms. However, common joint estimation methods of model-based methods combined with data-driven methods mostly fail to take into account the impact of the differences in the KF algorithms themselves on the performance of the algorithms, as well as the strong time-varying nonlinear nature of the battery system. The joint SOC estimation method of using LSTM to optimize the UKF (UKF-LSTM) is proposed in this study to address these issues.
The main contributions of this study are as follows:
(1)
A Thevenin model was established. Then, the particle swarm optimization (PSO) algorithm was utilized to determine the unknown parameters of the battery model. The model accuracy was verified under specified working conditions.
(2)
To obtain key parameters involved in the UKF estimation errors, combined with identified battery model parameters, the UKF was utilized to preliminarily calculate the battery SOC under the training condition. These key characteristic parameters were subsequently used to train the LSTM network. The trained LSTM network was employed to mitigate the UKF estimation errors, thereby enhancing the estimation performance of the UKF.
(3)
The UKF-LSTM was evaluated under different working conditions. The verified results demonstrate that the joint estimation approach proposed in this research yields precise SOC estimation, surpassing the accuracy of the EKF and UKF.

2. Experiment of Battery

The experimental platform for the LIB was established, as shown in Figure 1. It included the ARBIN BT-5HC-5V-100A battery test instrument produced by Arbin Instruments in College Station, TX, USA, the RGD-500 temperature and humidity chamber produced by Lab Companion in Dongguan, China, and the host computer. During the experiment, the battery was placed in the temperature chamber to ensure a constant temperature. The ARBIN test instrument was used to load the test program, monitor the current, voltage, capacity, and other parameters of the battery in the experiment in real time, and transmit them to the host computer. The parameters of the selected NMC LIB are shown in Table 1.
To obtain the dynamic characteristics of the battery under various excitations, three experiments were designed: the hybrid pulse power characterization (HPPC) test, the dynamic stress test (DST), and the urban dynamometer driving schedule (UDDS) test. These tests were performed at 25 °C. Charging and discharging currents were defined as positive values and negative values, respectively. The experimentally collected current and voltage versus time curves are shown in Figure 2.

3. Battery Model and Parameter Identification

3.1. Battery Model

The equivalent circuit model (ECM) is used to describe the nonlinear characteristics of a battery through circuit components such as resistors and capacitors [26]. Typical ECMs include the Rint model, Thevenin model [27], and dual polarization model [28]. The Thevenin model was selected for battery modeling because it accurately represents the polarization effect of batteries and requires a moderate computational cost [29]. Its circuit structure is shown in Figure 3.
In Figure 3, R p represents the polarization resistance, C p represents the polarization capacitance, U p represents the polarization voltage, U OC denotes the open-circuit voltage, R 0 denotes the ohmic internal resistance, I is the current, and U t is the terminal voltage. According to Kirchhoff’s law, the circuit equations for the model are described as follows:
d U p d t = I C p U p R p C p , U t = U oc U p I R 0 .
By choosing S O C and U p as the system state variables, the state space equations for the Thevenin equivalent circuit model can be obtained as follows:
S O C k U p , k = 1 0 0 e T τ S O C k 1 U p , k 1 + η T C N R p ( 1 e T τ ) I k 1 , U t , k = U OC , k I k R 0 U p , k .
where τ = C p , k represents the moment, η denotes the charge and discharge efficiency, C N represents the battery capacity, and T represents the sampling time.

3.2. Parameter Identification

The OCV, as a critical parameter in the ECM of batteries, exhibits a highly nonlinear relationship with the SOC [30]. The precision of the OCV-SOC curve fitting plays a crucial role in determining the accuracy of parameter identification and SOC estimation.
The HPPC test was employed to conduct charge and discharge cycles on the battery at currents of 1 A, 2 A, 4 A, and 6 A, respectively. In the middle of each cycle, ten percent of the rated capacity was discharged at a constant current of 1 A for a total of ten cycles. The terminal voltage was measured after each cycle and sufficient resting, at which point the terminal voltage could be approximately equal to the OCV. Then, the linear relationship between the OCV and SOC was obtained through sixth-order polynomial fitting, and the OCV-SOC fitting curve is shown in Figure 4. The fitted equation for the OCV and SOC is as follows:
O C V = 26.88 S O C 6 + 85.69 S O C 5 + 102.67 S O C 4 55.97 S O C 3 + 13.10 S O C 2 0.49 S O C 1 + 3.59 .
Accurate model parameters are crucial for SOC estimation. PSO is favored because of its simplicity, ease of implementation, rapid convergence, and minimal parameter regulation required compared to other common offline parameter identification methods based on optimization algorithms [31]. Thus, it was used to identify R0, Rp, and Cp in the battery model.
PSO is designed to imitate the collaborative behavior of birds in a flock searching for food [32]. In the pursuit of the optimal solution, each bird is modeled as a particle that updates its velocity and position according to its own best-known location and the best-known location of the entire population. By continually updating their velocities and positions, particles move toward the optimal solution and ultimately find the target solution. The identification of Thevenin model parameters was carried out using PSO in conjunction with HPPC test data obtained from the battery, with the identified model parameters shown in Table 2.

4. Method for SOC Estimation

4.1. The UKF Method

The UKF employs the UT to substitute the linearization process of the Taylor expansion in nonlinear systems, thereby avoiding the introduction of linear errors. The approach also removes the necessity to compute the complex Jacobian matrix for the system equations, effectively reducing the computational load and minimizing state estimation errors [33]. The equation of the nonlinear system of the battery, considering the impact of noise, can be expressed in the following form:
x k + 1 = f ( x k , u k ) + ω k y k = h ( x k , u k ) + v k .
where f and h represent the state and observation equations of the nonlinear system, respectively, x denotes the state vector of the system with x k + 1 equal to [ S O C k ,   U p , k ] , y denotes the observation vector of the system with y k equal to U t , k , u represents the input vector with u k equal to I k , ω k is the process noise with the covariance Q , and v k is the observation noise with the covariance R . It is assumed that both ω k and v k are Gaussian white noises and are independent of each other.
The UKF approximates the real system using the UT [34]. The UT, as a numerical sampling method, involves identifying a minimal set of Sigma points to estimate the mean and covariance of the state variables after undergoing a nonlinear transformation. Subsequently, the system equations are mapped to generate new Sigma points which are then used to obtain the transformed mean and covariance. The steps of the UT are as follows:
(1) Compute the Sigma sampling points:
x ( 0 ) = x ¯ , i = 0 x ( i ) = x ¯ + ( ( n + λ ) P ) i , i = 1 n x ( i ) = x ¯ ( ( n + λ ) P ) i , i = n + 1 2 n .
(2) Compute the weights corresponding to the Sigma sampling points:
ω m ( 0 ) = λ n + λ ω c ( 0 ) = λ n + λ + ( 1 α 2 + β ) ω m ( i ) = ω c ( i ) = λ 2 ( n + λ ) , i = 1 2 n .
where x - and P represent the mean and covariance, respectively. i denotes the serial number of the sampling point; n is the dimension of the state; ω m is the weight of the mean; ω c is the weight assigned to the covariance; λ is a scaling factor intended to reduce the overall prediction error and complies with parameters λ = α 2 ( n + Κ ) n and Κ = 3 n ; Κ is a parameter to be determined, and it is often set to 0 to ensure that ( n + λ ) P represents a semi-positive definite matrix; α is a coefficient that controls the state of the sampling point distribution, ranging from 0 to 1; and β is a parameter to be determined, required to be greater than or equal to 0, used to integrate the effects of higher-order terms.

4.2. The LSTM Network Method

Temporal relationships are crucial in battery test data. Unlike the traditional BP network, which completely ignores the impact of temporal relationships on data modeling, the recurrent neural network (RNN) incorporates the memory cell to preserve historical information, thereby enhancing the forecasting accuracy of time series data [35]. As a variant of the RNN, the LSTM network was proposed by Hochreiter et al. [36]. It is specifically designed to address the issue of long-term dependencies. The network can be trained to retain information over extended periods and possesses specific memory functions. It primarily consists of the memory cell, forget gate, input gate, and output gate. The input gate regulates the incoming information of the neuron at a specific moment. The output gate simultaneously manages the output information of the neuron; the forget gate allows the model to choose whether to discard or retain old information upon the introduction of new data. By controlling the memory cell through the forget gate and input gate, issues such as gradient vanishing and explosion can be efficiently avoided, and the ability of the neural network to extract time series relationships can be enhanced [37]. The computation of the LSTM network with the time step k is as follows:
c k = f k c k 1 + i k tanh ( W c x k + U c h k 1 + b c ) f k = σ g ( W f x k + U f h k 1 + b f ) i k = σ g ( W i x k + U i h k 1 + b i ) o k = σ g ( W o x k + U o h k 1 + b o ) h k = tanh ( c k ) o k .
where k is the current moments and k - 1 denotes the previous moments. The variables i k , f k , o k , and c k represent the outputs of the input gate, forget gate, output gate, and cell state update, respectively; W f , W i , W c , and W o are the input weights corresponding to these four components, respectively; U f , U i , U c , and U o are the output weights corresponding to these components, respectively; b f , b i , b c , and b o are the biases corresponding to these states, respectively; x k and h k represent the input vectors and the outputs of the hidden layer, respectively; and σ g and tanh are the activation functions used.

4.3. Improving the UKF Method Using LSTM Network

The UKF, based on Bayesian theory and the UT, exhibits good applicability in battery SOC estimation. However, it also faces challenges with unstable estimation results and greater errors. This instability arises because the UT cannot fully replicate actual data distributions, and the process and observation noises in the UKF additionally compromise the results, leading to uncertain SOC estimates. Moreover, the UKF demands high precision in battery modeling, yet the identified model parameters do not accurately represent the battery during SOC estimation, resulting in some errors. Given these issues, it is challenging to achieve accurate SOC estimation using only a model-based UKF in actual operation.
The LSTM network, recognized for its potent learning and mapping capabilities, is particularly effective in processing time series data and addressing long-term dependency issues. Considering that the UKF is prone to estimation errors due to inherent defects, noise introduction and model inaccuracy, an LSTM network is leveraged for offline training to compensate for these shortcomings in the UKF. Consequently, the LSTM network can correct estimation errors of the UKF, enhancing its SOC estimation accuracy.
The implementation process of the UKF-LSTM joint method is as follows:
(1) The SOC pre-estimation using UKF:
UKF obtains the Kalman gain ( K k ) by measuring and predicting the covariance and realizes the state estimation by dynamically adjusting the weight using the K k and combining the error of the terminal voltage ( e k ). Considering that the K k and e k can extensively represent the characteristics and distribution of the entire error prediction data set, and the UKF estimation result ( S O C k ) can also directly affect the error. Therefore, following the principle of neural network sample selection with small similarity between parameters, K k , e k , and S O C k are selected as the input, and the state estimation error ( E r r k ) is used as the output to train the LSTM network.
Based on the analysis above, firstly, PSO is utilized to obtain the parameters of the Thevenin model, obtaining R 0 , R p , and C p based on data collected from the battery HPPC test. Secondly, the HPPC test data are input into the UKF and executed, with the K k , e k , and S O C k being recorded at each moment of the UKF calculation process, and the SOC estimation error of the UKF is obtained.
(2) Training the LSTM network:
Firstly, to prevent the large difference in data scale in the data set, the following formula is used to standardize the data set.
Z = x X ¯ S .
where X - and S are the mean and standard deviation of the entire training data set, respectively, and x is the original value. The test data set is scaled using the same X - and S values as the training data set.
Secondly, to enhance the computational efficiency of the LSTM network, the hidden layer is configured as a single layer after weighing the network depth and computational efficiency. The hidden layer comprises 500 units; the initial learning rate is configured to 0.0008 after several adjustments. Additionally, a strategy of gradual decay in the learning rate is implemented, where the learning rate is reduced by a decay factor of 0.5 every 20 training cycles; the batch size is set to 120, given the computational efficiency and the size of the data set; and the maximum number of iterations for constructing the network is capped at 80 for the construction of the network. The input features are defined as K k , e k , and S O C k , and the output feature is E r r k . To accurately identify the difference between the forecasted and actual values during the forward transfer process and thus control the size of the weight gradient in the network, the root mean square error (RMSE) is employed as the loss function of the LSTM network.
R M S E = 1 N k = 1 N [ E r r k E r r k ] 2 .
where N is the length of time, the E r r k and E r r k are the input error and prediction error at the moment k , respectively.
Finally, the feature parameters under the HPPC test are used as the training data set for the LSTM network. The LSTM network, which is constructed and trained using the aforementioned data set, is employed to correct the SOC estimation discrepancies for the UKF.
(3) Building the joint algorithm for error compensation:
Firstly, the test data set is selected, and the corresponding K k , e k , S O C k , and E r r k are calculated during the SOC estimation operation of the UKF. Secondly, the feature parameters are input into the LSTM network that has been successfully trained, and the SOC estimation error of the UKF is predicted. Lastly, the optimal SOC estimation is obtained after error compensation by the LSTM network. The framework of the combined UKF-LSTM algorithm is shown in Figure 5.

5. Results and Discussions

5.1. Verification of Parameter Identification

The accuracy of parameter identification was validated using UDDS test data. Results obtained from PSO were applied to the Thevenin model to predict terminal voltage values. These predicted voltages were then compared and analyzed with the measured values to validate the accuracy of the identification results. The terminal voltage error for the UDDS test is illustrated in Figure 6 to verify the parameter identification results. As depicted in Figure 6, considerable error fluctuations were observed at the beginning of each charge and discharge cycle, attributed to the polarization effect in lithium batteries. Notably, there were rises in the error at the end of the working condition charge and discharge, particularly after 12,626 s, due to the chemical instability caused by the low capacity of the LIB. The remaining sections of the terminal voltage error were maintained within 40 mV. The mean absolute error (MAE) and RMSE for the terminal voltage were 19.8 mV and 19.6 mV, respectively. The validation results demonstrate that PSO effectively identified model parameters, and the Thevenin model simulated the characteristics of the LIB well.

5.2. Analysis of SOC Estimation Results

To evaluate the effectiveness of the algorithm proposed in this study, 15,476 valid data sets from the UDDS test were individually input into the EKF, UKF, and UKF-LSTM algorithms. The SOC estimation outcomes for three algorithms from the UDDS test are shown in Figure 7. As observed from Figure 7b, the error curve trends of the UKF and UKF-LSTM algorithms are quite similar, both exhibiting some error fluctuations. However, the fluctuations of the proposed algorithm are notably smaller. Among these algorithms, the difference between the SOC estimates derived from the EKF and the true values was more significant. This discrepancy is attributed to the drastic chemical reactions of the lithium battery under frequent and high discharge rates during the UDDS test, rendering the EKF unable to complete accurate SOC estimation. In comparison to the EKF, the UKF demonstrated higher accuracy in estimating the SOC. This enhancement arose because the UT used in the UKF does not require the neglect of higher-order terms, thereby providing greater computational accuracy for nonlinear systems. Compared to the first two algorithms, the UKF-LSTM yielded the lowest SOC estimation errors, and its error variation range was also smaller. This improvement was due to the LSTM network effectively mitigating the errors of the UKF, significantly enhancing SOC estimation accuracy.
To thoroughly assess the effectiveness of the joint algorithm, the MAE and RMSE of various SOC estimation algorithms were computed. From the data provided in Table 3, it was concluded that the MAE and RMSE of the UKF-LSTM decreased by 0.9841% and 0.3164%, respectively, compared to the EKF. Compared to those of the UKF, the MAE and RMSE of the UKF-LSTM decreased by 0.0852% and 0.1184%, respectively. The computational results indicate that the algorithm proposed in this study attained superior SOC estimation accuracy compared to conventional methods in the UDDS test.
To rigorously evaluate the robustness and generalization capacity of the proposed algorithm, a total of 13,500 valid data sets derived from the DST were employed for validation. Figure 8 depicts the estimated SOC values of the three algorithms assessed in the DST. The true value of the SOC was calculated by the Coulomb counting method. As depicted in Figure 8a, the SOC estimation result of the UKF-LSTM fluctuated within a narrow range around the true value, and its curve-fitting effect is noticeably superior to that of the EKF and UKF, fully demonstrating the error correction capability of the LSTM network. As evident from the estimation error comparison graph in Figure 8b, unlike the error curve of the EKF, the UKF and UKF-LSTM exhibit roughly the same trend. At the beginning of discharge, the error of UKF was very small, so the error compensation effect of the neural network was not prominent. However, as the discharge deepened, the UKF showed substantial error fluctuations under the DST, while the fluctuations of the UKF-LSTM were considerably smaller. The error curves of both UKF and the proposed algorithm tend to rise in the middle and late stages of discharge, but the UKF-LSTM maintained a smaller error and exhibited higher estimation accuracy.
The SOC estimation errors of the three algorithms were calculated from the DST. They can be analyzed from the data provided in Table 4. Compared to the EKF, the UKF-LSTM exhibited a reduction in the MAE by 0.9841% and in the RMSE by 0.3164%, respectively. Furthermore, compared to the UKF, the UKF-LSTM demonstrated a decrease in the MAE by 0.0852% and in the RMSE by 0.1184%, respectively. Under the DST conditions, the proposed algorithm demonstrated superior SOC estimation accuracy compared to conventional Kalman filter algorithms.

6. Conclusions

As a classical KF algorithm, the UKF is widely utilized in estimating the SOC of LIBs. To enhance the precision of SOC estimation using the UKF, an innovative UKF-LSTM error compensation algorithm utilizing the LSTM network was introduced. The precision and robustness of SOC estimation using the proposed method were validated through different experiments.
(1)
In this study, the Thevenin model was used to characterize the battery. The unknown parameters of the battery model were obtained by the PSO algorithm, and the model accuracy was verified using the UDDS test. The validation results demonstrate that PSO could accurately identify the model parameters, and the Thevenin model could effectively characterize the battery.
(2)
A joint UKF-LSTM algorithm is proposed, which utilizes an LSTM network to correct the estimation error of the UKF. The LSTM network is trained using feature parameters that affect the UKF estimation error. Then, the LSTM network is employed to reduce the error of the UKF, thereby improving its SOC estimation performance.
(3)
The HPPC test data were used for training, while experimental data from the UDDS tests and DSTs were employed for validation. The results indicate that the RMSE of the UKF-LSTM could be controlled under 0.6132% under both validation conditions. Compared to that of the UKF, the RMSE of the proposed algorithm decreased by 0.1184% and 0.4936% in the UDDS tests and DSTs, respectively. In summary, the UKF-LSTM exhibited high accuracy and robustness in the SOC estimation, thus ensuring the reliability of SOC estimates.
In future studies, the impact of parameters such as temperature and cycle aging on SOC estimation will be considered. Moreover, the experimental samples will be expanded to include various types of lithium-ion batteries to enhance the generalization of the proposed method.

Author Contributions

Conceptualization, L.P. and C.W.; methodology, L.P.; software, L.P.; validation, L.P. and C.W.; formal analysis, L.P.; investigation, L.P.; resources, L.P.; data curation, L.P.; writing—original draft preparation, L.P.; writing—review and editing, L.P.; visualization, L.P.; supervision, C.W.; project administration, L.P.; funding acquisition, C.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Natural Science Foundation of Sichuan (Grant No. 2024NSFSC0145) and Sichuan Provincial Key Lab of Process Equipment and Control (Grant No. GK202405) and supported by the Scientific Research and Innovation Team Program of Sichuan University of Science and Engineering (Grant No. SUSE652A004) and the Graduate Innovation Foundation of Sichuan University of Science and Engineering (Grant No. Y2023089). The systemic experiments were performed at the Advanced Energy Storage and Application (AESA) Group, Beijing Institute of Technology.

Data Availability Statement

The original data are included in this article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Zhou, W.; Zheng, Y.; Pan, Z.; Lu, Q. Review on the Battery Model and SOC Estimation Method. Processes 2021, 9, 1685. [Google Scholar] [CrossRef]
  2. Du, X.; Meng, J.; Peng, J. Hybrid Pseudorandom Sequence for Broadband Impedance Measurements of Lithium-Ion Batteries. IEEE Trans. Ind. Electron. 2023, 70, 6856–6864. [Google Scholar] [CrossRef]
  3. Lyu, W.; Fu, H.; Rao, A.M.; Lu, Z.; Yu, X.; Lin, Y.; Zhou, J.; Lu, B. Permeable Void-Free Interface for All-Solid-State Alkali-Ion Polymer Batteries. Sci. Adv. 2024, 10, eadr9602. [Google Scholar] [CrossRef] [PubMed]
  4. Lyu, W.; Yu, X.; Lv, Y.; Rao, A.M.; Zhou, J.; Lu, B. Building Stable Solid-State Potassium Metal Batteries. Adv. Mater. 2024, 36, 2305795. [Google Scholar] [CrossRef] [PubMed]
  5. Xia, M.; Zhou, J.; Lu, B. Comprehensive Insights into Aqueous Potassium-Ion Batteries. Adv. Energy Mater. 2024, 2404032. [Google Scholar] [CrossRef]
  6. Semeraro, C.; Caggiano, M.; Olabi, A.-G.; Dassisti, M. Battery Monitoring and Prognostics Optimization Techniques: Challenges and Opportunities. Energy 2022, 255, 124538. [Google Scholar] [CrossRef]
  7. Chen, C.; Xiong, R.; Yang, R.; Li, H. A Novel Data-Driven Method for Mining Battery Open-Circuit Voltage Characterization. Green Energy Intell. Transp. 2022, 1, 100001. [Google Scholar] [CrossRef]
  8. Xiong, X.; Wang, S.-L.; Fernandez, C.; Yu, C.-M.; Zou, C.-Y.; Jiang, C. A Novel Practical State of Charge Estimation Method: An Adaptive Improved Ampere-Hour Method Based on Composite Correction Factor. Int. J. Energy Res. 2020, 44, 11385–11404. [Google Scholar] [CrossRef]
  9. Shrivastava, P.; Naidu, P.A.; Sharma, S.; Panigrahi, B.K.; Garg, A. Review on Technological Advancement of Lithium-Ion Battery States Estimation Methods for Electric Vehicle Applications. J. Energy Storage 2023, 64, 107159. [Google Scholar] [CrossRef]
  10. Wang, W.; Fu, R. Stability Analysis of EKF-Based SOC Observer for Lithium-Ion Battery. Energies 2023, 16, 5946. [Google Scholar] [CrossRef]
  11. Yao, B.; Cai, Y.; Liu, W.; Wang, Y.; Chen, X.; Liao, Q.; Fu, Z.; Cheng, Z. State-of-Charge Estimation for Lithium-Ion Batteries Based on Modified Unscented Kalman Filter Using Improved Parameter Identification. Int. J. Electrochem. Sci. 2024, 19, 100574. [Google Scholar] [CrossRef]
  12. Yang, B.; Wang, J.; Cao, P.; Zhu, T.; Shu, H.; Chen, J.; Zhang, J.; Zhu, J. Classification, Summarization and Perspectives on State-of-Charge Estimation of Lithium-Ion Batteries Used in Electric Vehicles: A Critical Comprehensive Survey. J. Energy Storage 2021, 39, 102572. [Google Scholar] [CrossRef]
  13. Sangeetha, E.P.; Subashini, N.; Santhosh, T.K.; Lindiya, S.A.; Uma, D. Validation of EKF Based SoC Estimation Using Vehicle Dynamic Modelling for Range Prediction. Electr. Power Syst. Res. 2024, 226, 109905. [Google Scholar] [CrossRef]
  14. Vedhanayaki, S.; Indragandhi, V. Certain Investigation and Implementation of Coulomb Counting Based Unscented Kalman Filter for State of Charge Estimation of Lithium-Ion Batteries Used in Electric Vehicle Application. Int. J. Thermofluids 2023, 18, 100335. [Google Scholar] [CrossRef]
  15. Wang, S.; Dang, Q.; Gao, Z.; Li, B.; Fernandez, C.; Blaabjerg, F. An Innovative Square Root-Untraced Kalman Filtering Strategy with Full-Parameter Online Identification for State of Power Evaluation of Lithium-Ion Batteries. J. Energy Storage 2024, 104, 114555. [Google Scholar] [CrossRef]
  16. Yu, Q.; Liu, Y.; Long, S.; Jin, X.; Li, J.; Shen, W. A Branch Current Estimation and Correction Method for a Parallel Connected Battery System Based on Dual BP Neural Networks. Green Energy Intell. Transp. 2022, 1, 100029. [Google Scholar] [CrossRef]
  17. Dhaked, D.K.; Dadhich, S.; Birla, D. Power Output Forecasting of Solar Photovoltaic Plant Using LSTM. Green Energy Intell. Transp. 2023, 2, 100113. [Google Scholar] [CrossRef]
  18. Ma, L.; Zhang, T. Deep Learning-Based Battery State of Charge Estimation: Enhancing Estimation Performance with Unlabelled Training Samples. J. Energy Chem. 2023, 80, 48–57. [Google Scholar] [CrossRef]
  19. Mao, X.; Song, S.; Ding, F. Optimal BP Neural Network Algorithm for State of Charge Estimation of Lithium-Ion Battery Using PSO with Levy Flight. J. Energy Storage 2022, 49, 104139. [Google Scholar] [CrossRef]
  20. Almaita, E.; Alshkoor, S.; Abdelsalam, E.; Almomani, F. State of Charge Estimation for a Group of Lithium-Ion Batteries Using Long Short-Term Memory Neural Network. J. Energy Storage 2022, 52, 104761. [Google Scholar] [CrossRef]
  21. Chai, X.; Li, S.; Liang, F. A Novel Battery SOC Estimation Method Based on Random Search Optimized LSTM Neural Network. Energy 2024, 306, 132583. [Google Scholar] [CrossRef]
  22. El Fallah, S.; Kharbach, J.; Hammouch, Z.; Rezzouk, A.; Jamil, M.O. State of Charge Estimation of an Electric Vehicle’s Battery Using Deep Neural Networks: Simulation and Experimental Results. J. Energy Storage 2023, 62, 106904. [Google Scholar] [CrossRef]
  23. Zhao, X.; Sun, B.; Zhang, W.; He, X.; Ma, S.; Zhang, J.; Liu, X. Error Theory Study on EKF-Based SOC and Effective Error Estimation Strategy for Li-Ion Batteries. Appl. Energy 2024, 353, 121992. [Google Scholar] [CrossRef]
  24. Zeng, Y.; Li, Y.; Yang, T. State of Charge Estimation for Lithium-Ion Battery Based on Unscented Kalman Filter and Long Short-Term Memory Neural Network. Batteries 2023, 9, 358. [Google Scholar] [CrossRef]
  25. Pei, Z.; Liu, K.; Zhang, S.; Chen, X. Optimized EKF Algorithm Using TSO-BP Neural Network for Lithium Battery State of Charge Estimation. J. Energy Storage 2023, 73, 108882. [Google Scholar] [CrossRef]
  26. Lin, Q.; Li, X.; Tu, B.; Cao, J.; Zhang, M.; Xiang, J. Stable and Accurate Estimation of SOC Using eXogenous Kalman Filter for Lithium-Ion Batteries. Sensors 2023, 23, 467. [Google Scholar] [CrossRef]
  27. Kim, W.; Lee, P.-Y.; Kim, J.; Kim, K.-S. A Robust State of Charge Estimation Approach Based on Nonlinear Battery Cell Model for Lithium-Ion Batteries in Electric Vehicles. IEEE Trans. Veh. Technol. 2021, 70, 5638–5647. [Google Scholar] [CrossRef]
  28. Khan, Z.A.; Shrivastava, P.; Amrr, S.M.; Mekhilef, S.; Algethami, A.A.; Seyedmahmoudian, M.; Stojcevski, A. A Comparative Study on Different Online State of Charge Estimation Algorithms for Lithium-Ion Batteries. Sustainability 2022, 14, 7412. [Google Scholar] [CrossRef]
  29. Tang, A.; Yao, L.; Gong, P.; Jiang, Y. Lithium-Ion Battery State-of-Charge Estimation of an Order-Reduced Physics-Based Model in Electric Vehicles Considering Erroneous Initialization. Int. J. Energy Res. 2022, 46, 3529–3538. [Google Scholar] [CrossRef]
  30. Baccouche, I.; Jemmali, S.; Manai, B.; Omar, N.; Amara, N.E.B. Improved OCV Model of a Li-Ion NMC Battery for Online SOC Estimation Using the Extended Kalman Filter. Energies 2017, 10, 764. [Google Scholar] [CrossRef]
  31. Chen, L.; Wu, X.; Lopes, A.M.; Yin, L.; Li, P. Adaptive State-of-Charge Estimation of Lithium-Ion Batteries Based on Square-Root Unscented Kalman Filter. Energy 2022, 252, 123972. [Google Scholar] [CrossRef]
  32. Wang, C.; Xu, M.; Zhang, Q.; Feng, J.; Jiang, R.; Wei, Y.; Liu, Y. Parameters Identification of Thevenin Model for Lithium-Ion Batteries Using Self-Adaptive Particle Swarm Optimization Differential Evolution Algorithm to Estimate State of Charge. J. Energy Storage 2021, 44, 103244. [Google Scholar] [CrossRef]
  33. Takyi-Aninakwa, P.; Wang, S.; Liu, G.; Bage, A.N.; Bobobee, E.D.; Appiah, E.; Huang, Q. Enhanced Extended-Input LSTM with an Adaptive Singular Value Decomposition UKF for LIB SOC Estimation Using Full-Cycle Current Rate and Temperature Data. Appl. Energy 2024, 363, 123056. [Google Scholar] [CrossRef]
  34. Hossain, M.; Haque, M.E.; Arif, M.T. Kalman Filtering Techniques for the Online Model Parameters and State of Charge Estimation of the Li-Ion Batteries: A Comparative Analysis. J. Energy Storage 2022, 51, 104174. [Google Scholar] [CrossRef]
  35. Chen, J.; Zhang, Y.; Wu, J.; Cheng, W.; Zhu, Q. SOC Estimation for Lithium-Ion Battery Using the LSTM-RNN with Extended Input and Constrained Output. Energy 2023, 262, 125375. [Google Scholar] [CrossRef]
  36. Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
  37. Yang, F.; Zhang, S.; Li, W.; Miao, Q. State-of-Charge Estimation of Lithium-Ion Batteries Using LSTM and UKF. Energy 2020, 201, 117664. [Google Scholar] [CrossRef]
Figure 1. Composition of battery test platform.
Figure 1. Composition of battery test platform.
Energies 18 01106 g001
Figure 2. The test results at 25 °C: (a) the current of the HPPC test; (b) the voltage of the HPPC test; (c) the current of the UDDS test; (d) the voltage of the UDDS test; (e) the current of the DST; and (f) the voltage of the DST.
Figure 2. The test results at 25 °C: (a) the current of the HPPC test; (b) the voltage of the HPPC test; (c) the current of the UDDS test; (d) the voltage of the UDDS test; (e) the current of the DST; and (f) the voltage of the DST.
Energies 18 01106 g002
Figure 3. The composition of the Thevenin model circuit.
Figure 3. The composition of the Thevenin model circuit.
Energies 18 01106 g003
Figure 4. The OCV-SOC fitting curve.
Figure 4. The OCV-SOC fitting curve.
Energies 18 01106 g004
Figure 5. The framework of the UKF-LSTM joint algorithm.
Figure 5. The framework of the UKF-LSTM joint algorithm.
Energies 18 01106 g005
Figure 6. The terminal voltage error of the UDDS test.
Figure 6. The terminal voltage error of the UDDS test.
Energies 18 01106 g006
Figure 7. SOC estimation results for UDDS test. (a) SOC results. (b) SOC error.
Figure 7. SOC estimation results for UDDS test. (a) SOC results. (b) SOC error.
Energies 18 01106 g007
Figure 8. SOC estimation results for the DST: (a) the SOC results; (b) the SOC error.
Figure 8. SOC estimation results for the DST: (a) the SOC results; (b) the SOC error.
Energies 18 01106 g008
Table 1. Parameters of the battery.
Table 1. Parameters of the battery.
Normal CapacityNormal VoltageVoltage RangeTemperature Range
2 Ah3.6 V[3.0, 4.1] V[−10, 45] °C
Table 2. Parameters of the Thevenin model.
Table 2. Parameters of the Thevenin model.
SOC (100%) R0 (Ω) Rp (Ω) τ
1000.04290.012718.8830
900.04320.019825.1113
800.04350.020026.4768
700.04270.020024.7980
600.04330.019935.9415
500.04330.016028.5256
400.04360.017030.2397
300.04370.016025.9252
200.04550.020030.5394
100.06530.020047.8707
Table 3. SOC estimation error statistical analysis for the UDDS test.
Table 3. SOC estimation error statistical analysis for the UDDS test.
MethodsMAE (%)RMSE (%)
EKF1.34690.5568
UKF0.44800.3588
UKF-LSTM0.36280.2404
Table 4. SOC estimation error statistical analysis for the DST.
Table 4. SOC estimation error statistical analysis for the DST.
MethodsMAE (%)RMSE (%)
EKF1.84601.8027
UKF1.20851.1068
UKF-LSTM0.68410.6132
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Pu, L.; Wang, C. Combined State-of-Charge Estimation Method for Lithium-Ion Batteries Using Long Short-Term Memory Network and Unscented Kalman Filter. Energies 2025, 18, 1106. https://doi.org/10.3390/en18051106

AMA Style

Pu L, Wang C. Combined State-of-Charge Estimation Method for Lithium-Ion Batteries Using Long Short-Term Memory Network and Unscented Kalman Filter. Energies. 2025; 18(5):1106. https://doi.org/10.3390/en18051106

Chicago/Turabian Style

Pu, Long, and Chun Wang. 2025. "Combined State-of-Charge Estimation Method for Lithium-Ion Batteries Using Long Short-Term Memory Network and Unscented Kalman Filter" Energies 18, no. 5: 1106. https://doi.org/10.3390/en18051106

APA Style

Pu, L., & Wang, C. (2025). Combined State-of-Charge Estimation Method for Lithium-Ion Batteries Using Long Short-Term Memory Network and Unscented Kalman Filter. Energies, 18(5), 1106. https://doi.org/10.3390/en18051106

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