# A Unified Machine Learning Framework for Li-Ion Battery State Estimation and Prediction +
## 5 Implementation and Experimental Results
### Use Case 1: SoC Estimation on the One-Cycle Dataset  
This use case deals with SoC estimation by processing the Madison dataset of McMaster University [19], which describes only one cycle of the battery's lifetime by simulating a drive cycle of an EV. It was derived from Panasonic 18650 PF cells with NCA chemistry and a nominal capacity of 2.9 Ah. This dataset consists of 50 datasets by applying 10 different drive cycles at five different temperatures. These drive cycles were created from different charging profiles and different features such as the mean, RMS, and peak power values for each temperature that can effectively simulate different vehicle driving behaviors. Therefore, there is no knowledge of the battery's previous condition. For this implementation, raw data and features obtained by resampling have been selected as features. The raw data are recorded through sensors during the cycling process, while features obtained by resampling include data that are resampled at a specific and configurable frequency. Table 4 presents the features that have been applied to this use case. The most suitable evaluation metric for this use case is the RMSE, which indicates the deviation of the predicted SoC from the reference value of the SoC. This metric is measured in percentage (%) since it is expressed in the same unit as the target variable, in this case the SoC. In this use case, four different pipelines have been implemented. The details about the configuration and evaluation of these pipelines are presented in Table 5. Figure 8 depicts the RMSE for each pipeline, and Figure 9 illustrates the actual and predicted values of the SoC for pipeline 2. In this pipeline, the model does not perform with high accuracy since the input dataset illustrates only one cycle of the battery's lifetime, and hence a percentage of this is not adequate information for the model's training. \begin{table}
\begin{tabular}{c c} \hline \hline
**ML Model** & **Tuning Parameters** \\ \hline \hline  & 4 layers (1 st: 300 neurons; 4 th: activation layer ReLu) \\  & Loss: MAE \\  & Optimizer: [PERSON] \\  & Validation split: 0.2 \\  & Epochs: 100 \\  & Batch size: 150 \\ \hline  & 4 layers with 21 and 19 neurons in the 2 nd and 3 rd layer \\  & Activation function: ReLu \\  & Optimizer: [PERSON] \\  & Loss: MSE \\  & Validation split: 0.2 \\  & Epochs: 100 \\  & Batch size: 150 \\ \hline  & 7 convolutional and max pooling layers for detailed features and \\  & scalar features, respectively, and \\ CNN & 3 more layers with 128 neurons in the 1 st one \\  & Activation function: ReLu \\  & Optimizer: [PERSON] \\ \hline  & Structured data regressor() \\  & Loss: MSE \\ AutoML & Epochs: 100 \\  & Batch size: 150 \\  & Max trials: 10 \\ \hline LR & Linear regressor() \\ \hline EN & Elastic Net() \\  & Grid search with L1 ratio: [0.01, 0.25, 0.5, 0.75, 1] \\ \hline SVR & SVR0 \\  & C feature: 1 \\  & Kernel feature: ’rbf’ \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Tuning parameters for ML models applied for the implementation of these use cases. \begin{table}
\begin{tabular}{c c c} \hline \hline \multicolumn{3}{c}{**Features Selection for Use Case 1**} \\ \hline
**Raw Data** & **Features by Resampling** \\ \hline voltage (V) & resampled voltage in 5 mHz (V\({}_{\text{5 mtHz}}\)) \\ \hline current (I) & resampled voltage in 0.5 mHz (V\({}_{\text{0.5 mtHz}}\)) \\ \hline temperature (T) & resampled current in 5 mHz (I\({}_{\text{5 mtHz}}\)) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Features applied in use case 1. Figure 8: The evaluation of different pipelines for SoC prediction in use case 1 by the RMSE metric.