Iterative capacity estimation of LiFePO4 cell over the lifecycle based on SoC estimation correction

Real time state of charge (SoC) and state of health (SoH) monitoring plays an essential role in electric vehicles, hybrid electric vehicles and generally in battery powered applications. Between these two state estimations, only the SoC has been studied rigorously until the current dates, while SoH or capacity estimation are much less referenced on the literature. Additionally, the SoC and the SoH estimation are strongly correlated by widely used coulomb counting equation and consequently wrong capacity estimation would lead to a SoC estimation error, which in turn, will lead to a further capacity estimation error. In this sense, the first job was to develop the equivalent electric model, design SoC estimator and to verify both of them experimentally. Then, different alternative techniques for estimating the capacity are analyzed, selecting the best choice considering the observability degree of the object of estimation: capacity. Then, in this paper we propose a new method for estimating the capacity, called iterative transferred charge, which adapts the current capacity estimation value based on the SoC correction made by the corresponding estimator. Finally, the developed algorithm is evaluated by comparing the capacity estimation with the reference over the life of the cell, by extensive experimental tests.


Introduction
The environmental concern of the current society associated to the increasing CO 2 emissions, has lead to think in more eco-friendly vehicles. In this regard, electric vehicle (BEV) and hybrid electric vehicles (HEV) are alternatives to reduce these emissions. Moreover, the future of the transport sector is clearly targeting electrificacion and energy storage, decreasing the dependence of the fossil fuels. Nowadays, lithium ion battery technology is the most promising technology due to its outstanding properties [1,2]: high energy and power density, long cycle life, no memory effect, etc. In the course of recent research and development in the field of Li-ion batteries, iron-based olivine type cathodes (mainly lithium iron phosphate, LiFePO 4 ) were identified as promising alternatives to cathodes based on transition metal oxides (i.e. LiCoO 2 , LiNiO 2 ) in terms of power density, cycle life time and safety, due to the great thermal stability [3]. These olivine typed cathode materials are environmental benign (nontoxic) and therefore have found the way to lower-cost large scale energy storage systems, due to the involved materials being accessible in high quantities. EVS27 International Battery, Hybrid and Fuel Cell Electric Vehicle Symposium 2 However, lithium ion cells exhibit degradation phenomena [4] activated by different degradation mechanisms such as temperature, depth of charge/discharge, current rate, etc [5,6]. One of the most important degradation indicators is the reduction of capacity due to the loss of Lithium ions [4], which is used for quantifying the SoH of the cell, by comparing the actual value respect to the initial capacity value. Similarly, there is a strong correlation between SoC and SoH, as the capacity is often used to describe the dynamic evolution of the SoC [7], by the coulomb counting equation. Therefore, it is important to estimate accurately both of them. If not, wrong capacity estimation would lead to a SoC estimation error, which in turn, will lead to a further capacity estimation error. Analyzing the current state of the art, the SoH estimation has not been studied as widely as the SoC, apparently due to the complexity of it and to the required large number of experimental tests for verifying the estimation done. Different capacity estimation methods have been proposed in literature during the last years [8][9][10], but they present high computational cost [8,9], they have been checked only at one stage of the life of the cell (not over the life of the cell) or the accuracy of the estimation is dependent on the model's and the current measurement's accuracy [10]. In this regard, this paper is focused on the capacity estimation of a LiFePO 4 -graphite cell over its life cycle. The first part of this work is dedicated to model electric behaviour of the cell considering the inputs (current flow through the cell) and the outputs (voltage at the cells terminals) of the system. Then, the SoC is estimated using adaptive extended Kalman filter (AEKF) considering the observability degree of the SoC on the voltage measurement. Within the second part, different alternatives for estimating the capacity are analyzed, selecting the best choice considering the observability degree of the capacity. Then, this paper proposes a very intuitive strategy for estimating the capacity, which updates the value taking into account the SoC correction done by the corresponding estimator. Finally, the estimation done is compared against the reference over the life in order to validate the developed methodology.

Experimental Setup and Cell Features
The most important electric features of the commercial cell used in this work are shown in the Table 1. A battery cycler model HPS manufactured by Basytec was used to control the current profile (±240A maximum) and to measure different variables: current, voltage and the temperature (±0.05%, ±0.05% and ±1ºC measurement accuracy of each variable, respectively). A climatic chamber of Vöstch, shown in Fig. 1, is used to maintain environmental conditions controlled.

Open circuit voltage (OCV)
The equilibrium voltage of LiFePO 4 stands out from the rest of the Li-ion technologies due to the flat curve and pronounced hysteresis phenomenon [11]. The hysteresis phenomenon is known as the voltage difference between the equilibrium reached after charge and discharge, for identical SoC and temperature. Considering the characteristics of the OCV vs. SoC curve and the pronounced hysteresis phenomenon, special attention must be paid observing this phenomenon and to describe the electric behaviour of the cell accurately. Therefore, this section is divided into two subsections.

OCV vs. SoC
In order to observe the OCV for each SoC (see Fig. 2) the voltage relaxation technique will be used [12]. Firstly, the cell is fully charged in constant current-constant voltage mode (CC-CV, at 1C current rate until it reaches 3.65v and then is kept at constant voltage until the current is decreased below to 0.05C). Then, by definition, the SoC is set automatically to 100%. At this particular SoC the cell is rested for 24 hours for stabilization. After this rest period the measured voltage will be considered as the equilibrium voltage for this SoC. Afterwards the cell is discharged 5% of the SoC (3 minutes at 1C current rate) followed by 1 hour rest period. This discharge-rest process is repeated until the cell reaches the minimum voltage. The SoC will be set to 0% automatically when current decrease below 0.05C at this minimum voltage. The same process is repeated applying partial charges to observe the equilibrium voltage during the charge. This test was repeated at 10ºC, 25ºC and 45ºC to observe the effect of the temperature on the OCV.

Hysteresis
The hysteresis phenomenon means that the cell reaches different OCV for the same SoC and temperature, depending on the previous chargedischarge history. In order to observe the hysteresis phenomenon the cell is firstly charged in CC-CV mode and discharged to the initial SoC, SoC 0 . Then, the cell is charged 2% of SoC (72 seconds at 1C) followed by one hour rest period in order to observe the OCV. This chargerest process is repeated 15 times generating 30% of SoC difference respect to SoC 0 . Immediately, the cell is discharged in the same conditions; discharging 2% of SoC followed by one hour rest period. This step is repeated 15 times and as a consequence the SoC will be identical to SoC 0 , as the injected and withdrawn amount of charge is identical. This process is repeated for different SoC 0 (10%, 20... 50% and 60%) in order to see this phenomenon in wide range of SoC. For describing the hysteresis phenomenon, the current integration method will be used [11], shown in equations (1)(2), which considers the current profile previous to the rest. The final equilibrium voltage is estimated as weighted mean (Ψ) between the OCV vs. SoC curves of charge (OCV c ) and discharge (OCV d ). (1) The fitting of the parameters of this equation has been done using least square technique. The results are shown in Fig. 3, where the solid points represent the measured OCV and lines constitute the estimated OCV.

Internal impedance
For quantifying the internal impedance of the cell the current pulse method has been used [13]. This method consists of applying a known current pulse during 30 seconds and to observe the evolution of the cell's voltage. Then, considering the relation between the current and the voltage, the internal impedance of the cell is estimated. This process starts charging the cell in CC-CV mode and immediately it is discharged to 90% of the SoC by discharging the cell at 1C during 6 minutes. Then, the internal impedance is characterized considering current, SoC and the temperature as input variables.  Firstly, C/2 constant discharge current pulse is applied to the cell during 30 seconds followed by a rest period of identical period. Afterwards, another C/2 constant charge current pulse is applied to the cell for keeping constant the SoC of the cell. The cell is rested during one hour to reach the equilibrium state. The same process is repeated for different current magnitudes (1C, 2C, 3C, ... , 9C and 10C) in order to see the effect of the current rate on the internal impedance. The current rate was limited to 10C to respect the safe operating area defined by the manufacturer. This process is repeated for different SoC (90%, 80%...20%, 10%) and temperatures (10ºC, 25ºC and 45ºC) and as a consequence the internal impedance will be characterized for different current rate, SoC and temperature. According to Fig. 4, the cell exhibits quick voltage drop due to the current rate. Similarly, during the constant current period the voltage present an exponential decreasing. This electric behaviour can be described by a first order Randell model [7]. Accordingly, the equivalent electric circuit shown in Fig. 5 will be used to describe the electric behaviour of the cell. The fitting of each parameter of the equivalent model (R, R 1 and C 1 ) is done using least square technique as it was done previously with the hysteresis model parameters. According to the results show in Fig. 6, the resistance value (R) is indifferent to current magnitude.  However, R1 presents a general trend of decreasing as the discharging current is increased. Nevertheless, it presents a small increasing at current rates above to 7C, according to the results. Consequently, the effect of the current magnitude has to take into consideration for accurate electric modelling.

Electric model verification
First of all, the equations that meet with the equivalent circuit shown in Fig. 5 are developed in the discrete space state form. The state vector contains the SoC, the voltage across the R 1 C 1 network and the voltage drop in the Ohmic resistance R. (3) To describe the dynamic evolution of the SoC, the coulomb counting equation has been used considering the nominal capacity of the cell (C n ) and the simulation step time (h). Similarly the values of the OCV and the internal impedance parameters are updated continuously to each working condition. This update will be done accordingly to the input variables of each subsystem: SoC, T, Ψ and I. For quantifying the developed model's accuracy the battery has been charged in the conventional CC-CV mode. Then, it has been discharged continuously under New European Driving Cycle (NEDC) profile until the cell reaches the minimum discharging voltage. The comparison between the measurement and the estimation is shown in Fig. 7. The result has been excellent, having an average absolute error of 0.65%.   Additionally, the maximum error in 100%-5% SoC range has been low, below to 3.5%. However, during the last part of the discharge, the cell's voltage decreases below 2V and the equivalent model estimates 2.6V, being the maximum error up to 30% for very small period of time (10 seconds). Anyway, the developed equivalent model is considered accurate and valid for the next steps: SoC and SoH estimation.

SoC estimation
During the last years several methods have been proposed [14] by different research groups for estimating the SoC: ampere hour counting [15], discharge test, open circuit voltage measurement [16], impedance spectroscopy [17,18], linear equivalent methods [19], neural networks [20], fuzzy logic [20], stochastic filters [21], etc. However, most of them, they present some disadvantages such as measurement's accuracy or long rest period's dependency, technical complexity or the necessity to perform long training tests. In this sense, stochastic filters are very good alternative to due to the state updating by means of the comparison between the estimated and measured result.

Extended Kalman Filter (EKF)
Within the stochastic filters, the EKF is very good choice due to the capability to work with non linear systems, such as batteries. The filter is graphically described in Fig. 8 and it consists of three steps. 0. Initialization: a-posteriori state vector ( ) and the covariance matrix are ( ) initialized. 1. State prediction: a-priori estimations of the state vector ( ) and the covariance matrix For being applicable the Kalman Filter theory to non linear systems, the EKF calculates the first derivates of the state and output equations.
Similarly, and are defined as white noise vectors, zero mean and and covariance values, corresponding to the process noise and measurement noise, respectively.
Bearing in mind the main objective of this section, the updating of SoC based on voltage correction, the observability degree of the SoC on the voltage measurement is calculated, based on the developed equivalent model. For doing this, the total derivate of voltage prediction respect to the SoC is calculated. In other words, this equation symbolizes how much will change the voltage at the cell terminals if the SoC changes.  3. Update the error covariance.
Step 1:State Prediction The equation (9) is disclosed in three partial derivates, one of each state variable respect to the SoC. The first term is shown in Fig. 9, the derivate of OCV respect to the SoC (very low change, below 1 mV in a wide range of SoC), is always observable as this is not depending on the current rate ( ), while the other two variables depends on the current rate. variable, see equation (10), is more observable when the resistance presents big change over the SoC and big current magnitudes. Regarding to the observability of , this is not only dependant on the R 1 and C 1 variance over the SoC, this is strongly depending on the current magnitude and on the variance of it. In constant charge or discharge, when the V c1 reaches a steady voltage, the first term of equation (11) will be zero, reducing the observability degree of SoC on the voltage measurement. Therefore, the observability of SoC regarding to this state variable will be bigger when the current presents big magnitude and variance. As a conclusion of this study, the observability degree of the SoC is not only depending on the chemistry of the cell, the input of the system plays an important role on this particular estimation. Therefore, this knowledge will be used for proposing an adaptive EKF (AEKF) to enhance the performance of the filter. The variability of the filter is proposed by modifying the process noise covariance as it is shown in the equation (12). The measurement noise covariance is assumed to be constant, shown in (13).

SoC estimation verification
After proposing the AEKF, the performance of the filter is quantified. Firstly, the cell is charged in conventional CC-CV mode and the SoC is automatically set to 100%. Then, the cell is discharged under 6 dynamic stress test cycles (DST) and immediately it is charged using the same power profile (6 DST cycles) with 50% of power. This reduction of power has been done to avoid exceeding the maximum charging current peak. Afterwards, the cell is allowed to rest during 30 minutes and it is discharged at constant current at 1C during 20 minutes. Finally, the cell is fully charged again in CC-CV mode. This process is repeated three times and the SoC reference corresponding to this current profile is shown in Fig. 10 as top line. The rest of the estimations are initialized incorrectly (10%, 20%, 30%, 40% and 50% SOC error) to observe the convergence of the estimation through the reference. During the test, the SoC reference has been calculated by the coulomb counting method due to the excellent measurement accuracy of the equipment used in this work (±0.05%). As it can be seen in Fig. 10, all the incorrect estimations reduce initial error and they converge through the reference (continuous blue line). The error is reduced specially at the end of the charging processes, where the observability degree of the SoC is increased and as a consequence the estimator is able to correct the estimation.

SoH estimation
In literature, the capacity of the cell has been estimated using different strategies based on double stochastic filters, which presents high computational cost. Additionally, the capacity of the cell has been estimated only at one stage of the life without verifying the performance of the  algorithm at other degradation states. In this sense, in this section a very intuitive and easy implementable method will be proposed, and validated by extensive tests.

Capacity observability degree
The first challenge when estimating a non measureable variable is to find the best indicator of it. In this case, two alternatives will be studied for capacity estimation; based on voltage measurement and on SoC estimation.

Voltage measurement
The voltage at the cells terminals is an output variable of the system that can be measured directly. In this sense, it will be quantified how much will change the voltage if the capacity changes. This will be observed obtaining the total derivate of the output equation respect to the capacity.
(14) Figure 11: Capacity observability on the voltage. During the development of the equation (14), the derivate of different impedance parameters respect to the capacity is assumed to be zero. The numerical values of equation (14) are shown in Fig. 11 and according to the results, the voltage differences generated by capacity change are very low and hardly measureable using conventional equipment.

SoC estimation
The second alternative is to study how much will change the SoC estimation due to capacity deviation. This SoC difference is described by the equation (15). (15) According to this equation, the capacity estimation deviation will be more observable with bigger capacity deviation and when the experimental test is carried out for longer period of time, namely bigger N. This SoC deviation generated by wrong capacity estimation is quantified in Fig. 12. As it can be seen, the SoC will diverge from the reference proportionally to the capacity deviation and to the elapsed time (assuming constant ). As a conclusion of this study can be stated that the capacity deviation will generate a SoC deviation and accordingly, it can be used for updating the capacity.

Iterative transferred charge method
The basis of this method is shown in Fig. 13 and it consists of analyzing the relation between the transferred charge and the SoC change generated by this. In this example can be seen the transferred charge to from empty to full charge state in two different cells: partially and fully degraded cells. Taking into account this degradation indicator, the algorithm shown in Fig. 14 is proposed [22]. It basically consists on two steps: identifying a starting point and updating the capacity. At the beginning of the test the capacity will be initialized and the state of the cell, by default, will be set to "Rest" state. Assuming that the cell is discharging, during the first iteration of the flowchart, the algorithm will change status of the cell from "Rest" to "Discharging" state. Then, it will check if the transferred charge (Q) in the previous state has been higher than the minimum transferred charge (Q min ). As long as this requirement is not met, the algorithm will reinitialize all the variables. During the next iterations the algorithm will compute the transferred charge until the current flow direction changes. As the status is "Discharging" the algorithm will change the status to "Charging" state. If the transferred charge is bigger than the minimum, the algorithm considers that this situation is a suitable for updating the capacity and it updates. A similar process occurs following the designed flowchart when the cell is discharged after charging process. After identifying a suitable situation for updating the capacity, the capacity is updated according to equations (16) and (17).
In equation (16) the SoC error generated by wrong capacity estimation is evaluated. For that, the transferred charge in the previous state ( ), the estimated capacity in the previous iteration ( ) and the initial and the final SoC estimation will be used . The SoC estimation provided by the AEKF is assumed to be closed from the true SoC as this state is updated considering the real voltage measurement. Finally, the capacity is updated in (17) considering the SoC error, the transferred charge, gain coefficient and the capacity value in the previous iteration.

Capacity estimation verification
In order to quantify the accuracy of the capacity estimation over the life of Li-ion cell, the methodology shown in Fig. 15 has been designed. The first step is to evaluate the initial capacity. For that, the cell was charged in CC-CV until the charging current was decreased to 0.05C. Similarly, the cell was discharged until 1C current rate and then kept at minimum voltage until the current decreased again below to 0.05C. Thus, according to the adopted definition in this work, the cell is discharged from 100% to 0% of SoC. The discharged ampere hours in this test will take as an initial capacity. If the SoH of the cell bigger than the minimum (80% of the initial capacity) the cell is subjected to an accelerated degradation, where the cell is charged/discharged at 3C current rate. After 150 cycles, a predetermined current profile will be applied to the cell. This current profile contains partial and full charge/discharges, continuous and variable current and rest periods. The objective of this current profile is to emulate the current profile of real application and the designed algorithm for capacity estimation will be applied to these results. Afterwards, the capacity will be measured as it was done in the first step of the methodology. This process is repeated until the end of life. From different iterations of the methodology, the measured capacity decrease due to the degradation process of the sample. As a consequence the estimation reference will present a stepwise profile. Similarly, the results of the capacity estimations of different iterations from Fig. 15 will be concatenated and as a consequence the estimation should follow the reference value.
In order to ensure that the algorithm works as expected under different situations, the capacity is initialized intentionally with wrong values, with an excess of +15%, +10%, +5%, 0%, and -5% respectively. The capacity shows a decreasing trend and as a consequence it will be more common to have positive initialization errors than negatives. The evolution of such different initializations can be seen in Fig. 16, where most of the estimations (-5%, 0% and 5%) converge to the same value very quickly. However, the estimations with higher initial error (10% and 15%) take more time to converge. Nevertheless, once all the estimations converge to the same value, this follows the capacity reference value. The accuracy of each estimation respect to the reference value is shown in Fig. 17 and the absolute maximum capacity error has been found below 4% over the life of the battery once they reduce the initial error.

Conclusions
In this paper a new, simple, implementable and accurate capacity estimation method has been proposed. Firstly, the equivalent electric circuit has been obtained (0.65% of mean absolute error). Secondly, an AEKF algorithm has been proposed by modifying the process noise covariance matrix considering the SoC observability degree on the voltage measurement. This estimation has been validated under NEDC current profile starting from different SOC initial errors and converging to the reference value. Finally, iterative transferred charge method has been proposed for capacity estimation. The absolute error on capacity estimation has been below 4% over the life of the cell, corroborating the capability of this method to estimate the capacity of LiFePO 4 -Graphite cell. As for the next steps, this research will be focused on further research in capacity estimation and on the internal impedance real time estimation. The increasing of the internal impedance is the second main indicator of the cell degradation status after capacity loss, which is directly correlated with the maximum power that can be charged and discharged the cell at any time.