Design of an efficient Battery Model using Evolutionary Algorithms

Received Jul 12 th , 2018 Revised Aug 5 th , 2018 Accepted Aug 24 th , 2018 Batteries play a vital role in current scenario of energy storage, even though many techniques of energy storage are available, since the time taken to start delivering the stored energy is very less. The battery life time depends upon its charging and discharging characteristics, which are in turn, depend on the internal parameters of battery. These parameters include resistance, capacitance and open circuit voltage. The amount of energy stored in the battery can be calculated by estimating these parameters. In this paper, an optimized model for Lithium ion batteries is presented using evolutionary algorithms to estimate the internal parameters of the battery over different charging and discharging rates. A sample EIG make, 2.5 V, 8 Ahr Lithium ion battery is modeled using two evolutionary algorithms such as genetic algorithm and Covariance Matrix Adaptation Evolution Strategy (CMA-ES) for different charging and discharging rates. The results of two algorithms are compared with the catalog values given by the manufacturer in order to identify the appropriate algorithm for battery modeling and validation. This paper concludes that battery characteristics obtained by CMA-ES algorithm match with the measured manufacturer characteristics. Keyword:


Introduction
Developing countries like India has shortage of power, particularly during peak hours.During off peak hours, the generating stations are underutilized and during peak hours the generation is insufficient to meet the required demand [1].So there exists a gap between the generation and demand of power.This gap can be bridged if there exist an Energy Storage Device (ESD) to store the excess power from the generating plants during off peak hours and deliver the same during peak hours.The rapid growth in the field of renewable energy resources has increased the overall installed capacity of the country.However, these renewable energy sources are seasonal and cannot be considered as available energy source.Insufficient forecasting techniques also lead to the usage of ESD at available period.The ESD's that are commonly used are battery, super capacitor, super conducting magnetic energy storage and flywheel energy storage system.Despite the availability of many ESD's, batteries are effective, since they deliver the stored energy in very less time.But the efficiency of the available batteries in the market is very less.However these batteries are charged during off peak hours, the energy transfer from them to grid during peak hours may not be sufficient.This is because the available power in the batteries is dependent on their characteristics.Every battery has its own characteristics.The frequent charging and discharging of batteries result in the degradation of the internal circuit parameters like state of charge, depth of discharge, charge rate and discharge rate [2,3].The lifetime of the battery depends upon these parameters.Hence it is necessary to study and analyze the battery characteristics for increasing efficiency.
The different types of batteries available are lead acid, lithium-ion, alkaline battery, etc. Lithium ion batteries are the most efficient of all [4].There are four types of battery models available such as electro-chemical models, experimental models, mathematical models and electric circuit models.Of all these four, electric circuit models are best suited to represent the characteristics of EV battery.Wardburg impedance model is taken as the base model.It consists of an open circuit voltage in series with a resistance and a parallel RC circuit.To model a battery, the internal circuit parameters must be estimated.But the estimation of these parameters is tedious due to their non-linear behavior.Soft computing techniques are used nowadays to estimate them.
In this paper, Covariance Matrix Adaptation Evolutionary Strategy (CMA-ES) is applied to estimate them for EIG make, 2.5 V, 8 Ahr Lithium ion batteries under different charging and discharging rates.The algorithm results are promising and compared with the catalog values given by the manufacturer for validation.
The paper is organized as follows: Section 2 describes the proposed battery model.Section 3 explains the CMA-ES algorithm.Section 4 deals with the parameters estimation and the design verification by comparing the results with manufacturers' data.Section 5 concludes the research work.

Battery Model
An Electric Equivalent Circuit for Li-ion battery [5,6] is shown in Fig. 1.

Fig. 1 Electric Equivalent Circuit for Li ion battery
The charging and the discharging characteristics as per manufacturer's catalogue data are shown in Figure 2.These characteristics are measured at different charge/discharge rate.From the Figure 2, it is inferred that these characteristics are exponentially increasing and decreasing with respect to rate of charging or discharging.Hence a polynomial equation with exponential function is used to represent the characteristics of the battery.Fig. 2 Charging and discharging characteristics of battery as per manufacturer's data [6]

Internal battery parameters
The general polynomial equations for the calculation of internal parameters of the battery are given below [5].
where R 1 , R 2 , C are internal parameters and are represented in terms of polynomial equations; V 0 is the voltage between the terminals of battery in open circuit condition.A set of 31 coefficients are used in the above set of equations to represent the parameters in terms of polynomial equations.The battery parameters can be derived by replacing x and y with Cr and SOC cr , for charging process, whereas for discharging process with Dr and (1 − DOD cr ).

Battery charging/discharging voltage
The battery terminal voltage for charging and discharging scenario with respect to time under constant current is given in Eq. 5 and Eq. 6 [5]. )) Where Q r is the rated capacity of the battery, t c , I c , t d and I d are charge time, charge current, discharge time and discharge current, respectively.The accurate behavior of any type of battery can be represented by Eq. 5 and Eq. 6, if the parameters are accurately estimated.The nonlinear behavior of the battery can be captured by the above equations and depends on the actual battery charge/discharge voltage.

Charge/Discharge Rate and SOC calculations
The charge or discharge rate algorithm is used to determine the amount of energy stored or discharged from the battery.The C r and SOC cr of the battery vary depending on the present condition of the battery.The battery status is checked and the current charge rate (C crt ) of the battery is calculated by the control algorithm developed inside the battery.User defined C r limit (C lmt ) and initial battery SOC (SOC ini ) are also taken into account .The and of the battery can be expressed as given below [6].
The above are calculated based on present status of the battery, which is the ratio of current and remaining capacity of the battery.The minimum of charge rate based on the C lmt and C crtr charge is found by the algorithm to regulate the charge current of the battery.This type of control algorithm is used for discharging scenario.The SOC cr and DOD cr can be calculated from Eq. 9 to Eq. 10.
) 3600 ( Here, SOC ini is the initial SOC of the battery.The SOC max and DOD max are the maximum user defined SOC and DOD limits.

Objective function
Battery parameters are estimated with population based search using bio inspired evolutionary algorithms based optimization technique.The aim of using evolutionary algorithms is due to the fact that it needs only manufacturers C r and D r Characteristics for giving polynomial coefficient in relatively less iteration.Also, evolutionary algorithm is more flexible in estimating the battery parameters with any initial values, while other analytical techniques are not capable of obtaining feasible solutions.It is easy to understand and can be optimized using fitness function.
Different types of manufacturers' data of Li-ion batteries are considered for estimation purpose.The main objective of the algorithm is to optimize the battery parameters polynomial coefficients (a 1 − a 31 ) to evaluate the equations given in Eq. (1) to Eq. ( 6).
The requirement after generation of random solution set is to measure the quality of solution set.This can be achieved by establishing a fitness function F(x), which is rated by each solution according to its fitness.The difference between the measured ( ) and calculated voltage for charging and discharging cases ( ) are determined with Eq.(5) and Eq.( 6) respectively.Based on the calculated fitness value, the best list gets updated and the lowest fitness is discarded.The mathematical formulation of fitness function f(x) for charging and discharging scenario is given in Eq.( 11) -(12).

Covariance Matrix Adaptation Evolution Strategy
Several evolutionary algorithms have been emerged so far to solve the single objective optimization problems.A recent approach for adapting the search direction is Covariance Matrix Adaptation Evolution Strategy (CMA-ES).It's important property is invariance against the linear transformations in the continuous search space, when compared to other algorithms.CMA-ES is a strong optimizer that outperformed its other similar learning algorithms in CEC2005 benchmark functions [7,8] and BBOB-2009 benchmark functions [9].Hence, an attempt is made to optimize the Battery Modelling design using CMA-ES for the first time in this research work.
Evolution Strategies are stochastic, derivative free methods for numerical optimization of non-linear problems.CMA-ES is proposed by Hansen and Ostermeier [10].CMA-ES is an efficient ES for problems where derivative based methods are unsuccessful due to rugged search space with multiple discontinuities, sharp bends, and local optima.This algorithm is analogous to gradient based quasi-Newton method.CMA-ES has emerged as a very competitive real-parameter optimizer for continuous search spaces.It adapts two unique principles; maximum likelihood principle and two evolution paths and thus distinct from other ES.
It is a continuous evolutionary algorithm that generates new population members by sampling from a multivariate normal distribution N(m, C) constructed by its mean value, m ε R n and its symmetric positive definite covariance matrix, C ε R nxn during the optimization process.'m' of the distribution determines the translation displacement and gets updated such that the likelihood of previous successful candidate solutions are maximized.'C' has geometrical interpretation, can be uniquely identified with the iso-density ellipsoid [10].'C' determines the shape of the distribution ellipsoid, whose principal axes are Eigen vectors of 'C' and squared axes lengths are Eigen values.This algorithm exploits two adaptation mechanisms; covariance matrix adaptation (CMA) and step size (σ) adaptation.
CMA learns all pair wise dependencies between the variables and increases the probability to repeat the successful steps.One evolution path, enhances CMA procedure in place of single successful search steps and facilitates possibly much faster increase of favourable directions.CMA identifies the function landscape which is convex-quadratic one with the concept of Hessian matrix (H).The CMA-ES estimates the inverse Hessian matrix (H -1 ) in the form of a covariance matrix of the search distribution within an iterative procedure.Setting C = H -1 on convex quadratic function is to rescale the ellipsoid projection of the multivariate normal distribution into a spherical one.The aim of CMA is to approximate the matrix, 'H' and to closely suit the search direction to the contour lines of the objective function to be optimized [69].For a particular function, landscape if it becomes qualified to convert it into a spherical projection by correspondingly adapting the Eigen-decomposed matrix, then the algorithm converges fully to the global optimum.
The CMA influences the scale of the distribution.Nevertheless, additional step-size, σ control is necessary [9].So, the step size update is also introduced to enhance the scaling adaptation and in particular to facilitate the increase of distribution spread, which is very difficult with CMA only.Step size adaptation aims to make consecutive movements of the distribution mean orthogonal in expectation and prevents the premature convergence.The method used for step size control is path length control (cumulative step size adaptation).
To control the step size, other evolution path,  P is utilized.a) Whenever  P is short, single steps cancel each other and are anti-correlated.Hence, σ should be decreased.b) Whenever the evolution path,  P is long, single steps are pointing to similar directions and they are correlated causing σ to be increased.c) Submitting in the desired situation the steps are approximately perpendicular in expectation and therefore uncorrelated.
To decide if  P is long or short, the length of the path is compared with its expected length under random selection.In ideal situation, selection does not bias the length of the evolution path and the length equals its expected length under random selection.Thus  P controls the step-size.Step3: If stopping criterion is met: go to step 11.Else go to step 4.

Optimization
Step 4: Generate p N candidate solutions by sampling from a multi-variate gaussian distribution, N(m,C) with mean, covariance matrix and standard deviation.
Step 6: The p N sampled points are sorted in order of ascending fitness and (µ) best are selected.The new mean ) 1 (  g m of all current population vectors which is a weighted average of (µ) selected vectors from the samples with weight parameter being updated using weighted recombination of the selected points.
Step 7: Update evolution paths Step 8: Update covariance matrix Step 9: Update global step size Step 10: Increment generation count, g = g + 1; Go to step 3.
Step 11: Stop the optimization process.

Results And Discussion
The Li-ion batteries manufactured by EIG manufacturers are considered for parameter extraction problem [5] as seen in Table 1.Two different battery charge/discharge rate characteristics were obtained and compared with the measured (manufacturer catalogue) data.The first case is EIG Li-ion battery having a rated capacity of 8Ah, charging current of 8A and hence the charging rate of 1Cr.The second one is EIG Li-ion battery with a rated capacity of 8Ah, charging current of 4A and hence the charging rate of 0.5Cr.Similarly, the other two cases are for the discharging scenario for the same type of battery and manufacturer.

Discharge rate characteristics for EIG battery
The plots of charge curves obtained for two discharge rates (0.5Dr, 1Dr) are calculated using Equation (2.6).
The experimental datas are measured from the battery manufacturer's catalogue.It is evident from the plots that the simulated curves are in close agreement with the measured data for CMA-ES, whereas a little deviation between calculated and measured data has been found with GA for both discharge rates.

EIG battery discharge rate characteristics at 0.5Dr
The variation of discharging voltage with respect to increasing DOD cr for 0.5 Dr by GA method and CMA-ES method are shown in Figure 3 and 4 respectively.The simulations are observed for DODcr from 0-100%.The difference between the calculated and catalogue values vary from 0 to 22.5 mV.It is clear from the plot that the battery can be discharged only upto 90% of total capacity.Beyond this the voltage of the battery rapidly decreases.So the maximum DOD for the battery at 0.5 Dr is 90 %.The fitness value for 0.5 discharge rate is calculated using GA and CMA-ES as 8.6482V and 8.1738V respectively.It is seen that the results of CMA-ES give values very closer to the manufactures measured values at this 0.5 Dr.
Fig.  The variation of discharging voltage with respect to increasing DOD cr for 1 Dr by GA method and by CMA-ES method are shown in Figures5 and 6 respectively.
The simulations are observed for DODcr from 0-100%.The difference between the calculated and catalogue values vary from 0 to 20 mV.It is clear from the plot that the battery can be discharged only up to 85% of total capacity.Beyond this the voltage of the battery rapidly decreases.So the maximum DOD for the battery at 1 Dr rate is 85 %.The fitness value for 1 discharge rate is calculated using GA and CMA-ES as7.888549V and 7.7745 V respectively.It is seen that the results of CMA-ES give values very closer to the manufacturers measured values at this 1 Dr.
The CMAES method gives a better result than the GA method for the Discharging characteristics and the polynomial coefficients obtained by both the optimization methods for 0.5 Dr and1 Dr are listed in the Table 2.The battery parameters such as R1, R2, C, V0, Vbc (calculated value) and Vm (catalogue value) extracted by CMAES procedure for discharging characteristics from 0 % to 100% depth of discharge are given in Table 3.The CMAES method gives a better result than the GA method for the discharging characteristics.The polynomial coefficients obtained by both the optimization methods for 0.5 Cr and1 Cr are listed in the Table 4.

Conclusion
In this work, an accurate circuit based battery modeling has been done for a real type of battery available in market.The novelty of the model is that the optimization procedure is done by Real GA.The battery parameters are extracted using both genetic algorithm and CMAES based optimization methods.The results have been compared and CMAES method gives less fitness value and accurate results.Different performance characteristics like charge voltage, discharge voltage, R1, R2, C and V o have been estimated.Two different charge rate and discharge rate characteristics of EIG battery have been obtained and compared with manufacturer's data for validation.The proposed battery models are simple and they accurately represent the measured (catalogue value) charge and discharge curves of the manufacturers data sheets.The simulation and measured (catalogue value) results are in good agreement.It has been seen that the methodology presented in this work extracts accurate results and this can be extended to obtaining the Capacity fading of the batteries after cycles of charging and discharging.Future works can be carried for modeling of other types of batteries with the same procedures.

Fig. 6 .
Fig. 6.Measured and calculated EIG battery discharge rate characteristics at 1Dr by CMA-ES method

Procedure of CMA-ES CMA
[10]is a quasi-parameter free algorithm.A standard CMA-ES with weighted intermediate recombination, step size adaptation, and a combination of rank -update and rank-one update has been considered in this work.The various steps involved in the algorithm are discussed below in steps[10].
Step 1: Set default values for all CMA-ES parameters, except for population size p N , maximum number of functional evaluations Feval, maximum number of generations g max , and initial step size

Table 1 .
Specification of the batteryFor Li-ion battery, SOC versus battery terminal voltage for charging, and SOC versus battery terminal voltage for discharging at different charge/discharge rates are taken from manufacturer catalogue.To obtain the parameters (a 1 -a 31 ), measure the charging voltage, and discharging voltage at different charge/discharge rate.The parameters for charging and discharging characteristics are calculated from GA and CMA-ES.The mathematical formulation of fitness function for obtaining one set of the parameters for charging and discharging scenario are given in Equation (11/12).The results of established mathematical model for battery at different charge/discharge rate are discussed in this section.

3
Measured and calculated EIG battery discharge rate characteristics at 0.5Dr by GA method Measured and calculated EIG battery discharge rate characteristics at 0.5Dr by CMA-ES method.

.1 EIG battery discharge rate characteristics at 1Dr Fig. 5
Measured and calculated EIG battery discharge rate characteristics at 1Dr by GA method

Table 2 .
Polynomial Coefficients for Discharging Scenario

Table 3 .
Battery Parameters Extraction for discharging scenario using CMA-ES

Charge rate characteristics for EIG battery
The variation of charging voltage with respect to increasing SOC cr for 0.5 Cr by GA method and by CMA-ES method are shown in Figures7 and 8respectively.The simulations are observed for SOCr from 0-100%.The difference between the calculated and catalogue values vary from 0 to 2 mV.It is clear from the plot that the battery must be charged beyond 90% of SOC.Beyond this SOC, the voltage of the battery rapidly increases.So the battery will be charged 100% only beyond 90 % of SOC at 0.5 Cr rate .The fitness Value for 0.5 Cr charge rate is calculated using GA and CMA-ES as1.739V and 1.6702 V respectively.It is seen that the results of CMA-ES gives values very closer to the manufacturers measured values at this 0.5 Cr.

2 EIG battery discharge rate characteristics at 1Cr
The variation of charging voltage with respect to increasing SOC cr for 1 Cr by GA method and by CMA-ES method are shown in Figures9 and 10 respectively.The simulations are observed for SOCr from 0-100%.The difference between the calculated and catalogue values vary from 0 to 2 mV.It is clear from the plot that the battery must be charged beyond 95% of SOC.Beyond this SOC the voltage of the battery rapidly increases.So the battery will be charged 100% only beyond 95 % of SOC at 1 Cr rate .The fitness Value for 1 Cr charge rate is calculated using GA and CMA-ES as1.9759V and 1.85432 V respectively.It is seen that the results of CMA-ES gives values very closer to the manufacturers measured values at this 1Cr.

Table 4 .
Polynomial Coefficients for Charging Scenario