Next Article in Journal
Method for Recognition of Communication Interference Signals under Small-Sample Conditions
Previous Article in Journal
Railway Track Tamping Maintenance Cycle Prediction Model Based on Power-Time-Transformed Wiener Process
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Lithium Battery SoC Estimation Based on Improved Iterated Extended Kalman Filter

1
School of Electronics and Control Engineering, Chang’an University, Xi’an 710064, China
2
School of Automotive Engineering, Harbin Institute of Technology, Weihai 264209, China
3
School of Energy and Electrical Engineering, Chang’an University, Xi’an 710064, China
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2024, 14(13), 5868; https://doi.org/10.3390/app14135868
Submission received: 22 May 2024 / Revised: 22 June 2024 / Accepted: 26 June 2024 / Published: 4 July 2024

Abstract

:

Featured Application

The LM-IEKF algorithm proposed in this paper can effectively estimate the state of charge of a lithium-ion battery, and it is suitable for the estimation of an electric vehicle. The error covariance matrix in the IKEF process is modified by the LM algorithm, and it can still maintain a good convergence speed and estimation accuracy in the face of severe current changes.

Abstract

With the application of lithium batteries more and more widely, in order to accurately estimate the state of charge (SoC) of the battery, this paper uses the iterated extended Kalman filter (IEKF) algorithm to estimate the SoC. The Levenberg–Marquardt (LM) method is used to optimize the error covariance matrix of IKEF. Based on the hybrid pulse power characteristics experiment, a second-order Thevenin model with variable parameters is established on the MATLAB platform. The experimental results show that the proposed model is effective under the constant current discharge condition, the Federal Urban Driving Schedule (FUDS) condition, and the Beijing dynamic stress test (BJDST) condition. The results show that the simulation error of the improved LM-IEKF algorithm is less than 2% under different working conditions, which is lower than that of the IKEF algorithm. The improved algorithm has a fast convergence speed to the true value, and it has a good estimation accuracy in the case of large changes in external input current. Additionally, the fluctuation of error is relatively stable, which proves the reliability of the algorithm.

1. Introduction

With the continuous development of new energy vehicles, lithium-ion batteries have been widely used in the field of electric vehicles due to their high energy density and long cycle life [1,2]. In order to enable the battery to provide stable and reliable energy and avoid the phenomenon of over-charge or over-discharge, it is very important to accurately estimate the state of charge (SoC) of the battery.
The SoC of the battery represents the ratio of the available power of the battery at this time to the total power that can be stored in it [3], reflecting the remaining capacity of the battery at this moment [4]. Since most of the energy in the battery is output to the outside world in the form of current, the charge–discharge current is a key clue for analyzing the SoC. In addition, during the charge–discharge cycle, the maximum usable capacity of the battery will gradually decay. This means that the maximum value of the SoC will change, but since the SoC is a real-time estimate, this weak attenuation phenomenon is insignificant for the real-time change caused by the SoC compared to the charge or discharge current.
Combined with the performance requirements in the use of electric vehicles and the meaning of SoC, it is not difficult to see that it is important to accurately estimate the SoC, which is not only related to the range of electric vehicles but also directly affects the performance of the battery. Accurate estimation of SoC is related to the driving range and performance of electric vehicles, but SoC cannot be measured directly and can only be obtained through indirect estimation methods [5]. Therefore, researchers constantly try to improve and optimize SoC estimation algorithms to meet the needs of high accuracy, real-time performance, and high efficiency in the field of electric vehicles.
Currently, common SoC estimation methods include the ampere-hour integration method, open-circuit voltage method, neural network method, Kalman filter (KF) method, etc. [6]. For the ampere-hour integration method, its accuracy is highly dependent on the accuracy of the current measurement and the accuracy of the initial SoC value [7]. With the increase in time, the error will be accumulated, and the estimation result will become worse [8]. The open-circuit voltage method can estimate the SoC according to the open-circuit voltage at this time, but this method is not suitable for real-time estimation [9] because the accurate measurement of the open-circuit voltage usually requires the battery to stand for a long time to reach a stable state [10, 11]. The accuracy of battery SoC estimation using the neural network method is relatively high [12], but the high-precision estimation results depend on a large amount of sample data training, and the algorithm requires a large number of calculations [13].
For example, Lee et al. [14] used the extended Kalman filter (EKF) to predict the lithium-ion battery SoC, and the prediction error was kept at about 3%, which avoided the shortcomings of the poor adaptability of the Kalman filter to the nonlinear model. Some scholars [15] use the unscented Kalman filtering (UKF) method to predict the battery SoC, which is based on the unscented transform. It obtains good prediction results in the early and late stages of battery charging and discharging, with a fast convergence speed. Some scholars have introduced the iterated extended Kalman filter (IEKF) algorithm in the process of computing SoCs to improve the estimation accuracy. However, that too many iterations of the IEKF method will lead to an increase in the computation time. Therefore, the improvement effect of the estimation accuracy of the SoC is not obvious within a limited number of iterations. More deeply, Bizeray et al. [16] proposed a thermoelectrochemical coupling model for the EKF algorithm, which helps to solve the SoC estimation problem when there is a certain error in the initial voltage measurement, through which the estimated SoC value of the EKF algorithm can quickly reduce the estimation error within 200 s after starting. Zhou et al. [17] used the PNGV equivalent circuit model combined with the adaptive fading unscented Kalman filter algorithm to estimate the battery SoC, which improved the accuracy and convergence speed of the filter. However, the complexity of the PNGV model is high, which increases the computational requirements.
Through the exploration of the current research status of SoC prediction, it is not difficult to find that the various filtering algorithms based on the Kalman filter algorithm are the most promising directions. However, the shortcomings of the Kalman filter method, such as its slow convergence speed, still need to be further improved. Researchers must strive to avoid its shortcomings while giving full play to the characteristics of the Kalman filter estimation effect and low calculation difficulty.
The characteristics of various common SoC estimation methods are shown in Table 1.
In order to solve the problems in the estimation process of the above algorithms, this paper takes the INR 18650-20R lithium battery (the manufacturer is South Korea Samsung Company, sourced from Seoul, South Korea, purchased in Shenzhen, China) as the research object, establishes a second-order Thevenin equivalent circuit model to simulate the characteristics of lithium batteries, identifies the equivalent parameters of the battery through HPPC testing, and plots the OCV–SoC curve according to the parameters obtained by HPPC testing. Finally, it constructs the expression of the battery equivalent model.
Then, different simulation conditions are set up to estimate the SoC of the battery, and the LM-IEKF algorithm is innovatively proposed, which fuses the LM (Levenberg–Marquardt) method with the IKEF algorithm [18].
A multi-step iteration strategy based on the LM algorithm is used to estimate the state and error covariance of the update stage, and the iteration process is optimized.
Finally, in order to verify the LM-IEKF algorithm proposed in this paper, the EKF and IEKF algorithms are used to estimate the value of the SoC under the same working conditions, and the error of the three algorithms is compared. It is proved that the LM-IEKF algorithm proposed in this paper has the characteristics of a high accuracy, fast convergence speed, and strong robustness, and it can be well adapted to the situation of large current fluctuations.
The LM-IKEF algorithm proposed in this paper gives full play to the characteristics of the high prediction accuracy of the Kalman filter method, obtains good SoC estimation results, and also overcomes the problems of slow convergence speed and high computational complexity, which has good practical significance. Currently, with the increasing development of new energy technology, it is important not only for the field of electric vehicles but also for the scientific and technological development of unmanned robots and energy storage tools.

2. Construction of Battery Model

2.1. Selection of Equivalent Circuit Model

The equivalent circuit model is the most widely used battery model in recent years. The more common battery equivalent circuit models are the first-order Thevenin model, the second-order Thevenin model, and the PNGV model, among which the PNGV model is relatively accurate, but its computational complexity is very high [19]. The second-order Thevenin model adds an RC parallel loop to the first-order Thevenin model [20]. Compared with the first-order Thevenin model, the second-order Thevenin model describes the polarization characteristics of the battery more accurately [21], which ensures the accuracy of the model, while the computational complexity is not too high. Therefore, the second-order Thevenin model is selected in this paper, and the model is shown in Figure 1.
Based on the definition of SoC, the SoC variation of the battery can be expressed in Equation (1) [22]:
S o C t = S o C 0 + t 0 t η Q n I L ( t ) d t
where S o C t represents the SoC value of the battery at the moment t, S o C 0 represents the value of SoC in the initial state, η is the coulombic efficiency, Q n represents the single rated capacity of the battery [23], I L ( t ) represents the current value at the moment t, and defines the discharge current as negative and the charge current as positive.
Based on Kirchhoff’s law, and incorporating the change in battery SoC versus time, the dynamic equation of the equivalent circuit can be expressed as follows [24]:
U t = OCV ( S O C ) U c 1 U c 2 I L R 0
{ d S o C   d t = η Q N I L d U c 1   d t = U c 1 R 1 C 1 + I L C 1 d U c 2   d t = U c 2 R 2 C 2 + I L C 2
where U t represents the terminal voltage of the lithium-ion battery at moment t; OCV (SoC) represents the open-circuit voltage value of the battery in the current state; R 0 represents the Ohmic internal resistance of the battery; R 1 and C 1 represent the polarization internal resistance and capacitance during battery discharge, respectively; R 2 and C 2 represent the concentration polarization resistance and capacitance, respectively [25]; U c 1 and U c 2 represent the voltage across the two RC loops, respectively; and I L is the operating current.

2.2. Equivalent Circuit Model Parameter Identification

In order to obtain accurate model parameters, it is necessary to identify the parameters OCV , R 0 , R 1 , C 1 , R 2 , and C 2 in the model at different SoCs. In this paper, the INR 18650-20R lithium-ion battery is used, which has a nominal voltage of 3.6 V, a charging cutoff voltage of 4.2 V, a discharging cutoff voltage of 2.5 V, a single-unit rated capacity of 2000 mAh, and a maximum discharging multiplication rate of 11 C (at 25 °C).
The hybrid power pulse characterization test, or the HPPC test [26], is performed on the battery not only to obtain the relationship between the OCV of the battery and the SoC but also to identify the parameters in the equivalent circuit model of the battery. The open-circuit voltage of the battery at this time is recorded once every second during the process of identification, and the temperature is maintained at a constant of 25 °C during the experimental process. The specific procedure of the test is as follows:
Fill the battery with a constant current and leave it for 2 h to restore the battery to equilibrium. This process brings the battery to a steady state, which is a prerequisite for HPPC testing.
Discharge the battery using a current of 0.5 C for 12 min to reduce the SoC by 10%. The goal of stopping the discharge as soon as the discharge time is up is to accurately obtain the rebound characteristics of the voltage-to-SoC curve at every 10% of the charge.
Let the battery stand for two hours. This process also brings the battery to a steady state so that the rebound characteristics of the voltage-to-SoC curve can be tested at a later date when other SoCs can be further tested.
Repeat steps 2 and 3 until the SoC becomes zero. The open-circuit voltage of the battery is measured immediately after the end of each step ②, and these data will provide data support for the subsequent fitting of the OCV–SoC curve.

2.2.1. Fitting of OCV–SoC Curves

Based on the data measured by the HPPC experiment, the open-circuit voltage data of the battery at the end of each step ③ is taken, and in this paper, the relationship between OCV and SoC is fitted using the cftool toolbox in MATLAB. After fitting, the root mean square error of the ninth-degree fitting is obtained as 5.085 × 10 3 , and the fitting effect is relatively good. Figure 2 shows the fitted ninth-degree polynomial fitting curve, whose ninth-degree polynomial is shown in Equation (4).
OCV ( S o C ) = 1674.8 × S o C 9 8204.2 × S o C 8 + 17,097.8 × S o C 7 19,767.3 × S o C 6 + 13,870.3 × S o C 5 6082.3 × S o C 4 + 1660.2 × S o C 3 272.9 × S o C 2 + 25.2 × S o C + 2.50

2.2.2. Second-Order Thevenin Model Parameter Identification

In order to identify the other parameters in the equivalent circuit model, the HPPC experimental data at 90% SoC are studied as an example [27], where the response curve is shown in Figure 3.
First, the parameter R 0 is identified. According to the literature [28], the signal loaded instantaneously by the current is a high-frequency signal, which can directly pass through the capacitors of the two RC loops, so the voltage drop from point A to point B is mainly due to R 0 . And, when the current is withdrawn, since the voltage at the two ends of the capacitors does not change abruptly, but the voltage at R 0 does [29], the voltage change from point C to point D is also due to R 0 . Thus, the value of R 0 can be expressed according to Equation (5):
R 0 = | U A U B | + | U C U D | 2 | I d i s c h arg e |
where U A , U B , U C , and U D represent the end voltage values at points A, B, C, and D, respectively, and I d i s c h a r g e represents the HPPC experimental discharge pulse current.
Next, parameters R 1 , C 1 , R 2 , and C 2 are identified. During current loading, capacitors C 1 and C 2 are charged, and when the current is withdrawn, the electrical energy in the capacitors is consumed by resistors R 1 and R 2 in the two RC loops, respectively. The voltages at the ends of the capacitors are subsequently reduced, and the terminal voltages of the batteries then rise slowly [30]. Considering the DE section as a zero-input voltage response, the change in voltage can be expressed as follows:
U t = O C V I R 1 e t R 1 C 1 I R 2 e t R 2 C 2
In order to obtain the values of the circuit model parameters, the curves of the DE segment are fitted using the cftool toolbox in MATLAB, and the custom equation is selected to self-fit the fitted equation. The self-fitted equation is as follows:
f ( x ) = OCV ( S o C ) b e d x c e e x
In order to make the fitting results as good as possible, the range of the variable values should be limited. Since the parameters b and c of the self-fitting equation represent the voltages at the ends of the two capacitors, respectively, the values of b and c must be greater than or equal to zero. The values of d and e represent the time constants of the two RC loops and should also be not less than 0. According to the above equation:
R 1 = b | I d i s c h arg e | , R 2 = c | I d i s c h arg e | C 1 = 1 R 1 d , C 2 = 1 R 2 e
By performing the same identification at different SoC points, the parameter identification results for this battery equivalent circuit model can be obtained, as shown in Table 2.
The results of Li et al. [31] show that the migration rate of ions slows down and the Ohmic internal resistance increases at lower temperatures, while the opposite is true when the temperature is high, according to Equation (7), which will lead to more obvious dynamic hysteresis characteristics of the battery. This will lead to a change in the identification results of the battery equivalence model. Therefore, in practical applications, HPPC experiments must be carried out at specific temperature intervals to calibrate the battery equivalent model parameters at different temperatures, then the corresponding battery equivalent model parameters should be called according to the real-time temperature when estimating the SoC. This ensures that the estimation of the battery SoC is least affected by the temperature. Therefore, in this paper, the battery SoC is estimated using the battery equivalent model parameters obtained from HPPC experiments on batteries at 25 °C as an example.

3. IEKF Algorithm Based on LM

3.1. Extended Kalman Filter

The Kalman filter (KF) algorithm was proposed in 1958. The algorithm is mainly used to predict the state quantities in a discrete control process. KF combines the prediction value derived from the previous moment and the real-time measurements to predict the system state in the next moment [32]. Kalman filtering requires the relationship between system variables and state quantities to be linear; however, lithium-ion batteries, as complex nonlinear systems, do not satisfy the condition of linearity. Therefore, the extended Kalman Filter (EKF) is used to estimate the SoC of the battery.
The EKF algorithm is based on KF. It approximates the nonlinear system to a linear system with the help of Taylor expansion, followed by Kalman filtering to predict the state quantities of the system. According to the battery equivalent model, the state space equation of the battery system can be listed as follows:
{ x k = f ( x k 1 , u k 1 ) + w k z k = h ( x k , u k ) + v k
where f ( x k 1 , u k 1 ) is the state transfer function; x k 1 and u k 1 represent the state quantity and input quantity of the system at moment k 1 , respectively; w k represents the process noise of the system, whose distribution conforms to the normal distribution and obeys the covariance matrix Q k ; h ( x k ) is the observation function; z k represents the output of the system; and v k represents the observation noise, whose distribution conforms to the normal distribution and obeys the covariance matrix R k .
Based on the above conditions, the steps of EKF can be obtained as follows:
(1)
Set the initial values of the system’s state quantity x k and error covariance matrix P k :
{ x ^ 0 = E ( x 0 ) P 0 = E [ ( x ^ 0 x 0 ) ( x ^ 0 x 0 ) T ]
where x ^ 0 is the set value of the initial state and P 0 is the error covariance matrix in the initial state. Since the set value of the initial quantity of the system may have a certain error, the error in the estimation result may be larger in the beginning stage of the EKF estimation. However, with the excellent correction ability of EKF in the process of many iterations, the estimation error will gradually decrease with the increase in the number of iterations.
(2)
Calculate the a priori estimate x ^ k | k 1 and the a priori error covariance P k | k 1 :
x ^ k | k 1 = f ( x ^ k 1 | k 1 , u k 1 )
P k | k 1 = A k 1 P k 1 | k 1 A k 1 T + Q k 1
EKF approximately linearizes the nonlinear battery system via Taylor expansion and ignores the high-order terms. The value of matrix A k 1 is the Jacobian matrix obtained using the state transition function f ( x k 1 , u k 1 ) for the state quantity x k 1 at time k 1 , and P k | k 1 is the prior value at time k 1 calculated from the error covariance matrix P k 1 | k 1 at time k .
(3)
Calculate the Kalman gain matrix K k :
K k = P k | k 1 H k T H k P k | k 1 H k T + R k
Similarly, in order to satisfy the requirement of approximating the battery system as a nonlinear system, the matrix H k is set to the Jacobian matrix obtained by the observation function h ( x k ) on the state quantity x k at time k .
(4)
Compute the posterior estimator x ^ k | k and update the error covariance matrix as follows:
x ^ k | k = x ^ k | k 1 + K k [ z k h ( x ^ k | k 1 , u k ) ]
P k | k = ( I K k H k ) P k | k 1

3.2. The Procedure of the IEKF Algorithm Based on LM Optimization

Due to the extended Kalman filtering in the process of calculating the results after the high-order Taylor expansion, a certain error still exists in the EKF algorithm. Therefore, to introduce the ideas of the iterated EKF, we use the iterated extended Kalman filter (IEKF) to estimate the SoC of the battery. The state estimation process of IEKF includes multiple iterated calculations, and the final calculation result is the optimal one. Therefore, the estimation accuracy is improved [33].
The process of introducing iteration in the process of updating the error covariance matrix of IEKF algorithm can be regarded as a process of using the Gauss–Newton method to solve the minimum value of the mean square error function. However, because the high-order term of the Taylor expansion is discarded, the state space model will be affected by the error, resulting in the deviation of the model data. In this case, the performance of the Gauss–Newton method is often not good enough. In order to ensure the global convergence of the algorithm [34], the Levenberg–Marquardt (LM) method is used to modify the covariance matrix of the IEKF prediction stage, and the parameter α is introduced to modify the covariance matrix of the prediction stage in each iteration [35].
The specific steps of the LM-IKEF algorithm are as follows.
(1)
Set the system state x k and error covariance matrix P k initial quantity:
{ x ^ 0 = E ( x 0 ) P 0 = E [ ( x ^ 0 x 0 ) ( x ^ 0 x 0 ) T ]
(2)
Compute the prior estimate and the prior error covariance as follows:
x ^ k | k 1 = f ( x ^ k 1 | k 1 , u k 1 )
P k | k 1 = A k 1 P k 1 | k 1 A k 1 T + Q k 1
The IKEF iteration process begins as follows:
(3)
The a priori estimates and the a priori error covariance during the iteration are computed:
{ x ^ k | k 1 ( i ) = f ( x ^ k 1 | k 1 ( i ) , u k 1 ) P k k 1 ( i ) = A k P k 1 k 1 ( i 1 ) A k T + Q k 1
When the first iteration is performed; that is, when i = 1, since the error covariance matrix has not been corrected, the calculation results of the prior estimate value and the prior error covariance are the same as the calculation results before the iteration process. However, when the number of iterations is greater than 1, the prior estimate value and the prior error covariance of the system will be updated.
(4)
The covariance matrix is modified by the LM method:
P ^ k k 1 ( i ) = [ I P k k 1 ( i ) ( P k k 1 ( i ) + α 1 I ) 1 ] P k k 1 ( i )
A larger parameter α means that the iterated calculation result of the algorithm is closer to the gradient descent method, while a smaller parameter α means that the iterated calculation result of the LM method is closer to the calculation result of the Gauss–Newton method. Throughout the calculation process of this paper, we found that the calculation result is consistent with the direction of convergence when the parameter α is small, so the initial value of α is set to 0.15.
(5)
Calculate the Kalman gain matrix:
K k ( i ) = P ^ k k 1 ( i ) H k T H k P ^ k k 1 ( i ) H k T + R k
(6)
Calculate the posterior estimate and update the error covariance matrix:
x ^ k | k ( i ) = x ^ k | k 1 ( i ) + K k ( i ) [ z k h ( x ^ k | k 1 ( i ) , u k ) ]
P k | k ( i ) = ( I K k ( i ) H k ) P ^ k k 1 ( i )
Define the cost function as follows:
q k ( i ) = 1 2 ( z k h ( x ^ k | k 1 ( i ) , u k ) ) T R k 1 ( z k h ( x ^ k | k 1 ( i ) , u k ) )
By calculating the cost function results after two adjacent iterations, it can be judged whether the LM algorithm has a positive effect on the estimation results in the iteration. When q k ( i ) < q k ( i 1 ) , it means that the estimation result is convergent, and the direction of iteration is correct. We recorded the calculation result and set α = 0.5 α to continue the iterated calculation. On the contrary, it is proved that the direction of iteration is opposite to the trend of convergence. We let α = 4 α continue to iterate.
Define the stopping condition as follows:
x ^ k | k ( i ) x ^ k | k ( i 1 ) x ^ k | k ( i 1 ) < ε
The parameter ε represents the error between the results of the two iterations. If the value is less than a certain limit, the result of the iteration can be considered to have converged to the extreme point, and the iteration can be terminated. In this paper, the value of ε is set to 0.00001. If the condition of Equation (25) is not satisfied under the limited number of iterations, the iteration will stop the IKEF iteration process after the set number of iterations is reached. The maximum number of iterations is set to 20 in this paper.
The flow of the LM-IEKF algorithm based on LM optimization is shown in Figure 4.

3.3. Formulation of the State Space Equation of the System

According to the dynamic equations of the second-order Thevenin model expressed in Equations (2) and (3), the working current I L is regarded as the input quantity of the Kalman filtering process, and the terminal voltage U t is regarded as the observation quantity. The state equation and output equation of the system can be obtained as follows.
x k = [ 0 0 0 0 1 R 1 C 1 0 0 0 1 R 2 C 2 ] [ S o C U c 1 U c 2 ] + [ 1 Q n 1 C 1 1 C 2 ] I L
z k = U t = [ 1 1 1 ] [ OCV ( S o C ) U c 1 U c 2 ] R 0 I L
As the result to be estimated in the state matrix, the relationship between SoC and OCV is not linear, so the state space equation needs to be approximately linearized according to the description in Section 2.2. Combined with Equation (1), the discrete state equation after processing can be obtained as follows.
[ S o C k + 1 U c 1 k + 1 U c 2 k + 1 ] = A [ S o C k U c 1 k U c 2 k ] + B I L k + w k
The sampling time T s is set to 1 s, the time constant τ 1 = R 1 C 1 , τ 2 = R 2 C 2 is defined, and the state matrix after discretization can be expressed as follows.
A = [ 1 0 0 0 e T s / τ 1 0 0 0 e T s / τ 2 ]
The control matrix of the system can be expressed as follows.
B = [ η T s Q n R 1 ( 1 e T s / τ 1 ) R 2 ( 1 e T s / τ 2 ) ] T
By bringing the equivalent circuit parameter values identified experimentally by HPPC into the above matrix, the state-space equation can be calculated.
Similarly, the discretized observation equation can be expressed as follows.
U t k + 1 = H [ S o C k + 1 U c 1 k + 1 U c 2 k + 1 ] R 0 I L k + v k
The observation matrix H can be expressed as follows.
H = [ ( OCV k + 1 ) ( S o C ) 1 1 ]
Combined with the discrete system state space equation obtained from the battery equivalent model, it is brought into the iterated process of the LM-IKEF algorithm, and the SoC of the battery can be estimated.

4. Experimental Results and Simulation Analysis

In order to verify the accuracy of the SoC estimation by the LM-IEKF algorithm, MATLAB software is used in this paper. A constant temperature of 25 °C is maintained, as well as a 1 A constant electric discharge condition. The Federal Urban Driving Schedule condition and Beijing dynamic stress test (BJDST) condition are used, respectively. In the experiment, the EKF algorithm, IEKF algorithm, and LM-IEKF algorithm are used to estimate the SoC of the battery. The maximum number of iterations of IEKF is set to 20, S o C e s t is defined as the estimated value of SoC, S o C r e a l is the actual value of SoC, and SoC error = ( S o C e s t S o C r e a l ) × 100 % .
According to the empirical values, the covariance matrices obeying the process noise w k and observation noise v k of the system are set as follows.
Q k = [ 0.01 0 0 0 0.01 0 0 0 0.01 ] , R k = 0.16
The error covariance matrix P 0 is set as follows.
P 0 = [ 0.01 0 0 0 0.01 0 0 0 0.01 ]

4.1. 1 A Constant Current Discharge Conditio

The constant current discharge condition is a more basic working condition. When the driver cruises at a constant speed, the electric vehicle will drive the car forward in a state of constant torque output. According to the proportional relationship between torque and current, it can be determined that the output current at this time is an almost constant current output. The vehicle does not enter the energy recovery state, and there will be no feedback current generated by braking to charge the battery. Since the current variation of constant current discharge is minimal, it can be used as the primary operating condition for verifying SoC prediction algorithms.
Under the constant discharge condition, the SoC initial value of the three estimation methods is set to 1. According to the discharge data, the initial value of the voltage when SoC is set to 1 is set to 4.193 V. The SoC estimation results and estimation error under the 1 A constant discharge condition are shown in Figure 5 and Figure 6.
It can be seen from Figure 5 that all three algorithms take a certain amount of time to converge based on the estimation results from the set initial value to the near true value after running. However, the convergence speed of LM-IEKF and IEKF is significantly faster. When SoC is between 0.9 and 0.3, the LM-IEKF algorithm shows a stronger following ability and the highest estimation accuracy. Additionally, the fluctuation range is small compared with the true value. When SoC drops below 0.2, the prediction accuracy of the three algorithms decreases. This is because the battery voltage changes drastically at a low SoC. The interval of the HPPC experiment should be narrowed here to obtain more detailed model characteristic parameters.

4.2. FUDS Working Condition

The FUDS condition is a standard chemical condition that is used to test the fuel efficiency and range of an electric vehicle. It is developed based on urban driving data from the U.S. federal government and is primarily used to simulate vehicle performance under urban road driving conditions. The FUDS case simulates changes in different speeds and accelerations during urban driving. It includes typical driving behaviors such as driving at low speeds, parking, accelerating, and decelerating. These modes provide a comprehensive picture of real driving situations in urban traffic. The FUDS scenario takes into account the distribution of stopping time and distance traveled in urban driving. These data can influence the energy efficiency and range of electric vehicles in urban environments. Although FUDS mainly focuses on the simulation of velocity and acceleration, it also considers the influence of partial road slopes and road conditions to improve the realism of the working conditions.
According to the USABC Electric Vehicle Battery Test Manual [35], the initial SoC of the battery should be reduced from 1 to 0.8 in the test process of the FUDS condition. Therefore, the initial SoC value of the three estimation methods is set to 0.8, and the initial voltage value is 3.8858 V. The current variation under the FUDS condition is shown in Figure 7.
According to the SoC prediction results and the SoC estimation error shown in Figure 8 and Figure 9, it can be seen that the LM-IEKF algorithm always keeps the updated direction of the error covariance matrix consistent with the convergence direction due to the correction of the LM algorithm under the FUDS condition with continuous changes in the input current. Compared with the other two algorithms, the convergence speed from the initial value to the true value is very fast. According to the estimation results shown in Table 3, the maximum error of the LM-IEKF algorithm is only 1.9756%, while the single EKF algorithm cannot adapt to the FUDS condition with constant current changes well. The maximum error reaches 4.5482%, about twice that of the LM-IEKF algorithm, and the estimation effect is general.

4.3. BJDST Working Conditions

The BJDST condition is a lithium-ion battery performance test method based on DST (dynamic stress test) conditions, but the test current of the BJDST condition changes more drastically and is more complex than the DST condition. In this condition, a test cycle of 916 s is used to cycle the test until the end of the test. The current variation in the BJDST condition is shown in Figure 10.
The BJDST case simulates the changes in driving speed and acceleration on a typical urban road in Beijing. These modes include various driving maneuvers such as starting, accelerating, driving at a constant speed, decelerating, and stopping to reflect the diverse behaviors of real-world road driving. The scenario also takes into account the traffic conditions in Beijing, including the distribution of traffic congestion, parking waiting times, and travel distances. These factors have a direct impact on the energy consumption and range performance of electric vehicles in urban environments.
In this experiment, the initial SoC value of the battery starts from 0.8 and ends when the battery is discharged to SoC 0. After loading the battery with different simulated charging and discharging currents, the SoC and open circuit voltage of the battery change continuously, and the open circuit voltage decreases from 3.9207 V at the initial time to 3.1786 V when the SoC is 0. The initial value of the Kalman filter algorithm under this condition is set, and the initial value of the parameter in the LM algorithm is still set to 0.15. The SoC results predicted by the LM-IEKF algorithm and the error of the algorithm are given below.
Figure 11 and Figure 12 show the SoC prediction results and the SoC estimation error of the BJDST condition. The LM-IEKF algorithm still maintains the characteristics of a rapid convergence from the initial value to the true value. In the face of the BJDST condition with obvious current fluctuations, the EKF algorithm and IKEF algorithm face the challenge of large changes in the covariance matrix, resulting in large fluctuations in the error of their estimation results. As shown in Table 3, the maximum error of SoC estimated by the LM-IEKF algorithm is only 1.9032%, and the average error is no more than 0.562%, which is well adapted to the working condition, with an obvious current fluctuation range.

5. Conclusions

Aiming at the problems present in the existing methods for estimating the SoC of lithium batteries, this paper constructs the LM-IEKF algorithm, combining the LM method and the iterated extended Kalman filter algorithm. Through multiple iterations, and with the help of the LM algorithm, the covariance matrix of the measurement update stage is optimized compared with the traditional EKF algorithm and IKEF algorithm, and the SoC estimation accuracy is further improved.
Using React and the polarization characteristics of the battery, the concentration polarization characteristics’ second-order Thevenin equivalent battery model was developed, as well as the identification of the equivalent model parameters according to the HPPC experimental results. According to the results of the HPPC experiments, the OCV-SoC relationship curve is constructed. In the verification section, the MATLAB simulation software is used to apply the EKF algorithm under the constant discharge condition, FUDS condition, and BJDST condition. The SoC estimation results of the IEKF algorithm and LM-IEKF algorithm are verified and analyzed. The results show that the error between the SoC result estimated by LM-IEKF algorithm and the true value is less than 1.5% under the DC discharge conditions. The maximum error estimated under the FUDS and BJDST conditions is less than 2%. In the IKEF algorithm, due to the iterated adjustment of the calculation, the maximum estimation error is about 2.3%, which is within the acceptable range. However, due to the problem that its convergence speed is still too slow, the average estimation error is large, and the estimation effect is not as good as the LM-IEKF algorithm proposed in this paper. In view of the error of the initial value of the system, the LM-IEKF algorithm can correct the estimated value to near the true value with a fast convergence speed, and it can also adapt well to the situation of large current fluctuations.
In conclusion, the algorithm not only gives full play to the advantages of the high accuracy and low complexity of the Kalman filter algorithm, but it also avoids the shortcomings of the slow convergence speed of the conventional Kalman filter algorithm and the poor ability to adapt to the nonlinear system with the help of the characteristics of iterated and LM algorithms. It can accurately estimate the SoC of a lithium battery, which is of great help to improve the estimation accuracy of the SoC.
In the era of the rapid development of electric vehicles, the algorithm proposed in this paper further promotes the development of battery-powered electric vehicles and makes battery technology develop in a more mature direction. Moreover, with the progress of artificial intelligence technology, all kinds of unmanned equipment and robots are facing the problem of rational use of battery energy. The method proposed in this paper can be adapted to the application fields of various lithium-ion batteries and contributes to the development of new energy technology.
However, when the algorithm is actually applied to the estimation of lithium-ion battery SoC in electric vehicles, the process noise and observation noise will change according to different driving conditions or external conditions, which is reflected in the corresponding matrix value in the algorithm, which will change with a certain law. Therefore, it study the variation law of noise under different working conditions should be explored in the future and applied to the LM-IEKF algorithm to estimate SoC.

Author Contributions

X.W. and W.L. proposed the idea; Y.G. designed the research; D.L. drew and output the figures; Y.L., X.W., and W.L. wrote the paper; X.W. derived the LM-IEKF equation; K.D. and W.L. established the battery equivalent model and derived it; X.W. substituted the data into each operating condition for simulation. All authors have read and agreed to the published version of the manuscript.

Funding

This research is funded by the National Natural Science Foundation of China (No. 12172064), the Key Research and Development Program of Shaanxi Province (No. 2022GY-208, No. 2021KW-13), and the Fundamental Research Funds for the Central Universities CHD (No. 300102322201). the Natural Science Foundation of Shaanxi Province under Grant 2021JQ-291.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data that support the findings of this study are available from the corresponding author upon reasonable request.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

EKF, Extended Kalman Filter; IEKF, Iterated Extended Kalman Filter; LM, The Levenberg-Marquardt method; FUDS, The Federal Urban Driving Schedule; BJDST, Beijing Dynamic Stress Test; SoC, State of Charge.

References

  1. Xiao, T.; Shi, X.; Zhou, B.; Wang, X. (Eds.) Comparative Study of EKF and UKF for SOC Estimation of Lithium-ion Batteries. In Proceedings of the 2019 IEEE Innovative Smart Grid Technologies-Asia (ISGT Asia), Chengdu, China, 21–24 May 2019; IEEE: Piscataway, NJ, USA, 2019. [Google Scholar]
  2. Zheng, F.; Xing, Y.; Jiang, J.; Sun, B.; Kim, J.; Pecht, M. Influence of different open circuit voltage tests on state of charge online estimation for lithium-ion batteries. Appl. Energy 2016, 183, 513–525. [Google Scholar] [CrossRef]
  3. Ramezani-al, M.R.; Moodi, M. A novel combined online method for SOC estimation of a Li-Ion battery with practical and industrial considerations. J. Energy Storage 2023, 67, 107605. [Google Scholar] [CrossRef]
  4. Xiong, R.; Cao, J.; Yu, Q.; He, H.; Sun, F. Critical review on the battery state of charge estimation methods for electric vehicles. IEEE Access 2017, 6, 1832–1843. [Google Scholar] [CrossRef]
  5. Zhou, H.; Luo, J.; Yu, Z. Co-estimation of SOC and SOH for Li-ion battery based on MIEKPF-EKPF fusion algorithm. Energy Rep. 2023, 10, 4420–4428. [Google Scholar] [CrossRef]
  6. Xile, D.; Caiping, Z.; Jiuchun, J. Evaluation of SOC estimation method based on EKF/AEKF under noise interference. Energy Procedia 2018, 152, 520–525. [Google Scholar] [CrossRef]
  7. Ma, D.; Gao, K.; Mu, Y.; Wei, Z.; Du, R. An adaptive tracking-extended Kalman filter for SOC estimation of batteries with model uncertainty and sensor error. Energies 2022, 15, 3499. [Google Scholar] [CrossRef]
  8. Demirci, O.; Taskin, S.; Schaltz, E.; Demirci, B.A. Review of battery state estimation methods for electric vehicles-Part I: SOC estimation. J. Energy Storage 2024, 87, 111435. [Google Scholar] [CrossRef]
  9. Afshar, S.; Morris, K.; Khajepour, A. State-of-charge estimation using an EKF-based adaptive observer. IEEE Trans. Control. Syst. Technol. 2018, 27, 1907–1923. [Google Scholar] [CrossRef]
  10. Ling, L.; Wei, Y. State-of-charge and state-of-health estimation for lithium-ion batteries based on dual fractional-order extended Kalman filter and online parameter identification. IEEE Access 2021, 9, 47588–47602. [Google Scholar] [CrossRef]
  11. Khalil, I.; Ahsan, M.; Ullah, I.; Adnan, A.; Khan, N.; Nawaz, S. (Eds.) SOC prediction of lithium-ion battery using extended Kalman filter. In Proceedings of the 2018 International Symposium on Recent Advances in Electrical Engineering (RAEE), Islamabad, Pakistan, 17–18 October 2018; IEEE: Piscataway, NJ, USA, 2018. [Google Scholar]
  12. Tong, S.; Lacap, J.H.; Park, J.W. Battery state of charge estimation using a load-classifying neural network. J. Energy Storage 2016, 7, 236–243. [Google Scholar] [CrossRef]
  13. Charkhgard, M.; Farrokhi, M. State-of-charge estimation for lithium-ion batteries using neural networks and EKF. IEEE Trans. Ind. Electron. 2010, 57, 4178–4187. [Google Scholar] [CrossRef]
  14. Lee, K.-T.; Dai, M.-J.; Chuang, C.-C. Temperature-compensated model for lithium-ion polymer batteries with extended Kalman filter state-of-charge estimation for an implantable charger. IEEE Trans. Ind. Electron. 2017, 65, 589–596. [Google Scholar] [CrossRef]
  15. Zhigang, H.; Dong, C.; Chaofeng, P.; Long, C.; Shaohua, W. State of charge estimation of power Li-ion batteries using a hybrid estimation algorithm based on UKF. Electrochim. Acta 2016, 211, 101–109. [Google Scholar] [CrossRef]
  16. Bizeray, A.M.; Zhao, S.; Duncan, S.R.; Howey, D.A. Lithium-ion battery thermal-electrochemical model-based state estimation using orthogonal collocation and a modified extended Kalman filter. J. Power Sources 2015, 296, 400–412. [Google Scholar] [CrossRef]
  17. Zhou, H.; Wang, S.; Yu, C.; Xia, L.; Fernandez, C. Research on SOC Estimation for Lithium ion batteries Based on Improved PNGV Equivalence Model and AF-UKF Algorithm. Int. J. Electrochem. Sci. 2022, 17, 220836. [Google Scholar] [CrossRef]
  18. Moré, J.J. (Ed.) The Levenberg-Marquardt algorithm: Implementation and theory. In Numerical Analysis: Proceedings of the Biennial Conference Held at Dundee, 28 June–1 July 1977; Springer: Berlin/Heidelberg, Germany, 2006. [Google Scholar]
  19. Liu, X.; Li, W.; Zhou, A. PNGV equivalent circuit model and SOC estimation algorithm for lithium battery pack adopted in AGV vehicle. IEEE Access 2018, 6, 23639–23647. [Google Scholar] [CrossRef]
  20. Kim, J.; Cho, B.-H. State-of-charge estimation and state-of-health prediction of a Li-ion degraded battery based on an EKF combined with a per-unit system. IEEE Trans. Veh. Technol. 2011, 60, 4249–4260. [Google Scholar] [CrossRef]
  21. He, H.; Xiong, R.; Zhang, X.; Sun, F.; Fan, J. State-of-charge estimation of the lithium-ion battery using an adaptive extended Kalman filter based on an improved Thevenin model. IEEE Trans. Veh. Technol. 2011, 60, 1461–1469. [Google Scholar]
  22. Baccouche, I.; Jemmali, S.; Manai, B.; Omar, N.; Essoukri Ben Amara, N. 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]
  23. Cui, Z.; Hu, W.; Zhang, G.; Zhang, Z.; Chen, Z. An extended Kalman filter based SOC estimation method for Li-ion battery. Energy Rep. 2022, 8, 81–87. [Google Scholar] [CrossRef]
  24. Zhang, L.; Peng, H.; Ning, Z.; Mu, Z.; Sun, C. Comparative research on RC equivalent circuit models for lithium-ion batteries of electric vehicles. Appl. Sci. 2017, 7, 1002. [Google Scholar] [CrossRef]
  25. Xia, Y. Comparison and Analysis of SOC Estimation Based on First-Order and Second-Order Thevenin Battery Models Based on EKF. Acad. J. Sci. Technol. 2023, 6, 10–18. [Google Scholar] [CrossRef]
  26. Zhang, H.; Deng, C.; Zong, Y.; Zuo, Q.; Guo, H.; Song, S.; Jiang, L. Effect of sample interval on the parameter identification results of RC equivalent circuit models of li-ion battery: An investigation based on HPPC test data. Batteries 2022, 9, 1. [Google Scholar] [CrossRef]
  27. Li, W.; Liu, W.; Deng, Y. SOC estimation for lithium-ion batteries based on EKF. China Mech. Eng. 2020, 31, 321. [Google Scholar]
  28. Xu, L.; Ma, K.; Yang, Q.; Song, L.; Ma, X. SOC estimation of power battery based on Kalman filter. J. Jiangsu Univ. (Nat. Sci. Ed.) 2024, 45. [Google Scholar]
  29. Huang, Y.; Li, Y.; Jiang, L.; Qiao, X.; Cao, Y.; Yu, J. (Eds.) Research on Fitting Strategy in HPPC Test for Li-ion battery. In Proceedings of the 2019 IEEE Sustainable Power and Energy Conference (iSPEC), Beijing, China, 21–23 November 2019; IEEE: Piscataway, NJ, USA, 2019. [Google Scholar]
  30. Białoń, T.; Niestrój, R.; Skarka, W.; Korski, W. HPPC Test Methodology Using LFP Battery Cell Identification Tests as an Example. Energies 2023, 16, 6239. [Google Scholar] [CrossRef]
  31. Luo, L.; Song, W.; Lin, S.; Lv, J.; Chen, Y.; Feng, Z. Research progress on effects of temperature on SOC and its estimation for LFP battery. Adv. New Renew. Energy 2015, 3, 59–69. [Google Scholar]
  32. Zhong, S.; Chirarattananon, P. Direct visual-inertial ego-motion estimation via iterated extended kalman filter. IEEE Robot. Autom. Lett. 2020, 5, 1476–1483. [Google Scholar] [CrossRef]
  33. Yan, C.; Dong, J.; Lu, G.; Zhang, D.; Qi, Y. (Eds.) An adaptive algorithm based on levenberg-marquardt method and two-factor for iterative extended Kalman filter. In Proceedings of the 2017 3rd IEEE International Conference on Computer and Communications (ICCC), Chengdu, China, 13–16 December 2017; IEEE: Piscataway, NJ, USA, 2017. [Google Scholar]
  34. Liu, Z.; Zhao, Z.; Qiu, Y.; Jing, B.; Yang, C. State of charge estimation for Li-ion batteries based on iterative Kalman filter with adaptive maximum correntropy criterion. J. Power Sources 2023, 580, 233282. [Google Scholar] [CrossRef]
  35. Duong, T.Q. USABC and PNGV test procedures. J. Power Sources 2000, 89, 244–248. [Google Scholar] [CrossRef]
Figure 1. Equivalent circuit diagram of the second-order Thevenin model.
Figure 1. Equivalent circuit diagram of the second-order Thevenin model.
Applsci 14 05868 g001
Figure 2. The OCV–SoC fitting curve.
Figure 2. The OCV–SoC fitting curve.
Applsci 14 05868 g002
Figure 3. Experimental curve of HPPC at SoC = 90%.
Figure 3. Experimental curve of HPPC at SoC = 90%.
Applsci 14 05868 g003
Figure 4. Process of the LM-IEKF algorithm.
Figure 4. Process of the LM-IEKF algorithm.
Applsci 14 05868 g004
Figure 5. SoC prediction results for the constant current 1A discharge condition.
Figure 5. SoC prediction results for the constant current 1A discharge condition.
Applsci 14 05868 g005
Figure 6. SoC estimation error for the constant current 1A discharge condition.
Figure 6. SoC estimation error for the constant current 1A discharge condition.
Applsci 14 05868 g006
Figure 7. Current variation for FUDS operating conditions.
Figure 7. Current variation for FUDS operating conditions.
Applsci 14 05868 g007
Figure 8. SoC prediction results for FUDS operating conditions.
Figure 8. SoC prediction results for FUDS operating conditions.
Applsci 14 05868 g008
Figure 9. SoC estimation error for FUDS condition.
Figure 9. SoC estimation error for FUDS condition.
Applsci 14 05868 g009
Figure 10. Current variations for the BJDST operating condition.
Figure 10. Current variations for the BJDST operating condition.
Applsci 14 05868 g010
Figure 11. SoC prediction results for the BJDST operating conditions.
Figure 11. SoC prediction results for the BJDST operating conditions.
Applsci 14 05868 g011
Figure 12. SoC estimation error for the BJDST condition.
Figure 12. SoC estimation error for the BJDST condition.
Applsci 14 05868 g012
Table 1. Comparison of various estimation methods.
Table 1. Comparison of various estimation methods.
Estimation MethodologyEstimation AccuracyEstimation of the Level of Complexity
Ampere-hour integration methodPoorEasy
Open-circuit voltage methodPoorComplex
Neural network methodHighVery complex
Kalman filter and its derivative algorithmsHighGenerally complex
Table 2. Equivalent circuit model parameter identification results.
Table 2. Equivalent circuit model parameter identification results.
SoCR0R1C1R2C2
0.90.220.014022627.6750.004982250,903.3
0.80.22020.018722065.1710.005844256,844.6
0.70.22030.027251923.3030.006555206,559.9
0.60.22050.0293411,860.940.01199123,603
0.50.22060.01324113.6360.008128155,757.9
0.40.22090.015154493.7290.006479229,973.8
0.30.22230.020214672.4390.008961172,302.2
0.20.22640.020825792.5070.008059201,017.5
0.10.11490.016113907.5110.007703279,501.5
Table 3. SoC estimation results of different algorithms under each operating condition.
Table 3. SoC estimation results of different algorithms under each operating condition.
Work ConditionAlgorithmMaximum ErrorAverage Error
Constant current 1 A dischargeEKF4.13341.5419
IEKF2.28450.6852
LM-IEKF1.42120.5786
FUDSEKF4.54821.2942
IEKF4.53261.1113
LM-IEKF1.97560.4714
EKF2.31980.7016
BJDSTIEKF2.74370.7915
LM-IEKF1.90320.5619
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

Wang, X.; Gao, Y.; Lu, D.; Li, Y.; Du, K.; Liu, W. Lithium Battery SoC Estimation Based on Improved Iterated Extended Kalman Filter. Appl. Sci. 2024, 14, 5868. https://doi.org/10.3390/app14135868

AMA Style

Wang X, Gao Y, Lu D, Li Y, Du K, Liu W. Lithium Battery SoC Estimation Based on Improved Iterated Extended Kalman Filter. Applied Sciences. 2024; 14(13):5868. https://doi.org/10.3390/app14135868

Chicago/Turabian Style

Wang, Xuetao, Yijun Gao, Dawei Lu, Yanbo Li, Kai Du, and Weiyu Liu. 2024. "Lithium Battery SoC Estimation Based on Improved Iterated Extended Kalman Filter" Applied Sciences 14, no. 13: 5868. https://doi.org/10.3390/app14135868

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