Online Parameter Estimation of a Lithium-Ion Battery based on Sunflower Optimization Algorithm

State of charge (SOC) estimation of the battery is crucial for electric vehicle application. The accuracy of the commonly adopted estimation algorithms depends on the accuracy of the model used to describe the characteristics of the battery. Since the parameters of the battery model are functions of the SOC, temperature, and aging, all of the parameters are subject to change and need to be identified in real-time, this is referred to as online identification. We propose in this paper a new algorithm based on sunflower optimization algorithm (SFO) to extract the parameters of the model, and estimate the terminal voltage in real-time. The precision of the model parameter identification was confirmed using experimental data collected from the center for advanced life cycle engineering (CALCE) battery group conducted on the A123 battery cell under three dynamic profiles. Comparison between SFO and AFRRLS (Adaptive forgetting factor recursive least squares) is established in order to prove the effectiveness of the suggested algorithm. SFO showed better parameter identification that AFFRLS. To the best of our knowledge this is the first attempt to use SFO to estimate battery parameters in real-time, we believe there is a room of improvement to achieve better results.


I. INTRODUCTION
Lithium-ion battery has become a major energy storage, owing to the fact that it proposes better performance in terms of energy efficiency, life cycle, and thermal stability, in comparison to other technologies. Moreover, Lithium-ion batteries have low levels of toxic metals found in other types of batteries, (NiCd) like nickel-cadmium and lead-acid batteries [1].
To make the most of a battery, it must be equiped with an efficient BMS (Battery management system) which not only guarantees the surveillance of the battery for example via SOC (state of charge) and SOH (State of health) indicators, but most importantly ensures the security and equilibrium between different battery cells. One of the most critical duty of a BMS is SOC estimation, as this indicator is essential for cell balancing, capacity and state of health estimation and so on [2][3].
SOC cannot be measured directly. Thus, a precise estimation is required from the BMS. State of charge prediction methods can be split into two groups: model and non-model approaches. Model-based algorithms have better performance. Examples include the Partnership for a New Generation of Vehicles (PNGV) model, Thevenin model, the general nonlinear (GNL) model, the Rint model etc. [4] Techniques such as: Sliding mode observers [5,6], Kalman filters [7][8][9], H∞ filter [10], particle filtering (PF) [11,12] have been used to predict battery SOC. The effectiveness of these methods relies to a great extent on the accuracy of the battery model. The battery model used in these methods is based on fixed model parameters (the model parameters are fix), in this case the battery model parameters are extracted by an offline identification.
However, during charging or discharging, some parameters are disturbed by factors such as temperature, SOC, and battery aging, which lead to SOC estimation error. Constantly updating the parameters of the model, also referred to as online parameter identification can solve this problem for BMS. In this work, we suggest a new algorithm based on the sunflower optimization algorithm SFO to identify battery parameters in real time (online). The algorithm extracts Thevenin model parameters. The suggested algorithm can be furthermore combined with techniques such as Kalman filter KF, Particle filter PF to predict state of charge (SOC) or the state of health (SOH) of a lithium-ion battery.
To measure the effectiveness of the suggested method, we used experimental data performed on the A123 battery cell under three dynamic profiles named: dynamic stress test (DST), The US06 Supplemental Federal Test Procedure, and the Federal urban driving schedule (FUDS), the used data are gathered from the center for advanced life cycle engineering (CALCE) battery group. Comparison between SFO and AFFRLS is established in order to prove the ability and accuracy of the presented algorithm. Results show that the calibrated model using SFO has superiority compared with AFFRLS algorithm to simulate dynamic voltage behaviour of a lithium-ion battery.
This paper is split into five sections arranged as follows: section 2 presents the battery model structure. section 3 describes the proposed sunflower optimization algorithm. section 4 contains the implementation setup, findings and discussion. Finally, Section 5 presents the conclusion.

II. BATTERY MODEL
Equivalent circuit models (ECMs) are usually employed by BMSs to describe battery behaviour. Thevenin models can be built with n RC elements [15], normally 3 RC elements are sufficient to describe the dynamics of the battery [16]. In this paper one RC n=1 network is used (R1, C1) as shown in Fig. 1

V=Vocv-R0*I-U1
(2) We can derive the equation bellow from the relationship between current i and voltage U1 across the network RC. (3)

Fig. 1. Equivalent circuit model
State of charge (SOC) is the ratio between residual capacity and total capacity. SOC is expressed by the coulomb counting equation: Where Q is the battery nominal capacity, SOC level at time t0 is denoted by SOC(t0), η is an efficiency factor known as coulombic efficiency, the current i(t) is assumed to be negative when charging and positive when discharging.
The parameters identification problem is expressed as a state space model. Using Fig. 1 and equations (1), (3) and (5), the state space model for the battery dynamics is formulated by the following equations: Where: ∆t represents the sampling time interval.

ALGORITHM
The SFO is used to identify the parameters (K0, K1, R0, R1, C1) of the state space model discussed in the precedent section and to estimate the battery output voltage V(k). As SFO is an optimization algorithm, an objective function has to be set to fit the estimated terminal voltage with the experimental measured voltage. The objective function used is based on the minimization of squares error between experimental data and model-based simulation result. This function is considered as the main objective function.
Where Vhat is the estimated output voltage and Vex is the true measured voltage.
The objective function described in (7) are resolved by SFO susceptible to the following constraints, min and max refers to the minimum and maximum values of battery parameters:

A. Sunflower optimization algorithm SFO
SFO is a recent optimization technique which depends on the inverse square law radiation [13,[17][18][19], it is a population based natural inspired algorithm first proposed in [19], SFO imitates the movement of the sunflowers towards the sun. The radiation intensity received by sunflowers depends on their respective distance from the sun, it is expressed according to the following equation: Spower is the sun power and Srad is the sun radiation intensity which depends on the sun power and the square distance d between the sunflower and sun. The direction Si of each sunflower(plant) toward the sun is expressed by: n is the population number of sunflowers. X*, and Xi are respectively the best and current position of sunflowers toward the sun. every sunflower is stepped to the sun by di expressed as: λ is the inertial displacement of sunflowers, Pi ‖X i +X i-1 ‖ refers to the probability of two adjacent sunflowers pollination. The step of each sunflower is restricted as follows:   In this paper, we use the SFO algorithm to extract in realtime the battery model parameter (K0, K1, R0, R1, C1) discussed in section 2. The flow chart of the algorithm proposed is illustrated in Fig. 2. The algorithm starts by building the state space model and initializing the SFO parameters. To make the algorithm converge fast we used small Npop (population size, Npop=5) and set the maximum iteration to 10. For every new sampled value of instantaneous current i(k), the algorithm calculates the estimated output voltage using (5) and (6), then deducts the objective function (7). Afterwards SFO takes over to estimate the parameters with an aim to minimize the objective function (the deviation between experimental and estimated terminal voltage). The algorithm won't stop until the objective function is below a set threshold. We allow however the algorithm to skip SFO function when the relative output voltage is less than 1% in order to speed up the estimation process.

IV. RESULTS AND DISCUSSION
We compare the SFO algorithm Fig. 2 and AFFRLS proposed in [14] in this section. We stress, that we are going to compare the algorithms not the models. The parameters for AFFRLS are taken from [14]. Table 1 shows the parameter of the proposed SFO. Table 2 presents the estimated battery parameters boundries.  To evaluate the precision of the above algorithms, we used real data collected from the center for advanced life cycle engineering battery group (CALCE) conducted on the A123. We used a dataset for this battery cycled according to three dynamic profiles named: Dynamic Stress Test (DST), The US06 Supplemental Federal Test Procedure, and the Federal urban driving schedule (FUDS) protocol at 25°C kept steady over cycling through a temperature chamber [20][21][22]. CALCE used the custom-built battery test bench to obtain these data, the test bench includes: A thermal chamber to regulate temperature, an Arbin BT2000 battery test system to supervise battery charge and discharge, Arbin software to visualize and control data information on a host computer, and lithium battery cells [20][21][22]. The constant current constant voltage (CCCV) was utilized to charge the Samsung A123 battery cell. Data were collected for different temperatures [20][21][22]. We exploited data that was performed at 25°C.
The DST, US06 and FUDS are common driving cycles which are often used to evaluate battery models and estimation algorithms, the A123 battery cell is stressed with these three dynamic profiles consecutively, as shown in Fig.  3 where we plot the current. We can see that the cell's current varies between -4A and +2A. Under these conditions, the soundness of the examined algorithms can be well examined.
We run the algorithms SFO and AFFRLS to estimate the parameters (K0, K1, R0, R1, C1) and the output voltage (terminal voltage) of the battery.in every cycle we supply measurements stored in the dataset (the current and voltage) to both algorithms. In Fig. 4, we plot the battery parameters identified by AFFRLS and SFO. In Fig. 5 we plot the true measured voltage and the estimated output voltage by both algorithms. As highlighted in Fig. 4, the parameters determined by the SFO algorithm fluctuate more, which is expected since the identification process of SFO algorithm relies on random initialization of the estimated parameters (within the boundries) which happen in every cycle.
However, the parameters depicted by AFFRLS are more stable except for one rare spike in R1. The parameters of AFFRLS smoothly evolve with the oscillations of the current. This can be explained by the fact that AFFRLS relies on past values to determine the future values, hence the smoothness of the predicted parameters compared with SFO algorithm. To better assess the algorithms, we are going to take a close look to the estimated output voltage. Estimated terminal voltage using SFO and AFFRLS and true output voltage are plotted in Fig. 5. The estimated error for both methods is displayed in Fig. 6.  Both algorithms are able to estimate the output voltage as revealed in Fig. 5. Zoom of the Fig. 5 in the three dynamic profiles is depicted in Fig. 6, Fig. 7 and Fig. 8.
A closer look to the estimated voltage error shows that SFO has a narrow voltage error compared to AFFRLS as obviously seen in Fig. 9. Estimated error for SFO varies between -0 .03V and +0.03V, this results from the fact that we defined a strict threshold to the objective function (10 -5 ). AFFRLS however showed an estimated error that exceeds in most time 0.2V, the pic recorded was 0.5V This means that SFO algorithm have better parameter estimation than AFFRLS. In this study, one RC Thevenin battery model is constructed using state space equations. The model developed is appropriate for electric vehicle application.
The identification of the circuit model parameters based on SFO is proposed and compared with AFFRLS algorithm. The estimated output voltage picked up by the above algorithms is compared with the real measured output voltage. To compare the effectiveness of the equivalent circuit model parameter identification, data performed on the A123 battery cell by CALCE Battery Research Group for three dynamic tests named: DST, US06 and FUDS were employed.
We supplied the data (current and voltage) to both methods and compared the estimated terminal voltage. Results show that SFO has superiority compared to AFFRLS algorithm to simulate dynamic voltage behaviour of a lithium-ion battery. In fact, SFO was able to predict output voltage with an error that doesn't exceed ±0.03V compared with AFFRLS who recorded a peak of 0.5V. This means that SFO algorithm is more accurate than AFFRLS in terms of parameter identification ability.
As far as we know, this is the first attempt to use SFO to estimate battery parameters in real-time, we believe there is a room of improvement to achieve better results in term of speed and accuracy .In addition, the algorithm proposed can be furthermore adjusted and combined with techniques such as Sliding mode observers, Kalman Filters, H∞ filter, or Particle Filtering (PF) to predict the SOC or SOH of a lithium-ion battery.