# Estimation of State of Charge for Lithium-Ion Battery Based on Finite Difference Extended Kalman Filter

Authors: Ze Cheng; Jikao Lv; Yanli Liu; Zhihao Yan
Journal: Journal of Applied Mathematics
 (2014)

---

## 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 lithium-ion battery, the parameters of the second-order 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 lithium-ion battery, and the FDEKF algorithm can maintain good accuracy in the estimation process and has strong robustness against modeling error.


---

## Body

## 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 energy-saving 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 ampere-hour 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 one-to-one 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 high-order terms, and the accuracy of EKF-based 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. Section2 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 LiFePO4 Battery and Parameter Identification Method

### 2.1. Lithium-Ion 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 lithium-ion 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 second-order RC model is considered, as shown in Figure 1.Figure 1
Equivalent circuit of second-order RC model.HereUoc is the open circuit voltage, Ut is the terminal voltage of the battery, It is the outflow current, R0 is the ohmic resistance of the connectors, electrodes and electrolyte, and the two sets of parallel resistor-capacitor elements connected in series Re, Ce, and Rd, Cd are the mass transport effects and double-layer 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 second-order RC model, as shown in Figure2.Figure 2
Second-order RC model in Simulink.


## 2.1. Lithium-Ion 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 lithium-ion 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 second-order RC model is considered, as shown in Figure 1.Figure 1
Equivalent circuit of second-order RC model.HereUoc is the open circuit voltage, Ut is the terminal voltage of the battery, It is the outflow current, R0 is the ohmic resistance of the connectors, electrodes and electrolyte, and the two sets of parallel resistor-capacitor elements connected in series Re, Ce, and Rd, Cd are the mass transport effects and double-layer 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 second-order RC model, as shown in Figure2.Figure 2
Second-order RC model in Simulink.


## 3. SOC Estimation

### 3.1. EKF-Based SOC Estimation

In order to use EKF methods for battery SOC estimation, the cell should be modeled in a discrete-time state-space form. Specifically, we model the nonlinear battery system by a state equation and an output equation below:(1)xk+1=f(xk,uk)+wk,yk=g(xk,uk)+vk,
where xk is the system state vector at discrete-time index k, vector uk is the measured system input at time k, and wk is unmeasured “process noise” that affects the system state. The output of the system is yk and vk is measurement noise. f(·,·) and g(·,·) are (possibly nonlinear) functions, determined by the particular cell model used.At each time step,f(xk,uk) and g(xk,uk) are linearized by a first-order Taylo -series expansion. The model can be rewritten as
(2)xk+1=Akxk+Bkuk+wk,yk=Ckxk+Dkuk+vk,
where,
(3)Ak=d[f(xk,uk)]d[xk]|xk,uk,Bk=d[f(xk,uk)]d[uk]|xk,uk,Ck=d[g(xk,uk)]d[xk]|xk,uk,Dk=d[G(xk,uk)]d[uk]|xk,uk.The state of the ECM in Figure1 is set to be SOC. Ue and Ud are the voltage across the RC network, the input of the model is the current It, and the output is the terminal voltage Ut. Thus, the dynamic ECM could be described in state space as
(4)(SOC(k+1)Ue(k+1)Ud(k+1))=(1000e-T/τe000e-T/τd)×(SOC(k)Ue(k)Ud(k))+(-ηTQnRe(1-e-T/τe)Rd(1-e-T/τd))It(k)+wk,Ut(k)=Uoc(SOC(k))-Ue(k)-Ud(k)-R0It(k)+vk,
where η is the cell coulombic efficiency, T is the inter-sample period, Qn is the cell capacity, It(k) is the current at time index k which is negative at charge and positive at discharge, τe and τd are the time constants of the R1C1 and R2C2 circuit, and τe=ReCe, τd=RdCd. Both wk and vk are assumed to be mutually uncorrelated white Gaussian random processes, and the statistical characteristics are as follows:
(5)E[wk]=0,Cov[wk,wjT]=Qkδkj,E[vk]=0,Cov[vk,vjT]=Rkδkj,Cov[wk,vk]=0,
where both Qk and Rk are positive definite symmetric matrices, and δk is the Kronecker function. The OCV corresponds to a certain SOC, which can be identified by the nonlinear characteristic curve Uoc(SOC(k)) [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.Definexk=[SOC(k)Ue(k)Ud(k)]; 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 higher-order terms
(6)Ak=∂f(xk,uk)∂xk|xk=x^k=(1000e-T/τe000e-T/τd),Bk=(-ηT/QnRe(1-e-T/τe)Rd(1-e-T/τd)),Ck=∂g(xk,uk)∂xk|xk=x-k=[∂Uoc∂SOC|SOC=SOC¯(k)-1-1],Dk=-R0(k).Initialization is(7)x^0=[SOC(0)00],P^0=E[(x0-x^0)(x0-x^0)T].Recursive calculation is(8)x-k+1=Akx^k+BkIt(k),(9)P-k+1=AkP^kAkT+Qk,(10)Kk=P-k+1CkT[CkP-k+1CkT+Rk]-1,(11)x^k+1=x-k+1+Kk[Ut(k)-U-t(k)],(12)P^k+1=P-k+1-KkCkP-k+1.


### 3.2. FDEKF-Based SOC Estimation

There are two problems for EKF in SOC estimation:(1) when the higher-order 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 (2) 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 first-order 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 y=f(x) is assumed and approximated by the interpolation formula
(13)f(x)≈f(x-)+fDD′(x-)(x-x-),(14)fDD′(x-)=f(x-+h)-f(x--h)2h,
where h is the interval length, and f is assumed to be analytic; then the full Taylor series expansion of (13) is
(15)f(x)=f(x-)+f′(x-)(x-x-)+[f(3)(x-)3!h2+f(5)(x-)5!h4+⋯](x-x-).The first two terms on the right hand side of (15) are independent of the interval length h and are recognized as the first two terms of the Taylor series expansion of f. The “remainder” term given by the difference between (15) and the first-order Taylor approximation is controlled by h 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:(16)Q=SwSwT,R=SvSvT,P-=S-xS-xT,P^=S^xS^xT.The factorization of the noise covariance matricesQ and R can be made in advance. S-x and S^x are updated directly during application of the filter.Then we calculate the partial derivative of the nonlinear function by the first-order polynomial approximation(17)Fx(k)=(f(x^k+Δx^k,uk)-f(x^k-Δx^k,uk))/2Δx^k.DefineΔx^k=hS^x (set h2=3)
(18)Fx(k)S^x=Sxx^=12h{fi(x^k+hS^x,j,uk)-fi(x^k-ΔhS^x,j,uk)}.Let thejth column of S-x be denoted S^x,j; (19) can be derived just as (18)
(19)Gx(k)S-x=Syx-=12h{gi(x-k+hS-x,j,uk)-gi(x^k-ΔhS-x,j,uk)}.(
1
) Estimates of the prior variance
(20)P-k=Fx(x)P^kFxT(k)+Qk=Fx(k)S^xS^xTFxT(k)+SwSwT=Sxx^Sxx^T+SwSwT.(
2
) Estimates of the posterior gain matrix and posterior variance
(21)Kk=P-kGxT(k)[Gx(k)P-kGxT(k)+Rk]-1=S-xS-xT(Syx-S-x-1)T[Syx-Syx-T+SvSvT]-1=S-xSyx-T[Syx-Syx-T+SvSvT]-1,P^k+1=P-k-KkGx(k)P-k=S-xS-xT-KkGx(k)S-xS-xT=S-xS-xT-S-xS-yx-TKkT-KkSyx-SxT+S-xS-yx-TKkT=S-xS-xT-S-xS-yx-TKkT-KkSyx-SxT+KkSyx-Syx-TKkT+KkSvSvTKkT=[S-x-KkSyx-KkSv][S-x-KkSyx-KkSv]T.We use (20)-(21) to replace (9), (10), and (11), which comprises the full FDEKF.


## 3.1. EKF-Based SOC Estimation

In order to use EKF methods for battery SOC estimation, the cell should be modeled in a discrete-time state-space form. Specifically, we model the nonlinear battery system by a state equation and an output equation below:(1)xk+1=f(xk,uk)+wk,yk=g(xk,uk)+vk,
where xk is the system state vector at discrete-time index k, vector uk is the measured system input at time k, and wk is unmeasured “process noise” that affects the system state. The output of the system is yk and vk is measurement noise. f(·,·) and g(·,·) are (possibly nonlinear) functions, determined by the particular cell model used.At each time step,f(xk,uk) and g(xk,uk) are linearized by a first-order Taylo -series expansion. The model can be rewritten as
(2)xk+1=Akxk+Bkuk+wk,yk=Ckxk+Dkuk+vk,
where,
(3)Ak=d[f(xk,uk)]d[xk]|xk,uk,Bk=d[f(xk,uk)]d[uk]|xk,uk,Ck=d[g(xk,uk)]d[xk]|xk,uk,Dk=d[G(xk,uk)]d[uk]|xk,uk.The state of the ECM in Figure1 is set to be SOC. Ue and Ud are the voltage across the RC network, the input of the model is the current It, and the output is the terminal voltage Ut. Thus, the dynamic ECM could be described in state space as
(4)(SOC(k+1)Ue(k+1)Ud(k+1))=(1000e-T/τe000e-T/τd)×(SOC(k)Ue(k)Ud(k))+(-ηTQnRe(1-e-T/τe)Rd(1-e-T/τd))It(k)+wk,Ut(k)=Uoc(SOC(k))-Ue(k)-Ud(k)-R0It(k)+vk,
where η is the cell coulombic efficiency, T is the inter-sample period, Qn is the cell capacity, It(k) is the current at time index k which is negative at charge and positive at discharge, τe and τd are the time constants of the R1C1 and R2C2 circuit, and τe=ReCe, τd=RdCd. Both wk and vk are assumed to be mutually uncorrelated white Gaussian random processes, and the statistical characteristics are as follows:
(5)E[wk]=0,Cov[wk,wjT]=Qkδkj,E[vk]=0,Cov[vk,vjT]=Rkδkj,Cov[wk,vk]=0,
where both Qk and Rk are positive definite symmetric matrices, and δk is the Kronecker function. The OCV corresponds to a certain SOC, which can be identified by the nonlinear characteristic curve Uoc(SOC(k)) [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.Definexk=[SOC(k)Ue(k)Ud(k)]; 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 higher-order terms
(6)Ak=∂f(xk,uk)∂xk|xk=x^k=(1000e-T/τe000e-T/τd),Bk=(-ηT/QnRe(1-e-T/τe)Rd(1-e-T/τd)),Ck=∂g(xk,uk)∂xk|xk=x-k=[∂Uoc∂SOC|SOC=SOC¯(k)-1-1],Dk=-R0(k).Initialization is(7)x^0=[SOC(0)00],P^0=E[(x0-x^0)(x0-x^0)T].Recursive calculation is(8)x-k+1=Akx^k+BkIt(k),(9)P-k+1=AkP^kAkT+Qk,(10)Kk=P-k+1CkT[CkP-k+1CkT+Rk]-1,(11)x^k+1=x-k+1+Kk[Ut(k)-U-t(k)],(12)P^k+1=P-k+1-KkCkP-k+1.


## 3.2. FDEKF-Based SOC Estimation

There are two problems for EKF in SOC estimation:(1) when the higher-order 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 (2) 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 first-order 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 y=f(x) is assumed and approximated by the interpolation formula
(13)f(x)≈f(x-)+fDD′(x-)(x-x-),(14)fDD′(x-)=f(x-+h)-f(x--h)2h,
where h is the interval length, and f is assumed to be analytic; then the full Taylor series expansion of (13) is
(15)f(x)=f(x-)+f′(x-)(x-x-)+[f(3)(x-)3!h2+f(5)(x-)5!h4+⋯](x-x-).The first two terms on the right hand side of (15) are independent of the interval length h and are recognized as the first two terms of the Taylor series expansion of f. The “remainder” term given by the difference between (15) and the first-order Taylor approximation is controlled by h 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:(16)Q=SwSwT,R=SvSvT,P-=S-xS-xT,P^=S^xS^xT.The factorization of the noise covariance matricesQ and R can be made in advance. S-x and S^x are updated directly during application of the filter.Then we calculate the partial derivative of the nonlinear function by the first-order polynomial approximation(17)Fx(k)=(f(x^k+Δx^k,uk)-f(x^k-Δx^k,uk))/2Δx^k.DefineΔx^k=hS^x (set h2=3)
(18)Fx(k)S^x=Sxx^=12h{fi(x^k+hS^x,j,uk)-fi(x^k-ΔhS^x,j,uk)}.Let thejth column of S-x be denoted S^x,j; (19) can be derived just as (18)
(19)Gx(k)S-x=Syx-=12h{gi(x-k+hS-x,j,uk)-gi(x^k-ΔhS-x,j,uk)}.(
1
) Estimates of the prior variance
(20)P-k=Fx(x)P^kFxT(k)+Qk=Fx(k)S^xS^xTFxT(k)+SwSwT=Sxx^Sxx^T+SwSwT.(
2
) Estimates of the posterior gain matrix and posterior variance
(21)Kk=P-kGxT(k)[Gx(k)P-kGxT(k)+Rk]-1=S-xS-xT(Syx-S-x-1)T[Syx-Syx-T+SvSvT]-1=S-xSyx-T[Syx-Syx-T+SvSvT]-1,P^k+1=P-k-KkGx(k)P-k=S-xS-xT-KkGx(k)S-xS-xT=S-xS-xT-S-xS-yx-TKkT-KkSyx-SxT+S-xS-yx-TKkT=S-xS-xT-S-xS-yx-TKkT-KkSyx-SxT+KkSyx-Syx-TKkT+KkSvSvTKkT=[S-x-KkSyx-KkSv][S-x-KkSyx-KkSv]T.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 lithium-ion 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 30-05-40 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 FDEKF-based and EKF-based SOC estimation.


### 4.1. Pulse Test

The battery was fully charged so that SOC = 100%, and then the constant-current discharge pulse test was performed (18 min discharging and 60 min resting). The discharge lasted 790 min, and the sample time was 1 s. Figure3 shows the terminal current and voltage of the battery.Figure 3
Terminal current/voltage curves by constant-current discharge pulse.


### 4.2. Initial Estimation

The parametersEm, R0, Re, Ce, Rd, and Cd 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.Table 1
Parameter constraints.
Parameter
Initial value
Minimum
Maximum
E
m
3.3 V
2 V
3.6 V
R
0
0.01Ω
0Ω
1Ω
R
e
0.005Ω
0Ω
1Ω
C
e
0.005 F
0 F
1 F
R
d
10000Ω
1Ω
100000 Ω
C
d
10000 F
1 F
100000 F


### 4.3. Model Evaluation

The current and voltage data were used as the input to the identification algorithm described in Section2. The second-order 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 lithium-ion battery from SOC=0.1 to SOC=1, 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)(22)SSE=∑(xi-x)2.The parameters estimation results with 1/3C discharge.
(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 variablesWe 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:(1) 20 A charge for 420 seconds, (2) rest for 30 seconds, (3) 10 A charge for 120 seconds, (4) 10 A discharge for 120 seconds, (5) 4 A charge for 300 seconds, (6) 20 A discharge for 120 seconds, (7) 10 A charge for 120 seconds, (8) 4 A discharge for 180 seconds, (9) 40 A charge for 23 seconds, (10) 10 A discharge for 120 seconds, (11) 4 A charge for 300 seconds, (12) 40 A discharge for 60 seconds, (12) 20 A charge for 120 seconds, (13) 4 A discharge for 120 seconds, and (14) rest for 30 seconds. Figure 5 shows that the model can quickly and accurately track the real-time voltage of the battery, with an error of less than 0.1 V.The results of model validation with DST data.
(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 Section4.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.Comparison of SOC estimation and error curve of constant-current discharge pulse.
(a)
True SOC and its experiment results with EKF and FDEKF
(b)
SOC experiment errors with EKF and FDEKFFigure6(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 timetcost as
(23)RMSE=1T∑k=1N(x^k-xk)2,tcost=1N∑k=1Ntcostk,
where T is the time step, x^k is the estimated SOC at step k, xk is the true SOC at step k,tcostk is the computation time at step k, and N is the sampling number. The results in Table 2 clearly indicate that FDEKF is superior to EKF in both estimation accuracy and algorithm complexity.Table 2
Comparison of SOC estimation.
Algorithm
Single mean computing time
RMSE
EKF
3.8994
e
-
05 S
0.0174
FDEKF
3.9371
e
-
04 S
0.0018In order to confirm the robustness of FDEKF, we performed another two tests with changing current and DST data using the parameters in Table2, 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 EKF-based estimator has a poor performance, with a maximum absolute error of 14%, while the FDEKF-based 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 FDEKF-based method provides better performance in the SOC estimation under modeling error.Comparison of SOC estimation and error curve of changing-current discharge pulse.
(a)
Terminal current/voltage curves of changing-current discharge pulse
(b)
SOC estimation results of changing-current discharge pulse
(c)
SOC estimation errors of changing-current discharge pulseComparison of SOC estimation and error curve of DST data with EKF and FDEKF.
(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


## 4.1. Pulse Test

The battery was fully charged so that SOC = 100%, and then the constant-current discharge pulse test was performed (18 min discharging and 60 min resting). The discharge lasted 790 min, and the sample time was 1 s. Figure3 shows the terminal current and voltage of the battery.Figure 3
Terminal current/voltage curves by constant-current discharge pulse.


## 4.2. Initial Estimation

The parametersEm, R0, Re, Ce, Rd, and Cd 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.Table 1
Parameter constraints.
Parameter
Initial value
Minimum
Maximum
E
m
3.3 V
2 V
3.6 V
R
0
0.01Ω
0Ω
1Ω
R
e
0.005Ω
0Ω
1Ω
C
e
0.005 F
0 F
1 F
R
d
10000Ω
1Ω
100000 Ω
C
d
10000 F
1 F
100000 F


## 4.3. Model Evaluation

The current and voltage data were used as the input to the identification algorithm described in Section2. The second-order 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 lithium-ion battery from SOC=0.1 to SOC=1, 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)(22)SSE=∑(xi-x)2.The parameters estimation results with 1/3C discharge.
(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 variablesWe 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:(1) 20 A charge for 420 seconds, (2) rest for 30 seconds, (3) 10 A charge for 120 seconds, (4) 10 A discharge for 120 seconds, (5) 4 A charge for 300 seconds, (6) 20 A discharge for 120 seconds, (7) 10 A charge for 120 seconds, (8) 4 A discharge for 180 seconds, (9) 40 A charge for 23 seconds, (10) 10 A discharge for 120 seconds, (11) 4 A charge for 300 seconds, (12) 40 A discharge for 60 seconds, (12) 20 A charge for 120 seconds, (13) 4 A discharge for 120 seconds, and (14) rest for 30 seconds. Figure 5 shows that the model can quickly and accurately track the real-time voltage of the battery, with an error of less than 0.1 V.The results of model validation with DST data.
(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 Section4.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.Comparison of SOC estimation and error curve of constant-current discharge pulse.
(a)
True SOC and its experiment results with EKF and FDEKF
(b)
SOC experiment errors with EKF and FDEKFFigure6(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 timetcost as
(23)RMSE=1T∑k=1N(x^k-xk)2,tcost=1N∑k=1Ntcostk,
where T is the time step, x^k is the estimated SOC at step k, xk is the true SOC at step k,tcostk is the computation time at step k, and N is the sampling number. The results in Table 2 clearly indicate that FDEKF is superior to EKF in both estimation accuracy and algorithm complexity.Table 2
Comparison of SOC estimation.
Algorithm
Single mean computing time
RMSE
EKF
3.8994
e
-
05 S
0.0174
FDEKF
3.9371
e
-
04 S
0.0018In order to confirm the robustness of FDEKF, we performed another two tests with changing current and DST data using the parameters in Table2, 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 EKF-based estimator has a poor performance, with a maximum absolute error of 14%, while the FDEKF-based 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 FDEKF-based method provides better performance in the SOC estimation under modeling error.Comparison of SOC estimation and error curve of changing-current discharge pulse.
(a)
Terminal current/voltage curves of changing-current discharge pulse
(b)
SOC estimation results of changing-current discharge pulse
(c)
SOC estimation errors of changing-current discharge pulseComparison of SOC estimation and error curve of DST data with EKF and FDEKF.
(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 Figure9, which consists of a DigatronMCT 30-05-40 cell cycler, a voltage acquisition unit LTC6803-4, a high speed MCU AT90CAN128, a Hall current sensor ACS750SCA-050 and a core data processor TMS320F2812. The Digatron MCT 30-05-40 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. LTC6803-4 can measure up to 12 series connected battery cells at the same time. AT90CAN128 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC structure. ACS750SCA-050 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.Figure 9
Test bench.Figure 10
The extended structure diagram.We tested the single battery under DST working condition on this test bench using the EKF and FDEKF algorithms. Table3 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.Table 3
Comparison of the simulated and experimental SOC results.
Comparison point
True SOC
Simulation error of SOC
Experimental error of SOC
EKF
FDEKF
EKF
FDEKF
First Loop end point
0.172
0.8%
0.4%
1.7%
0.9%
Second Loop end point
0.352
0.9%
0.3%
2.6%
1.1%
Third Loop end point
0.532
1.0%
0.4%
4.0%
1.3%
Forth Loop end point
0.712
1.4%
0.5%
3.7%
1.3%
Fifth Loop end point
0.893
1.5%
0.7%
4.9%
1.5%
Average error
—
1.12%
0.46%
3.38%
1.22%


## 5.1. Test Bench

The test bench is shown in Figure9, which consists of a DigatronMCT 30-05-40 cell cycler, a voltage acquisition unit LTC6803-4, a high speed MCU AT90CAN128, a Hall current sensor ACS750SCA-050 and a core data processor TMS320F2812. The Digatron MCT 30-05-40 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. LTC6803-4 can measure up to 12 series connected battery cells at the same time. AT90CAN128 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC structure. ACS750SCA-050 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.Figure 9
Test bench.Figure 10
The extended structure diagram.We tested the single battery under DST working condition on this test bench using the EKF and FDEKF algorithms. Table3 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.Table 3
Comparison of the simulated and experimental SOC results.
Comparison point
True SOC
Simulation error of SOC
Experimental error of SOC
EKF
FDEKF
EKF
FDEKF
First Loop end point
0.172
0.8%
0.4%
1.7%
0.9%
Second Loop end point
0.352
0.9%
0.3%
2.6%
1.1%
Third Loop end point
0.532
1.0%
0.4%
4.0%
1.3%
Forth Loop end point
0.712
1.4%
0.5%
3.7%
1.3%
Fifth Loop end point
0.893
1.5%
0.7%
4.9%
1.5%
Average error
—
1.12%
0.46%
3.38%
1.22%


## 6. Conclusions

In this study, we proposed a robust and powerful real-time SOC estimator for the lithium-ion batteries, and the parameters of the second-order 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 real-time 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.



---

*Source: 348537-2014-04-03.xml*