Parameter Identiﬁcation and State-of-Charge Estimation for Lithium-Ion Batteries Using Separated Time Scales and Extended Kalman Filter

: With the development of new energy vehicle technology, battery management systems used to monitor the state of the battery have been widely researched. The accuracy of the battery status assessment to a great extent depends on the accuracy of the battery model parameters. This paper proposes an improved method for parameter identiﬁcation and state-of-charge (SOC) estimation for lithium-ion batteries. Using a two-order equivalent circuit model, the battery model is divided into two parts based on fast dynamics and slow dynamics. The recursive least squares method is used to identify parameters of the battery, and then the SOC and the open-circuit voltage of the model is estimated with the extended Kalman ﬁlter. The two-module voltages are calculated using estimated open circuit voltage and initial parameters, and model parameters are constantly updated during iteration. The proposed method can be used to estimate the parameters and the SOC in real time, which does not need to know the state of SOC and the value of open circuit voltage in advance. The method is tested using data from dynamic stress tests, the root means squared error of the accuracy of the prediction model is about 0.01 V, and the average SOC estimation error is 0.0139. Results indicate that the method has higher accuracy in ofﬂine parameter identiﬁcation and online state estimation than traditional recursive least squares methods.


Introduction
In order to meet people's urgent needs for low-carbon transportation, the electric vehicle industry is developing rapidly. Excellent power battery technologies play a vital part in promoting the advancement of electric vehicles. Among them, lithium batteries have become the first choice for new energy vehicles due to their high specific energy, low selfdischarge rate, and long cycle life [1]. For the management of the batteries during electric vehicle operation, to achieve the best performance and prolong battery life, it is necessary to monitor various states inside the battery depending on the battery management system (BMS) in real-time. These states include state of health (SOH) [2], remaining useful life (RUL) [3], state of power (SOP) [4], and state-of-charge (SOC), etc. In these states, SOC can indicate remaining battery capacity and is usually the main factor to be considered [5]. As the fuel gauge of the traditional car, the SOC in BMS becomes an important indicator of the driving experience of an electric car.
However, as the battery performance is greatly affected by aging, self-discharge, charge-discharge cycles, and temperature charge, battery SOC has nonlinear and timevarying characteristics, which makes the task of exact SOC estimation very challenging [5]. In recent years, many estimation algorithms have been proposed and applied on SOC, and those widely used methods are open circuit voltage (OCV) methods [6][7][8], Coulomb counting methods [9], model-based methods [10,11], and data-driven methods [12][13][14].
In the OCV method, the relationship between OCV and SOC can be obtained by measuring the OCV corresponding to different SOC values. However, OCV measurement requires that the battery should be disconnected from the load for a period of time to reach a steady state. As a result, the OCV method is unsuitable for online SOC estimation. The Coulomb counting method uses the definition of SOC to calculate the remaining capacity of the power battery and uses the value of the initial SOC and integral of the current in a period to calculate the battery SOC at the current moment. The strategy is easy to compute, but it is an open-loop estimation, which has inaccurate SOC initialization and sensor measurement cumulative error in the application. The data-driven method regards battery as the black-box and establishes a mapping relationship between SOC and other observable values through a large amount of data, such as temperature, current, voltage, etc. [15]. That is commonly based on machine learning, such as artificial neural network (ANN) [16], support vector machine (SVM) [17], long short-term memory network (LSTM) [15], or Gaussian process regression (GPR) [13,18]. For these methods, the choice of data set will greatly affect the accuracy of the entire prediction. In order to get an accurate estimate, the enormous datasets need to contain all working situations, which will significantly increase the computational expense.
Model-based methods mainly use equivalent circuit models (ECM) and electrochemical mechanism models [13,19]. This method depends on the accuracy of model parameters and state estimation algorithm. Common state estimation algorithms include particle filter (PF), Kalman filter (KF), extended Kalman filter (EKF), unscented Kalman filter (UKF), cubature Kalman filter (CKF), and proportional integral observer (PIO), and different combinations of them. Among them, the KF method is widely used in SOC estimation, which is used to achieve the minimum mean square error of the estimated value in the case of linear Gaussian. However, the battery system is a typical nonlinear system; OCV, SOC, and internal resistance in the battery show strong nonlinear changes under the working state of the battery. Therefore, an EKF method that linearizes the nonlinear system is proposed [20][21][22]. Pérez [20] et al. proposed an improved closed-loop method depending on EKF. Considering the hysteresis state, it is suitable for different current distributions and SOC. In [21], an improved SOC estimate algorithm was proposed, based on EKF and a feedforward neural network, and its robustness was verified under different temperature conditions.
The accuracy of battery model parameters can largely determine the estimation performance of ECM. To obtain a more accurate model, accurate online recognition of parameters is required. Common recognition methods can be divided into recursive least squares (RLS) [23][24][25] or adaptive filtering (AF) methods [26,27]. These methods are small in the calculation and easy to implement and have achieved good results in the actual process [28]. Duong et al. [25] proposed an RLS method with multiple adaptive forgetting factors to capture real-time parameter changes and different dynamics. In order to obtain more refined parameters, we use the RLS method to calculate the corresponding parameters of the ECM separately on different time scales, but only use the RLS method to perform parameter identification and SOC estimation on the separate time scale (STC). It is necessary to obtain the initial OCV to separate the two resistor-capacitor (RC) circuit models. The voltage of the network still has great limitations for real-time applications.
During vehicle driving, the current and voltage sampling period is generally less than 1 s to obtain sufficient information [19]. At present, the two-stage battery model is the most widely used. If all model parameters are identified on a uniform scale, it is easy to cause large errors due to data saturation, which does not conform to the electrochemical model of the battery. The electrochemical effects of batteries include charge transfer effects and diffusion effects as the two most important effects [29]. According to electrochemical theory, the charge transfer process generally occurs in the time range below 10 s, and the diffusion process usually takes place in a larger scale, usually between 10 and 100 s [30,31]. Due to this effect, if all parameters of the ECM are put together for unified identification, the differences in these electrochemical effects will be blurred. In order to obtain a battery model that can more accurately describe the actual electrochemical process, the recognition strategies need to be adopted on different time scales. There have been some studies on the application of this multi-scale time effect in the process of parameter identification in recent years [19,24,30]. Dai et al. [19] designed a model parameter recognition algorithm based on the independent time scale. The algorithm consists of two independent modules using EKF and RLS to recognize different dynamics. In [24], the author proposes a decoupling least squares (LS) method to calculate the parameters of fast and slow dynamic processes separately. However, it is essential to know the initial parameters and the initial SOC value to decouple the two modules at different time scales, so there are limitations in practical applications. To take care of this issue, we present a new improved algorithm for the online estimation of ECM parameters by combining EKF and RLS in this work.
In this paper, a two-stage RC battery model is used, which is divided into two parts: fast dynamics and slow dynamics. Calculated the voltage by the initialization model parameters of each part and pass through the designed low-pass filter. The parameters are identified, respectively, and then the EKF filter is used to estimate the SOC and OCV, and finally the OCV and the identified parameters are used to update the system state. Using dynamic stress tests (DST) to test the effectiveness of the proposed improved algorithm at different temperatures, the voltage error and SOC estimation error are both smaller than the estimation process under a uniform scale. In addition, the parameter identification under the STC is combined with EKF for SOC estimation. It does not need to know the initial OCV and SOC and can identify and update the parameters online in real-time, which is more in line with the operating conditions of the vehicle in the actual process.
The remaining structure of this paper is organized as follows. Section 2 introduces the battery model at different scales and introduces the parameter identification process and the method of SOC estimation combined with EKF. Section 3 discusses the robustness of the algorithm through experiments and finally draws some conclusions in Section 4.

Battery Model and Identification Method
The parameter identification and SOC estimation strategy architecture based on a separated time scale is shown in Figure 1. In this section, the following will introduce the specific implementation process. Where represents SOC, 1,2,3,4,5,6,7 represents the coefficient of fitting the relationship between and . In this paper, the real SOC is calculated according to the previously described Coulomb counting method, where SOC is defined as: Among them, is the Coulomb efficiency of the battery, is the nominal capacity of the battery, represents the current value at sampling time , and ∆t is the sampling period.  For the lithium battery model, an ECM with second-order RC networks is usually used. He et al. [32] proved in the study that second-order RC can get the best accuracy in lithium battery voltage estimation compared with other commonly used models. In this work, we also selected the second-order lithium-ion battery model. The two parallel RC models are used in ECM to show the polarization characteristics, and the battery model is shown in Figure 2. The model equation of the circuit is:   Among them, U ocv represents the OCV of the circuit, U t is the terminal voltage, and U 1 and U 2 , respectively, represent the voltage on the second-order RC networks. R 0 is the ohmic resistance, R 1 , R 2 represent polarization resistance, and C 1 , C 2 represent polarization capacitance. I represents the current passing through the entire circuit. U ocv can construct the relationship between OCV and SOC through a simple electrochemical function mode.
where z represents SOC, k i (i = 1, 2, 3, 4, 5, 6, 7) represents the coefficient of fitting the relationship between U ocv and z. In this paper, the real SOC is calculated according to the previously described Coulomb counting method, where SOC is defined as: Among them, η i is the Coulomb efficiency of the battery, Q n is the nominal capacity of the battery, i t represents the current value at sampling time t, and ∆t is the sampling period.

RLS Method for Parameter Identification
The transfer function of the whole system can be expressed as: Using the bilinear change method, the equation on the basis of the s-plane is mapped to the z-plane, and then the discretization operation is performed, ignoring the effects of battery hysteresis and aging, where k is the sampling interval, and the model output equation is: The corresponding relationship between model parameters and coefficients: De f ine : The second-order model defines the parameter matrix and data matrix time k can be written as: According to the weighted RLS, recursive the parameter vector θ k . The whole process can be realized according to the following equations.
The initial value θ 0 is set to zero at startup, where λ is the weight typically set between 0.95 to 1. According to the formula RLS, the parameters a1, a2, a3 can be obtained, then R0, R1, R2, C1, C2 can be calculated.

Parameter Identification Base on STC
In the study of batteries, electrochemical impedance spectroscopy (EIS) as an important parameter is used to observe the internal behavior of batteries [33]. From the previous twoorder RC network model loaded with current excitation, the transfer effect and diffusion of charge can be seen from the study of EIS. The frequency range corresponding to the effect is different [34]. Therefore, when the second-order RC network model is applied to approximate the lithium-ion battery, if all parameters are placed on a uniform scale for identification, there will be deviations. To tackle this issue, this paper designs a multi-scale parameter identification process, which corresponds to the fast and slow changes in the battery model. R0, R1, C1 corresponds to the fast dynamics process, and R2, C2 corresponds to the slow dynamics process. Here, the dynamic influence of OCV is excluded, which is known from SOC estimation. In this study, EKF will be used in conjunction with the identified parameters to perform online estimation of SOC and OCV, which will be introduced in the next section.
For the fast dynamics-changing part and the slow dynamics part; In Formula (9), y 1 , y 2 represent the separated fast dynamic voltage and slow dynamics voltage. The current of each RC network is assumed to be constant between each sampling, and the equations are shown as follows: The voltage response caused by the diffusion process and the charge transfer reaction has a low-pass filtering effect on the current; we use the low-pass filter processor designed by [24] to obtain the filtered equation: The output equations of fast dynamic and slow dynamic are written by RLS.
The corresponding parameter equation and coefficient equation are: Use formula (13) to analyze the corresponding parameters, and then analyze R0, R1, R2, τ1, τ2.

SOC Estimation and Parameter Update of Joint EKF
The classic EKF algorithm is usually used to deal with typical nonlinear systems of battery estimation, which mainly has two steps: prediction and update. The nonlinear space equation is expanded by Taylor to obtain the approximate linear space equation, and then the current state space state is estimated by applying KF to the linear space equation. It is a commonly used algorithm for estimating the current state of space, suitable for discrete nonlinear systems. Applied to SOC estimate, the spatial equation of the discrete nonlinear system is expressed as follows: In the equation, the first part is the system state equation, where X k+1 is the state vector, and the second part is the observation equation expressed by Z k , k is the discrete time, and ω k and v k are independent Gaussian white noise. The state equation and observation equation are linearized as follows: where, For the linearized model, KF recursive process is applied.
Time-update equations: Measurement-update equations: Among them, X k is the value of the system state at the sampling point k, initial value x(0) = E[x(0)], X k which is its predicted value; P k is the mean square error, initial value P(0) = var[X(0)], K is the Kalman gain; Q and R are the variances of ω and ν, respectively.
We use EKF to quickly output and correct the SOC value and the updated U ocv value. In the traditional OCV method, the LS method can be used to resolve the model parameters; SOC is estimated directly from the relationship described in Equation (2). However, in our model, we identify two parts of the parameters separately. This identification needs to be given the initial model parameter values in advance to obtain the estimated OCV value, calculate the corresponding voltage and current, and use the RLS method of each part. Performing parameter identification on a separate scale, we can also see from the process that the initial value can impact the iterative estimation of the system to a considerable degree. It is difficult for us to obtain the OCV value in the real-time operation of the car. In this paper, the EKF algorithm is designed to solve this problem with an online estimate of the SOC through the current and voltage. The corresponding OCV estimated value can be calculated through the mapping of OCV and SOC and then input into the model for the iterative update. In this way, the parameters and SOC could be updated in the state under the STC. The main identification process of joint SOC estimation and parameter update is shown in Algorithm 1:

Experimental Results and Discussion
The experimental data is collected from 18,650 lithium-ion cells by the University of Maryland [35]. The primary parameters of the lithium-ion battery for the experiment are given in Table 1; the maximum capacity is 2000 mAh. The experiment in this article is mainly divided into two parts. The first is to use the small current OCV test to obtain OCV-SOC mapping relationship by using formula (5), and then the DST test is used to verify the performance of the proposed model. All these experiments are conducted at 0, 25, and 45 • C, and the data are recorded at an interval of 1 s in every test.

Low Current OCV Test
The low-current OCV test is to perform a complete charge and discharge test on the lithium-ion battery with a small amplitude current. The corresponding terminal voltage can be considered as OCV. First the battery is charged to 100% SOC, then the battery is discharged with a constant small current (C/20) until the battery cut-off voltage 2.5 V, then it is charged to the maximum voltage of 4.2 V with the same current value.
The current-voltage curve during the low-current OCV test is shown in Figure 3, the green line represents voltage and the red line represents current, and the test results are applied to average and linear interpolation steps to obtain the OCV-SOC. The changing relationship between SOC and OCV at different temperatures is shown in Figure 4.

Dynamic Test
In order to verify the effectiveness of the improved algorithm in a complex dynamic situation, the DST dynamic operating condition test is used. The current is shown in Figure 5, and the enlarged part in Figure 5 is a cycle of operating conditions. The tests were carried out at three temperatures (0, 25, 45 °C).

Dynamic Test
In order to verify the effectiveness of the improved algorithm in a complex dynamic situation, the DST dynamic operating condition test is used. The current is shown in Figure 5, and the enlarged part in Figure 5 is a cycle of operating conditions. The tests were carried out at three temperatures (0, 25, 45 • C).

Offline Parameter Identification and Results
In this article, we use the current and the voltage tested under DST operating conditions to perform parameter identification and model error estimation under

Offline Parameter Identification and Results
In this article, we use the current and the voltage tested under DST operating conditions to perform parameter identification and model error estimation under different time scales and uniform scales. The evaluation indicators used in this article include mean absolute error (MAE) and root mean square error (RMSE) as the main performance indicators. The calculation formula is as follows: The DST experiment was repeated at different temperatures, and the model is identified on a uniform time scale using RLS. EKF and RLS are used to identify parameters on different time scales. An iterative update is carried out, and the results of the iterative stabilization are shown in the article. For the fast dynamic, we use all data points for identification. For the slow dynamic, we only use about 10% of the data for the parameter identification process and iterative update. All the results are listed in Table 2; the unit of RMESE and MSE is V. The time constants τ1, τ2, corresponding resistance R1, R2, and the ohmic resistance R0 of the second-order RC network are, respectively, identified offline, where STC + RLS is the result of iterative update combined with EKF. From the offline identification results, when the R0 is 0 • C, the proposed model predicts MAE of 0.01, RMSE of 0.133, and the traditional RLS method estimates MAE of 0.0144. At 25 • C, the traditional RLS identifies the parameter MAE as 0.0113 and the RMSE as 0.0123, while the STC model in this paper has the MAE as 0.0099 and the RMSE as 0.011. At 45 • C, the RLS has identified the parameter as the MAE as 0.0437 and the RMSE as 0.0672. STC + RLS identifies the result MAE is 0.0091 and RMSE is 0.0114. From the results of offline parameter identification, the RMSE of the model voltage is about 0.01, and from all the results of MAE and RMSE, the model prediction results for the parameters identified at different time scales are less than the traditional direct use of RLS unified scale identification to predict. When parameter identification is more accurate, the model accuracy will be higher.

Realtime Parameter and SOC Estimation
We use the 0 • C DST data pair model for online parameter identification. Here, for the real-time parameter identification at 0 • C, the fast dynamics part uses all 7000 data, while for the slow dynamics part, recursive only uses 1000 data. The identified parameters of the ECM are performed at different time scales. The results are shown in Figure 6. Fast dynamics part τ1, R1, and R0 change trends such as (a-c), and slow dynamic part R2, τ2 change trends are shown in (d-e).
The changes in model parameter estimates and SOC of the proposed recursive method are studied at 25 • C. The prediction of the model voltage by our method is shown in Figure 7a. The voltage estimation error of the traditional RLS and the RLS + STC model proposed in this paper is shown in Figure 7b. It can be intuitively observed through the error comparison the STC + RLS method identifies the model parameters in this work are smaller than the predicted only by using the RLS method, and the mean values of the model errors are 0.01 and 0.0144, respectively. We use the identification of parameters in the case of STC, and the accuracy of the prediction is higher than that of traditional methods. For the estimation of SOC, the result of online estimation and error using EKF is shown in Figure 8. The initial SOC in the test data used is set to 0.8, and the true value is calculated using the Coulomb counting method. The average estimation error of the traditional method is 0.017. The average error of the STC + RLS method is 0.0124, and the RMSE is 0.0139. The results are better than the estimation method using RLS. Therefore, the estimation method proposed in this work is robust.

Conclusions
For the practical application of ECM in battery management systems, accurate parameter estimation can greatly improve the robustness of real-time systems. In order to solve the mathematical inaccuracy caused by the traditional RLS method in the parameter estimation process, as well as the system parameter identification and estimation problems when the SOC and OCV are unknown, in this work, we propose a novel parameter estimation at different time scales, then EKF to update the parameters and predict the SOC. Obtaining more accurate parameters also improves the limitations of existing methods. In terms of accuracy, we use the DST operating conditions to evaluate the system, and experiments confirm the superiority of the proposed RLS+STC method in comparison with the commonly used RLS method at different temperatures. Compared with traditional RLS methods, the experimental results of the offline and online test show that the proposed method is better in accuracy and robustness.
Author Contributions: K.Y.: conceptualization, methodology, software, data curation, investigation, writing-original draft preparation. Y.T.: visualization, validation. Z.Z.: supervision, writing-reviewing and editing. All authors have read and agreed to the published version of the manuscript.
Funding: This research received no external funding.

Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Informed consent was obtained from all subjects involved in the study.
Data Availability Statement: Not applicable.