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.

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 [24]. 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) [1216] 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 [2426]. 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 by matrix have computational complexity of , it can incur high computational complexity [3436]. 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: Section 2 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:where is the estimated capacity of the lithium-iron phosphate battery in ampere-hours (Ah) and is the measured current. is coulomb efficiency, with the assumption that . is the sample time. is the current measurement error, with standard deviation . denotes the SOC estimation error.

We convert equation (1) into an iterative form as follows:where is the capacity update time period, , and is the differential SOC error, .

Then, equation (2) can be simplified into the following expression:where denotes the difference between the battery SOCs at the beginning and end of the update period, denotes the cumulated measured current within the update time period , and is the cumulated measured current error, .

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 input is defined as follows:

The augmented input vector is defined as , and its autocorrelation matrix can be represented as follows:where and .

The stochastic quantities can be computed via an iteration formula with a forgetting factor (), as follows:

Then, , , and can be expressed as follows [38]:

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 [3942] and references therein for details. In other words, the proposed method is to solve the following optimization problem:where denotes the Frobenius norm.

It has been shown in [40] that optimization problem (10) is equivalent to minimizing the Rayleigh quotient :where is the eigenvector associated with the smallest eigenvalue of the symmetric positive-definite matrix in the TLS solution and is a symmetric matrix.

For the capacity estimation, a constrained Rayleigh quotient is used as a cost function where and in equation (11) are replaced with and , respectively. The capacity estimation problem, therefore, has the following constrained Rayleigh quotient cost function:where represents the estimated capacity of the LiFePO4 battery and is a weighting matrix with , where is the standard deviation of the differential SOC error , and is the standard deviation of the cumulated current error .

According to reference [42], the estimated capacity of the battery can be updated as follows:where can be determined by minimizing , which can also be rewritten as .

To find , let the gradient of with respect to be equal to zero. Then, we obtain by solving the following equation:

In order to calculate , (14) can be rewritten as

The polynomial coefficients of (16) are derived as follows:where

Thus, we can obtain the solution of equation (15), which is given by the following [38]:

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 , with respect to , as follows:where is a tuning parameter.

Using equations (7) and (9), we can show that equation (12) is equivalent toand its derivative is easily computed as follows:

Thus, we obtain the updating equation for the forgetting factor:

Finally, the details of the improved RTLS algorithm are summarized in Algorithm 1. In this paper, , , , and are initialized to zero. The tuning parameter is set to 0.001. The forgetting factor is initialized to 0.99.

Initialization of
For
(1)Input the battery SOC difference
(2)Input the cumulated current
(3)Update of with (19)
(4)Update of with (20)
(5)Update of , , with (7)–(9)
(6)Update of , , with (16)–(18)
(7)Update of with (22)
(8)Update of with (13)
(9)Update of with (26)
(10)Update of 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:where is the internal resistance, and are the polarization resistance, and are the polarization capacitance, is the estimated capacity, is the loading current (positive for discharging and negative for charging), and , , , and 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 , , and . can be described as a function of estimated SOC. The relationship between and SOC is defined as follows:

The OCV parameters , , , , and 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 voltage , are chosen as the state variable in the state-space model. The input and output of the model are the measured current and terminal voltage , respectively.

The detailed estimation process can be explained as follows:(1)Initialization:where is the initial state estimation, and is the square root of the error covariance matrix.The weight vector is defined as follows:The sigma vector is initialized as follows:with , and the sigma vector is iteratively calculated as follows:Then, the sigma points are given by(2)Time update:where denotes the QR decomposition of the compound matrix in (36), denotes the Cholesky update of (36).(3)Measurement update:

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 Figure 1.

As shown in Figure 1, 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 Figure 2(a) and repeated end-to-end until the battery SOC reaches 0.

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 output is calculated by summing the measured current during the estimation update time period of 100 seconds. The model input 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 . Then, the noise in the model output is obtained by summing the cumulated current noise over 100 seconds, which is expressed as . Noise in the SOC is assumed to be random white noise with standard deviation . Then, noise in the model input is derived as . The tuning parameter is set to 0.001, and the initial forgetting factor is set to . The actual capacity of the battery is set to be 12.5 Ah.

The simulation results under the DST condition are presented in Figure 2. 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 Figure 3(a) and repeated end-to-end until the battery SOC reaches 0.

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 input x and output 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 . In this section, we use a battery with an actual capacity of 100 Ah.

The simulation results under the highway cycles are presented in Figure 3. 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 input is simulated by a uniform random value from , and then the model output is simulated by multiplying the actual capacity by the model input . 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 .

The simulation results are presented in Figure 4. 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.

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: , , , , and .

The OCV parameters identified offline were as follows: , , , , and

The capacity estimation is performed as in Section 3.3. The initial forgetting factor is set to . 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.

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.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This project was partly supported by the National Natural Science Foundation Joint Fund Project of China (U1664257) and partly supported by Guangxi Scientific Research and Technology Development Plan Project (14122002-4).