Comparison Study on Two Model-based Adaptive Algorithms for Soc Estimation of Lithium-ion Batteries in Electric Vehicles

State of charge (SOC) estimation is essential to battery management systems in electric vehicles (EVs) to ensure the safe operations of batteries and providing drivers with the remaining range of the EVs. A number of estimation algorithms have been developed to get an accurate SOC value because the SOC cannot be directly measured with sensors and is closely related to various factors, such as ambient temperature, current rate and battery aging. In this paper, two model-based adaptive algorithms, including the adaptive unscented Kalman filter (AUKF) and adaptive slide mode observer (ASMO) are applied and compared in terms of convergence behavior, tracking accuracy, computational cost and estimation robustness against parameter uncertainties of the battery model in SOC estimation. Two typical driving cycles, including the Dynamic Stress Test (DST) and New European Driving Cycle (NEDC) are applied to evaluate the performance of the two algorithms. Comparison results show that the AUKF has merits in convergence ability and tracking accuracy with an accurate battery model, while the ASMO has lower computational cost and better estimation robustness against parameter uncertainties of the battery model.


Introduction
Electric vehicles (EVs) have rapidly developed in the past few years due to the increasing cost of energy and global warming constraints. A battery management system (BMS) is important for EVs to safeguard the battery performance and extend its life [1]. An accurate state of charge (SOC) estimation is the most key technique in a BMS, since it indicates the remaining energy in the battery, which is helpful to prevent the battery from over-charging or over-discharging, which may damage the battery. The simplest definition of SOC is the ratio between the remaining capacity of the battery and its nominal capacity. However, it is difficult to get an accurate value of SOC, because the SOC cannot be directly measured with sensors and is closely related to various factors, such as ambient temperature, current rate and battery aging.
Numerous SOC estimation approaches have been proposed with the development of EVs, and each with its own advantages and disadvantages. A most commonly used method in practice is the Ampere-hour (Ah) counting (or Coulomb counting) method [2,3]. The Ah method obtains the remaining capacity of a battery by integrating the current over the time. It is simple and can be easily implemented on-board, because it only needs to measure the battery operating current and does not need complex computations. However, this method can easily cause accumulated calculation errors due to uncertain disturbances in the current measurement process and a lack of correction for the initial SOC offset. The open-circuit voltage (OCV) method estimates the SOC according to the relationship between the OCV and the SOC [4,5]. Nevertheless, it is not suitable for online estimation due to the long rest time to reach the steady-state of the battery. Computational intelligence algorithms, such as artificial neural networks (ANNs) [6][7][8], fuzzy-logic [9][10][11], and support vector machines (SVMs) [12,13] have also been developed to estimate the SOC. These methods do not require detailed knowledge of the battery systems, thus, they can be applied to all battery types and have excellent estimation performance if the training data is sufficient to cover all loading conditions. However, it is time consuming and nearly impossible to collect training data that can cover all possible loading conditions. Besides, all the aforementioned methods are open-loop estimation algorithms and do not require the battery model.
Additional efforts have been focused on model-based and closed-loop estimation methods, including the Kalman filter (KF)  and sliding mode observer (SMO) [39][40][41][42][43]. Despite requiring a higher computation cost than the A· h method, these methods have merits in being self-correcting and involving online computing as well as the availability of the dynamic SOC estimation error range. Thus, they are increasingly popular and more suitable for real-time application than the other types of SOC estimation methods. To expand the application of KF in nonlinear battery systems, the Extended KF (EKF) and Unscented KF (UKF) have been developed. The EKF-based methods have been widely used for battery SOC estimation [14][15][16][17][18][19][20][21][22][23][24][25][26][27]. However, the application of EKF in practice has some shortcomings. For example, the linearizing process causes large linearization errors and complicated computation of the Jacobian matrix that may lead to instability of the filter and inaccurate estimation for highly nonlinear battery systems [30]. The UKF has been demonstrated to have a higher accuracy in estimating the mean and the error covariance of the state vector than EKF, and it does not need the complicated computation of the Jacobian matrix [28][29][30][31][32][33][34][35][36][37][38]. On the other hand, in KF algorithms, the process and measurement noise covariances are critical for the filtering performance and stability. In both EKF and UKF, constant values of the process and measurement noise covariances usually need to be pre-specified by a trial-and-error method which is time consuming, laborious and error-prone [30]. Too small values of the process noise covariance and/or the measurement noise covariance at the beginning of the estimation process may result in a tight uncertainty tube around the true value and a biased solution, while too large values may lead to filter divergence [44]. For the battery SOC estimation, inappropriate values of the noise covariances will cause large estimation errors. Therefore, an adaptive unscented Kalman filter (AUKF) was developed in [30] to improve the SOC estimation accuracy by adaptively updating the process and measurement noise covariances based on the output voltage residual sequence of the battery model.
More recently, the SMO-based SOC estimation approaches have been developed to handle the battery model uncertainties, external disturbances and measurement noises [39][40][41][42]. Nevertheless, these methods rely on details about the battery dynamics for the appropriate selection of SMO parameters, such as uncertainty boundaries and switching gains, which may lead to the trade-off between the chattering magnitude and the convergence speed in the SOC estimation [43]. To overcome such a problem, an adaptive sliding mode observer (ASMO) for the SOC estimation has been proposed in [43]. Compared with the traditional SMO, the ASMO is able to dynamically adjust the switching gains in response to the tracking errors, and guarantee the reachability of sliding mode surface and trigger the sliding mode, thereby improving the SOC estimation accuracy.
In this paper, a comparison study between the two model-based adaptive algorithms above is carried out using the experimental data collected from a lithium-ion battery test bench. Two typical driving cycles, namely the Dynamic Stress Test (DST) and New European Driving Cycle (NEDC) are used to evaluate the performance of the algorithms in terms of convergence behavior, tracking accuracy, computational cost and estimation robustness against parameter uncertainties.
The remainder of the paper is organized as follows: in Section 2, the battery state functions are established based on an equivalent circuit model which is used to characterize the dynamic behaviors of the lithium-ion battery, and the method for battery model parameter identification is discussed. Section 3 introduces the principles of AUKF-and ASMO-based SOC estimation algorithms in detail. Section 4 presents the experimental results and discussion, and Section 5 provides the conclusions of the paper.

Battery Equivalent Circuit Model
Both the UKF and SMO are model-based methods, so precise battery models are required to accurately estimate the SOC values. Numerous models have been developed to simulate the dynamic characteristics of batteries. The equivalent circuit models (ECMs) with lumped parameters have been widely used in SOC estimation applications due to their good performance in describing the dynamic voltage characteristics of a lithium-ion battery [1,44]. The most common ECMs are comprised of resistor and resistor-capacitor (RC) network(s) connected in series. Based on the conclusion that adding RC networks can increase the model accuracy, but adding more complexity beyond two RC networks is not helpful [44], this paper selects the second-order RC model to establish the state functions for battery SOC estimation. As shown in Figure 1, the second-order RC battery equivalent circuit model consists of an open-circuit voltage Uoc(SOC), a resistor Ro, and two RC networks connected in series. The resistor Ro represents the ohmic resistance caused by the accumulation and dissipation of charge in the electrical double-layer, Rp1 and Cp1 are the activation polarization resistance and capacitance respectively, Rp2 and Cp2 respectively are the concentration polarization resistance and capacitance. According to the circuit theory, the electrical behavior of the second-order RC battery equivalent circuit model shown in Figure 1 can be derived as: where Cn is the battery nominal capacity; Up1 and Up2 are the terminal voltage of Cp1 and Cp2, respectively; Ut and It are the battery terminal voltage and current, respectively; Uoc represents the open circuit voltage (OCV) which is related to the values of SOC; v1, v2, v3 and w represent noises caused by model uncertainties and external disturbances.
By selecting x = (SOC, Up1, Up2) T as the state vector, and considering the current It and voltage Ut as the model input and output respectively, the discrete-time state equations of the second-order RC battery equivalent circuit model can be obtained as: where f and h are the nonlinear process and measurement functions, respectively; xk represents the unmeasurable state vector at time step k; uk (=It,k) stands for the input vector; yk (=Ut,k) is the observed output; vk (=(v1,k v2,k v3,k) T ) and wk are separately the process and measurement noises, which are both uncorrelated zero-mean Gaussian white sequences.

Battery Model Parameters Identification
In order to estimate the battery SOC based on the second-order RC battery equivalent circuit model, the model parameters, including the OCV-SOC relationship, Ro, Rp1, Cp1, Rp2 and Cp2 need to be determined. In order to acquire the data used to determine the relationship of OCV vs. SOC, a pulse discharge experiment was carried out based on an ICR18650-22F type lithium-ion battery. More details about the battery parameters and the test bench configurations will be provided in Section 4. The test procedure is summarized as follows [45]: (1) The battery is fully charged at room temperature using the standard charging method, and then it is left in the open-circuit condition for 5 h; (2) the battery terminal voltage is measured and the measured voltage is regarded as the equilibrium potential since the battery is assumed to have reached the steady state; (3) the battery is discharged with a constant current of 0.1C A by 10% of the nominal capacity, and then it is left in the open-circuit condition for 2 h; (4) steps (2) and (3) are repeatedly performed until the battery is fully discharged. The measured data and the fitted curves with different broken-lines, including four-stage broken-line (4-broken-line) and ten-stage broken-line (10-broken-line) are shown in Figure 2. Despite the fact that the OCV-SOC curves of lithium-ion batteries are nonlinear, there exists a piecewise linear relationship between the OCV and the SOC in a certain range of SOC [43] indicated by the red circles in Figure 2. Therefore, in this paper the broken-lines are used to reduce the complexity of the OCV-SOC function. The exponential-function fitting method [43] was applied to determine the other parameters of the battery model in Figure 1 (e.g., Ro, Rp1, Cp1, Rp2 and Cp2) based on the transient response of terminal voltage by executing a pulse-current discharging process at the room temperature [45]. The identified parameters are summarized in Table 1.

AUKF Algorithm
The adaptive unscented Kalman filter (AUKF) can adaptively update the process and measurement noise covariances based on the output voltage residual sequence of the battery model [30]. Thus, it addresses the issue of the standard EKF and UKF that inappropriate values of the noise covariances cause large error. The process of the AUKF can be summarized as follows [30]: (1) Initialization: (a) Initial a posteriori error covariance: P0; (b) Initial process noise covariance: Q0; (c) Initial measurement noise covariance: V0; (d) Window size for covariance matching: Lw; (e) Initial mean 0 x and covariance P0 with a random state vector x0 as follows: (2) Generate sigma points at time step k−1: where λ is a composite coefficient satisfying the following equation: where N is the dimension of the state vector, α and κ are scaling parameters. The parameter α (0 ≤ α ≤ 1) determines the spread of the sigma points around the mean value, and it should ideally be a small number [46]. The condition κ ≥ 0 should be satisfied to guarantee the semi-positive definiteness of the covariance matrix, and a good default choice is κ = 0 [47].
where Qk is the process noise covariance matrix at time step k and weights [] i c W is defined as: where β is a nonnegative scaling factor used to incorporate prior knowledge of the distribution, and the optimal choice is β = 2 for a Gaussian distribution [41].
where Vk is the measurement noise covariance matrix at time step k.
where Fk is an approximation to the covariance of the voltage residual at time step k and is defined as: where ei is the voltage residual of the battery model at time step i, and Lw is window size for covariance matching. More details about the AUKF algorithm can be found in [30] and [34].

ASMO Algorithm
With the piecewise linearisation method shown in Figure 2, the OCV-SOC relationship can be formulated as: where the values of k1 and k2 are varying in different SOC ranges, and their values can be obtained with linear fitting method in different SOC ranges as shown in Figure 2.
By selecting x = [Ut Uoc Up1 Up2] T as the state vector, and considering the model input and output as u = It and y = Ut, respectively, the discrete-time state equations of the second-order RC battery equivalent circuit model can be concisely expressed in matrices as follows: where Γξk represents modeling errors and random disturbances at time step k. The parameter Γ is the uncertainty input matrix. The parameter ξk is assumed to be bounded |ξk| ≤ h0, in which h0 is a constant.
The matrices A, B and C are given as:   The adaptive sliding mode observer for the system in Equations (30) and (31) The feedforward gain matrix H can be obtained by using either the pole assignment method or linear quadratic regulator (LQR) method [39,43]. The LQR method is easier to obtain gain matrix H using the Riccati equation as: where QH and RH respectively are arbitrary semi-positive definite and positive definite matrices, having a positive definite solution P. Then A T −C T H T is stable with: which is equivalent to the stability of A−HC [39]. With appropriate Lyapunov equation, a matrix W is selected such that the reconstruction error system is asymptotically stable. By selecting an appropriate Lyapunov equation, there exists a symmetric definite matrix Pf as the solution of the Lyapunov equation: where Qf is an arbitrary positive definite matrix such that the structural constraint in Equation (39) can be guaranteed if W is a positive definite matrix: More details about the error convergence proof of the SMO can be found in [39][40][41][42][43].

Evaluation Method
A battery test bench, as shown in Figure 3, is established for the comparison study of the AUKF and ASMO-based SOC estimation approaches. The ICR18650-22F-type lithium-ion battery manufactured by Samsung SDI (Seoul, Korea) was used in the test. This kind of battery has a nominal voltage of 3.62 V and a nominal capacity of 2.2 A· h. The electronic switch is applied to discharge the battery with the programmable electric load or charge it with the programmable power supply. The BMS module is adopted to measure the battery voltage and current, transmit them to the host computer and send the control command to the switch through the CAN communication unit. The host computer is used to be an estimator computing the SOC values. The SOC values with the AUKF and ASMO algorithms are estimated in the Matlab software based on the measured battery voltage and current from the test bench, and compared with that obtained by the Coulomb counting method.   In this study, four aspects, including the convergence behavior, tracking accuracy, computational cost and estimation robustness against parameter uncertainties of the battery model are compared. In order to evaluate the robustness against parameter uncertainties, different values of ohmic resistance and OCV-SOC functions in Figure 2 are applied.

Estimation Results with Different Initial SOCs
To compare the convergence behavior of the AUKF and ASMO algorithms, the convergence rate to ±5% error bound with different initial SOCs from 0% to 100% in 10% steps under the DST and NEDC tests is obtained, and the results are shown in Tables 2 and 3, respectively. In addition, the corresponding root mean square errors (RMSEs) of SOC are summarized in Tables 4 and 5. As an example, the SOC estimation results with an initial SOC of 50% are shown in Figures 6 and 7. With all the results, it can be seen that two algorithms both can quickly track the reference SOC values with different initial SOCs, while the AUKF performs better with a faster convergence ability and a higher accuracy. Besides, the computational cost of AUKF algorithm obtained by the Maltab commands, including tic and toc is about 0.145 ms/point, while the value of ASMO algorithm is about 0.064 ms/point. Therefore, the ASMO performs better in terms of reducing computational cost and as a result, it can be more easily implemented in hardware. It is important to note that in this section the OCV-SOC relationship is fitted with the ten-stage broken-line as shown in Figure 2.

Estimation Results with Different Modeling Errors
The battery model parameters, including ohmic resistance, polarization resistance and capacitance as well as the OCV vary with various factors, such as the current rate, SOC, cycle number (battery aging) and operating temperature [35]. Besides, an accurate expression of relationship between the OCV and the SOC is crucial to improve the SOC estimation accuracy [48]. Therefore, in this section, different ohmic resistance values and different OCV-SOC functions are selected to be examples for comparing the robustness of AUKF and ASMO-based estimation approaches against the parameter uncertainties of the battery model. The values of ohmic resistance are set to be changed in the range of 0.2 Ro to 2.0 Ro with a step of 0.2 Ro to simulate the effect of different conditions, including current, SOC, aging and temperature on the ohmic resistance. Figure 8 shows the comparison results of SOC estimation with different ohmic resistance under the DST test, while Figure 9 shows them under the NEDC test. It is clearly indicated that although the AUKF algorithm, in most cases, has a higher accuracy with a lower mean absolute error (MAE), it has a poorer robusness againt the ohmic resistance uncertainty because its accuracy varies much more with the variation of ohmic resistance. Besides, the estimation accuracy of both the AUKF and ASMO algorithms decreases with the increase of ohmic resistance error.
In order to evaluate the robustness against OCV errors, two OCV-SOC functions shown in Figure 2, namely four-stage and ten-stage broken-lines are applied, and the values of k1 and k2 are shown in Tables 6 and 7, respectively. As an example, the AUKF and ASMO-based SOC estimation results with different OCV-SOC functions under NEDC test are shown in Figures 10 and 11, respectively. From Figures 10 and 11, it can be seen that the estimation error of AUKF algorithm highly increases with the decrease of OCV-SOC relationship accuracy, while that of ASMO algorithm slightly changes with the variation of OCV-SOC relationship accuracy. Therefore, it is concluded that the ASMO algorithm has a better robustness against the OCV errors.    Table 7. Values of k1 and k2 with ten-stage broken-lines.

Conclusions
In this paper, two model-based adaptive algorithms, namely AUKF and ASMO, are applied to estimate the SOC of lithium-ion batteries in EVs and compared in terms of convergence ability, tracking accuracy, computational cost and estimation robustness. Firstly, the battery state equations are derived from the second-order RC battery equivalent circuit model, and the model parameters are identified with the exponential-function fitting method based on the data collected from a battery test bench. Then, the general formulations of AUKF and ASMO-based estimation approaches are studied. Finally, experiments based on the DST and NEDC cycles are carried out to evaluate the performance of estimation algorithms. Comparison results indicate that both the algorithms can deal well with the issues related to the initial SOC errors and modeling errors, but the AUKF performs better with a higher tracking accuracy and a faster convergence rate related to the initial SOC values. However, the ASMO has a lower computational cost and a better robustness against the parameter uncertainties of the battery model, such as different ohmic resistance values and different OCV-SOC functions.