=Paper= {{Paper |id=Vol-3839/paper4 |storemode=property |title=ExplainBattery: Enhancing Battery Capacity Estimation with an Efficient LSTM Model and Explainability Features |pdfUrl=https://ceur-ws.org/Vol-3839/paper4.pdf |volume=Vol-3839 |authors=Leonardo Dal Ronco,Erasmo Purificato |dblpUrl=https://dblp.org/rec/conf/xaiit/RoncoP24 }} ==ExplainBattery: Enhancing Battery Capacity Estimation with an Efficient LSTM Model and Explainability Features== https://ceur-ws.org/Vol-3839/paper4.pdf
                         ExplainBattery: Enhancing Battery Capacity Estimation
                         with an Efficient LSTM Model and Explainability Features
                         Leonardo Dal Ronco1,† , Erasmo Purificato2,∗,‡
                         1
                             Deepser, Schio, Italy
                         2
                             Joint Research Centre, European Commission, Ispra, Italy


                                        Abstract
                                        Prognostic and Health Management (PHM) is essential for ensuring the reliable operation of machines by
                                        predicting failures and enabling preventive measures. In this context, accurately predicting the capacity of
                                        lithium-ion batteries, which power a wide range of applications, is crucial due to their inevitable degradation
                                        over time. Battery Management Systems (BMS) play a pivotal role in monitoring and managing battery health
                                        throughout their lifecycle. We propose a novel Long Short-Term Memory (LSTM) neural network model for
                                        lithium-ion battery capacity prediction. Our model is designed to be more efficient than state-of-the-art models,
                                        particularly in terms of the number of trainable parameters, making it suitable for deployment on low-resource
                                        devices commonly found in BMS. Utilizing the Li-ion Battery Aging Dataset provided by the NASA Ames Prognostics
                                        Center of Excellence, we demonstrate that our LSTM model offers accurate and reliable capacity predictions. To
                                        complement the proposed model, this paper introduces ExplainBattery, a web application that allows users to
                                        interact with our efficient LSTM. This tool enables users to visualize predictions for different batteries and explore
                                        the most influential attributes through an explainable dashboard. ExplainBattery enhances both the usability and
                                        transparency of our model, providing an accessible platform for further research and practical application in
                                        PHM and BMS environments.

                                        Keywords
                                        Long-Short Term Memory, Lithium-ion Battery, Capacity Estimation, Remaining Useful Life, Explainability




                         1. Introduction
                         The growing integration of lithium-ion batteries across a wide range of applications [2], including
                         electric vehicles, renewable energy storage systems, and consumer electronics, emphasizes their key
                         role in advancing sustainable energy solutions. However, the performance and longevity of these
                         batteries are constrained by their gradual degradation over time, which leads to a reduction in their
                         overall capacity and efficiency. Consequently, accurately predicting battery capacity is fundamental to
                         maintaining optimal performance, enhancing safety, and preventing unexpected failures, particularly
                         in critical applications. This challenge forms a core aspect of Prognostic and Health Management
                         (PHM) [3, 4], a multidisciplinary field dedicated to predicting the health and remaining useful life of
                         systems, thereby enabling proactive maintenance and reducing operational risks.
                            Battery Management Systems (BMS) [5] are at the forefront of this effort, as they are responsible for
                         continuously monitoring and controlling battery health parameters, ensuring the safe and efficient
                         operation of lithium-ion batteries throughout their lifecycle. Within the BMS framework, accurate
                         capacity prediction is essential for estimating the state of health (SOH) and state of charge (SOC) of
                         the battery, which directly influences the reliability and efficiency of the devices it powers. However,

                         XAI.it - 5th Italian Workshop on Explainable Artificial Intelligence, co-located with the 23rd International Conference of the Italian
                         Association for Artificial Intelligence, Bolzano, Italy, November 25-28, 2024 [1]
                         ∗
                             Corresponding author.
                         †
                             The author contributed to this work while affiliated with Guglielmo Marconi University, Rome, Italy.
                         ‡
                             The author contributed to this work while affiliated with Otto von Guericke University Magdeburg, Germany, and Guglielmo
                              Marconi University, Rome, Italy. The view expressed in this paper is purely that of the author and may not, under any
                              circumstances, be regarded as an official position of the European Commission.
                         Envelope-Open leonardo.dalronco@gmail.com (L. Dal Ronco); erasmo.purificato@acm.org (E. Purificato)
                         GLOBE https://erasmopurif.com/ (E. Purificato)
                         Orcid 0000-0002-5506-3020 (E. Purificato)
                                        © 2024 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).


CEUR
                  ceur-ws.org
Workshop      ISSN 1613-0073
Proceedings
predicting battery capacity is a non-trivial task, given the complex electrochemical dynamics of lithium-
ion batteries and the multitude of factors, such as temperature, charging rates, and usage patterns, that
influence their degradation over time.
   Traditional modeling techniques, including physics-based [6, 7, 8, 9] and data-driven [10, 11, 12]
approaches, have been extensively explored for battery capacity prediction. While physics-based models
offer insights into the underlying degradation mechanisms, they often require detailed knowledge of
battery chemistry and are computationally intensive. In contrast, data-driven approaches, particularly
those based on machine learning, have emerged as a more practical solution. They can learn complex
patterns directly from historical data without requiring explicit modeling of electrochemical processes.
Among these, Recurrent Neural Networks (RNNs) [13, 14, 15, 16] have shown promise due to their
inherent ability to model temporal dependencies in sequential data. However, standard RNNs are prone
to the vanishing gradient problem, which limits their effectiveness in capturing long-term dependencies
and thus compromises prediction accuracy.
   Long Short-Term Memory (LSTM) [17, 18, 19] networks have been introduced as a superior alternative,
overcoming the limitations of traditional RNNs by incorporating memory cells and gating mechanisms
that enable the retention of long-term dependencies in sequential data. This capability makes LSTM
networks particularly well-suited for modeling the complex, time-dependent degradation behavior of
lithium-ion batteries. Nevertheless, existing LSTM-based models in the literature often suffer from high
computational complexity and a large number of trainable parameters, making them less practical for
deployment in BMS environments where computational resources and energy efficiency are constrained.
   To address these limitations, this paper proposes a novel LSTM-based neural network architecture
tailored for lithium-ion battery capacity prediction, focusing on achieving a balance between accuracy
and efficiency. Our approach builds upon the architecture proposed by Ansari et al. [20], but with a
critical modification, i.e., replacing traditional RNN layers with LSTM layers, to leverage the strengths of
LSTM in capturing long-term dependencies while ensuring an efficient parameter structure. This results
in a model that not only achieves high predictive accuracy but also maintains a reduced computational
footprint, making it more suitable for real-time applications in BMS.
   We conducted a comprehensive evaluation of the proposed model using the Li-ion Battery Aging
Dataset provided by the NASA Ames Prognostics Center of Excellence, a widely recognized benchmark in
the battery research community. The experimental results demonstrate that our LSTM-based model
outperforms existing state-of-the-art models, particularly those developed by Choi et al. [21] and Park et
al. [22], in terms of prediction accuracy. Remarkably, this performance is achieved with a significantly
lower number of trainable parameters, indicating that the model is not only more accurate but also
more efficient and potentially deployable in resource-constrained BMS environments.
   In addition to the development of the LSTM model, we recognize the importance of transparency,
interpretability, and trustworthiness in the today’s scientific context. This holds true for many domains,
such as loan approval systems [23], user profiling [24, 25, 26, 27], e-commerce [28, 29], and especially
for critical applications like battery health monitoring. Therefore, we developed ExplainBattery, a web-
based application designed to facilitate interaction with the dataset, the proposed LSTM model, and the
implemented explainability techniques, including SHAP [30, 31] and Saliency Maps [32]. ExplainBattery
allows users to visualize battery capacity predictions, explore the model’s decision-making process,
and investigate the impact of various features on the predictions. This enables deeper insights into the
model’s behavior and enhances its applicability in real-world PHM and BMS environments.
   This paper makes a contribution to the field of lithium-ion battery health management by presenting
an accurate, efficient, and explainable LSTM-based model for capacity prediction, complemented by a
user-friendly web application that encourages further research and practical deployment.
   The structure of the paper is organized as follows: Section 2 provides a review of the background
and related work in the domain of battery capacity prediction; Section 3 illustrates in detail the dataset
adopted as the benchmark; Section 4 describes the methodology and architecture of the proposed LSTM
model; Section 5 presents the experimental evaluation and results; Section 6 introduces ExplainBattery,
detailing its features and functionality; finally, Section 7 concludes the paper and outlines potential
directions for future research.
2. Background and Related Work
In this section, we discuss definitions and techniques for predicting the health status of batteries and
explore explainability approaches specifically applied to RNNs, particularly LSTM networks.

2.1. State of Health and Remaining Useful Life
In the existing literature [22, 20, 21, 33], the State Of Health (SOH) and Remaining Useful Life (RUL)
of a battery are often used interchangeably, despite exhibiting distinct differences alongside shared
commonalities.
   The estimation of a battery’s SOH is primarily based on the assessment of its capacity, which is
calculated from the battery’s current capacity using the following formula:
                                                     𝐶𝑘
                                            𝑆𝑂𝐻 =       ∗ 100                                          (1)
                                                     𝐶0
where 𝐶0 is the nominal capacity of the battery, and 𝐶𝑘 is the capacity of the battery at the 𝑘th cycle.
   With the End Of Life (EOL) criterion of a battery defined as the threshold capacity value beyond
which the battery’s proper functioning is no longer guaranteed, the RUL can be formally defined as
the difference between the total number of charge-discharge cycles elapsed when the battery’s actual
capacity drops to the threshold value (𝑁𝐸𝑂𝐿 ) and the number of charge-discharge cycles performed thus
far by the battery (𝑁). Consequently, the RUL quantifies the number of remaining charge-discharge
cycles available to the battery, after which its performance and proper functioning are no longer assured.
In formula:

                                            𝑅𝑈 𝐿 = 𝑁𝐸𝑂𝐿 − 𝑁                                            (2)
    Given that the primary objective of existing techniques and studies for estimating SOH and RUL [22,
20, 21, 33] is the assessment of battery capacity, the model proposed in this work aims to estimate the
capacity of lithium-ion batteries. This information will subsequently be utilized to evaluate the battery’s
health status, thereby providing valuable insights into its remaining lifespan and overall performance.
    The techniques for estimating battery SOH fall into three main model categories: experience-based,
physics-based, and data-driven.
    Experience-based methods utilize expert knowledge and predefined rules to estimate SOH by ana-
lyzing stochastic deterioration patterns. While effective for less complex systems, they lack real-time
monitoring capability and are heavily reliant on domain expertise, which limits their adaptability [34].
    Physics-based models create mathematical representations of battery degradation using real-time data
to update parameters [7]. They are suitable for accurate SOH prediction without requiring extensive
historical data but are hindered by the absence of established models for battery aging behaviors
and complexities in capturing failure modes [8]. Techniques such as Particle Filtering [9] and Kalman
filtering [6] have been employed, yet challenges like particle degeneration limit their long-term accuracy.
    Data-driven models, which rely on historical measurements of battery parameters (e.g., voltage,
current, temperature), have shown the most promise due to their adaptability and efficiency. They do
not require explicit physical models, making them versatile for different battery types. Early methods
combined Ensemble Empirical Mode Decomposition (EEMD) with ARIMA [12] but faced limitations
in capturing non-linear behaviors. More sophisticated techniques, such as Support Vector Machines
(SVM) [10], Relevance Vector Machines (RVM) [11], and artificial neural networks (ANNs) [35], have
been developed. Recently, RNNs, specifically LSTM networks, have gained prominence for their ability
to handle time-series data effectively [36].

2.2. Recurrent Neural Networks vs. Long-Short Term Memory Networks
Recurrent Neural Networks (RNNs) [13, 14, 15, 16] are a class of ANNs designed to process sequential
data by maintaining a form of memory through their recurrent connections, allowing information to
persist over time. However, standard RNNs face challenges in learning long-term dependencies due to
the vanishing gradient problem, which hampers the network’s ability to propagate information over
extended sequences. Long Short-Term Memory (LSTM) [17, 18, 19] networks address this limitation by
incorporating a more sophisticated memory cell structure that includes gates (specifically, input, forget,
and output gates) that regulate the flow of information. These gates enable LSTMs to retain or discard
information as needed, making them significantly more efficient in capturing long-term dependencies
in sequential data compared to traditional RNNs. Consequently, LSTMs exhibit superior performance
in tasks involving lengthy sequences, such as time series prediction.

2.3. Single-Channel vs. Multi-Channel Input Profiles
Machine learning models employing a Single-Channel Input (SCI) profile are characterized by their use
of a dataset from a single battery, typically split into training and testing sets. Such models rely on a
single battery parameter (e.g., voltage or capacity) as the input feature for predicting the SOH or RUL.
This univariate approach often results in high error rates due to the low dimensionality and lack of
comprehensive information inherent in the dataset. Consequently, SCI models struggle to capture the
complex degradation dynamics of batteries, leading to suboptimal accuracy in SOH and RUL predictions.
   In contrast, the adoption of a Multi-Channel Input (MCI) profile represents a significant advancement
in training methodologies. MCI models leverage datasets from multiple batteries, incorporating a range
of parameters—such as voltage, current, temperature, and capacity, across various charge-discharge
cycles. This multivariate approach enables the model to capture more intricate patterns of battery
degradation, including the phenomenon of capacity regeneration, which SCI models often fail to
represent adequately. The inclusion of multiple channels of input data allows for a more holistic
understanding of the battery’s health, thereby improving the model’s predictive accuracy.
   Literature on battery RUL prediction [22, 20, 21, 37] consistently demonstrates the superiority of
MCI methodologies over SCI approaches in terms of accuracy and robustness. MCI models not only
provide a more nuanced representation of the battery’s operational profile but also enhance the model’s
ability to generalize across different battery conditions. Therefore, in line with these findings, this work
employs an MCI methodology to train the proposed model, aiming to achieve more reliable and precise
predictions of battery SOH and RUL.

2.4. Explainable Artificial Intelligence
As machine learning models increasingly inform critical decisions in battery SOH estimation, explain-
ability becomes a key concern. Trust in these models hinges on transparency, distinguishing between
trusting individual predictions and trusting the model’s overall behavior [38]. Building this trust is crucial,
particularly in applications where safety and operational efficiency are paramount.
   In the domain of lithium-ion batteries, XAI techniques offer a pathway to understand and validate
model predictions, ensuring safe deployment in energy management systems. However, research on
the explainability of RNNs remains limited. Schlegel et al. [39] investigated XAI methods for time-
series data, revealing that techniques like SHAP, Saliency Maps, DeepLIFT, and Layer-wise Relevance
Propagation (LRP) offer valuable insights but vary in effectiveness based on model architecture. For
RNNs, SHAP proved consistent across models, while other techniques showed performance fluctuations,
indicating the need for further exploration of XAI methods in this field.
   Advancing data-driven SOH estimation with optimized RNN architectures, coupled with rigorous
XAI techniques, becomes essential for developing trustworthy, efficient battery management solutions.


3. Li-ion Battery Aging Dataset
The benchmark dataset used in the presented work, which is the main dataset adopted in the litera-
ture [22, 20, 21] to estimate the capacity of a lithium-ion battery, is the Li-on Battery Aging Dataset1
1
    https://catalog.data.gov/dataset/li-ion-battery-aging-datasets. Accessed October 28, 2024.
Figure 1: Capacity degradation curve of the batteries included in the Li-ion Battery Aging Dataset with increasing
charge-discharge cycles.


provided by the NASA Ames Prognostic Center of Excellence. The dataset contains the lifecycle data
of four custom-built lithium-ion batteries (identified as B0005, B0006, B0007, and B0018), each with a
nominal capacity of 2 Ah, which were subjected to and monitored under three different operational
profiles at room temperature: charge, discharge, and impedance.
   The batteries were charged in constant current (CC) mode at 1.5 A until the battery voltage reached
4.2 V, followed by constant voltage (CV) mode until the charge current dropped to 20 mA. The batteries’
discharge was carried out at a constant current (CC) level of 2 A until the battery voltage dropped to
2.7 V, 2.5 V, 2.2 V, and 2.5 V for batteries B0005, B0006, B0007, and B0018, respectively. Impedance
measurement, which indicates the ease with which alternating current passes through the electrical
circuit, was performed by frequency scanning using the technique of Electrochemical Impedance
Spectroscopy (EIS) from 0.1 Hz to 5 kHz.
   Repeated charge and discharge cycles lead to accelerated aging of the batteries, while impedance
measurements provide information on internal battery parameters that change as aging progresses.
Figure 1 shows the capacity degradation curve of the various batteries due to the repeated charge-
discharge cycles performed on them.
   After the data collection process, a predictive model will be trained utilizing the dataset to estimate
battery capacity. Notably, the dynamic nature of the discharge process, characterized by rapid variations
in current over time, renders the accurate measurement or calculation of internal battery parameters
challenging. Furthermore, the parameters governing the discharge process in real-world scenarios
can exhibit significant variability, contingent upon the specific usage patterns of the battery owner
and user. In contrast, the charging process is typically governed by manufacturer-defined protocols
and parameters embedded in the battery charger device, thereby facilitating the measurement and
comparison of battery performance during successive charging cycles. To elucidate the evolution of
internal battery parameters throughout its lifespan, this study will primarily focus on exploiting data
related to voltage, current intensity, and battery temperature recorded during charge cycles. Figures 2,
3, and 4 illustrate the trends of voltage, current intensity, and temperature values for batteries B0005,
B0006, B0007, and B0018 during the charging phase, as a function of increasing charge-discharge cycles.
   An examination of the voltage, current intensity, and temperature profiles measured during the
charging phase reveals distinct characteristics of batteries in advanced stages of aging, having undergone
numerous charge-discharge cycles. Specifically, the following trends are observed: (1) The threshold
voltage of 4.2 V is attained significantly earlier in aged batteries, as compared to their relatively newer
counterparts; (2) The current intensity diminishes more rapidly in aged batteries; and (3) The maximum
temperature is reached more expeditiously in aged batteries. These observations collectively indicate
that the voltage, current intensity, and temperature values measured during the charging phase are
strongly influenced by the battery’s health condition, which is, in turn, a function of its degree of aging.
   Based on these findings, it can be inferred that a correlation exists between the measured charging
phase parameters and the battery’s state of health. This relationship will be leveraged in subsequent
Figure 2: Voltage trend over time for the batteries included in the Li-ion Battery Aging Dataset.




Figure 3: Current intensity trend over time for the batteries included in the Li-ion Battery Aging Dataset.


chapters to train a predictive model for estimating the capacity of lithium-ion batteries. To further
elucidate the evolution of internal battery parameters throughout its lifespan, the capacity measured
during the preceding discharge cycle will also be taken into account. By integrating these data, a more
comprehensive understanding of the aging process and its impact on battery capacity can be achieved.
Figure 4: Temperature trend over time for the batteries included in the Li-ion Battery Aging Dataset.


4. System Design and Implementation
In the field of lithium battery capacity estimation, accurate and efficient prediction models are crucial
for ensuring reliable operation and longevity of battery systems. Recent advancements have led to the
development of state-of-the-art models by Choi et al. [21], Park et al. [22], and Ansari et al. [20], each
contributing unique strengths to the domain. A critical analysis of these models reveals an opportunity
to enhance predictive performance by combining their most effective elements.
   The models proposed by Choi et al. [21] and Park et al. [22] utilize LSTM-based architectures, which
excel in capturing the temporal dependencies and nonlinear degradation patterns inherent in battery
capacity data. Their sophisticated LSTM frameworks have demonstrated high predictive accuracy,
making them benchmarks for the industry. However, these models are computationally intensive,
with complex architectures that may be less practical for implementation in systems with limited
computational resources, such as BMS.
   In contrast, Ansari et al. [20]’s model adopts a more efficient approach by employing a simpler RNN-
based architecture. This model offers faster training and inference times, making it more suitable for
real-time applications and deployment on hardware with restricted processing capabilities. Nevertheless,
this model’s reduced complexity results in lower predictive accuracy compared to Choi et al. [21]
and Park et al. [22]’s LSTM-based models, limiting its effectiveness in capturing battery degradation
behaviors.
   Recognizing the strengths and limitations of these approaches, our system design strategy aims to
integrate the efficiency of Ansari et al. [20]’s model with the predictive capabilities of LSTM architectures.
Specifically, we adopt this model architecture as a foundational framework due to its computational
efficiency and replace the standard RNN layers with LSTM layers. This hybrid approach seeks to
leverage the superior sequence-learning ability of LSTMs, allowing the model to capture long-term
dependencies in battery data more effectively, as demonstrated in Choi et al. [21] and Park et al. [22]’s
work. By incorporating LSTM layers within a less complex architecture, our objective is to achieve
a balance between computational efficiency and predictive accuracy, resulting in a model that can
be deployed in real-world BMS applications while maintaining high performance in battery capacity
estimation. This design choice represents a strategic synthesis of existing methodologies. It aims to
Figure 5: Architecture of the proposed LSTM-based model.


achieve the predictive robustness of LSTM-based models while retaining the operational efficiency
necessary for practical applications. Through this integrated approach, we aim to enhance the overall
reliability and applicability of lithium battery capacity estimation in energy management systems.
   Given the above motivation, the resulting proposed architecture, whose structure is shown in Figure 5,
is constructed with the input layer of 31 nodes, a hidden layer of 10 LSTM neurons, and the output layer
for estimating the battery capacity.


5. Evaluation
In this section, we describe the proposed model’s training process, the experimental setting to compare
it with the existing models, and finally, discuss the experimental results.

5.1. Training process
For the training of the proposed LSTM-based neural architecture, we employed a technique called
systematic sampling [40, 41]. It is a sampling strategy that involves extracting samples at regular
intervals from an ordered reference population. In our specific case, data related to voltage, current
intensity, and temperature during a charging cycle, as well as the capacity recorded during the previous
discharge cycle, are used to estimate the battery’s current capacity. Specifically, for each charging cycle,
10 values for voltage, 10 values for current intensity, and 10 values for temperature are extracted using
the systematic sampling technique to form the input vector, which consists of 31 features, along with
the capacity recorded during the previous discharge cycle.
   Given its demonstrated efficacy, as discussed in Section 2.3, we train our model with an MCI profile
which entails that, in each iteration, data from three batteries are used as training datasets, with the
fourth serving as the testing dataset.
   Figure 6 illustrates the described training process, including systematic sampling and the MCI profile.
Figure 6: Training process of the proposed model, constituted by systematic sampling and a Multi-Channel
Input (MCI) profile.

                                                         Performance Metrics Mean
                  Model           Parameters
                                                  MSE (↓)       RMSE (↓)    MAE (↓)    MAPE (↓)
              Choi et al. [21]      17472       6.052 × 10−4     0.0246     0.0104      0.0159
              Park et al. [22]      2772        5.227 × 10−4     0.0198     0.0103      0.0145
             Ansari et al. [20]      491        8.378 × 10−4     0.0278     0.0139      0.0157
             Proposed model         1578        2.797 × 10−4     0.0156     0.0089      0.0093
Table 1
Comparison between the performance metrics and complexity (expressed as the number of trainable parameters).
The down arrow (↓) indicates that lower values are better. Bold indicates the best value for each metric, while
underlined is the second best.


5.2. Experimental Setting
We assess the effectiveness of the proposed model on the Li-ion Battery Aging Dataset (Section 3)
comparing the results against the state-of-the-art models already mentioned in this paper, namely,
Choi et al. [21] (2019), Park et al. [22] (2020), and Ansari et al. [20] (2021). The metrics adopted for the
performance evaluation are Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute
Error (MAE), and Mean Absolute Percentage Error (MAPE). Moreover, the trainable parameters are also
calculated and reported to provide a measure of the complexity of the different models to relate them to
their potential efficiency for implementation on a BMS.
   For the training phase, we adopt the same MCI profile (see Section 5.1) for all the models, iterating at
each stage for 1000 epochs, employing a learning rate of 0.001 and an Adam optimizer.

5.3. Experimental Results
The results of the conducted experiments are presented in Table 1. Due to the MCI profile employed
for the training-testing process, the performance metric scores are reported as the mean values of the
individual experiments carried out on each battery, while the number of trainable parameters remains
(a) Voltage trend over time for different charge cycles                 (b) Capacity trend over time shown for battery B0005,
shown for battery B0005.                                                from cycle 1 to cycle 168.

Figure 7: ExplainBattery - NASA Battery Dataset page


constant throughout the entire evaluation.
   A comprehensive analysis of the results reveals that the proposed model consistently outperforms the
most effective state-of-the-art model, as presented by Park et al. [22]. Specifically, our model achieves
substantial improvements across multiple evaluation metrics, with reductions of 46.45% in MSE, 21.21%
in RMSE, 13.59% in MAE, and 35.86% in MAPE. Notably, these enhancements are achieved while
simultaneously reducing the complexity of the neural architecture, demonstrated by a 75.67% decrease
in trainable parameters. Regarding efficiency, the increase in the number of trainable parameters
relative to the model proposed by Ansari et al. [20] amounts to 68.88%, indicating a judicious trade-off.
This augmentation is justified by the significantly enhanced performance achieved, which substantially
surpasses the improvements observed in the original model.


6. ExplainBattery Web Application
To facilitate exploration of the Li-ion Battery Aging Dataset used for training the proposed LSTM-based
neural architecture, as well as to enable interaction with the model for accuracy verification and experi-
mentation with explainability techniques for independent reliability assessment, the ExplainBattery
web application has been developed (using Streamlit 2 ) and published3 . This tool serves as a foundation
for further exploration and investigation into explainability techniques applied to lithium-ion battery
capacity estimation using LSTM networks.
   The developed web application is structured with the four distinct pages illustrated below, accessible
via a dedicated sidebar menu.

About This page functions as ExplainBattery’s homepage, describing the scientific research conducted
and offering instructions on how to navigate and interact with the web application.

NASA Battery Dataset On this page, users can explore the Li-ion Battery Aging Dataset (illustrated
in detail in Section 3). After setting the desired parameters, a chart configured according to the selected
values will be generated and displayed on the page. Figure 7 presents examples of this page in use.

LSTM Capacity Prediction This page allows interaction with the proposed LSTM model imple-
mented in this study, enabling verification of the prediction accuracy. Once the parameters are set,
a table displaying the accuracy metrics (MSE, RMSE, MAPE, MAE) of the LSTM model, using the
2
    https://streamlit.io/. Accessed October 28, 2024.
3
    https://explainbattery.streamlit.app/. Accessed October 28, 2024.
Figure 8: ExplainBattery - LSTM Capacity Prediction page. The accuracy metrics for the model using battery
B0005 as the test battery are displayed. Additionally, a chart is shown comparing the actual capacity values with
the estimated capacity values for battery B0005, from cycle 1 to cycle 167.




(a) SHAP. The top 12 features are displayed in order of                        (b) Saliency Map.
relevance.

Figure 9: ExplainBattery - Explainability page. In both cases, an explanation chart is generated for the model
using battery B0005 as the test battery for cycles from 1 to 167. The features cap and temp_10 are excluded.


selected battery as the test battery, will be shown. Subsequently, a chart comparing the actual capacity
values with the estimated values generated by the LSTM model for the selected cycles will be displayed.
Figure 8 illustrates an example of this page in use.

Explainability This page enables experimentation with two explainability techniques, SHAP [30, 31]
and Saliency Maps [32], applied to the proposed LSTM-based neural network, allowing independent
verification of their reliability. For the SHAP technique, users can select the number of features to
display and choose to either order the features chronologically (from those related to the most recent
discharging cycle to the least recent) or rank them by relevance. For both explainability methods, users
can also choose which features to exclude from the visualization, thereby gaining insights into the
influence of all the features by means of the displayed charts. Once these parameters are configured, an
explanation chart based on the selected values will be generated and displayed on the page. Figure 9
provides examples of how the Explainability page can be utilized.
7. Conclusion
In this study, we addressed the challenges of developing a neural model for accurately and efficiently
estimating the capacity of lithium-ion batteries. We implemented a novel neural architecture based
on the model proposed by Ansari et al. [20], replacing standard RNN layers with LSTM layers to
enhance the model’s ability to capture complex temporal dependencies. The evaluation was conducted
using NASA’s Li-ion Battery Aging Dataset, providing a robust benchmark for assessing the model’s
performance.
   The experimental results demonstrated that the proposed model outperformed state-of-the-art models,
specifically those by Choi et al. [21] and Park et al. [22], achieving superior accuracy with a less complex
architecture. This reduced complexity suggests that the model is not only more efficient but also
potentially more suitable for deployment in BMS.
   To further facilitate interaction with the developed model, we implemented a web application named
ExplainBattery. This tool allows users to explore the dataset, verify the model’s accuracy, and experiment
with explainability techniques, such as SHAP and Saliency Maps, to gain deeper insights into the model’s
decision-making process.
   Future work will involve an extended evaluation using additional datasets and models to further
validate the robustness and generalizability of the proposed approach, ensuring its applicability in a
broader range of real-world scenarios.


References
 [1] M. Polignano, C. Musto, R. Pellungrini, E. Purificato, G. Semeraro, M. Setzu, XAI.it 2024: An
     Overview on the Future of Explainable AI in the era of Large Language Models, in: Proceedings of
     5th Italian Workshop on Explainable Artificial Intelligence, co-located with the 23rd International
     Conference of the Italian Association for Artificial Intelligence, Bolzano, Italy, November 25-28,
     2024, CEUR. org, 2024.
 [2] S. Li, S.-Q. Zhang, L. Shen, Q. Liu, J.-B. Ma, W. Lv, Y.-B. He, Q.-H. Yang, Progress and perspective
     of ceramic/polymer composite solid electrolytes for lithium batteries, Advanced Science 7 (2020)
     1903088.
 [3] Y. Hu, X. Miao, Y. Si, E. Pan, E. Zio, Prognostics and health management: A review from the
     perspectives of design, development and decision, Reliability Engineering & System Safety 217
     (2022) 108063.
 [4] E. Zio, Prognostics and health management (phm): Where are we and where do we (need to) go
     in theory and practice, Reliability Engineering & System Safety 218 (2022) 108119.
 [5] Y. Wang, J. Tian, Z. Sun, L. Wang, R. Xu, M. Li, Z. Chen, A comprehensive review of battery
     modeling and state estimation approaches for advanced battery management systems, Renewable
     and Sustainable Energy Reviews 131 (2020) 110015.
 [6] G. L. Plett, Extended kalman filtering for battery management systems of lipb-based hev battery
     packs: Part 3. state and parameter estimation, Journal of Power sources 134 (2004) 277–292.
 [7] J. Li, C. Lyu, L. Wang, L. Zhang, C. Li, Remaining capacity estimation of li-ion batteries based on
     temperature sample entropy and particle filter, Journal of Power Sources 268 (2014) 895–903.
 [8] L. Liao, F. Köttig, Review of hybrid prognostics approaches for remaining useful life prediction of
     engineered systems, and an application to battery life prediction, IEEE Transactions on Reliability
     63 (2014) 191–207.
 [9] Z. Liu, G. Sun, S. Bu, J. Han, X. Tang, M. Pecht, Particle learning framework for estimating
     the remaining useful life of lithium-ion batteries, IEEE Transactions on Instrumentation and
     Measurement 66 (2016) 280–293.
[10] A. Nuhic, T. Terzimehic, T. Soczka-Guth, M. Buchholz, K. Dietmayer, Health diagnosis and
     remaining useful life prognostics of lithium-ion batteries using data-driven methods, Journal of
     power sources 239 (2013) 680–688.
[11] D. Liu, J. Zhou, H. Liao, Y. Peng, X. Peng, A health indicator extraction and optimization framework
     for lithium-ion battery degradation modeling and prognostics, IEEE Transactions on Systems,
     Man, and Cybernetics: Systems 45 (2015) 915–928.
[12] Y. Zhou, M. Huang, Lithium-ion batteries remaining useful life prediction based on a mixture of
     empirical mode decomposition and arima model, Microelectronics Reliability 65 (2016) 265–273.
[13] L. Medsker, L. C. Jain, Recurrent neural networks: design and applications, CRC press, 1999.
[14] L. R. Medsker, L. Jain, et al., Recurrent neural networks, Design and Applications 5 (2001) 2.
[15] Y. Yu, X. Si, C. Hu, J. Zhang, A review of recurrent neural networks: Lstm cells and network
     architectures, Neural computation 31 (2019) 1235–1270.
[16] A. Sherstinsky, Fundamentals of recurrent neural network (rnn) and long short-term memory
     (lstm) network, Physica D: Nonlinear Phenomena 404 (2020) 132306.
[17] S. Hochreiter, J. Schmidhuber, Long short-term memory, Neural computation 9 (1997) 1735–1780.
[18] P. Malhotra, L. Vig, G. Shroff, P. Agarwal, et al., Long short term memory networks for anomaly
     detection in time series., in: Esann, volume 2015, 2015, p. 89.
[19] G. Van Houdt, C. Mosquera, G. Nápoles, A review on the long short-term memory model, Artificial
     Intelligence Review 53 (2020) 5929–5955.
[20] S. Ansari, A. Ayob, M. S. Hossain Lipu, A. Hussain, M. H. M. Saad, Data-driven remaining useful
     life prediction for lithium-ion batteries using multi-charging profile framework: A recurrent neural
     network approach, Sustainability 13 (2021) 13333.
[21] Y. Choi, S. Ryu, K. Park, H. Kim, Machine learning-based lithium-ion battery capacity estimation
     exploiting multi-channel charging profiles, Ieee Access 7 (2019) 75143–75152.
[22] K. Park, Y. Choi, W. J. Choi, H.-Y. Ryu, H. Kim, Lstm-based battery remaining useful life prediction
     with multi-channel charging profiles, Ieee Access 8 (2020) 20786–20798.
[23] E. Purificato, F. Lorenzo, F. Fallucchi, E. W. D. Luca, The Use of Responsible Artificial Intelligence
     Techniques in the Context of Loan Approval Processes, International Journal of Human-Computer
     Interaction (2023) 1543–1562. URL: https://doi.org/10.1080/10447318.2022.2081284. doi:10.1080/
     10447318.2022.2081284 .
[24] E. Purificato, L. Boratto, E. W. De Luca, Do Graph Neural Networks Build Fair User Models?
     Assessing Disparate Impact and Mistreatment in Behavioural User Profiling, in: Proceedings
     of the 31st ACM International Conference on Information & Knowledge Management, CIKM
     ’22, Association for Computing Machinery, New York, NY, USA, 2022, pp. 4399–4403. URL: https:
     //doi.org/10.1145/3511808.3557584. doi:10.1145/3511808.3557584 .
[25] E. Purificato, E. W. De Luca, What Are We Missing in Algorithmic Fairness? Discussing Open
     Challenges for Fairness Analysis in User Profiling with Graph Neural Networks, in: L. Boratto,
     S. Faralli, M. Marras, G. Stilo (Eds.), Advances in Bias and Fairness in Information Retrieval,
     Communications in Computer and Information Science, Springer Nature Switzerland, Cham, 2023,
     pp. 169–175. doi:10.1007/978- 3- 031- 37249- 0_14 .
[26] E. Purificato, L. Boratto, E. W. De Luca, User Modeling and User Profiling: A Comprehensive
     Survey, 2024. URL: http://arxiv.org/abs/2402.09660. doi:10.48550/arXiv.2402.09660 .
[27] E. Purificato, L. Boratto, E. W. De Luca, Toward a Responsible Fairness Analysis: From Binary
     to Multiclass and Multigroup Assessment in Graph Neural Network-Based User Modeling Tasks,
     Minds and Machines 34 (2024) 33. URL: https://doi.org/10.1007/s11023-024-09685-x. doi:10.1007/
     s11023- 024- 09685- x .
[28] E. Purificato, L. Boratto, E. W. De Luca, Recent advances in fairness analysis of user profiling
     approaches in e-commerce with graph neural networks, in: Proceedings of the Discussion Papers
     - 22nd International Conference of the Italian Association for Artificial Intelligence (AIxIA 2023
     DP), CEUR, 2023, pp. 47–56. URL: https://ceur-ws.org/Vol-3537/paper6.pdf.
[29] M. Abdelrazek, E. Purificato, L. Boratto, E. W. De Luca, FairUP: A Framework for Fairness
     Analysis of Graph Neural Network-Based User Profiling Models, in: Proceedings of the 46th
     International ACM SIGIR Conference on Research and Development in Information Retrieval,
     SIGIR ’23, Association for Computing Machinery, New York, NY, USA, 2023, pp. 3165–3169. URL:
     https://dl.acm.org/doi/10.1145/3539618.3591814. doi:10.1145/3539618.3591814 .
[30] S. M. Lundberg, S.-I. Lee, A unified approach to interpreting model predictions, Advances in
     neural information processing systems 30 (2017).
[31] L. S. Shapley, et al., A value for n-person games (1953).
[32] K. Simonyan, A. Vedaldi, A. Zisserman, Deep inside convolutional networks: Visualising image
     classification models and saliency maps, arXiv preprint arXiv:1312.6034 (2013).
[33] S. Ansari, A. Ayob, M. S. Hossain Lipu, A. Hussain, M. H. M. Saad, Multi-channel profile based
     artificial neural network approach for remaining useful life prediction of electric vehicle lithium-ion
     batteries, Energies 14 (2021) 7521.
[34] T. Biagetti, E. Sciubba, Automatic diagnostics and prognostics of energy conversion processes via
     knowledge-based systems, Energy 29 (2004) 2553–2572.
[35] J. Wu, C. Zhang, Z. Chen, An online method for lithium-ion battery remaining useful life estimation
     using importance sampling and neural networks, Applied energy 173 (2016) 134–140.
[36] Y. Zhang, R. Xiong, H. He, M. G. Pecht, Long short-term memory recurrent neural network
     for remaining useful life prediction of lithium-ion batteries, IEEE Transactions on Vehicular
     Technology 67 (2018) 5695–5705.
[37] X. Li, L. Zhang, Z. Wang, P. Dong, Remaining useful life prediction for lithium-ion batteries based
     on a hybrid model combining the long short-term memory and elman neural networks, Journal of
     Energy Storage 21 (2019) 510–518.
[38] M. T. Ribeiro, S. Singh, C. Guestrin, ” why should i trust you?” explaining the predictions of any
     classifier, in: Proceedings of the 22nd ACM SIGKDD international conference on knowledge
     discovery and data mining, 2016, pp. 1135–1144.
[39] U. Schlegel, H. Arnout, M. El-Assady, D. Oelke, D. A. Keim, Towards a rigorous evaluation of
     xai methods on time series, in: 2019 IEEE/CVF International Conference on Computer Vision
     Workshop (ICCVW), IEEE, 2019, pp. 4197–4201.
[40] F. Yates, Systematic sampling, Philosophical Transactions of the Royal Society of London. Series
     A, Mathematical and Physical Sciences 241 (1948) 345–377.
[41] S. A. Mostafa, I. A. Ahmad, Recent developments in systematic sampling: A review, Journal of
     Statistical Theory and Practice 12 (2018) 290–310.