**1. Introduction**

With the reduction in fossil energy reserves and the intensification of environmental pollution, in order to achieve the goal of "carbon neutralization" and optimize the industrial structure and energy structure, countries all over the world have increased their investment in the new energy industry. Among these new technologies, research on electric vehicles is one of the main directions of study. In many aspects of electric vehicles' battery technology, battery management technology is extremely important. A good battery management system can prevent the battery from overcharging and discharging and realize balanced management. Accurate battery SOC estimation is the basis of battery management system design, but a battery's SOC comprises highly complex nonlinear time-varying characteristics, which are difficult to measure directly. Therefore, it has become the focus of design and research.

At present, SOC estimation methods mainly include the ampere hour integration method, the open circuit voltage method, and machine learning-based algorithms such as the neural network algorithm [1], Kalman filter (KF) and its extension based on parameter estimation model and system identification.

**Citation:** Yuan, H.; Han, Y.; Zhou, Y.; Chen, Z.; Du, J.; Pei, H. State of Charge Dual Estimation of a Li-ion Battery Based on Variable Forgetting Factor Recursive Least Square and Multi-Innovation Unscented Kalman Filter Algorithm. *Energies* **2022**, *12*, 1529. https://doi.org/10.3390/ en15041529

Academic Editor: Carlos Miguel Costa

Received: 4 January 2022 Accepted: 17 February 2022 Published: 18 February 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

The estimation accuracy of the ampere hour integration method mainly depends on the initial SOC value and sensor error accumulation—the initial SOC value is difficult to determine, and the errors will accumulate when the online estimation time is long, resulting in low accuracy. The open circuit voltage method uses the functional mapping relationship between the battery open circuit voltage (OCV) and the SOC to estimate the SOC. The error of this method is large when it is used for real-time estimation, because the determined functional relationship requires the battery to be at rest for a long time. The algorithm based on machine learning needs a large number of labeled sample data. Benchmark SOC, which is necessary for use as labeling data, is difficult to obtain through online metrics [2,3], while the cost of obtaining a large number of labeled data in the experimental environment is high, meaning that the research and applications are limited at present. KF uses the recursive method of "prediction-actual measurement-correction", which is more suitable for the dynamic system state estimation such as battery SOC estimation. By establishing the battery models and estimating the parameters, the prior state probability determined by the system model parameters is updated according to the measured a posteriori state probability. Therefore, it has been widely used and has become the mainstream research direction in the field of SOC estimation in recent years.

The KF algorithm assumes that the system is a linear system, but the SOC estimation of the battery is the state estimation of a typical nonlinear time-varying system, so the KF algorithm will introduce linear errors. To solve this problem, many improved methods have been proposed, mainly extending and expanding within the framework of the KF algorithm. Among them, the extended Kalman filter (EKF) and Unscented Kalman Filter (UKF) are widely used. The EKF linearizes the nonlinear system through Taylor series expansion. After ignoring the second-order and higher-order terms, it is transformed into the KF algorithm. The EKF algorithm involves the heavy calculation workload of the Jacobian matrix and ignores the high-order terms. It is suitable for systems with weak nonlinearity because it is easy to cause filter divergence to systems with strong nonlinear systems in addition to introducing linear errors [4–6]. For a strong nonlinear system, based on the idea that the probability density function distribution of the approximate nonlinear function is easier to obtain than the approximate nonlinear function, the UKF algorithm is proposed. This algorithm analyzes the probability density of the functional relationship in the battery model and obtains the set of sampling points around the estimated value through unscented transformation. The statistical characteristics of the variables to be estimated are approximated by a series of sampling points, which avoids the complex operation of Jacobian matrix and considers the influence of higher-order terms on the matrix [7–9]. Related research shows that the accuracy of the UKF reaches the second-order Taylor series at least and is higher than the approximate linearization of EKF.

At the same time, the KF algorithm framework assumes that the system is a Markov process, and the process has no memory—that is, the state at the current time is only affected by the state at the previous time—and has nothing to do with the state before the previous time—that is, the system is a complete information system at any time—but the battery's nonlinear time-varying characteristics, dynamic environments and working conditions determine that the SOC estimation cannot strictly meet this assumption. In order to further improve the performance of the estimation algorithm and break through the boundary assumptions of the KF framework, the multi-innovation (MI) identification theory is proposed. When the algorithm updates the parameters, the errors of multiple historical moments are introduced, and the performance is further improved [10].

The KF algorithm framework and its extension are based on the battery model to estimate the a priori probability of SOC. The a priori probability determined by the system model parameters is then updated by the measured a posteriori probability. The variation of the battery model's parameters is one of the main characteristics of the nonlinear timevarying characteristics of battery SOC estimation. Therefore, the accurate and real-time identification of model parameters is the key to the success of the algorithm. Most of the early research used the offline parameter identification method. Offline parameter identification refers to identifying the parameters of the battery model in advance in the laboratory. During the operation of the battery, the corresponding model parameters are transferred for SOC estimation according to the dynamic working state or working environment [11,12]. Offline parameter identification struggles to cover all of the dynamic characteristics in different environments and working conditions, such as the changes in temperature, the health condition of the battery and other factors. In order to solve this problem, an online parameter identification method is proposed. This method identifies the parameters of the battery model in real time and synchronously with the SOC online estimation through the online parameter identification algorithm according to the characteristic parameters such as current, voltage and temperature collected by the sensor during the working process of the battery system. Online parameter identification needs to adapt to the changing environment and operating state and has high requirements for real-time performance [13,14]. Generally, the amount of data used is smaller than offline parameter identification, which may result in lower accuracy. However, due to its ability to better adapt to the characteristics of a nonlinear time-varying battery, it has become the mainstream research direction in recent years. Among various online identification algorithms for battery model parameters, recursive least square (RLS) and its extended algorithm have become the mainstream online identification algorithms due to their advantages of small storage space, a small amount of computation and being suitable for real-time control [15]. There is an important forgetting factor parameter in the RLS algorithm, which is used to determine the influence weight of the previous time on the identification result of the current time. The selection of this parameter has a great impact on the convergence speed and accuracy of the battery's parameters. In the early stage, the trial-and-error method was mainly used to obtain a fixed value. Later, the Variable Forgetting Factor RLS (VFFRLS) algorithm was proposed, which associated the forgetting factor with the algorithm estimation error in the current time window and realized the design of the dynamic forgetting factor [16].

At present, extensive and in-depth research on the SOC estimation algorithm and the battery model parameter identification algorithm has been conducted based on KF framework and its extension, but most of the research is focused on one aspect, and there is less research on dual or joint estimation algorithms integrating SOC estimation and parameter identification. Recently, a multi-scale EKF joint estimation SOC algorithm [17] and a UKF and VFFRLS joint estimation algorithm [18] were proposed, but there is no dual or joint estimation method that further integrates MI, UKF and VFFRLS. This paper attempts to integrate advantageous algorithms of MI, UKF and VFFRLS and creatively realize the dual estimation experiment of MIUKF + VFFRLS. The experiment results show that the algorithm has obvious advantages in accuracy and stability compared with offline parameter + EKF, offline parameter + UKF and offline parameter + MIUKF. Compared with UKF + VFFRLS, it has advantages in convergence speed, accuracy and stability. The overall performance of the fused algorithm is outstanding.

#### **2. Battery Model Establishment and Parameter Identification**

#### *2.1. Battery Model Establishment*

There are two kinds of battery models: the electrochemical model and equivalent circuit model. The electrochemical model abstracts the complex physical and chemical reaction process inside the battery to describe the dynamic characteristics of the battery. Due to the fundamental process experiment, the accuracy of the model is high, but the model is complex, and the amount of calculation is large, which is difficult to meet the requirements of real-time tasks. The equivalent circuit model uses circuit elements such as resistance, capacitance and power supply to form a circuit network to describe the dynamic characteristics of the battery. It can clearly reflect the electrical characteristics of the battery, and the model is relatively simple, meaning that it is suitable and widely used for tasks requiring real-time calculation such as SOC.

A common equivalent circuit model is the n\*RC circuit model. The dynamic characteristics of the battery are simulated by N groups of circuits connected in parallel and

then connected in series. It can be divided into zero-order, first-order, second-order and multi-order models according to the number of resistance and capacitor groups. The zero-order equivalent circuit network model is also called the Rint model, which is only composed of a voltage source and a resistor in series. The Rint model can only represent the static process of the battery and cannot describe the dynamic characteristics of the battery. The first-order equivalent circuit network model is also called the Thevenin model [19]. This model consists of a group of capacitors and resistors in a parallel circuit, a voltage source and a resistor which are connected in series. The resistance in series simulates ohmic internal resistance, and the combination of capacitors and resistors in parallel simulates polarization internal resistance. The second-order equivalent circuit network, also known as the DP model [20], is composed of two sets of capacitor resistance parallel circuits, one voltage source and one resistance which are connected in series. The series resistance simulates ohmic internal resistance. The two sets of capacitor resistance parallel circuits are used to describe the short-term electrochemical polarization effect and long-term concentration polarization effect of the battery, respectively, which can describe the dynamic characteristics more accurately.

With the increase in model order, the accuracy of the model will increase, but the complexity of the model will also increase. Considering the balance of accuracy and calculation, the DP model is adopted in this paper, and its circuit structure is shown in Figure 1.

**Figure 1.** DP equivalent circuit model.

It can be seen from the figure that the DP model is composed of a voltage source, ohmic internal resistance and RC networks. *Uocv* is the battery open circuit voltage. *R*<sup>0</sup> is the battery ohmic internal resistance. *U*<sup>t</sup> is the battery terminal voltage. The parallel network constructed by *R*<sup>1</sup> and *C*<sup>1</sup> is used to reflect the gradual change in the battery terminal voltage, and its time constant is relatively large, which is used to describe the long-term concentration polarization effect. The parallel network constructed by *R*<sup>2</sup> and *C*<sup>2</sup> is used to reflect the sudden change in the battery terminal voltage, and its time constant is small, which is used to describe the short-term electrochemical polarization effect.

According to Kirchhoff's law, the output voltage relation of the DP model is as follows:

$$\begin{cases} \mathcal{U}\_t = \mathcal{U}\_{\rm occ} - IR\_0 - \mathcal{U}\_1 - \mathcal{U}\_2 \\ \dot{\mathcal{U}}\_1 = -\frac{1}{C\_1 R\_1} \mathcal{U}\_1 + \frac{1}{C\_1} I \\ \dot{\mathcal{U}}\_2 = -\frac{1}{C\_2 R\_2} \mathcal{U}\_2 + \frac{1}{C\_2} I \end{cases} \tag{1}$$

where . *<sup>U</sup>*<sup>1</sup> and . *U*<sup>2</sup> are the derivatives of *U*<sup>1</sup> and *U*<sup>2</sup> with respect to time, respectively.

#### *2.2. Open Circuit Voltage Parameter Identification of Battery Model*

The open circuit voltage *Uocv* is an ideal power supply in the battery model. It is not affected by the resistance capacitance parameters of the battery. It can be measured by the terminal voltage when the battery discharge current is close to zero, and the internal chemical reaction is stable because when the chemical reaction is stable, the dynamic characteristics of the reaction are close to zero. According to Formula (1), *Uocv* is equal to *Ut*.

There is a relatively stable functional relationship between the open circuit voltage *Uocv* and SOC. The functional relationship between SOC and *Uocv* can be obtained by function fitting (generally polynomial fitting) of SOC and *Uocv* measured at different SOC value points after sufficiently long relaxation.

This functional relationship can be used in battery resistance capacitance parameter identification and SOC estimation.

#### *2.3. Resistance Capacitance Parameter Identification of Battery Mode*

Offline parameter identification and online parameter identification can be adopted in the resistance capacitance parameter identification of the battery model. The principles are to use the resistance capacitance parameters of the battery to fit the terminal voltage curve measured in the dynamic charge and discharge process and to optimize the error between the fitting curve and the measured curve through the adjustment of the resistance capacitance parameters. Offline parameter identification is limited by the experimental conditions and cannot cover all situations such as different temperatures, different charge and discharge currents, etc. A large amount of data can be collected for fitting because the real-time performance is not required in the experimental environment, which generally brings high accuracy under the corresponding experimental conditions but may bring sharply dropping accuracy under different conditions. On the contrary, online parameter identification can be dynamically identified according to the real-time operating conditions, but the real-time requirements limit the data amount for fitting, which generally causes lower accuracy, meaning that proper algorithm design is critical. The online parameter identification method is generally modified and innovated based on the RLS method.

#### 2.3.1. Recursive Least Squares Parameter Identification

The RLS algorithm is developed from the least square (LS) algorithm, and the basic principle is as follows [15].

For discrete linear systems

$$y\_{k+1} = \theta\_k \Phi\_{k+1}^{\theta} + e\_{k+1}^{\theta} \tag{2}$$

where *yk*<sup>+</sup><sup>1</sup> is the output vector of the system, and *θ<sup>k</sup>* is the model parameter vector to be identified; *Φ<sup>θ</sup> <sup>k</sup>*+<sup>1</sup> is the input data matrix of the system, and *<sup>e</sup><sup>θ</sup> <sup>k</sup>*+<sup>1</sup> is the error vector.

The optimal value estimated by minimizing the sum of squares of *e<sup>θ</sup> <sup>k</sup>* errors is the LS algorithm. The resource consumption of the algorithm will continue to rise until the resources are exhausted if all data sequences are used for the estimation of the length of *Φθ <sup>k</sup>*+1. RLS is proposed to solve this problem, in which the identification results of the current time and the system input of the next time are used to recursively obtain the system parameter value of the next time. The specific methods are as follows:

$$\begin{cases} \begin{aligned} K\_{k+1}^{\theta} &= \frac{P\_{k}^{\theta} \Phi\_{k+1}^{\theta}}{\lambda + \left(\Phi\_{k+1}^{\theta}\right)^{T} P\_{k}^{\theta} \Phi\_{k+1}^{\theta}}\\ \theta\_{k+1} &= \theta\_{k} + K\_{k+1}^{\theta} e\_{k+1}^{\theta} \\ P\_{k+1}^{\theta} &= \lambda^{-1} P\_{k}^{\theta} - \lambda^{-1} K\_{k+1}^{\theta} \left(\Phi\_{k+1}^{\theta}\right)^{T} P\_{k}^{\theta} \end{aligned} \end{cases} \tag{3}$$

where *K* is the algorithm gain, and *P* is the error covariance matrix of the identification parameters. The *λ* is the forgetting factor, which represents the forgetting degree to the previous identification result and determines the confidence comparison between the old and new sampling data. Its value range is between 0 and 1. When the forgetting factor is 1, it means that the algorithm has no forgetting function, and all data points are used in parameter identification; then, the RLS algorithm degenerates to the LS algorithm. When the forgetting factor is 0, it means that the algorithm will forget all the previous identification results and only use the data of the current time for parameter identification. The selection of forgetting factor has a great impact on the accuracy of parameter identification results. In the RLS method, the parameter needs to be preset as a fixed value, which has a poor effect in the battery parameter identification with complex working conditions.

2.3.2. Parameter Identification of Variable Forgetting Factor Recursive Least Square Method

The VFFRLS method is an improved algorithm based on the recursive least square method (RLS) used to find the optimal value of the forgetting factor adaptively according to the estimation error in the process of parameter identification [16].

The calculation formula of the variable forgetting factor is as follows.

$$\begin{cases} \mathcal{e}\_{k+1} = \mathcal{y}\_{k+1} - \mathcal{y}\_{k+1} \\ \quad \sum\_{i=1}^{k+1} \mathcal{e}\_i \mathbf{e}\_i^T \\ \quad \lambda (k+1) = -\rho \frac{\sum\_{i=k-S+2}^{i=k} \mathcal{e}\_i}{S} \\ \quad \lambda = \lambda\_{\text{min}} + (\lambda\_{\text{max}} - \lambda\_{\text{min}}) 2^{L(k+1)} \end{cases} \tag{4}$$

where *ek*<sup>+</sup><sup>1</sup> is the estimation error at *k* + 1 time, *λ* is the forgetting factor, and *λ*min and *λ*max are the minimum and maximum forgetting factors, respectively. The larger the *λ* is, the smaller the influence of the system fluctuation on the estimation accuracy of the algorithm; the smaller the *λ* is, the stronger the tracking ability and convergence ability of the algorithm. *ρ* is the sensitivity factor, and *S* is the window size. In this paper, we set the value of *λ*min as 0.9, the value of *λ*max as 0.995 [18], the value of *ρ* as 200, and the value of *S* as 22.
