A Comparative Study of Three Improved Algorithms Based on Particle Filter Algorithms in SOC Estimation of Lithium Ion Batteries

The state of charge (SOC) is an important parameter for batteries, especially those for electric vehicles. Since SOC cannot be obtained directly by measurement, SOC estimation methods are required. In this paper, three model-based methods, including the extended particle filter (EPF), cubature particle filter (CPF), and unscented particle filter (UPF), are compared in terms of complexity, accuracy, and robustness. The second-order resistor-capacitor (RC) equivalent circuit model is selected as the circuit model of the lithium-ion battery, and the parameters of the model are obtained by off-line identification. Then, the City test is applied to compare the performance of the methods. The experimental results show that the EPF method exhibits low complexity and fast running speed, but poor accuracy and robustness. Compared with the EPF method, the complexity of the CPF and UPF methods is relatively high, but these models offer improved accuracy and robustness.


Introduction
Lithium-ion batteries have advantages of high energy density, low self-discharge rate, and long cycle life, leading to their wide usage in electric vehicles and other electric storage devices.However, lithium-ion batteries also have shortcomings, such as the requirement for a special protection circuit-a battery management system (BMS)-to prevent battery overcharge and over-discharge, and to protect the normal function.State of charge (SOC) indicates the battery power situation, and SOC estimation is an important function of a BMS.An accurate SOC assessment is required to maximize the performance of lithium-ion batteries.For electric vehicles, SOC estimation is used to estimate the remaining mileage of electric vehicles, allowing the driver to reasonably plan their travel.Unlike our daily measurement of the length or weight of an object, for example, SOC cannot be directly measured.Further, the SOC cannot be calculated by a simple calculation, but must be obtained by specific estimation methods based on the voltage and current, temperature, and other conditional information containing noise.
Many SOC estimation methods have been proposed, but these algorithms have certain shortcomings, and no single algorithm provides the best performance for all situations.According to the SOC definition, the Ampere-hour integral method [1][2][3] integrates the battery charge and discharges current and adds it to the initial SOC value to obtain the SOC value.This algorithm does not need to establish a model of the battery, and it is simple and easy to implement.However, in the actual Energies 2017, 10, 1149 3 of 14 Equation ( 2) is the derivation of Equation (1): .
where SOC(t 0 ) and SOC(t) denote the SOC values at time t 0 and t, respectively.i represents the current during charging and discharging, and the current is negative at the time of charging and positive when discharging.Q N represents the rated capacity of the battery.
The EPF method, the CPF method, and the UPF method are all model-based methods.The battery model reflects the charge and discharge characteristics of the battery, providing a basis for SOC estimation.Previous studies have proposed many models such as the equivalent circuit model [23][24][25], the electrochemical model [26], the electrical thermal model [27], and others.The equivalent circuit model is widely used in the SOC estimation of lithium ion batteries.The second-order equivalent circuit model has higher accuracy than the first-order equivalent circuit model, and smaller computational complexity than other high-order circuit models [28].Therefore, the second-order equivalent circuit model was applied in this study for SOC estimation.As shown in Figure 1, the second-order equivalent circuit model consists of an open circuit voltage U OC (SOC) that changes with the SOC value, a resistor R 0 and two RC networks.The resistor R 0 is the ohmic resistance, R 1 and C 1 are the activation polarization resistance and the polarization capacitance, respectively, and R 2 and C 2 , respectively, are the concentration polarization resistance and the polarization capacitance.
Energies 2017, 10, 1149 3 of 14 Equation ( 2) is the derivation of Equation ( 1): where 0 ( ) S O C t and ( ) S O C t denote the SOC values at time 0 t and t , respectively.i represents the current during charging and discharging, and the current is negative at the time of charging and positive when discharging.N Q represents the rated capacity of the battery.The EPF method, the CPF method, and the UPF method are all model-based methods.The battery model reflects the charge and discharge characteristics of the battery, providing a basis for SOC estimation.Previous studies have proposed many models such as the equivalent circuit model [23][24][25], the electrochemical model [26], the electrical thermal model [27], and others.The equivalent circuit model is widely used in the SOC estimation of lithium ion batteries.The second-order equivalent circuit model has higher accuracy than the first-order equivalent circuit model, and smaller computational complexity than other high-order circuit models [28].Therefore, the secondorder equivalent circuit model was applied in this study for SOC estimation.As shown in Figure 1  According to the second-order equivalent circuit model shown in Figure 1, the following three equations can be obtained: where 1 U and 2 U denote the terminal voltages of the  According to the second-order equivalent circuit model shown in Figure 1, the following three equations can be obtained: . .
where U 1 and U 2 denote the terminal voltages of the R 1 C 1 and R 2 C 2 networks, respectively.
. Consider the current i(t) as the model input u and the voltage U t as the model output y.Combine Equations ( 2)-(4) and select x = [SOC, U 1 , U 2 ] T as the state vector, and then the discrete-time state space equations can be deduced as:

Parameter Identification
According to the second-order RC equivalent circuit model established in Figure 1, to further estimate the SOC value, we must first determine the parameters R 0 , R 1 , R 2 , C 1 , and C 2 , and the corresponding relationship between the open circuit voltage and SOC.The following experiments were carried out using Samsung ICR18650-22P lithium-ion batteries, and the detailed description of the experimental equipment is provided in Section 4. The experiment procedure was performed as follows: (1) The constant current constant voltage (CCCV) method was used to charge the battery to an upper limit cut-off voltage of 4.2 V, and then set aside for 2 h.Next, the battery was discharged to the lower limit cut-off voltage of 2.75 V at 1 C, and then set aside for 2 h; (2) Step (1) was performed three times, using the average of the three discharges (1.98 Ah) as the actual capacity of the battery; (3) Finally, 1 C discharge was done to 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 15%, 10%, 5%, and 0% of the battery capacity, and then stopped for 2 h after each discharge.
The performance of the battery is supposed to change during the charging-discharging process and the aging process.Therefore, when the second-order RC equivalent circuit is used as the battery model, parameters R 0 , R 1 , R 2 , C 1 , and C 2 will also change in the battery charging-discharging process and aging process.There is no doubt that online parameter identification of these parameters is more helpful in improving model veracity and SOC estimation accuracy.However, it is beyond the scope of this paper.The offline identification method is used in this paper.In the above experiment, a discharge and static process was selected for parameter identification and the first section of the discharge and static curve has been selected (in fact, the selection of which section has little effect on the estimation accuracy).The widely-used exponential function fitting method is used to identify the parameters R 0 , R 1 , R 2 , C 1 , and C 2 , which are identified as follows: The experimental results are shown in Figure 2. The abscissa indicates the discharge time of the battery, and each time period corresponds to a different SOC value.The blue solid line and the red solid line indicate the battery discharge current and battery voltage curve with time, respectively.The red thick solid line in Figure 2 represents the correspondence between the open circuit voltage (OCV) and the SOC obtained by the sixth order polynomial fitting.

Extended Particle Filter (EPF)
• Initialize particles: where 0 i x represents the initial state of the i-th particle and 0 ˆi P represents the initial error covariance of the i-th particle.0 i w is the initial weight of the i-th particle and N indicates the total number of particles.Additionally, the article selects N = 50 as an example.

•
Predict the state and the error covariance: where k Q is the process noise covariance at time k.i k F is the process matrix.
• Calculate the Kalman gain: where k R denotes the measurement noise covariance at time k.i k H is the measure matrix.
• Update the predicted state and the error covariance:

Extended Particle Filter (EPF)
• Initialize particles: where x i 0 represents the initial state of the i-th particle and Pi 0 represents the initial error covariance of the i-th particle.w i 0 is the initial weight of the i-th particle and N indicates the total number of particles.Additionally, the article selects N = 50 as an example.

•
Predict the state and the error covariance: where Q k is the process noise covariance at time k.F i k is the process matrix.

•
Calculate the Kalman gain: where R k denotes the measurement noise covariance at time k.H i k is the measure matrix.

•
Update the predicted state and the error covariance: Energies 2017, 10, 1149 • Update particles: • Calculate the weights of the particles: • Normalize weights: • Resampling: A detailed description of resampling is in [29].
The selection of Q, R requires a certain assessment of working conditions and noise environment.The estimation accuracy will be improved if the selection of Q, R is accurate and suitable enough.It is fairly difficult to exactly assess working conditions and noise environment for practical application.Some research imports adaptive algorithms to constantly revise the values of Q and R.However, this is beyond the research scope of this paper.In this paper, Q and R are selected based on a ballpark assessment of practical working conditions, with the purpose of comparing the performance of different algorithms.During the comparison, the values of Q and R as follows are the same in different algorithms: Moreover, H and P are constantly updated in the computation process of algorithms.

Cubature Particle Filter (CPF)
• Initialize particles: • Calculate the cubature points for each particle: [1] j denotes that the point is centered at the j-th point of [1], and the symbol [1] is a complete set of all symmetric points, denoting the set of points generated by the full permutation of the elements of the n-dimensional unit vector e = [1, 0, • • • , 0] T and the change of the element symbol.

•
Propagate the cubature points and calculate the predicted state: Energies 2017, 10, 1149 7 of 14 • Calculate the cubature points for each particle: • Propagate the cubature points and calculate the predicted measurement: • Calculate the innovation covariance and the cross-covariance: • Update the state and the error covariance: • The latter part of the CPF method is the same as that of the EPF method from Equation ( 14) to the end of the method.

•
Propagate the sigma points and estimate the predicted state and the error covariance: xi,(s) • Calculate the predicted measurement: ŷi,(s)

•
Calculate the innovation covariance and the cross covariance matrices: • Calculate the Kalman gain: • Update the state and the error covariance: • The latter part of the UPF method is the same as that of the EPF method from Equation ( 14) to the end of the method.

Battery Test Bench
The structure of the battery test workbench is shown in Figure 3.A Samsung ICR-section P lithium-ion battery (Samsung, Seoul, Korea) was used as the experimental test object.The battery was placed in the battery constant temperature and humidity box (Sanwood, Dongguan, Guangdong, China), and connected with the Arbin battery test equipment (Arbin, College Station, TX, USA).The battery constant temperature and humidity box is used to provide the required battery temperature and humidity conditions, and the PC is connected with the battery test equipment and is used to control the battery test equipment to perform the battery charge and discharge test.The generated data was stored in an SQL database.Matlab R2014a (MathWorks, Natick, MA, USA) was used to analyze the experimental results, and compare the advantages and disadvantages of the algorithms.
battery constant temperature and humidity box is used to provide the required battery temperature and humidity conditions, and the PC is connected with the battery test equipment and is used to control the battery test equipment to perform the battery charge and discharge test.The generated data was stored in an SQL database.Matlab R2014a (MathWorks, Natick, MA, USA) was used to analyze the experimental results, and compare the advantages and disadvantages of the algorithms.

Performance Comparison
In order to compare the performance of the algorithm for the actual work process, the City test was used to simulate the current changes of the battery during the driving of an electric car.A portion of the City operating current is shown in Figure 4.The sampling time is 1 s.The current is positive for discharge, and negative during charging.

Performance Comparison
In order to compare the performance of the algorithm for the actual work process, the City test was used to simulate the current changes of the battery during the driving of an electric car.A portion of the City operating current is shown in Figure 4.The sampling time is 1 s.The current is positive for discharge, and negative during charging.

Comparison of the Complexity of Methods
The estimation time of the algorithm is greatly influenced by the performance of the hardware, and the estimation time of the algorithm is relatively short if high performance hardware is used.The estimated time of the algorithm is also affected by the details of the program.To control the influence of the above two factors on the algorithm estimation time, three experiments were carried out in the same program running environment, as presented in Table 1.According to the results of the three

Comparison of the Complexity of Methods
The estimation time of the algorithm is greatly influenced by the performance of the hardware, and the estimation time of the algorithm is relatively short if high performance hardware is used.The estimated time of the algorithm is also affected by the details of the program.To control the influence of the above two factors on the algorithm estimation time, three experiments were carried out in the same program running environment, as presented in Table 1.According to the results of the three experiments, we can conclude that the computational cost of the EPF method is much smaller than that of the CPF method and the UPF method, and the computational complexity of the UPF method is slightly larger than that of the CPF method.The SOC estimation accuracy of the three methods and the estimated battery voltage accuracy were tested under the City test, as shown in Figures 5 and 6.According to the data presented in Figure 5a, the EKF, EPF, CPF, and UPF methods can effectively estimate the SOC value.Figure 5b and Table 2 shows the SOC estimation error of the three methods.The SOC estimation error of the EKF method with yellow line and the EPF method represented by the green solid line is larger than that of the other two methods.The SOC estimation error of the UPF method represented by the purple solid line is the smallest, with the best estimation result.Additionally, Figure 6a shows that the three methods can well predict the terminal voltage of the battery using the established second-order RC equivalent circuit model.As shown in Figure 6b, the voltage estimation error of the EPF method is the smallest, and the voltage error of the UPF method is the largest.However, the maximum error is less than 0.02 V for the three algorithms.During actual battery operating conditions, the values measured by the current sensor and the voltage sensor tend to contain noise.To maximize actual working conditions, the equations of non-Gaussian noises which have been added into the current and voltage of City test, are respectively: where r 1 , r 2 , r 3 , r 4 represents uncorrelated random numbers between 0 and 1. Figure 7 shows estimation results of the four methods.Table 3 shows the average absolute error and the maximum absolute error in the estimation process of the data shown in Figure 7.According to Figure 7, the EKF method has been ineffective under the condition of adding non-Gaussian noise, and because the PF method has no resistance to non-Gaussian noise, the other three algorithms are better than EKF method.Since the EPF method approximates the nonlinear function of the system by first order linearity, a large error is introduced, which results in the accuracy of the EPF method are lower than those of the CPF method and the UPF method.absolute error in the estimation process of the data shown in Figure 7.According to Figure 7, the EKF method has been ineffective under the condition of adding non-Gaussian noise, and because the PF method has no resistance to non-Gaussian noise, the other three algorithms are better than EKF method.Since the EPF method approximates the nonlinear function of the system by first order linearity, a large error is introduced, which results in the accuracy of the EPF method are lower than those of the CPF method and the UPF method.

Conclusions
In this paper, the SOC of a lithium-ion battery was estimated based on EKF, EPF, CPF, and UPF models.The state-space equations were established based on the second-order equivalent circuit model, which is widely used as the lithium-ion battery model.The individual methods were used to identify the parameters in the state-space equations.Compared with the EKF method, EPF, CPF, and UPF methods have great advantages in SOC estimation, especially in the case of a poor environment.The complexity, accuracy, and robustness of the EPF, CPF, and UPF methods were then compared experimentally with the test of the City driving cycle.According to the experimental results, The EPF method is less dependent on hardware than the CPF and UPF methods, therefore, the EPF method should be used if the hardware is insufficient.Although the reliability of the three algorithms is similar with or without noise, the SOC estimation accuracy of the EPF method was lower than that

Conclusions
In this paper, the SOC of a lithium-ion battery was estimated based on EKF, EPF, CPF, and UPF models.The state-space equations were established based on the second-order equivalent circuit model, which is widely used as the lithium-ion battery model.The individual methods were used to identify the parameters in the state-space equations.Compared with the EKF method, EPF, CPF, and UPF methods have great advantages in SOC estimation, especially in the case of a poor environment.The complexity, accuracy, and robustness of the EPF, CPF, and UPF methods were then compared experimentally with the test of the City driving cycle.According to the experimental results, The EPF method is less dependent on hardware than the CPF and UPF methods, therefore, the EPF method should be used if the hardware is insufficient.Although the reliability of the three algorithms is similar with or without noise, the SOC estimation accuracy of the EPF method was lower than that of the CPF method and the UPF method.Therefore, the CPF method and the UPF method should be applied if the hardware condition can be satisfied.
, the second-order equivalent circuit model consists of an open circuit voltage ( ) the SOC value, a resistor 0 R and two R C networks.The resistor 0 R is the ohmic resistance, 1 R and 1 C are the activation polarization resistance and the polarization capacitance, respectively, and 2 R and 2 C , respectively, are the concentration polarization resistance and the polarization capacitance.

Figure 3 .
Figure 3.The structure of the battery test workbench.

Figure 3 .
Figure 3.The structure of the battery test workbench.

Figure 4 .
Figure 4.The current profile under the City test.

Figure 4 .
Figure 4.The current profile under the City test.

Figure 5 .
Figure 5.Comparison of SOC estimation accuracy under the City test: (a) SOC estimation; and (b) SOC estimation error.

Figure 5 .
Figure 5.Comparison of SOC estimation accuracy under the City test: (a) SOC estimation; and (b) SOC estimation error.

Figure 6 .
Figure 6.Battery model outputs under City test: (a) model output; and (b) model error.

Figure 6 .
Figure 6.Battery model outputs under City test: (a) model output; and (b) model error.

Figure 7 .
Figure 7.Comparison of estimation results of the four methods in a noisy environment: (a) SOC estimation; and (b) SOC estimation error.

Figure 7 .
Figure 7.Comparison of estimation results of the four methods in a noisy environment: (a) SOC estimation; and (b) SOC estimation error.

Table 1 .
Time consumption.Comparison of the Accuracy and the Model Error of the Methods

Table 3 .
Performance comparison of four methods in noise environment.

Table 3 .
Performance comparison of four methods in noise environment.