A Self-Calibration SOC Estimation Method for Lithium-Ion Battery

Accurate state of charge (SOC) estimation is essential for the battery management system (BMS). In engineering, inappropriate selection of equivalent circuit model (ECM) and model parameters is common for lithium-ion batteries. This can result in systematic errors (i.e., modeling errors) in the state-space equation, thus affecting the SOC estimation accuracy. To address this problem, this paper proposes a self-calibration method. In the method, a novel state-space equation containing an unknown systematic error term is developed based on the Thevenin model. A self-calibration unscented Kalman filter (SC-UKF) algorithm is then introduced for recursive SOC estimation. The algorithm can automatically recognize and calibrate the unknown systematic error in the state equation, while also reducing the random noise effect through data fusion with the measurement equation. Test results demonstrate that the method can effectively correct the Thevenin modeling error and improve SOC estimation accuracy. Furthermore, the proposed method is computationally simple and convenient for engineering applications without increasing model complexity.


I. INTRODUCTION
Lithium-ion batteries have been widely used in aerospace, consumer electronics, transportation, and power grids since their cleanliness, high energy density, and high cycle life [1], [2], [3]. State of charge (SOC) is one of the key indicators in the battery management system (BMS), which represents the percentage of the battery's remaining capacity to its total capacity. Accurate SOC estimation can help improve energy management (e.g., prediction of remaining operating time or distance traveled) and prevent unsuitable conditions such as over-charging and over-discharging, thus being beneficial to reduce the risk of battery failure [4].
Determined by the lithium ions concentration of the electrodes, the battery's SOC cannot be measured directly and must be estimated based on various signals such as current, terminal voltage, and temperature. The coulomb counting method integrates the battery's current with time to calculate SOC, which is less complicated but limited by initial The associate editor coordinating the review of this manuscript and approving it for publication was Ilaria de Munari . and cumulative errors [5]. The open-circuit voltage (OCV) method estimates SOC based on the functional relationship between the SOC and OCV [6]. However, it is unsuitable for real-time estimation because it requires a long time to obtain the battery's OCV. The machine learning method treats the battery as a black box and establishes a relationship between the battery's SOC and monitored signal [7], [8]. As a data-driven method, it generally relies on too much training. Model-based methods, such as the electrochemical model and equivalent circuit model (ECM), are commonly used in the literature. Although the electrochemical model can characterize the battery's reaction process, it is generally limited to high computational complexity [9]. The ECM-based method approximates the battery's electrical characteristics using a circuit model composed of voltage sources, resistors, and capacitors [10]. The ECM-based method is popular due to the simple model structure, clear physical meaning, and relatively easy mathematical expression [11], [12].
Nowadays, several static and dynamic equivalent models have been proposed for battery modeling. The Rint model is the simplest one consisting of a voltage source and resistor [13]. As a static model, it cannot explain the polarization effect and accurately present the battery's dynamic characteristics. To address this limitation, a resistancecapacitance (RC) parallel network is added to form the Thevenin model [14]. The Thevenin model can capture the battery's dynamic characteristics with an RC parallel network reflecting the battery's polarization effect. Further, the Dual Polarization (DP) model (or second-order RC model) and n-order RC model are proposed for the more precise reflection of the battery's transient response [15], [16], [17]. As shown in Fig.1, they are distinguished by the number of RC parallel networks [18]. Besides, the Randles model [19] and PNGV model [20] are also famous dynamic models. Among them, the Thevenin and DP models are the most commonly used and have been proven effective in SOC estimation [15], [21], [22]. In the equivalent models, the model parameters can be determined by offline methods such as the HPPC test [23] or online methods such as the recursive least squares (RLS) and its improvements [24], [25], [26], [27]. With the established equivalent model and corresponding state-space equation, Kalman filter (KF) algorithms are adopted for SOC estimation. The extended Kalman filter (EKF) [28], [29] and unscented Kalman filter (UKF) [14], [30] are most commonly used for the battery's nonlinear system. Studies have shown that the UKF has higher accuracy than EKF for SOC estimation with the Thevenin model [31]. Following that, adaptive EKF (AEKF) [21], [32] and adaptive UKF (AUKF) [33], [34] are introduced to handle unknown noise variance. Besides, dual EKF (DEKF) is proposed to estimate both SOC and model parameters simultaneously [35], [36]. These filter algorithms can reduce random noise from instrument measurement, curve fitting, or other random factors in SOC estimation by data fusion and achieve robust estimation. However, they cannot eliminate the modeling error in the equivalent circuit model because it will cause a systematic error in the battery's state-space equation [11], [37].
The accuracy of the ECM-based SOC estimation method depends greatly on the accuracy of the circuit model and statespace equation. However, modeling errors can arise from two main factors. Firstly, the battery's actual circuit structure differs from the equivalent circuit model, and the selected model cannot describe the battery characteristics precisely in all cases. An improper circuit model selection can result in a wrong state-space equation for SOC estimation, leading to estimation bias. For example, Mendoza et al. considered that the low-order circuit model might be a critical factor causing estimation bias [38]; Zhang et al. found that the circuit model is associated with the battery's material and load conditions [39]; Tang et al. switched the battery's circuit model based on the load condition [40]. Secondly, model parameters are time-varying and affected by various factors such as individual differences, SOC, battery aging, temperature, and charge-discharge rate, and even change drastically in some cases [18], [40], [41]. Although parameter identification technologies have been developed greatly, accurately identifying model parameters with multiple effect factors is still difficult. Consequently, the identification error is easily generated. These errors are caused by deterministic factors (the inappropriate selection of the circuit model form and parameters) rather than random factors, bringing a systematic error rather than random noise in the state-space equation.
Developing a more accurate circuit model is one solution to reduce the modeling error (i.e., systematic error), such as adopting higher-order circuit models. However, it will increase model complexity and development costs, contradicting the engineering requirements [37]. To address the problem of unknown systematic errors in state-space equations, Fu et al. proposed a series of self-calibration Kalman filtering algorithms [42], [43]. They can automatically recognize and eliminate systematic errors and reduce random noise in the state estimation, thereby improving the filtering accuracy. Inspired by these, this paper establishes a statespace equation containing unknown systematic error caused by inaccurate modeling. And then, a self-calibration filter is provided to recognize and calibrate the modeling error. On this basis, SOC estimation accuracy is enhanced without increasing model complexity.
The main contributions of this paper are as follows. 1) Based on the Thevenin model, the influence of the modeling error on the state-space equation is analyzed. And a novel state-space equation with an unknown systematic error term for SOC estimation is established. 2) A self-calibration unscented Kalman filter (SC-UKF) algorithm for SOC estimation is introduced. It can realize the recognition, evaluation, and compensation of the systematic error term in the state-space equation, thus enhancing the estimation accuracy.
3) The A123 lithium-ion battery dataset under various working conditions is applied for the method's verification. The remainder of this paper is organized as follows. In Section II, the battery's state-space equation with unknown systematic error is established based on the Thevenin model. In Section III, the SC-UKF algorithm for SOC estimation is provided. In Section IV, the proposed method is verified by A123 lithium-ion battery test data. Finally, conclusions are summarized in Section V. equation without systematic error terms (i.e., the traditional equation without considering the modeling error) and the equation with a systematic error term are presented below.

A. THEVENIN MODEL AND STATE-SPACE EQUATION
Generally, the equivalent model's accuracy and complexity both increase as the RC order increases in Fig.1 [10], [44]. After weighing the accuracy and complexity, this paper chooses the Thevenin model as the battery's equivalent circuit model. In the model, V OC represents the battery's electromotive force (or OCV), presenting a nonlinear function of V OC = V OC (soc) with the battery's SOC. As SOC decreases, the V OC also decreases. R 0 is the battery's internal resistance, caused by the electrolyte resistance, diaphragm resistance, and component contact resistance. R 1 and C 1 are the battery's polarization resistance and polarization capacitance, respectively. They are generated by the polarization effect during the battery's charging and discharging process. I and V are the battery's load current (positive when discharging) and terminal voltage, respectively. They can be monitored online by the measurement instruments embedded in BMS.
According to Kirchhoff's law, circuit equations can be obtained as where V 1 is the voltage across C 1 . Through discretization, we can get where soc k , I k , V k , and V 1,k represent values of SOC, I , V , and V 1 at time t k , respectively; t k = t k − t k−1 is the monitoring time interval.
In addition, according to the coulomb counting, we can get where Q N is the battery's total capacity; η is coulomb efficiency (η = 1.0 in this paper). According to (2)-(3), the state equation for SOC estimation is obtained as The measurement equation is expressed as In the above equations, w 1,k−1 , w 2,k−1 , and v k are independent white Gaussian random noises with variances of Q 1,k−1 , Q 2,k−1 , and R k , respectively. They are caused by instrument measurement, curve fitting, and other random factors. The SOC-OCV curve of V OC (soc) and model parameters of R 0 , R 1 , and C 1 in the state-space equation can be identified before the battery's usage. Specifically, the SOC-OCV curve can be fitted based on the battery's OCV test data with different values of SOC. Model parameters can be identified by the LS algorithm according to the battery's current and voltage test data. The parameter identification process will not be explained in detail here, and can be found in existing research [45].

B. STATE-SPACE EQUATION WITH SYSTEMATIC ERROR TERM
The SOC estimation accuracy highly depends on the circuit model form and parameters. During the battery's service, if the Thevenin model differs significantly from the battery's actual circuit structure, the state-space equations (4)-(5) will be incorrect; if model parameter biases exist, the equations will also contain systematic errors. Therefore, the effect of modeling error is further analyzed in this section, and a novel state-space equation with the random noise and systematic error is established.
Assume the terminal voltage of all combined circuit elements in the circuit model except for the voltage source is V out . It satisfies V out = V OC − V . Due to the modeling error in the Thevenin model, it can also be expressed as where V ε represents the modeling error. It contains the error caused by the improper selection of the circuit model (i.e., low-order modeling in the Thevenin model) and the improper selection of model parameters (i.e., parameters identification bias). According to (6), V out,k−1 and V out,k at time t k−1 and t k can be expressed as where V ε,k−1 and V ε,k represent the modeling errors at time t k−1 and t k , respectively. According to (2) and (7), the relationship between V out,k−1 and V out,k can be established as Let , then equation (8) can be simplified as Therefore, a new state equation for SOC estimation is obtained as A new measurement equation is obtained as where, (12), as shown at the bottom of the page. In the above equations, w 1,k−1 , w 2,k−1 , and v k are independent white Gaussian random noises with variances of Q 1,k−1 , Q 2,k−1 , and R k , respectively. δ k−1 (b k−1 ) is a systematic error term with an unknown value. It is caused by the improper selection of the circuit model form and parameters.
Either the modeling error is caused by the improper selection of the circuit model or model parameters, it can be described by the unknown term of δ k−1 (b k−1 ). Therefore, the state-space equation consisting of (9)-(12) is more appropriate and accurate than that consisting of (4)- (5). However, owing to the existing unknown term in (9), traditional Kalman filters cannot realize recursive estimation of SOC. To solve this problem, the next section will introduce a SC-UKF algorithm.
Besides, the SOC-OCV curve and model parameters in this section are the same as those in (4)- (5). The specific identification process will not be repeated here.
In addition, it is worth noting that although the state-space equations of (4)-(5) and (9)- (12) are different in form, they can obtain the same SOC estimation results when δ k−1 = 0.

III. SOC ESTIMATION METHOD WITH SC-UKF ALGORITHM
After establishing the state-space equation and identifying model parameters, online estimation of SOC can be realized based on the monitored current and voltage signal and filter algorithms. For the traditional method not considering modeling error, the state-space equation does not contain unknown systematical error term. Thus, SOC can be estimated recursively by UKF. For the state-space equation containing an unknown systematical error term, the SC-UKF algorithm is further provided for SOC estimation in this section. The main procedure of SOC estimation is illustrated in Fig.2, and the specific filtering steps are as follows. (1) Step 1: filter initialization When k = 0, the initial state estimatex 0 = soc 0Vout,0 T and corresponding covariance matrix P 0 are set as where E (·) is the mathematical expectation symbol. If the battery has sufficiently rested,V out,0 and the corresponding variance term should be taken as zero. Otherwise, soc 0 should be the latest estimate value, and its variance term should be taken as zero. (2) Step 2: self-calibration of unknown systematic error term The unknown term of δ k−1 (b k−1 ) in (10) should be estimated before the k th filtering.
During the battery's charging and discharging, the monitoring frequency of current and voltage is high, i.e., the monitoring interval t is short. Therefore, the unknown term does not change greatly during the two adjacent filtering VOLUME 11, 2023 processes, and the vertical connection of the systematic error terms can be established as [42], [43] In addition, according to (10), the horizontal relationship between the systematic error term and the state variable can be established as Based on (14)- (15), the initial self-calibration estimatê b The corresponding initial self-calibration estimate for δ k−1 iŝ δ Step 3: self-recognition of unknown systematic error term In the filtering,δ k−1 may be caused by systematic error or random noise. When the state-space equation does not contain systematic error (i.e., δ k−1 = 0) andδ (0) k−1 ̸ = 0 is treated as the estimate of δ k−1 , an additional error will be introduced to the accurate equation, then reducing the filtering accuracy. Thus, it is necessary to judge whether systematic error exists. Therefore, the final estimate of δ k−1 can be obtained aŝ where c ≥ 0 is the effect tuning parameter of random noise generally with a value of 3 and can be properly adjusted by the filtering accuracy.δ k−1 = 0 means thatδ (0) k−1 is mainly caused by random noise;δ k−1 =δ (4) Step 4: state prediction When k ≤ 2, the k th state is predicted as When k ≥ 3 In the above equations,x k/k−1 is the predicted value of x k , and P k/k−1 is its covariance matrix. (5) Step 5: measurement prediction The k th measurement (i.e., battery's terminal voltage) is predicted as where χ k/k−1,i is the sigma sampling point of x k/k−1 ; w i M and w i C are the mean weight coefficient and covariance weight coefficient of the sampling point, respectively. They satisfy where λ = α 2 (m + κ) − m is a scale parameter; κ and α are tuning parameters, κ = 0 and α = 1 in this paper; β is also a tuning parameter, β = 2 in this paper for Gaussian noise. The meaning and values of the above parameters are consistent with those in the UKF algorithm. (6) Step 6: final state estimation When the latest measurement V k is available, the final state estimation is obtained as wherex k is the state estimation of x k ; P k is the covariance matrix of the state estimation; K k is the filter gain matrix, determined by the principle of minimum matrix trace of tr (P k ). It is expressed as where P xV is the covariance matrix between the predicted statex k/k−1 and the predicted measurementV k . Let k = k + 1 and repeat steps 2-6, then the recursive estimation of SOC can be realized. 37698 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply. Y. Fu, H. Fu: Self-Calibration SOC Estimation Method for Lithium-Ion Battery

IV. RESULT ANALYSIS
The proposed method is validated against the public dataset of the A123 lithium-ion battery from the Center for Advanced Life Cycle Engineering, University of Maryland [13], [46]. The model parameters identification and SOC estimation verification results are introduced below.

A. TEST INTRODUCTION AND MODEL PARAMETERS IDENTIFICATION
In the public dataset, the test sample is a 18650 cell with positive electrode material of LiFePO4. Its key specifications are shown in Table 1. The battery's capacities at different temperatures are obtained by coulomb counting in low-current tests. They are listed in Table 2. The battery's SOC-OCV curves are also obtained in lowcurrent tests at different ambient temperatures. They are plotted in Fig.3. In the figure, the vertical axis represents the average value of the charge-discharge equilibrium potential with different SOCs.
In addition, the battery's model parameters in the Thevenin model are identified by DST condition test data and the LS algorithm in [45]. Identification results are listed in Table 3.

B. COMPARISON AND VERIFICATION OF SOC ESTIMATION ACCURACY
Based on the battery's identified model parameters, this section adopts DST-US06-FUDS condition tests to compare and verify SOC estimation accuracy. In the tests, DST condition discharging, CC-CV (constant current and constant voltage) charging, US06 condition discharging, CC-CV charging, and FUDS condition discharging are performed sequentially on   a fully charged battery. As an example, Fig.4 illustrates the DST-US06-FUDS test results at 0 • C.
In the tests, the battery's SOC is estimated online. Where three estimation methods are compared: • SC-UKF-Thevenin represents the proposed selfcalibration method in this paper, where the state-space equation of (9)-(12) and the SC-UKF algorithm are adopted; • UKF-Thevenin represents the comparison method, where the state-space equation of (4)-(5) and the UKF algorithm are adopted, and the modeling error in the Thevenin model cannot be calibrated; • UKF-DP is another comparison method that adopts the more accurate DP model in Fig.1 and the UKF algorithm.
The state-space equation without systematical error term in UKF-DP method is expressed as [11] where the model parameters R 0 , R 1 , R 2 , C 1 , C 2 under each ambient temperature are identified by DST condition test data and the LS algorithm in [47]. The filtering parameters of the three methods are set as follows: • Set initial state values as soc 0 V out,0 T = 0.7 0 T and corresponding covariance matrix as P 0 = diag (0.1, 0) in SC-UKF-Thevenin method considering long-term rest and initial SOC error; • Set noise covariance matrices as Q k−1 = diag 10 −11 , 10 −10 and R k = 10 −6 in SC-UKF-Thevenin and UKF-Thevenin methods, and Q k−1 = diag 10 −11 , 10 −10 , 10 −10 and R k = 10 −6 in UKF-DP method; • Set the tuning parameter c = 3 in SC-UKF-Thevenin method.
Figs.5-6 illustrate the estimated value and absolute error of SOC, respectively, at 0 • C, 20 • C, and 40 • C. In the figures, the reference SOC is evaluated by the accurate initial value and coulomb counting, where short-term instrument errors are ignored due to high measurement precision in the laboratory. The red, blue, and green lines represent the estimated value (or absolute error) of SOC by SC-UKF-Thevenin, UKF-Thevenin, and UKF-DP methods, respectively. Results indicate that: 1) The SOC estimation accuracy of SC-UKF-Thevenin method is obviously higher than that of the other two methods at 0 • C and 20 • C. It verifies the validity of the proposed self-calibration method. 2) In the low-temperature environment of 0 • C, the SOC estimation error of UKF-Thevenin method is extremely large. It indicates that the Thevenin model might cause a large modeling error at low temperatures. 3) When the self-calibration method is not applied, the DP model might be a better choice than the Thevenin model at 0 • C and 20 • C because of the more accurate estimation in UKF-DP method. 4) The estimation accuracy of the three methods is approximately equivalent at 40 • C. It indicates that the modeling error of the Thevenin model might be small in this case. Remarkably, SC-UKF-Thevenin and UKF-Thevenin methods will achieve the same estimation effect when no systematical error term (caused by modeling error) is recognized. 5) The SOC estimation error of SC-UKF-Thevenin method in the CC-CV charging stage is relatively large. It is caused by the lower monitoring frequency during charging tests. t = 1s in the discharging stage, whereas t = 5s in the charging stage. Fig.7 illustrates the self-calibration valueδ k−1 of the systematic error term δ k−1 in SC-UKF-Thevenin method. The self-calibration value can reflect the size of the modeling error to a certain extent. It can be found that the selfcalibration value at 0 • C is overall larger than the other two temperatures, while the value at 40 • C is about zero. Thus, it further verifies the judgment that the Thevenin model causes a larger modeling error at low temperatures than at high temperatures. Compared with UKF-Thevenin method, SC-UKF-Thevenin method can automatically recognize and calibrate the modeling error. This is why its estimation accuracy is higher than that of UKF-Thevenin method.
Tables 4-5 present the root mean square error (RMSE) of SOC estimation in DST-US06-FUDS tests at eight ambient temperatures. The statistical scope of RMSE involves all the charging and discharging processes in each DST-US06-FUDS test, including a DST condition discharge, a US06 condition discharge, a FUDS condition discharge, and two CC-CV charges.  The SOC estimation accuracy of UKF-Thevenin method is lower than that of the other two methods at each ambient temperature. Compared with UKF-Thevenin method, SC-UKF-Thevenin method reduces the RMSE by 55.35% on average  and 94.17% at most. The only difference between the two methods is whether the modeling error in the Thevenin model is calibrated. Thus, the reduced RMSE can be approximated as caused by the modeling error. At low temperatures such as −10 • C and 0 • C, the RMSE of UKF-Thevenin method is drastically reduced, indicating that the estimation error of UKF-Thevenin method is mainly caused by modeling error rather than random noise. At high temperatures such as 40 • C, the RMSEs of the two methods are similar. It indicates that the estimation error might be mainly caused by random noise from various random factors, while the contribution of modeling error is relatively small.
With a higher-order equivalent model, UKF-DP method achieves a more accurate SOC estimation than UKF-Thevenin method. Despite this, its enhancement effect is not as good as SC-UKF-Thevenin method at −10 • C, 0 • C, 10 • C, 20 • C, and 25 • C. Especially at low temperatures such as −10 • C and 0 • C, the estimation accuracy difference between the two methods is obvious. For example, the RMSE of UKF-DP method at −10 • C is 0.092, whereas the RMSE of SC-UKF-Thevenin method is only 0.021. Moreover, SC-UKF-Thevenin method adopts the simpler Thevenin model. Therefore, SC-UKF-Thevenin method is better than the UKF-DP method in both estimation accuracy and calculation efficiency.
Remarkably, when the ambient temperatures are high, such as 30 • C, 40 • C, and 50 • C, the estimation RMSEs of the three methods are very low (all lower than 0.015). Thus, although the RMSE of SC-UKF-Thevenin method is slightly higher than UKF-DP method (both lower than 0.010), the Thevenin model is more convenient for engineering practice due to the convenient modeling and low computational complexity.
In addition, the SC-UKF-Thevenin method is equivalent to the UKF-Thevenin method in terms of computational complexity. They take 3.63s and 3.54s to complete one DST-US06-FUDS filter calculation on the computer, respectively. Therefore, the proposed method can be conveniently run in the lithium-ion battery's BMS.

C. ESTIMATION RESULTS WITH ADDED NOISE
To further study the effect of random noise on the SOC estimation, Gaussian noise with zero mean and 30mA standard deviation is added to the battery's current test data, while Gaussian noise with zero mean and 30mV standard deviation is added to the battery's voltage test data. It is of practical significance because the instrument accuracy in engineering is lower than in the laboratory.
The SOC estimation results in the DST condition part with added random noise are illustrated in Fig.8. The RMSEs of SC-UKF-Thevenin method with added noise are listed in Table 6, where the statistic scope includes the whole part of a DST-US06-FUDS test. It can be found that the random noise has less influence on SOC estimation. This is because random noises can be reduced in the data fusion of the Kalman filter algorithm. The difference in SOC estimates with and without noise is much smaller than the difference in SOC estimates with and without the self-calibration method. Thus, compared with the random noise, the modeling error has a greater impact on the accuracy of SOC estimation. It further proves the significance of this research.

V. CONCLUSION
This paper proposes a self-calibration method to enhance the accuracy of SOC estimation by reducing modeling errors in the Thevenin model. Specifically, a novel state-space equation with an unknown systematic error term is established, and the corresponding SC-UKF algorithm is developed to realize the recursive estimation for SOC. The method can reduce the effects of both random noise and modeling error, thus improving estimation accuracy.
The method is validated on the public dataset of the A123 battery. Results demonstrate that it enhances SOC estimation accuracy under different temperatures and operating conditions. Compared with the method not calibrating the modeling error in the Thevenin model, the SOC estimation error can be reduced by 55.35% on average and 94.17% at most. Research finds that the Thevenin modeling error might be large at low-temperature such as -10 • C and 0 • C. In this case, the SOC estimation accuracy is greatly improved by the proposed method. In addition, the DP equivalent model is also applied for comparison. Results indicate that it is not better than the proposed method at low temperatures in both estimation accuracy and calculation efficiency, which further proves the effectiveness of the proposed method.
In view of the excellent estimation results at low temperatures, the proposed method might be suitable for the SOC estimation of the battery's BMS in low-temperature scenes, such as the electric vehicle in cold areas and energy storage in deep space exploration, which is challenging in current engineering practice. It will contribute to more efficient battery energy management in above cases. Besides, the battery's charge and discharge environments are more complicated in engineering practice than in the laboratory, such as alternating temperature cycles and battery aging, leading to more systematic errors in the circuit model. At this moment, the effect of the proposed method in eliminating systematic errors and improving SOC estimation accuracy might be more significant. This will be proven and researched in the future.