Adaptive State of Charge Estimation for Li-ion Batteries Based on an Unscented Kalman Filter with an Enhanced Battery Model

Accurate estimation of the state of charge (SOC) of batteries is one of the key problems in a battery management system. This paper proposes an adaptive SOC estimation method based on unscented Kalman filter algorithms for lithium (Li)-ion batteries. First, an enhanced battery model is proposed to include the impacts due to different discharge rates and temperatures. An adaptive joint estimation of the battery SOC and battery internal resistance is then presented to enhance system robustness with battery aging. The SOC estimation algorithm has been developed and verified through experiments on different types of Li-ion batteries. The results indicate that the proposed method provides an accurate SOC estimation and is computationally efficient, making it suitable for embedded system implementation.


Introduction
Batteries have been widely used in many applications where electric energy storage is needed, such as renewable energy systems, telecommunication power supplies, electric power systems, military applications, and electric transportation systems [1][2][3][4][5].The high electrochemical potential and energy density of lithium (Li) make Li-ion batteries a very promising solution for the storage of electric energy.The SOC of a battery cell is defined as the ratio of the remaining capacity to the nominal capacity of the cell.It is one of the most important battery state variables, and an accurate SOC gauge is critical to the optimal management of batteries [6].Unfortunately, the SOC cannot currently be measured directly but must be estimated via other measurements.Consequently, in real applications, battery SOC estimation is one of the core challenges in battery management systems (BMSs) [7].
Typical methods for SOC estimation include ampere-hour (AH) counting (e.g., Coulomb counting), inverse nonlinear mapping from the open circuit voltage (OCV) to the SOC, the Kalman filter (KF) [8] and its extensions [7,[9][10][11], [e.g., the extended KF (EKF) and unscented KF (UKF)], artificial neural network (NN)-based methods [12], and fuzzy logic-based methods [13].Because the KF cannot be used directly for state prediction of a nonlinear system, the EKF- [7,9] and UKF-based methods [10] are the most widely used.However, the EKF must compute the Jacobian matrix and is generally not suitable for highly nonlinear systems with non-Gaussian noise.Similar to the EKF, the UKF is another extension of the KF and is also a recursive minimum mean square error (MMSE) estimator.The UKF has been demonstrated to outperform the KF and EKF in terms of accuracy and robustness for nonlinear estimation.The UKF does not need to calculate the Jacobian matrix and does not require noise to be Gaussian, which makes it more appealing for SOC estimation because battery systems are highly nonlinear and the noise properties are typically not known.
This paper contributes to this field in the following key aspects: (1) an enhanced battery model is proposed to include the impact of different charge/discharge rates and temperatures.It is well known that battery maximum capacities depend significantly on charge/discharge currents and operating temperatures.The model is structured as the ratio of two functions, one as a function of the temperature and the other of the charge/discharge rate.This model structure represents data well, allows us to employ simple polynomials to represent each function, and has the flexibility of using one function under a fixed temperature or fixed current condition; (2) a recursive UKF-type algorithm for SOC estimation is developed under this new battery model with model validations.Introduction of submodels for temperature and current rate complicates model nonlinearity, and makes the standard KF or EKF less reliable, and the UKF a more suitable choice.While the generic UKF is well known and has been applied to battery SOC estimations, its usage in the new model structure is new and requires detailed derivations and validations.To accommodate practical constraints, we have also discussed the scenarios of unknown but estimated noise characteristics; (3) an online UKF-based algorithm for adaptive joint estimation of the battery SOC and the battery internal resistance is introduced.The joint estimation algorithm captures this battery aging effect, which can potentially be used for SOH (state of health) estimation or battery diagnosis.
To gain a better perspective of our contributions, a comparative analysis with the existing literature is in order.It has been well recognized that battery model parameters and the SOC are highly coupled [24], which requires joint system parameter identification and SOC estimation.A joint estimation method to obtain the battery parameters and SOC simultaneously was reported in our earlier paper [24].The models of [24] assume an unknown but fixed capacity without consideration of its dependence on temperature and charge/discharge current.Also, it uses a recursive least-squares-type algorithm with different convergence features.The underlying battery models and algorithms of this paper are different from those in [24], and hence provide different features.A comprehensive summary of BMSs for electric and hybrid vehicles was presented in Xing et al. [25], in which battery state evaluation and battery modeling were listed as the major concerns.The proposed UKF-based SOC estimation method with the enhanced battery model in this paper adds new tools and algorithms to SOC estimation methodologies, and as a result can potentially enhance BMSs by addressing their core challenges.Battery parameter estimation is related to SOH estimation, which is another important task in BMSs.He et al. [26] introduced some interesting and important approaches for SOH estimation and prediction.In [26], the capacity fading was modeled by the sum of two exponential functions of discharge cycles with the internal impedance as a key parameter in the exponential function.Our paper incorporating temperature and current rate factors into the models with different model structures.Although SOH estimation is not the focus of our paper, the jointly estimated internal resistance serves the dual purposes of enhancing SOC estimation accuracy and indicating the battery SOH and detecting faults.In this aspect, our results complement those of [26].
The remainder of the paper is organized as follows: battery models are discussed in Section 2. The temperature and rate model structures are introduced, leading to an enhanced battery model.The SOC estimation algorithm based on the UKF methodology under the new model structure is derived in Section 3. Recursive algorithm structures are detailed and their estimation accuracy and prediction capability are established.In Section 4, an online algorithm for joint estimation of the battery SOC and internal resistance is presented.The paper concludes with some discussions on the main findings and open issues in Section 5.

An Enhanced Battery Model
A battery can be treated as a dynamic nonlinear system, and many of its characteristics can be included in the state vector.The choice of state variables can be important in modeling a battery.SOC estimation is our aim in this paper.Therefore, the battery's SOC is chosen as an element of the state vector.The two sub-models in the proposed UKF-based methods, namely, the process model and measurement model, describe the relationship between the SOC and measured battery quantities, such as the terminal voltage, current, and temperature.

The Process Model
The SOC ( ) z t of a battery at time t is defined as the ratio of the remaining capacity ( ) Q t that can be drawn from the battery to its nominal capacity n Q : Here, the capacity is dimensioned by ampere-hours, which is an accumulation of the discharge current according to time.The nominal capacity n Q is the maximum capacity that can be drawn from the battery with a constant discharge rate of C/30 at room temperature (25 °C), where C is the current that will fully discharge the battery from a fully charged state in exactly 1 h at room temperature.The remaining capacity ( ) Q t is highly related to the working states of the battery, such as temperature, discharge rate, cell aging, and cell self-discharging.
The influence of temperatures on the total capacity that can be drawn from the battery is shown in Figure 1.The example is a LiFePO 4 battery with a nominal capacity of 15 Ah.The data in Figure 1 were obtained with the help of a thermal chamber.A fully charged battery was first put into the constant-temperature thermal chamber for a certain period of time.Then, the battery was discharged under a constant discharge rate of C/30 until its nominal cut-off voltage was reached.The total capacity was calculated by the multiplication of the discharge rate and discharge time.The entire process was repeated several times under each temperature, until all of the data were obtained.The influence of discharge rates on the total capacity that can be drawn from the battery is shown in Figure 2. The battery was also initially fully charged and then fully discharged with a constant discharge rate under a constant room temperature of 25 °C.The total capacity was calculated in a similar manner, and the discharging process was repeated several times with different discharge rates until all of the data were obtained.
As observed from Figures 1 and 2, when the battery works under permitted conditions, a larger share of the total capacity can be drawn as the temperature increases.In contrast, a smaller share of the total capacity can be drawn as the discharge rate increases.In this paper, we model this phenomenon separately by two quantities T Q and i Q .T Q is the total capacity that can be drawn from the battery when it is discharged at a temperature of T at a constant discharge rate of C/30.i Q is the total capacity that can be drawn from the battery when it is discharged at a discharge rate (current) of i at room temperature.
Figure 2. Battery capacity ratios under different discharge rates.
In this paper T Q is modeled as a second-order polynomial, whereas i Q is modeled as a fourth-order polynomial, i.e.: where are coefficients of the two polynomials.
Considering the significant influence of temperature and discharge rate, the SOC ( ) z t at time t can be described with the following equation according to Equation (1) of the SOC, i.e.: where (0) z is the initial SOC; η is the Cell Coulombic efficiency and 1 η = for discharge; ( ) i τ is the instantaneous discharging current at time τ ; and μ is the dimensionless proportion coefficient, which is a function of current i and temperature T: For discharge, Equation ( 4) can be discretized into the following equation when the KF is utilized for recursion, i.e.: where t Δ is the sampling time interval when the system is discretized.Equation ( 6) is the process (state transfer) model for the battery system.
We substitute Equations ( 2) and (3) into Equation ( 5) and then substitute Equation ( 5) into Equation ( 6) to obtain: As observed from Equation ( 7), the SOC is highly nonlinear to the discharging current and working temperature.

The Measurement Model
The measurement model of a battery yields the battery terminal voltage in terms of its current, temperature, and SOC.The combined measurement model in [9] is also used in this paper, given as follows: ( , , ) ln ln( 1) In the above model, k y is the battery terminal voltage; k i is the battery current; k z is the SOC of the battery; R is the internal resistance of the battery; and K 0 to K 4 are empirical constants.
[ ] , , , , , is the parameter vector.As observed from Equation ( 8), the battery measurement model is also highly nonlinear.

Model Parameters Determination
The two parameter vectors A and B in the process model can be determined using the least-squares method.A and B are model "parameters" for capturing dependence of battery characteristics on temperature and charging rates.As such they do not depend on temperature and charge/discharge current values.Typically, their values for new batteries can be estimated off-line either by using typical characteristic curves from the manufacturers or individually prior to their usage.In this paper, these parameters are assumed to be pre-determined and used in our SOC estimation schemes.On the other hand, battery aging will cause deviations on battery characteristics and consequently all battery model parameters will change.The issue of system identification for the entire battery model after aging takes effect is of critical importance and was discussed in our earlier papers [18,24], but beyond the scope of this paper.One relevant aspect is that the SOC is relatively insensitive to the parameter variations in A and B , which are shown in Section 3. The parameter vector p in the measurement model should be obtained before SOC estimation, either offline or online.The least-squares method is a suitable offline method, and its recursive version is a common online parameter estimation method.The experimental results in Section 3 demonstrate that both offline and online methods are effective.

UKF-Based SOC Estimation
As mentioned before, UKF has been demonstrated to outperform the KF and EKF.It is utilized for SOC estimation in this paper.An interesting work has been reported by He et al. [27], which demonstrated the promising results of applying the UKF in a battery's SOC estimation.Although our method is also based on the UKF, the main differences between our paper and that of He et al. [27] are that: (1) our paper proposes an enhanced battery model to model the impact of discharge rate and temperature on the Li-ion battery's performance, as given in Section 2; (2) a UKF-based algorithm is then developed to jointly estimate the battery's SOC and the internal resistance, which is important to capture the aging effect, as will be discussed in Section 4; (3) the proposed method is realized in an embedded system to further demonstrate the effectiveness of using the UKF in battery characterization, as will be discussed in Section 5.
The battery dynamics lead to the complex measurement model of Equation ( 8), which may not be very accurate.In contrast, errors inevitably exist when the current and terminal voltage are measured.Therefore, noise items should be included for both the process model and measurement model.Equations ( 6) and ( 8 The SOC is treated as one of the elements of the state vector.To compensate for the possible non-Gaussian property of the noises, the process noise and the measurement noise are included in the state vector as well.The extended state vector k x and its covariance x k P in the UKF-based SOC estimation have the following form: The steps of applying the UKF for SOC estimation are summarized below. • Initialization (Actually, the initial state and covariance are not critical to the UKF algorithm; they can converge to the true value quickly.Random values are used here): • For 1, 2,..., k = ∞: (1) Calculate the weighted sigma points: where the sigma points are: with the parameters α , β for the unscented transform given, the parameter 2 L L λ α = − can be calculated and the weights for the sigma points are [28,29]: ( , , ) ln ln( 1) [ ]

X
x P (17) The superscripts m and c here indicate that the weights are used for the estimation of the mean and covariance, respectively.Thus, we have ≥ .The weights may be optimally chosen to asymptotically minimize error variances in the sense of the Cramer-Rao lower bound or the maximum-likelihood estimates, when the noise statistics are available.Turner et al. [30] proposed a method to determine optimally of parameters for the UKF under Gaussian noise.For practical systems in which noise characteristics are often unknown, tuning of the weighting is part of the design iteration process.However, the optimal selection of the parameters is outside the scope of this paper; thus, the often-recommended parameters 1, 0 ( ) ( ) (27) State update ˆk x : Covariance x k P of state update ˆk x :

SOC Estimation Results
The proposed UKF-based SOC estimation algorithm is tested under different simulated test conditions.One of the results under the Highway Fuel Economic Test (HWFET) conditions is shown in Figure 3.The real SOC is obtained by post-processing involving integrating the battery current with time.For comparison, the EKF-based SOC estimation results are also provided.The initial SOC in the UKF-based algorithms is deliberately set to be considerably different than its real value, and the standard covariance of the initial SOC is set to be 0.1.The comparisons are performed across four aspects: the maximum SOC estimation error, average SOC estimation error, SOC estimation mean square error (MSE), and estimation speed.These are listed in Table 1.(28) ˆ( ) As observed from Table 1, the UKF-based SOC estimation outperforms that based on the EKF.The superiority of the UKF over the EKF can also be observed from the positions marked by the dotted cyan ellipses in Figure 3.The first ellipse on the upper left indicates that the SOC estimated by the EKF needs some time before it can catch up with the real SOC, whereas the UKF estimate converges considerably faster.At the position of the bottom right ellipse, a fluctuation exists in the SOC curve estimated by the EKF, which does not reflect reality when the battery is being discharged.The same problem does not exist for the UKF.The faster speed of the UKF indicates that it is superior to the EKF for embedded applications.
To explore the influence of the measurement model parameters on the accuracy of the estimated SOC based on the UKF, two different sets of parameter vectors obtained by our previously proposed UKF-based parameter estimation method [31] and the least-squares method [32] are applied to the measurement model (10).The SOC estimation results under different parameters are shown in Figure 4.The results indicate that both parameter vectors are effective and that a reasonable small change in the parameters, either caused by parameter estimation error or individual battery diversity, does not prevent the UKF from obtaining a relatively accurate SOC estimation.This conclusion is reasonable because the small disturbance of parameters can be handled very well by the process noise and measurement noise.

UKF-Based SOC and Internal Resistance Joint Estimation
One important point is that characteristic variations exist in batteries due to different manufacturing and working processes, even though they may be designed to be the same.These variations will lead to different sets of battery model parameters for different batteries.The aging effect is another important feature of Li-ion batteries.That is, the performance of the battery degrades continuously with time, e.g., the internal resistance increases, and the total energy capacity that can be drawn from the battery decreases.For these reasons, the applied mathematical model (10) should be adjustable so that an accurate SOC estimation can be obtained.The importance of considering aging effect is shown in Figure 5.The figure presents the SOC estimation results for one of the tested batteries, whose internal resistance changed from 2 to 5 mΩ due to the aging effect after a long working time.As observed from Figure 5, a maximum SOC estimation error larger than 20% exists if the change in the internal resistance was not captured.
One can use an online parameter estimation algorithm, e.g., our previously proposed parameter estimation algorithm [33], to estimate and update the model parameters.Unfortunately, as shown in [33], the parameters converge only after all of the data in an entire discharge process are fed to the UKF-based online estimation algorithm, which makes it inconvenient for real applications.Moreover, it is hard to decide how frequently the parameters should be updated.To compensate for the continuous increase of the internal resistance due to the aging effect, we proposed a joint estimation algorithm for the SOC and internal resistance [33].The algorithm can estimate the SOC and internal resistance simultaneously.The main idea of the algorithm is to treat both the SOC and internal resistance as elements of the state vector, forming a new state vector k x  as follows: The new process (state transition) equation is now: whereas the new measurement equation is: where k u is the input vector and k v  and k n  are process noise and measurement noise, respectively.
With the new defined state vector and the corresponding process model and measurement model, the similar state estimation algorithm in Section 3.1 can be applied to estimate the SOC and internal resistance simultaneously.
The jointly estimated SOC and internal resistance with the UKF are shown in Figure 6.The joint estimation result using the EKF is also shown in the figure for comparison.The real values of the internal resistance are obtained with the HIOKI 3554 battery test equipment made by HIOKI E.E Corporation (Nagano, Japan).As shown in Figure 6, the proposed UKF-based SOC and internal resistance joint estimation algorithm are effective.The processes of SOC and internal resistance estimation converge very fast.Both the estimated SOC and estimated internal resistance according to the UKF algorithm outperform the EKF-based algorithm.For the internal resistance estimation in particular, the EKF-based algorithm fluctuates considerably and even yields negative values of resistance, whereas the UKF does not have such problems.To clearly illustrate the results, the labels of the y-axes in the two sub-figures of Figure 6b are deliberately set to be different; the unit of the internal resistance for the EKF-based algorithm is Ohm (Ω) because of the large estimation fluctuation, whereas the unit of the internal resistance for the UKF-based algorithm is milli-Ohm (mΩ).

System Setup
The proposed algorithms have been verified by the experimental battery management system based on an embedded system.The entire experimental battery SOC estimation system and its setup are ( ) Energies 2013, 6 shown in Figure 7.The system is mainly composed of the following parts: the core battery management board, batteries, electronic load, power supply, and display, as shown in Figure 7a.The core battery management board was designed by the authors and is shown in Figure 7b.This board measures the voltages, currents, and temperatures of batteries, and then uses these parameters to estimate the SOC of each battery.The data are sampled every 1 s.The system can be used to estimate the SOCs for four batteries simultaneously, as shown in Figure 7.The system can be extended with an enhanced microcontroller unit to estimate SOCs of additional batteries simultaneously.
Several different types of Li-ion batteries made by different manufacturers with different chemistry are utilized in the experiments.The nominal capacities of the batteries also differ.Some of the tested battery types are listed in Table 2.

Algorithm and Model Verification
The proposed method is first verified with an alternating discharge/charge profile, as shown in Figure 8.As observed from Figure 8, the difference between the estimated SOC and the real SOC is relatively small.
The importance of temperature consideration is then examined, as shown in Figure 9.The battery is deliberately put into a thermal chamber whose temperature is set to 0 °C.The battery is then discharged under the HWFET condition, as shown in Figure 3, and the data are recorded for SOC estimation.During the SOC estimation process, the temperature information is deliberately discarded, and it is assumed to be at a constant room temperature of 25 °C.As observed from Figure 9, large errors of SOC estimation occur when the temperature information is discarded.The maximum SOC estimation error exceeds 20% (this is an absolute error, not a relative error).In contrast, the estimation accuracy is acceptable when the SOC is estimated according to the enhanced battery model ( 9) with the true temperature.The importance of considering the discharge rate is examined in a similar manner.For this experiment, the battery is discharged at a constant discharge rate of 8 C.During the SOC estimation process, an absolute SOC estimation error of 45% is obtained if the discharge rate information is deliberately discarded and is assumed to be 1 C.In contrast, the estimation is accurate if the SOC is estimated according to the enhance battery model (9) with the proper discharge rate.
The proposed enhanced model is further validated under different discharge rates and working temperatures.Figure 10 presents the predicted voltages when the battery is discharged with different discharge rates (the envelope of the current waveform is similar to that of Figure 3, but the maximum discharge rate is now 8 C) at 50 °C.As observed from Figure 10, the measured voltages encounter both smooth segments and sharp changes.In both cases, the predicted terminal voltages on the basis of the estimated SOC can track the true voltages with high accuracy.Similar results are obtained for other temperatures with varying currents.

Battery Chemistry Adaptability
Previous results are obtained with the type #1 battery, but similar results can be obtained for other types of batteries.An example SOC estimation result for a type #2 battery under the Federal Urban Driving Schedule (FUDS) [34] test condition is shown in Figure 11.As observed from the figure, the estimation is accurate, which indicates that the proposed algorithms are suitable for these types of Li-ion batteries.

Conclusions
This paper proposes an unscented Kalman filter algorithm for online battery SOC estimation when the battery is discharged.An enhanced battery model was developed first to make the algorithm suitable for real-time battery characterization under different operating conditions, particularly under different temperatures and discharge rates.An SOC and internal resistance joint estimation method was proposed to lay the foundation for the online battery SOC estimation and to compensate for the battery aging effect.The UKF-based adaptive SOC estimation algorithm was tested for different types of batteries.The experimental results indicate that the proposed algorithm is effective in battery SOC estimation and is suitable for online, embedded applications.One of our future tasks will be to develop a similar model for the charging process.With dedicated, separate models for the charging and discharging processes of Li-ion batteries, the performance of the corresponding joint SOC estimation algorithm should then be investigated with complicated charge/discharge current profiles.

R
) now change to: Assume the covariance of the process noise k s to be k s and the covariance of the measurement noise k v to be k v R .k s R is highly related to the system noise and current measurement error; and k v R is highly related to the terminal voltage measurement error.

Figure 4 .
Figure 4. Influence of model parameters for UKF-based SOC estimation.The conditions for the two experiments are the same.

Figure 5 .
Figure 5. UKF-based SOC estimation with/without considering the battery aging effect.

Figure 6 .
Figure 6.Joint estimation of the SOC and internal resistance.(a) Jointly estimated SOC; (b) Jointly estimated internal resistance.

Figure 7 .
Figure 7. Experimental battery SOC estimation system.(a) System setup; (b) Developed battery management board.

Figure 8 .
Figure 8. SOC estimation with an alternating discharge/charge profile.

Figure 9 .
Figure 9. Importance of temperature consideration for UKF-based SOC estimation.When temperature information is discarded, large errors occur.
consideration for SOC Estimation real SOC Estimated SOC with true Temp.Estimated SOC with false Temp.

Figure 10 .
Figure 10.Model validation when the battery is discharged at 50 °C, with a varying maximum discharge rate of 8 C. (a) The real and predicted voltages in a entire discharging process; (b) An enlarged view of the middle part.

Figure 11 .
Figure 11.SOC estimation results for the type #2 battery under the FUDS condition.

Table 1 .
Comparisons of the UKF-and EKF-based SOC estimation.

Table 2 .
Tested types of Li-ion batteries.