Battery Model Parameters Estimation Using Simulated Annealing *

In this paper, a Simulated Annealing (SA) algorithm is proposed for the Battery model parametrization, which is used for the mathematical modeling of the Lithium Ion Polymer (LiPo) batteries lifetime. Experimental data obtained by a testbed were used for model parametrization and validation. The proposed SA algorithm is compared to the traditional parametrization methodology that consists in the visual analysis of discharge curves, and from the results obtained, it is possible to see the model efficacy in batteries lifetime prediction, and the proposed SA algorithm efficiency in the parameters estimation.


INTRODUCTION
The development of new technologies for mobile devices is highly dependent on developments in battery lifetime prediction and management. The battery lifetime is here understood as the time during which the battery can supply energy to the device before a new recharge [17]. There are different classes of mathematical models [4,6,10,15,17,18] capable of battery lifetime prediction, and among those classes, there is the electrical models class [3,4,22]. A considerably versatile electrical model is the so called Battery model [9,21,22], and a crucial aspect of its application is the parametrization process. Different approaches can be adopted for the parameters estimation, being the subjective visual analysis of discharge curves the traditionally applied method [2,16] for some of the Battery model parameters.
Some works have proposed the use of more systematic estimation processes with metaheuristics, obtaining good results for various parameter estimation problems [1,5,7,20]. Among the most used metaheuristics, the Simulated Annealing (SA) is notable for its efficacy and robustness. This method, proposed by [11], is inspired by the procedure presented in [13] and is based on the analogy between annealing of solids and the resolution of combinatorial optimization problems [7]. An important characteristic of this method is the possibility of solutions worst then the current solution to be selected for the next iteration, and by doing so, exploring other solutions in the neighborhood, escaping from local minima. This selection probability is driven by the temperature simulation variable, which decreases with time, bringing stability to the method as the search progresses.
The SA method has been used to optimize parameters in a variety of problems. The operational parameters optimization for fuel economy and lower emission of a Hybrid Electric Vehicle (HEV) is discussed in [23], where a SA algorithm is proposed and its results are compared with the method usually employed for the problem, called dividing rectangles (DIRECT). In [14], a SA method is used for the parameters estimation of an electrical equivalent circuit model of the Proton Exchange Membrane (PEM) fuel cell system. The model is validated by the comparison of experimental and simulated data, with good results agreement. A SA algorithm is used in [8] for the size optimization of a photovoltaic and wind hybrid energy system with battery storage. The parameters for photovoltaic panel size, wind turbine rotor swept area and battery capacity are optimized for the minimization the energy system total cost. The results obtained by the SA algorithm is compared to the Response Surface Methodology (RSM), with SA showing better results. The estimation of solar cell model parameters is solved by a SA algorithm in [7], and a comparative study of different parameter estimation techniques is presented to demonstrate the effectiveness of the proposed SA. In [5], a SA is employed to efficiently find the best control coefficients for the nonlinear problem of energy management for a hybrid vehicle. With the use of SA, it was possible to find the motor power and maximum current coefficient with faster calculation time, improving the vehicle energy efficiency when compared to the Charge-Depleting (CD)/Charge-Sustaining (CS) standard method. This paper presents the application of the SA method in the parametrization of the Battery model used for the mathematical modeling of Lithium Ion Polymer (LiPo) batteries. The proposed SA algorithm and the Battery model are both implemented using the Matlab computational tool. For the parametrization validation, two different methodologies are applied and compared. The first methodology consists in the model parametrization by discharge curves visual analysis, which is the traditionally applied method for this problem [2,16]. The second methodology is the model parametrization by the SA algorithm proposed in this paper. The discharge curves used in both parametrization approaches were obtained using a testbed specially built for this task. The results obtained by the Battery model are compared to the experimental data in order to evaluate the parametrization procedures.
The rest of the paper is organized as follows. In Section 2 the Battery model is presented, the experimental data acquisition and the parametrization methods are explained, and the SA proposed parametrization method is detailed. In Section 3 the simulation results are presented and discussed. In Section 4 the conclusions are drawn.

MATERIALS AND METHODS
This section presents the electrical model used for battery lifetime prediction, the methodology used for the experimental data obtainment and model parametrization procedure. The first parametrization methodology is based on the subjective visual analysis of discharge curves, and second methodology is the proposed SA algorithm.

Battery Model
The Battery model is a dynamic model that simulates the behaviour of rechargeable batteries of different technologies under different charge and discharge conditions [9]. The following assumptions are considered for the model [21]: the internal resistance of the battery is constant, not varying with the current amplitude; the effective capacity of the battery does not change along with changes in the current amplitude; the temperature is neglected, not affecting the model behaviour; self-discharging of the battery is not considered; and the model has no memory effect.
The Battery model is part of the SimPowerSystems library, in the Matlab/ Simulink computational tool. For each battery type there is a specific equation to describe the voltage decay. Therefore, for LiPo battery, the simulated voltage V s is obtained by the equation where: E 0 is the constant voltage, R is the internal resistance, i is the battery current, K is the polarization constant or the polarization resistance, i * is the filtered current, it is the actual battery charge, Q is the battery maximum capacity, A is the exponential zone amplitude and B is the inverse of the exponential zone time constant [22]. The constant voltage E 0 is obtained from the equation where: V F ull is the fully charged voltage [21]. The polarization constant K is given by where: V Nom is the voltage at the end of the nominal zone and Q Nom is the capacity at nominal voltage [21]. The parameters A and B can be obtained from the equations (4) and (5), respectively, where: V E xp is the voltage at the end of the exponential zone and Q E xp is the capacity at the end of the exponential zone [21].
Most of the model parameters are obtained from the datasheets supplied by the battery manufacturer. Obtaining the parameter V F ull is trivial, since it corresponds to maximum battery voltage.
The parameter V Nom directly depends on the parameter Q Nom . The parameters that need to be estimated using discharge characteristic curves, as proposed by [9], are: Q Nom , V E xp and Q E xp . The methodology usually adopted for these parameters estimation is based on the visual analysis of some specific points in the discharge curves [16]. This paper proposes a new methodology for the parameters estimation, based on SA method, and compares it to the visual analysis method.

Experimental Data
For the parametrization process and model validation, this study uses actual discharge curves generated using data from a testbed developed by the Industrial Automation and Control Group (GAIC), of the Regional University of Northwest of Rio Grande do Sul State (Unijuí). This platform captures the curves of the battery discharge process, obtaining instant information that can be saved as images in bitmap and reports in text format.
For the experimental tests, the batteries are initially connected to an external power source and subjected to a full charge process with a applied current corresponding to 20% of the battery rated capacity [12], which is equivalent to 160 m A. The charge process is considered complete when battery voltage reaches 4.2 V , than the batteries are disconnected from the charging station and subsequently connected to the testbed for the discharge process. The discharge process is considered complete when the battery reaches the cutoff voltage of 2.7 V . The battery lifetime is the discharge time from the battery fully charged down to the cutoff voltage.
A wide range of discharge currents were used for the experimental tests in accordance to the minimum and maximum acceptable limits for the LiPo battery model P L383562 − 2C. A total of 31 constant discharge profiles were used, ranging from 50 m A to 800 m A, at 25 m A intervals, and 8 independent experimental tests are performed for each discharge profile.

Parameters estimation methodologies
The Battery model parameters can be divided in two sets. The first parameters set does not depend on the calibration discharge current and is show in Table 1. The value of the internal resistance parameter is derived from rated voltage and rated capacity parameters, corresponding to 1% of these two parameters product. The value of the maximum capacity parameter is 105% of the battery rated capacity. The initial state of charge S OC(t ), at the beginning of the discharge process when battery is fully charged, is set to 100%. The response time parameter is set to 30 s, a value that satisfactorily represents the battery voltage dynamics. The parameters values are chosen according what is advised in [9].
The second set of parameters is estimated using discharge curves that describe the voltage decay over time and are generated by the experimental data provided by the testbed. Two distinct regions in a discharge characteristic curve must be considered: exponential area and nominal area. The parameters V E xp and Q exp are obtained from the curve analysis at the end of the exponential area. The parameter Q Nom is obtained from the curve analysis at the end of the nominal area. Two different methodologies are used for the estimation of the parameters Q Nom , V E xp and Q E xp . Methodology 1 consists in the visual analysis of the discharge curve where the corresponding experimental lifetime is found to be nearest to the average experimental lifetime of the 8 independent experiments for the considered calibration profile. Methodology 2 is the use of the SA method proposed by this paper. It is important to note that, for the two adopted methodologies, the parameters estimation the Battery model is performed for a given calibration discharge profile and then validated for all other discharge profiles. The two methodologies are better explained in the following subsections.

Methodology 1: Visual analysis of discharge curve
In this methodology, 8 discharge curves are generated, according to 8 independent experiments performed for the considered discharge profile. The lifetime of each experimental discharge curve is computed, the average experimental lifetime of the discharge profile is obtained, and the curve with the lifetime nearest to the average experimental lifetime is then selected. Using the selected curve, the 3 parameters of the Battery model are obtained by means of a visual analysis at specific points, following the same procedure found in [16]. The model is then simulated for the 31 discharge profiles for its validation. This whole procedure is repeated for each discharge profile.

Methodology 2: Simulated Annealing
The optimization problem considered by this work consists in finding the parameters that minimize the objective function given by equation (6), that represents the difference between the results obtained by the Battery model and the experimental data. The experimental lifetimes are computed for the 8 discharge curves of the selected calibration profile. The curve with the experimental lifetime nearest to the calibration profile average lifetime is selected and used to compute the objective function where: f c is the discharge curve importance factor, L ea is the average experimental lifetime, V s is the voltage simulated by the model according to equation (1), V e is the experimental voltage, f L is the average experimental lifetime importance factor and L s is the lifetime simulated by the model. The L s is obtained by computing the simulated time interval from the battery fully charged down to the cutoff voltage. The f c and f L factors are constants used to define whether the model should look for a better fit to overall curve, or a better fit for the average experimental lifetime, since the model does not always achieve these two objectives simultaneously, especially due to the sudden drops in voltage at the beginning and end of the experimental curve. This factors were empirically determined, and values used were f c = 0.175 and f L = 1.
The SA algorithm proposed to solve this optimization problem can be summarized by the following steps: • An initial random solution for the parameters is generated.
• The initial temperature of the method is set.
• For each method iteration: -For each solution perturbation: * A new random candidate solution is generated in the vicinity of the current solution, according to the method temperature. * The Battery model is parametrized with the new candidate solution. * The Battery model is simulated for the calibration discharge profile. * The objective function is computed. * If the objective function is smaller than the result of the current solution, or the new solution passes in the Metropolis criterion [13]: -The new candidate solution is now the current solution.
-The method temperature in decreased.
-The stop criterion is verified.
• The best solution found by the method is returned.
The stop criterion is based in two conditions, the method stops if no better solution is found in the iteration or if a maximum number of iterations is reached. The Metropolis criterion is used to select solutions that do not minimize the objective function but can help the method to escape local minima and is based on Boltzmann probability and calculated according to the statistic expression in [7].

RESULTS AND DISCUSSIONS
This section presents the simulation results of the Battery model considering 31 calibration profiles. For each calibration profile, the model was simulated for all 31 discharge profiles in order to evaluate the calibration efficacy. The results show the differences between the simulated battery lifetimes and the average experimental battery lifetimes. The discharge profiles have constant currents with values ranging from 50 m A to 800 m A at 25 m A intervals. Also, the average error of each calibration is computed using the results of all 31 discharge profiles. The results are presented and discussed according to the methodology used for the model parametrization.

Simulation results for Methodology 1
The errors obtained by the model calibrated by this methodology, in which the parameters are obtained from the visual analysis of the discharge curves, are shown in Figure 1, where the lighter gray corresponds to the lowest error and the darker gray to the highest error rates. It is possible to note by darker gray regions in the figure that lower current calibration profiles present higher error rates. This is expected for the Battery model since the nonlinear effects are more present at lower current discharges profiles. The most satisfactory results are observed in calibration with rated current of 525 m A, with average error equals to 0.845%. The calibration that has the highest average error is the 125 m A profile with an error rate of 5.425%. Considering this parametrization methodology, the Battery model presents a total average error of 2.057%.

Simulation results for Methodology 2
The results of the Battery model parametrized by Methodology 2, the proposed SA algorithm, are presented in Figure 2, where the lighter gray corresponds to the lowest error rates and the darker gray to the highest error rates. The calibration profiles with lowest average error rates are 350 m A and 650 m A profiles, both with a 0.821% error rate. The calibration that has the highest average error is the 75 m A profile with a 3.675% error rate. The same trend of higher error rates for lower current calibration profiles seen in Methodology 1 can also be note here, but much more lighter areas and considerably less darker areas can be seen in Figure 2, showing the overall better performance of the SA algorithm. The total average error rate of the Battery model parametrized by the SA algorithm is of 1.352%, considerably lower than the Methodology 1 result of 2.057%. The average errors for each calibration profile for Methodologies 1 e 2 are presented in Figure 3. The better performance of the SA algorithm is evident, since it achieved lower error rates for most calibration profiles, with most of its rates under the 1% mark.
In Figure 4, 8 experimental curves from the 500 m A discharge profile and the curve simulated by the Battery model are shown. The model was parametrized by the SA algorithm according to the 350 m A calibration profile, and then applied to a 500 m A battery discharge. The average experimental lifetime is 90.58 min and the simulated time is 90.15 min. For this particular case, the model presents an error of 0.47%. It is noteworthy that the major discrepancies occur at the beginning and end of the discharge process. It happens mainly due to the capacity rate effect [19], an important nonlinear effect that is not captured by the Battery model.

CONCLUSIONS
The correct prediction of battery lifetimes is of paramount importance in the development of mobile device technologies. The Battery model was used in this paper to predict the lifetime of LiPo batteries obtaining good results. The correct parametrization of the Battery model is extremely important for its accuracy, and the main contribution of this work is the proposition of a SA method for the optimization of three key parameters, V E xp , Q E xp and Q Nom . These parameters are usually estimated by the visual analysis of discharge curves, but in contrast, proposed SA method proved to be a less subjective and more systematic approach. In this paper, experimental data obtained by a testbed was used to validate the Battery model, obtaining a total average error rate of 2.057% when parametrized by the visual analysis method, and a total average error rate of 1.352% when parametrized by the proposed SA algorithm. Palavras-chave: modelo Battery, estimação de parâmetros, simulated annealing.