Research Article  Open Access
Ze Cheng, Jikao Lv, Yanli Liu, Zhihao Yan, "Estimation of State of Charge for LithiumIon Battery Based on Finite Difference Extended Kalman Filter", Journal of Applied Mathematics, vol. 2014, Article ID 348537, 10 pages, 2014. https://doi.org/10.1155/2014/348537
Estimation of State of Charge for LithiumIon Battery Based on Finite Difference Extended Kalman Filter
Abstract
An accurate estimation of the state of charge (SOC) of the battery is of great significance for safe and efficient energy utilization of electric vehicles. Given the nonlinear dynamic system of the lithiumion battery, the parameters of the secondorder RC equivalent circuit model were calibrated and optimized using a nonlinear least squares algorithm in the Simulink parameter estimation toolbox. A comparison was made between this finite difference extended Kalman filter (FDEKF) and the standard extended Kalman filter in the SOC estimation. The results show that the model can essentially predict the dynamic voltage behavior of the lithiumion battery, and the FDEKF algorithm can maintain good accuracy in the estimation process and has strong robustness against modeling error.
1. Introduction
In the context of countries vigorously promoting energy conservation and low carbon economy to solve energy crisis and mitigate global warming, the solar photovoltaic power generation is emerging as the technology of choice for energysaving and environmentally sustainable transportation. It is suggested that the storage battery is second only to the photovoltaic modules as the most important part of solar photovoltaic system; thus its performance will directly affect the operational state and reliability of the system. It highlights the need to quickly and accurately estimate the state of charge (SOC) of the battery. A battery management system is required to ensure safe and reliable operation of the battery. One of its basic functions is to measure the SOC, which indicates the remaining charge of the battery so that the driver can be reminded to charge the battery prior to its depletion.
SOC is usually estimated indirectly by some measurable quantities [1]. In recent years, many methods have been proposed to improve the SOC estimation. Among them, the amperehour integral (coulomb counting) method is the most simple and convenient one [2], but it requires a prior knowledge of initial SOC and suffers from accumulated errors from noise and measurement. The open circuit voltage (OCV) method is sufficiently accurate because there is a onetoone correspondence between OCV and SOC, but it needs a long rest time and thus cannot be used in real time applications [3]. A number of intelligent approaches have been developed in an attempt to achieve a more accurate SOC estimation, such as the neural network method and Kalman filter (KF) method [4]. The neural network method can provide an accurate SOC estimation given an appropriate training dataset. However, the training process is very computationally intensive and at risk of over fitting, and the model performance strongly relies on the amount and quality of the training data, which could limit its application range. The KF method uses sample data (current, voltage, and temperature) to recursively calculate the minimum mean squared error estimate of true SOC, which can solve the problem of uncertain initial SOC and cumulative error. However, it is only suitable for linear system. Given the nonlinear nature of the dynamics of electrochemical cells, a linearization process is usually used to approximate the nonlinear system by a linear time varying system. The extended Kalman filter (EKF) is a nonlinear extension of the conventional KF, which has been developed particularly for systems having nonlinear dynamic models, using Taylor series expansions [5–7]. The divergence of EKF is primarily due to the linearization error for ignoring highorder terms, and the accuracy of EKFbased SOC estimation is sensitive to the precision of the battery model.
We introduced an alternative nonlinear Kalman filtering technique known as finite difference extended Kalman filter (FDEKF) in this study and used the finite difference method instead of the Taylor series expansions to estimate the covariance matrix. It has theoretical advantages that manifest themselves in more accurate predictions and also strong robustness against modeling uncertainty by making full use of the error information generated by model linearization.
The remainder of this paper is arranged as follows. Section 2 describes a model structure and discusses how the parameters of this model can be automatically estimated using the Simulink parameter estimation, Section 3 briefs the EKF and deduces the FDEKF algorithm, Section 4 shows the simulation results of the proposed algorithm to the experimental data, Section 5 shows the experimental verification of the proposed algorithm on a test bench, and Section 6 concludes the paper.
2. Modeling for the LiFePO_{4} Battery and Parameter Identification Method
2.1. LithiumIon Battery Model
The commonly used battery models include the electrochemical model and equivalent circuit model (ECM) [8]. The electrochemical models describe the electrochemical reactions in the electrodes and electrolyte in a mathematical way, which can achieve high accuracy. However, they typically deploy partial differential equations with a large number of unknown parameters. Due to the intensive computation involved, these models are often used for battery performance analysis and battery design. ECMs have been developed especially for the purpose of vehicle power management control and battery management system development and have less parameters, such as the Rint model [9], Thevenin model [10], and PNGV model [11]. Literature [12] gives a comparative study of these ECMs for lithiumion batteries. Due to the complicated polarization characteristics of battery, it is suggested that models with more parallel RC networks connected in series should have a much higher accuracy [13]. Clearly, the higher the order is, the more complicated the model becomes. Therefore, considering the details in the model is a tradeoff between accuracy and complexity. In this paper, a secondorder RC model is considered, as shown in Figure 1.
Here is the open circuit voltage, is the terminal voltage of the battery, is the outflow current, is the ohmic resistance of the connectors, electrodes and electrolyte, and the two sets of parallel resistorcapacitor elements connected in series , , and , are the mass transport effects and doublelayer effects, respectively. Commonly, the time constants of the two dynamics differ by at least an order of magnitude.
2.2. Parameter Identification
The model parameters need to be accurately estimated from the test data to establish a battery model with good performance. In this paper, the model is parameterized using a semiautomatic process that can satisfy the constraints on the optimized parameters. This process uses a number of measured data sets under a variety of conditions. The parameters are optimized by minimizing the error between measured and simulated results using the nonlinear least squares algorithm in the Simulink parameter estimation toolbox. The battery model can be established in Simulink based on the secondorder RC model, as shown in Figure 2.
3. SOC Estimation
3.1. EKFBased SOC Estimation
In order to use EKF methods for battery SOC estimation, the cell should be modeled in a discretetime statespace form. Specifically, we model the nonlinear battery system by a state equation and an output equation below: where is the system state vector at discretetime index , vector is the measured system input at time , and is unmeasured “process noise” that affects the system state. The output of the system is and is measurement noise. and are (possibly nonlinear) functions, determined by the particular cell model used.
At each time step, and are linearized by a firstorder Taylo series expansion. The model can be rewritten as where,
The state of the ECM in Figure 1 is set to be SOC. and are the voltage across the RC network, the input of the model is the current , and the output is the terminal voltage . Thus, the dynamic ECM could be described in state space as where is the cell coulombic efficiency, is the intersample period, is the cell capacity, is the current at time index which is negative at charge and positive at discharge, and are the time constants of the and circuit, and , . Both and are assumed to be mutually uncorrelated white Gaussian random processes, and the statistical characteristics are as follows: where both and are positive definite symmetric matrices, and is the Kronecker function. The OCV corresponds to a certain SOC, which can be identified by the nonlinear characteristic curve [14]. The hysteresis effect, which is beyond the scope of this paper, can cause the discharging curve to stay below the charging curve for the same amount of SOC.
Obviously, the relationship between OCV and SOC is nonlinear. The EKF approach is to linearize the equations at each sample point using Taylor series expansions. The specific steps are as follows.
Define ; the superscripts “” and “ ” indicate the prior and posterior estimation, respectively. We linearize the nonlinear state and output equations around the present operating point using Taylor series expansions, and ignore the second and higherorder terms
Initialization is
Recursive calculation is
3.2. FDEKFBased SOC Estimation
There are two problems for EKF in SOC estimation: when the higherorder terms of Taylor series expansions are not negligible, the linearization process will cause significant errors to the system or even make the filter unstable and divergent; and Jacobian matrix needs to be calculated at every sample time, thereby leading to a multiplication of the calculation amount for complicated system. FDEKF is another iterative minimum mean variance error estimator, which has a higher precision than the firstorder Taylor series expansions by applying finite difference method and is applicable for all nonlinear functions.
Schei first conceived the thought of finite difference [15]. It uses polynomial approximations obtained with a Sterling interpolation formula for the derivation of state estimators for nonlinear systems. The estimators perform better than that based on Taylor approximations. Nevertheless, the implementation is significantly simpler as no derivatives are required. A nonlinear function is assumed and approximated by the interpolation formula where is the interval length, and is assumed to be analytic; then the full Taylor series expansion of (13) is
The first two terms on the right hand side of (15) are independent of the interval length and are recognized as the first two terms of the Taylor series expansion of . The “remainder” term given by the difference between (15) and the firstorder Taylor approximation is controlled by and will in general deviate from the higher order terms of the Taylor series expansion. In some sense, certain interval lengths may make the remainder term close to the higher order terms of the full Taylor series. The procedure of FDEKF algorithm is given below.
First we introduce the following four square Cholesky factorizations:
The factorization of the noise covariance matrices and can be made in advance. and are updated directly during application of the filter.
Then we calculate the partial derivative of the nonlinear function by the firstorder polynomial approximation
Define (set )
Let the th column of be denoted ; (19) can be derived just as (18)
Estimates of the prior variance
Estimates of the posterior gain matrix and posterior variance
We use (20)(21) to replace (9), (10), and (11), which comprises the full FDEKF.
4. Results and Discussions
To verify the effectiveness and performance of the FDEKF, we applied the identification and SOC estimation algorithms to the experimental data obtained on the LP2770102AC lithiumion battery. This is a lithium iron phosphate battery that can be used in portable high power devices, grid stabilization energy storage, and electric vehicles and hybrid electric vehicles. Its nominal capacity is 12.5 Ah and nominal voltage is 3.3 V. For the tests, we used a DigatronMCT 300540 cell cycler with a measurement accuracy of ±5 mV for voltage and ±50 mA for current. The battery temperature was kept at room temperature (20 ± 2°C) throughout the experiment.
In this section, we first estimated the values of ECM parameters using an iterative numerical optimization algorithm implemented by Simulink parameter estimation and then compared the FDEKFbased and EKFbased SOC estimation.
4.1. Pulse Test
The battery was fully charged so that SOC = 100%, and then the constantcurrent discharge pulse test was performed (18 min discharging and 60 min resting). The discharge lasted 790 min, and the sample time was 1 s. Figure 3 shows the terminal current and voltage of the battery.
4.2. Initial Estimation
The parameters , , , , , and needed to be identified. The initial values of model parameters should be assigned before running the optimization algorithm. The upper and lower bounds of the model parameters were selected through trial and error. In our initial attempt, six parameters were estimated, and their maximum and minimum values were given a broad range. An initial guess for each parameter was chosen based on prior experimentation with the model. Table 1 shows the parameters estimated and their constraints.

4.3. Model Evaluation
The current and voltage data were used as the input to the identification algorithm described in Section 2. The secondorder RC model in Figure 2 was run until the optimization process was terminated. The measured and simulated terminal voltages are shown in Figure 4(a), and the errors between them are shown in Figure 4(b). It is evident that the model can essentially predict the dynamic voltage behavior of the lithiumion battery from to , with an error of 50 mV. However, the performance of the model is deteriorated when the battery runs out, with an error of 150 mV. The trajectories of the optimization variables after 9 iterations are shown in Figure 4(c). In order to guarantee the global optimal parameters, we choose sum of squares for error (SSE) as the cost function, and the curve is shown in Figure 4(d)
(a) Measured and calculated battery voltage with 1/3C discharge
(b) Calculated battery voltage error with 1/3C discharge
(c) Trajectories of the optimization variables
(d) Cost function of the optimization variables
We used the dynamic stress test (DST) data to validate the accuracy of the model. Single DST working condition includes 14 steps and it is repeated five times; the process is as follows: 20 A charge for 420 seconds, rest for 30 seconds, 10 A charge for 120 seconds, 10 A discharge for 120 seconds, 4 A charge for 300 seconds, 20 A discharge for 120 seconds, 10 A charge for 120 seconds, 4 A discharge for 180 seconds, 40 A charge for 23 seconds, 10 A discharge for 120 seconds, 4 A charge for 300 seconds, 40 A discharge for 60 seconds, 20 A charge for 120 seconds, 4 A discharge for 120 seconds, and rest for 30 seconds. Figure 5 shows that the model can quickly and accurately track the realtime voltage of the battery, with an error of less than 0.1 V.
(a) True data of DST and its estimated data
(b) Estimated voltage error of DST data
4.4. Verification of SOC Estimation Algorithm
We then applied the experimental data obtained in Section 4.1 to implement the standard EKF and the FDEKF. The experimental SOC values were computed by the battery testing system and acted as a reference for the SOC estimates. The SOC estimation results are shown in Figure 6.
(a) True SOC and its experiment results with EKF and FDEKF
(b) SOC experiment errors with EKF and FDEKF
Figure 6(a) shows that the two estimators can trace the reference SOC, but with different accuracy. It also shows that the maximum absolute estimation error is 7% for EKF and 2% for FDEKF, with an improvement of 71%.
To evaluate the comprehensive performance of the two filters in the quantitative analysis, we define the root mean square error (RMSE) and single mean computation time as where is the time step, is the estimated SOC at step , is the true SOC at step , is the computation time at step , and is the sampling number. The results in Table 2 clearly indicate that FDEKF is superior to EKF in both estimation accuracy and algorithm complexity.

In order to confirm the robustness of FDEKF, we performed another two tests with changing current and DST data using the parameters in Table 2, which incorrectly identified the ECM and compared the performance of EKF and FDEKF in perturbations of the system parameters. The SOC estimation results are shown in Figures 7 and 8, respectively. It shows that the EKFbased estimator has a poor performance, with a maximum absolute error of 14%, while the FDEKFbased estimator can correctly trace the reference SOC, with a maximum absolute error of 4%. Thus, there is a substantial improvement (70%). The comparison results show that the FDEKFbased method provides better performance in the SOC estimation under modeling error.
(a) Terminal current/voltage curves of changingcurrent discharge pulse
(b) SOC estimation results of changingcurrent discharge pulse
(c) SOC estimation errors of changingcurrent discharge pulse
(a) Terminal current/voltage curves of DST data
(b) SOC estimation results of DST data with EKF and FDEKF
(c) SOC estimation errors of DST data with EKF and FDEKF
5. Experiments and Online Test
5.1. Test Bench
The test bench is shown in Figure 9, which consists of a DigatronMCT 300540 cell cycler, a voltage acquisition unit LTC68034, a high speed MCU AT90CAN128, a Hall current sensor ACS750SCA050 and a core data processor TMS320F2812. The Digatron MCT 300540 can charge/discharge five battery packs according to the designed program, with a maximum voltage of 30 V and maximum charge/discharge current of 40 A, and its voltage measurement accuracy is ±5 mV and current measurement accuracy is ±50 mA. LTC68034 can measure up to 12 series connected battery cells at the same time. AT90CAN128 is a lowpower CMOS 8bit microcontroller based on the AVR enhanced RISC structure. ACS750SCA050 can convert the charge/discharge current into 0–2.5 V voltage signal and its error is less than 1%. TMS320F2812 can receive the voltage data of each cell from the AT90CAN128 with CAN communication and then uses the FDEKF algorithm to calculate SOC in real time, which is displayed on the computer screen. This test bench can be extended, as shown in Figure 10.
We tested the single battery under DST working condition on this test bench using the EKF and FDEKF algorithms. Table 3 shows that both simulation and experimental errors increase over time. This is probably because the ECM parameters are estimated offline, and all of them are single constant and no adjustments are made for the changes of battery SOC.

6. Conclusions
In this study, we proposed a robust and powerful realtime SOC estimator for the lithiumion batteries, and the parameters of the secondorder ECM were estimated using the nonlinear least squares algorithm. This new linearization technique for SOC estimation is known as the finite difference extended Kalman filter. Compared to the EKF method, the FDEKF method is able to track the realtime SOC more quickly and accurately with the accurate model. When the model parameters change, it also has stronger robustness against modeling uncertainties and maintains good accuracy in the estimation process.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
References
 L. Lu, H. Xuebing, J. Li et al., “A review on the key issues for lithiumion battery management in electric vehicles,” Journal of Power Sources, vol. 226, pp. 272–288, 2013. View at: Google Scholar
 K. S. Ng, C.S. Moo, Y.P. Chen, and Y.C. Hsieh, “Enhanced coulomb counting method for estimating stateofcharge and stateofhealth of lithiumion batteries,” Applied Energy, vol. 86, no. 9, pp. 1506–1511, 2009. View at: Publisher Site  Google Scholar
 H. He, X. Zhang, R. Xiong, Y. Xu, and H. Guo, “Online modelbased estimation of stateofcharge and opencircuit voltage of lithiumion batteries in electric vehicles,” Energy, vol. 39, no. 1, pp. 310–318, 2012. View at: Publisher Site  Google Scholar
 G. Plett, “Lipb dynamic cell models for kalmanfilter soc estimation,” in Proceedings of the 19th International Battery, Hybrid and Fuel Electric Vehicle Symposium and Exhibition, pp. 1–12, 2002. View at: Google Scholar
 G. L. Plett, “Extended Kalman filtering for battery management systems of LiPBbased HEV battery packs: part 1. Background,” Journal of Power Sources, vol. 134, no. 2, pp. 252–261, 2004. View at: Publisher Site  Google Scholar
 G. L. Plett, “Extended Kalman filtering for battery management systems of LiPBbased HEV battery packs: part 2. Modeling and identification,” Journal of Power Sources, vol. 134, no. 2, pp. 262–276, 2004. View at: Publisher Site  Google Scholar
 G. L. Plett, “Extended Kalman filtering for battery management systems of LiPBbased HEV battery packs: part 3. State and parameter estimation,” Journal of Power Sources, vol. 134, no. 2, pp. 277–292, 2004. View at: Publisher Site  Google Scholar
 M. Marco, K. Lidiya, L. Bettina et al., “Study of the local SOC distribution in a lithiumion battery by physical and electrochemical modeling and simulation,” Applied Mathematical Modelling, vol. 37, no. 4, pp. 2016–2027, 2013. View at: Google Scholar
 V. H. Johnson, “Battery performance models in ADVISOR,” Journal of Power Sources, vol. 110, no. 2, pp. 321–329, 2002. View at: Publisher Site  Google Scholar
 H. He, R. Xiong, X. Zhang, F. Sun, and J. Fan, “Stateofcharge estimation of the lithiumion battery using an adaptive extended Kalman filter based on an improved Thevenin model,” IEEE Transactions on Vehicular Technology, vol. 60, no. 4, pp. 1461–1469, 2011. View at: Publisher Site  Google Scholar
 W. Gao, M. Jiang, and Y. Hou, “Research on PNGV model parameter identification of LiFePO4 Liion battery based on FMRLS,” in Proceedings of the 6th IEEE Conference on Industrial Electronics and Applications (ICIEA '11), pp. 2294–2297, June 2011. View at: Publisher Site  Google Scholar
 X. Hu, S. Li, and H. Peng, “A comparative study of equivalent circuit models for Liion batteries,” Journal of Power Sources, vol. 198, pp. 359–367, 2012. View at: Publisher Site  Google Scholar
 Y.H. Chiang, W.Y. Sean, and J.C. Ke, “Online estimation of internal resistance and opencircuit voltage of lithiumion batteries in electric vehicles,” Journal of Power Sources, vol. 196, no. 8, pp. 3921–3932, 2011. View at: Publisher Site  Google Scholar
 S. AbuSharkh and D. Doerffel, “Rapid test and nonlinear model characterisation of solidstate lithiumion batteries,” Journal of Power Sources, vol. 130, no. 12, pp. 266–274, 2004. View at: Publisher Site  Google Scholar
 T. S. Schei, “A finitedifference method for linearization in nonlinear estimation algorithms,” Automatica, vol. 33, no. 11, pp. 2053–2058, 1997. View at: Google Scholar
Copyright
Copyright © 2014 Ze Cheng et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.