Online Parameters Identification and State of Charge Estimation for Lithium-Ion Battery Using Adaptive Cubature Kalman Filter

The state of charge (SOC) of a lithium-ion battery plays a key role in ensuring the charge and discharge energy control strategy, and SOC estimation is the core part of the battery management system for safe and efficient driving of electric vehicles. In this paper, a model-based SOC estimation strategy based on the Adaptive Cubature Kalman filter (ACKF) is studied for lithium-ion batteries. In the present study, the dual polarization (DP) model is employed for SOC estimation and the vector forgetting factor recursive least squares (VRLS) method is utilized for model parameter online identification. The ACKF is then designed to estimate the battery’s SOC. Finally, the Urban Dynamometer Driving Schedule and Dynamic Stress Test are utilized to evaluate the performance of the proposed method by comparing with results obtained using the extended Kalman filter (EKF) and the cubature Kalman filter (CKF) algorithms. The simulation and experimental results show that the proposed ACKF algorithm combined with VRLS-based model identification is a promising SOC estimation approach. The proposed algorithm is found to provide more accurate SOC estimation with satisfying stability than the extended EKF and CKF algorithms.


Introduction
Faced with the global energy shortage and climate change crisis, the market position of electric vehicles (EVs) has become obvious [1,2], leading the trend of the automotive industry with the advantages of being pollution-free, low noise, and having high energy efficiency [3,4]. Among all commercially available lithium-ion batteries, the ternary lithiumion batteries are widely utilized because of their advantages of long service life, high energy density, superior performance at high and low temperatures, and environmental protection [5]. However, under certain operating conditions, the difference among all individual cells may result in battery over-charge and over-discharge, even explosions [6]. Therefore, the Battery Management System (BMS) plays a crucial role in assuring safety and monitoring the operating process [7,8]. State of charge (SOC), which indicates the remaining energy in the battery, is an important part of BMS [9]. The SOC of a battery cannot be obtained directly but is often estimated based on some measurable parameters such as the terminal voltage and operation current [10]. Thus, SOC estimation is still a challenging research topic.
SOC estimation algorithms can be classified into two categories: non-model-based and model-based [11]. Two commonly used non-model-based SOC estimation approaches are the Ampere-hour (Ah) integration method [12,13], and the open-circuit voltage (OCV) method [14]. The Ah integration method obtains the SOC by integrating the current over time. The accuracy of the ampere-hour integration method depends on the measured current value and the initial SOC value and high accuracy of the current sensor is required. Moreover, since accurate data of real-time initial SOC value cannot be obtained easily in operating EVs, this method is not ideal for practical applications. On the other hand, although accurate SOC value can be obtained using the open-circuit voltage method, it cannot perform online tests of SOC [15]. The OCV method acquires the SOC based on the relationship between OCV and SOC. The OCV method is used for the initial calibration of SOC in many BMS systems. However, this method requires long periods of standing of the battery before measurement, and the operating conditions are only suitable for laboratories and cannot be applied to the changing operating conditions of EVs.
Compared with the above-mentioned non-model-based methods, the model-based methods are more promising for EV application. The process of these approaches can be divided into three procedures: model building, identification of model parameters, and SOC estimation [6]. Many battery models have been reported to date, e.g., the electrochemical model [16], equivalent circuit models (ECMs) [17,18], and neural network models [19][20][21][22]. The electrochemical model is rather complex and requires a large number of parameters for SOC estimation [16]. The neural network models [19] require vast training data of all driving conditions for accurate estimation. In contrast, the equivalent battery models (ECMs) are widely used for their ease of implementation [23]. The ECMs describe the battery's behavior by basic electric components such as resistors and capacitors. Some well-known ECMs are the Thevenin model [24,25], DP model [26], and PNGV (Partnership for a New Generation of Vehicle) model. Hu et al. [27] analyzed 12 lithium-ion battery equivalent circuit models and proposed that the selection of the model should take into consideration accuracy and simplicity, and models of higher than the second order only had high accuracy in theory. By comparing the estimated terminal voltage values obtained from using the Thevenin model, the DP model, and the PNGV model under different operating conditions, Wang et al. [28] found that the accuracy and dynamic performance of the DP model were better than the other two models. Thus, in view of accuracy and simplicity, the DP model is chosen for the present study.
The parameters of ECMs should be identified after building the battery model. Offline and online identification are two major approaches [29]. Offline identification, as the name suggests, obtains the parameters as a function of SOC by identifying the parameters through experiments of certain working conditions, such as the hybrid pulse power characterization (HPPC) test. In Ref. [30], through real-time measurement and update of the battery voltage and current, the battery parameters were accurately identified by HPPC test to guarantee a reliable battery state estimate. However, the offline method based on certain conditions relies on a large number of experiments, which requires long development cycles and high costs. On the other hand, online identification only acquires new parameters that correspond to the present battery state through the latest inputs, hence, the performance of SOC estimation is better [31,32]. This method mainly includes the filter type [33][34][35] and the recursive least square (RLS) type. Yu et al. [35] used the H-infinity filter to update battery parameters, and the multi-scale EKF was adopted to estimate the system parameters. In contrast, the RLS [36] method has been used widely because it is easy to implement and the requirement of calculation is low. The RLS method is based on real-time observations and uses filtering theory to update model parameters online. However, update of data will result in the accumulation of old data; thus, it would be hard to track the parameters of a time-variant system. The adoption of the forgetting factor reduces the accumulation of past data and provides a calculation basis for supplementing new data [37]. Ze et al. [38] used the forgetting factor recursive least squares (FFRLS) algorithm to identify 3 parameters of the Thevenin model. In [9], good performance was obtained using the least squares method (LS) with a forgetting factor in parameter identification of DP model. It is noted that if the forgetting factor remains unchanged, the ability and accuracy of identification will be influenced under a dynamic condition. To solve this issue, a method based on the recursive least square algorithm with a variable multiple forgetting factor is employed in the present study.
As for battery states estimation, the Kalman filter family has been extensively used to estimate the SOC, e.g., the extended Kalman filter (EKF) [39,40], unscented Kalman filter (UKF) [41][42][43], or the cubature Kalman filter (CKF) [44][45][46]. The KF [47,48] is developed based on linear systems and is not appropriate for the ECMs, which are based on nonlinear systems. The EKF model linearizes the non-linear system to make it approximately equal to the first-order terms of the Taylor series expansions; therefore, it has limited accuracy because higher order terms are ignored [49]. The UKF [50] model propagates the battery states' mean and covariance by utilizing unscented transform (UT), and improves the accuracy of calculation. It has been proven that the UKF performs better than the EKF with less error and faster convergence speed [51]. Additionally, the UKF does not require the computation of Jacobian matrices. However, both models suffer from the curse of dimensionality or divergence or both [52]. Based on spherical-radial Cubature rule, the CKF predicts and updates the state values by 2N cubature points, and has attracted extensive attention in nonlinear systems in recent years. Compared with the EKF, the CKF does not require the computation of Jacobian matrices. Furthermore, it achieves better estimation accuracy than the UKF [44].
Although the CKF is capable of yielding good results, some issues still remain. On the one hand, in the standard CKF, the values of process noise covariance Q and the measurement noise covariance R keep constant in the iterative process and cannot satisfy real-time dynamic characteristics of the noise, which has a certain impact on the accuracy [53]. On the other hand, the values of Q and R are adjusted constantly using different values until the CKF has the best performance in the certain condition; whereas the CKF algorithm with certain Q and R might deviate the optimal trajectory when the CKF is applied to other conditions, hence, the CKF algorithm with certain Q and R cannot satisfy all driving conditions.
In the present study, a new approach of SOC estimation combining the vector forgetting factor recursive least squares (VRLS) with adaptive cubature Kalman filter (ACKF) is proposed. Specifically, the DP model is selected to simulate the dynamic characteristics of batteries, and the VRLS algorithm with variable multiple forgetting factors is utilized to update the parameters of DP model in real time. The ACKF filter, which can adjust the noise covariance according to the battery voltage residual sequence of the battery model, is used to estimate the SOC. Finally, two typical dynamic conditions including the Urban Dynamometer Driving Schedule (UDDS) and Dynamic Stress Test (DST) are utilized to verify the performance of the proposed algorithm by comparing with results obtained using the standard EKF and CKF algorithms.
The paper is organized as follows. Section 2 describes the employed equivalentcircuit model and the method of online parameter identification. Section 3 explains the ACKF algorithm based on the recursion theory in detail. Section 4 discusses and analyzes the performance of parameter identification and SOC estimation under UDDS and DST, followed by Section 5 with conclusions drawn from the above investigation.

Battery Model
The circuit diagram for the DP model is shown in Figure 1. The current is positive in the discharge direction. U tv represents the terminal voltage and U ocv refers to the open circuit voltage, and its magnitude is only associated with the positive and negative electrodes of the battery and the electrolyte material. R 0 represents the ohmic resistance, which is composed of the physical and chemical resistance and contact impedance between the battery materials. The polarization resistance (R p1 , R p2 ) and the polarization capacitance (C p1 , C p2 ) are used to simulate electrochemical polarization and concentration polarization, respectively. The relations of the DP model's variables and parameters are expressed in Equations where I(k) and U tv (k) are, respectively, the current values flowing through the battery and the terminal voltage values of the battery; U p1 (k) and U p2 (k) are the polarization voltages between the two polarization circuits at time k; τ 1 , τ 2 are the time constants of the polarization loop; T S is the sample time.

Model Parameter Identification
As shown in Figure 1, six parameters including the Open Circuit Voltage (OCV), R 0 , R P1 , R P2 , C P1 , C P2 need to be identified. In this paper, OCV was recognized from the pulse discharge experiments. For R 0 , R P1 , R P2 , C P1 , C P2 , the vector forgetting factor recursive least squares algorithm was employed for online identification.

Identification of Open Circuit Voltage
The OCV is known as a nonlinear function of SOC. Since the accuracy of the OCV plays a crucial role in estimating SOC, it is necessary to acquire relationship between OCV and SOC of the battery. The pulse discharge experiments were designed to obtain the relationship between them and experimental procedures are as follows.

1.
Charge the battery fully. At this time SOC = 1 and the measured battery voltage is recorded as OCV. Step (2) is repeated until SOC = 0.05 and the battery voltage corresponding to each SOC is recorded.
Based on the experimental data, the fitted curve of SOC vs. OCV is obtained by using curve fitting tool in MATLAB. The result of fitting curves is shown in Figure 2, and the corresponding coefficients of the fitted sixth-order polynomial is presented in Equation (4) and the R-square from fitting is 0.9976.
OCV as a function of SOC.

Parameter Identification with Vector Forgetting Factor Recursive Least Squares Algorithm
Other parameters including R 0 , R P1 , R P2 , C P1 , C P2 are identified using VRLS as follows.
Equation (2) is transformed into the following expression adapted to the least square method to estimate the battery parameter.
Setting τ 1 = R P 1 C P 1 , τ 2 = R P 2 C P 2 , multiplying both sides of this equation by (τ 1 s + 1)(τ 2 s + 1), we have: , we can obtain: aU tv s 2 + bU tv s + U tv = aR 0 Is 2 + dIs + cI + aU ocv s 2 + bU ocv s + U ocv (7) into Equation (7), we have Equation (8): where T represents the sampling time and T s refers to the interval of sampling time for parameter identification. As a result: The discrete equation of state at the time of (k-T s ), is: Subtracting Equation (11) from Equation (9), we can get: where (11) are obtained in a similar manner. According to Equation (12), the regression equation of parameter identification of DP model can be transformed into: where the corresponding parameter matrix is: The standard RLS is often utilized to the discrete system represented by Equation (13). However, if the change rate of the estimated parameter is different in the system discretization process, the application of the RLS algorithm is prone to failing. The tracking of the parameter's change rate is easily impacted by the value of the forgetting factor. The parameters with a large change rate need to be matched with a smaller forgetting factor; the slowly changing parameters need a larger forgetting factor to track, so as to ensure that the RLS algorithm is stable in the tracking process of parameter changes. The change rate of parameters that need to be estimated are different in the lithium battery system. To obtain the best identification accuracy, the VRLS with multiple forgetting factors are utilized to estimate the parameters of the DP model. This paper uses λ w1 , λ w2 , λ w3 , λ w4 , λ w5 , respectively, to denote the forgetting factors of the five parameters to be estimated in the parameter matrix w(k), and calculates them with Equation (15). In this algorithm, these forgetting factors can be decoupled and adjusted to adapt to parameter changes to obtain the best estimation effect. The calculation formula of the forgetting factor in this paper is as follows: where i = 1, 2, 3, 4, 5; λ w1 , λ w2 , λ w3 , λ w4 , λ w5 , respectively, denote the calculation coefficients of the forgetting factor, and their corresponding values are shown in Table 1. After solving the regression equation, the model parameters can be calculated as follows: Setting K 0 = T 2 + bT + a, deducing Equation (10), we get: With a = τ 1 τ 2 , b = τ 1 + τ 2 , τ 2 − bτ + a = 0, solving the equation, we get: The parameter identification process of the VRLS algorithm is presented in Table 2. In the VRLS algorithm, the sampling interval Ts has a crucial impact on the operation of the algorithm. If Ts is too large, the model estimation error will be large; if Ts is too small, it will affect the stability of the model. Therefore, Ts is taken as 4 to balance the precision and stability of the battery model. Table 2. Parameter identification process of VRLS algorithm.
Step 1. Initialize the parameters: Step 2. Calculate the state variables and the predicted value of covariance Step 4. Update the state variables and covariance matrix: , and E is a unit vector of the fifth order.

Adaptive Cubature Kalman Filter Algorithm
Based on the third-order spherical radial cubature criterion, the Cubature Kalman filter predicts and updates the state of the nonlinear system through the linear cubature point. Synthesizing the third-order spherical radial criterion, Equation (19) is obtained: where e i is the ith unit vector in the identity matrix. The discretized state equation and observation equation estimated by SOC are shown in Equations (3) and (4) (a). Initialize the state values X, error covariance values Px, process noise covariance Q, and measurement noise covariance R.
. Calculate the volume points and weights at the moment k − 1 for the first time.
(c). Propagate the cubature points, namely, substitute the first calculated volume points into the equation of state.
(d). Calculate the state variable prediction and error covariance prediction: (e). Calculate the cubature points and weights the second time.
(f). Propagate the cubature points, namely, substitute the second calculated cubature points into the equation of state.
(g). Calculate the predicted value of the observed variables: (h). Calculate the observation error covariance and cross-covariance: (i). Calculate the Kalman gain: (j). Update the state value and error covariance: (k). Adaptive update of Q K and R K The noise covariance is adjusted with battery voltage based on the residual sequence of the battery model. The modification and update expressions of Q K and R K are shown in Equations (34) and (35).
F k is the approximate estimate of the voltage residual covariance, which is expressed as: where a i is the voltage residual of the battery model, i.e., the difference between the calculated value of the voltage obtained at the cubature point of the second propagation and the actual terminal voltage; L w is the window size that matches the covariance. Figure 3 shows the diagram of SOC estimation based on ACKF. After the initialization, it is necessary to measure the battery operating current and terminal voltage. Moreover, the predicted values of the state variables x k and the observed variables y k can be obtained through the update of time and measurement. The noise covariance is adjusted and corrected with the battery voltage based on the residual sequence of the battery model. Finally, one can calculate the errors on the basis of measured terminal voltage, then the battery SOC is estimated after correction and the algorithm goes to the next cycle.

Results and Discussion
In order to evaluate the performance of the present method based on VRLS online parameters identification and ACKF in SOC estimation, the UDDS and DST conditions are selected. The UDDS condition features rapid power changes and fierce current impact, whereas the DST condition is a complicated and variable power working condition that simulates the driving actions of a car, such as starting, acceleration, constant speed, braking, etc. It is easy to cause strong impact to the battery and SOC estimation is challenging under such complex conditions. The models of parameter identification and SOC estimation are implemented in the Simulink simulation environment in MATLAB. Section 4.1 presents the setup of test bench. Section 4.2 shows the comparison of the two battery models tested. Comparison of two parameter identification methods is presented in Section 4.3. SOC estimation performance with different algorithms is evaluated in Section 4.4.

Experimental Setup
The experiment platform of battery test includes a charge-discharge test equipment (Xinwei BTS-5V300A), an upper computer, and a high and low temperature alternating heat and humidity test chamber (GDJS-150). This setup can simulate various battery charge and discharge patterns by loading the test program of the upper computer, execute the vehicle service condition, and obtain the data of battery voltage, capacity, power, and so on in real time. The sampling frequency is set to 10 Hz. The current loading accuracy is ±0.3 A, and the voltage loading accuracy is ±0.005 V, which is sufficient to guarantee the reliability of battery charge and discharge tests and data collection. The test chamber is capable of simulating the temperature and humidity range of the battery in the test process in a very high precision range. The control range for chamber temperature and humidity is −50~150 • C and 30-98% RH, respectively. The battery under investigation is connected to the channel of the test equipment through physical wiring, and is placed in the test chamber to ensure that the temperature and humidity of the battery become constant. The technical parameters of the tested ternary lithium battery are presented in Table 3. Table 3. Technical parameters of the battery.

Items Parameters
Cathode

Comparison of Two Battery Models
To compare the accuracy of the DP model and Thevenin model under UDDS and DST conditions [28], the DPVRLS and Thevenin-VRLS algorithms are utilized to identify battery parameters and the estimated values of terminal voltage obtained from the two battery models are compared with the experimental data. Figures 4 and 5 show the terminal voltage comparison and error curves under UDDS and DST conditions, respectively.   Figures 4 and 5 indicate that the agreement between the terminal voltage of DP-VRLS and the measured value is obviously better than that of Thevenin-VRLS, the maximal value of the error curve is smaller, and the volatility is gentler. The error value of DP-VRLS does not exceed 0.039 V, whereas the maximum error of Thevenin-VRLS is 0.061V [28]. This demonstrates that the two models realize satisfactory estimation performance, and the DP model has higher accuracy and better dynamic performance compared with the Thevenin model.

Comparison of Two Parameter Identification Methods
To prove the superiority of the online model identification over the offline model identification, the HPPC offline method and the VRLS online method are utilized to identify the DP model parameters. Figures 6 and 7 show the terminal voltage curves under UDDS and DST conditions, respectively.   Figure 6 shows that the DP-offline method has large errors under the UDDS condition in general, and the maximum error of DP-offline is 0.4 V, while the maximum error of DP-VRLS is only 0.075 V. After the middle period of the discharge, the terminal voltage simulation curve starts to deviate from experimental data, especially in the later stage, which deviates from the measured value curve greatly and irregularly. The reason for this deviation is that when parameters are identified under the HPPC condition, to prevent the battery from over discharge, the experiment is stopped until the SOC is 5%. The relationships between parameters and SOC are fitted as sixth-order polynomial by using curve fitting tool in MATLAB based on the experimental data. The divergency begins at about 18,000 s in Figure 6, and the SOC is about 5% at this time. As the condition continues, there is a large error in parameter fitting because the fitting curve has a fitting error when the SOC is in the range of 0 to 5%. As the SOC approaches 0, the fitting error is large and the divergency becomes more pronounced.
In Figure 7, the curve of terminal voltage under DP-offline diverges from experimental data and the deviation becomes obvious in the later stage. One can see that the voltage of DP-VRLS is in agreement with the measured value steadily with the maximum error about 0.04 V, while the error of offline identification reaches 0.06 V and the error has increased by 50% compared to the former. This shows that the VRLS algorithm can effectively reduce the drawbacks of battery time-varying and instability in dynamic working conditions, and has strong advantages in parameter identification.
To further compare the models and the accuracy of online and offline estimation more thoroughly, the mathematical statistical results of estimation error are presented in Table 4. The maximum error, Mean Absolute Error (MAE) and Root Mean Square Error (RMSE) of the three algorithms under UDDS and DST conditions are calculated respectively; see Table 4. Under the DST conditions, the maximum error of DP-VRLS is 0.039 V, which is about 64% of the two algorithms, and the overall error range does not exceed 1.2% of the rated voltage. The maximum error of DP-VRLS under UDDS operating conditions is 0.0754 V, which is only 2.4% of the rated voltage. Its MAE and RMSE are smaller, indicating that the error fluctuation of DP-VRLS is smaller, the stability is better, and the dispersion is smaller. The statistical results show that the second-order DP model has higher accuracy and reflects the dynamic polarization effect of the battery better. The VRLS algorithm prevents the estimation drawbacks caused by the time-varying nonlinearity of the battery system and has reliable parameters identification accuracy. Both the battery model and the parameter identification method contribute to the accuracy of the model. The DP-VRLS algorithm integrates the battery model with the parameter identification well, and the proposed method of parameter identification is accurate and reliable.

Comparison of SOC Estimation with Different Algorithms
After identifying the model parameters, the SOC estimation performances based on ACKF are compared with that of EKF and CKF under UDDS and DST condition in this section. Figure 8 presents the SOC comparison curve among the estimates of three algorithms and the experimental measurement under UDDS conditions. Figure 8 shows that the SOC simulation value of ACKF algorithm and the measured value have the smallest deviation, and the divergence of EKF curve is the most obvious. In Figure 8b, as the working condition time is extended, the error accumulation of CKF and EKF continues to increase. In the middle and late period of the working condition, the three error curves are clearly differentiated, and the error of ACKF remains in a stable range. The error range of EKF is the largest and the maximum error is about 4%; the error of CKF is within 3%, and the maximum error of ACKF does not exceed 1.9%. This result shows that the ACKF algorithm realizes satisfactory dynamic estimation performance under complex working conditions.  Figure 9 presents the SOC estimation performance curves of ACKF, CKF, and EKF in DST condition. One can see that the SOC estimation curve of ACKF matches the measured value well, and the agreement is better than the other two algorithms. The error curve of EKF increases proportionally and CKF has a larger error than ACKF. The overall error curve of ACKF has the smallest fluctuation and the best stability, and the maximum error is around 0.015. In summary, the ACKF algorithm maintains an excellent estimation accuracy under DST condition. Statistical methods can be used to more intuitively analyze the SOC error under UDDS and DST conditions. Table 5 shows the maximum error, MAE, RMSE of ACKF, CKF, and EKF algorithm, respectively: the maximum estimation error of the ACKF algorithm is 1.85%, and its MAE and RMSE are much smaller than the EKF and CKF algorithms. The ACKF algorithm has superiority in accuracy and stability. The error statistical parameters of the CKF algorithm are smaller than that of the EKF, and the cubature points are directly used for nonlinear propagation, which avoids the accumulation of linearization errors and enhances the accuracy of the algorithm. The maximum error of ACKF is 58% of CKF under the DST condition and 69% of CKF under the UDDS condition. In CKF, because the state and observation noise are constant, the error correction of SOC estimation is reduced. The ACKF algorithm adopts the module that tracks and corrects noise adaptively, which raises the accuracy and stability of the algorithm by reducing the interference of noise to the estimation result.

Conclusions
For the purpose of better SOC estimation performance, the parameters of DP model are identified online using the VRLS method. The ACKF model with online parameters identification is employed to estimate the SOC in UDDS and DST conditions. The research conclusion can be summarized as follows.
(1) By comparing the estimated terminal voltage of the Thevenin model and DP model, we can conclude that on the one hand, the Thevenin model and DP model can be adopted to the dynamic and complex condition. On the other hand, the DP model has higher accuracy and better dynamic performance compared with the Thevenin model. (2) Online parameter identification based on VRLS has an improvement for voltage estimation over the offline parameter identification of the HPPC test, and it is shown that the proposed VRLS has a more accurate parameter identification ability. (3) Experiments based on the two typical dynamic operating cycles are used to evaluate the superiority of the proposed algorithm compared with EKF and CKF in terms of accuracy and stability. The maximum errors of ACKF are 1.85% in UDDS and 1.64% in DST, the MAEs are 0.59% in UDDS and 0.39% in DST, and the RMSEs are 0.72% in UDDS and 0.49% in DST. The estimation accuracy is relatively high and the maximum error, MAE, RMSE of ACKF are all smaller than those of EKF and CKF. The results show that the ACKF has a satisfactory performance in SOC estimation, and has better accuracy and stability than EKF and CKF. To conclude, the VRLS-ACKF is capable of obtaining accurate SOC estimation and terminal voltage prediction with satisfying stability, which is suitable to implement in the real application. For future work, the proposed algorithm will be applied in BMS to verify its practicality.

Data Availability Statement:
The data generated in this study cannot be shared.

Conflicts of Interest:
The authors declare no conflict of interest.