A New SOC Estimation for LFP Batteries: Application in a 10 Ah Cell (HW 38120 L/S) as a Hysteresis Case Study

: An accurate state of charge (SOC) estimation of the lithium iron phosphate battery (LiFePO 4 ) is one of the most important functions for the battery management system (BMS) for electric vehicles (EVs) and energy storage systems (ESSs). However, an accurate estimation of the SOC of LiFePO 4 is challenging due to the hysteresis phenomenon occurring during the charge and discharge. Therefore, an accurate modeling of the hysteresis phenomenon is essential for reliable SOC estimation. The conventional hysteresis modeling methods, such as one-state hysteresis modeling and parallelogram modeling, are not good enough to achieve high-accuracy SOC estimation due to their errors in the approximation of the hysteresis contour. This paper proposes a novel method for accurate hysteresis modeling, which can provide a signiﬁcant improvement in terms of the accuracy of the SOC estimation compared with the conventional methods. The SOC estimation is performed by using an extended Kalman ﬁlter (EKF) and the parameters of the battery are estimated by using auto regressive exogenous (ARX) model and the recursive least square (RLS) ﬁlter. The experimental results with the conventional and proposed methods are compared to show the superiority of the proposed method.


Introduction
Rechargeable lithium batteries are widely used for electric vehicles (EVs) and energy storage systems (ESSs). Lithium is a very attractive material for batteries due to its low equivalent weight and high standard potential. The first lithium ion battery was introduced to the market by Sony Corporation in 1992, and the market for these has grown to several hundreds of millions of cells per year for consumer applications. Most of them are composed of a carbon negative electrode and a lithium cobalt oxide (LiCoO 2 ) positive electrode [1]. Lithium chemistry provides higher power and energy densities in both gravimetric and volumetric terms, which makes it suitable for applications such as smart phones, digital cameras, and laptops [2]. After the lithium iron phosphate (LiFePO 4 ) battery was introduced by replacing the expensive cathode material with LiCoO 2 , the cost of the battery was reduced by 10% to 50% [3]. Compared with the other phosphate-based cathode materials, LiFePO 4 has lower operating voltage (2.0-3.65 V) but higher capacity [4]. The use of LiFePO 4 offers a longer cycle life and a higher current rating over standard lithium ion batteries. Due to their advantages over other kinds of batteries, LiFePO 4 batteries have shown a significant growth in use of EVs and ESSs. If the LiFePO 4 battery is overcharged or over discharged, the battery may receive fatal damage. So, it is necessary to manage this battery so that it can be used within a safe range [5][6][7]. A battery management system (BMS) that can accurately estimate the state of charge (SOC) of the battery is also needed [8][9][10].
However, a flat Open Circuit Voltage (OCV) plateau in the range of 20% to 80% SOC makes it difficult to achieve an accurate SOC estimation [11]. LiFePO 4 batteries produce a hysteresis phenomenon and cell OCV during charge that are different from during discharge at the same SOC [12]. The hysteresis phenomenon needs to be considered carefully for an accurate SOC estimation; otherwise, the error in SOC estimation becomes quite large.
In this paper, an SOC estimation with an advanced hysteresis modeling method is proposed to achieve SOC estimation of LiFePO 4 batteries with high accuracy. In the proposed method, the conventional parallelogram method [13] is further improved by using piecewise linearization of the hysteresis contour to reduce approximation error in the conventional method. The SOC estimation is performed by using an extended Kalman filter (EKF) and the parameters of the equivalent circuit of LiFePO 4 are estimated by the auto regressive exogenous (ARX) model and the recursive least square (RLS) filter [14][15][16]. In order to prove the effectiveness of the proposed method, accuracy in estimating SOC by each method are compared.

Conventional and Proposed Hysteresis Modeling Methods for LiFePO 4 Battery
In this section, the conventional and proposed hysteresis modeling methods are presented and their advantages and disadvantages show the superiority of the proposed method.

One-State Hysteresis Modeling Method
One conventional hysteresis modeling method for the battery is one-state hysteresis model (OSHM) [17] and is applied to a LiFePO 4 battery in References [11,18]. An averaged OCV OCV avg (SOC) as a function of SOC is described by means of OCV charge and OCV discharge extracted from the SOC-OCV curve. The function H(SOC) is the difference between the averaged OCV and the OCV charge or OCV discharge, H(SOC) = OCV chr − OCV avg or H(SOC) = OCV avg − OCV dis , as shown in Figure 1. Hence, it is positive during the charge and negative during the discharge. Therefore, the actual OCV of the battery including the hysteresis can be represented as OCV = OCV avg + V h , where V h is the hysteresis voltage introduced by Equation (1) where K is the constant that determines the rate of voltage change where the hysteresis voltage reaches H(SOC). Since d(SOC) dt = η b ·I b C n by coulomb counting, Equation (1) can be rewritten as Equation (2) where η b is the coulombic efficiency, I b is the charging current, and C n is the capacity of the battery. Equation (2) can be written in discrete form by Equation (3).
The final form of the state space equation can be obtained by including the hysteresis voltage in Equation (3) and EKF is used for the SOC estimation. Though this method is simple to implement, it shows a large error in estimating SOC of the LiFePO 4 for which the SOC-OCV curve has a flat plateau.

Hysteresis Modeling Method by Using a Parallelogram
Another conventional hysteresis modeling method is the parallelogram modeling method proposed in Reference [19]. In this method, the trajectory of the hysteresis voltage during charge/discharge is modeled by using a parallelogram and is calculated by using the charge throughput as shown in Equation (4).
where α is the hysteresis factor. The empirical equation of the hysteresis factor corresponding to the charge throughput can be expressed as follows [20] For the charge, For the discharge, where v is the ratio of α 1 and α 2 ; h 1 and h 2 are the slopes of the parallelogram model. All the parameters in the hysteresis model, v, h 1 , and h 1 , can be extracted by using a parallelogram and the least square estimation. It is possible to calculate the hysteresis voltage accurately by the parallelogram modeling method; hence, the SOC estimation can be achieved with high accuracy. However, the error in between the actual hysteresis voltage trajectory and the parallelogram increases since both inner and outer parallelograms cannot exactly follow the hysteresis voltage as shown in Figure 2.

The Proposed Advanced Hysteresis Model for the LiFePO 4 Battery
In this section, the proposed hysteresis modeling method is described and its advantage is presented in detail. The main purpose of the hysteresis modeling is to determine whether the actual OCV at each SOC lies on the charge curve, on the discharge curve, or somewhere between them depending on the charge throughput [13]. According to the results achieved from the previous test, as depicted in Figures 3 and 4, the boundary curve is called by the major loop. The partial test with 4% ∆SOC will show a small loop lying between two boundary curves, called a minor loop. As shown in Figure 3, the charge curve and the discharge curve of the minor loop touches the major loop when the SOC varies by 20%.  The proposed method was developed to reconstruct the OCV transition caused by hysteresis. This method introduces α and β as two hysteresis factors and ∆ as a change in SOC. Figure 4 shows how the method works with α, β, and ∆. ∆ increases from 0 to ∆n when the battery is charged, while ∆ decreases from ∆n to 0 when the battery is discharged. In order to model the hysteresis accurately, the variation in OCV between the upper boundary curve and the lower boundary curve are divided into five sectors as shown in Figure 4. α and β represent the ratio of hysteresis voltage change during the charge and discharge at each sector. Though ∆ can be selected less than 4% to improve the accuracy, it incurs more computational burdens. Therefore, n is selected as 5 so that each step change results in 4% SOC variation. α represents the slope of the voltage change during the charge and its value varies from α 0 to α n . β represents the slope of the voltage change during the discharge and its value varies from β n to β 0 .
Hence, the OCV during the hysteresis can be calculated according to the charge throughput as shown in the following equations.
where the values of α and β are normalized between 0 to 1. The hysteresis factors are refreshed at each sector. However, when the accumulated charge throughput during the charge or discharge exceeds 20% SOC, the OCV touches the major hysteresis loop. Equations (10) and (11) show how to calculate α and β.
where C n is the available capacity, η b is the coulomb efficiency of the battery, I b,k,chr is the charge current, and I b,k,dis is the discharge current.

SOC Estimation of LiFePO 4 Battery with EKF and Parameter Estimation Using ARX Model and RLS Filter
In this section the SOC estimation of LiFePO 4 battery with EKF and parameter estimation using ARX model and RLS filter is detailed.

ARX Model and RLS Filter
In order to achieve a good accuracy in SOC estimation of the battery, an accurate model of the battery needs to be used. The battery model should be capable of describing the dynamic behaviors of the battery with high accuracy and it should be simple enough to establish state equations [21]. The equivalent circuit model (ECM), consisting of resistor and parallel R-C networks connected in series, is the most commonly selected model. It was identified that two R-C networks are good enough to represent the dynamic behaviors of LiFePO 4 batteries including the relaxation voltage [22]. However, since the two R-C networks model is too complicated and the computational burden is quite high, the R-R||C model is preferred, as shown in Figure 5. Here, the voltage variation by the second R-C network is merged into the OCV by reconstructing it with the equilibrium voltage [23]. The ECM model used for the modeling is represented in Figure 5, in which R i is the pure Ohmic resistance, R p is the charge transfer resistance, and the double layer capacitance is C p [24]. In order to estimate the SOC of the battery, the combination of the RLS and EKF is used and the parameters of the battery are obtained by the auto regressive exogenous (ARX) model in this research. The transfer function G(s) of the battery impedance can be expressed in s-domain as follows.
In order to convert this transfer function in a discrete form, Euler's forward transformation method is used and the resulting equation can be obtained as follows.
The impedance voltage in discrete form is shown in Equation (16).
To identify these parameters, Equation (17) should be written in a form as where ψ k is the input vector obtained from the measured input values including the voltage drop across the battery impedance at the previous time index V imp,k−1 and the measured battery current at current and previous time index I b,k and I b,k−1 .
As mentioned earlier, the RLS filter is used to identify the parameters of the battery model. The RLS filter has been widely used for online parameter identification due to its lower computational burden during the last three decades [25,26]. The step-by-step implementation of this method is shown in Table 1. The dynamic system model described in Equation (17) is used and the forgetting factor λ is introduced, which gives more weight to the current data than the previous data for the time-varying vector θ k . After the vector θ k is obtained, the parameters of the battery can be determined by Equation (18).  (18) are used to extract the battery parameters after identifying a 1,k , a 2,k and a 3,k .
All the above-mentioned procedure is summarized in Figure 6 [19].

Extended Kalman Filter for the SOC Estimation
The SOC of the battery can be represented through the current integration as shown in Equation (19).
Equation (19) can be rewritten as the discrete form as in Equation (20).
The reconstructed OCV at each time index k during the charge by Equation (8) is where SOC k and SOC k−1 are the SOC at time index k and k − 1, respectively; I b,k−1 is the battery current at previous time index; and ∆t is the sampling period. The EKF is a method to estimate the system state in real-time and the algorithm compares the measured terminal voltage with the estimated voltage predicted by the EKF using a battery model [28]. The difference between the predicted and the measured terminal voltage leads to an adaption of the state of the battery model to that of the real battery. Therefore, the accurate model of the battery is critical for the accurate estimation of the terminal voltage, hence the SOC estimation. The discrete-time state equations for a non-linear system can be given as where x k represents the state parameter, f and h are non-linear system functions, u k is the input, w k is the process noise vector, v k is measurement noise vector, and y k is the measured signal.
In order to apply the EKF to the equivalent circuit model of LiFePO 4 battery in Figure 5, the state space equation in the discrete form can be derived as The computation process of the EKF with the above state space equation is well-known and it can be summarized as shown in Figure 7 [28].

Experiments of the SOC-OCV Curve of LiFePO 4
The tests were conducted on a LiFePO 4 HW 38120 L/S, for which specifications are shown in Table 1, by connecting it to a bipolar DC power supply (NF BP4610). A code was composed by LabVIEW 11.0 to control the output of the power supply, and voltage and current of the battery cell under test were recorded through a data acquisition board, NI PCI-6154.
In order to obtain the SOC-OCV relationship, a charge and discharge test was conducted using variable current pulses. The magnitude and duration of the current was 0.2 C and 15 min, respectively, so that each charge and discharge step charged and discharged the battery by 5% of its capacity. After each step, 3 h relaxation with no current was applied to obtain the OCV at a certain SOC. After finishing the test, two boundary OCV curves were obtained as shown in Figure 3. As shown in Figure 3, the SOC-OCV curves of the battery during the charge and discharge were not identical due to the hysteresis phenomenon. There was a gap between two curves of which the maximum value was 45 mV.
After each current pulse, the battery took 3 h relaxation and the terminal voltage was measured to obtain 3 min and 3 h relaxation voltage, OCV 3m and OCV 3h , respectively. The cell voltage recovery over several minutes or hours could not be reproduced with the simple equivalent circuit model given in Figure 5. Hence, the OCV recovery effect had to be considered separately. It was assumed that the voltage dropped across the impedance of the battery model and vanished after resting 3 min and the OCV recovery remained only. In order to incorporate the OCV recovery during the rest time, recovery factor ζ was introduced as shown in Equation (25). Here, ζ indicates whether the OCV is completely recovered or not and the transition from ζ = 1 to ζ = 0 during rest periods is assumed to proceed as a first-order exponential equation with the time constant of the OCV recovery [13]. Therefore, the OCV during the hysteresis lies in between them and can be modeled as a time constant τ and the diffusion factor ζ can be calculated by using Equation (25).
where t is the relaxation time. If the relaxation is less than 3 min (180 s), ζ is equal to 1. Therefore, the OCV can be reconstructed using ζ as follows where OCV chr and OCV dis are the OCV during the charge and discharge considering the relaxation, respectively.

Experiments for the Hysteresis Curve of LiFePO 4
In order to model the hysteresis, the hysteresis test had to be performed. Some partial cycles were applied to obtain hysteresis curves between two boundary OCV curves. At first, the fully charged battery was discharged to 20% SOC and charged up to 40% SOC by using five current pulses with 4% ∆SOC as shown in Figure 8. Next, the cell was discharged with the same current pulses. After each pulse the battery was rested for 3 h to obtain the OCV. The test was repeated at different SOCs such as 40% to 60% and 70% to 90% SOC to verify the hysteresis behavior. We found that the partial cycles at different SOCs were all the same, as shown in Figure 9. The hysteresis factors can be calculated for every 4% interval of the hysteresis curve from the experimental results.

Experimental Verification
To verify the proposed hysteresis modeling algorithm at different SOC regions, the battery was fully charged to 100% SOC and discharged to 20% SOC, as shown in Figure 10. Then the battery underwent the charge and discharge process repeatedly at various SOC values. This current profile applied to the battery test is suitable to verify the accuracy of the hysteresis modeling since the hysteresis phenomenon occurs at many different SOCs. In the experiments, the Ah counting method with known initial SOC value was used as an SOC reference for the comparison. In order to confirm the performance of SOC estimation by EKF, three different initial values, 60%, 90%, and 100% SOC, were given at the beginning. Figure 10 shows the results of the SOC estimation with three different initial SOC values and Figure 11 shows the error between the results by the proposed method and the Ah counting. Though the time for the convergence of each SOC estimation with different initial value was different: all of them converged successfully within 4 h and all the SOC estimation error after the convergence did not exceed 2%, which proves the reliable performance of the proposed method.

Comparison of the Methods by SOC Estimation Error
In order to compare the performance of the SOC estimation with different hysteresis modeling methods, each method was implemented separately and the results are compared in Figure 12. The root mean square error (RMSE) in Equation (28), mean absolute error (MAE) in Equation (29), and maximum error were used to evaluate the effectiveness of estimation. Here, MAE shows the size of the error intuitively and RMSE shows the distribution of the error RMSE = ∑ n k=1 e 2 k n (28) where e k is the SOC estimation error at time index k. The SOC estimation errors with three different hysteresis models are summarized in Table 2. The results in Figure 12 and Table 2 indicate that the SOC estimation by the proposed hysteresis model shows the lowest RMSE, MAE and maximum error, thereby proving the superior performance of the proposed hysteresis modeling method.

Conclusions
In this study, the hysteresis phenomenon of a LiFePO 4 battery was investigated and an advanced hysteresis modeling method was proposed. The validity of the proposed hysteresis modeling was verified through the comparison of the SOC estimation errors with the other two conventional methods. Due to the precise modeling of the hysteresis phenomenon in LiFePO 4 battery, the SOC estimation can be achieved with higher accuracy. The proposed hysteresis modeling can also be applied to the SOC estimation of other batteries, such as a lead-acid battery, which exhibits a significant hysteresis phenomenon.