An Accurate State of Charge Estimation Method for Lithium Iron Phosphate Battery Using a Combination of an Unscented Kalman Filter and a Particle Filter

An accurate state of charge (SOC) estimation of the battery is one of the most important techniques  in  battery‐based  power  systems,  such  as  electric  vehicles  (EVs)  and  energy  storage systems (ESSs). The Kalman filter is a preferred algorithm in estimating the SOC of the battery due to  the  capability  of  including  the  time‐varying  coefficients  in  the  model  and  its  superior performance  in  the  SOC  estimation.  However,  since  its  performance  highly  depends  on  the measurement noise  (MN) and process noise  (PN) values,  it  is difficult  to obtain highly accurate estimation results with the battery having a flat plateau OCV (open‐circuit voltage) area in the SOC‐ OCV curve, such as the Lithium iron phosphate battery. In this paper, a new integrated estimation method  is proposed by  combining an unscented Kalman  filter and a particle  filter  (UKF‐PF)  to estimate the SOC of the Lithium iron phosphate battery. The equivalent circuit of the battery used is composed of a series resistor and two R‐C parallel circuits. Then, it is modeled by a second‐order autoregressive exogenous (ARX) model, and the parameters are identified by using the recursive least  square  (RLS)  identification method. The  validity  of  the proposed  algorithm  is  verified  by comparing  the  experimental  results  obtained with  the  proposed method  and  the  conventional methods.


Introduction
At present, many companies, under the support of governments or organizations, put much effort into developing battery-powered vehicle applications. Lithium is an attractive material for high energy density batteries due to its relatively lower equivalent weight and higher standard potential. It provides much higher power and energy densities in both gravimetric and volumetric terms, which are the most important parameters for applications in portable electronics, such as smartphones, digital cameras, and laptops. Lithium-ion (Li-ion) batteries come in many variations, and the Lithium cobalt oxide (LiCoO2) battery and the Lithium iron phosphate (LiFePO4) battery are popular Li-ion batteries. Despite its lower energy density and lower nominal voltage as compared to cobalt-based Li-ion batteries, the LiFePO4 (LFP) batteries are widely investigated due to their lower cost, superior safety, and greater longevity [1][2][3][4]. Recently, the LFP battery has had a significant growth in the use of energy storage systems (ESS) and electric vehicles (EVs). Therefore, the need for a battery management system, which can accurately estimate the state of charge (SOC) of the battery, is also increasing.
However, unlike the other Li-ion batteries, the LFP battery shows a strong hysteresis phenomenon, which means that the SOC-open-circuit voltage (OCV) relationships during the charge deviation used for the likelihood function of the PF can improve the estimation performance of the PF by using the MN covariance of the UKF.
In this work, the double polarization (DP) model, which can represent the characteristics of a LiFePO4 battery in a more precise way, was used to obtain the accurate SOC estimation results and an ARX model and the recursive least square (RLS) identification method was used for the online identification of the battery parameters to obtained robust SOC estimation results. In the proposed method, an integrated SOC estimator was introduced based on the adaptive UKF and PF. The standard deviation of the likelihood function in the PF was updated by using the covariance of MN in the UKF to improve the convergence time and the accuracy of SOC estimation. The flowchart of the proposed method is shown in Figure 1. This paper is organized as follows. The battery cell model using a second-order ECM and ARX model is established in Section 2. The RLS parameter identification algorithm by the ARX model is discussed in Section 3. In Section 4, the proposed algorithm is introduced based on a UKF and a PF. The reliable and robust performance of the proposed algorithm is verified through experiments in Section 5. Finally, the conclusions of this research and the future plan are provided in Section 6.

Equivalent Circuit Model (ECM)
For accurate SOC estimation, it is important to use an accurate ECM for the battery, especially for the battery, such as LiFePO4, which has a flat plateau on the OCV-SOC curve. Various kinds of battery models have been developed to represent the static and dynamic characteristics of the battery. Among them, the ECMs composed of a voltage resource, resistors, and capacitors are widely used. Based on the combination of resistors and capacitors, the ECMs are classified into several kinds, such as the Rint Battery model [15], Thevenin model [16], improved Thevenin model named the double polarization (DP) model [17] and, etc. Generally, the Thevenin models consist of a voltage resource, an ohmic resistor, and several RC networks. Typically, the component count of the ECM tends to be increased to precisely describe the dynamic behavior of the battery. Therefore, the SOC estimation accuracy can also be improved if a higher-order ECM is used. However, since the computational burden of the SOC estimation is proportional to the complexity of the model, it is desirable to select a suitable battery model to achieve an accurate SOC estimation with a reasonable amount of computation. In [7,18], the performances of the seven representative ECMs have been evaluated, and it has been proven that the DP model is optimal among them in terms of optimal performance [7,18].
In this research, the DP model consisting of an OCV-UOC, an Ohmic resistance Ri, and two RC networks, was selected as an ECM of the LFP battery, as shown in Figure 2. The charge transfer effect causing a first voltage drop UP on the electrode potential is presented by the charge transfer resistance RP and the double layer capacitance CP with a short time constant. The diffusion effect causing a second voltage drop UD on the electrode potential is presented by RD and CD with a long time constant. The corresponding relationship between UOC and SOC is determined through a SOC-OCV test described in [19]. The electrical behavior of the LFP with the DP model, shown in Figure 2, can be expressed as Equation (1):

Second-Order Autoregressive Exogenous (ARX) Model for Parameter Identification
As already well known, the parameters of the ECM of the battery vary depending on the SOC, temperature, and the amplitude of the current applied to the battery [20]. Therefore, to obtain the accurate SOC estimation results, the parameter values in the ECM should be updated at each condition. In the case of the off-line method, the parameter variations of the battery at different conditions are measured by the extensive pretests and used in the form of the lookup table. However, it is a time consuming and labor-intensive work, which increases the cost of the system [20].
The autoregressive exogenous (ARX) model is widely used as a system identification tool in many researches since their optimal predictors are always stable [21]. A practical equation to determine the next output value with previous input values of the 2 nd -order ARX model with zero mean white noise e(k) is given as Equation (2).
where y(k) and u(k) indicates the system output and input, respectively. A more compact form of Equation (2) can be obtained as the linear regression.
In Equation (3), ϑ(k − 1) is the coefficient vector, ψ(k) is the input vector, and e(k) is the error between the measured and estimated values. The coefficient vector and the input vector can be represented as follows: On the other hand, according to the electrical behavior of the ECM of the battery expressed in Equation (1), the transfer function given by the Laplace equation for the battery impedance can be deduced in the s domain as: Equation (5) can be rewritten as a simple form by Equation (6). where: The basic forward Euler transformation method, a simple yet accurate approximation with a small step interval Ts, is employed in the computational process of discretization. By substituting s in Equation (6) , a discrete form of the transfer function can be obtained as Equation (8).
Hence, the differential equation indicating the time-domain relationship between input and output can be represented as Equation (9): The above function indicates the 2 nd -order ARX model of Equation (2) for the battery ECM in Figure 2, and the parameters of the system can be extracted by using a parameter identification method, such as the RLS method.

Dynamic Parameter Identification Algorithm Using the Autoregressive Exogenous Model
The dynamic parameters of an LFP battery are identified by the RLS algorithm based on the established ARX model. The operating principle of the parameter identification algorithm, such as RLS, is basically to compute the parameter update at a time index k by adding a correction term to the previous parameter at a time index k − 1 once the new information is available [22]. Considering the dynamic battery parameters and the time-domain relationship between input and output in Equation (9), the system identification using the RLS algorithm can be summarized as follows [23]: System output: Prediction error: Updated gain: Covariance matrix: Estimated parameter: Parameters and input vector: is a forgetting factor which can be used to give greater weight to the recent data than the old one. After the estimated parameter vector ϑ (k) is identified, the parameters of the battery model at each time index can be determined by Equation (16).

Proposed SOC Estimation Algorithm Using a Combination of UKF and PF
The general mathematical function of the battery model, including the state equation and the observation equation of the discrete system, can be expressed by Equation (17).
where xk represents the system state at time index k, uk stands for the input of the system, including battery current, yk is the observed output which indicates battery terminal voltage, wk and vk are independent process noise and measurement noise with covariance matrixes Qk and Rk, respectively. Ak and Bk are state matrixes, and Ck and Dk are observed matrixes.
The state-space model of the battery can be represented in the form of the discrete-time equation, as shown in Equation (18), according to the electrical behavior of the ECM depicted in Figure 2.
where ηI and Cn are the columbic efficiency and actual capacity of the battery cell, respectively.

Unscented Kalman Filter Based SOC Estimation
The UKF based SOC estimation is well known, and it can be summarized as follows [12,24]: 1. Determination of Scaling and Weights: Primary, secondary, and scaling parameters: Length of state vector: n Scaling parameter: Weight vector: Initialization: 3. Generation of the Sigma-point: Error covariance matrix square root: Sigma-point:

Prediction transformation:
State update: Mean of the predicted state: Covariance matrix of the predicted state:

Observation transformation
Propagation of sigma-point through observation: Update the output: Covariance matrix of the predicted output: Covariance matrix of the predicted state and output: 6. Measurement update Kalman gain: State estimation measurement update: Error covariance measurement update:

Particle Filter Based SOC Estimation
The particle filter method assumes that there are many possible predictions, and each of them has its own weight or probability [25]. The state-space variables are estimated by PF through a probability distribution p(xk|yk) that provides the probabilities of possible values of the true state. The step-by-step process for the PF can be expressed as follows [25][26][27]: 1. Initialization: Randomly draw N initial particles for SOC.
Draw particles x0 i~p (x0); i = 1,2,…N. 2. Sampling and weight calculation: From the distribution, the particles are sampled and updated with new observation information, and then a new sample is obtained. Likelihood calculation: Assigning particle a weight: Calculation of the Distribution: Normalization of the weight: 3. Resampling: Resampling when effective sample size Neff is under the threshold: Replacing current set by a new one: 4. State prediction:

Combined SOC Estimation Method by Using UKF and PF
In this paper, a combined SOC estimation method using UKF and PF is proposed. The PF is used for online SOC estimation based on the priori parameter information from ARX-RLS and the OCV information from UKF. In UKF, the PN and MN are assumed to be independent, and the performance of the combined UKF-PF relies on it heavily. When the PN and MN are constant values, the estimation accuracy is limited since the PN and MN are actually varying values. Therefore, the noise covariance needs to be computed at each time of sampling by the following equations [28]: where e and q are the residual error in the measured output and the window size for covariance matching, respectively. Fk represents the covariance approximation of the voltage residual at step j. The flowchart of the proposed method is shown in Figure 3. The likelihood calculation shown in Equation (35) is quite important in the proposed method because the values for PN and MN for the UKF are calculated at every step, and the updated values are provided to calculate the likelihood of the PF. Here, Rk is the covariance of the measurement noise vk. It affects assigning particles a weight. Since the likelihood of the PF is recalculated every time in the proposed method, the estimation performance can be further improved.

Delay unit
Generate the sigma point P k-1 = chol (P k-1 ) Sampling and weight calculation Re-sampling Figure 3. Flowchart of the proposed estimation algorithm.

Battery Test Bench
The experimental data, such as battery current and voltage, were measured through an established experimental setup in which a Headway 38120S 10Ah LiFePO4 battery was connected to a bipolar DC power supply (NF BP4610). A program composed by LabView (National Instruments, Austin, Texas, USA) was used to control the power supply to regulate the battery current as required.
The measured voltage and current data of the cell were recorded in the host computer through the data acquisition board (DAQ 9125, National Instruments, Austin, Texas, USA). The specification of the LiFePO4 battery is shown in Table 1, and the experimental setup is shown in Figure 4.

Experimental Results and Discussions
To verify the performance of the proposed UKF-PF algorithm, the Urban Dynamometer Driving Schedule (UDDS) was applied to a fully charged battery cell, as shown in Figure 5a [29]. The Constant Current -Constant Voltage (CC-CV) charge method was used to charge the battery up to 100% SOC. The UDDS profile is designed in a way that the battery cell SOC decreases from 100% SOC to 20% SOC, which is the typical operation range of the battery. The Ah counting method by integrating the battery current was used to calculate the reference SOC since quite accurate results can be obtained with the method when the time duration of the experiment is less than a few hours. At the beginning of the experiment, no load was applied to the battery for 900 s to see the SOC estimation performance of the proposed method during the rest. Then the battery was discharged with the current profile extracted from the UDDS and the 0.5 C rate constant current until the SOC reached 20%. At the first UDDS cycle, the regenerative braking was not applied so as not to exceed the maximum charge voltage of the LFP battery. The total experiment time was 10,700 sec, as shown in Figure 5a. The results in Figure 5b show the good agreement between the measured and the estimated terminal voltages of the battery by the proposed UKF-PF method. Figure 5c shows the SOC estimation results by the proposed method and Ah counting method. Here, 92% SOC was given as an initial value for the test. As shown in Figure 5c, it took 60 s to reach the reference SOC value by the proposed method. The root mean square error (RMSE) of the SOC estimation was 0.769%, while the maximum error was 1%. To compare the performance of the SOC estimation with the proposed method and the other conventional methods, UKF and Adaptive Unscented Kalman Filter (AUKF) algorithms were also used to estimate the SOC with the measured current and voltage waveforms, shown in Figures 5 and 6 which show the experimental results obtained with the proposed UKF-PF method, UKF and AUKF methods. Figure 6a shows the SOC estimation results by UKF, AUKF, and UKF-PF. The SOC estimation error of each method as compared to the reference value by the Ah counting method is shown in Figure 6b. It is clear that the proposed method showed the shortest convergence time in comparison with the other methods. The maximum SOC estimation error of the proposed UKF-PF method was around 1%, while that of UKF and AUKF was 2.5% and 1.6%, respectively. Table 2 shows the RMSE of the SOC estimation by UKF, AUKF, and proposed UKF-PF method.

Conclusions
In this research, an accurate SOC estimation method using a combination of a UKF and a PF suitable for LiFePO4 Battery was proposed, and its validity and feasibility were proven by the experiments. In the proposed UKF-PF method, the DP model was used to represent the characteristics of the battery better. The parameters of the battery were identified by using an ARX model and the RLS algorithm, and it was supplied to the combined UKF-PF algorithm for the robust SOC estimation. The main idea of the proposed method is to update the standard deviation of the likelihood function in the PF by using the covariance of MN in the UKF, thereby improving the convergence time and the accuracy of SOC estimation. In results, the accuracy of the SOC estimation can be further improved to have less than 1% error in terms of RMSE and MAE. The proposed algorithm can be widely employed to provide a reliable SOC estimation for the LFP battery systems, such as electric vehicles and energy storage systems.