# Explainable Artificial Intelligence for State of Charge Estimation of Lithium-Ion Batteries
## 4 Experiments and Results
### E1: SoC Estimation Using Different NN Architectures  
This experiment benchmarks the architectures mentioned in Section 3.5. Comprehensive details regarding their functionality and parameters, as well as any required adjustments, are documented below:  
* **FNNs** are simple networks that can be used as a baseline for comparison. In our case, we adapted some basic NNs for SoC estimation and began implementing NNs with more complex architectures once the preliminary tests were conducted. * **LSTM/GRU**[39; 40; 41]: These are recurrent NNs that utilize internal states from hidden units along with memory gates to process data sequences. The following hyperparameters were analyzed and tuned; the specifics can be found in Appendix B. **-** number of LSTM/GRU layers--how many layers are stacked on each other **-** hidden size of LSTM/GRU--the size of the hidden state of LSTM **-** dropout rate--rate of random values being set to 0 during training
* Number of convolution and pooling layers
- Number of filters in every convolutional layer
- Kernel sizes in convolutional and pooling layers (for each layer)
- Number of LSTM layers--how many layers are stacked on each other
- Hidden size of the LSTM--how large the hidden state of the LSTM is
- Dropout rate--rate of random values being set to 0 during training
- Number of hidden units of the last linear layer
- **ResNet-LSTM**[39; 41] The ResNet-LSTM architecture differs from CNN-LSTM in the stacking of residual blocks instead of the stacking of convolutional layers. In this setup, ResNet extracts features, followed by the LSTM to train the encoded feature vector with dynamics and make a prediction [48]. As mentioned previously regarding ResNet, the maximal number of layers is 16. The following hyperparameters were analyzed and tuned; the specifics can be found in Appendix B. - Number of ResNet layers, keeping in mind that every block contains two layers, so the number of layers must be an even number
- Number of filters in groups 1/2/3 of ResNet--how many filters each layer in one group has
- Stride in groups 1/2/3 of ResNet--the stride size that the convolution kernel will have in the specified group
Number of LSTM layers--how many layers are stacked on each other
* Hidden size of LSTM--how large the hidden state of LSTM is
* Dropout rate--rate of random values being set to 0 during training
* **Informer**[49] The general informer (transformer-based) architecture is made for sequence- to-sequence problems. Since we are dealing with a regression task, we need only the encoder part of the architecture to encapsulate the input into a feature map. Then, we add a linear layer to forward this information to one output variable. According to [PERSON] et al. [50], the transformer architecture has three significant limitations:
* The quadratic computation of self-attention
* The memory bottleneck in stacking layers for long inputs
* The speed decrease when predicting long outputs As discussed above, the decoder part is not relevant to our problem, nor is the third limitation. To improve the mentioned limitations, the informer architecture introduces the ProbSparse self-attention mechanism, which needs to calculate the O (In LQ) dot-product for each query-key lookup. Moreover, instead of fully connected layers, the informer architecture contains 1D convolutional layers followed by max-pooling, reducing overall memory usage. The embeddings in the original implementation are a combination of value embedding, positional embedding, and temporal embedding. However, the temporal embedding may introduce redundant information about our use case since different cars may have the same SoC at different points in time. Therefore, the model is tested with and without temporal embeddings.