Extended Rauch–Tung–Striebel Smoother for the State of Charge Estimation of Lithium-Ion Batteries Based on an Enhanced Circuit Model

The state of charge (SOC) of a lithium battery system is critical since it indicates the remaining operating hours, full charge time, and peak power of the battery. This paper recommends an extended Rauch–Tung–Striebel smoother (ERTSS) for estimating SOC. It is implemented based on an improved equivalent circuit model with hysteresis voltage. The smoothing step of ERTSS will reduce the estimation error further. Additionally, the genetic algorithm (GA) is employed for searching the optimal ERTSS’s smoothing time interval. Various dynamic cell tests are conducted to verify the model’s accuracy and error estimation deviation. The test results demonstrate that ERTSS’s SOC estimation error is limited to 4% with an initial error between −25 ∘C and 45 ∘C and that the root mean square error (RMSE) of ERTSS’s SOC estimation is approximately 5% lower than that of extended Kalman filter (EKF). The ERTSS improves the SOC estimation accuracy at all operating temperatures of batteries.


Introduction
Lithium batteries have become the primary choice for battery electric cars due to their energy density, power density, and long cycle life. The energy density of commercial lithium-ion batteries with graphite anodes has exceeded 300 Wh/kg [1,2], and high-capacity anode materials have been proposed to replace graphite to obtain a higher energy density than graphite can provide. Nonetheless, high energy density poses significant hurdles to the safety of lithium battery systems [3]. Therefore, it is critical to construct a highly accurate and stable SOC estimator.
Various commercial SOC estimators exist. The most common is coulomb counting, which integrates current and time. As it accumulates current inaccuracy, it must be calibrated routinely. Then there is the open circuit voltage (OCV) method [4]. The battery needs to rest for at least seven hours before calibrating the SOC using OCV [5]. In addition, the OCV-SOC relationship of the lithium iron phosphate (LFP) battery is flat [6]; hence the fundamental OCV method cannot be used [7].
To acquire accurate SOC, the researchers propose methods based on cell models [8,9]. Typical battery models are the electrochemical model and the equivalent circuit model [10,11].
The electrochemical model represents the electrochemical response of the particles [1,11]. To grasp the electrochemical model's parameters requires a half-cell and numerous tests [12,13]. While it precisely depicts the battery's internal working process, it is hardly compatible with the existing battery management system (BMS) because it requires online parameter updates and numerous computing, which is not feasible with the BMS. The equivalent circuit model comprises multiple resistance-capacitance (RC) pairs, one or two independent resistances, and a single voltage source [14]. It cannot describe the micro reactions of the battery, but it is trivial to implement on the BMS. There are many kinds of research about online parameters identification for the cell equivalent circuit model. The recursive total least squares approach is one of the most promising methods for cell model parameters identification online [15,16]. However, the equivalent circuit model typically ignores the coulomb efficiency, hysteresis process, and battery health condition [17,18]. Furthermore, the cell capacity will reduce as the discharge cycle increases [16,19]. The cell capacity's degradation should be considered for the robustness of the cell model.
The non-linear Kalman filter is one of the most promising methods based on the equivalent circuit model for estimating SOC [20][21][22]. It recursively predicts and updates the possible value of SOC using Bayesian filter theory while also incorporating feedback correction to improve estimate accuracy.
Many studies have attempted to estimate the SOC using various non-linear Kalman filters accurately. Knap V. and Stroe D. et al. [4] estimated the SOC of energy storage systems based on an EKF and an unscented Kalman filter (UKF). Li L. et al. [23] proposed a method for updating temperature-related variables and estimating the system state that combined temperature-based coulomb counting and adaptive particle filtering (APF). Wei Z. et al. [24] identified the battery system's parameters using a two-stage recursive least squares algorithm and estimated the state of charge using a Luenberger observer. Shu X. et al. [25] used an adaptive fusion algorithm with a recursive least squares algorithm and an adaptive H-infinity filter to estimate the SOC. Li W. et al. [11] estimated the state of charge, lithium-ion concentrations, and potentials of lithium-ion batteries using an extended single-particle model. Qiu X. et al. [26] suggested three algorithms to solve the state estimation problems associated with lithium-ion batteries. They estimated the SOC using a Kalman filter with backward smoothing square root cubature (BS-SRCKF). Then, a multiscale hybrid Kalman filter was adapted to estimate the SOH. Finally, an improved cuckoo search algorithm was employed to improve the estimator's performance using a particle filter. Mawonou K. et al. [27] described a method for identifying fractional-order models using impedance spectroscopy (EIS) data. Then, they implemented an extended Kalman filter to estimate the lithium-ion battery system's state of charge. Zhou Z. et al. [28] proposed a method for estimating the state of charge (SOC) of a series-connected battery pack using a recursive least squares-adaptive extended Kalman filter. Zhang W. et al. [29] offered an improved adaptive battery state estimator for estimating the state of charge. Table 1 compares the studies' methods, cell models, and estimation errors. Since the validation conditions and error definitions are different, the value of errors does mean estimation accuracy. Despite the proposed methods yielding precise SOC, many researchers only test the method under an average operating temperature of batteries. As the authors of [4,24] pointed out, the parameters of the cell model have a temperature dependence, and there is a need for estimating SOC under all operational temperatures, such are driving BEVs in winter and summer.
We propose an extended Rauch-Tung-Striebel smoother (ERTSS) to estimate the SOC of the lithium-ion battery systems. The Rauch-Tung-Striebel smoother (RTSS) is the corresponding closed-form smoother for linear Gaussian state-space models, and the ERTSS is the approximate non-linear smoothing algorithm corresponding to EKF [30,31]. The ERTSS estimates state that each step is conditional on all measurements, while the EKF only uses the measurements obtained before. As the ERTSS uses all the measurements for one time interval, it can be used to reconstruct states that happened before the current time. The algorithm's performance was then evaluated using actual battery test data. The validation results demonstrated that the method acquired a precise estimation of SOC at all operational temperatures of batteries.
The rest of this article is structured as follows. Section 2 describes the battery model, 1/30C low current charge and discharge test, and the identification of model parameters. Section 3 introduces the ERTSS algorithm, dynamic working condition testing, and dynamic battery model parameter identification. Section 4 uses the dynamic working condition test to verify and analyze the accuracy and smoothing effect of the ERTSS algorithm. Finally, Section 5 concludes.  Figure 1 illustrates a typical lithium-ion battery's equivalent circuit model. V OCV is the OCV of a battery [32]. R 0 denotes the series resistance of a battery, while R hyst represents the hysteresis voltage of a battery. The two parallel resistance and capacitance subcircuits (R 1 , C 1 ), (R 2 , C 2 ) refer to diffusion effects.

Fundamental Equivalent Circuit Model
Equations (1)-(4) can be written as a discrete-time model: The terms z(t) and z[k + 1] represent the SOC, whereas z(t 0 ) signifies the initial SOC. Q represents the cell's capacity, and τ is a placeholder for the time variable inside the integral. η(τ) and η[k] represent the coulomb efficiency. v(t) and v[k] denote the cell terminal voltage, whereas OCV(z(t)) and OCV(z[k]) indicate the open-circuit voltage (OCV), which is a function of SOC and temperature. i(t) and i[k] stand for the charge or discharge current, respectively. i R 1 (t) and i R 1 [k] represent the current through R 1 , while i R 2 (t) and i R 2 [k] denote the current through R 2 .

Hysteresis Voltage
The fundamental equivalent circuit model omits the hysteresis in the terminal voltage, which may lead to significant SOC estimation errors, especially for the cell with an ironphosphate positive electrode. There are two kinds of hysteresis voltage during charging and discharging, and one is SOC-varying hysteresis, the other is instantaneous hysteresis [32].
A SOC-varying hysteresis equation is: where M(z,ż) is a function of SOC and the change rate of SOC, which signifies the polarization due to hysteresis. M(z,ż) is positive for charge procedure and negative for discharge procedure. h(z, t) denotes the dynamic hysteresis voltage as a function of SOC and time. γ is a positive constant, which scales the rate of decay. sgn(ż) is a sign function. Multiply both sides of Equation (9) by dz/dt, then substitute dz/dt = −η(t)i(t)/Q into the right side of the equation. Thus, To fit the differential equation of the fundamental model, (10) is transformed into a difference equation: Then the SOC-varying hysteresis voltage is: When the sign of the current changes, we should consider the instantaneous hysteresis. Define s[k] as: Then the instantaneous hysteresis model is modeled as: According to Equations (12)- (14), the hysteresis voltage is:

Enhanced Circuit Model
With these hysteresis voltage equations, the enhanced equivalent circuit model are: Thus, the cell model's output equation is: Equations (16)-(19) formulate the space state model of the cell. Figure 2 shows the enhanced circuit cell model.

SOC Estimation
The structure of the estimation method is depicted in Figure 3. The battery management system continuously monitors the cell's voltage, temperature, and current. We then employ the parameter identification approach to determine the parameters of the battery model. Finally, the ERTSS estimates the SOC using the cell model.

ERTSS
The ERTSS algorithm comprises two major parts. One is the standard EKF, and the other is the ERTS smoother [30]. We implement the EKF to obtain the fundamental SOC prediction, then the estimation results and the covariance are provided to the ERTS smoother, producing smooth results.
If the process and measurement noises can be assumed to be additive, the generic non-linear state space model is as follows: where x k ∈ R n is the vector of state, y k is the vector of measurements, q k−1 ∼ N(0, Q k−1 ) is the Gaussian process noise, r k ∼ N(0, R) is the Gaussian measurement noise, f (·) is the dynamic model function, and h(·) is the measurement model function.  Specifically, the Bayesian smoothing method requires that the state space model (20) be written as follows: where x 0 denotes the initial state at time step k = 0, p(x k | x k−1 ) specifies the transition probability distribution of the dynamic model. p(y k | x k ) represents the conditional probability distribution of the measurement given the state x k , and y k is the model's output at time step k.
The ERTSS forms a Gaussian approximation to the smoothing distribution as follows: where y 1:T is a set containing the measurement vectors {y 1 , . . . , y k }, m s k is the mean computed by the ERTS smoother for the time step k, and P s k is the covariance computed by the ERTS smoother for the time step k. N(·) represents a Gaussian distribution.
Smoothing distributions are the marginal distributions of the state x k given a certain interval {y 1 , . . . , y k } of the measurement with T > k: For the ERTSS, the smoothing distribution and filtering distribution of the last time step T are the same, m s T = m T , P s T = P T . To apply the ERTSS, we need to use the EKF to predict the last time step T, then compute the smoothing distribution of time step T − 1 from the smoothing distribution of time step T, recursively, we reconstruct the state.
The prediction and update equations of the first order extended Kalman filter (EKF) [30,31] in the non-additive noise case are: Prediction: Update: where m − k is the predicted mean of the EKF at time step k before the measurement y k , f (·) is the dynamic transition function of the space model. The matrix P − k is the predicted covariance of the EKF at the time step k before the measurement y k . v k is a innovation vector of the EKF at step k, and h(·) is the measurement model function in the state space model. F x (·), F q (·), H x (·), H r (·) is the Jacobian matrix of f (x), h(x) with respect to state and noise. K k is the gain matrix of the extended Kalman filter, m k is the of the extended Kalman filter at time step k, and P k is the covariance of the EKF at the time step k.
The equations for the ERTSS are: where m − k+1 and P − k+1 mean and covariance by the extended Kalman filter. The matrix P − k+1 represents the covariance of the EKF at time step k + 1, and Q k is the covariance of process noise at the jump from step k to k + 1. G k is the gain matrix, and P k is the covariance of the EKF at the time step k. m s k is the mean computed by the RTS smoother for the time step k, and m s k+1 is the mean computed by the RTS smoother for time step k + 1. P s k represents the covariance computed by the RTS smoother for the time step k.
The first two Equations (31) and (32) of the ERTSS procedure are simply prediction equations of the extended Kalman filter. Equations (31)-(35) gives a recursive procedure which can be used for obtaining the smoothing distribution of time step k from the smoothing distribution of time step k + 1.
The matrix F x (m k ),F q (m k ), H x (m k ), H r (m k ) are the Jacobian matrices of f (x), h(x) evaluated at m k with respect to state and noise. We employ the ERTSS procedure with the cell model (16)- (19). The Jacobian matrices are: As B RC is given in Equation (18), A H,k is defined as follows: A H,k andB H,k are the partial derivatives concerning the state and evaluating it at the setpoint, respectively.
We can approximate the OCV partial derivative in (38) using the battery test data [33]. According to Equations (36)-(42), the linearization cell model is: Thus, we will substitute these equations into the ERTSS flow for the SOC estimation.

Genetic Algorithm
An ERTS smoother usually computes the smooth distribution of the time step T − 1 from the last time step T [31]. The last time step of SOC estimation typically means power off, but there is no need for SOC reconstruction if the battery is off. Choosing an optimal start time step and a suitable time step interval is necessary to make the ERTSS work online for SOC estimation. At the beginning of the ERTSS, the EKF predicts the SOC from step 0 to the start step θ 0 , and the ERTS smoother computes the smooth distribution backward to step 0, and the ERTSS output the smooth SOC. Then the EKF predicts the SOC from step θ 0 to θ 0 + θ ∆ , and the ERTS smoother computes the smooth distribution backward again. Figure 4 shows the procedure of the ERTSS.
To obtain an optimal θ 0 , θ ∆ , we formalize the problem as a non-linear mixed-integer programming problem as follows: Subject to: where θ designates the step parameters of the ERTSS, θ 0 signifies the start time step, and θ ∆ indicates the regression interval steps.ẑ i ,ẑ j ,ẑ m represent the ith, jth, and mth SOC estimation by ERTSS, while z i , z j , z m represent the ith, jth, and mth SOC actual value. N is the loop cycle of the ERTSS, and n denotes the incremental steps of ERTSS, while M represents the last step which is less than θ ∆ . The function f (θ) calculates the square errors of the SOC estimation by ERTSS. We use the genetic algorithm to search for optimal θ for minimum square errors of the SOC estimation.
As an essential indicator of the battery system, the SOC should at least update every 10 min (360 s). Based on this assumption, we give the upper limit value of θ as in (52).

Battery Test
To verify the ERTSS method, we implement experimental battery datasets performed under varying temperatures and dynamic current profiles [33]. Figure 5 shows the OCV test procedure. It comprises three main phases.
Soak the cell at the test temperature for at least 2h.
Discharge the cell until cell voltage equals (C/30, CC).
Soak the cell at 25℃ for at least 2h.
Discharge or charge the cell until the cell voltage equals (C/30, CC).
Soak the cell at the test temperature for at least 2h.
Charge the cell until cell voltage equals (C/30, CC).
Soak the cell at 25℃ for at least 2h. Firstly, the cell needs to be fully charged with the standard charge procedure, typically constant current and constant voltage (CCCV). Then, the cell is discharged with a C/30 charge rate and varying temperatures. Finally, the cell is charged with a C/30 charge rate and varying temperatures. Table 2 lists the main specifications of the under-test cell. The test data was sampled and saved at 1 Hz by the battery test equipment. The cell was soaked in the environment chamber to maintain the ambient temperature during the test procedure. The temperature of the chamber was set from −25 • C to 45 • C.
The dynamic test procedure also contains three main phases as the OCV test procedure. The difference between the OCV and dynamic tests is that the charge rate has been changed from a constant C/30 rate to a dynamic current profile (federal urban drive schedule-FUDS [34]) during the discharge phase. Figure 6 depicts the dynamic current profiles.

Cell Model Parameters Identification
Prior to implementing the ERTSS method, we formulate the parameters using an optimization algorithm. The procedure for identifying the parameters is as follows: 1.
Extract the OCV and Q parameters from the OCV test data.

2.
Apply the dynamic tests' current data to calculate the h[k] and s[k] parameters with a given γ initial.
Transform Equation (19) into a vectorize equation: Then obtain X parameters through the least-squares equation X = C −1 Y.

5.
Apply optimization algorithm to obtain γ with a cost function: where m denotes the size of the test data, v(γ) is the estimation cell voltage with a given γ, and v is the measured cell voltage during the test.
We employ the cell model with a single RC subcircuit to reduce computational costs. Table 3 gives the parameters identification result of the test cell. M 0 at 5 • C is 0 because we rounded the data, the actual value is less than 0.0001. Other than η, Q, and R 0 , the other parameters only have numerical meanings. Figure 7 exhibits the OCV and SOC relationship.

ERTSS Estimation
Having obtained the model parameters, we apply the model to the ERTSS method for estimating SOC. Coulomb counting (CC) is a low-cost and straightforward method for estimating SOC. We also implement it for SOC estimation. To demonstrate the improvement, we set an initial error rate of approximately 10% for both CC and ERTSS. In this case, the battery test equipment provides the reference SOC with highly precise current and voltage sensors. Figure 8 illustrates the results of SOC estimation by the ERTSS and CC at various temperatures. After less than 100 min of testing, the ERTSS reduces the SOC estimation error by approximately 5%, whereas the CC cannot deflate the original SOC error. Figure 9 plots the histogram of SOC estimation error by ERTSS at various temperatures. According to the SOC error distribution, the probability of SOC estimation error less than 4% is bigger than 95%. The estimation errors at the beginning are larger than 4% since the estimator has an initial error of 10%. Figure 10 illustrates the SOC estimation errors using ERTSS at various temperatures. In the range of −25 • C to 45 • C, the maximum absolute estimation error is less than 4% neglecting the outliers. ERTSS acquires its minimum median value at −5 • C. The estimation error increases as the temperature drops or rises. The upper quartile of estimation error reaches a maximum at −25 • C and 45 • C. Essentially, the cell model increases nonlinearity as the temperature deviates from 15 • C.   Figure 11 depicts the SOC estimation error by CC. The highest upper quartile of the SOC estimation error by CC is about 9.75% from −25 • C to 45 • C, while ERTSS is about 4%. In addition, the CC estimator cannot retune the initial SOC error, and it accumulates the error until the next SOC calibration.
Root square error (RSE) and root mean square error (RMSE) are introduced to reflect the estimation error further.  The EKF is also implemented for SOC estimation compared with ERTSS. Figure 12 plots the RSE result of EKF and ERTSS at 25 • C. The results at other temperatures are similar to the one at 25 • C. From the zoom part of Figure 12, the RSE of ERTSS is less than the RSE of EKF at the smooth steps. For the estimation at time step k, the ERTSS used the measurements and estimations across the time interval, while the EKF only used the measurement and estimation at time step k − 1. We can improve the RSE results of the ERTSS by increasing the smoothing interval time. However, we should choose the smoothing interval carefully, the minimum SOC refresh rate must be considered according to the applications.  Figure 13 depicts the SOC estimation RMSE of EKF at various temperatures. As discussed in (56), RMSE is a statistical result of the RSE, so RMSE reflects the error fluctuation somehow. ERTSS's RMSE is lower than EKF at all temperatures, so the estimation of SOC by ERTSS is more precise than EKF. Specifically, ERTSS can reduce the RMSE of SOC estimation by about 5% based on EKF.
Both the EKF and ERTSS provide accurate SOC estimation across the entire SOC range of batteries. Furthermore, the ERTSS acquires a smaller RMSE than EKF, suitable for estimating residual miles in battery electric vehicles. The SOC estimation of the ERTSS should have less uncertainty than the EKF. The ERTSS offers several advantages for online SOC estimation: • As it uses all measurements over a time interval, the smoothing step can be used as an interpolation when some measurements are missing or abnormal, such as the safety mode of some battery systems when the current sensor has an open-wire fault. • For the energy networks with battery storage systems, which may not require strict real-time estimation, the ERTSS could optimize the SOC estimations before the current time step. These will help the further power supply. • Since the smoothing step decreases the estimation error, it will help to improve the optimization of power flow in hybrid electric vehicles.
Since the ERTSS has one more smoothing step than the EKF, some concerns should be considered when it is applied to some real-time applications: • The state transformation matrix can be computed offline and saved as a lookup table, whereas the cell capacity Q and ohmic resistance R 0 should be updated by the state of health estimations. • The smoothing step of ERTSS needs more storage space than the EKF for saving the measurements and estimations at every time interval. If there are serious storage limitations, a small time interval should be chosen. • The SOC changes quickly for some applications, such as an A0 class electric vehicle with a small battery. ERTSS requires more computation than EKF, the smoothing step time must be evaluated if it sacrifices the SOC refresh rate.

Conclusions
SOC is an essential indicator of the lithium-ion battery system, particularly for applications in long-range battery electric vehicles. As the ambient temperature of batteries varies greatly, and since the cell model exhibits an unreliable nonlinearity at low temperatures, the SOC estimation methods must be validated with all battery operational temperatures. The proposed ERTSS based on an enhanced equivalent circuit cell model acquires a low estimation error and a low RMSE under the whole operational temperatures. It exhibits the following characteristics: • The ERTSS method can estimate SOC with an accuracy of approximately 4% as the ambient temperature changes from −25 • C to 45 • C with an initial error of 10%. In low-temperature and high-temperature applications, the ERTSS accuracy decreases, but it is still better than the CC and the EKF. • The ERTSS method is a bit more complicated than the EKF method. There is only one more prediction step than for the EKF, so it is acceptable to consider improvements in estimation accuracy and more minor deviations for many safety-critical applications.
Overall, we can conclude that the ERTSS method is suitable for long-range battery vehicles applications. However, the model does not consider changes in model parameters due to the degradation of the cell's health state, and the linearization error of the model will increase at low temperatures and high temperatures. It is imperative to draw attention to the cell model's nonlinearity and contain its degradation for further study.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.