# An Improved Recursive Total Least Squares Estimation of Capacity for Electric Vehicle Lithium-Iron Phosphate Batteries

Authors: Shaohua Wang; Yue Yang; Konghui Guo
Journal: Mathematical Problems in Engineering
 (2020)

---

## Abstract

A battery’s capacity is an important indicator of its state of health and determines the maximum cruising range of electric vehicles. It is also a crucial piece of information for helping improve state of charge (SOC) estimation, health prognosis, and other related tasks in the battery management system (BMS). In this paper, we propose an improved recursive total least squares approach to online capacity estimation, which is based on the constrained Rayleigh quotient in terms of battery capacity. This approach accounts for errors in both the SOC and accumulated current measurements not traditionally considered in the battery capacity model to give an unbiased estimation. Moreover, the forgetting factor, updated by minimizing the Rayleigh quotient of the capacity estimation model, is applied to track the changes in the model and get a more precise estimation of the capacity. Finally, the performance of the proposed algorithm is validated via simulation and experimental studies on lithium-iron phosphate batteries. The estimation results show that the proposed algorithm improves capacity estimation accuracy.


---

## Body

## 1. Introduction

To meet the need to reduce fossil fuel dependence and emissions from traditional transportation, electric vehicles (EVs) are being studied and manufactured extensively around the whole world [1]. Li-ion batteries play an important role in the energy storage system of the EV. Among Li-ion batteries, the LiFePO4 (lithium-iron phosphate) battery has gained a lot of attention owing to its nontoxicity, low cost, inherent safety, and higher energy density [2–4]. In order to achieve optimum performance and long life from batteries, their state of health (SOH) is crucial information, in addition to their state of charge (SOC) in the battery management system (BMS) [5, 6]. The battery capacity is considered as one important indicator of SOH, which reflects that maximum electrical charge can be stored into the battery and determines the maximum cruising range for EVs [7]. As the battery ages, the loss of battery capacity leads to a reduction in the electric range of the EVs [8]. However, battery capacity cannot be measured by some of the available vehicle sensors. This necessitates the development of viable state estimation algorithms.Many studies in the literature present estimation approaches for battery capacity. The capacity of the LiFePO4 battery will change continually according to its age, usage patterns, and temperature [9]. Traditionally, battery capacity could only be measured offline, by depleting a fully charged battery with a low current rate at a specific temperature. Obviously, this method is not suitable for real-time applications. Some approaches [10, 11] are based on a degradation model, calibrated under a certain usage pattern, and have limited tracking ability in terms of vehicle working conditions. Incremental capacity analysis (ICA) and differential voltage analysis (DVA) [12–16] are used to describe the internal electrochemical aging mechanism during the battery life and have recently been developed for the on-board application. The drawback of these two approaches is that the battery has to be charged or discharged with a constant current in a wide voltage region since ICA typically requires constant charging or discharging data [7]. Some intelligent algorithms have been applied to build a relationship between capacity and its influencing factors and thereby predict the real capacity of the battery. These include neural network (NN) methods and machine learning methods, such as RBF NN [16, 17], adaptive recurrent NN [18], structured NN (SNN) [19], extreme learning machine [20], adaptive multikernel relevance vector machine [21], ensemble learning with LS_SVM algorithm [22], support vector regression [23], and others. These methods usually require a large amount of experimental data so that they can train a more precise network for battery capacity estimation [24–26]. This is a difficult and time-consuming task.Least squares or Kalman filters offer the most promising compromise between estimation accuracy and low computational effort [7]. The dual Kalman filter-based methods jointly estimate the capacity and SOC together [27, 28]. However, the employment of dual filters brings about an increased computational burden and the multiscale problem may cause algorithm divergence [29]. Some approaches based on coulomb counting have been researched to estimate the capacity in real time [30, 31]. In these studies, the SOC estimation error is not considered, which could affect the capacity estimation accuracy. Since the recursive least squares (RLS) do not consider the SOC error, the total least squares (TLS) algorithm is introduced to improve the estimation accuracy by considering the SOC estimation error [32, 33]. However, the TLS algorithm is performed by computing the singular value decomposition (SVD) of the model’s covariance matrix. Since the multiplication operations of SVD for an N by N matrix have computational complexity of ON3, it can incur high computational complexity [34–36]. In [33], a recursive approximate weighted total least squares algorithm was proposed to improve the TLS performance. In [37], another recursive total least squares algorithm was employed to solve the capacity estimation. In [38], the constrained Rayleigh quotient was developed to find the TLS solution with the reducing computational complexity. In [39], a fast recursive total least square algorithm was proposed to solve the TLS solution by using the adaptation minimization of the constrained Rayleigh quotient. However, the forgetting factor is fixed as a constant in the above studies. It could not handle the tradeoff between robustness and tracking capability, which affects the estimation performance. Specifically, algorithms with smaller forgetting factor weigh more on tracking the time-varying capacity at the expense of more sensitivity to the current measurement and SOC estimation error; on the contrary, large forgetting factor improves robustness but compromises the tracking capability.Based on the above algorithms, we propose an approach employing an improved recursive total least squares with variable forgetting factor (VFF-RTLS) and a coulomb counting model considering errors in both the estimated SOC and the current measurement. The forgetting factor is controlled by minimizing the constrained Rayleigh quotient through the steepest descent method. This approach will improve capacity estimation performance. The rest of this paper is constructed as follows: Section2 describes the capacity estimation model for the battery. Section 3 presents the proposed VFF-RTLS approach for battery capacity estimation. Section 4 presents the simulation and experimental studies using the proposed algorithms, and the conclusions are summarized in Section 5.


## 2. Capacity Estimation Model of the LiFePO4 Battery

When EVs are running in a real-life environment, the SOC of their lithium-iron phosphate batteries is estimated by the unscented Kalman filter through the measured current and voltage. In order to predict the battery capacity, we use the following coulomb counting equation in terms of the measured current and battery SOC:(1)sock+1+vsk+1=sock+vsk+ηΔIk+wik3600Cap,where Cap is the estimated capacity of the lithium-iron phosphate battery in ampere-hours (Ah) and Ik is the measured current. η is coulomb efficiency, with the assumption that η=1. Δ is the sample time. wik is the current measurement error, with standard deviation σi. vsk denotes the SOC estimation error.We convert equation (1) into an iterative form as follows:(2)sockLb−sockLb−Lb+1+v¯sk=η∑j=kLb−Lb+1j=kLbΔIj+wij3600Cap,where Lb is the capacity update time period, k=1,2,…,N, and v¯sk is the differential SOC error, v¯sk=vkLbs−vskLb−Lb+1.Then, equation (2) can be simplified into the following expression:(3)y¯+w¯i=Cap∗x¯+v¯s,where x¯=sockLb−sockLb−Lb+1 denotes the difference between the battery SOCs at the beginning and end of the update period, y¯=η∑j=kLb−Lb+1j=kLbΔIj/3600 denotes the cumulated measured current within the update time period Lb, and w¯i is the cumulated measured current error, w¯i=η∑j=kLb−Lb+1j=kLbΔwij/3600.


## 3. Improved Recursive Total Least Squares Algorithm with Variable Forgetting Factor

### 3.1. Recursive Total Least Squares with Variable Forgetting Factor (VFF-RTLS)

From the capacity model in (3), we can see that there are errors in both the model input and output. Therefore, this section proposes a constrained Rayleigh quotient-based RTLS algorithm with a variable forgetting factor for the capacity estimation of LiFePO4 batteries.To facilitate the presentation of the proposed algorithm, the autocorrelation matrix of the capacity model inputx¯k is defined as follows:(4)R=Ex¯kx¯Tk.The augmented input vector is defined asxa=x¯k,y¯k, and its autocorrelation matrix can be represented as follows:(5)Ra=Exakxa′k=Rbbc,where b=Ex¯ky¯k and c=Ey¯ky¯k.The stochastic quantitiesRa can be computed via an iteration formula with a forgetting factor μ (0<μ≤1), as follows:(6)Rak=RkbkbTkck=μRak−1+xakxa′k.Then,Rk, bk, and ck can be expressed as follows [38]:(7)Rk=μRk−1+x¯kx¯Tk,(8)bk=μbk−1+x¯ky¯k,(9)ck=μck−1+y¯ky¯Tk.The VFF-RTLS performs the orthogonal regression which minimizes the sum of the squared orthogonal distances from the data points to the fitting line [40]. It makes vertical and horizontal corrections on both dependent and independent variables contain noise. However, the traditional RLS only makes vertical corrections on the dependent variable containing noise. Interested readers are referred to [39–42] and references therein for details. In other words, the proposed method is to solve the following optimization problem:(10)Cap,w¯i,v¯s=arg minw¯i,v¯sF,where ·F denotes the Frobenius norm.It has been shown in [40] that optimization problem (10) is equivalent to minimizing the Rayleigh quotient Fq:(11)Fq=qTψTψqqTDq,where q is the eigenvector associated with the smallest eigenvalue of the symmetric positive-definite matrix ψTψ in the TLS solution and D is a symmetric matrix.For the capacity estimation, a constrained Rayleigh quotient is used as a cost function whereqT and ψTψ in equation (11) are replaced with Cap,−1 and Ra, respectively. The capacity estimation problem, therefore, has the following constrained Rayleigh quotient cost function:(12)JCap=Cap,−1RaCap,−1TCap,−1D¯Cap,−1T,where Cap represents the estimated capacity of the LiFePO4 battery and D¯=diag1,β is a weighting matrix with β=σx¯2/σy¯2, where σx¯ is the standard deviation of the differential SOC error v¯s, and σy¯ is the standard deviation of the cumulated current error w¯i.According to reference [42], the estimated capacity of the battery can be updated as follows:(13)Capk=Capk−1+αkx¯k,where αk can be determined by minimizing JCapk, which can also be rewritten as minαkJCapk−1+αkx¯k.To findminαkJCapk−1+αkx¯k, let the gradient of JCapk−1+αkx¯k with respect to αk be equal to zero. Then, we obtain αk by solving the following equation:(14)∂JCapk−1+αkx¯k∂αk=0.In order to calculateαk, (14) can be rewritten as(15)Aα2k+Bαk+C=0.The polynomial coefficients of (16) are derived as follows:(16)A=KTkx¯kCapk−1x¯k−x¯k2KTkCapk−1−x¯Tky¯k,(17)B=KTkx¯kβ+Capk−12−λ0kx¯k2,(18)C=KTkCapk−1−x¯Tkbk∗β+Capk−12−λ0kCapk−1x¯k,where(19)Kk=Rkx¯k,(20)λ0k=μk−1λk−1β+Capk−12+Capk−1x¯k−y¯k2,(21)λk=λ0k+2αkKTkCapk−1−x¯kbk+α2kx¯kKkβ+Capk2.Thus, we can obtain the solutionαk of equation (15), which is given by the following [38]:(22)αk=−B+B2−4AC2A.Then, the variable forgetting factorμ is introduced to improve the estimation performance. In order to adjust μ in the above algorithm, the steepest descent method is applied to minimize the Rayleigh quotient JCapk, with respect to μ, as follows:(23)μk=μk−1+γ1∂JCapk∂μ,where γ1 is a tuning parameter.Using equations (7) and (9), we can show that equation (12) is equivalent to(24)JCapk=CapkTμRk−1+x¯kx¯kTCapk+μck−1+y¯ky¯kβ+CapkTCapk,and its derivative is easily computed as follows:(25)∂JCapk∂μ=CapkTRk−1Capk+ck−1β+CapTCap.Thus, we obtain the updating equation for the forgetting factor:(26)μk=μk−1+γ1CapkTRk−1Capk+ck−1β+CapkTCapk.Finally, the details of the improved RTLS algorithm are summarized in Algorithm1. In this paper, λ, R, b, and c are initialized to zero. The tuning parameter γ1 is set to 0.001. The forgetting factor μ is initialized to 0.99.Algorithm 1: Detailed procedures of the proposed recursive total least square algorithm.
Initialization ofCap0,μ0,λ0,γ1,R0,b0,c0Fork=1,2,…(1)
Input the battery SOC differencex¯k(2)
Input the cumulated currenty¯k(3)
Update ofKk with (19)(4)
Update ofλ0k with (20)(5)
Update ofRk, bk, ck with (7)–(9)(6)
Update ofA, B, C with (16)–(18)(7)
Update ofαk with (22)(8)
Update ofCapk with (13)(9)
Update ofμk with (26)(10)
Update ofλk with (21)


### 3.2. Battery State of Charge (SOC) Estimation

Battery SOC for the capacity estimation model in this paper is obtained by using an unscented Kalman based filter. A second-order equivalent circuit model is employed to estimate SOC. The state-space equation for the model is defined as follows:(27)soct+1Up1t+1Up2t+1=1000αp1000αp2soctUp1tUp2t+ηΔ3600CapRp11−αp1Rp21−αp2It,Vt=Uocvsoct−Up1t−Up2t−ItR0,where R0 is the internal resistance, Rp1 and Rp2 are the polarization resistance, Cp1 and Cp2 are the polarization capacitance, Cap is the estimated capacity, I is the loading current (positive for discharging and negative for charging), and Uocv, Up1, Up2, and V denote the open circuit voltage (OCV), polarization voltage, and terminal voltage, respectively. Also, Δ is the sampling time, η is the coulomb efficiency, with the assumption that η=1, αp1=exp−Δ/Rp1Cp1, and αp2=exp−Δ/Rp2Cp2. Uocv can be described as a function of estimated SOC. The relationship between Uocv and SOC is defined as follows:(28)Uocvsoct=u0−l1soct−l2soct+l3lnsoct+l4ln1−soct.The OCV parametersu0, l1, l2, l3, and l4 are usually obtained through pulse experiments.The square root spherical unscented Kalman filter (SR-SUKF) is proposed for estimating the battery SOC. SOC and polarization voltageUp1, Up2 are chosen as the state variable in the state-space model. The input and output of the model are the measured current I and terminal voltage V, respectively.The detailed estimation process can be explained as follows:(1)
Initialization:(29)x^0+=Ex0,S0+=cholEx0−x^0+x0−x^0+T,wherex^0+ is the initial state estimation, and S0+ is the square root of the error covariance matrix.The weight vectorW is defined as follows:(30)W0∈0,1,Wi=1−W0n+1,i=1,…,n+1.The sigma vector is initialized as follows:(31)χ01=0,χ11=−12W1,χ21=12W1,withj=2,…,n, and the sigma vector is iteratively calculated as follows:(32)χij=χ0j−10,i=0,χij−1−1jj+1W1,i=1,…,j,0j−1jjj+1W1,i=j+1.Then, the sigma points are given by(33)χt−1=x^t−1+St−1χin.(2)
Time update:(34)χtt−1=fχt−1,(35)x^tt−1=∑i=0n+1Wiχtt−1i,(36)Stt−1=qrW1χ1:n+1,tt−1−x^tt−1Qt−1,(37)Stt−1=cholupdateStt−1χ0,tt−1−x^tt−1W0,(38)ζt/t−1=hχt/t−1,(39)y^t=∑i=0n+1Wiζi,t/t−1,whereqr denotes the QR decomposition of the compound matrix in (36), cholupdate denotes the Cholesky update of (36).(3)
Measurement update:(40)Sy^t=qrW1ζ1:n+1,tt−1−y^tRt,Sy^t=cholupdateSy^t/t−1,ζ0,tt−1−y^t/t−1W0,Pxy=∑i=0n+1Wiχi,tt−1−x^t/t−1ζi,tt−1−y^tT,Gt=Pxy/Sy^tTSy^t,x^t=x^tt−1+Gtyt−y^t,U=GtSy^t,St=cholupdateStt−1,U,−1.


### 3.3. Coestimation Scheme with VFF-RTLS and SOC Estimation

The VFF-RTLS capacity identification method was combined with an SR-SUKF SOC estimator to calculate the battery capacity. The coestimation scheme is shown in Figure1.Figure 1
Diagram of the coestimation scheme with VFF-RTLS and SOC estimation.As shown in Figure1, the variables in VFF-RTLS and SR-SUKF are initialized. Each time the battery current and voltage are measured, the SR-SUKF can be conducted and battery SOC will be updated. The measured current is added up during the capacity estimation update period. The difference SOC is obtained at the beginning and end of the capacity estimation update period. Then, the VFF-RTLS can be conducted to identify the battery capacity. The recently updated capacity will be transferred to the SR-SUKF section to replace the previous capacity. The SOC is then estimated through SR-SUKF with the updated capacity, measured current, and voltage. Then, the algorithm moves to the next iteration.


## 3.1. Recursive Total Least Squares with Variable Forgetting Factor (VFF-RTLS)

From the capacity model in (3), we can see that there are errors in both the model input and output. Therefore, this section proposes a constrained Rayleigh quotient-based RTLS algorithm with a variable forgetting factor for the capacity estimation of LiFePO4 batteries.To facilitate the presentation of the proposed algorithm, the autocorrelation matrix of the capacity model inputx¯k is defined as follows:(4)R=Ex¯kx¯Tk.The augmented input vector is defined asxa=x¯k,y¯k, and its autocorrelation matrix can be represented as follows:(5)Ra=Exakxa′k=Rbbc,where b=Ex¯ky¯k and c=Ey¯ky¯k.The stochastic quantitiesRa can be computed via an iteration formula with a forgetting factor μ (0<μ≤1), as follows:(6)Rak=RkbkbTkck=μRak−1+xakxa′k.Then,Rk, bk, and ck can be expressed as follows [38]:(7)Rk=μRk−1+x¯kx¯Tk,(8)bk=μbk−1+x¯ky¯k,(9)ck=μck−1+y¯ky¯Tk.The VFF-RTLS performs the orthogonal regression which minimizes the sum of the squared orthogonal distances from the data points to the fitting line [40]. It makes vertical and horizontal corrections on both dependent and independent variables contain noise. However, the traditional RLS only makes vertical corrections on the dependent variable containing noise. Interested readers are referred to [39–42] and references therein for details. In other words, the proposed method is to solve the following optimization problem:(10)Cap,w¯i,v¯s=arg minw¯i,v¯sF,where ·F denotes the Frobenius norm.It has been shown in [40] that optimization problem (10) is equivalent to minimizing the Rayleigh quotient Fq:(11)Fq=qTψTψqqTDq,where q is the eigenvector associated with the smallest eigenvalue of the symmetric positive-definite matrix ψTψ in the TLS solution and D is a symmetric matrix.For the capacity estimation, a constrained Rayleigh quotient is used as a cost function whereqT and ψTψ in equation (11) are replaced with Cap,−1 and Ra, respectively. The capacity estimation problem, therefore, has the following constrained Rayleigh quotient cost function:(12)JCap=Cap,−1RaCap,−1TCap,−1D¯Cap,−1T,where Cap represents the estimated capacity of the LiFePO4 battery and D¯=diag1,β is a weighting matrix with β=σx¯2/σy¯2, where σx¯ is the standard deviation of the differential SOC error v¯s, and σy¯ is the standard deviation of the cumulated current error w¯i.According to reference [42], the estimated capacity of the battery can be updated as follows:(13)Capk=Capk−1+αkx¯k,where αk can be determined by minimizing JCapk, which can also be rewritten as minαkJCapk−1+αkx¯k.To findminαkJCapk−1+αkx¯k, let the gradient of JCapk−1+αkx¯k with respect to αk be equal to zero. Then, we obtain αk by solving the following equation:(14)∂JCapk−1+αkx¯k∂αk=0.In order to calculateαk, (14) can be rewritten as(15)Aα2k+Bαk+C=0.The polynomial coefficients of (16) are derived as follows:(16)A=KTkx¯kCapk−1x¯k−x¯k2KTkCapk−1−x¯Tky¯k,(17)B=KTkx¯kβ+Capk−12−λ0kx¯k2,(18)C=KTkCapk−1−x¯Tkbk∗β+Capk−12−λ0kCapk−1x¯k,where(19)Kk=Rkx¯k,(20)λ0k=μk−1λk−1β+Capk−12+Capk−1x¯k−y¯k2,(21)λk=λ0k+2αkKTkCapk−1−x¯kbk+α2kx¯kKkβ+Capk2.Thus, we can obtain the solutionαk of equation (15), which is given by the following [38]:(22)αk=−B+B2−4AC2A.Then, the variable forgetting factorμ is introduced to improve the estimation performance. In order to adjust μ in the above algorithm, the steepest descent method is applied to minimize the Rayleigh quotient JCapk, with respect to μ, as follows:(23)μk=μk−1+γ1∂JCapk∂μ,where γ1 is a tuning parameter.Using equations (7) and (9), we can show that equation (12) is equivalent to(24)JCapk=CapkTμRk−1+x¯kx¯kTCapk+μck−1+y¯ky¯kβ+CapkTCapk,and its derivative is easily computed as follows:(25)∂JCapk∂μ=CapkTRk−1Capk+ck−1β+CapTCap.Thus, we obtain the updating equation for the forgetting factor:(26)μk=μk−1+γ1CapkTRk−1Capk+ck−1β+CapkTCapk.Finally, the details of the improved RTLS algorithm are summarized in Algorithm1. In this paper, λ, R, b, and c are initialized to zero. The tuning parameter γ1 is set to 0.001. The forgetting factor μ is initialized to 0.99.Algorithm 1: Detailed procedures of the proposed recursive total least square algorithm.
Initialization ofCap0,μ0,λ0,γ1,R0,b0,c0Fork=1,2,…(1)
Input the battery SOC differencex¯k(2)
Input the cumulated currenty¯k(3)
Update ofKk with (19)(4)
Update ofλ0k with (20)(5)
Update ofRk, bk, ck with (7)–(9)(6)
Update ofA, B, C with (16)–(18)(7)
Update ofαk with (22)(8)
Update ofCapk with (13)(9)
Update ofμk with (26)(10)
Update ofλk with (21)


## 3.2. Battery State of Charge (SOC) Estimation

Battery SOC for the capacity estimation model in this paper is obtained by using an unscented Kalman based filter. A second-order equivalent circuit model is employed to estimate SOC. The state-space equation for the model is defined as follows:(27)soct+1Up1t+1Up2t+1=1000αp1000αp2soctUp1tUp2t+ηΔ3600CapRp11−αp1Rp21−αp2It,Vt=Uocvsoct−Up1t−Up2t−ItR0,where R0 is the internal resistance, Rp1 and Rp2 are the polarization resistance, Cp1 and Cp2 are the polarization capacitance, Cap is the estimated capacity, I is the loading current (positive for discharging and negative for charging), and Uocv, Up1, Up2, and V denote the open circuit voltage (OCV), polarization voltage, and terminal voltage, respectively. Also, Δ is the sampling time, η is the coulomb efficiency, with the assumption that η=1, αp1=exp−Δ/Rp1Cp1, and αp2=exp−Δ/Rp2Cp2. Uocv can be described as a function of estimated SOC. The relationship between Uocv and SOC is defined as follows:(28)Uocvsoct=u0−l1soct−l2soct+l3lnsoct+l4ln1−soct.The OCV parametersu0, l1, l2, l3, and l4 are usually obtained through pulse experiments.The square root spherical unscented Kalman filter (SR-SUKF) is proposed for estimating the battery SOC. SOC and polarization voltageUp1, Up2 are chosen as the state variable in the state-space model. The input and output of the model are the measured current I and terminal voltage V, respectively.The detailed estimation process can be explained as follows:(1)
Initialization:(29)x^0+=Ex0,S0+=cholEx0−x^0+x0−x^0+T,wherex^0+ is the initial state estimation, and S0+ is the square root of the error covariance matrix.The weight vectorW is defined as follows:(30)W0∈0,1,Wi=1−W0n+1,i=1,…,n+1.The sigma vector is initialized as follows:(31)χ01=0,χ11=−12W1,χ21=12W1,withj=2,…,n, and the sigma vector is iteratively calculated as follows:(32)χij=χ0j−10,i=0,χij−1−1jj+1W1,i=1,…,j,0j−1jjj+1W1,i=j+1.Then, the sigma points are given by(33)χt−1=x^t−1+St−1χin.(2)
Time update:(34)χtt−1=fχt−1,(35)x^tt−1=∑i=0n+1Wiχtt−1i,(36)Stt−1=qrW1χ1:n+1,tt−1−x^tt−1Qt−1,(37)Stt−1=cholupdateStt−1χ0,tt−1−x^tt−1W0,(38)ζt/t−1=hχt/t−1,(39)y^t=∑i=0n+1Wiζi,t/t−1,whereqr denotes the QR decomposition of the compound matrix in (36), cholupdate denotes the Cholesky update of (36).(3)
Measurement update:(40)Sy^t=qrW1ζ1:n+1,tt−1−y^tRt,Sy^t=cholupdateSy^t/t−1,ζ0,tt−1−y^t/t−1W0,Pxy=∑i=0n+1Wiχi,tt−1−x^t/t−1ζi,tt−1−y^tT,Gt=Pxy/Sy^tTSy^t,x^t=x^tt−1+Gtyt−y^t,U=GtSy^t,St=cholupdateStt−1,U,−1.


## 3.3. Coestimation Scheme with VFF-RTLS and SOC Estimation

The VFF-RTLS capacity identification method was combined with an SR-SUKF SOC estimator to calculate the battery capacity. The coestimation scheme is shown in Figure1.Figure 1
Diagram of the coestimation scheme with VFF-RTLS and SOC estimation.As shown in Figure1, the variables in VFF-RTLS and SR-SUKF are initialized. Each time the battery current and voltage are measured, the SR-SUKF can be conducted and battery SOC will be updated. The measured current is added up during the capacity estimation update period. The difference SOC is obtained at the beginning and end of the capacity estimation update period. Then, the VFF-RTLS can be conducted to identify the battery capacity. The recently updated capacity will be transferred to the SR-SUKF section to replace the previous capacity. The SOC is then estimated through SR-SUKF with the updated capacity, measured current, and voltage. Then, the algorithm moves to the next iteration.


## 4. Simulation and Experimental Studies

Simulation and experimental studies are executed to validate the proposed capacity estimation algorithm for a LiFePO4 battery subject to different driving conditions. The proposed estimation algorithms show an advantage in terms of estimation accuracy. All of these tests are programmed and performed in MATLAB software on a computer with 2.4 GHz Intel(R) Core (TM) i3 CPU M370 and 32-bit OS.


### 4.1. Simulation Studies

#### 4.1.1. Simulation Study: Dynamic Stress Test (DST) Condition

In this scenario, the simulation study assumes that the battery has a constant capacity without any degradation and that the battery is subject to a current profile that is proportional to the power profile in the standard DST condition. The DST condition is a battery testing program designed to mimic the current of an electric car when driven on a real road. The DST current profile is shown in Figure2(a) and repeated end-to-end until the battery SOC reaches 0.Figure 2
Estimated capacity from the VFF-RTLS and the other three algorithms under the DST condition: (a) DST current profile for one cycle; (b) whole current profile; (c) input SOC with noise; (d) estimated capacity; (e) estimation error as a percentage.
(a)(b)(c)(d)(e)The RLS, TLS, RTLS, and VFF-RTLS run over an update period of 100 seconds. The update period can be determined according to a real application. In EVs, the current through the battery is always measured by a Hall current sensor with certain high precision. In the capacity identification model, the current is obtained at a frequency of 1 second and the outputy¯ is calculated by summing the measured current during the estimation update time period of 100 seconds. The model input x¯ is obtained by taking the difference between the two SOCs at the beginning and end of each estimation update period.The initial parameters and noise properties of the proposed algorithms are set as follows.Noise in the current measurement is assumed to be a random white noise with standard deviationσi=0.001A. Then, the noise in the model output y¯ is obtained by summing the cumulated current noise over 100 seconds, which is expressed as σy¯=100∗Δ∗σi/3600. Noise in the SOC is assumed to be random white noise with standard deviation σs=0.01. Then, noise in the model input x¯ is derived as σx¯=2∗σs. The tuning parameter γ1 is set to 0.001, and the initial forgetting factor is set to μ=0.99. The actual capacity of the battery is set to be 12.5 Ah.The simulation results under the DST condition are presented in Figure2. Specifically, Figure 2(a) plots the DST current profile for one cycle, Figure 2(b) plots the whole current profile during the entire running time, Figure 2(c) gives the battery SOC, Figure 2(d) shows the estimated capacity computed by the estimation algorithms and the actual capacity of the battery, and Figure 2(e) shows the estimation error as a percentage. From the estimation results, we can see that the proposed VFF-RTLS algorithm outperforms the other three algorithms with an estimation error below 1%. Of the other three algorithms, the traditional RTLS is best, with an estimation error below 4%. Since the traditional RLS only consider the error on the current measurement without the SOC estimation error, the result shows that RLS converges to a biased value and has the worst performance with a large estimation error. Owing to the errors in SOC estimation, RLS converges to a steady state with a lower speed. The SVD based TLS algorithm converges to a steady value with the increasing data input, and it is worse than the RTLS. The RTLS with an appropriate initial state can converge faster than the SVD based TLS. Our proposed method has the best performance due to the variable forgetting factor.


#### 4.1.2. Simulation Study: Highway Cycles

In this scenario, the simulation study assumes that the battery has a constant capacity without any degradation and that the battery is subject to a current profile proportional to the speed profile in the highway cycles. The highway cycles are designed to test EVs driven on highways at a high speed. In a highway driving environment, the vehicle always runs at a relatively high speed. The highway cycle profile is shown in Figure3(a) and repeated end-to-end until the battery SOC reaches 0.Figure 3
Estimated capacity from the VFF-RTLS and the other three algorithms under the highway cycles: (a) highway current profile for one cycle; (b) whole current profile; (c) input SOC with noise; (d) estimated capacity; (e) estimation error as a percentage.
(a)(b)(c)(d)(e)The RLS, TLS, RTLS, and VFF-RTLS run over a period of 100 seconds. In the capacity identification model, the current is obtained at a frequency of 1 second. The model inputx and output y are obtained in the same way as for the DST driving condition. The initial parameters and noise properties of the model input/output are set to be the same as for the DST condition. The initial forgetting factor is set to μ=0.99. In this section, we use a battery with an actual capacity of 100 Ah.The simulation results under the highway cycles are presented in Figure3. Particularly, Figure 3(a) plots the current profile for one highway cycle, Figure 3(b) plots the whole current profile during the entire running time, Figure 3(c) gives the battery SOC, Figure 3(d) shows the estimated capacity computed using the estimation algorithms and the actual capacity of the battery, and Figure 3(e) shows the estimation error as a percentage. In this working condition, the results have shown a similar phenomenon as in the DST condition. From the estimation results, we can see that the proposed VFF-RTLS algorithm outperforms the other three algorithms, with an estimation error below 0.1%. Of the other three algorithms, the RTLS is the best, with an estimation error below 0.4%. The RLS is the worst, with a large capacity estimation error.


#### 4.1.3. Simulation Study: Battery with Degradation Behavior

In this section, a simulation study is carried out to verify that the proposed capacity estimation algorithm can effectively track a variable battery capacity. The battery is assumed to have a variable capacity to mimic degradation behavior, and the battery SOC is in a range from 90%–10%. The capacity decreases from 100 Ah to 90 Ah. The model inputx is simulated by a uniform random value from −0.8,+0.8, and then the model output y¯ is simulated by multiplying the actual capacity by the model input x¯. The initial parameters and the noise properties for the model input/output are set to be the same as for the highway cycles. The initial forgetting factor is set to μ=0.99.The simulation results are presented in Figure4. Specifically, Figure 4(a) shows the estimated capacity computed by the proposed algorithms and the actual capacity of the battery, and Figure 4(b) shows the estimation error of the algorithms as a percentage. From the estimation results, we can see that the proposed VFF-RTLS algorithm outperforms the other three algorithms, with an estimation error below 0.5%. Of the other three algorithms, the RTLS algorithm is the best with an estimation error below 1%. Both the RLS and TLS perform poorly with large estimation errors. Without considering the error in SOC estimation, the RLS algorithm does not track the varying battery capacity. And the SVD based TLS can not track the capacity precisely, and the error grows with the increasing data input. The proposed method (VFF-RTLS) in this paper can track the varying battery capacity better than the RTLS because of the variable forgetting factor, which improves the traditional RTLS performance.Figure 4
Estimated capacity from the VFF-RTLS and the other three algorithms under the degradation condition: (a) estimated capacity; (b) estimation error as a percentage.
(a)(b)


### 4.2. Experimental Study

To validate the proposed algorithm against experimental data, an experiment was conducted on a test bench where a lithium-iron phosphate battery of 28 Ah was kept in a temperature-controlled box with ambient temperature 25.2°C. BTS-5 V-200 A battery test equipment was used to charge/discharge the battery with a maximum voltage of 5 V and maximum charge/discharge current of 200 A. It has high accuracy in voltage and current measurement, with ±0.1% of FS. A BTS 7.5.X test software system was installed on a laptop computer which generated the test current profile for the battery. Then, the experiment began with the battery fully charged. The current and voltage data were measured with a frequency of 1 second. The true battery capacity was extracted offline from a full discharge test with a small current. The battery parameters were identified offline using constant-current pulse charge-discharge experiments.The SOC estimation model parameters obtained were as follows:R0=1.1mΩ, Rp1=1.9mΩ, Rp2=3.6mΩ, Cp1=58.605KF, and Cp2=91.42KF.The OCV parameters identified offline were as follows:u0=3.38, l1=−3.03e−5, l2=0.1327, l3=0.0778, and l4=−0.00284The capacity estimation is performed as in Section3.3. The initial forgetting factor is set to μ=0.99. The experiment results are presented in Figure 5. Specifically, Figure 5(a) plots the current profile for one cycle, Figure 5(b) plots the whole current profile over the whole running time, Figure 5(c) gives the estimated battery SOC, Figure 5(d) shows the estimated capacity computed by the estimation algorithms and the actual capacity of the battery, and Figure 5(e) shows the estimation error as a percentage.Figure 5
Estimated capacity from the VFF-RTLS and the other three algorithms using experimental data: (a) experimental current profile for one cycle; (b) whole current profile; (c) estimated SOC; (d) estimated capacity; (e) estimation error as a percentage.
(a)(b)(c)(d)(e)In the experimental studies, we find a similar phenomenon as in the simulation studies. From the estimation results, we can see that the proposed VFF-RTLS algorithm outperforms the other three algorithms with an estimation error below 0.1%. Owing to the variable forgetting factor, the VFF-RTLS has a better performance than the conventional RTLS. Of the other three algorithms, the RTLS algorithm is best, with an estimation error below 0.3%. The RLS has the worst performance with a large estimation error.


## 4.1. Simulation Studies

### 4.1.1. Simulation Study: Dynamic Stress Test (DST) Condition

In this scenario, the simulation study assumes that the battery has a constant capacity without any degradation and that the battery is subject to a current profile that is proportional to the power profile in the standard DST condition. The DST condition is a battery testing program designed to mimic the current of an electric car when driven on a real road. The DST current profile is shown in Figure2(a) and repeated end-to-end until the battery SOC reaches 0.Figure 2
Estimated capacity from the VFF-RTLS and the other three algorithms under the DST condition: (a) DST current profile for one cycle; (b) whole current profile; (c) input SOC with noise; (d) estimated capacity; (e) estimation error as a percentage.
(a)(b)(c)(d)(e)The RLS, TLS, RTLS, and VFF-RTLS run over an update period of 100 seconds. The update period can be determined according to a real application. In EVs, the current through the battery is always measured by a Hall current sensor with certain high precision. In the capacity identification model, the current is obtained at a frequency of 1 second and the outputy¯ is calculated by summing the measured current during the estimation update time period of 100 seconds. The model input x¯ is obtained by taking the difference between the two SOCs at the beginning and end of each estimation update period.The initial parameters and noise properties of the proposed algorithms are set as follows.Noise in the current measurement is assumed to be a random white noise with standard deviationσi=0.001A. Then, the noise in the model output y¯ is obtained by summing the cumulated current noise over 100 seconds, which is expressed as σy¯=100∗Δ∗σi/3600. Noise in the SOC is assumed to be random white noise with standard deviation σs=0.01. Then, noise in the model input x¯ is derived as σx¯=2∗σs. The tuning parameter γ1 is set to 0.001, and the initial forgetting factor is set to μ=0.99. The actual capacity of the battery is set to be 12.5 Ah.The simulation results under the DST condition are presented in Figure2. Specifically, Figure 2(a) plots the DST current profile for one cycle, Figure 2(b) plots the whole current profile during the entire running time, Figure 2(c) gives the battery SOC, Figure 2(d) shows the estimated capacity computed by the estimation algorithms and the actual capacity of the battery, and Figure 2(e) shows the estimation error as a percentage. From the estimation results, we can see that the proposed VFF-RTLS algorithm outperforms the other three algorithms with an estimation error below 1%. Of the other three algorithms, the traditional RTLS is best, with an estimation error below 4%. Since the traditional RLS only consider the error on the current measurement without the SOC estimation error, the result shows that RLS converges to a biased value and has the worst performance with a large estimation error. Owing to the errors in SOC estimation, RLS converges to a steady state with a lower speed. The SVD based TLS algorithm converges to a steady value with the increasing data input, and it is worse than the RTLS. The RTLS with an appropriate initial state can converge faster than the SVD based TLS. Our proposed method has the best performance due to the variable forgetting factor.


### 4.1.2. Simulation Study: Highway Cycles

In this scenario, the simulation study assumes that the battery has a constant capacity without any degradation and that the battery is subject to a current profile proportional to the speed profile in the highway cycles. The highway cycles are designed to test EVs driven on highways at a high speed. In a highway driving environment, the vehicle always runs at a relatively high speed. The highway cycle profile is shown in Figure3(a) and repeated end-to-end until the battery SOC reaches 0.Figure 3
Estimated capacity from the VFF-RTLS and the other three algorithms under the highway cycles: (a) highway current profile for one cycle; (b) whole current profile; (c) input SOC with noise; (d) estimated capacity; (e) estimation error as a percentage.
(a)(b)(c)(d)(e)The RLS, TLS, RTLS, and VFF-RTLS run over a period of 100 seconds. In the capacity identification model, the current is obtained at a frequency of 1 second. The model inputx and output y are obtained in the same way as for the DST driving condition. The initial parameters and noise properties of the model input/output are set to be the same as for the DST condition. The initial forgetting factor is set to μ=0.99. In this section, we use a battery with an actual capacity of 100 Ah.The simulation results under the highway cycles are presented in Figure3. Particularly, Figure 3(a) plots the current profile for one highway cycle, Figure 3(b) plots the whole current profile during the entire running time, Figure 3(c) gives the battery SOC, Figure 3(d) shows the estimated capacity computed using the estimation algorithms and the actual capacity of the battery, and Figure 3(e) shows the estimation error as a percentage. In this working condition, the results have shown a similar phenomenon as in the DST condition. From the estimation results, we can see that the proposed VFF-RTLS algorithm outperforms the other three algorithms, with an estimation error below 0.1%. Of the other three algorithms, the RTLS is the best, with an estimation error below 0.4%. The RLS is the worst, with a large capacity estimation error.


### 4.1.3. Simulation Study: Battery with Degradation Behavior

In this section, a simulation study is carried out to verify that the proposed capacity estimation algorithm can effectively track a variable battery capacity. The battery is assumed to have a variable capacity to mimic degradation behavior, and the battery SOC is in a range from 90%–10%. The capacity decreases from 100 Ah to 90 Ah. The model inputx is simulated by a uniform random value from −0.8,+0.8, and then the model output y¯ is simulated by multiplying the actual capacity by the model input x¯. The initial parameters and the noise properties for the model input/output are set to be the same as for the highway cycles. The initial forgetting factor is set to μ=0.99.The simulation results are presented in Figure4. Specifically, Figure 4(a) shows the estimated capacity computed by the proposed algorithms and the actual capacity of the battery, and Figure 4(b) shows the estimation error of the algorithms as a percentage. From the estimation results, we can see that the proposed VFF-RTLS algorithm outperforms the other three algorithms, with an estimation error below 0.5%. Of the other three algorithms, the RTLS algorithm is the best with an estimation error below 1%. Both the RLS and TLS perform poorly with large estimation errors. Without considering the error in SOC estimation, the RLS algorithm does not track the varying battery capacity. And the SVD based TLS can not track the capacity precisely, and the error grows with the increasing data input. The proposed method (VFF-RTLS) in this paper can track the varying battery capacity better than the RTLS because of the variable forgetting factor, which improves the traditional RTLS performance.Figure 4
Estimated capacity from the VFF-RTLS and the other three algorithms under the degradation condition: (a) estimated capacity; (b) estimation error as a percentage.
(a)(b)


## 4.1.1. Simulation Study: Dynamic Stress Test (DST) Condition

In this scenario, the simulation study assumes that the battery has a constant capacity without any degradation and that the battery is subject to a current profile that is proportional to the power profile in the standard DST condition. The DST condition is a battery testing program designed to mimic the current of an electric car when driven on a real road. The DST current profile is shown in Figure2(a) and repeated end-to-end until the battery SOC reaches 0.Figure 2
Estimated capacity from the VFF-RTLS and the other three algorithms under the DST condition: (a) DST current profile for one cycle; (b) whole current profile; (c) input SOC with noise; (d) estimated capacity; (e) estimation error as a percentage.
(a)(b)(c)(d)(e)The RLS, TLS, RTLS, and VFF-RTLS run over an update period of 100 seconds. The update period can be determined according to a real application. In EVs, the current through the battery is always measured by a Hall current sensor with certain high precision. In the capacity identification model, the current is obtained at a frequency of 1 second and the outputy¯ is calculated by summing the measured current during the estimation update time period of 100 seconds. The model input x¯ is obtained by taking the difference between the two SOCs at the beginning and end of each estimation update period.The initial parameters and noise properties of the proposed algorithms are set as follows.Noise in the current measurement is assumed to be a random white noise with standard deviationσi=0.001A. Then, the noise in the model output y¯ is obtained by summing the cumulated current noise over 100 seconds, which is expressed as σy¯=100∗Δ∗σi/3600. Noise in the SOC is assumed to be random white noise with standard deviation σs=0.01. Then, noise in the model input x¯ is derived as σx¯=2∗σs. The tuning parameter γ1 is set to 0.001, and the initial forgetting factor is set to μ=0.99. The actual capacity of the battery is set to be 12.5 Ah.The simulation results under the DST condition are presented in Figure2. Specifically, Figure 2(a) plots the DST current profile for one cycle, Figure 2(b) plots the whole current profile during the entire running time, Figure 2(c) gives the battery SOC, Figure 2(d) shows the estimated capacity computed by the estimation algorithms and the actual capacity of the battery, and Figure 2(e) shows the estimation error as a percentage. From the estimation results, we can see that the proposed VFF-RTLS algorithm outperforms the other three algorithms with an estimation error below 1%. Of the other three algorithms, the traditional RTLS is best, with an estimation error below 4%. Since the traditional RLS only consider the error on the current measurement without the SOC estimation error, the result shows that RLS converges to a biased value and has the worst performance with a large estimation error. Owing to the errors in SOC estimation, RLS converges to a steady state with a lower speed. The SVD based TLS algorithm converges to a steady value with the increasing data input, and it is worse than the RTLS. The RTLS with an appropriate initial state can converge faster than the SVD based TLS. Our proposed method has the best performance due to the variable forgetting factor.


## 4.1.2. Simulation Study: Highway Cycles

In this scenario, the simulation study assumes that the battery has a constant capacity without any degradation and that the battery is subject to a current profile proportional to the speed profile in the highway cycles. The highway cycles are designed to test EVs driven on highways at a high speed. In a highway driving environment, the vehicle always runs at a relatively high speed. The highway cycle profile is shown in Figure3(a) and repeated end-to-end until the battery SOC reaches 0.Figure 3
Estimated capacity from the VFF-RTLS and the other three algorithms under the highway cycles: (a) highway current profile for one cycle; (b) whole current profile; (c) input SOC with noise; (d) estimated capacity; (e) estimation error as a percentage.
(a)(b)(c)(d)(e)The RLS, TLS, RTLS, and VFF-RTLS run over a period of 100 seconds. In the capacity identification model, the current is obtained at a frequency of 1 second. The model inputx and output y are obtained in the same way as for the DST driving condition. The initial parameters and noise properties of the model input/output are set to be the same as for the DST condition. The initial forgetting factor is set to μ=0.99. In this section, we use a battery with an actual capacity of 100 Ah.The simulation results under the highway cycles are presented in Figure3. Particularly, Figure 3(a) plots the current profile for one highway cycle, Figure 3(b) plots the whole current profile during the entire running time, Figure 3(c) gives the battery SOC, Figure 3(d) shows the estimated capacity computed using the estimation algorithms and the actual capacity of the battery, and Figure 3(e) shows the estimation error as a percentage. In this working condition, the results have shown a similar phenomenon as in the DST condition. From the estimation results, we can see that the proposed VFF-RTLS algorithm outperforms the other three algorithms, with an estimation error below 0.1%. Of the other three algorithms, the RTLS is the best, with an estimation error below 0.4%. The RLS is the worst, with a large capacity estimation error.


## 4.1.3. Simulation Study: Battery with Degradation Behavior

In this section, a simulation study is carried out to verify that the proposed capacity estimation algorithm can effectively track a variable battery capacity. The battery is assumed to have a variable capacity to mimic degradation behavior, and the battery SOC is in a range from 90%–10%. The capacity decreases from 100 Ah to 90 Ah. The model inputx is simulated by a uniform random value from −0.8,+0.8, and then the model output y¯ is simulated by multiplying the actual capacity by the model input x¯. The initial parameters and the noise properties for the model input/output are set to be the same as for the highway cycles. The initial forgetting factor is set to μ=0.99.The simulation results are presented in Figure4. Specifically, Figure 4(a) shows the estimated capacity computed by the proposed algorithms and the actual capacity of the battery, and Figure 4(b) shows the estimation error of the algorithms as a percentage. From the estimation results, we can see that the proposed VFF-RTLS algorithm outperforms the other three algorithms, with an estimation error below 0.5%. Of the other three algorithms, the RTLS algorithm is the best with an estimation error below 1%. Both the RLS and TLS perform poorly with large estimation errors. Without considering the error in SOC estimation, the RLS algorithm does not track the varying battery capacity. And the SVD based TLS can not track the capacity precisely, and the error grows with the increasing data input. The proposed method (VFF-RTLS) in this paper can track the varying battery capacity better than the RTLS because of the variable forgetting factor, which improves the traditional RTLS performance.Figure 4
Estimated capacity from the VFF-RTLS and the other three algorithms under the degradation condition: (a) estimated capacity; (b) estimation error as a percentage.
(a)(b)


## 4.2. Experimental Study

To validate the proposed algorithm against experimental data, an experiment was conducted on a test bench where a lithium-iron phosphate battery of 28 Ah was kept in a temperature-controlled box with ambient temperature 25.2°C. BTS-5 V-200 A battery test equipment was used to charge/discharge the battery with a maximum voltage of 5 V and maximum charge/discharge current of 200 A. It has high accuracy in voltage and current measurement, with ±0.1% of FS. A BTS 7.5.X test software system was installed on a laptop computer which generated the test current profile for the battery. Then, the experiment began with the battery fully charged. The current and voltage data were measured with a frequency of 1 second. The true battery capacity was extracted offline from a full discharge test with a small current. The battery parameters were identified offline using constant-current pulse charge-discharge experiments.The SOC estimation model parameters obtained were as follows:R0=1.1mΩ, Rp1=1.9mΩ, Rp2=3.6mΩ, Cp1=58.605KF, and Cp2=91.42KF.The OCV parameters identified offline were as follows:u0=3.38, l1=−3.03e−5, l2=0.1327, l3=0.0778, and l4=−0.00284The capacity estimation is performed as in Section3.3. The initial forgetting factor is set to μ=0.99. The experiment results are presented in Figure 5. Specifically, Figure 5(a) plots the current profile for one cycle, Figure 5(b) plots the whole current profile over the whole running time, Figure 5(c) gives the estimated battery SOC, Figure 5(d) shows the estimated capacity computed by the estimation algorithms and the actual capacity of the battery, and Figure 5(e) shows the estimation error as a percentage.Figure 5
Estimated capacity from the VFF-RTLS and the other three algorithms using experimental data: (a) experimental current profile for one cycle; (b) whole current profile; (c) estimated SOC; (d) estimated capacity; (e) estimation error as a percentage.
(a)(b)(c)(d)(e)In the experimental studies, we find a similar phenomenon as in the simulation studies. From the estimation results, we can see that the proposed VFF-RTLS algorithm outperforms the other three algorithms with an estimation error below 0.1%. Owing to the variable forgetting factor, the VFF-RTLS has a better performance than the conventional RTLS. Of the other three algorithms, the RTLS algorithm is best, with an estimation error below 0.3%. The RLS has the worst performance with a large estimation error.


## 5. Conclusion

In order to obtain a capacity estimation with high accuracy, the improved RTLS algorithm with a variable forgetting factor (VFF-RTLS) is adopted in this paper. It is based on constrained Rayleigh quotient to consider the errors in the capacity model input/output. The variable forgetting factor is developed to further improve the estimation accuracy. Compared with other algorithms through the simulation and experimental studies, the results have shown that the proposed VFF-RTLS has better estimation performance in real time. In future work, the thermal effects on the capacity estimation will be studied, and more realistic experiments will be designed to validate the proposed algorithm.



---

*Source: 9359076-2020-06-20.xml*