Genetic Algorithm and Taguchi Method: An Approach for Better Li-Ion Cell Model Parameter Identiﬁcation

: The genetic algorithm (GA) is one of the most used methods to identify the parameters of Li-ion battery models. However, the parametrization of the GA method is not straightforward and can lead to poor accuracy and/or long calculation times. The Taguchi design method provides an approach to optimize GA parameters, achieving a good balance between accuracy and calculation time. The Taguchi design method is thus used to deﬁne the most adapted GA parameters to identify the parameters of model of Li-ion batteries for household applications based on static and dynamic tests in the time domain. The results show a good compromise between calculation time and accuracy (RMSE less than 0.6). This promising approach could be applied to other Li-ion battery applications, resulting from measurements in the frequency domain or different kinds of energy storage.


Introduction
Lithium-ion batteries used in electric vehicles (EVs) degrade significantly in the first five years of operation and are designed for a useful life of about eight years, equivalent to a twenty percent loss in initial capacity [1].Nevertheless, even if they no longer meet EV performance standards, these batteries are still capable enough to serve less demanding applications, including stationary energy-storage services [2], lowering storage system prices and leading to a potential solar energy revolution [3][4][5].Indeed, it is estimated that by 2030, stationary storage powered by used EV lithium-ion batteries could exceed 5 GWh [6].However, few studies on second-life EV batteries have been published in terms of assessing the technical feasibility, economic viability and, in the positive case, a protocol of use to maximize their second-life usage in solar storage systems [1].Any attempt to do so requires validating a digital twin, which we tried to achieve in this paper.
Battery modeling approaches can be summed up into three approaches: the electrochemical or physics-based model; the black-box model; and the equivalent electric circuit model (EECM) [7].However, the latter is the most widely used model in battery management systems (BMS) due to its simplicity and reasonable accuracy [8].In addition, EEC models are highly recommended for observation and control problems and could be considered a solid foundation for state-of-charge (SOC) and state-of-health (SOH) estimations in low dynamic applications.
In [9,10], the authors compared the performance between 1-RC, 2-RC, and 3-RC EEC models.They used electrochemical impedance spectroscopy to derive 26.9 V Li-ion battery pack impedances at different SOC points.The impedances versus SOC relationships were considered third-degree polynomials, and the coefficients were fitted using the MATLAB genetic algorithm solver.The proposed models were then validated by two different realworld driving cycles reproduced by a hardware-in-the-loop platform.The 3-RC EECM scored the best root mean square error (RMSE) with a value of less than 0.6%.This paper uses a third-order EECM to reproduce Li-ion cell behavior.A C/40 rate (dis)charging test was conducted to obtain the open circuit voltage (OCV) versus SOC relationship and a dynamic profile extracted from a real-world solar application for parameter fitting and validation.Usually, the GA is used with default parameters [9,11], with a set of predefined parameters [12], or using the trial-and-error method, which may not be suitable for the application under study and may take a long time without obtaining the desired solution.In contrast to the previously mentioned studies, the RC differential equations with constant parameters are used to describe the cell dynamics, and the hysteresis effect was considered.For parameter identification, the genetic algorithm solver in MATLAB, combined with a systematic approach based on the Taguchi experimental design and ANOVA (analysis of variance), is implemented.The RMSE of the model obtained is also less than 0.6%, with accuracy reaching more than 99.44%.
The novelty and contribution of this study can be summarized as follows: • Provide an easy-to-implement, robust, and systematic approach to the characterization of a Li-ion cell from experimentation, to modeling, to validation.

•
The parameters used for setting the GA have been justified using the Taguchi method and proven to make the algorithm more efficient in terms of computation time and model fitting.

•
The GA parameter optimization method could be generalized and used for other characterization techniques (e.g., particle swarm optimization).

•
A real-word household power consumption profile was used to parametrize the cell model; therefore, this study is a solid basis for further investigation on the use of second-life Li-ion batteries in solar home storage systems.
This paper is organized as follows.Section 2 describes the series of laboratory tests conducted to parametrize the lithium-ion cell model.In Section 3, the cell EECM is described.Section 4 elaborates on the parameter identification approach, followed by Section 5 which shows a set of estimated cell voltages versus measured cell voltages.Finally, Section 6 concludes the paper.

Brief Introduction of Collected Dataset
The experiments were conducted using two INR 18650 MJ1 Li-ion cells.Data were collected from the first cell to fit the parameter values to the ECCM and from the second cell to validate the model.These cells comprise nickel-rich NMC811 cathodes and graphitesilicon anodes with a nominal capacity of 3.5 Ah and a nominal voltage of 3.6 V, which can be used across a wide range of applications from spacesuits to automotive vehicles [13].In addition, the test bench includes a battery-regenerative test system for the charge, discharge, and measurements; a thermal chamber for thermal conditioning; and a computer for data monitoring and control.During the tests, the thermal and electrical variables were measured and registered with an acquisition time from 1 to 60 s, depending on the different steps of the test.Therefore, the frequency value was conveniently chosen for each step to record all the significant changes and simultaneously save the length of the data files.
Electric consumption data are indispensable to facilitating the employment of decentralized renewables [14].It helps engineers and researchers size renewable sources, manage and optimize the energy flow, and reduce costs.There are roughly three techniques used to generate a load profile [15].First, the top-down model, or the measurement-based approach, uses routinely acquired data from measuring devices placed at different locations in the system.Hence, the quality of real-time-collected data heavily depends on the sensors' accuracy.Moreover, the top-down model requires a minimum of six months of historical data, as long as it includes both summer and winter, to generate or forecast a functional load profile.Second, the bottom-up model, or the component-based approach, requires the energy consumed by each electrical appliance to be obtainable.For this, two methods are adopted.In the first one, all the components are metered, and no historical data are required.However, this process is time and money-consuming.In the second one, none or part of the components are metered, and the energy consumed by the rest is estimated.Finally, the hybrid model, which combines the two techniques mentioned previously, benefits from the low cost of the top-down approach and the excellent theoretical accuracy of the bottom-up approach [16].A French household power consumption dataset [17] collected between December 2006 and November 2010 in a house in Seaux using the top-down approach was used as a reference for our work.It provides 2,075,259 measurements of global active power with a one-minute step-time.This dataset accompanies no reference paper; however, it has been used by [18] to quantify self-consumption linked to solar home battery systems and by [19] to forecast power consumption using machine-learning algorithms.
Three tests were performed.The first test evaluated the OCV versus SOC relationship at 25 • C. It consists of fully discharging the cell, charging the cell at a C/40 rate until fully charged, and discharging at a C/40 rate until fully discharged.Two voltage versus SOC relationships for the charge and discharge portion of the test were derived from the test data.The OCV (SOC, 25 • ) was computed as the average.Indeed, (dis)charging the battery at a low rate pares the ohmic and polarization effects so that the cell can be considered at equilibrium at each point in time [20][21][22].
The cell starts at about 80% SOC in the second test (Figure 1), followed by 16 current waveform cycles.Every four cycles are separated by a 30 min rest, and each cycle is equivalent to about a 3.9% SOC decrease.The current waveform was computed by subtracting the power consumed by the French household mentioned above from the power generated by a 3.6 kW PV installation during 30 min of 1 January 2008 in Seaux, France, and normalized from a 48 V 2 kWh Li-ion pack level to a cell level.Indeed, the EECM parameter values are significantly affected by the final application as well as the cell SOC [9].Therefore, the profile used should be representative of the chosen application and applied across the whole SOC operation range to find the optimal parameter combination for the entire range.
Finally, in the third test, the second cell underwent four cycles from the current waveform mentioned above, and the data collected were used to validate the model.
Batteries 2023, 9, x FOR PEER REVIEW 3 of 14 functional load profile.Second, the bottom-up model, or the component-based approach, requires the energy consumed by each electrical appliance to be obtainable.For this, two methods are adopted.In the first one, all the components are metered, and no historical data are required.However, this process is time and money-consuming.In the second one, none or part of the components are metered, and the energy consumed by the rest is estimated.Finally, the hybrid model, which combines the two techniques mentioned previously, benefits from the low cost of the top-down approach and the excellent theoretical accuracy of the bottom-up approach [16].A French household power consumption dataset [17] collected between December 2006 and November 2010 in a house in Seaux using the top-down approach was used as a reference for our work.It provides 2,075,259 measurements of global active power with a one-minute step-time.This dataset accompanies no reference paper; however, it has been used by [18] to quantify self-consumption linked to solar home battery systems and by [19] to forecast power consumption using machinelearning algorithms.
Three tests were performed.The first test evaluated the OCV versus SOC relationship at 25°C.It consists of fully discharging the cell, charging the cell at a C/40 rate until fully charged, and discharging at a C/40 rate until fully discharged.Two voltage versus SOC relationships for the charge and discharge portion of the test were derived from the test data.The OCV (SOC, 25°) was computed as the average.Indeed, (dis)charging the battery at a low rate pares the ohmic and polarization effects so that the cell can be considered at equilibrium at each point in time [20][21][22].
The cell starts at about 80% SOC in the second test (Figure 1), followed by 16 current waveform cycles.Every four cycles are separated by a 30 min rest, and each cycle is equivalent to about a 3.9% SOC decrease.The current waveform was computed by subtracting the power consumed by the French household mentioned above from the power generated by a 3.6 kW PV installation during 30 min of January 1 st 2008 in Seaux, France, and normalized from a 48 V 2 kWh Li-ion pack level to a cell level.Indeed, the EECM parameter values are significantly affected by the final application as well as the cell SOC [9].Therefore, the profile used should be representative of the chosen application and applied across the whole SOC operation range to find the optimal parameter combination for the entire range.Finally, in the third test, the second cell underwent four cycles from the current waveform mentioned above, and the data collected were used to validate the model.

Lithium-Ion Cell Modelling
The EEC models describe the battery's electrical behavior in terms of voltages and currents.Using only passive electrical components, the resulting equations are a low-dimensional system of ordinary differential equations, which are generally nonlinear be-

Lithium-Ion Cell Modelling
The EEC models describe the battery's electrical behavior in terms of voltages and currents.Using only passive electrical components, the resulting equations are a lowdimensional system of ordinary differential equations, which are generally nonlinear because the battery parameter depends on the temperature and the state of charge.To reduce the complexity further, only the open circuit voltage is assumed to have dependencies on temperature and state of charge.Therefore, it is estimated at multiple states of charge points and temperatures via laboratory tests, and then interpolated to deduce the continuous OCV-SOC relationships.As a result, these models are relatively accurate and less complex, making them a competitive candidate to be embedded in battery management systems for real-life applications, ensuring reliable and safe operating conditions.
In this section, the third-order EECM is introduced.As shown in Figure 2, the model used in [9] has been modified by adding the hysteresis effect and by using electrical-circuit differential equations to imitate dynamic cell behavior instead of parameters versus SOC polynomial relationships.
The cell OCV and SOC are highly correlated and can be significantly influenced by temperature [23].It is usually measured by applying current pulses with known SOC alternations, letting the battery rest for at least 30 min before finally measuring the terminal voltage [11].However, the static test adopted in this paper consists of (dis)charging at a prolonged rate (i.e., C/40), owing to its high SOC resolution and ease of implementation (Figure 3).Finally, in the third test, the second cell underwent four cycles from the current waveform mentioned above, and the data collected were used to validate the model.

Lithium-Ion Cell Modelling
The EEC models describe the battery's electrical behavior in terms of voltages and currents.Using only passive electrical components, the resulting equations are a low-dimensional system of ordinary differential equations, which are generally nonlinear because the battery parameter depends on the temperature and the state of charge.To reduce the complexity further, only the open circuit voltage is assumed to have dependencies on temperature and state of charge.Therefore, it is estimated at multiple states of charge points and temperatures via laboratory tests, and then interpolated to deduce the continuous OCV-SOC relationships.As a result, these models are relatively accurate and less complex, making them a competitive candidate to be embedded in battery management systems for real-life applications, ensuring reliable and safe operating conditions.
In this section, the third-order EECM is introduced.As shown in Figure 2, the model used in [9] has been modified by adding the hysteresis effect and by using electrical-circuit differential equations to imitate dynamic cell behavior instead of parameters versus SOC polynomial relationships.The observed instantaneous voltage variation when charging or discharging the cell is modeled by an ohm internal resistance [24].The multiple series RC branches in the EECM emit the voltage dynamic deviation from the OCV when the cell undergoes an input current and slow recovery when the cell is allowed to rest.This is usually referred to as the polarization effect [25], which is caused by the slow migration of lithium in the cell [9].
Figure 4 shows that averaging the two voltage versus SOC relationships obtained considerably decreases the hysteresis effect.However, [26] showed that a 1% battery's OCV measurement noise is equivalent to a 29.8% error increase in SOC estimation.Therefore, the Plett single-state hysteresis model was considered in this study [22]: where M 0 .sgn(i(t))models the instantaneous hysteresis when the input current sign changes, and M.h(t) models the dynamic hysteresis when the SOC cell changes.h(t) is a normalized hysteresis contribution between +1 and −1, and M the maximum polarization voltage due to hysteresis.The derivative of h(t) can be expressed as: . h(t) = −|η(t).i(t).γ(t)/Q|.(sgn(i(t)) where γ(t) is the rate of the hysteresis decay toward either +1 or −1.The cell OCV and SOC are highly correlated and can be significantly influenced by temperature [23].It is usually measured by applying current pulses with known SOC alternations, letting the battery rest for at least 30 min before finally measuring the terminal voltage [11].However, the static test adopted in this paper consists of (dis)charging at a prolonged rate (i.e., C/40), owing to its high SOC resolution and ease of implementation (Figure 3).(3) where the OCV can be interpolated from the OCV versus SOC relationship,  is the coulombic efficiency, Q the total capacity, and   the k-RC time constant.It should be noted that, regarding the sign convention, i(t) is positive when charging and negative when discharging.The cell model state-space representation can be expressed as follow: .
where the OCV can be interpolated from the OCV versus SOC relationship, η is the coulombic efficiency, Q the total capacity, and τ k the k-RC time constant.It should be noted that, regarding the sign convention, i(t) is positive when charging and negative when discharging.

EECM Parameter Identification Approach 4.1. Genetic Algorithm
Genetic algorithms (GAs) are stochastic optimization and global search methods that imitate natural biological evolution [27].A GA operates on a population of artificial individuals.A chromosome represents each individual, and each chromosome expresses a solution to a problem and has a fitness (i.e., a number that measures how good a solution is to the given problem).Starting with a randomly generated population of individuals, a GA carries out a survival of the fittest-based selection and the recombination process to derive the next generation's successor population.During recombination, parent chromosomes are selected, and their genetic material is recombined to produce child chromosomes.However, the offspring generated using the selected parents only have the characteristics of its parents, including their drawbacks.Therefore, random mutations must be applied to each offspring to overcome the problem and create new individuals, preventing the evolution from freezing.As in natural adaptation, this process leads to the evolution of individuals more suitably adapted to their environment than the individuals from which they were derived until some stopping criterion is reached.
The GAs lifecycle can be summarized as follow: 1.
Create a population of random chromosomes (potential solutions); 2.
Score each chromosome in the population for fitness, and 'usually' select individuals with better fitness values as parents; 3.
Create a new generation through crossover and mutation; 4.
Repeat until some criteria is reached (e.g., max number of generations, max amount of time running); 5.
Emit the fittest chromosome as the solution.

Systematic Approach Based on Taguchi Experimental Design
The GA is a well-proven solution for complicated estimation problems [12] due to its numerous advantages, notably its capability to usually converge despite how far the initial conditions are from the optimal solution and how many unknown variables are used as long as they are bounded.However, it can be time-consuming to run and can sometimes be stuck in local minima.The authors of [28] showed that optimizing the GA solver parameters can overcome these limitations.Therefore, they proposed a systematic and comprehensible approach based on the Taguchi experimental design for parameter tuning, which will be replicated in this paper while considering only the parameters levels suitable in our case (Table 1).

Generating Taguchi Experimental Design
The experimental design proposed by Taguchi involves orthogonal arrays to organize the parameters affecting the GA solver and the levels at which they should be varied.Instead of testing all possible combinations, the Taguchi method tests pairs of combinations, gathering the necessary data to determine which factors most affect the GA solver with minimum experimentation [29].As presented in Table 1, we had one GA parameter with two levels, and the rest had three levels.The Taguchi orthogonal array design L18 (2 1 3 7 ) was chosen and generated by Minitab (Table 2).

Conducting the Experiments
In [28], the authors considered fixing the computation time for every experiment, seeking a fair comparison.However, time can be seen as a 'factor' in extensive data and parameter numbers; therefore, fixing it can degrade the statistical analysis of GA solver options' contribution.In this paper, the computation time of every experiment was fixed to 30 s.However, from the significance analysis, it was expected that the set of GA parameters contribute to minimizing the computation time, while being convergent to a reasonable fitness value.
The cost function chosen was the root mean square error (RMSE): where Vi is the cell measured voltage, and Vi is the cell estimated voltage.
The GA solver parameters set according to the Taguchi array are shown in Table 2, and the simulation procedure is summarized in Figure 5.For consistency, every experiment was repeated three times as shown in Table 3.
parameters contribute to minimizing the computation time, while being convergent to a reasonable fitness value.
The cost function chosen was the root mean square error (RMSE): where  is the cell measured voltage, and  is the cell estimated voltage.The GA solver parameters set according to the Taguchi array are shown in Table 2, and the simulation procedure is summarized in Figure 5.For consistency, every experiment was repeated three times as shown in Table 3.  ANOVA was used at a 95% confidence level to determine the effect and contribution of each parameter on the experiment outcome.The 'Cross-over Function' p-value in Table  ANOVA was used at a 95% confidence level to determine the effect and contribution of each parameter on the experiment outcome.The 'Cross-over Function' p-value in Table 4, which is less than 0.005 [30], indicates that it significantly contributed to rapidly converging towards a reasonable optimal RMSE, in the ideal case.Its level was chosen from the effect charts (Figure 6) to ensure rapid convergence, minimizing the computation time, and the non-significant factors from the experiments delivered the best fitness value (Table 5).4, which is less than 0.005 [30], indicates that it significantly contributed to rapidly converging towards a reasonable optimal RMSE, in the ideal case.Its level was chosen from the effect charts (Figure 6) to ensure rapid convergence, minimizing the computation time, and the non-significant factors from the experiments delivered the best fitness value (Table 5).

Results and Discussion
To test the developed Li-ion EECM and the proposed GA parameter optimization, a dynamic profile extracted from a real-world solar application was used.Figure 7 shows the results for cell I from which the laboratory data were collected to identify the model parameters.The estimated versus measured voltage was fairly accurate across each input current cycle.The RMSE error of the model was 0.59% with a maximum error rate of 0.6% (Figure 8), giving an accuracy of 99.4%, which is comparable with the results obtained by [9]. Figure 9 gives a zoomed-in view of the transient shape, which smoothly follows the measured voltage.
To validate the model, laboratory data were collected from another cell of the same type.Figures 10 and 11 show that the model was also accurate, with an accuracy of more than 99.4%.
The estimation results show that the developed model can reflect the dynamic of the lithium-ion cell and can also be used at a pack level.However, improvements can be made regarding the use of the cell for a more extended SOC range; a new set of the EECM parameters should be identified for this specific range.It should be noted that the EECM can be classified as an empirical model; therefore, even a high-order EECM cannot provide itself any insight into internal dynamics and, consequently, the aging of a cell.However, [31] showed that calendar/cycling aging (e.g., solid-electrolyte interphase decomposition or regrowth, electrolyte decomposition, current collector corrosion, binder decomposition, lithium plating) mainly affects power capabilities by increasing internal resistance and the remaining useful capacity by decreasing the active materials usually due to side reactions.Both are observable using our model and can be estimated online as the cell ages.To summarize, for longevity, efficiency, balancing, and safety concerns, the SOC and SOH of Li-ion batteries should be estimated throughout their lifespan.Indeed, a good SOC and SOH estimation can enable the battery management system to impose power and energy limitations accurately.In a lab environment, where precise calibrations can be made, the SOC is computed using coulomb counting and the SOH (as a function of the total capacity) is computed by fully discharging the battery in predefined time intervals.However, in real-life applications, where accurate calibration cannot be made without interrupting the continuity of service, more advanced methods are used, such as the Kalman filter [32], sliding-mode observers [33], and GAs [27].A simple but robust model containing the SOC, internal resistance, and total capacity as observable parameters should be usually used in all cases (Equations ( 3) and ( 4)).

Results and Discussion
To test the developed Li-ion EECM and the proposed GA parameter optimization, a dynamic profile extracted from a real-world solar application was used.Figure 7 shows the results for cell I from which the laboratory data were collected to identify the model parameters.The estimated versus measured voltage was fairly accurate across each input current cycle.The RMSE error of the model was 0.59% with a maximum error rate of 0.6% (Figure 8), giving an accuracy of 99.4%, which is comparable with the results obtained by [9]. Figure 9 gives a zoomed-in view of the transient shape, which smoothly follows the measured voltage.

Results and Discussion
To test the developed Li-ion EECM and the proposed GA parameter optimization, a dynamic profile extracted from a real-world solar application was used.Figure 7 shows the results for cell I from which the laboratory data were collected to identify the model parameters.The estimated versus measured voltage was fairly accurate across each input current cycle.The RMSE error of the model was 0.59% with a maximum error rate of 0.6% (Figure 8), giving an accuracy of 99.4%, which is comparable with the results obtained by [9]. Figure 9 gives a zoomed-in view of the transient shape, which smoothly follows the measured voltage.

Figure 1 .
Figure 1.(a) Test 2 current versus time for one cycle and (b) Test 2 SOC versus time.

Figure 1 .
Figure 1.(a) Test 2 current versus time for one cycle and (b) Test 2 SOC versus time.

Figure 1 .
Figure 1.(a) Test 2 current versus time for one cycle and (b) Test 2 SOC versus time.

Figure 3 .
Figure 3. OCV versus SOC at 25 °C.The observed instantaneous voltage variation when charging or discharging the cell is modeled by an ohm internal resistance [24].The multiple series RC branches in the

Figure 4 .
Figure 4. OCV difference versus SOC.The cell model state-space representation can be expressed as follow:

Figure 8 .
Figure 8. Cell I: Error rate versus time.

Figure 8 .
Figure 8. Cell I: Error rate versus time.Figure 8. Cell I: Error rate versus time.

Figure 8 .
Figure 8. Cell I: Error rate versus time.Figure 8. Cell I: Error rate versus time.

Table 1 .
Solver options and their experimental levels.

Table 3 .
Experimental layout and data.

Table 3 .
Experimental layout and data.

Table 5 .
Selected solver option set.

Table 5 .
Selected solver option set.

Table 5 .
Selected solver option set.