1 Introduction

Lithium-ion (Li-ion) batteries are widely used in electric vehicles (EVs) and stationary energy storage because of their high charge/discharge efficiency, low self-discharge rate, and long lifespan [1,2,3,4]. To extend the service life of the batteries and ensure their safe operation, a well-designed battery management system (BMS) is required to monitor the state of health (SOH) and state of charge (SOC) [5,6,7,8]. Model-based estimation approaches, such as Kalman filters and particle filters, have been proposed to realize these functionalities. The model-based methods generally require an accurate battery model to ensure their performance [9].

The commonly used battery models include electrochemical models and ECMs. Electrochemical models describe the partial differential equations of the electrochemical reactions inside the battery [10]. As such, great efforts are required in parameterization and dealing with the computational burden. In contrast, ECMs only use resistance and capacitance (RC) elements to express the external characteristics of the batteries, which can balance the contradiction between the modeling accuracy and the complexity [11]. In this way, ECMs are considered more suitable for online state estimation of the batteries in a BMS [12].

The characteristics of the Li-ion battery usually change with external factors such as temperature, current rate, aging, etc. It is easily realized that the RC parameters in the battery ECM vary with those external factors in real applications [13]. Thus, the suitability and accuracy of ECMs for a specific battery are closely related to the parameter identification method. If the parameters of ECM deviate from the reasonable ranges, the performance of the battery model will be questionable [14]. Both offline and online methods can be used for parameter identification of the ECM. Offline parameter identification methods require sufficient laboratorial labor, to collect enough measurement data for parameter extraction [15]. But we cannot test the Li-ion battery covering all its working conditions. Online methods are not highly relying on additional tests, which can identify the parameters of a battery ECM from the current and voltage measurement of the sensors. In this regard, a large amount of online parameter identification methods have been proposed in the literature, which can be briefly divided into nonlinear filter-based methods [16, 17] and least-squares (LS) [9, 18,19,20,21] based methods. Nonlinear filters, such as the Kalman filter [16], H-infinity filter [22], and Particle filter [17], normally need to tune the covariance matrixes for an acceptable accuracy, which are difficult to be adjusted in real-time applications. LS-based methods have the advantages of easy tuning and a lower computational cost [20] and are further investigated in this paper.

RLS is the most widely used method for online parameter identification. Xiong et al. [18] employed the RLS method to track the real-time characteristics of 32 Ah Li-ion batteries. Many efforts have been found to improve the accuracy of RLS. Duong et al. [19] proposed a multiple adaptive forgetting factors based RLS (MAFF-RLS) method to capture the variations and different dynamics of the parameters in ECM. Ouyang et al. [9] used a robust RLS algorithm coping with the outliers of battery measurement.

One drawback of the RLS-based methods is that they are sensitive to measurement noises. Unexpected noises always exist and cannot be eliminated easily, which inevitably leads to biased parameter identification results in practice. As an alternative choice, the total least square (TLS) method can effectively deal with the measurement noises from sensors [23]. Wei et al. [24, 25] have employed an RQ-based RTLS method for the online parameter identification of the ECM, which alleviates the model identification bias caused by noise disturbances. Although the method shows good accuracy and robustness against noise corruption, the convergence speed has not been fairly discussed in their work. Considering the parameters of the battery model change with the battery stats, an ideal parameter identification method should have good accuracy as well as a superior convergence speed.

Regarding convergence speed, RLS updates the parameters along the gradient of the cost function, which has a rather fast convergence rate [26]. Although the RQ-based RTLS method [23] adopts a similar form of the gradient search strategy as RLS, the convergence rate of the RTLS decreases significantly with unknown initial parameter values. It’s worth mentioning that the convergence rate has a great influence on whole system stability [9].

Therefore, RLS converges the parameters quickly with low computational cost, while the identification results are biased with measurement noises. Although RTLS can deal with noise corruption, the convergence speed is slow. In order to cope with the above issues, this paper proposes a novel co-estimation framework, where the RLS is applied to converge the parameter quickly without any prior knowledge of initial values and the RTLS method is further applied to update the converged parameters to deal with the noise disturbances. The simulation and experimental results show the proposed method has good estimation accuracy and robustness under different circumstances.

The key contributions of this paper are in the following aspects.

  1. (1)

    A comprehensive study is constructed to analyze the advantages and deficiencies of RLS and RTLS for online parameter identification.

  2. (2)

    A convergence indicator is synthesized based on the residual errors of parameter identification to determine the convergence of the parameters within a predefined time scale.

  3. (3)

    A novel co-estimation framework is, for the first time, designed for identifying ECM parameters, which effectively deals with the initial value uncertainty and measurement noise.

  4. (4)

    The proposed method is validated under various dynamic driving cycles in both simulation and experimental tests compared with RLS and RTLS.

The remainder of this paper is organized as follows. Section 2 introduces the modeling strategy for the battery. Section 3 compares the performances of RLS and RTLS, and presents the motivation for the proposed co-estimation method. Simulation and experimental results are carried out in Sections 4 and 5, respectively. The main conclusions are given in Section 6.

2 Battery Modeling

Considering a balance of modeling accuracy and simplicity, ECM is preferred and investigated in this paper. Among all the ECMs, the Thevenin model has a relatively simple structure, which can capture the primary dynamics of the battery without taking much computing resources.

As shown in Figure 1, the Thevenin model consists of a series resistor and a parallel RC network. R0 represents the Ohmic resistance, which is used to describe the instantaneous voltage drop when a current excitation is applied to the battery. The RC network aims at describing the dynamic characteristics of the battery, such as kinetic effect and ion diffusing.

Figure 1
figure 1

Circuit diagram of the Thevenin model

The battery open circuit voltage (OCV) Uoc is expressed as

$${U_{{\text{oc}}}}(S)=\sum\limits_{{i=0}}^{m} {{k_i}} {S^i},$$
(1)

where S is the battery SOC; ki (i = 1, 2, …, m) are the polynomial coefficient of the OCV-SOC curve; m is the order of the function.

The terminal voltage and current of the battery are expressed as Ut and It, respectively. Ut represents the voltage of the RC network. The transfer function of the Thevenin model is established as

$$G(s)=\frac{{{U_{OC}}(s) - {U_t}(s)}}{{I_t}(s)}={R_0}+\frac{{R_p}}{1+s{R_p}{C_p}},$$
(2)

where s is the Laplace operator.

By applying the bilinear transform in Eq. (3), the discrete form of the Thevenin model in Eq. (2) can be expressed as Eq. (4).

$$s=\frac{2({z^{-1}} - 1)}{{T_s}({z^{-1}}+1)},$$
(3)
$$G({z^{-1}})=\frac{{b_0}+{b_1}{z^{-1}}}{1+{a_1}{z^{ -1}}},$$
(4)

where z is the discretization operator, a1, b1, and b2 are the coefficients defined as Eq. (5).

$$\left\{ \begin{aligned} {a_1}&=\frac{{{T_s} - 2{R_p}{C_p}}}{{{T_s}+2{R_p}{C_p}}}, \\ {b_0} & = - \frac{{{R_0}{T_s}+{R_p}{T_s}+2{R_p}{C_p}{R_0}}}{{{T_s}+{R_p}{C_p}}}, \\ {b_1} &= - \frac{{{R_0}{T_s}+{R_p}{T_s} - 2{R_p}{C_p}{R_0}}}{{{T_s}+{R_p}{C_p}}}, \\ \end{aligned} \right.$$
(5)

where Ts is the sampling interval.

Applying the linear regression method, Eq. (4) can be rewritten as a linear equation

$${y_k}=\varvec{\theta}_{k}^{{\text{T}}}{{\varvec{x}}_k}.$$
(6)

In Eq. (6), the output yk, the estimated parameters θk, and the input xk at time k are defined as

$$\left\{ \begin{aligned} {y_k}& ={U_{L,k}}, \\ {\varvec{\theta}_k} &={[{b_{0,k}},{b_{1,k}},{a_{1,k}}]^\text{T}}, \\ {{\varvec{x}}_k} & ={[{I_k},{I_{k - 1}},{U_{L,k - 1}}]^\text{T}}. \\ \end{aligned} \right.$$
(7)

Once θk is obtained, the parameters of the Thevenin model can be deduced as

$$\left\{ \begin{aligned} {R_{0,k}} & =\frac{{{b_{2,k}} - {b_{1,k}}}}{{1 - {a_{1,k}}}}, \\ {R_{p,k}} & =\frac{{2({a_{1,k}}{b_{1,k}} - {b_{2,k}})}}{{1 - a_{{1,k}}^{2}}}, \\ {C_{p,k}} & =\frac{{{T_s}{{(1 - a_{{1,k}}^{2})}^2}}}{{4({a_{1,k}}{b_{1,k}} - {b_{2,k}})}}. \\ \end{aligned} \right.$$
(8)

3 Online Parameter Identification

3.1 Least Squares

LS performs the parameter identification by minimizing the squares of the errors between the terminal voltage and the output of the battery model [27]. As shown in Figure 2, LS assumes that the measured output \(\tilde {y}\) is noisy while the input x is accurate.

Figure 2
figure 2

The principle of the LS method

For LS, the parameter vector θk can be solved by minimizing the cost function as

$$J({\varvec{\theta}_k})=\sum\limits_{{i=1}}^{k} {{{[\Delta {y_i}]}^2}} = \sum\limits_{{i=1}}^{k} {{{[{{\tilde {y}}_i} - \varvec{\theta}_{k}^{{\text{T}}}{{\varvec{x}}_i}]}^2}} ,$$
(9)

where \(\Delta {y_i}\) is the measurement error, \({\tilde {y}_i}\) is the noisy output. It can be defined that the gradient of the cost function \(J({\varvec{\theta}_k})\) is equal to zero

$$\partial J({\varvec{\theta}_k})/\partial {\varvec{\theta}_k}=0.$$
(10)

Then, the analytical solution of the parameter vector θk can be obtained as

$${\varvec{\theta}_k}={({\varvec{X}}_{k}^{{\text{T}}}{{\varvec{X}}_k})^{-1}}{\varvec{X}}_{k}^{{\text{T}}}{{\varvec{Y}}_k},$$
(11)

where \({{\varvec{X}}_k}={[{{\varvec{x}}_1},{{\varvec{x}}_2},\ldots,{{\varvec{x}}_k}]^{\text{T}}}\)\({{\varvec{Y}}_k}={[{y_1},{y_2},\ldots,{y_k}]^{\text{T}}}\).

The recursive form of the LS can be further expressed as

$$\left\{ \begin{aligned} {{\varvec{K}}_k} & ={{\varvec{P}}_{k - 1}}{{\varvec{x}}_k}/{{({\lambda}}}+{\varvec{x}}_{k}^{{\text{T}}}{{\varvec{P}}_{k - 1}}{{\varvec{x}}_k}), \\ {e_k} & ={y_k} - {\varvec{x}}_{k}^{{\text{T}}}{{\hat {\varvec{\theta}}}_{k - 1}}, \\ {\varvec{\theta}_k} & = {\varvec{\theta}_{k - 1}}+{{\varvec{K}}_k}{e_k},\\ {{\varvec{P}}_k} &=({\varvec{I}} - {{\varvec{K}}_k}{\varvec{x}}_{k}^{{\text{T}}}){{\varvec{P}}_{k - 1}}/{{\lambda},} \end{aligned} \right.$$
(12)

where Kk denotes the gain matrix; Pk is the covariance matrix; \({e_k}\) is the residual error, and λ (0.95 < λ < 1) is a user-defined forgetting factor.

It should be noted that LS has not considered the errors from the input x. Thus, the estimation results are easily biased owing to the noise corruption.

3.2 Total Least Squares

Different from LS, TLS assumes that both output \(\tilde {y}\) and input \(\tilde {x}\) are noisy. As we can see from Figure 3, TLS employs the orthogonal regression to minimize the sum of the squared orthogonal distances from the sampling points to the fitting line.

Figure 3
figure 3

The principle of the TLS method

Similarly, TLS solves the parameter vector θk by minimizing the cost function as

$$J({\varvec{\theta}_k})=\left\|[\Delta {{\varvec{X}}_k},\; \Delta {{\varvec{Y}}_k}]\right\|_{\text{F}},$$
(13)

where \(\Delta {{\varvec{X}}_k}={[\Delta {{\varvec{x}}_1},\Delta {{\varvec{x}}_2},\ldots,\Delta {{\varvec{x}}_k}]^\text{T}}\)\(\Delta {{\varvec{Y}}_k}={[\Delta {y_1},\Delta {y_2},\ldots,\Delta {y_k}]^\text{T}}\).

The recursive form of the TLS is expressed as

$${\varvec{\theta}_k}={\varvec{\theta}_{k - 1}}+{\alpha _k}{\tilde {{\varvec{x}}}_k},$$
(14)

where the gain factor \({\alpha _k}\) is obtained by using the gradient search approach in Ref. [24].

$$\partial J({\varvec{\theta}_{k - 1}}+{\alpha _k}{\tilde {{\varvec{x}}}_k})/\partial {\alpha _k}=0,$$
(15)

where \({\tilde {{\varvec{x}}}_k}\) is the noisy input vector.

As shown in Eq. (14), RTLS updates the parameters along the direction of \({\tilde {{\varvec{x}}}_k}\) rather than the gradient of the cost function. Only one gain factor \({\alpha _k}\) can be obtained at each iteration, which largely limits the convergence rate when multiple parameters are needed to be identified.

3.3 A Comparison Between RLS and RTLS

A comparative study is carried out in this subsection to evaluate the performances of RLS and RTLS for online parameter identification.

Figure 4
figure 4

Performance comparison between RLS and RTLS

As shown in Figure 4, RLS and RTLS have some merits in a specific area. On one hand, RTLS takes into account the disturbances from both the input and output, which has a better performance in dealing with noise interferences. On the other hand, RLS updates the parameters along the gradient of the cost function, which owns a very fast computing speed and a higher convergence rate.

However, RLS is biased with measurement noises, while RTLS converges slowly with initial value uncertainty. Therefore, to design a superior approach to dealing with the above issues, this paper integrates the RLS and RTLS for better parameter identification of the ECM.

3.4 The Proposed Co-estimation Method

This work proposes a co-estimation algorithm for superior performances of online parameter identification, which has fast convergence speed and robustness against noise corruption. Meanwhile, the proposed method does not require much computational effort and is suitable for online implementation. The flowchart of the proposed method is as follows.

The variables in Figure 5 are described as follows: (i) ei (i = k − TL, k − TL +1, ..., k) is the residual error of the parameter identification, (ii) e0 is set as a threshold to decide the convergence of the parameters, (iii) Tl is the time scale for determining the convergence of the parameters, (iv) \({E_k}\) is designed as a convergence indicator, which is expressed as the root mean square error (RMSE) of ei,

$${E_k}=\sqrt {\frac{1}{{{T_l}}}\sum\limits_{{i=k - {T_l}}}^{k} {e_{i}^{2}} } .$$
(16)
Figure 5
figure 5

Flowchart of the proposed parameter identification method

The strategy of the proposed co-estimation method can be summarized in the following three parts.

  • Part I. Given the initial parameter values are unavailable, \({\varvec{\theta}_k}\) is randomly initialized and updated by RLS using Eq. (12) until the parameters are converged to their references.

  • Part II. To determine whether the parameters have converged, \({E_k}\) is calculated using Eq. (16) once l reaches TL.

  • Part III. When \({E_k}\) is less than the pre-set threshold e0, the flag is set to 1, indicating that convergence has been completed. The parameters are updated by RTLS using Eq. (14) and Eq. (15) afterwards.

It can be seen that the proposed co-estimation method combines the merits of RLS and RTLS. RLS can converge to the reference values of the parameters quickly without any prior knowledge of initial values, while RTLS has good accuracy and robustness against the noise disturbances, which can be applied to update the already converged parameters.

4 Simulation Validation

A simulated battery model is used in this section to verify the performance of the proposed co-estimation method. The simulation is carried out on the software of MATLAB R2020a. It is noteworthy that the Ohmic resistance R0 is stable during the discharging process while Rp and Cp tend to vary with SOC and current rate [28]. Therefore, the model parameter R0 is defined as a constant, while that of Rp and Cp are time-varying. The OCV is obtained by the OCV-SOC relationship as in Eq. (1). The sampling frequency of voltage and current is set to 1 Hz.

The urban dynamometer driving schedule (UDDS) is applied to the simulated battery model. The voltage and current profiles are shown in Figure 6.

Figure 6
figure 6

Voltage and current profiles in the simulation test: (a) voltage, (b) current

The unknown initial values of the model parameters are randomly initialized as R0 = 20 mΩ, Rp = 20 mΩ, Cp = 1000 F. Besides, TL and e0 in the proposed method are initialized as 100 s and 3 mV, respectively. To verify the performance of the proposed method with noise interference, white Gaussian noises are randomly added to the voltage and current measurements. The standard deviations (SDs) σv and σi are set to 4 mV and 4 mA in this validation.

As shown in Figure 7, the estimation of R0 is not sensitive to the measurement noises, where the estimated values are close to the true values for all three methods. Regarding Rp and Cp, the estimated values of RLS are biased from the true values owing to the noise disturbances. As for RTLS, it takes a long time for the parameters to converge, which greatly enlarges the estimation error of the model.

Figure 7
figure 7

Simulation results of the model parameters: (aR0, (bRp, (cCp, (dEk

It can be seen from Figure 7(d), the proposed method has the same convergence speed as RLS. Once Ek is less than e0, the converged parameters are further updated by RTLS in dealing with noise interferences. Thanks to the well-designed parameter updates mechanism, the proposed method shows good estimation accuracy and robustness, where the estimated values can well track the true values almost all the time.

To quantitively evaluate the estimation accuracy of the model parameters, the mean square deviation (MSD) is selected as

$${\text{MSD}}=10{\log _{10}}(E[\left\| {{{\varvec{e}}_k}} \right\|_{2}^{2}]),$$
(17)

where ek is the normalized error expressed as

$${{\varvec{e}}_k}=\left[ {\frac{\Delta {R_{0,k}}}{{R_{0,k}}},\frac{\Delta {R_{p,k}}}{{R_{p,k}}},\frac{\Delta {C_{p,k}}}{C_{p,k}}} \right],$$
(18)

where ΔR0,k, ΔRp,k, and ΔCp,k are the errors between the estimated parameters and the true values at the time step k. The average MSDs of all three methods are presented in Table 1.

Table 1 Average MSDs of different methods

It can be seen that the average MSD of the proposed method is merely − 17.07 dB, which represents a higher accuracy of parameter identification under noise interference and initial value uncertainty. The above results coincide with the theoretical analysis in Section 4, the effectiveness of the proposed method is then proved by a battery simulation model.

5 Experimental Validation

Experimental tests are carried out on a LiFePO4 battery to validate the proposed method in this subsection. The specifications of the battery are listed in Table 2. In Figure 8, the battery test platform consists of a thermal chamber to control the ambient temperature, a Chroma 17011 test station to charge and discharge the battery, a host computer to program the experiment procedure and store the measurement data. The sampling frequency is set to 1 Hz.

Table 2 Specifications of the LiFePO4 battery
Figure 8
figure 8

Experimental platform for the battery test

We have tested Cell A under the UDDS, while the ambient temperature is set to 25 °C during the test. The OCV-SOC polynomial coefficients of Cell A are listed in Table 3. To verify the proposed method under noise corruption, white Gaussian noises with variances of \({{\upsigma}}_{v}^{2}\) = 8 mV2, \({{\upsigma}}_{i}^{2}\) = 8 mA2 are randomly added to the voltage and current measurements. As the initial values of the parameters are unknown, they are randomly initialized as R0 = 15 mΩ, Rp = 35 mΩ, Cp = 400 F. TL and e0 are set as 100 s and 3 mV, which are the same as the simulation test.

Table 3 Polynomial coefficients of the OCV-SOC function

The parameter identification results of Cell A are presented in Figure 9. Similar to the simulation, the noise effect degrades the estimation accuracy of RLS, where the modeling error is larger than the other two methods. Although the RTLS can deal with the disturbances from measurement noises, the modeling error is still large before the parameters can converge to the references. As expected, the proposed method can alleviate the above issues and maintain a stable performance during the whole driving cycle. The mean absolute error (MAE) and RMSE of the proposed method are only 1.26 mV and 2.26 mV.

Figure 9
figure 9

Experimental results of the parameter identification under the UDDS driving cycles (25 °C): (aR0, (bRp, (cCp, (dEk, (e) Modeling error

To further prove the feasibility of the proposed method under different circumstances, the experimental tests are carried out on Cell B under different driving cycles, new European driving cycle (NEDC) and federal test procedure (FTP). The ambient temperature is set to 10 °C during the tests. According to the experimental results presented in Figure 10, the RLS method converges quickly yet with the drawback of being sensitive to noise disturbances. The RTLS method suffers from slow converging speed. Consequently, the accuracy of these methods is inferior to the proposed co-estimation method.

Figure 10
figure 10

Experimental results of the parameter identification under different circumstances: (a) NEDC (10 °C), (b) FTP (10 °C)

As shown in Table 4, the MAE and RMSE of the proposed method are much lower than the commonly used RLS and RTLS methods. The average RMSE of the proposed method is around 77% of the RLS and 80% of the RTLS, and the average MAE of the proposed method is less than 32% of the RLS and 13% of the RTLS. The advantages of the proposed method are thus proved by experimental validation.

Table 4 MAE and RMSE of modeling error

6 Conclusions

The traditional RLS method is biased with the measurement noises from sensors, which degrades the parameter identification accuracy. RTLS method can alleviate the noise disturbances, while the parameters converge slowly with initial value uncertainty. In this regard, we have proposed a co-estimation method, which integrates the RLS and RTLS for parameter identification. Without any prior knowledge, RLS can identify the parameters with a fast convergence rate. Once the parameters have converged, RTLS is applied to keep updating the parameters in dealing with the noise effect.

Both simulation and experimental tests have verified the validity of the proposed method. The average MSD of the proposed method is merely − 17.07 dB in the simulation test. The MAE and RMSE of the modeling error are only 1.26 mV and 2.26 mV in the experimental test. Future works focus on using the identified parameters for battery SOC and SOH estimation.