## 3 Methods
### Feature Engineering and Exploratory Data Analysis  
The dataset is processed and sorted based on the operating time, which is represented by charge and discharge. Null values and outliers are searched to ensure a good quality of the experimental measurements before implementing the battery modeling. Initial plots are shown in Figure 2.  
In this specific case, before starting EDA, it is necessary to execute Feature Engineering to calculate the required KPIs related to both charge and discharge, all to obtain the FECs that the given battery has undergone, taking into consideration the charge status, charge current, change charge, and several cycles. The following points summarize the Feature Engineering algorithm that calculates the FECs of the battery:  
* The SOC is calculated using the Coulomb counter and the input features. After that, the charge status is initially defined according to the SOC and updated throughout the complete process for each iteration. The value is negative if discharged and positive if charged. * A charge current is defined as a new feature and initialized in the entire process. This variable gives the difference while charging and has a zero value when the battery is in discharge. * The fraction of completed cycles is calculated based on the positive charge status of the battery and its time evolution. \begin{table}
\begin{tabular}{c c} \hline
**Parameter** & **Value** \\ \hline Width & 300.0 mm \\ \hline Thickness & 37.8 mm \\ \hline Height & 127.0 mm \\ \hline Nominal capacity & 218 Ah \\ \hline Working voltage & 2.8–4.35 V \\ \hline Internal resistance & 0.35–0.45 m\(\Omega\) \\ \hline Nominal discharge current & 72.7 A \\ \hline Maximum Pulse Discharging & 500 A \\ \hline Cell count & 16 \\ \hline \end{tabular}
\end{table} 
Table 1: Battery module datasheet. * The total FECs are calculated considering the cumulative charge status of each iteration. Finally, the capacity, also known as the change of charge per cycle at a given time is obtained by mathematically multiplying the charge current by time. Regarding the contribution of the KPIs, EDA is executed to illustrate the correlation between the newly generated features in the dataset; however, because of the mutual dependence on the charging process, only the most relevant variables are analyzed in the SOC. Visualization of the correlation matrix is illustrated in Figure 3.  
The results indicate that there is a high correlation between the current, time, capacity, and charge current, all due to the Feature Engineering process performed in the previous steps, which is also complemented by the SOC estimations, as expected, showing a mutual dependency of the features SOC vs. time, current vs. capacity, and voltage vs. SOC. The  
Figure 3: Correlation matrix of the dataset after implementing Feature Engineering. EDA shows a strong correlation for the features calculated in the charging process. Figure 2: Initial plots of the charging and discharging processes. The upper plot represents voltage vs. time, and the lower plot indicates current vs. time. complete charging process is represented by the voltage vs. SOC curve shown in Figure 4 by the SOC and voltage evolution. In the discharging process, capacity is the main feature to analyze, all due to the estimations of SOH that will be explained in Section 4. The most relevant insights found in the dataset correspond to the linear relationship between the cycles calculated in the Feature Engineering process and the decrease in capacity, which is a potential indicator to implement regression algorithms for RUL estimations. Figure 5 shows the discharging process in terms of the remaining battery capacity. Usually, the End-of-Life (EOL) criteria are reached when the capacity of a BESS is lower than 70-80% of the total rated capacity [2]. A graphical representation of the EOL criteria is represented in Figure 6 and reference [6] is used as a basis to illustrate. It is fundamental to point out that the cycle index represents the FEC count of the battery during the discharging process.