Open Access
This article is

- freely available
- re-usable

*Appl. Sci.*
**2019**,
*9*(9),
1726;
https://doi.org/10.3390/app9091726

Article

Adaptive Dual Extended Kalman Filter Based on Variational Bayesian Approximation for Joint Estimation of Lithium-Ion Battery State of Charge and Model Parameters

^{1}

School of Electronic and Information, Northwestern Polytechnical University, Xi’an 710072, China

^{2}

System Engineering Research Institute of CSSC, Beijing 100094, China

*

Correspondence: [email protected]

^{†}

Current address: No. 127, Youyi West Road, Xi’an 710072, China.

Received: 4 April 2019 / Accepted: 23 April 2019 / Published: 26 April 2019

## Abstract

**:**

An accurate state of charge (SOC) estimation is vital for the safe operation and efficient management of lithium-ion batteries. At present, the extended Kalman filter (EKF) can accurately estimate the SOC under the condition of a precise battery model and deterministic noise statistics. However, in practical applications, the battery characteristics change with different operating conditions and the measurement noise statistics may vary with time, resulting in nonoptimal and even unreliable estimation of SOC by EKF. To improve the SOC estimation accuracy under uncertain measurement noise statistics, a variational Bayesian approximation-based adaptive dual extended Kalman filter (VB-ADEKF) is proposed in this paper. The variational Bayesian inference is integrated with the dual EKF (DEKF) to jointly estimate the lithium-ion battery parameters and SOC. Meanwhile, the measurement noise variances are simultaneously estimated in the SOC estimation process to compensate for the model uncertainties, so that the adaptability of the proposed algorithm to dynamic changes in battery characteristics is greatly improved. A constant current discharge test, a pulse current discharge test, and an urban dynamometer driving schedule (UDDS) test are performed to verify the effectiveness and superiority of the proposed algorithm by comparison with the DEKF algorithm. The experimental results show that the proposed VB-ADEKF algorithm outperforms the traditional DEKF algorithm in terms of SOC estimation accuracy, convergence rate, and robustness.

Keywords:

state of charge (SOC); joint estimation; lithium-ion battery; variational Bayesian approximation; dual extended Kalman filter (DEKF); measurement statistic uncertainty## 1. Introduction

Electric vehicles (EVs) are believed worldwide to be one of the most important development directions in the vehicle industry because of their advantages in low pollution and energy saving. Lithium-ion batteries, by virtue of their high energy and power density, are the fundamental power source of EVs [1]. Nevertheless, lithium-ion batteries have hidden dangers in safety. Once over-charged or over-discharged, the battery capacity will drop, leading to reduced lifetime or damage, or even explosion. Moreover, the battery characteristics change with different operating conditions. Therefore, to ensure the safety, reliability, and efficiency of the battery system, a battery management system (BMS) is developed and utilised. The BMS is used to control and monitor the battery operating conditions to guarantee the safe operation and longevity of the battery.

The state of charge (SOC) is a significant parameter which indicates the amount of remaining energy in the battery for further service. It needs to be estimated accurately online in order to prevent any over-charge and over-discharge, while providing the information and support for the effective and flexible operation of the vehicle. However, it is difficult to acquire precise SOC estimates since the battery itself is a highly nonlinear system and has a lot of uncertainties.

Extensive studies have been made into SOC estimation. Hannan et al. [2] gave a comprehensive review of these research fruits. Overall, these methods can be mainly classified into four categories: (1) the open-circuit voltage (OCV) method; (2) current integration or coulomb counting (CC) method; (3) data-driven methods; and (4) model-based methods.

The OCV method is based on the one-to-one corresponding relationship of open-circuit voltage and SOC. It is simple but susceptible to temperature, battery aging, and other factors, and the acquisition of accurate measurement of OCV needs lots of rest time, making it almost impossible for moving vehicles. The CC method is widely used in many applications, but it has two weak points. First, its estimation accuracy is strongly dependent on the correctness of the initial SOC value, and second, it can easily diverge due to error accumulation in the current measurement.

The data-driven methods include neural network (NN) algorithms [3,4,5], fuzzy logic (FL) algorithms [6,7,8], support vector machines (SVMs) [9,10,11], and so on. For instance, He et al. [3] employed a multilayer feedforward neural network to estimate the SOC of Lithium-ion batteries by use of the discharge current, terminal voltage, and temperature of the battery as input. Zhao et al. [4] combined a back propagation neural network and adaptive Kalman filter to estimate the SOC, and used a forgetting-factor recursive least-squares (FFRLS) algorithm to identify the time-varying battery model parameter. In [6], a fuzzy logic algorithm was applied to estimate SOC of lithium-ion batteries for the application of a portable defibrillator. AC impedance and voltage recovery measurements were used as the input parameters for the FL model. In [7], a more advanced algorithm named adaptive neuro-fuzzy inference system (ANFIS) was developed to estimate SOC. In addition, Hu et al. [9] proposed an SOC estimation based on an optimized support vector machine for regression with double search optimization process. In [10], an SOC estimation method based on fuzzy least-squares SVM was proposed. These data-driven algorithms do not need to know any battery characteristics and have a good ability of nonlinear mapping and self-learning. However, they require a large amount of experimental data to train the intelligent model beforehand. Different types of training data and training methods exert a great influence on the model error. When the training data cannot cover all the operating conditions, for example, the experiments are incomplete or the battery characteristics have changed, the SOC estimation accuracy will decrease.

The model-based methods are dominated by Kalman filter and its derivatives. Chen et al. [12] used an extended Kalman filter (EKF) along with a nonlinear battery model to estimate the SOC of the lithium-ion battery. In order to further improve the accuracy, adaptive extended Kalman filter (AEKF), unscented Kalman filter (UKF), and adaptive unscented Kalman filter (AUKF) are proposed. He et al. [13] identified the parameters of an improved Thevenin battery model using EKF, and then adopted an AEKF for obtaining correct and robust SOC of the lithium-ion batteries. In [14], a UKF-based method was used to self-adjust the model parameters and provide state of charge estimation of the battery. References [15,16] adopted AUKF to realize SOC estimation. In addition, an adaptive cubature Kalman filter (CKF) was proposed in [17] to improve the convergence rate and SOC estimation accuracy. To overcome the accuracy degradation caused by non-Gaussian noise, particle filters were utilized to estimate the SOC of batteries in [18,19]. To compensate for the time-variability of battery parameters due to variational operating conditions and battery aging, a dual EKF and a dual UKF were employed in [20,21] for simultaneous SOC and parameters estimation, respectively. The model-based methods eliminate the need for correct initial SOC values and accurate measurement, which are requisite for the CC method, and have no demand for a large amount of train data, so it is widely applied and is studied extensively. However, the estimation accuracy is strongly affected by the battery model and parameters. Once there is a model mismatch, the estimation performance will rapidly decline.

In practical applications, the battery model parameters will change with SOC, temperature, and the degree of battery aging. Moreover, the statistic information of the process noise and sensor noise may be unknown or time-varying. Under these situations, the traditional KF-based methods will have low estimation accuracy and poor robustness. To address this issue, some researchers [22,23,24] resort to a H∞ filter, which takes the time-varying battery parameter into account and has no need to know the statistics of the process noise and the measurement noise. It has strong robustness under uncertain conditions. However, the H∞ filter is a tradeoff between robustness and accuracy, so the SOC estimation accuracy is sacrificed to some extent for the robustness. Liu et al. [25] combined the idea of square root filter and adaptive unscented Kalman filter (ASRUKF) algorithm based on improved Sage-Husa estimation to estimate the SOC of a lithium-ion battery. This method adaptively adjusted the values of the process and measurement covariances in the estimation process to improve the accuracy of SOC estimation. However, it does not consider the uncertainties brought by varying battery model parameters. EI Din et al. [26] proposed a multiple-model EKF (MM-EKF) and an autocovariance least squares (ALS) method for estimating the SOC of lithium-ion battery cells. MM-EKF reduced the dependence of the EKF algorithm on the correct assumptions of the measurement noise statistics by weighted summation of the estimates of multiple hypothesized EKFs. The ALS method extracted the possible correlation in the innovation sequence to estimate the measurement noise covariance. However, both methods leave out consideration of the time-varying battery parameters. Furthermore, the computation load is larger compared with the conventional EKF algorithm.

In fact, the Bayesian approach is the most general approach of solving the problem with uncertain parameters. But it is hard to get the analytical solution for most Bayesian approaches due to complex probability density function or high dimension of integration. Recently, the variational Bayesian (VB) inference method [27,28,29,30,31] has drawn extensive attentions, which utilizes a new simpler, analytically tractable distribution to approximate the true posterior distribution so as to avoid the direct complex calculation of multi-dimensional probability density function. Sarkka et al. [27] adopted the VB method for joint recursive estimation of the dynamic state and the time-varying measurement noise parameters in linear state space models. Li et al. [28] employed VB approximation for the unscented Kalman filter to estimate the time-varying measurement noise covariance so as to improve algorithm adaptability. Sun et al. [29] proposed a VB method to estimate the system states with unknown inputs. Hou et al. [30] combined the VB method with the shifted Rayleigh filter to jointly estimate the target position and the clutter probability so that improving the performance of bearings-only target tracking. In [31], the VB approach was applied to estimate the ARX model parameters along with time delays.

In this paper, we combine the idea of variational Bayesian inference with the dual EKF algorithm (VB-ADEKF) to jointly estimate the battery parameters and SOC of lithium-ion batteries of electric vehicles. Meanwhile, the measurement noise variances are simultaneously estimated with the state estimation to account for the battery model uncertainties and measurement uncertainties, minimizing the impact of model mismatch. The effectiveness of the proposed algorithm has been verified through experiments under different operating conditions. The results show that the proposed VB-ADEKF algorithm outperforms the dual EKF algorithm in terms of SOC estimation accuracy, convergence rate, and robustness. The mean SOC estimation error of VB-ADEKF is under $1\%$ for most of the time.

The remainder of this paper is organized as follows: Section 2 describes the battery model, the definition of SOC and establishes the state space models for SOC estimation and battery parameter estimation. Section 3 illustrates the variational Bayesian approximation-based adaptive Kalman filter and Section 4 presents the proposed variational Bayesian approximation-based adaptive dual extended Kalman filter. The experimental verification and analysis are presented in Section 5. Finally, Section 6 provides a conclusion.

## 2. Battery Modeling

#### 2.1. Battery Model

For the accurate estimation of SOC, a reliable battery model is required. Considering the model accuracy, the structure complexity, and the computation time, the first order resistor–capacitor (RC) model as shown in Figure 1 is adopted to model the lithium-ion battery.

The electrical behavior of the model can be written as follows:
where ${U}_{t}$ denotes the terminal voltage of the battery, ${U}_{oc}$ is the open-circuit voltage, ${U}_{1}$ is the polarization voltage of the RC network, ${I}_{L}$ is the load current, ${R}_{0}$ represents the ohmic internal resistance, and ${R}_{1}$ and ${C}_{1}$ represent the polarization resistance and polarization capacitance, respectively.

$$\begin{array}{cc}\hfill {U}_{t}& ={U}_{oc}-{U}_{1}-{I}_{L}{R}_{0}\hfill \end{array}$$

$$\begin{array}{cc}\hfill {\dot{U}}_{1}& =\frac{{I}_{L}}{{C}_{1}}-\frac{{U}_{1}}{{R}_{1}{C}_{1}}\hfill \end{array}$$

The nonlinear relationship between the open-circuit voltage and the SOC is described using the fifth-order polynomial model as:
where ${k}_{0}$, ${k}_{1}$, ${k}_{2}$, ${k}_{3}$, ${k}_{4}$, ${k}_{5}$ are the parameters to be identified.

$${U}_{oc}\left(SOC\right)={k}_{0}+{k}_{1}SOC+{k}_{2}SO{C}^{2}+{k}_{3}SO{C}^{3}+{k}_{4}SO{C}^{4}+{k}_{5}SO{C}^{5}$$

#### 2.2. Definition of State of Charge

The state of charge (SOC) is defined as the ratio of the remaining capacity in a battery over the rated battery capacity. Using the CC method, the battery SOC can be calculated as follows:
where ${\eta}_{c}$ is the coulomb efficiency, ${I}_{L,t}$ is the load current at time t. ${Q}_{rate}$ is the rated capacity of the battery.

$$SO{C}_{t}=SO{C}_{{t}_{0}}-\frac{1}{{Q}_{rate}}{\int}_{{t}_{0}}^{t}{\eta}_{c}{I}_{L,t}dt$$

#### 2.3. State-Space Model

#### 2.3.1. State Space Model for SOC Estimation

Taking $X={[SOC,{U}_{1}]}^{T}$ as the state vector, the load current ${I}_{L}$ as the input and the terminal voltage ${U}_{t}$ as the output, we can obtain the discrete state-space model as
where ${\theta}_{k}={[{R}_{0},{R}_{1},{\tau}_{1}]}^{\mathrm{T}}$ represents the time-varying battery model parameter vector; ${\tau}_{1}={R}_{1}{C}_{1}$ is the time constant of the RC network; ${w}_{k}\sim \mathcal{N}(0,{Q}_{k}^{x})$ is the Gaussian process noise with covariance ${Q}_{k}^{x}$; ${v}_{k}\sim \mathcal{N}(0,{\Sigma}_{k}^{x})$ is the measurement noise with variance ${\Sigma}_{k}^{x}$. The initial state has a Gaussian prior distribution ${X}_{0}\sim \mathcal{N}({\widehat{X}}_{0},{P}_{0})$. The state prior and process noise are assumed to be known, while the measurement noise variance ${\Sigma}_{k}^{x}$ is assumed to be unknown. In addition, the process noise, measurement noise, and initial state value are independent of each other.

$$\begin{array}{c}\hfill \left\{\begin{array}{c}{X}_{k+1}=f({X}_{k},{I}_{L,k},{\theta}_{k})+{w}_{k}\hfill \\ {y}_{k}={U}_{t,k}=h({X}_{k},{I}_{L,k},{\theta}_{k})+{v}_{k}\hfill \end{array}\right.\end{array}$$

$f(\xb7)$ and $h(\xb7)$ represent the nonlinear functions of state vector ${X}_{k}$, input ${I}_{L,k}$, and battery model parameter vector ${\theta}_{k}$. Their mathematical expressions are
where $\Delta t$ is the sampling interval of the current.

$$\begin{array}{c}\hfill f(\xb7)=\left[\begin{array}{cc}1& 0\\ 0& {e}^{-\frac{\Delta t}{{\tau}_{1}}}\end{array}\right]\left[\begin{array}{c}SO{C}_{k}\\ {U}_{1,k}\end{array}\right]+\left[\begin{array}{cc}-\frac{{\eta}_{c}\Delta t}{{Q}_{rate}}& 0\\ 0& {R}_{1}(1-{e}^{-\frac{\Delta t}{{\tau}_{1}}})\end{array}\right]{I}_{L,k}\end{array}$$

$$h(\xb7)={U}_{OC}\left(SO{C}_{k}\right)-{U}_{1,k}-{I}_{L,k}{R}_{0}$$

The state transition matrix and the input control matrix are respectively

$$\begin{array}{c}\hfill {F}_{k}=\left[\begin{array}{cc}1& 0\\ 0& {e}^{-\frac{\Delta t}{{\tau}_{1}}}\end{array}\right]\end{array}$$

$$\begin{array}{c}\hfill {G}_{k}=\left[\begin{array}{cc}-\frac{{\eta}_{c}\Delta t}{{Q}_{rate}}& 0\\ 0& {R}_{1}(1-{e}^{-\frac{\Delta t}{{\tau}_{1}}})\end{array}\right]\end{array}$$

Linearizing the measurement function, we can get the Jacobian measurement matrix as

$${H}_{x,k}^{}={\left.\frac{\partial h(\xb7)}{\partial {X}_{k}}\right|}_{{X}_{k}={\widehat{X}}_{k}^{-}}=\left[\begin{array}{cc}\frac{\partial {U}_{OC}}{\partial SO{C}_{k}}& -1\end{array}\right]$$

#### 2.3.2. State Space Model for Battery Parameter Estimation

Because the battery model parameters vary with changes in the batteries’ SOC, degree of aging, and environmental temperature, online recursive battery parameter estimation is needed. So here we establish the state-space equations of the battery parameters as:
where ${r}_{k}\sim \mathcal{N}(0,{Q}_{k}^{\theta})$ is a small white noise with covariance ${Q}_{k}^{\theta}$ that reflects the time-varying parts of the parameters, ${d}_{k}$ is a measurement function of ${\theta}_{k}$, and ${e}_{k}\sim \mathcal{N}(0,{\Sigma}_{k}^{\theta})$ is the measurement noise to account for the sensor noise and modeling uncertainties. ${\Sigma}_{k}^{\theta}$ is assumed unknown here.

$$\begin{array}{c}\hfill \left\{\begin{array}{c}{\theta}_{k+1}={\theta}_{k}+{r}_{k}\hfill \\ {d}_{k}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.166667em}{0ex}}=h({X}_{k},{I}_{L,k},{\theta}_{k})+{e}_{k}\hfill \end{array}\right.\end{array}$$

The Jacobian measurement matrix of ${\theta}_{k}$ is calculated as follows [20]:
where

$${H}_{\theta ,k}^{}={\left.\frac{dh(\xb7)}{d{\theta}_{k}}\right|}_{{\theta}_{k}={\widehat{\theta}}_{k}^{-}}=\frac{\partial h(\xb7)}{\partial {\widehat{\theta}}_{k}^{-}}+\frac{\partial h(\xb7)}{\partial {\widehat{X}}_{k}^{-}}\xb7\frac{d{\widehat{X}}_{k}^{-}}{d{\widehat{\theta}}_{k}^{-}}$$

$$\frac{\partial h(\xb7)}{\partial {\widehat{\theta}}_{k}^{-}}=[\begin{array}{ccc}-{I}_{L,k}\hfill & 0& 0\end{array}]$$

$$\frac{\partial h(\xb7)}{\partial {\widehat{X}}_{k}^{-}}={H}_{x,k}$$

$$\frac{d{\widehat{X}}_{k}^{-}}{d{\widehat{\theta}}_{k}^{-}}=\left[\begin{array}{ccc}0& 0& 0\\ 0& {a}_{22}& {a}_{23}\end{array}\right]$$

$$\begin{array}{ccc}\hfill {a}_{22}& =-{I}_{L,k}\xb7(exp(\Delta t/{\tau}_{1}^{2})-1)\hfill & \hfill \\ \hfill {a}_{23}& =(\Delta t/{\tau}_{1}^{2})\xb7(\widehat{x}{}_{2,k}^{-}-{R}_{1}{I}_{L,k})\xb7exp(\Delta t/{\tau}_{1})\hfill \end{array}$$

## 3. Variational Bayesian Approximation-Based Adaptive Kalman Filter Algorithm

As we know, when the measurement noise covariance is unknown or time varying, the classical approach of solving the problem is to use adaptive filters. The Bayesian approach is a typical choice. But it is usually hard to get the analytical form due to complex probability density function or high dimension of integration. In [27], variational Bayesian (VB) approximation was firstly used for the Kalman filter to estimate the joint posterior distribution of the states and noise covariances.

Given a discrete-time linear state space model as:
where ${w}_{k}\sim \mathcal{N}(0,{Q}_{k})$ is a Gaussian distributed process noise, ${v}_{k}\sim \mathcal{N}(0,{\Sigma}_{k})$ is a Gaussian measurement noise with diagonal covariance ${\Sigma}_{k}$. Note ${Q}_{k}$ is assumed known but ${\Sigma}_{k}$ is unknown.

$$\begin{array}{c}\hfill {X}_{k+1}={F}_{k}{X}_{k}+{w}_{k}\end{array}$$

$$\begin{array}{c}\hfill {y}_{k}={H}_{k}{X}_{k}+{v}_{k}\end{array}$$

Assuming the state vector and the measurement noise covariance are independent, the joint posterior distribution of the state and covariance $p({X}_{k},{\Sigma}_{k}|{y}_{1:k})$ can be solved by VB approximation as follows:

$$p({X}_{k},{\Sigma}_{k}|{y}_{1:k})\approx {Q}_{x}\left({X}_{k}\right){Q}_{\Sigma}\left({\Sigma}_{k}\right)$$

The VB approximation can now be formed by minimizing the Kullback–Leibler (KL) divergence between the separable approximation and the true posterior:

$$\begin{array}{cc}KL\left[{Q}_{x}\left({X}_{k}\right){Q}_{\Sigma}\left({\Sigma}_{k}\right)\left|\right|p({X}_{k},{\Sigma}_{k}|{y}_{1:k})\right]\hfill & \hfill \\ =\int {Q}_{x}\left({X}_{k}\right){Q}_{\Sigma}\left({\Sigma}_{k}\right)\times log\left(\frac{{Q}_{x}\left({X}_{k}\right){Q}_{\Sigma}\left({\Sigma}_{k}\right)}{p({X}_{k},{\Sigma}_{k}|{y}_{1:k})}\right)d{X}_{k}d{\Sigma}_{k}\hfill \end{array}$$

Minimizing the KL divergence with respect to the probability densities ${Q}_{x}\left({X}_{k}\right)$ and ${Q}_{\Sigma}\left({\Sigma}_{k}\right)$ in turn, while keeping the other fixed, we can get the following equations:

$${Q}_{x}\left({X}_{k}\right)\propto exp\left(\int logp({y}_{k},{X}_{k},{\Sigma}_{k}|{y}_{1:k-1}){Q}_{\Sigma}\left({\Sigma}_{k}\right)d{\Sigma}_{k}\right)$$

$${Q}_{\Sigma}\left({\Sigma}_{k}\right)\propto exp\left(\int logp({y}_{k},{X}_{k},{\Sigma}_{k}|{y}_{1:k-1}){Q}_{x}\left({X}_{k}\right)d{X}_{k}\right)$$

Computing the above equations, we can get the following densities [27]:
where the parameters ${m}_{k}$, ${P}_{k}$, ${\alpha}_{k,i}$, ${\beta}_{k,i}$ can be calculated as:
where $i=1,\dots ,d$ and d denote the dimensionality of the measurement. ${m}_{k}^{-}$ and ${P}_{k}^{-}$ are the predicted state estimate and its covariance, respectively. Here we assume each component of the measurement noise variance is mutually independent, and then the covariance matrix is diagonal, estimated as:

$${Q}_{x}\left({X}_{k}\right)=\mathcal{N}\left({X}_{k}\right|{m}_{k},{P}_{k})$$

$${Q}_{\Sigma}\left({\Sigma}_{k}\right)=\prod \mathrm{Inv}-\mathrm{Gamma}\left({\sigma}_{k,i}^{2}\right|{\alpha}_{k,i},{\beta}_{k,i})$$

$$\begin{array}{ccc}\hfill {m}_{k}& ={m}_{k}^{-}+{P}_{k}^{-}{H}_{k}^{T}{({H}_{k}{P}_{k}^{-}{H}_{k}^{T}+{\widehat{\Sigma}}_{k})}^{-1}({y}_{k}-{H}_{k}{m}_{k}^{-})\hfill & \hfill \\ \hfill {P}_{k}& ={P}_{k}^{-}-{P}_{k}^{-}{H}_{k}^{T}{({H}_{k}{P}_{k}^{-}{H}_{k}^{T}+{\widehat{\Sigma}}_{k})}^{-1}{H}_{k}{P}_{k}^{-}\hfill & \hfill \\ \hfill {\alpha}_{k,i}& =1/2+{\alpha}_{k-1,i}\hfill & \hfill \\ \hfill {\beta}_{k,i}& ={\beta}_{k-1,i}+\frac{1}{2}[{({y}_{k}-{H}_{k}{m}_{k})}_{i}^{2}+{\left({H}_{k}{P}_{k}{H}_{k}^{T}\right)}_{ii}]\hfill \end{array}$$

$${\widehat{\Sigma}}_{k}=diag({\beta}_{k,1}/{\alpha}_{k,1},\dots ,{\beta}_{k,d}/{\alpha}_{k,d})$$

Furthermore, in order to describe the dynamics of the measurement noise variance, the inverse Gamma distribution parameters are assumed to change by a scale factor $\rho \in (0,1]$. The formulas are given as:

$$\begin{array}{ccc}\hfill {\alpha}_{k,i}^{-}& ={\rho}_{i}{\alpha}_{k-1,i}\hfill & \hfill \\ \hfill {\beta}_{k,i}^{-}& ={\rho}_{i}{\beta}_{k-1,i}\hfill \end{array}$$

Note that the value $\rho =1$ corresponds to stationary variances and lower values represent larger time-fluctuations.

The above are the basic equations of adaptive Kalman filter based on VB approximation. Moreover, when the state equation and the measurement equation are nonlinear, the VB method can be rewritten in the EKF framework.

## 4. Variational Bayesian Approximation-Based Adaptive Dual Extended Kalman Filter

In order to handle the joint estimation of the SOC and the battery model parameters as well as the unknown measurement noise covariances, we propose a variational Bayesian approximation-based dual extended Kalman filter (VB-ADEKF) in this paper.

First, let us rewrite the state-space equations for SOC estimation as
and the state-space equations for battery model parameters as
where the process noise covariances ${Q}_{k}^{x}$, ${Q}_{k}^{\theta}$ are assumed known, and the measurement noise variances ${\Sigma}_{k}^{x}$, ${\Sigma}_{k}^{\theta}$ are unknown, being assumed as stochastic variables.

$$\begin{array}{c}\hfill \left\{\begin{array}{c}{X}_{k+1}={F}_{k}{X}_{k}+{G}_{k}{I}_{L,k}+{w}_{k}\hfill \\ {y}_{k}=h({X}_{k},{I}_{L,k},{\theta}_{k})+{v}_{k}\hfill \\ {w}_{k}\sim \mathcal{N}(0,{Q}_{k}^{x})\hfill \\ {v}_{k}\sim \mathcal{N}(0,{\Sigma}_{k}^{x})\hfill \end{array}\right.\end{array}$$

$$\begin{array}{c}\hfill \left\{\begin{array}{c}{\theta}_{k+1}={\theta}_{k}+{r}_{k}\hfill \\ {d}_{k}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.166667em}{0ex}}=h({X}_{k},{I}_{L,k},{\theta}_{k})+{e}_{k}\hfill \\ {r}_{k}\sim N(0,{Q}_{k}^{\theta})\hfill \\ {e}_{k}\sim N(0,{\Sigma}_{k}^{\theta})\hfill \end{array}\right.\end{array}$$

Then, VB-ADEKF is to alternatively solve the joint posterior distribution $p({X}_{k},{\Sigma}_{k}^{x}|{y}_{1:k})$ of the SOC and its measurement noise variance and the joint posterior distribution $p({\theta}_{k},{\Sigma}_{k}^{\theta}|{y}_{1:k})$ of the battery parameter and its measurement noise variance by VB approximation as follows:
where ${Q}_{x}\left({X}_{k}\right)$, ${Q}_{\Sigma}\left({\Sigma}_{k}^{x}\right)$, ${Q}_{\theta}\left({\theta}_{k}\right)$, and ${Q}_{\Sigma}\left({\Sigma}_{k}^{\theta}\right)$ can be solved by Equations (23) and (24). It should be noted that the parameters in these approximating densities are actually obtained using the extended Kalman filters since the measurement function $h(\xb7)$ is nonlinear. The filtering procedure of the VB-ADEKF algorithm is summarized in Algorithm 1.

$$\begin{array}{cc}\hfill p({X}_{k},{\Sigma}_{k}^{x}|{y}_{1:k})& \approx {Q}_{x}\left({X}_{k}\right){Q}_{\Sigma}\left({\Sigma}_{k}^{x}\right)\hfill \end{array}$$

$$\begin{array}{cc}\hfill p({\theta}_{k},{\Sigma}_{k}^{\theta}|{y}_{1:k})& \approx {Q}_{\theta}\left({\theta}_{k}\right){Q}_{\Sigma}\left({\Sigma}_{k}^{\theta}\right)\hfill \end{array}$$

Algorithm 1: VB-ADEKF. |

(1) Initialization: ${\widehat{X}}_{0}$, ${\widehat{\theta}}_{0}$, ${P}_{x,0}$, ${P}_{\theta ,0}$, ${Q}_{0}^{x}$, ${Q}_{0}^{\theta}$, ${\widehat{\alpha}}_{x,0}$, ${\widehat{\beta}}_{x,0}$, ${\widehat{\alpha}}_{\theta ,0}$, ${\widehat{\beta}}_{\theta ,0}$(2) Prediction:$\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}{\widehat{X}}_{k}^{-}={F}_{k-1}{\widehat{X}}_{k-1}+{G}_{k-1}{I}_{L,k-1},\phantom{\rule{1.em}{0ex}}{\widehat{\theta}}_{k}^{-}={\widehat{\theta}}_{k-1}$ $\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}{P}_{x,k}^{-}={F}_{k-1}{P}_{x,k-1}^{}{F}_{k-1}^{T}+{Q}_{k}^{x},\phantom{\rule{1.em}{0ex}}{P}_{\theta ,k}^{-}={P}_{\theta ,k-1}^{}+{Q}_{k}^{\theta}$ $\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}{\widehat{\alpha}}_{x,k}^{-}={\rho}_{x}{\widehat{\alpha}}_{x,k-1},\phantom{\rule{1.em}{0ex}}{\widehat{\beta}}_{x,k}^{-}={\rho}_{x}{\widehat{\beta}}_{x,k-1}$ $\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}{\widehat{\alpha}}_{\theta ,k}^{-}={\rho}_{\theta}{\widehat{\alpha}}_{\theta ,k-1},\phantom{\rule{1.em}{0ex}}{\widehat{\beta}}_{\theta ,k}^{-}={\rho}_{\theta}{\widehat{\beta}}_{\theta ,k-1}$ where ${\alpha}_{x}$, ${\beta}_{x}$ and ${\alpha}_{\theta}$, ${\beta}_{\theta}$ are the inverse gamma distribution parameters of the measurement noise covariance, ${\rho}_{x}$ and ${\rho}_{\theta}$ are the scale factors. (3) Update: the update of VB-ADEKF utilizes iterate filtering framework.First set: ${\widehat{X}}_{k}^{\left(0\right)}={\widehat{X}}_{k}^{-}$, ${P}_{x,k}^{\left(0\right)}={P}_{x,k}^{-}$, ${\widehat{\theta}}_{k}^{\left(0\right)}={\widehat{\theta}}_{k}^{-}$, ${P}_{\theta ,k}^{\left(0\right)}={P}_{\theta ,k}^{-}$$\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}{\widehat{\alpha}}_{x,k}^{}=1/2+{\widehat{\alpha}}_{x,k}^{-},\phantom{\rule{1.em}{0ex}}{\widehat{\beta}}_{x,k}^{\left(0\right)}={\widehat{\beta}}_{x,k}^{-}$ ${\widehat{\alpha}}_{\theta ,k}^{}=1/2+{\widehat{\alpha}}_{\theta ,k}^{-},\phantom{\rule{1.em}{0ex}}{\widehat{\beta}}_{\theta ,k}^{\left(0\right)}={\widehat{\beta}}_{\theta ,k}^{-}$ For $n=1:N$, iterate the following N (N denotes iterated times) steps:$\phantom{\rule{1.em}{0ex}}\u2022$ Measurement variances:$\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}{\widehat{\Sigma}}_{x,k}^{\left(n\right)}={\widehat{\beta}}_{x,k}^{\left(n\right)}/{\widehat{\alpha}}_{x,k}^{\left(n\right)},\phantom{\rule{1.em}{0ex}}{\widehat{\Sigma}}_{\theta ,k}^{\left(n\right)}={\widehat{\beta}}_{\theta ,k}^{\left(n\right)}/{\widehat{\alpha}}_{\theta ,k}^{\left(n\right)}$ $\phantom{\rule{1.em}{0ex}}\u2022$ State estimate and its covariance:$\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}{\widehat{X}}_{k}^{\left(n+1\right)}={\widehat{X}}_{k}^{-}+{P}_{x,k}^{-}{H}_{x,k}^{\mathrm{T}}{({H}_{x,k}^{}{P}_{x,k}^{-}{H}_{x,k}^{\mathrm{T}}+{\widehat{\Sigma}}_{x,k}^{\left(n\right)})}^{-1}({y}_{k}-h({\widehat{X}}_{k}^{-},{I}_{L,k},{\widehat{\theta}}_{k}^{-}))$ $\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}{P}_{x,k}^{\left(n+1\right)}={P}_{x,k}^{-}-{P}_{x,k}^{-}{H}_{x,k}^{\mathrm{T}}{({H}_{x,k}^{}{P}_{x,k}^{-}{H}_{x,k}^{\mathrm{T}}+{\widehat{\Sigma}}_{x,k}^{\left(n\right)})}^{-1}{H}_{x,k}^{}{P}_{x,k}^{-}$ $\phantom{\rule{1.em}{0ex}}\u2022$ Battery parameters estimate and its covariance:$\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}{\widehat{\theta}}_{k}^{\left(n+1\right)}={\widehat{\theta}}_{k}^{-}+{P}_{\theta ,k}^{-}{H}_{\theta ,k}^{\mathrm{T}}{({H}_{\theta ,k}^{}{P}_{\theta ,k}^{-}{H}_{\theta ,k}^{\mathrm{T}}+{\widehat{\Sigma}}_{\theta ,k}^{\left(n\right)})}^{-1}({y}_{k}-h({\widehat{X}}_{k}^{-},{I}_{L,k},{\widehat{\theta}}_{k}^{-}))$ $\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}{P}_{\theta ,k}^{\left(n+1\right)}={P}_{\theta ,k}^{-}-{P}_{\theta ,k}^{-}{H}_{\theta ,k}^{\mathrm{T}}{({H}_{\theta ,k}^{}{P}_{\theta ,k}^{-}{H}_{\theta ,k}^{\mathrm{T}}+{\widehat{\Sigma}}_{\theta ,k}^{\left(n\right)})}^{-1}{H}_{\theta ,k}^{}{P}_{\theta ,k}^{-}$ $\phantom{\rule{1.em}{0ex}}\u2022$ Parameters for the measurement noise variances estimation:$\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}{\widehat{\beta}}_{x,k}^{\left(n+1\right)}={\widehat{\beta}}_{x,k}^{-}+\frac{1}{2}{\left({y}_{k}-h({\widehat{X}}_{k}^{(n+1)},{I}_{L,k},{\widehat{\theta}}_{k}^{(n+1)})\right)}^{2}+\frac{1}{2}{H}_{x,k}^{}{P}_{x,k}^{(n+1)}{H}_{x,k}^{\mathrm{T}}$ $\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}{\widehat{\beta}}_{\theta ,k}^{\left(n+1\right)}={\widehat{\beta}}_{\theta ,k}^{-}+\frac{1}{2}{\left({y}_{k}-h({\widehat{X}}_{k}^{(n+1)},{I}_{L,k},{\widehat{\theta}}_{k}^{(n+1)})\right)}^{2}+\frac{1}{2}{H}_{\theta ,k}^{}{P}_{\theta ,k}^{(n+1)}{H}_{\theta ,k}^{\mathrm{T}}$ End for.And set ${\widehat{\beta}}_{x,k}^{}={\widehat{\beta}}_{x,k}^{\left(N\right)}$, ${\widehat{\beta}}_{\theta ,k}^{}={\widehat{\beta}}_{\theta ,k}^{\left(N\right)}$, ${\widehat{X}}_{k}={\widehat{X}}_{k}^{\left(N\right)}$, ${P}_{x,k}={P}_{x,k}^{\left(N\right)}$, ${\widehat{\theta}}_{k}={\widehat{\theta}}_{k}^{\left(N\right)}$, ${P}_{\theta ,k}={P}_{\theta ,k}^{\left(N\right)}$ |

By alternatively using two VB-based extended Kalman filters for online estimation of the battery SOC and model parameters, while compensating for the uncertainties in the model parameters by simultaneous estimation of the measurement noise variances, the adaptability of the proposed algorithm to dynamic changes in battery characteristics is greatly improved. Hence, it is very promising to further increase the SOC estimation accuracy and robustness.

## 5. Experimental Verification and Analysis

#### 5.1. Experimental Settings

The proposed method is experimentally evaluated in this section. The experimental setup for the tests is shown in Figure 2. The setup consists of three lithium-ion battery cells connected in series, an electronic load, and a host computer. The tested lithium-ion battery cells are type 18,650, whose nominal capacity is 2200 mAh, nominal voltage is 3.7 V, charging and discharging cutoff voltages are 4.2 V and 3 V, respectively. The type of the electronic load is IT8516S produced by ITECH, whose current measurement accuracy is $\pm (0.1\%+0.1\%$ full scale), and voltage measurement accuracy is $\pm (0.02\%+0.02\%$ full scale). The load current, terminal voltage, and SOC can be recorded via the host computer during the discharge test.

First, a sequence of pulsed discharging experiments were implemented to determine the relationship of open circuit voltage (OCV) and SOC. By using the curve-fitting toolbox in MATLAB, ${k}_{0}$, ${k}_{1}$, ${k}_{2}$, ${k}_{3}$, ${k}_{4}$, ${k}_{5}$ were identified, which are shown in Table 1. The measured data and fitted curve are presented in Figure 3. The R-square is used to represent the goodness of fit. The normal value range of the R-square is 0–1 and a value closer to 1 indicates a better fitting curve [32]. It can be seen that the curve fits well with the measurement data, indicating that the selected fifth-order polynomial model can describe the relationship of OCV and SOC very well.

Then, a constant current discharge test, a pulse current discharge test, and an urban dynamometer driving schedule (UDDS) test were performed. They are commonly used to verify the performances of SOC estimation methods in EVs. In the constant current discharge test, the current keeps invariant but the terminal voltage declines continuously. In the pulse current discharge test, the current stays at 1 A for 10 min and then decreases to 0 and lasts for 30 min. The process is repeated until the battery reaches the lower cut-off voltage. UDDS, also known as FTP72, was used as a test procedure to certify vehicle emissions by the US Environmental Protection Agency. It can simulate the actual driving conditions of vehicles on the road. The battery current and voltage are both sampled at 1 s. In each test, the true SOC was obtained using CC method. The estimation accuracy, convergence rate, and robustness of the proposed VB-ADEKF are evaluated by comparison with DEKF under different tests.

#### 5.2. Constant Current Discharge Test

The experiment was performed with a constant discharge current of 1 A. The initial SOC value is set to be $0.8$, rather than the real SOC of $1.0$. The process noise covariances are set as ${Q}_{k}^{x}=1\times {10}^{-6}{I}_{2}$ and ${Q}_{k}^{\theta}=1\times {10}^{-6}{I}_{3}$. The measurement noise variances used for DEKF are ${\Sigma}_{k}^{x}=0.001$ and ${\Sigma}_{k}^{\theta}=0.0005$. The scale factors for VB-ADEKF are set to $1\times {10}^{-4}$. The initial parameters ${\alpha}_{0}$ and ${\beta}_{0}$ for battery parameters and SOC are both set as 10 and $0.001$, respectively.

The estimated values of the battery model parameters by VB-ADEKF are presented in Figure 4. The ohmic resistance is stable at the beginning of the discharge and increases at the end of the discharge. The polarization resistance decreases at first and increases later with the depth of the discharge and again decreases in the last 1000 s. The polarization capacitance shows a declining trend overall in the process of discharge.

Furthermore, to verify the accuracy of online identification of the battery parameters by the VB-ADEKF algorithm, the measured terminal voltage and the estimated terminal voltage by VB-ADEKF were compared, as shown in Figure 5. The maximum absolute error was 0.023 V, except for the first big error caused by an incorrect initial SOC value. The mean absolute error was 0.0050 V and the relative mean absolute error was $0.052\%$. It is clear that the estimated terminal voltage agrees well with the measured voltage. This illustrates the effectiveness of the battery model whose parameters are identified by the proposed VB-ADEKF method.

The SOC estimation results using VB-ADEKF and DEKF are shown in Figure 6. Clearly, VB-ADEKF has a much more accurate SOC estimation than DEKF. The SOC estimation error of VB-ADEKF is bounded within $\pm 1\%$ for most of the time, but DEKF goes outside of this interval. The detailed error values are shown in Table 2. The maximum absolute estimation error of VB-ADEKF is $1.28\%$ and the mean absolute error is $0.64\%$ after discharge for 12 min. Both are significantly smaller than the errors of DEKF, which are correspondingly $2.76\%$ and $1.39\%$. Meanwhile, from the figure it can be seen that VB-ADEKF converges much faster than DEKF under initial SOC errors. This is also verified in Table 2. The convergence time, which is defined as the first time instant at which the SOC estimation error decreases to $\pm 5\%$, are 10 s and 335 s for VB-ADEKF and DEKF, respectively.

#### 5.3. Pulse Current Discharge Test

In the pulse current discharge test, the initial SOC value is set to be $0.8$ while the real SOC is $1.0$. The process noise covariances are set as ${Q}_{k}^{x}=1\times {10}^{-6}{I}_{2}$ and ${Q}_{k}^{\theta}=1\times {10}^{-6}{I}_{3}$. The measurement noise variances used for DEKF are ${\Sigma}_{k}^{x}=0.01$ and ${\Sigma}_{k}^{\theta}=0.0005$. The initial parameter values of VB-ADEKF are set as ${\alpha}_{\theta ,0}=100$, ${\beta}_{\theta ,0}=0.0005$, ${\alpha}_{x,0}=10$, ${\beta}_{x,0}=0.001$.

Figure 7 presents the estimated values of the battery model parameters. Clearly, there is a stepped increase in the ohmic resistance from 34 m$\Omega $ to 49 m$\Omega $. The polarization resistance retains stable during the entire discharge process. The polarization capacitance first decreases rapidly then stays stable until the end of the discharge. Figure 8 shows the the measured terminal voltage and the estimated terminal voltage by VB-ADEKF to verify the effectiveness of the battery parameters identification. The maximum and mean absolute estimation errors are 0.086 V and 0.0027 V, respectively. It implies that the estimated terminal voltage has a good agreement with the measured voltage. It further shows the battery model parameters are well identified.

The SOC estimation results of VB-ADEKF and DEKF are plotted in Figure 9. It shows that VB-ADEKF and DEKF have comparable performance in convergence rate. However VB-ADEKF has more accurate SOC estimation than that of DEKF. This is also verified in Table 2, in which the mean absolute error of VB-ADEKF is $0.68\%$, while it is $1.01\%$ for DEKF after discharge for 12 min.

#### 5.4. UDDS Test

To evaluate the SOC estimation performance under dynamic loading profiles, an UDDS cycle was performed on the battery cells. According to the actual tolerable currents of the lithium-ion battery cells, the loading currents are scaled down, as shown in Figure 10. The initial SOC value is set to $0.8$. The process noise covariances are set as ${Q}_{k}^{x}=1\times {10}^{-6}{I}_{2}$ and ${Q}_{k}^{\theta}=1\times {10}^{-6}{I}_{3}$. The measurement noise variances used for DEKF are ${\Sigma}_{k}^{x}=0.01$ and ${\Sigma}_{k}^{\theta}=0.0005$. The initial parameter values of VB-ADEKF are set as ${\alpha}_{\theta ,0}=100$, ${\beta}_{\theta ,0}=0.0005$, ${\alpha}_{x,0}=10$, ${\beta}_{x,0}=0.001$.

The estimated values of the battery model parameters are presented in Figure 11. It can be seen that the range of parameter values of ${R}_{0}$, ${R}_{1}$ and ${C}_{1}$ are consistent with these in constant current discharge test and pulse current discharge test, but the changing rules are slightly different. Figure 12 presents the the measured terminal voltage and the estimated terminal voltage by VB-ADEKF to verify the effectiveness of the battery parameters identification. The maximum and mean absolute estimation errors are 0.062 V and 0.0011 V, respectively. It is clear that the estimated terminal voltage has a good consistency with the measured voltage. It further shows the battery model parameters are well identified.

Figure 13 presents the SOC estimation results of VB-ADEKF and DEKF. It shows that both VB-ADEKF and DEKF have good estimation accuracy when SOC is between $20\%$ and $90\%$. But VB-ADEKF still outperforms the traditional DEKF in SOC estimation accuracy and convergence rate. A comparative summary of the two methods is given in Table 2. When SOC is decreased to $20\%$, the estimation error of both methods begins to increase, but is no larger than $5\%$. This may be because the polarization effect of the battery is further aggravated at lower SOC level. As a result, the terminal voltage measurement error has increased, thereby reducing the SOC estimation accuracy.

#### 5.5. Convergence Ability with Initial SOC Error

Because it is difficult to determine the initial SOC value precisely in practical applications, it is important and indispensable for the algorithms to have the ability to correct the uncertainty brought by the initial SOC error. Therefore, the convergence rate with initial SOC error is adopted as another indicator for evaluating the SOC estimation algorithms. The true initial SOC value is $1.0$. Figure 14, Figure 15 and Figure 16 present the estimation results of VB-ADEKF and DEKF algorithms for different initial SOC values from $30\%$ to $90\%$ under the above three tests, respectively. Overall, the convergence time increases as the initial SOC error rises for both VB-ADEKF and DEKF. But the growth rates are very different for the two filters under different tests.

Specifically, from the results of the convergence time shown in Table 3, it can be seen that the convergence time of VB-ADEKF is stabilized about 10 s into the constant current discharge test when the initial SOC value is larger than $50\%$, and increased to more than 100 s when the initial SOC values are $40\%$ and $30\%$. But the convergence time of DEKF, which is between 300 s and 500 s, is much longer than VB-ADEKF. It shows that VB-ADEKF can quickly converge to the true SOC values without resulting in the accumulation of errors caused by the initial error of the SOC. In the pulse current discharge test, the convergence rates are comparable for VB-ADEKF and DEKF in the case of small initial SOC errors, for example, $10\%$ or $20\%$. However, when the initial SOC error is relatively large, the convergence time of VB-ADEKF becomes much smaller than that of DEKF. In the UDDS test, VB-ADEKF only exhibits a slightly increasing trend with the increase of the initial SOC error. However, DEKF converges slower than VB-ADEKF, in the meantime, with a larger SOC estimation error. Its convergence time goes up quickly as the initial SOC error increases. This implies that the initial SOC error has a noticeable impact on the performance of DEKF. But, from the overall perspective, VB-ADEKF is not very sensitive to the initial SOC error. It shows that the proposed VB-ADEKF has better robustness for initial SOC errors than the traditional DEKF.

#### 5.6. Effect of Mistuning

If the working condition of the battery changes abruptly, the SOC measurement error would probably be varied largely with before, so the prior tuning of the measurement variance of the DEKF will not give an optimal estimate of the SOC. But there is no such issue in the proposed VB-ADEKF since the measurement variances are estimated online. This effects of mistuning brought about by inappropriate measurement variance of the traditional DEKF and VB-ADEKF are mainly reflected in the SOC estimation error, as shown in Figure 17, Figure 18 and Figure 19. Here, the measurement noise variances of DEKF are mistuned to ${\Sigma}_{k}^{x}=0.01$ and ${\Sigma}_{k}^{\theta}=0.001$ in constant current discharge test, and ${\Sigma}_{k}^{x}=0.1$ and ${\Sigma}_{k}^{\theta}=0.005$ in the pulse current discharge test and UDDS test. The initial estimates of the measurement variances of VB-ADEKF are also correspondingly mistuned. From the results, we can see that the convergence rate of DEKF slows down and the SOC estimation accuracy also declines in the case of mistuning, while the SOC estimation performance of the proposed VB-ADEKF remains almost unchanged. This suggests that the proposed VB-ADEKF is more robust than the traditional DEKF.

## 6. Conclusions

To deal with the measurement statistical uncertainties and inaccurate battery model, a variational Bayesian approximation-based adaptive dual extended Kalman filter (VB-ADEKF) is proposed in this paper for SOC estimation of lithium-ion batteries. First, the variational Bayesian inference is integrated with the extended Kalman filter to jointly estimate the states and the measurement noise covariances. Then, two VB-based extended Kalman filters are alternatively used for online estimation of the battery SOC and model parameters, while simultaneously estimating the measurement noise variances to compensate for the uncertainties in the measurement and battery parameters. Therefore, the adaptability of the proposed algorithm to dynamic changes in battery characteristics is greatly improved. The effectiveness and superiority of the proposed algorithm have been verified by comparing with the dual EKF (DEKF) algorithm through experiments under the constant current discharge test, pulse current discharge test, and UDDS test. The results show that the proposed VB-ADEKF algorithm outperforms the traditional DEKF approach in terms of SOC estimation accuracy and convergence rate. Especially, when the quality of measurements changes with the operating conditions, the proposed VB-ADEKF exhibits better robustness than DEKF.

## Author Contributions

J.H. conceived this paper, designed the experiments, and analyzed the data; T.G. and H.H. performed the experiments; Y.Y. revised the paper and provided some valuable suggestions.

## Funding

This research was funded by Shaanxi Provincial Key Research and Development Programs (No. 2017ZDXM- GY-06, No. 2017GY-057), and Xi’an Science and Technology Planning Project–Scientific and Technological Innovation Guidance Project ( No. 201805042YD20CG26 (8)).

## Conflicts of Interest

The authors declare no conflict of interest.

## Abbreviations

The following abbreviations are used in this manuscript:

AEKF | Adaptive Extended Kalman Filter |

ANFIS | Adaptive Neuro-Fuzzy Inference System |

ALS | Autocovariance Least Squares |

ASRUKF | Adaptive Square Root Unscented Kalman Filter |

AUKF | Adaptive Unscented Kalman Filter |

BMS | Battery Management System |

CC | Coulomb Counting |

CKF | Cubature Kalman Filter |

DEKF | Dual Extended Kalman Filter |

EKF | Extended Kalman Filter |

EV | Electric Vehicle |

FFRLS | Forgetting-Factor Recursive Least-Squares |

FL | Fuzzy Logic |

KF | Kalman Filter |

KL | Kullback–Leibler |

MM | Multiple Model |

NN | Neural Network |

OCV | Open Circuit Voltage |

RC | Resistor–Capacitor |

SOC | State Of Charge |

SVM | Support Vector Machine |

UDDS | Urban Dynamometer Driving Schedule |

UKF | Unscented Kalman Filter |

VB | Variational Bayesian |

## References

- Pan, H.; Lü, Z.; Lin, W.; Li, J.; Chen, L. State of charge estimation of lithium-ion batteries using a grey extended Kalman filter and a novel open-circuit voltage model. Energy
**2017**, 138, 764–775. [Google Scholar] [CrossRef] - Hannan, M.A.; Lipu, M.S.H.; Hussain, A.; Mohamed, A. A review of lithium-ion battery state of charge estimation and management system in electric vehicle applications: Challenges and recommendations. Renew. Sustain. Energy Rev.
**2017**, 78, 834–854. [Google Scholar] [CrossRef] - He, W.; Williard, N.; Chen, C.; Pecht, M. State of charge estimation for Li-ion batteries using neural network modeling and unscented Kalman filter-based error cancellation. Int. J. Electr. Power Energy Syst.
**2014**, 62, 783–791. [Google Scholar] [CrossRef] - Zhao, W.; Kong, X.; Wang, C. Combined estimation of the state of charge of a lithium battery based on a back-propagation- adaptive Kalman filter algorithm. Proc. Inst. Mech. Eng. Part D J. Automob. Eng.
**2018**, 232, 357–366. [Google Scholar] [CrossRef] - Charkhgard, M.; Farrokhi, M. State-of-charge estimation for lithium-ion batteries using neural networks and EKF. IEEE Trans. Ind. Electron.
**2010**, 57, 4178–4187. [Google Scholar] [CrossRef] - Singh, P.; Vinjamuri, R.; Wang, X.; Reisner, D. Design and implementation of a fuzzy logic-based state-of-charge meter for Li-ion batteries used in portable defibrillators. J. Power Sources
**2006**, 162, 829–836. [Google Scholar] [CrossRef] - Cai, C.H.; Du, D.; Liu, Z.Y. Battery state-of-charge (SOC) estimation using adaptive neuro-fuzzy inference system (ANFIS). In Proceedings of the 12th IEEE International Conference on Fuzzy Systems, St Louis, MO, USA, 25–28 May 2003; pp. 1068–1073. [Google Scholar]
- Awadallah, M.A.; Venkatesh, B. Accuracy improvement of SOC estimation in lithium-ion batteries. J. Energy Storage
**2016**, 6, 95–104. [Google Scholar] [CrossRef] - Hu, J.N.; Hu, J.J.; Lin, H.B.; Li, X.P.; Jiang, C.L.; Qiu, X.H.; Li, W.S. State-of-charge estimation for batterymanagement system using optimized support vectormachine for regression. J. Power Sources
**2014**, 269, 682–693. [Google Scholar] [CrossRef] - Sheng, H.; Xiao, J. Electric vehicle state of charge estimation: Nonlinear correlation and fuzzy support vector machine. J. Power Sources
**2015**, 281, 131–137. [Google Scholar] [CrossRef] - Wu, X.; Mi, L.; Tan, W.; Qin, J.L.; Zhao, M.N. State of charge (SOC) estimation of Ni-MH battery based on least square support vector machines. Adv. Mater. Res.
**2011**, 211, 1204–1209. [Google Scholar] [CrossRef] - Chen, Z.; Fu, Y.; Mi, C.C. State of charge estimation of lithium-ion batteries in electric drive vehicles using extended Kalman filtering. IEEE Trans. Veh. Technol.
**2013**, 62, 1020–1030. [Google Scholar] [CrossRef] - He, H.; Xiong, R.; Zhang, X.; Sun, F.; Fan, J. State-of-charge estimation of the Lithium-ion battery using an adaptive extended Kalman filter based on an improved Thevenin model. IEEE Trans. Veh. Technol.
**2011**, 60, 1461–1469. [Google Scholar] - He, W.; Williard, N.; Chen, C.; Pecht, M. State of charge estimation for electric vehicle batteries using unscented kalman filtering. Microelectron. Reliab.
**2013**, 53, 840–847. [Google Scholar] [CrossRef] - Li, Y.; Wang, C.; Gong, J. A multi-model probability SOC fusion estimation approach using an improved adaptive unscented Kalman filter technique. Energy
**2017**, 141, 1402–1415. [Google Scholar] [CrossRef] - Peng, S.; Chen, C.; Shi, H.; Yao, Z. State of charge estimation of battery energy storage systems based on adaptive unscented Kalman filter with a noise statistics estimator. IEEE Access
**2017**, 5, 13202–13212. [Google Scholar] [CrossRef] - Zeng, Z.; Tian, J.; Li, D.; Tian, Y. An online state of charge estimation algorithm for lithium-ion batteries using an improved adaptive cubature Kalman filter. Energies
**2018**, 11, 59. [Google Scholar] [CrossRef] - Xiong, R.; Zhang, Y.; He, H.; Zhou, X.; Pecht, M. A double-scale, particle filtering, energy state prediction algorithm for lithium-ion batteries. IEEE Trans. Ind. Electron.
**2018**, 65, 1526–1538. [Google Scholar] [CrossRef] - Wang, Y.; Zhang, C.; Chen, Z. A method for state-of-charge estimation of LiFePO4 batteries at dynamic currents and temperatures using particle filter. J. Power Sources
**2015**, 279, 306–311. [Google Scholar] [CrossRef] - Nejad, S.; Gladwin, D.T.; Stone, D.A. On-chip implementation of extended kalman filter for adaptive battery states monitoring. In Proceedings of the 42nd Annual Conference of the IEEE Industrial Electronics Society, Florence, Italy, 23–26 October 2016; pp. 5513–5518. [Google Scholar]
- Cai, M.; Chen, W.; Tan, X. Battery state-of-charge estimation based on a dual unscented Kalman filter and fractional variable-order model. Energies
**2017**, 10, 1577. [Google Scholar] [CrossRef] - Zhang, Y.; Zhang, C.; Zhang, X. State-of-charge estimation of the lithium-ion battery system with time-varying parameter for hybrid electric vehicles. Control Theory Appl. IET
**2014**, 8, 160–167. [Google Scholar] [CrossRef] - Charkhgard, M.; Zarif, M.H. Design of adaptive H∞ filter for implementing on state of- charge estimation based on battery state-of-charge-varying modelling. IET Power Electron.
**2015**, 8, 1825–1833. [Google Scholar] [CrossRef] - Yu, Q.; Xiong, R.; Lin, C.; Shen, W.; Deng, J. Lithium-ion battery parameters and state-of-charge joint estimation based on H-infinity and unscented Kalman filters. IEEE Trans. Veh. Technol.
**2017**, 66, 8693–8701. [Google Scholar] [CrossRef] - Liu, S.; Cui, N.; Zhang, C. An adaptive square root unscented Kalman filter approach for state of charge estimation of lithium-ion batteries. Energies
**2017**, 10, 1345. [Google Scholar] - El Din, M.S.; Abdel-Hafez, M.F.; Hussein, A.A. Enhancement in Li-ion battery cell state-of-charge estimation under uncertain model statistics. IEEE Trans. Veh. Technol.
**2016**, 65, 4608–4618. [Google Scholar] [CrossRef] - Sarkka, S.; Nummenmaa, A. Recursive noise adaptive Kalman filtering by variational Bayesian approximations. IEEE Trans. Autom. Control
**2009**, 54, 596–600. [Google Scholar] [CrossRef] - Li, K.; Chang, L.; Hu, B. A variational Bayesian-based unscented Kalman filter with both adaptivity and robustness. IEEE Sens. J.
**2016**, 16, 6966–6976. [Google Scholar] [CrossRef] - Sun, J.; Zhou, J.; Li, X.R. State estimation for systems with unknown inputs based on variational Bayes method. In Proceedings of the 15th International Conference on Information Fusion, Singapore, 9–12 July 2012; pp. 983–990. [Google Scholar]
- Hou, J.; Yang, Y.; Gao, T. Variational Bayesian based adaptive shifted Rayleigh filter for bearings-only tracking in clutters. Sensors
**2019**, 19, 1512. [Google Scholar] [CrossRef] [PubMed] - Zhao, Y.; Fatehi, A.; Huang, B. Robust estimation of ARX models with time varying time delays using variational Bayesian approach. IEEE Trans. Cybern.
**2018**, 48, 532–542. [Google Scholar] [CrossRef] - Wang, Q.; Kang, J.; Tan, Z.; Luo, M. An online method to simultaneously identify the parameters and estimate states for lithium ion batteries. Electrochim. Acta
**2018**, 289, 376–388. [Google Scholar] [CrossRef]

**Figure 4.**Results of parameter identification using variational Bayesian approximation-based adaptive dual extended Kalman filter (VB-ADEKF) in the constant current discharge test.

**Figure 5.**Experimental terminal voltage results using VB-ADEKF in the constant current discharge test.

**Figure 6.**SOC estimation results using VB-ADEKF and dual extended Kalman filter (DEKF) in the constant current discharge test.

**Figure 14.**SOC estimation results of the two filters with different initial SOC values in the constant current discharge test.

**Figure 15.**SOC estimation results of the two filters with different initial SOC values in the pulse current discharge test.

**Figure 16.**SOC estimation results of the two filters with different initial SOC values in the UDDS test.

**Figure 17.**SOC estimation results using VB-ADEKF and DEKF in the case of mistuning in the constant current discharge test.

**Figure 18.**SOC estimation results using VB-ADEKF and DEKF in the case of mistuning in the pulse current discharge test.

**Figure 19.**SOC estimation results using VB-ADEKF and DEKF in the case of mistuning in the UDDS test.

**Table 1.**The identification results of ${k}_{0}$, ${k}_{1}$, ${k}_{2}$, ${k}_{3}$, ${k}_{4}$, ${k}_{5}$.

${\mathit{k}}_{0}$ | ${\mathit{k}}_{1}$ | ${\mathit{k}}_{2}$ | ${\mathit{k}}_{3}$ | ${\mathit{k}}_{4}$ | ${\mathit{k}}_{5}$ |
---|---|---|---|---|---|

$9.50$ | $14.01$ | $-62.64$ | 137.40 | $-133.40$ | $47.76$ |

**Table 2.**Statistical analysis of state of charge (SOC) estimation error (after 12 min) in three tests.

Constant Current Test | Pulse Current Test | UDDS Test | ||||
---|---|---|---|---|---|---|

DEKF | VB-ADEKF | DEKF | VB-ADEKF | DEKF | VB-ADEKF | |

Maximum Absolute Error | $2.76\%$ | $1.28\%$ | $4.93\%$ | $5.00\%$ | $4.72\%$ | $4.10\%$ |

Mean Absolute Error | $1.39\%$ | $0.64\%$ | $1.01\%$ | $0.68\%$ | $1.26\%$ | $0.89\%$ |

Convergence Time | 335 s | 10 s | 698 s | 690 s | 675 s | 603 s |

**Table 3.**Convergence time (s) of variational Bayesian approximation-based adaptive dual extended Kalman filter (VB-ADEKF) and dual extended Kalman filter (DEKF) with different initial SOC values.

Initial SOC Values | ||||||||
---|---|---|---|---|---|---|---|---|

90% | 80% | 70% | 60% | 50% | 40% | 30% | ||

Constant current test | DEKF | 341 | 335 | 331 | 425 | 262 | 468 | 483 |

VB-ADEKF | 2 | 10 | 9 | 10 | 12 | 135 | 157 | |

Pulse current test | DEKF | 596 | 698 | 1020 | 1253 | 1238 | 1820 | 2121 |

VB-ADEKF | 410 | 690 | 629 | 776 | 918 | 943 | 1115 | |

UDDS test | DEKF | 383 | 675 | 718 | 1133 | 1420 | 1890 | 2085 |

VB-ADEKF | 359 | 603 | 610 | 612 | 695 | 658 | 783 |

© 2019 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 (http://creativecommons.org/licenses/by/4.0/).