IDENTIFICATION OF END OF LIFE ON LITHIUM-ION BATTERIES CELLS THROUGH SUPPORT VECTOR MACHINES FOR IN-CHARGER BATTERY MANAGEMENT SYSTEM STRATEGY

Some battery cells reach End of Life before others because they have small parametric differences, even if they are produced together. If End of Life cells can be identified, the damaged cells can be replaced or switched-off from the circuit. So, maximum power and charge/discharge rate can be limited to prevent remaining healthy cells from operating above their rated capacities, extending the battery lifetime. This work proposes the application of artificial intelligence to identify cells at the End of Life, considering LiFePo4 Lithium-ion parallel battery packs. Measurements on each cell are not required; only the output voltage signal of the battery. Support Vector Machines were used with current and voltage inputs processed by Wavelet Transform and Fourier Transform. The proposed method opens up possibilities for a new battery management strategy in electric vehicles, inserting the Battery Management System in the charging stations and allowing more sophisticated diagnostics.

Lithium-ion parallel battery packs. Measurements on each cell are not required; only the output voltage signal of the battery. Support Vector Machines were used with current and voltage inputs processed by Wavelet Transform and Fourier Transform. The proposed method opens up possibilities for a new battery management strategy in electric vehicles, inserting the Battery Management System in the charging stations and allowing more sophisticated diagnostics.

INTRODUCTION
Nowadays, the rate of research associated with efficiency, protection, and applications of power batteries is increasing due to emerging technologies such as Electric Vehicles (EV). Significant of these efforts focus on lithium-ion based batteries, which do not have memory effects and are energetically dense (Manzetti & Mariasiu, 2015).
Batteries of EVs need high-energy storage capacity, high rate of charge/discharge, and long useful life, to make the technology competitive compared to fossil fuel-based vehicles. Batteries are a large part of the total cost of EVs. Furthermore, they have a limited life cycle, and the degradation is accelerated by many factors, such as charge/discharge rate, temperature, and Depth of Discharge (DOD) (Farzin, et al., 2016;Redondo-Iglesias, et al., 2019).
Batteries of EVs Degradation can be evaluated through State of Health (SOH), expressed by: where max Q is the present maximum energy storage capacity, and 0 max Q its initial value.
When SOH is low, energy storage capacity and power of battery' cells are decreased. Besides that, aging effects reduce the system's exponentially dynamic performance (Barré, et al., 2013), so small differences between cells SOH are increased by aging.
Some cells reach End of Life (EOL) before others, because they have small parametric differences, even if they are produced together. These cells are called damaged, dead, or finished (Shafiei, et al., 2016;Hommalai and Khomfoi, 2015).
In lithium-ion based batteries, EOL is commonly defined when SOH reaches 80%. From this point, degradation occurs at a much higher speed.
If EOL cells can be identified, they can be replaced or switched-off from the circuit. So, maximum power and charge/discharge rate can be limited to prevent remaining healthy cells from operating above their rated capacities, extending battery lifetime (Huynh, 2014).
Battery Management Systems (BMS) are used to observe, control, and protect batteries through sensors in each cell or stack of cells, which compose the battery. In Eichi et al. (2013), a review of BMS functions was done, where the State of Charge (SOC), SOH, and EOL estimators are reported. However, battery parameters, such as internal impedances variable through temperature and aging, are required. To compute these values, voltage, current, and temperature measurements in each cell are done. BMS also performs cell balancing, switching each one of them to maintain the same SOC.
Some EVs batteries can be composed with more than 300 cells, with different series and parallel combinations. Each cell commonly uses a single analog-to-digital converter for voltage measurement or voltage-level converters with multiplexed outputs, so it is a complicated and expensive monitoring process (Eichi et al., 2013;Collet et al., 2011).
Recent works have begun to implement computational intelligence methods, such as Artificial Neural Networks (ANN), to perform some BMS functions without requiring knowledge of internal battery parameters. However, most of the developed proposals are observer algorithms to estimate the SOC or SOH of the battery, without acting directly in protecting the system (Chen et al., 2016;Chaoui and Ibe-Ekeocha, 2017).
Artificial intelligence methods are used in several engineering areas, such as classification and location of faults in power transmission and distribution lines. In these applications, it is more efficient to use data processing tools, such as Fourier Transform (FT) or Wavelet Transform (WT) to create the inputs for Neural Networks, Support Vector Machines (SVM), or Fuzzy Neural Networks, rather than to use electrical signals in the time domain (Livani and Evrenosoglu, 2010;Abdollahi and Seyedtabail, 2010).
In Antón et al. (2015), the SOC was estimated through SVM, using tests to extract parameters during charge and discharge cycles. The performed tests were applying symmetrical square waves of current, testing the charging and discharging dynamics of cells. However, temperature, current, and voltage of cells were the SVM input data, and therefore, require measurements.
SOH and remaining life estimation of each cell is a methodology that can be used to identify EOL. However, much of the proposed techniques, besides needing cell measurements, have low applicability, massive complexity, computational requirements, or dependency on estimating other parameters, such as aging effects, as described in Hu et al. (2016).
Low SOH cell identification in parallel associations of EVs batteries was proposed in Gong et al. (2014), a test bench was used to perform charging and discharging analysis on packs, and data from each cell was collected. However, this method is not viable for an onboard BMS in parallel battery packs, because current measure on each cell and additional sensors were required for the analysis.
This work proposes the application of SVM to identity cells that already reached the EOL in LiFePo4 Lithium-ion parallel battery packs. Measurements on each cell are not required, but only the output voltage signal of the battery. The proposed method is the first function for a BMS with only measurements on battery terminals, reducing its cost, increasing security on parallel batteries, and allowing it to be removed from inside electric vehicles and positioned at the charging stations. This new strategy enables the charging stations to make sophisticated diagnostics on the battery by analyzing test pulses, which can easily be performed remotely by the manufacturer in real-time with an internet connection.

Battery model
Several different types of models for battery cells are found in literature, such as experimental, electrochemical, and electrical models in Tremblay and Dessaint (2009). The simulations of this work are based on the model suggested in Tremblay et al. (2007), a modification of Shepherd's model.
The expression describes the battery voltage bat V during discharge as a function of the temperature T . Where Q is the storage capacity of the battery in Ah, t i is the extracted capacity, * i represents dynamic characteristics of current in low frequencies, K is the polarization resistance in Ohms, a T is the ambient temperature, A is the exponential voltage, B is the exponential capacity, and C is the slope of the discharge curve. However, these parameters are not constant, since the temperature and the aging effect may change, for example, the internal resistance and the maximum charge capacity (Anseán, 2017;Broussely et al., 2005).
The following expressions describes influence of temperature in battery parameters: where ref T is the nominal ambient temperature,  and  are constants of the Arrhenius equation for the influence of temperature on the internal resistance.

Wavelet transform
The WT performs analysis in both the time domain and frequency domain by decomposing the input signal in the selected mother wavelet's orthonormal bases.
Wavelet Multi-Resolution Analysis (MRA) is a Fast Wavelet Transform in the discrete domain. It applies convolutions with a filter bank containing a high-pass and low-pass filters, associated with the mother wavelet. Results obtained by the low-pass filtering are the Approximation Coefficients An, which captures trends of the signal. High-pass filtering results in Detail Coefficients Dn, extracting fluctuations, and transients.
This process of convolution with the filter bank can be repeated using the previous lowpass filter output as the next input signal, increasing the decomposition level of the transform, according to Figure 1. This procedure is limited only by the initial signal's sampling rate, which decreases by half at each level (Murguia & Rosu, 2011). Several mother wavelets were tested at many decomposition levels to quantify the transients in the batteries' voltage signals, while the power pulses were applied. It was verified higher sensitivity to the transient pattern with Haar's first decomposition level as mother wavelet.

Support vector machines
SVMs are structures based on Perceptron Artificial Neural Networks, with a non-linear transformation to construct the decision surfaces, used to solve binary classification problems (Boser et al., 1992).
In a linear SVM, classes are separated through a hyperplane generated by Equation 7. Note in Equation 7 that ) (x Y identifies where class input x belongs, similar to a classification ANN.
However, an infinite number of solutions can be obtained by training the same ANN because of the randomness of training/testing data selection, weights initialization, and the stop conditions. In other words, the hyperplane may have angular and linear variations and still separate the classes correctly.
The main goal of SVMs is an optimum solution for hyperplane through the maximization of margins between support vectors and the separation surface (Cortes and Vapnik, 1995).

DATABASE GENERATION AND SIMULATION PROCEDURES
Identification of EOL cell positions is possible due to their arrangement in the electrical circuit. Impedances between each cell and the battery terminal are different inside each parallel block, as shown in Figure 2, where cell-to-cell connections of an electric car ZEBRA battery are exposed.

Figure 2: Battery cells.
Simulations were performed on parallel blocks of five cells, according to Figure 3, to create the necessary database for training SVMs. The Matlab SymPowerSystems Toolbox is used. For this purpose, the model presented in section 2.1 is used. Then, the Fourier and Wavelet transforms are applied to the voltage and current signals. The identification of the EOL and the cell position is then developed using SVM. Among the simulations, an EOL cell was randomly inserted in the circuit.
The electrical circuit comprises the cells' association, an external resistance used to test the battery back, a voltmeter, and a MOSFET to generate the test pulse. Also, the electrical impedance of the wires which connects those elements was considered. The proposed method can be explained in four steps: • Internal battery switches isolate and connect the parallel blocks of cells one by one to the battery terminals; • For each parallel block, a standard test pulse is applied to the battery terminals, connecting it to a predefined resistive load; • WT and FT are used to evaluate the dynamical pattern of voltage and current signals; • A set of SVMs is used to interpret the outputs of the data processing and identify the EOL cells with its position in the parallel circuit.

IN-CHARGER BATTERY MANAGEMENT SYSTEM
This study proposes a new function: identification of cells that were reached EOL through load tests. An on-board BMS can perform this analysis, however, because they depend only on terminal measurements, it is possible the implementation in charging stations, where a BMS inside stations can diagnose problems in several vehicles.
In-charger BMS can execute complex analysis that is not usually performed, such as voltage/current/load pulse tests for estimation of the battery parameters, SOH, and adjustments in charge/discharge controllers' weights. It also facilitates software updates through an internet connection and real-time analysis by the manufacturer.
However, some BMS functions need to be performed inside EVs, such as charge, discharge, and temperature controllers but require a much simpler system. So, two different BMS can be used, as shown in Figure 4, one inside a vehicle with essential functions, and another in charging stations to perform tests and more complex analysis.

SIMULATION & DATA PROCESSING RESULTS
Parallel blocks of five LiFePO4 cells were simulated in Matlab SymPowerSystems Toolbox, considering the nominal parameters shown in Table 1. Simulations were done with 2880 different cases, in which the following parameters were varied randomly: • Cells initial SOC (between 79% and 99%); • Finished cell SOH (between 30% and 80%); • Cells initial temperature (between 20 o C and 30 o C); • Finished cell position (between 0 and 5).  In each case, battery terminals were connected to a resistive load of 0.03Ω for a period of 0.5s. The third harmonic magnitude extracted from the Fast Fourier Transform (FFT) was applied to the voltage signal measured in the test load pulse, and the WT coefficients was applied to the voltage signal with Haar mother wavelet current signal with Daubechies 3 function, both in first decomposition level. A sampling rate of 10kHz was used.
Simulated cases in the processed two/three-dimensional spaces are shown in Figures 5 and  6, with normalized data. From Figure 5, it is possible to observe that cases with EOL cell in position five can be easily identified, as this class can be easily isolated from others even with a linear function (hyperplane).
In Figure 6.a, the other classes' dispersion can be seen, where there are regions with higher data density. Figure 6.b shows that the majority of data from classes is separable with a non-linear kernel. Most of the cases in positions 1 and 2 are above, and most of the cases in positions 3 and 4 are below the class without EOL cells, being a reasonable estimation of the EOL cell position. However, a better distinguishment of positions 1 from 2, and 3 from 4 are necessary. The latter is done through the data processing shown in Figure 6.c, where almost linear relationships can be seen, which is expected, as the data are processed voltage and current signals of a resistive load. The relations shown in Figure 6.c are not precisely linear because different mother wavelets were used to process the voltage and current signals. Thus, the classes can be easily identified.

CLASSIFICATION RESULTS
As the SVM can only classify the data in two groups, six SVMs were used to distinguish classes shown in Figures 5 and 6 from each other. Expected outputs for each SVM are shown in Table 2, where classes 1 to 5 correspond to positions 1 to 5, and class 0 corresponds to the data without EOL cells.
Due to the non-linear class separation seen in Figure 6, Gaussian kernels were used to the SVMs. Training data corresponds to 80% of the total simulated cases. The remaining 20% were used for testing. Test results are shown in Table 3, where better accuracy was obtained by the SVM5, and worst accuracy by SVMs 3 and 4. These results reflect the class superposition and dispersion seen in Figures 5 and 6. The influence of the different simulation parameters on the accuracy of SVMs 1 to 4 are shown in Figure 7. The simulation parameters were generated randomly within their respective limits. Then, 480 values are used for each parameter, with each set of parameters being executed six times, varying the position of the dead cell, totaling 2880 values. According to Figure 7, the low variations in each SVM error indicate the adequate generalization capacity expected from the SVMs; the classification did not specialize in a specific range of input values and maintained its performance across space. Besides that, the EOL cell identification can be done with different parameters during the battery charging process to cross data and reduce error probability.
Este é um artigo publicado em acesso aberto sob uma licença Creative Commons  Figure 8 shows the confusion matrix for the final classification with all the SMVs. In the predicted class, the total number of elements in the class 0 is higher than 100%, which means that elements from other classes were assigned this class. The total number of elements in class 1 is higher than 100% in the true class, which means that some class elements were classified into more than one class. In classes 2, 3, and 4, the total number of elements is lower than 100%. Thus, some elements of these classes were not assigned to any class.

Figure 8: Confusion Matrix
The samples were randomly shuffled, and some extra rounds were performed to validate the proposed approach. Table 4 shows the performance of SVM0 over five rounds. Table 5 shows the performance of SVM4, which achieved the worst result, over five simulation rounds.  As expected, the variation is low when some extra rounds are performed. This behavior happens because the SVM uses only the set boundary elements to define the classification surface. Besides, the box constraint values used are high, which reduces the influence of noise/fluctuations in the data.

CONCLUSION
This work shows a new battery protection system concept for EVs by inserting a charging station management system. This method can be used to apply test pulses during the charging process and estimate battery parameters, as identification of EOL cell positions with the artificial intelligence approach proposed in this work. The test pulse used has low resistance, so it is similar to a short-circuit test, but the resistance needs to be constant and well known.
Finished cells in the most distant position from battery terminals show to be easy to be detected. Besides, damaged cells closest to the terminals are easily detectable when multiple mother wavelets are used. The results show that the proposed methodology presented adequate results, with lower precision of 90.3% and 86.5% in positions 3 and 4, respectively. Future works can use a higher number of different mother wavelets and decomposition levels to increase its accuracy.