You are on page 1of 11

Applied Energy 350 (2023) 121761

Contents lists available at ScienceDirect

Applied Energy
journal homepage: www.elsevier.com/locate/apenergy

Long-range battery state-of-health and end-of-life prediction with neural


networks and feature engineering
Simona Pepe a, Francesco Ciucci a, b, *
a
Department of Mechanical and Aerospace Engineering, The Hong Kong University of Science and Technology, Hong Kong, SAR, China
b
Chair of Electrode Design for Electrochemical Energy Systems, University of Bayreuth, 95448 Bayreuth, Germany

H I G H L I G H T S G R A P H I C A L A B S T R A C T

• New feature and loss engineering ap­


proaches are combined to improve long-
term battery life prediction.
• Charge-discharge voltage profiles are
used and feature analysis is performed
to identify the most correlated features
to aging.
• Average percentage errors for SOH and
EOL predictions up to 5.49% and
− 1.27% are obtained, respectively, by
the new methods.

A R T I C L E I N F O A B S T R A C T

Keywords: Determining the state of health (SOH) and end of life (EOL) represents a critical challenge in battery manage­
Lithium-ion batteries ment. This study introduces an innovative neural network-based methodology that forecasts both the SOH and
Automated feature extraction EOL, utilizing features engineered from charge-discharge voltage profiles. Specifically, long-short-term memory
Deep learning
(LSTM) and gated-recurrent unit (GRU) neural networks are trained against fast-charging datasets with novel loss
State of health
function that emphasizes SOH regression while penalizing its decay. The devised models yield low average errors
End of life
in SOH and EOL predictions (5.49% and − 1.27%, respectively, for LSTM), over extended horizons encompassing
80% of the forecast battery lifespan. From a combined evaluation using Pearson's correlation and saliency
analysis, it is found that voltages most strongly associated with aging occur after the initial constant current rate
step. In short, this study offers a new perspective on the precise prediction of SOH and EOL by integrating feature
engineering with neural networks.

1. Introduction vehicle (EV) sales [1], underscores the crucial role Li-ion batteries (LIBs)
can play due to their superior performance and longevity. In parallel
The rising need for fast-charging batteries, underpinned by stringent with this growth, the EV market demands batteries featuring swift
carbon emissions regulations and an unprecedented increase in electric recharge capabilities and high energy densities [2]. However, LIBs may

* Corresponding author at: Bavarian Center for Battery Technology, University of Bayreuth, Bayreuth, Germany.
E-mail address: francesco.ciucci@uni-bayreuth.de (F. Ciucci).

https://doi.org/10.1016/j.apenergy.2023.121761
Received 21 June 2023; Received in revised form 31 July 2023; Accepted 10 August 2023
Available online 22 August 2023
0306-2619/© 2023 Elsevier Ltd. All rights reserved.
S. Pepe and F. Ciucci Applied Energy 350 (2023) 121761

Fig. 1. (a) Representation of raw data from two batteries with diverse charge policy input to the feature extraction too with inset of charge-discharge voltage data at
various cycles for one of the batteries. (b) Examples of steps designed for automatic voltage feature extraction, splitting points, and sampled voltage points are shown
for the 3.6C (80%)-3.6C charge policy case. (c) Example of time-voltage curve, splitting points, and sampled voltage points for the 5.4C (60%)-3C charge policy case.

face rapid performance degradation, especially under quick charge/ indicator of battery state of health (SOH). Despite the inherent com­
discharge conditions that accelerate battery aging. Thus, the develop­ plexities, accurately predicting the evolution of the SOH carries signif­
ment of prediction models to monitor battery lifespan and remaining icant value. It not only facilitates a better understanding of the battery's
useful life (RUL) has emerged as a significant research topic. future state but also enables the formulation of more efficient charging
Battery degradation prediction is a complex task due to the protocols. This study aims to demonstrate how accurate predictions of
numerous factors contributing to performance decay. However, deter­ EOL and SOH can be achieved by leveraging charge and discharge
mining the source of degradation from onboard diagnostic measure­ voltage curves, neural networks, and feature engineering for batteries
ments like voltage and current poses a challenge. Various models can be tested with the Severson dataset. Conventionally, the internal changes of
employed to forecast battery decay based on equivalent circuits, phys­ a battery have been gauged solely by its discharge voltage profile [9,18].
ical equations solutions, or data science complemented by machine Although some researchers have started exploring features derived from
learning (ML) [3–7]. Despite their computational efficiency, equivalent charge voltage profiles [15,19], the complete voltage curve is infre­
circuit-based models suffer from limited generalizability. Conversely, quently leveraged [20,21]. This study introduces a new set of auto­
physics-based models demand a thorough understanding of battery matically extracted features from charge-discharge voltage profiles. This
characteristics and require the development of specific simulation approach eliminates the necessity for preliminary de-noising and pre-
packages with underpinning assumptions that may not adequately processing, a prerequisite for other techniques, such as differential
model a sufficiently wide range of cycling conditions [8]. To address voltage analysis [22,23]. Furthermore, we incorporate data interpola­
these shortcomings, data-driven approaches have been introduced [4] tion to enable input of data of variable durations and support input
because they do not require system-specific software development, and compression. The latter is particularly advantageous when computa­
their accuracy improves with larger datasets [9,10]. tional resources for predictions are scarce. Expanding on our previous
Recent studies have utilized ML techniques to forecast battery end- work [24], we employ Long-Short-Term Memory (LSTM) and Gated
of-life (EOL) [11]. Such forecast is particularly challenging under fast Recurrent Units (GRU) neural networks to predict SOH and EOL. A novel
charging data. State-of the-art fast charging data was first developed by training loss function is developed to optimize these models, improving
Severson et al. [12], who examined a wide variety of fast-charging performance by enabling corrections on forecasted SOH. Post-training
cycling conditions, leading to a substantial range in battery lifetimes evaluation of our model on unseen test batteries showed enhanced
and degradation trajectories. Further, the feature extraction process prediction performance relative to previous research. The average errors
poses an additional challenge due to the large volume of experimental for EOL were as low as − 1.27% when 80% of the cycle life was forecast.
data, the unique conditions that each battery experiences, and the Subsequent feature subsampling analysis identified the most influential
degradation that occurs over its life cycle. Prior works have employed features, revealing that both charge and discharge regions of voltage
various techniques, including dilated convolutional neural networks profiles serve as valuable predictors of battery aging. This work presents
(CNNs) [13] and 2D-3D-CNNs, to predict EOL with remarkable precision new advanced strategies to improve battery SOH and EOL predictions by
[14,15]. However, recently published research using the database of leveraging features from charge-discharge voltage profiles and an
Severson et al. [16,17] primarily focuses on EOL forecasting and does innovative training loss function. However, despite these advances,
not predict the entire capacity degradation curve, which is a crucial some limitations exist. For instance, our feature extraction algorithm

2
S. Pepe and F. Ciucci Applied Energy 350 (2023) 121761

may not be suitable for all applications, and the validity of our predic­ two minima, respectively. Following this, the algorithm identifies the
tion methods is contingent on the constancy of the charge/discharge sampled points, which are shown in blue in Fig. 1(b) and (c), for each
policy throughout the battery's lifespan. These aspects present compel­ pair of splitting points by evenly distributing the voltages between two
ling opportunities for future research. successive split points. In particular, 23 voltages are allocated to seg­
ments preceding the initial maximum and succeeding the final
2. Dataset maximum, as shown in steps 1 and 4 in Fig. 1(b). In comparison, 9
voltages are found for steps 2 and 3, as per Fig. 1(b). When the time-
This study uses battery experiments taken from Severson et al. [12] voltage curves include two or more minima, these 9 points are
involving 124 graphite/LFP cells tested under 74 different fast charging searched among the multiple segments, as shown in Fig. 1(c). It is worth
conditions. The charging process consisted of a first step at a constant C- reiterating that all feature extraction steps are executed automatically,
rate (C1 ), which was carried out until the state of charge (SOC) reached allowing for the identification of evenly spaced voltage points amidst
SOC1 . A second step at a constant C-rate (C2 ) was conducted until SOC non-monotonic curves that vary over time and across different battery
= 80%, where C1 and C2 ranged from 3.6C to 8C. Finally, all batteries cycles. For instance, the algorithm is specifically engineered to disregard
were subjected to a constant charge-constant voltage (CC-CV) step at 1C any false minima or maxima due to experimental errors or deteriorating
until the SOC reached 100%. Subsequently, they were discharged at 4C. curves and any anomalies in the sampled data. This can be accomplished
Among the batteries in this dataset, 85 and 24 were randomly selected by ensuring that every low point is succeeded by a high point, or that the
for the training and testing sets, respectively. The remaining 12 batteries initial points of the voltage curves align with the onset of the charging
were used for model validation and hyperparameter optimization. process. Doing so guarantees consistent feature collection at the same
Anomalies in the sampled voltage curves were identified in 3 batteries, cycling stage throughout the battery's lifespan. The Python script uti­
which were subsequently excluded from the analysis. lized for feature extraction is available on GitHub [25]. Further algo­
rithm details can be found in Section S1 of the Supplementary
3. Feature engineering Information (SI).

This section describes how the neural network input vectors 3.1.1. Data pre-processing
extracted from the raw data (capacity at discharge, charge-discharge Prior to inputting this data into the neural networks, outliers for each
voltage curves, and charging policy), are developed. The aim is to feature across cycle numbers were eliminated using a Hampel filter [26]
show how large raw charge/discharge curves are mapped into smaller with a 10-point window. Outliers can originate from discrepancies
and equally sized vectors while preserving critical information. This during data collection or feature sampling. If not addressed, these out­
procedure simplifies the training process by reducing computational liers can distort the data representation, adversely affecting the accuracy
demands and ensures consistency in input data. We also explore the and reliability of machine learning models. After the first pre-processing
potential of further down-sampling as a tool to minimize data volume. step, the input tensor is M × K × F dimensional, where M is the total
number of batteries, K denotes the maximum number of cycles observed
in the dataset1 and F is the number of features. Following this, min-max
3.1. Automatic feature extraction
normalization was used to ensure all feature values fall between 0 and 1.
The value used for normalization were specific to each battery except for
The feature vector yk at the kth cycle is 68-dimensional and defined as
the first feature (the cycle number). The first feature was normalized
yk = (k SOHk t⊤ C1 C2 SOC1 )

(1) against the maximum cycle number from the entire dataset because this
k
normalization prevents the cycle number k from being a fraction of the
where the second entry is the kth cycle state of health, SOHk , defined as total number of cycles for each battery. Should this be the case, it would
the ratio of the capacities at the kth (Qk ) and the initial k = 0 (Q0 ) trivialize EOL regression.
discharge cycles, namely,
3.2. Methods
Qk
SOHk = (2)
Q0
3.2.1. Neural network architectures
The third entry tk , i.e., the 63-dimensional vector of characteristic Due to their simplicity and ability to effectively regress and retrieve
times obtained from charge-discharge voltage profiles, is further SOH curves [24], we used LSTM [27] and GRU models to predict EOL
described below. The last components of (1) are the three quantities and SOH [28]. LSTM and GRU are two important architectures in the
describing the charging protocol: (C1 , C2 , SOC1 ) as introduced in Section Recurrent Neural Network (RNN) family. RNNs work by preserving the
2. A representation of the raw data for two different batteries in the output of a layer and feeding it back into the input for new output
dataset, from which the features are extracted is provided in Fig. 1(a). prediction. However, this can lead to the vanishing gradient problem,
In this section, we outline the process of down-sampling the voltage- where information about distant time steps is lost over time [29]. To
versus-time curves (>30,000 points) to a vector tk . It is important to note address this problem, Hochreiter and Schmidhuber [27] developed the
that time-voltage curves fluctuate during cycling and among batteries LSTM model. LSTMs have a more complex architecture than standard
(Fig. 1(a)). Notably, due to fast charging, voltage variations are more RNNs, with a cell state, denoted as Ck , in addition to the hidden state
pronounced relative to lower charge-discharge rates; this difference is (hk ). This cell state can be thought of as a conveyor belt that allows
even more evident when C1 differs significantly from C2 . These aspects information to be passed over subsequent time steps; doing so preserves
contribute to the complexity of condensing charge and discharge data relevant data only, thus capturing long-range dependencies more
into the fixed-size vector tk . To capture sharp changes more effectively, accurately. LSTMs control the cell state through gates, which act as se­
we employ discrete times versus voltages as input features rather than lective data filters. There are four types of gates in an LSTM: the forget
voltages versus times. This choice is underpinned by the smaller deriv­ gate (fk ), input gate (ik ), output gate (ok ), and cell state gate (ck ). The
ative of the former at constant current, as apparent from Fig. 1(b). hidden state (hk+1 ) in an LSTM is updated at each time step k based on
The preliminary step of the feature extraction process involves the current data (yk ) the previous time step's hidden state (hk ) and the
identifying monotonic segments in the voltage-versus-time plots. This is
achieved automatically by detecting maxima and minima, which act as
splitting points in characteristic voltage-time profiles. Fig. 1(b) and (c) 1
The corresponding feature for batteries with cycle lives shorter than K were
depict the identified split points in orange, which correspond to one and padded to zero.

3
S. Pepe and F. Ciucci Applied Energy 350 (2023) 121761

Fig. 2. Schematic representation of the LSTM and GRU neural networks.

four gates. The input vectors at each time step are M × F matrices (see learning of the long-term dependencies underpinning capacity
paragraph 3.1.1). A single LSTM unit at time stamp k is shown in Fig. 2. degradation.
The LSTM units are stacked into multiple layers followed by a linear
layer to produce the output at the next time step k + 1 [30]. In 2014, 3.2.2. Training loss and training data
Chung et al. [28] presented the Gated Recurrent Units (GRU) as a variant Preliminary results were first derived from a training loss defined as
of the LSTM with a comparable architecture. The main differences be­ follows:
tween GRU and LSTM are that GRUs have two gates (instead of four) and [ ]
merge the cell and hidden state. A single GRU cell at time step k in the 1 ∑NTP ∑ NF
( i )2
LF= y k − yik
̂ (3)
first layer of a network is shown at the bottom right of Fig. 2, where the NTP k=1 i=1
reset gate and the update gates are indicated as rk and zk , respectively.
Here, NF is the size of the feature size and NTP is the number of
This study used both LSTM and GRU due to their capability to provide
training points. When the loss (3) was used, we observed that the model
context preceding the present time step. In turn, this facilitates the
occasionally struggled to accurately replicate capacity decay, consistent

Fig. 3. (a) Illustration of the training phase for the 30%–50% scenario, where the ratio of training data points to EOL varies between 30% and 50% for the batteries in
the training dataset. (b) Presentation of the validation process within the same scenario, where the model's hyperparameters are tuned through predictions. (c)
Depiction of the testing phase, where knowledge about 40% of a battery's cycle life is employed, and the autoregressive forecasts are evaluated using the remaining
60% of the cycle life.

4
S. Pepe and F. Ciucci Applied Energy 350 (2023) 121761

with the literature [24,31,32]. To mitigate this issue, we introduced a can be found in Table S1 in the SI. Finally, the number of iterations was
novel training loss, defined as treated as a network hyperparameter and fine-tuned for each experi­
[ ] ment. In these cases, the models with the best validation errors were
1 ∑ NTP
( )2 ∑NF
( i )2 preserved and evaluated on the test dataset.
LF= α ̂y 2k − y2k + y k − yik
̂
NTP k=1 i=1,i∕
=2
EOL [
∑ ( 2 )2 ( ( ( 2 ))] 3.2.4. Error metrics
1 2)
+
EOL − NTP k=NTP+1
y k − y2k + γ max sign ̂
β ̂ yk , 0
y k+1 − ̂ For the SOH, model performance was evaluated using the root mean
squared error:
(4) √̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
√ EOL
√ ∑ ( SOH ̂ k − SOHk )2
y 2k and y2k are the model and experimental SOHk (see Eq. (1)) and
where ̂ RMSESOH = √ (5)
Ntest
y ik indicates the kth feature in the model. To specifically handle the SOH,
k=NKP +1
̂
the hyperparameters α, β and γ are introduced. These assign different the mean absolute percentage error:
weights to data portions during online predictions, starting from known
points (up to NTP ), then to sections where data are unseen by models and ∑
EOL ̂ k − SOHk |
| SOH
MAESOH = (6)
future states are auto-regressed (from NTP + 1 to EOL). Conversely, all Ntest
k=NKP +1
other features are trained only up to NTP , improving the forecast of SOH.
Specifically, α fine tunes the SOHk portion of the loss up to training while and the mean absolute error:
β handles the post-training portion of the loss. In addition, γ adds a
penalty for non-decaying SOH. It should be noted that the hyper­ ∑ ̂ k − SOHk
EOL
SOH
MESOH = (7)
parameters α, β, and γ are optimized alongside the architecture hyper­ k=NKP +1
Ntest
parameters. Additional details on hyperparameter optimization can be
found in Section S2 of the SI. In this study, NTP was chosen according to where NKP is the number of known points described in paragraph 3.2.2,
two scenarios: one where the ratios NTP /EOL were fixed among the ̂ k and SOHk are the predicted and true values of SOH, respec­
and SOH
batteries in the training set (NTP /EOL = 20%, 40%, 60%, and 80%), and tively. Results from the test set were evaluated at 4 different thresholds
a second case, where we randomly varied the NTP /EOL portions, to corresponding to: NKP /EOL = 20%, 40%, 60% and 80% (see paragraph
account for prediction window randomness. Specifically, we examined 4 3.2.2). The error in the forecast end of life (DEOL) is given by
cases in which the NTP /EOL varied among the batteries in the training [14,24,31]:
dataset, ranging from 10%–30%, 30%–50%, 50%–70%, and 70%–90%.
An example of training in the 30%–50% case can be seen in Fig. 3(a), ̂ − EOL
EOL
DEOL = (8)
where the experimental SOH (green) is regressed (solid and dashed red EOL
lines). The vertical line represents the portion of training points over
total cycle life, varying between 30% and 50%. We performed validation 3.2.5. Feature subsampling
similarly to training, as demonstrated in Fig. 3(b), with experimental Feature subsampling allows reducing the variables used for model
points depicted in purple. Unlike testing, model performances were training and prediction. Different features may interact with the output
evaluated for NKP /EOL = 20%, 40%, 60%, 80%, with NKP indicating the to varying degrees; in addition, some features may be highly correlated
known points, up until which we regress curves from trained models, with each other, providing redundant information when included as
and after which curves are auto-regressed. For illustration purposes, inputs. Including all of these highly correlated inputs can compromise
Fig. 3(c) presents a battery for which 40% of the cycle life is known; in estimation accuracy and potentially lead to model overfitting [34]. In
that figure, black dots are the known data, blue points are the unknown other words, judiciously selecting features can reduce data dimension­
portions, and the orange line is the model prediction. To input vectors of ality, thereby improving the efficiency and reliability of SOH estimation
the same length into machine learning models, the NTP points from [20,21]. For this task, herein, we employ two methods separately,
training and validation batteries and NKP points from testing batteries Pearson correlation (PC) [20,21] and saliency (Sal) [35] analysis, to
were interpolated linearly to vectors of identical lengths of 100 points. eliminate redundant features and select those that have a greater impact
on prediction, respectively. Despite their different natures, these two
3.2.3. Implementation methods provide complementary insights into the data. PC analysis
The architecture of the network was optimized through a manual measures the linear correlation between two variables, which can be
search of hidden layers, number of neurons, and learning rates. The best used to reduce similarity and redundancy. In contrast, Sal captures non-
validation errors from preliminary experiments were used to guide the linear relationships between features, which PC analysis cannot do. To
selection of the final architectures, which consisted of two layers of do this, we calculated the Pearson correlation (PC) coefficient between
either LSTM or GRU units. A linear layer was also included after the each pair of features. We only kept one feature out of a pair with an
LSTM or GRU cells to form the output vector. This layer resizes the absolute correlation coefficient value higher than 0.8. This reduced the
feature dimension from the hidden dimension to match the input feature dimensionality of the input vector from an initial 68 to 25. The second
size. A dropout rate of 0.2 was used to help prevent overfitting. [33]. A approach for feature selection was based on evaluating the saliency
schematic of the architecture is provided in Fig. 2. The optimal neuron (Sal), which involved computing the partial derivatives of the outputs
count was found to be 100, and the optimal learning rate was 2 • e− 4 . (capacity and EOL) with respect to the inputs. Features contributing to
The LSTM and GRU cell units, along with the linear layers, were larger partial derivatives are the most important for predicting the ca­
implemented using the PyTorch library (version 1.10.1). A fixed seed for pacity at EOL. This approach is computationally more expensive, as it
the random number generator was used to ensure reproducibility. Four requires training the model multiple times. From the Sal analysis, 25
different architectures were initialized for each LSTM or GRU model to features (the same number obtained from PC) with the highest saliency
account for input tensors that corresponded to different prediction scores were selected for comparison with the PC analysis.
windows. This initialization process was repeated for both fixed window
and variable window experiments (see paragraph 3.2.2). The hyper­ 3.2.5.1. Pearson correlation analysis. The Pearson correlation coeffi­
parameters in the loss term (α, β and γ) were optimized for the four cient [20,21] for each pair of input features (yi and yj ) was computed
variable window cases and the full set of features. For simplicity, they using the following formula:
were kept constant in other scenarios. The optimized values of α, β, and γ

5
S. Pepe and F. Ciucci Applied Energy 350 (2023) 121761

Table 1 3.2.5.2. Saliency analysis. Saliency analysis [35], is often used in tasks
Average and standard deviation of RMSESOH and DEOL calculated from Eqs. (5, such as image recognition and classification, image compression, etc. In
8) on 24 tested cells, with fixed training windows. image classification, saliency analysis identifies the most critical pixels
RMSESOH LSTM GRU DEOL [%] LSTM GRU determining the class associated with that image. This is achieved by
[%] first calculating the gradient of the output with respect to the input
NKP /EOL = 5.49 ± 6.60 ± NKP /EOL= − 1.27 ± − 1.92 ± images and then evaluating which regions of the image contribute more
20% 4.51 5.64 20% 1.28 4.34 significantly to the classification task based on the corresponding partial
NKP /EOL = 4.84 ± 8.85 ± NKP /EOL = − 0.31 ± − 1.61 ± derivative. Here we calculate the gradient of the output capacity at EOL
40% 2.76 8.15 40% 1.74 4.96
with respect to the input vector at every time step and for each battery.
NKP /EOL = 6.97 ± 6.69 ± NKP /EOL= − 1.57 ± − 1.10 ±
60% 7.60 9.92 60% 3.80 6.62 The obtained values are then averaged among time steps and batteries to
NKP /EOL = 5.01 ± 7.11 ± NKP /EOL= − 1.04 ± − 0.28 ± determine the overall saliency scores. The magnitude of the saliency
80% 3.42 6.29 80% 4.77 4.03 score serves as a guide to highlight the features that impact EOL pre­
dictions the most. By linking these features to their corresponding points
on the charge/discharge voltage curves, we can identify the specific
∑(
EOL )( )
yik − yi yjk − yj regions on the voltage curves that are more informative to aging. For
k=1
ri,j = √̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ (9) instance, suppose three features A, B, and C have saliency scores of 0.8,
∑ i
EOL
2 ∑ ( j
EOL )2 0.3, and 0.2, respectively. In this case, feature A, due to its highest sa­
(yk − yi ) yk − yj
k=1 k=1 liency score, would be deemed to be the most influential, and retained.
In contrast, the other two would be discarded.
where k indicates the cycle number, yj indicates mean value of feature j
over cycle numbers, and the summation is used to take the average 4. Results
coefficient over cycles. Finally, the Pearson coefficients were averaged
using all the batteries in the training dataset. Large Pearson coefficients 4.1. SOH and DEOL forecasts with fixed training windows
indicate a significant similarity between two features and, therefore,
high redundancy. Based on this, during the feature selection process, if We first studied the case where all 68 input features were used and
two features were pairwise correlated with ri,j >0.8, one of them was forecasting windows were fixed during training. The hyperparameters of
excluded. For instance, consider two features, if Pearson correlation both models were derived preliminarily through manual search and kept
coefficient is >0.8, then there is strong similarity between them [21] constant among all cases. The outcomes of the SOH predictions using all
and one of these features could be excluded without causing a significant features are displayed in the first and second columns of Table 1. We can
information deficit. observe from the results that errors on forecast SOH are slightly lower
for LSTM than GRU for all cases except at NKP /EOL= 60%. The use of

Fig. 4. (a) Representation of experimental


SOH and modeled test data of three batteries
using LSTM (a) and GRU (c) models to predict
EOL with a fixed NKP /EOL ratio of 20% and
fixed training windows. The black and blue
dots represent the experimental SOH, while
the orange lines represent the modeled test
data. Experimental versus forecast EOL are
shown for LSTM (b) and GRU (d). (For inter­
pretation of the references to colour in this
figure legend, the reader is referred to the web
version of this article.)

6
S. Pepe and F. Ciucci Applied Energy 350 (2023) 121761

Table 2 in Fig. 4, panels (c) and (d). We can observe from the results, that both
Average and standard deviation of RMSESOH and DEOL calculated from Eqs. (5, LSTM and GRU predict the EOL accurately in this specific scenario, with
8) on 24 tested cells, with variable training windows. average DEOL values between − 1.92% and − 0.28%.
RMSESOH LSTM GRU DEOL [%] LSTM GRU
[%]

NKP /EOL = 19.52 ± 14.45 ± NKP /EOL= − 6.50 ± − 5.35 ± 4.2. SOH and DEOL forecasts with variable training windows
20% 10.56 7.56 20% 13.50 10.41
NKP /EOL = 16.92 ± 13.17 ± NKP /EOL= − 2.35 ± − 1.80 ± The results of the SOH prediction using 68 input features and with
40% 9.45 7.53 40% 10.04 8.36
training on random portions of available data (described in paragraph
NKP /EOL = 15.79 ± 12.54 ± NKP /EOL= 1.1 ± 0.02 ±
60% 8.26 9.02 60% 9.33 7.80 3.2.2) are presented in Table 2. Fig. 5(a) shows the results from the NKP /
NKP /EOL = 10.16 ± 7.72 ± 0.66 ± − 0.68 ± EOL = 20% case obtained using LSTM (Fig. 5(a)) and GRU (Fig. 5(c))
NKP /EOL=80%
80% 6.74 5.74 4.41 3.83 models. Fig. 5, panels (a) and (c), shows the experimental and modeled
SOH for 3 test-set batteries featuring various lifetimes. Here, black and
blue dots are experimental data, and orange lines are the modeled
curves. The vertical lines indicate the portion of available data, after
GRU for SOH prediction was confirmed to be more accurate than LSTM,
which the SOH values are predicted auto-regressively. Fig. 5(b) and (d)
as evidenced by the lower MAE errors (see Table S3 in the SI). The lowest
show the distribution of forecast and experimental EOLs for the case
average MAE was 3.79%, which was achieved at NKP /EOL= 20%. Fig. 4
with NKP /EOL = 20% for LSTM and GRU, respectively. As expected, the
(a) compares experimental (black and blue dots) and modeled SOH
models' predictions improved if more data was used. The average errors
curves (orange lines) for three batteries in the test set with different
for SOH ranged from 19.52% to 10.16% with 20% to 80% of data input
lifetimes obtained using LSTM for NKP /EOL= 20%. The vertical lines
to LSTM and between 14.45% and 7.72% to GRU. For completeness,
represent the known data portion after which states are predicted auto-
MAE and ME errors for SOH are presented in Table S4 in the SI. The
regressively. Fig. 4(b) shows the distribution of forecast and experi­
average DEOLs presented in Table 2 are between − 6.5% and 1.1%.
mental EOLs for the case using LSTM at NKP /EOL= 20%. Corresponding
Overall, we can observe that the GRU model performed better than the
average and standard deviations are shown in the last two columns in
LSTM model in forecasting SOH and DEOL. However, both models were
Table 1. Corresponding plots obtained using the GRU model are shown
able to achieve average DEOLs of 1.1% for NKP /EOL= 60% and

Fig. 5. (a) Representation of experimental SOH and modeled test data of three batteries using LSTM (a) and GRU (c) models to predict EOL with a fixed NKP /EOL
ratio of 20% and variable training windows. The black and blue dots represent the experimental SOH, while the orange lines represent the modeled test data.
Experimental versus forecast EOL are shown for LSTM (b) and GRU (d). (For interpretation of the references to colour in this figure legend, the reader is referred to
the web version of this article.)

7
S. Pepe and F. Ciucci Applied Energy 350 (2023) 121761

Fig. 6. (a) Features correlation map from Eq. (8). (b) Visualization of the features selected using PC. (c) Saliency scores based on saliency analysis using LSTM. (d)
Visualization of the features selected by saliency analysis using LSTM. Herein, variable training windows were considered.

Table 3
Average and standard deviation of RMSESOH calculated from Eq. (5) on 24 tested cells with different test portions of battery cycle life after PC (left-hand side) and
saliency (right-hand side) analysis. Here variable training windows were considered.
PC analysis Saliency analysis

RMSESOH [%] LSTM GRU LSTM GRU

NKP /EOL = 20% 18.02 ± 9.41 15.14 ± 7.85 17.57 ± 9.15 15.49 ± 11.59
NKP /EOL = 40% 15.19 ± 10.28 13.84 ± 10.67 17.88 ± 14.06 14.39 ± 9.76
NKP /EOL = 60% 17.73 ± 12.83 14.24 ± 9.13 14.85 ± 7.40 12.81 ± 10.40
NKP /EOL = 80% 9.90 ± 8.76 7.05 ± 4.93 9.59 ± 7.29 6.63 ± 3.92

NKP /EOL= 80%, and below or equal to 2.35% for NKP /EOL= 40%. We Fig. 6(d); results obtained using GRU are shown in Section S3 in the SI.
wish to highlight that negative DEOL indicates shorter modeled RUL
compared to real RUL. Negative values are preferred when preventive 4.3.1. Error on the EOL forecasts
measures to avoid battery failure are to be implemented. We examined the impact of input features on battery prognostics by
comparing three different feature sets: 68 features, 25 features down-
sampled using PC, and 25 features down-sampled using saliency. Here
4.3. Feature subsampling
variable training windows are considered. In addition to the RMSESOH
errors provided in Table 3 and the MAESOH and MESOH in Table S5 and
The PC analysis was first used to exclude voltage features based on
Table S6, we also included results for EOL forecasting (as defined in Eq.
large Pearson correlation coefficients (see paragraph 3.2.5.1). This
(8)). Fig. 7 shows boxplots of the distribution of DEOL at different NKP /
resulted in a reduction of the number of voltage features from 63 to 20.2
EOL values, with the circles representing individual batteries in the test
Fig. 6 represents the coefficients obtained on voltage features in the form
set. From these results, we found that the performance of LSTM and GRU
of a correlation map in panel (a) and highlights the voltage features
models was comparable. LSTM used 25 features derived from PC
selected using the PC method in orange in panel (b). Given that corre­
exhibiting superior performance, with an average DEOL error of
lation maps are based on a feature's numerical value, the PC method is
− 4.80% (as shown in Table S2 in the SI). Similar to the results observed
independent of the model (LSTM or GRU) used. Conversely, saliency
for RMSESOH , DEOL decreases progressively as more data are fed to the
scores obtained from saliency analysis using LSTM are shown in Fig. 6
models and toward shorter terms forecasts, e.g., from NKP /EOL= 20%
(c). Here, 25 features associated with the highest saliency scores were
toward NKP /EOL= 80%. We also observed that among the other three
selected to represent a new subset of features. An example of the position
cases (NKP /EOL= 40%, 60%, 80%) shown in Fig. 7, feature selection
of the voltage features selected with saliency analysis can be seen in
tended to produce slightly better estimations when using LSTM. For
GRU, the best average DEOLs were obtained among all cases where 68
2 features were used, as shown in Fig. 7 and Table 2.
Therefore, the model input feature reduces from 68 to 25.

8
S. Pepe and F. Ciucci Applied Energy 350 (2023) 121761

Fig. 7. Error on EOL (DEOL) for the test set batteries with comparisons among models and features, in (a) NKP /EOL = 20%, (b) NKP /EOL = 40%, (c) NKP /EOL =
60%, (d) NKP /EOL = 80%. Labels on the x-axis indicate the set of features used: 68F - the full features set, 25PC- features selected with Pearson correlation analysis,
and 25Sal - features selected with saliency analysis.

4.4. Discussion part, rather than the full extent, of these curves are available.

Our research presents methods that leverage features extracted from 5. Conclusions
complete charge-discharge voltage profiles for EOL and SOH prediction.
The results obtained in this study show competitive accuracy compared This article presents novel techniques for predicting the SOH and
to other advanced methods found in the literature. For example, Hong EOL of batteries. We offer not only accurate predictions of the EOL, but
et al. [14] fed observed terminal voltage, current, and temperature also uniquely enable the regression of full SOH curves, an approach that
values into a dilated convolutional neural network, learning cross- is not frequently seen in the existing literature. Namely, LSTM and GRU
correlations from raw data. This approach resulted in a 10.6% MAE models were used for predicting the capacity decay and failure of bat­
on the EOL. In another study by Zhang et al. [15], the average MAE of teries operated under fast-charge conditions. This resulted in an average
EOL early prediction was 5.16%. This was achieved by feeding partial error for EOL (DEOL) equal to − 1.27% for 80% of the battery lifespan
segments of current, voltage, and temperature charging profiles to a 2D prediction. In order to introduce randomness into the prediction win­
and 3D-CNN. In another work by Ma et al. [16], a 9.01% MAE of EOL dow, training windows were randomly altered. This resulted in an
prediction was obtained from the first 100 cycles. To reduce feature average DEOL of − 5.35% in scenarios predicting 80% of battery life,
dimensionality, we implemented two feature subsampling methods (i.e., with lower error rates for shorter predictions (e.g., 0.02% in instances
PC and saliency analysis), which can be used to quantify the impact of with a forecast of 40% of the cycle life). Similar results were observed
input features on the model outputs (capacity and EOL). The PC matrix following feature subsampling. Our findings show that PC or saliency
allowed us to identify redundant features based on their correlation. In analysis can effectively identify the most impactful features and reduce
contrast, saliency analysis distinguished significant features by the model size and training costs. Crucially, our feature extraction
computing the gradient of the output capacity at EOL in relation to the approach from charge-discharge voltage curves manages sharp voltage
input features of the trained model. Intriguingly, despite the selection of curve variations and extensive data variability/inhomogeneity, opening
distinct voltage features during subsampling with PC or saliency anal­ up possibilities for future research to explore SOH predictions under
ysis, both techniques suggested that the most valuable information for different protocols. Finally, we devised a new loss function, including a
predicting aging is incorporated within both charging and discharging penalty to SOH increase that led to improved SOH prediction. Further­
segments of the voltage profiles, as illustrated in Fig. 6(b) and (d). more, we used interpolation to handle data from batteries with variable
Moreover, feature subsampling suggested that the region where the cycle numbers and sampling rates and at the same time to enable input
current transitions from one constant current rate to another is associ­ compression. More than just demonstrating the effectiveness of these
ated with high saliency scores and low PC values across cycles and methods, our research paves the way for the future enhancement of
batteries, pinpointing an area rich in aging-related information. This key neural network predictions of battery EOL and SOH using feature en­
data would be overlooked if voltages were sampled at specific times, gineering and PC- and saliency-based down-sampling.
rather than collecting times at particular voltages. We would like to
emphasize that in many real-world applications, data availability can be List of acronyms and symbols
a significant limitation, with full charge/discharge curves being not al­
ways available [6]. While our feature sampling and data interpolation CC-CV Constant charge-constant voltage
methods offer some flexibility in handling missing data or outliers, there Ck Cell state at cycle number k
is significant room for improvement. In particular, further efforts can be ck Cell state gate at cycle number k
made to ensure that comparable accuracy is achieved even when only CNN Convolutional neural networks

9
S. Pepe and F. Ciucci Applied Energy 350 (2023) 121761

EVs Electric vehicles Conceptualization. Francesco Ciucci: Writing – review & editing,
EOL End of life Visualization, Methodology, Formal analysis, Conceptualization.
F Number of features
fk Forget gate at cycle number k Declaration of Competing Interest
GRU Gated recurrent unit
hk Hidden state at cycle number k The authors declare that they have no known competing financial
ik Input gate at cycle number k interests or personal relationships that could have appeared to influence
K Maximum number of cycles observed in the dataset the work reported in this paper.
LIBs Li-ion batteries
LSTM Long-short-term memory Data availability
M Total number of batteries
ML Machine learning No additional data was used. Part of the code developed for this work
ok Output gate at cycle number k is available at https://github.com/simonapepe/automatic-feat
PC Pearson Correlation ure-extraction-for-battery-SOH-and-EOL-prediction.git. Any additional
rk Reset gate at cycle number k information for this work is available from the lead contact upon
RNN Recurrent Neural Network request.
RUL Remaining useful life
Sal Saliency
Acknowledgments
SI Supplementary information
SOC State of charge
The authors gratefully acknowledge the Research Grant Council of
SOH State of health
Hong Kong (RGC Ref No. 16201820 and 16206019) and the Hong Kong
zk Update gate at cycle number k
Innovation and Technology Fund (grant number UIM/369) for financial
(̂ support. In addition, S. Pepe kindly acknowledges the support of the
DEOL EOL− EOL)
EOL (–)
α Penalty term applied to SOH in the training points (–) Hong Kong Ph.D. Fellowship Scheme.
β Penalty term applied to predicted SOH (–)
γ Penalty term applied to SOH at cycle k + 1 when greater than Appendix A. Supplementary data
SOH at cycle k (–)
C1 Value of the current rate in the first step of the charging Supplementary data to this article can be found online at https://doi.
profile normalized over the maximum current rate (8C) (–) org/10.1016/j.apenergy.2023.121761.
C2 Value of the current the rate in the second step of charging
profile normalized over the maximum current rate (8C) (–) References
LF Training loss (–)
L F− adapted Training loss with penalty terms (–) [1] BloombergNEF. EVO report 2021. 2021.
[2] Liu Y, Zhu Y, Cui Y. Challenges and opportunities towards fast-charging battery
M Number of equally-spaced points between two splitting points materials. Nat Energy 2019;4(7):540–50.
(–) [3] Berecibar M, et al. Critical review of state of health estimation methods of Li-ion
√̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ batteries for real applications. Renew Sustain Energy Rev 2016;56:572–87.
∑EOL SOH k − SOHk )2
(̂ [4] Hu X, et al. Battery lifetime prognostics. Joule 2020;4(2):310–46.
MAESOH Mean absolute error on SOH = k=NTP +1 (–)
Ntest [5] Ren H, et al. A comparative study of lumped equivalent circuit models of a lithium
MESOH Mean error on SOH (–) battery for state of charge prediction. Int J Energy Res 2019;43(13):7306–15.
[6] Wang Q-K, et al. State of charge-dependent polynomial equivalent circuit modeling
NF Number of total features (–)
for electrochemical impedance spectroscopy of lithium-ion batteries. IEEE Trans
NKP Number of known test points (–) Power Electron 2017;33(10):8449–60.
NV Number of time/voltage features (–) [7] Xiong R, Li L, Tian J. Towards a smarter battery management system: a critical
NTP Number of training points (–) review on battery state of health monitoring methods. J Power Sources 2018;405:
18–29.
Qk Capacity of a battery at cycle k (Ah) [8] Moura SJ, Krstic M, Chaturvedi NA. Adaptive PDE observer for battery SOC/SOH
Q0 Capacity of a fresh battery (Ah) estimation. In: ASME 2012 5th Annual Dynamic Systems and Control Conference
√̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ joint with the JSME 2012 11th Motion and Vibration Conference; 2012.
∑EOL SOH k − SOHk )2
(̂ [9] Banko M, Brill E. Scaling to very very large corpora for natural language
RMSESOH Root mean squared error on SOH = k=NTP +1 Ntest disambiguation. In: Proceedings of the 39th annual meeting of the Association for
(–) Computational Linguistics; 2001.
SOC1 SOC value after the first step at a constant current rate (–) [10] Halevy A, Norvig P, Pereira F. The unreasonable effectiveness of data. IEEE Intellig
Syst 2009;24(2):8–12.
SOHk State of health of a battery at cycle k (= Qk /Q0 ) (–) [11] Ahmed M, et al. The role of artificial intelligence in the mass adoption of electric
k Cycle number (–) vehicles. Joule 2021;5(9):2296–322.
vk Sampled voltage points [V] [12] Severson KA, et al. Data-driven prediction of battery cycle life before capacity
degradation. Nat Energy 2019;4(5):383–91.
tk Vector of characteristic times at specific voltage and cycle k [13] Borovykh A, Bohte S, Oosterlee CW. Dilated convolutional neural networks for
(–) time series forecasting. J Comp Finance 2018;22(4):73–101.
( ) [14] Hong J, et al. Towards the swift prediction of the remaining useful life of lithium-
vik , tki Tuples defining sampled time-voltage profiles (–)
ion batteries with end-to-end deep learning. Appl Energy 2020;278:115646.
y2k SOHk (–) [15] Zhang Q, et al. A deep learning method for lithium-ion battery remaining useful life
( prediction based on sparse segment data via cloud computing system. Energy 2022;
yk Vector of features yk = 241:122716.
( )⊤ )
k SOHk t⊤ k C1 C2 SOC1 (–) [16] Ma Y, et al. The capacity estimation and cycle life prediction of lithium-ion
batteries using a new broad extreme learning machine approach. J Power Sources
yik Single feature vector at cycle k (–) 2020;476:228581.
[17] Yang F, et al. Lifespan prediction of lithium-ion batteries based on various
(̂•) Predicted quantities (–)
extracted features and gradient boosting regression tree model. J Power Sources
2020;476:228654.
CRediT authorship contribution statement [18] Qi D, et al. A novel approach investigating the remaining useful life predication of
retired power Lithium-ion batteries using genetic programming method.
J Electrochem Energy Conv Storage 2021;18(3).
Simona Pepe: Writing – original draft, Visualization, Software, [19] Yang Y. A machine-learning prediction method of lithium-ion battery life based on
Methodology, Investigation, Formal analysis, Data curation, charge process for different applications. Appl Energy 2021;292:116897.

10
S. Pepe and F. Ciucci Applied Energy 350 (2023) 121761

[20] Greenbank S, Howey D. Automated feature extraction and selection for data-driven [27] Hochreiter S, Schmidhuber J. LSTM can solve hard long time lag problems, in
models of rapid battery capacity fade and end of life. IEEE Trans Industr Inform Advances in neural information processing systems. Neural Information Processing
2021;18(5):2965–73. Systems Foundation, Inc (NIPS); 1996.
[21] Hu X, et al. Battery health prediction using fusion-based feature selection and [28] Chung J, et al. Empirical evaluation of gated recurrent neural networks on
machine learning. IEEE Trans Transport Electrific 2020;7(2):382–98. sequence modeling. in preprint arXiv:1412.3555. 2014.
[22] Li X, et al. State of health estimation for Li-ion battery using incremental capacity [29] Grossberg S. Recurrent neural networks Scholarpedia 2013;8(2):1888.
analysis and Gaussian process regression. Energy 2020;190:116467. [30] Bian C, et al. State-of-charge sequence estimation of lithium-ion battery based on
[23] Stroe D-I, Schaltz E. Lithium-ion battery state-of-health estimation using the bidirectional long short-term memory encoder-decoder architecture. J Power
incremental capacity analysis technique. IEEE Trans Industry Appl 2019;56(1): Sources 2020;449:227558.
678–85. [31] Richardson RR, Osborne MA, Howey DA. Gaussian process regression for
[24] Pepe S, et al. Neural ordinary differential equations and recurrent neural networks forecasting battery state of health. J Power Sources 2017;357:209–19.
for predicting the state of health of batteries. J Energy Stor 2022;50:104209. [32] Zhang Y, et al. Lithium-ion battery remaining useful life prediction with Box–Cox
[25] Pepe S. Automatic-feature-extraction-for-battery-SOH-and_EOL-prediction. transformation and Monte Carlo simulation. IEEE Trans Industr Electron 2018;66
Available from: https://github.com/simonapepe/automatic-feature-extraction-for- (2):1585–97.
battery-SOH-and-EOL-prediction.git. [33] Gal Y, Ghahramani Z. A theoretically grounded application of dropout in recurrent
[26] Hampel FR. The influence curve and its role in robust estimation. J Am Stat Assoc neural networks. Adv Neural Inform Proc Syst 2016;29.
1974;69(346):383–93. [34] Liu H, Motoda H. Computational methods of feature selection. CRC Press; 2007.
[35] Itti L, Koch C, Niebur E. A model of saliency-based visual attention for rapid scene
analysis. IEEE Trans Pattern Anal Mach Intell 1998;20(11):1254–9.

11

You might also like