Next Article in Journal
Two-Stage Progressive Learning for Vehicle Re-Identification in Variable Illumination Conditions
Next Article in Special Issue
Electrochemical Impedance Spectrum Equivalent Circuit Parameter Identification Using a Deep Learning Technique
Previous Article in Journal
Enhancing Privacy Preservation in Vehicular Trust Management Systems through Blockchain Technology
Previous Article in Special Issue
Li-Ion Battery Immersed Heat Pipe Cooling Technology for Electric Vehicles
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Temporal Attention Mechanism Based Indirect Battery Capacity Prediction Combined with Health Feature Extraction

1
School of Computing Science, University of Glasgow, Glasgow G12 8QQ, UK
2
Department of Control Science and Engineering, Tongji University, Shanghai 201804, China
*
Author to whom correspondence should be addressed.
Electronics 2023, 12(24), 4951; https://doi.org/10.3390/electronics12244951
Submission received: 26 September 2023 / Revised: 19 November 2023 / Accepted: 7 December 2023 / Published: 9 December 2023

Abstract

:
The burgeoning utilization of lithium-ion batteries within electric vehicles and renewable energy storage systems has catapulted the capacity prediction of such batteries to a pivotal research frontier in the energy storage domain. Precise capacity prognostication is instrumental not merely in safeguarding battery operation but also in prolonging its operational lifespan. The indirect battery capacity prediction model presented in this study is based on a time-attention mechanism and aims to reveal hidden patterns in battery data and improve the accuracy of battery capacity prediction, thereby facilitating the development of a robust time series prediction model. Initially, pivotal health indicators are distilled from an extensive corpus of battery data. Subsequently, this study proposes an indirect battery capacity prediction model intertwined with health feature extraction, hinged on the time-attention mechanism. The efficacy of the proposed model is assayed through a spectrum of assessment metrics and juxtaposed against other well-entrenched deep learning models. The model’s efficacy is validated across various battery datasets, with the Test Mean Absolute Error (MAE) and Test Root Mean Squared Error (RMSE) values consistently falling below 0.74% and 1.63%, respectively, showcasing the model’s commendable predictive prowess and reliability in the lithium-ion battery capacity prediction arena.

1. Introduction

In the narrative of global energy transition [1], lithium-ion batteries have emerged as a linchpin in electric vehicles and renewable energy storage systems [2]. The performance and longevity of these batteries critically influence the efficiency and reliability of these applications [3]. Oftentimes, the capacity of a battery is elusive to direct measurement, posing a challenge for monitoring and management. The aging process of a battery is modulated by a myriad of factors, among which voltage, current, and temperature are the three paramount parameters. These parameters are integral to the charging and discharging dynamics of the battery and bear a direct impact on the battery’s health and operational lifespan [4]. Current plays a crucial role in the charging and discharging process of batteries. Improper charging current, especially too high current, may lead to excessive heat generation inside the battery, thus accelerating the aging of the battery. Additionally, high-current charging may cause an imbalance in the chemical reactions within the battery, further shortening the life of the battery [5]. Voltage is also a key indicator of battery health. Voltage changes during the charging and discharging of a battery can reflect its internal chemical state [6]. If the voltage of a battery exceeds its rated value during charging, it may cause excessive heat to be generated inside the battery, thus accelerating the aging process. Conversely, the battery may be irreversibly damaged if the discharge voltage is too low. Temperature also has a direct impact on the health of the battery. The heat generated by the battery during the charging and discharging process must be effectively dissipated. Otherwise, it may lead to overheating of the battery [7]. Prolonged overheating accelerates battery aging and may even lead to battery damage. Therefore, it is critical to monitor the battery’s temperature and ensure that it is within safe limits.
Therefore, accurately predicting lithium-ion batteries’ capacity and health status is an essential direction of current research [8]. Accurate capacity prediction not only ensures the safe operation of the battery but also extends its service life [9]. To this end, researchers have proposed various prediction methods, including traditional modelling methods [10], data-driven methods [11], and deep learning methods [12].
Early studies focused mainly on electrochemical and empirical models, which usually describe the degradation process of batteries based on their physical and chemical properties [13]. However, these models often require many parameters and complex calculations, limiting their efficiency and accuracy in practical applications [14].
Data-driven methods mainly rely on a large amount of experimental data to predict the capacity of a battery [15]. However, the prediction accuracy of this method still needs to be improved due to the operating conditions of the battery and environmental factors [16].
With the improvement of computing power and the advancement of data science, deep learning has become a popular research direction for battery capacity prediction [17]. Deep learning methods, especially composite network structures, have shown advantages in dealing with complex and nonlinear data [18]. Several existing deep learning hybrid methods and their applications in battery capacity prediction are discussed in detail below.
CNN-LSTM networks combine the advantages of Convolutional Neural Networks (CNNs) and Long Short-Term Memory Networks (LSTMs) to efficiently process multidimensional time series data and extract spatial and temporal features [19]. However, although this approach performs well in some applications, it may encounter difficulties when processing long time series data [20].
A combination of Graph Convolutional Networks and Recurrent Neural Networks can better model the complex chemical and physical processes inside the battery [21]. However, this method is highly complex and may not be suitable for real-time applications.
Transformer networks are often combined with other deep learning networks due to their advantages of parallel processing and attention mechanisms [22]. Although this combination method performs well in some applications, this method may require a large amount of training data to achieve high accuracy [23].
Generative Adversarial Networks (GANs) can be used to generate more training data, thus improving the model’s generalization ability and prediction accuracy [24]. However, the training process of GANs may encounter instability issues.
Hybrid models and integrated learning: Recent research has also begun exploring the potential of hybrid models and integrated learning, which combine multiple algorithms and models to achieve higher predictive accuracy and stability [25].
For hybrid network models, in recent years, CNN-LSTM networks have become an effective framework for predicting the capacity and health of lithium-ion batteries due to their ability to process multidimensional time series data and extract spatial and temporal features. For example, Ma et al. proposed a method for predicting the remaining useful life (RUL) of lithium-ion batteries using a hybrid neural network based on CNNs and LSTMs, demonstrating the effectiveness of this method in different types of batteries [26]. Similarly, Zhao et al. investigated a CNN-LSTM hybrid neural network for capacity prediction and remaining useful life (RUL) diagnosis of lithium-ion batteries, emphasizing the advantages of this hybrid network structure in handling battery performance prediction tasks [27]. Song et al. developed a CNN- LSTM combined network that captures spatial and temporal features of battery data through voltage, current, and temperature measurements, and evaluated the performance of the proposed network under various dynamic load profiles [28]. In addition, Xu et al. presented an improved method for estimating the state-of-health (SOH) of lithium-ion batteries based on a CNN-LSTM model, emphasizing the importance of incremental capacity profiles as inputs to the neural network model to improve prediction accuracy [29].
Table 1 shows the comparison of different deep learning methods in battery capacity prediction.
These studies emphasize the advantages of CNN-LSTM composite networks for lithium-ion battery capacity and state-of-health prediction. However, traditional CNN-LSTM models may not fully consider the importance of different time points in time series data. In this paper, by introducing a temporal attention mechanism, the model can pay more attention to essential time periods, which may further improve the model’s accuracy in predicting battery capacity and health state. Meanwhile, through indirect battery capacity prediction and health feature extraction, this paper not only focuses on direct capacity prediction but also provides more information to help the model understand the battery’s state more accurately.
The main contributions of this paper are as follows:
  • Advanced feature extraction for battery health monitoring: In this study, key features indicative of battery degradation are skillfully extracted using easily measurable parameters in the battery charge/discharge cycle. The paper details a systematic approach to extracting battery health indicators from available data, categorizing them into measured and calculated health indicators. In addition, it reveals the correlation between the extracted health metrics and battery capacity, which helps to identify the most relevant and effective parameters for battery capacity. These metrics not only deepen the understanding of battery aging trajectories, but also provide a solid foundation for predictive analysis.
  • Indirect battery capacity prediction model based on time-attention mechanism: The model adds a temporal focus mechanism to capture the time-dependent nuances in the battery charge/discharge data to reveal its intrinsic dynamic behavior and degradation mechanisms. The focus on temporal dynamics greatly enhances the model’s ability to adapt to datasets of different sizes and characteristics, thus expanding its applicability to different battery capacity prediction studies.
  • Empirical validation through extensive experimentation: This paper emphasizes the proposed model’s consistency and adaptability through experiments using multiple battery datasets. The accuracy and robustness of the model predictions are rigorously verified through in-depth error distribution analysis and visualization of graphs. In addition, a comparative analysis with four other well-established models is conducted in this paper to highlight the proposed model’s superior prediction accuracy and reliability, especially highlighting the advantages offered by the temporal attention mechanism and advanced feature extraction process.
The structure of this paper unfolds as follows: Section 2 delves into an exploration of related work in the domain of battery capacity prediction, shedding light on the temporal attention mechanism, CNN and LSTM networks, and elucidating on the indirect prediction model that leverages the temporal attention mechanism, which is central to this study. Section 3 provides an exhaustive description of the dataset collection process and the feature extraction methodology, while also presenting a comprehensive introduction to the proposed indirect battery capacity prediction framework, rooted in the temporal attention mechanism. Section 4 focuses on the model training procedures, detailing the experimental setups across four distinct datasets, the evaluation metrics employed, and the subsequent results obtained. This section also engages in a discussion on the characteristics of model error distribution across varying battery types and extends the analysis to draw comparative insights with other existing model structures. Concluding the paper, Section 5 encapsulates this research’s pivotal findings and contributions, offering a summary that underlines its significance and implications.

2. Hybrid Network for Battery Capacity Prediction

2.1. Temporal Attention Mechanism

The temporal attention mechanism has the ability to enhance the model’s ability to capture key patterns and dependencies in data series [30]. It allows the model to focus on those time steps that are more important or relevant when dealing with sequential data (e.g., time series), rather than treating all time steps equally [31]. This mechanism facilitates the understanding and capture of the underlying patterns required for accurate prediction by navigating through the sequence data with judicious allocation of focus to key time steps. This mechanism can be easily integrated into many deep learning architectures to improve their ability to capture temporal dependencies.
The conceptual structure of the temporal attention mechanism can be mathematically developed as follows:
  • Formulation of Attention Scores: In the inaugural phase, attention scores are formulated for each time fragment within a defined series X = { x 1 , x 2 , , x T } . This procedure entails the deployment of a parameterized function to evaluate the resemblance between the focal time step and its counterparts, represented as
    e t , t = v T tanh ( W 1 x t + W 2 x t ) ,
    where W 1 and W 2 signify trainable weight matrices, and v denotes a learnable weight vector. The intricate choice of this function pivots the efficacy of the attention mechanism, orchestrating a nuanced focus on significant time steps.
  • Synthesis of Attention Weights: Following this, attention weights are synthesized, utilizing the softmax function to equilibrate the attention scores, thus ensuring a summation equal to one. This computational process is mathematically illustrated as
    α t , t = exp ( e t , t ) k = 1 T exp ( e t , k ) ,
    These weights mirror the significance attributed to each time step, dictating their contribution to the representation of the current time fragment.
  • Computation of the Weighted Sum: Subsequently, a weighted sum of the input series is constructed leveraging the attention weights, engendering a sophisticated representation of the present time step. This is mathematically conveyed as
    h t = t = 1 T α t , t x t .
The structural diagram of the multi-attention mechanism is shown in Figure 1:
Temporal attention mechanism in lithium-ion battery capacity prediction: The temporal attention mechanism plays a crucial role in lithium-ion battery capacity prediction. Temporal attention mechanisms can better focus on historical time steps that are more relevant to predicting the current battery state. This mechanism can be used to capture critical moments in the charge/discharge cycle of a battery that may contain important information that affects the capacity and health of the battery. In addition, combining temporal attention mechanisms with deep learning networks such as CNNs or LSTMs can help build models that are both robust and adaptive [32]. These models can better handle the temporal dynamics and nonlinear features inherent in battery data, thereby improving the accuracy and reliability of predictions.
In summary, the temporal attention mechanism provides an effective way to improve the ability of deep learning models to process time series data. By dynamically focusing on more essential time steps, it can improve the accuracy and robustness of predictions. It may become a valuable tool in lithium-ion battery capacity prediction research.

2.2. Convolutional Neural Network

CNNs are well suited for processing grid-structured data like multidimensional time series data, which is pertinent for battery capacity prediction [33,34]. Through convolutional, pooling, and fully connected layers, CNNs automatically extract hierarchical features from data [35].
The core components of CNNs include the input layer, convolutional layer, activation layer, pooling layer, fully connected layer, and output layer [36]. The convolutional layer utilizes a kernel to scan local regions of the input data, with the convolution operation described as
( f g ) ( i , j ) = m n f ( m , n ) g ( i m , j n )
Combining CNNs with other deep learning techniques like LSTM or temporal attention mechanisms can enhance the prediction accuracy by capturing long-term dependencies in time series data.

2.3. Long Short-Term Memory Networks

LSTM, a Recurrent Neural Network (RNN) architecture, overcomes the challenges of gradient vanishing and gradient explosion faced by traditional RNNs when processing long-time dependencies [37]. It employs a gating mechanism and a cellular state to manage information flow over time [38].
The core components of an LSTM cell include the forget gate, input gate, candidate cell state, cell state, output gate, and hidden state [39].
The following are the core components of an LSTM cell and their mathematical expressions:
  • Forget Gate ( f t ): Employs the sigmoid function to decide which information is forgotten or retained from the cell state.
    f t = σ ( W f · [ h t 1 , x t ] + b f )
  • Input Gate ( i t ): Also uses the sigmoid function to determine which new information is added to the cell state.
    i t = σ ( W i · [ h t 1 , x t ] + b i )
  • Candidate Cell State ( C ˜ t ): Generates potential new values for the cell state, using the tanh function.
    C ˜ t = tanh ( W C · [ h t 1 , x t ] + b C )
  • Cell State ( C t ): Maintains the long-term flow of information within the LSTM unit, updating based on the outputs of the forget gate and input gate.
    C t = f t · C t 1 + i t · C ˜ t
  • Output Gate ( o t ): Utilizes the sigmoid function to control which information from the cell state is outputted.
    o t = σ ( W o · [ h t 1 , x t ] + b o )
  • Hidden State ( h t ): Represents the output of the LSTM unit at the current time step, based on the decisions of the output gate and the current cell state.
    h t = o t · tanh ( C t )
LSTM networks excel at capturing time-dependence in battery charge/discharge data, aiding in predicting the future performance and lifetime of the battery. By combining LSTMs with other deep learning techniques, a hybrid network structure can be formed to comprehensively and accurately capture the multi-scale and multi-dimensional properties of batteries [40].

2.4. Hybrid Network for Battery Capacity Prediction

Accurate predictive modeling of lithium-ion battery capacity is an important research direction in the field of contemporary energy storage systems. This study focuses on hybrid network models with temporal attention mechanisms that integrate the functions of CNNs, LSTMs, and attention mechanisms, aiming to improve the accuracy of battery capacity estimation. This section provides an in-depth look at the hybrid network architecture used in this study.
  • Network Structure Diagram
    To illustrate the complex network structure in detail, Figure 2 is a diagram of the network structure of the prediction model based on the temporal attention mechanism to help in gaining a deep understanding of the model’s functionality and the synergistic dynamics between the layers.
  • Initial Data Processing
    Before starting the network operation, the data must go through several transformation stages to ensure optimal network performance. MinMaxScaler normalizes data obtained from specific databases. This process helps maintain the data’s intrinsic distribution while adjusting the values to a predetermined range (0 to 1 in this case). Subsequently, the data corpus was divided into training and test sets, maintaining an 80–20 ratio. Using a custom function called create_dataset, the data were adapted to a format consistent with the LSTM inputs. A backtracking parameter was integrated to take into account past time steps in the prediction model.
  • Start Layer
    The network operates from the input layer, where the transformed data are accepted. This layer represents the starting point of the data through the network and is aligned with the feature dimensions of the training dataset.
  • Convolution Phase
    After the initial layer, the data enter the convolution phase where important features are separated from the input data using 64 filters and 3 kernel dimensions. The Rectified Linear Unit activation function is used here to introduce a nonlinear element to the system, which enhances the network’s ability to capture complex patterns in the data.
  • Dimensionality Reduction Layer
    In order to simplify the computational process and to highlight the main features, a maximum pooling layer is incorporated in the system with a pool size of 1. This layer helps to minimize the spatial dimensionality of the output volumes, preserving the essential information and speeding up the computational process.
  • Sequential LSTM Layer
    For temporal analysis, LSTM layers are a core element that is proficient in capturing time-related dependencies in the data. Arranged in different configurational orders, these layers excel at identifying long-term dependencies in the data, providing a nuanced understanding of temporal patterns that are critical for accurate prediction.
  • Attention Mechanism
    This mechanism allows the model to selectively focus on different segments of the input sequence, highlighting important patterns and dependencies, thus improving prediction accuracy.
  • Output Segment
    The final part of the network structure is the output segment, a dense layer in which a single unit synthesizes and analyzes the information to produce the final battery capacity prediction. This segment translates the insights extracted from the data into an actual output representing the predicted battery capacity.
  • Model Configuration and Training
    Once the network structure is defined, the model will enter the configuration and training phase. The Adam optimizer, known for its adaptive learning rate, is chosen in the training phase to minimize the mean square error loss function and to fine tune the weights for optimal performance over a time span of 30 calendar hours with a batch size of 2.
  • Prediction and Performance Evaluation
    After the training phase, the model starts to enter the prediction phase, where predictions are made for both the training and test datasets. These predictions are then inversely transformed to reverse the normalization applied in the initial phase. This step is crucial to obtain predictions of the original proportions and helps to make an accurate assessment of the model’s efficiency.

3. Feature Extraction

3.1. Data Description

The present study is organized around two different but equally essential datasets: the NASA dataset and the MIT dataset. These datasets have a rich repository of information that provides a favorable environment for extracting key health indicators (HIs) and facilitates a detailed study of the indirect battery capacity prediction model based on the time-attention mechanism. The specifics of the dataset are as follows.

3.1.1. NASA Dataset

The initial dataset, serving as the foundation of this study, was procured from the NASA Ames Diagnostic Center of Excellence database, with access provided through the following link: https://www.nasa.gov/intelligent-systems-division/discovery-and-systems-health/pcoe/pcoe-data-set-repository (accessed on 8 December 2023). This repository encompasses data related to three lithium-ion batteries, designated as B_5, B_7, and B_18. Each of these batteries possesses a specified capacity of 2 Ah and operates at a standard voltage of 3.7 V [41]. The experimental protocol encapsulated within this dataset adheres to a structured methodology, deeming a battery’s lifecycle as complete upon a 30% reduction in its original rated capacity, corresponding to a decline to 70% of its initial capacity.
The dataset meticulously documents the entirety of the charging and discharging cycles, segregating the process into three pivotal phases: constant current (CC) charging, constant voltage (CV) charging, and CC discharging. These granular data facilitate an exhaustive investigation of the capacity fluctuations inherent in lithium-ion batteries, laying a robust foundation for implementing deep learning algorithms in predictive analytics.
This study focused on three lithium-ion batteries (5, 7, and 18), all sharing the same chemical composition. These batteries were subjected to three distinct operational modes—charging, discharging, and impedance measurement—at room temperature. The dataset unveils the batteries’ behavioral patterns under varied operational conditions.
During the charging phase, a constant current (CC) of 1.5 A was applied until the battery voltage escalated to 4.2 V, subsequently transitioning to a constant voltage (CV) mode, persisting until the charging current diminished to 20 mA. The discharging phase was conducted at a constant current (CC) of 2 A, continuing until the battery voltage dwindled to specific thresholds: 2.7 V, 2.2 V, and 2.5 V for batteries 5, 7, and 18, respectively. Impedance measurements were meticulously executed via electrochemical impedance spectroscopy (EIS), spanning a frequency range from 0.1 Hz to 5 kHz. The iterative cycling of charge and discharge expedited the aging process of the batteries. Concurrently, impedance measurements yielded valuable insights into the evolution of internal battery parameters as the aging process progressed. The experimental proceedings were terminated when each battery’s capacity receded to 70% of its rated capacity, transitioning from 2 Ahr to 1.4 Ahr, a state defined as the end-of-life (EOL) criterion for the batteries under study.
Each of the batteries underwent an extensive series of cycles until reaching their respective EOL criteria. The specific C-rate for each cell during discharge, derived from the provided current and capacity values, elucidates the operating conditions endured by the battery.
The comprehensive parameters and metrics encapsulated in these datasets are indispensable for research endeavors aiming to predict the remaining charge in a given discharge cycle and estimate the remaining useful life of lithium-ion batteries.

3.1.2. MIT Dataset

In conjunction with the NASA dataset, our study incorporates the MIT dataset, meticulously assembled by the Massachusetts Institute of Technology. This dataset stands out for its impeccable data quality, establishing it as a premier resource for investigations into the capacity behavior of lithium-ion batteries [42]. The focal point of the analysis is a battery with a nominal capacity of 1.1 Ah and a standard voltage of 3.3 V. The dataset meticulously outlines a structured experimental regimen, determining the end of the battery’s lifecycle when its capacity diminishes to 80% of its original rating.
The dataset is charged using the CC-CV mode. Its distinctive feature is its comprehensive documentation of the multi-step fast charging technique and the constant-current discharging process, which occurs in a temperature-controlled chamber at 30 °C [43]. It provides an exhaustive depiction of the battery’s charge and discharge cycles, capturing intricate details of various phases and parameters. This wealth of information lays a robust groundwork for extracting crucial indicators of battery health, facilitating a thorough analysis and understanding of the battery’s performance dynamics.
The two datasets provide a solid foundation for this study by providing detailed data on the state changes of lithium-ion batteries, thus helping to compare the performance differences between the indirect battery capacity prediction model based on the time-attention mechanism and other network structures. Figure 3 shows the battery degradation curves for the two datasets.

3.2. Extraction of Health Indicators

In previous time series models, while the data used for capacity prediction are usually the capacity itself, capacity is often not directly measurable in practice. Therefore, it is necessary to extract battery health indicators from existing data as a basis for prediction. To reveal the complexity of battery capacity variations and provide fundamental security for predictive analytics, HIs must be extracted from existing datasets. These metrics are critical touchpoints for battery performance and degradation. This section will provide insights into how to remove these metrics systematically.
Within the scope of this study, subtle metrics that summarize the dynamic health of the battery are extracted as much as possible to ensure a more accurate and reliable battery capacity estimation. These metrics are categorized into two types: measured health metrics and calculated health metrics.

3.2.1. Directly Measured Indicators of Battery Aging

As seen from the above dataset, different charging and discharging conditions, currents, and temperatures can impact the capacity and health of a battery. Therefore, HIs must be extracted from these parameters to assess the battery’s health more accurately. These indicators can help researchers better understand the aging trajectory of batteries and provide strong support for predictive analysis.
Figure 4 is a representative example of the current, voltage, and temperature curves during the charging and discharging of a NASA battery. The measured HIs directly represent the battery’s aging process, encapsulating parameters that can be directly apprehended from the Battery Management System. After analyzing the data trends, this study focuses on selecting indicators such as the duration of the CC charging stage ( t cc ), variations in charging voltage over equidistant time intervals (ETVC), and the temporal location of the peak temperature during the discharge phase (TPL). These indicators, serving as direct derivatives from the charging and discharging processes, are pivotal in portraying the aging trajectory of the batteries.
An in-depth analysis of these parameters reveals a clear trend corresponding to the number of charge cycles. This trend is influenced by physical and chemical changes within the battery, showing a gradual increase in internal resistance, affecting the battery’s characteristics over time. Extracting these metrics aims to generalize these trends and provide a reliable indicator for assessing battery health.

3.2.2. Calculated Indicators of Battery Aging

Calculated health metrics complement measured health metrics and provide an in-depth analysis of the battery’s health and a nuanced view of the degradation process. These metrics focus on the subtle electrochemical changes occurring within the battery, which can be discerned through incremental capacity (IC) analysis. This section presents two critical calculations of HI: the peak of the IC curve (ICP) and the corresponding peak location (ICPL), which show a decreasing trend as the number of cycles increases. Since the peak IC curve (ICP) and the corresponding peak position (ICPL) showed a decreasing trend with the increased number of cycles, these two indicators were chosen for this study. The formula for the IC curve is:
d Q d V = I · d t d V
where Q represents the total charge of the battery, V is the voltage across the battery, I is the current flowing through the battery, and t is time.
In addition, a nonlinear dynamic parameter, sample entropy (SampEn), is integrated into the analysis to quantify unpredictability and regularity in the time series data. This parameter is a reliable tool for measuring the complexity of a time series and helps to provide insight into new patterns and information emerging in the series. A synergistic approach utilizing measured and calculated HIs can establish a robust framework for battery health analysis and facilitate accurate and reliable SOH estimation.

3.3. Correlation Analysis

After extracting HIs, meticulous correlation analysis can help build a predictive model that is both accurate and reliable. This stage helps to elucidate the quantitative relationship between HIs and battery capacity, thus providing a basis for selecting the most salient HIs and incorporating them into the prediction model, improving the accuracy and reliability of the model.
The Pearson correlation coefficient (PCC) is often used to describe the linear interdependence between two variables. In this study, the Pearson correlation coefficient can be used as a discriminatory tool to help identify and select the most effective HI based on its correlation with the battery capacity. The coefficient fluctuates between −1 and 1, which represents a complete negative linear relationship and a complete positive linear relationship, respectively, while 0 indicates no linear relationship. The mathematical expression for the PCC is as follows:
P C C = i = 1 l ( z i z ¯ ) ( q i q ¯ ) i = 1 l ( z i z ¯ ) 2 i = 1 l ( q i q ¯ ) 2
In this equation, z and q represent the reference values of HIs and capacity, respectively, whereas l signifies the number of samples. The PCC values range between −1 and 1, indicating a perfect linear relationship at the extremes and no correlation at zero.
This section performs a careful correlation analysis of each dataset to identify different patterns and relationships. This analysis is summarized in Table 2 and includes the six features ETCV (Equal Time Interval Charging Voltage Variation), tcc (Charging Time of CC Charging Phase), Tpeak_L (Temperature Peak Position during Discharge), ICP (Peak of IC Curve), ICPL (Peak Position of IC Curve), and SampEn (Sampling Entropy of Discharge Voltage).
The following analysis can be made based on the chart data:
ETCV: In all datasets, this parameter shows a significant negative correlation with battery capacity, implying that battery capacity decreases as ETCV increases, thus serving as a strong indicator of deteriorating battery health.
tcc: The analysis reveals a significant positive correlation with battery capacity, suggesting a consistent pattern of change between CC charging phase duration and battery capacity, thus portraying it as an important parameter for assessing battery life.
Tpeak_L: The data show a significant positive correlation with battery capacity, indicating that the location of the temperature peak during discharge is directly proportional to the battery capacity, thus making it a reliable indicator for SOH assessment.
ICP and ICPL: These indices show a significant positive correlation with battery capacity, indicating that their contribution to battery capacity is positive, and therefore become important indicators for predicting battery health trajectories.
SampEn: The SampEn parameter shows a strong negative correlation with the battery capacity, indicating that an increase in the entropy of the discharge voltage samples has an inverse effect on the battery capacity, and is therefore important in battery health monitoring.
The correlation analysis can screen out effective indicators that have significant linear relationships with battery capacity, while promoting a more nuanced understanding of the battery health trajectory and laying the foundation for a reliable and accurate prediction model.

4. Model Framework and Model Training

4.1. The Framework of Capacity Estimation

This study proposes a framework for predicting lithium-ion batteries’ capacity, utilizing an attention mechanism. The framework initially extracts health indicators from the battery data, and following a series of feature extraction processes, it incorporates a temporal attention mechanism along with a CNN-LSTM network to enable the indirect prediction of lithium-ion battery capacity. The structure and implementation details of the framework are depicted in detail in Figure 5.
  • Data Collection and Feature Extraction
    The analytical process initiates with the extraction of key HIs from the raw battery data, supplemented by data normalization to ensure compatibility with the model requirements. These HIs are pivotal in providing a comprehensive depiction of the battery’s health status.
    In terms of measured HIs, the focus is placed on parameters that are directly observable from the battery’s operational data. This encompasses the duration of the constant current (CC) charging stage ( t cc ), variations in charging voltage over equidistant time intervals (ETCV), and the temporal location of the peak temperature during the discharge phase (TPL). These indicators directly reflect the battery’s aging process, encapsulating the effects of wear and tear.
    Pertaining to calculated HIs, the analysis delves into the subtle electrochemical changes occurring within the battery. This involves examining the incremental capacity (IC) curve to extract the peak of the curve (ICP) and the location of this peak (ICPL). Additionally, the discharge voltage’s sample entropy (SampEn) is computed. These calculated metrics provide a holistic view of the battery’s health, enriching the analysis.
    Concluding this phase, a comprehensive correlation analysis is conducted to establish the relationship between these HIs and the battery’s capacity. This step is crucial as it isolates the HIs that significantly impact battery capacity, ensuring that the predictive model is grounded in relevant and substantial data. The correlation analysis reveals the quantitative relationships between the HIs and battery capacity, facilitating feature selection, and enhancing the predictive model’s accuracy and reliability. The results of this analysis are succinctly presented in a heatmap, providing a clear visual representation of the correlation between each indicator and battery capacity, thereby laying the groundwork for the subsequent predictive modeling.
  • Capacity Prediction Model
    The construction of the capacity prediction model hinges on the integration of a temporal attention mechanism with a deep learning network. After preprocessing, the data are fed into the model through an input layer, followed by a convolutional layer tasked with extracting local features from the time series data. To optimize computational efficiency, a max pooling layer is utilized to diminish both the parameters and computational load.
    Following the initial layers, LSTM layers are introduced to capture the inherent temporal dependencies in the data, a critical component for time series prediction tasks such as battery capacity forecasting. To bolster the model’s ability to focus on significant temporal features, a temporal attention layer is amalgamated with the LSTM layers. This integration allows the model to allocate varied attention weights to different time steps based on their relevance.
    The training of the model proceeds in a sequential manner, starting with the extraction of local features via the convolutional layer, followed by the LSTM layers capturing the long-term dependencies. The inclusion of the temporal attention mechanism ensures meticulous focus on pivotal time steps, thereby enhancing the model’s prediction accuracy.
    Throughout the training phase, appropriate optimizers and loss functions are chosen to guarantee both the accuracy and stability of the model’s predictions. This detailed approach to model training and architecture selection culminates in a robust and reliable capacity prediction model, adept at navigating the complexities of battery capacity data.
  • Model Evaluation and Comparison
    In the comprehensive evaluation of the capacity prediction model, a series of evaluation metrics including Mean Squared Error (MSE), Mean Absolute Error (MAE), Root Mean Squared Error (RMSE) and Maximum Absolute Error (MaxAE) are utilized. These metrics collectively provide insights into the accuracy, stability, and robustness of the model in various scenarios.
    The performance of the proposed model is rigorously compared with several established network structures to validate its effectiveness and demonstrate its superiority. The models for comparison encompass a CNN-LSTM network, a CNN-LSTM network enhanced with transformers, a standalone CNN network, and a standalone LSTM network.
    To facilitate a thorough understanding and showcase the comparative performance, a variety of visual representations such as prediction plots, error curves, and radar charts are employed. This extensive comparative analysis aims to highlight the unique advantages and superior predictive capabilities of the indirect battery capacity prediction model in handling complex tasks related to battery capacity estimation.
    With this composite network framework, this study expects to deeply explore the hidden information in battery data and construct an efficient and accurate time series prediction model.

4.2. Model Training

The prediction model implemented in this study does not require a lot of hardware equipment and therefore can run smoothly on a typical personal computer. The hardware used in this study mainly consists of a 12th Gen Intel(R) Core(TM) i9-12900H processor with a base clock speed of 2.50 GHz. Additionally, this computer utilizes an integrated graphics card, which provides sufficient computational power for the training and evaluation of the model.
In this model, the data preprocessing stage plays a crucial role. First, all the numerical features are scaled between 0 and 1 using the min–max normalization method to ensure that the model performs well when dealing with features at different scales. In addition to this, the model performed data filtering to remove noise and outliers that may affect the model’s performance. Together, these steps ensure that the input data are high quality, laying a solid foundation for model training.
After data preprocessing, the input layer of the model starts to accept multivariate time series data with a fixed time step. The exact amount and type of data depends on the particular application scenario faced. After the data flow through the input layer, a convolutional layer configured with 64 filters and a 3 × 3 kernel size is next, aiming to extract local features from the time series data. This is immediately followed by a maximum pooling layer, which is used to reduce the spatial dimensionality of the data and reduce the amount of computation. This is followed by a dropout layer with a 0.3 dropout rate set to mitigate overfitting. Next is a series of LSTM layers, each configured with 50 hidden units and returning the complete output sequence to capture long-term dependencies in the data. To further improve the model performance, the model introduces a temporal attention mechanism after the LSTM layers. This mechanism can enhance the model’s understanding of time series by processing information from different representation subspaces in parallel. The details of the model design are described in Table 3.
To fully evaluate the performance of the indirect battery capacity prediction model based on the temporal attention mechanism, the experiments were trained and tested on four different battery datasets. Each dataset contains a large amount of data about a specific battery, and ten sets of experiments were conducted on each dataset and averaged to ensure the reliability of the results. The average training time for the B_5 dataset was 9.92 s, and the average testing time was 1.79 s. This dataset contains 167 sets of data and demonstrates the model’s efficiency in processing the battery data provided by NASA. The B_7 dataset has an average training time of 5.27 s and an average test time of 0.56 s. This dataset also contains 167 sets of data, and it has a concise training and test time, demonstrating the model’s fast response time. The B_18 dataset has an average training time of 7.25 s and an average testing time of 0.59 s. Despite the small amount of data in this dataset (130 sets of data), the model can still complete training and testing in a short period. The average training time for the B_MIT dataset was 16.15 s, and the average testing time was 0.45 s. This dataset contains a much larger amount, 1800 sets, of data, making it a massive battery dataset. Despite the large amount of data, the model demonstrates its excellent performance in handling large amounts of data. These results clearly demonstrate the stability and efficiency of our model on datasets of different sizes and sources. Whether on small-scale datasets provided by NASA or large-scale datasets provided by MIT, the model can be trained and tested quickly, showing its fast, accurate, and reliable performance and good generalization ability.
The performance of the model was evaluated using various metrics including MSE, MAE, RMSE, MAPE and MaxAE. These metrics provide a comprehensive evaluation of the model’s prediction accuracy and reliability, which ultimately results in a model that can accurately predict time series data with good generalization ability.

5. Simulation and Verification

5.1. The Evaluation Criteria

In order to assess the predictive capability of the various network architectures deployed in this study, a series of meticulous evaluation metrics were used. These metrics are powerful tools for measuring the accuracy and reliability of the models in predicting the capacity of lithium-ion batteries. The calculation and significance of these metrics are described in detail below:
  • Mean Squared Error (MSE): This metric quantifies the average of the squares of the errors between the true and predicted values, thus offering an insight into the magnitude of the error generated by the model. The mathematical representation is as follows:
    M S E = 1 n i = 1 n ( Y i Y ^ i ) 2
    where n is the number of observations, Y i is the actual value, and Y ^ i is the predicted value.
  • Mean Absolute Error (MAE): MAE computes the average of the absolute differences between the actual and forecasted values, thus portraying a clear picture of the model’s prediction accuracy.
    M A E = 1 n i = 1 n | Y i Y ^ i |
  • Root Mean Squared Error (RMSE): This metric represents the square root of the MSE, offering a perspective that is more aligned with the original data units and portrays a more interpretable view of the average error magnitude.
    R M S E = 1 n i = 1 n ( Y i Y ^ i ) 2
  • Mean Absolute Percentage Error (MAPE): MAPE furnishes a relative measure of prediction accuracy as it computes the average percentage error between the actual and predicted values.
    M A P E = 1 n i = 1 n Y i Y ^ i Y i × 100 %
  • Maximum Absolute Error (MaxAE): This metric captures the largest absolute error between the true and predicted values, thus highlighting the worst-case error scenario in the model’s predictions.
    M a x A E = max i = 1 n | Y i Y ^ i |
In the forthcoming sections, these evaluation criteria will be instrumental in dissecting and contrasting the performance and predictive accuracy of the indirect battery capacity prediction model based on the time-attention mechanism against other network structures.

5.2. Capacity Prediction Based on the Proposed Method

This section analyzes and discusses the process and results of capacity prediction using the indirect battery capacity prediction model based on the time-attention mechanism. The capability and adaptability of the designed model are demonstrated through a detailed analysis of the prediction results and error curves for various battery datasets (B_5, B_7, B_18 and B_MIT). The analysis helps to illustrate the nuances of the model’s performance on different battery datasets.

5.2.1. Analysis of Prediction Curves

As can be seen from the prediction curves in Figure 6, there is a high-fidelity correlation between the predicted values and the actual battery capacity, which proves the model’s ability to predict complex patterns in the battery dataset. In particular, the prediction for the B_5 dataset shows the generality and accuracy of the model in interpreting datasets with different characteristics. In addition, despite the relatively small data pool of 130 data points for the B_18 dataset, the predictions maintain a high degree of consistency with the actual values, indicating that the model can provide more accurate predictions even with limited data. At the same time, the model has a certain degree of adaptability. The prediction results for the B_MIT dataset with 1800 data points maintain a high accuracy, showing its adaptability to data of different sizes.

5.2.2. Error Analysis

From the results, it can be analyzed that the model’s prediction errors are generally kept to a minimum, with most of the errors tightly concentrated around the zero point. This indicates that the deviation from the true value is slight. However, there are occasional spikes in the errors, which may indicate the presence of outliers or noise in the data. These findings emphasize the need to further refine the battery data in future work. Specifically, a higher frequency of error fluctuations was found when analyzing larger datasets such as the battery B_MIT dataset. This may be related to the inherent noise in these larger datasets. Despite these challenges, the model showed a high level of adaptability, demonstrating the stability of the model.

5.2.3. Quantitative Evaluation

In order to more accurately analyze the predictive performance of the model, the key evaluation index data calculated based on the prediction data are shown in Table 4.
  • MSE: The proposed model manifests low MSE values across all datasets, indicating its precision and accuracy in predicting battery capacities.
  • RMSE: The RMSE is more sensitive to outliers, so it better reflects the presence of more significant errors. As can be seen from the table, the model used has relatively low RMSE values for all the battery datasets, which further confirms the accuracy of its predictions.
  • MAPE: The MAPE values underline the model’s precision, reflecting minor deviations from the true values.
  • MaxAE: From the MaxAE values in the table, it can be seen that the maximum prediction errors of the model are relatively small on all datasets, further validating the reliability and robustness of the model.
In conclusion, the data show that the indirect battery capacity prediction model based on the time-attention mechanism performs well in predicting the capacity of lithium-ion batteries with high accuracy and stability, which lays the foundation for its further role in the field of battery capacity prediction.

5.3. Method Comparison and Error Analysis

This section presents a comprehensive model comparison and error analysis to verify the superiority of the proposed indirect battery capacity prediction model based on the time-attention mechanism. The performance of the proposed model is meticulously compared with other well-established models (CNN-LSTM network, CNN-LSTM network with transformer, CNN network alone, and LSTM network alone). This comparative analysis is based on multiple performance metrics evaluated on five different battery datasets.

5.3.1. Performance Metrics Analysis

In this subsection, the differences between the performance metrics of the indirect battery capacity prediction model based on the time-attention mechanism and those of the other four models are investigated: the indirect battery capacity prediction model based on the time-attention mechanism, CNN-LSTM with transformers, CNN-LSTM, CNN, and LSTM were analyzed for their performance metrics on five different battery datasets. These metrics provide insight into the accuracy and reliability of model predictions. Table 5 presents specific data for these indicators.
From the performance metrics, the indirect battery capacity prediction model based on the time-attention mechanism shows an altered prediction ability on all battery datasets. In the following, the model is analyzed in detail on different battery datasets in comparison to the benchmark model:
  • B_5 battery dataset: The time_attention model demonstrates exceptional predictive accuracy on the B_5 battery dataset, achieving a Test MSE of 0.0126%, which is approximately 79.7% lower than that of the next best model, CNN. This remarkable performance underscores its precision and reliability in capacity estimation. In terms of Test MAPE, the model outperforms the CNN_LSTM model by approximately 68.1%, showcasing its superior predictive accuracy and reliability.
  • B_7 battery dataset: On the B_7 battery dataset, the time_attention model maintains a high level of accuracy, achieving a Test MSE that is 85.5% lower than that of the CNN_LSTM model. Even though some metrics might show slight fluctuations, the model invariably stands out, particularly in minimizing the Test MAPE, where it achieves a 70.5% reduction compared to the CNN_LSTM_trans model. This consistent performance cements its position as a top-tier predictive model.
  • B_18 battery dataset: The time_attention model continues to exhibit superior prediction abilities on the B_18 battery dataset, achieving a Test MSE that is 14.7% lower than the CNN_LSTM model, the next best in this metric. Specifically, it excels in minimizing the Test MAPE, outperforming the CNN_LSTM_trans model by 58.6%. These results highlight the model’s exceptional performance and reliability in battery capacity prediction.
  • B_MIT battery dataset: On the larger B_MIT battery dataset, the time_attention model showcases an exceptional performance, achieving a Test MSE that is 66.1% lower than the CNN model, the next best in this metric. Its Test MAPE is also the smallest among all models, reinforcing its reliability and precision. With a 47.9% reduction in Test MaxAE compared to the LSTM model, it highlights its unparalleled reliability in worst-case scenarios.
In conclusion, the indirect battery capacity prediction model based on the time-attention mechanism shows better performance on all battery datasets. Comparative analysis with other models further highlights its reliability and accuracy in predicting battery capacity. A series of graphs will follow to support the conclusion.

5.3.2. Prediction Charts Analysis

For the reason that the starting point of the prediction curve in the graph is different from the starting point of the real curve, it is hereby explained: on the one hand, the study included data from both the training set and the test set in the prediction. However, for the sake of clarity and centralized presentation of the graph, the final chart removes the prediction part of the training set and keeps only the prediction curve of the test set. This means that the starting point of the test set prediction curve seen is the end point of the training set prediction curve. The prediction curves are generated based on patterns learned by the model in the training data, and this continuity cannot be visualized without displaying the training data. On the other hand, other models that do not fit the data well can cause the problem.
The prediction charts elucidated in Figure 7 help provide insight into the prediction accuracy and reliability of the proposed model. A closer look at the prediction charts for each battery dataset reveals that the proposed model is able to skillfully capture the features of different datasets, thus achieving a high degree of agreement between the predicted and actual data.

5.3.3. Error Curves Analysis

The error curve charts in Figure 8 show the difference between the data predicted by the different models and the true value. Further evidence of the accuracy of the main research model is provided by comparisons showing the small deviations from the true values. These data reveal the stability of the models in keeping the errors low, thus confirming their strong predictive ability.

5.3.4. Radar Chart Analysis

The radar chart analyses in Figure 9 provide a comprehensive picture of the model’s performance on each metric. Given the range of values for the different metrics, the radar charts normalize the data using data transformation techniques such as logarithmic scale transformation to ensure a fair comparison. The charts provide further evidence of the superiority and reliability of the main models in predicting battery capacity.
On the B_5 dataset, the indirect battery capacity prediction model based on the time-attention mechanism demonstrated a remarkable 93.23% improvement in Test MSE and an 80.76% enhancement in Mean Absolute Error (Test MAE), compared to the average performance of the other four models. This underscores its robustness and precision. The B_7 dataset continued to excel, surpassing the competing models with an 86.31% improvement in Test MAE and an 86.41% improvement in Test MAPE. On the B_18 dataset, the model exhibited a 57.52% improvement in Test MSE, a 40.47% better performance in Test MAE, and a 13.46% enhancement in Maximum Absolute Error (Test MaxAE), showcasing its reliability in extreme scenarios. In the analysis of the larger B_MIT dataset, the model demonstrated outstanding performance, achieving an 83.17% improvement in Test MSE, a 65.03% improvement in Test MAE, a 64.71% enhancement in Test MAPE, and a 39.86% better performance in Test MaxAE, further proving its unparalleled accuracy and reliability across different battery datasets.
These data indicate that, regardless of the battery dataset in question, the indirect battery capacity prediction model based on time-attention mechanism significantly outperforms other models on critical metrics, further attesting to its efficacy and reliability in predicting battery performance.

6. Conclusions

This article describes an indirect method for predicting the capacity of lithium-ion batteries based on a temporal attention mechanism combined with feature extraction. The method incorporates feature extraction sessions and temporal attention mechanisms into the deep learning model. A significant correlation with the battery capacity is established by extracting key health indicators from the charging and discharging cycles, thus eliminating the need for direct capacity measurement. The proposed indirect prediction model utilizes the temporal attention mechanism and performs better than traditional models in capturing the intricate temporal dependencies in battery data. The model shows better results across different dataset scenarios, with the test MAE and test RMSE consistently staying below 0.74% and 1.63%, respectively. This highlights the accuracy and reliability of the model in predicting the capacity of lithium-ion batteries.
A comprehensive evaluation of different battery datasets confirms the stability of the model and its versatility in adapting to different data sizes and characteristics. Thus, the methodology can be used as an effective tool for predicting the capacity of lithium-ion batteries, advancing the development of sustainable energy storage solutions.
However, it is essential to recognize the limitations of our study. The current model primarily uses datasets of specific charging modes, i.e., NASA’s CC and CV modes and MIT’s CC-CV mode, which may not encompass the full range of real-world battery usage scenarios, including dynamic nonlinear discharge waveforms. Future research could explore integrating a more comprehensive range of charging and discharging models to more realistically reflect battery degradation under different operating conditions. Such extensions may improve the applicability and accuracy of the model in real-world environments, thereby contributing to more reliable predictions of lithium-ion battery capacity changes over time.

Author Contributions

Conceptualization, F.C. and L.G.; methodology, F.C.; investigation, F.C. and C.S.; data curation, C.S.; writing—original draft preparation, F.C. and C.S.; writing—review and editing, F.C. and L.G.; project administration, L.G. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Data is contained within the article.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Zubi, G.; Dufo-López, R.; Carvalho, M.; Pasaoglu, G. The lithium-ion battery: State of the art and future perspectives. Renew. Sustain. Energy Rev. 2018, 89, 292–308. [Google Scholar] [CrossRef]
  2. Li, W.; Chen, S.; Peng, X.; Xiao, M.; Gao, L.; Garg, A.; Bao, N. A comprehensive approach for the clustering of similar-performance cells for the design of a lithium-ion battery module for electric vehicles. Engineering 2019, 5, 795–802. [Google Scholar] [CrossRef]
  3. Wen, J.; Zhao, D.; Zhang, C. An overview of electricity powered vehicles: Lithium-ion battery energy storage density and energy conversion efficiency. Renew. Energy 2020, 162, 1629–1648. [Google Scholar] [CrossRef]
  4. Hu, X.; Che, Y.; Lin, X.; Onori, S. Battery health prediction using fusion-based feature selection and machine learning. IEEE Trans. Transp. Electrif. 2020, 7, 382–398. [Google Scholar] [CrossRef]
  5. Hannan, M.A.; Lipu, M.H.; Hussain, A.; Mohamed, A. A review of lithium-ion battery state of charge estimation and management system in electric vehicle applications: Challenges and recommendations. Renew. Sustain. Energy Rev. 2017, 78, 834–854. [Google Scholar] [CrossRef]
  6. Kong, J.z.; Yang, F.; Zhang, X.; Pan, E.; Peng, Z.; Wang, D. Voltage-temperature health feature extraction to improve prognostics and health management of lithium-ion batteries. Energy 2021, 223, 120114. [Google Scholar] [CrossRef]
  7. Thakur, A.K.; Sathyamurthy, R.; Velraj, R.; Saidur, R.; Pandey, A.; Ma, Z.; Singh, P.; Hazra, S.K.; Sharshir, S.W.; Prabakaran, R.; et al. A state-of-the art review on advancing battery thermal management systems for fast-charging. Appl. Therm. Eng. 2023, 226, 120303. [Google Scholar] [CrossRef]
  8. Jin, S.; Sui, X.; Huang, X.; Wang, S.; Teodorescu, R.; Stroe, D.I. Overview of machine learning methods for lithium-ion battery remaining useful lifetime prediction. Electronics 2021, 10, 3126. [Google Scholar] [CrossRef]
  9. Li, Y.; Liu, K.; Foley, A.M.; Zülke, A.; Berecibar, M.; Nanini-Maury, E.; Van Mierlo, J.; Hoster, H.E. Data-driven health estimation and lifetime prediction of lithium-ion batteries: A review. Renew. Sustain. Energy Rev. 2019, 113, 109254. [Google Scholar] [CrossRef]
  10. Zhao, J.; Zhu, Y.; Zhang, B.; Liu, M.; Wang, J.; Liu, C.; Hao, X. Review of State Estimation and Remaining Useful Life Prediction Methods for Lithium–Ion Batteries. Sustainability 2023, 15, 5014. [Google Scholar] [CrossRef]
  11. Samanta, A.; Chowdhuri, S.; Williamson, S.S. Machine learning-based data-driven fault detection/diagnosis of lithium-ion battery: A critical review. Electronics 2021, 10, 1309. [Google Scholar] [CrossRef]
  12. Wang, S.; Ren, P.; Takyi-Aninakwa, P.; Jin, S.; Fernandez, C. A critical review of improved deep convolutional neural network for multi-timescale state prediction of lithium-ion batteries. Energies 2022, 15, 5053. [Google Scholar] [CrossRef]
  13. Liu, Y.; Liu, C.; Liu, Y.; Sun, F.; Qiao, J.; Xu, T. Review on degradation mechanism and health state estimation methods of lithium-ion batteries. J. Traffic Transp. Eng. 2023, 10, 578–610. [Google Scholar] [CrossRef]
  14. Hassan, M.U.; Saha, S.; Haque, M.E.; Islam, S.; Mahmud, A.; Mendis, N. A comprehensive review of battery state of charge estimation techniques. Sustain. Energy Technol. Assess. 2022, 54, 102801. [Google Scholar] [CrossRef]
  15. Liu, K.; Shang, Y.; Ouyang, Q.; Widanage, W.D. A data-driven approach with uncertainty quantification for predicting future capacities and remaining useful life of lithium-ion battery. IEEE Trans. Ind. Electron. 2020, 68, 3170–3180. [Google Scholar] [CrossRef]
  16. Nuhic, A.; Terzimehic, T.; Soczka-Guth, T.; Buchholz, M.; Dietmayer, K. Health diagnosis and remaining useful life prognostics of lithium-ion batteries using data-driven methods. J. Power Sources 2013, 239, 680–688. [Google Scholar] [CrossRef]
  17. Li, C.; Zhang, H.; Ding, P.; Yang, S.; Bai, Y. Deep feature extraction in lifetime prognostics of lithium-ion batteries: Advances, challenges and perspectives. Renew. Sustain. Energy Rev. 2023, 184, 113576. [Google Scholar] [CrossRef]
  18. Li, W.; Sengupta, N.; Dechent, P.; Howey, D.; Annaswamy, A.; Sauer, D.U. Online capacity estimation of lithium-ion batteries with deep long short-term memory networks. J. Power Sources 2021, 482, 228863. [Google Scholar] [CrossRef]
  19. Zhao, C.; Huang, X.; Li, Y.; Yousaf Iqbal, M. A double-channel hybrid deep neural network based on CNN and BiLSTM for remaining useful life prediction. Sensors 2020, 20, 7109. [Google Scholar] [CrossRef]
  20. Ren, L.; Dong, J.; Wang, X.; Meng, Z.; Zhao, L.; Deen, M.J. A data-driven auto-CNN-LSTM prediction model for lithium-ion battery remaining useful life. IEEE Trans. Ind. Inform. 2020, 17, 3478–3487. [Google Scholar] [CrossRef]
  21. Yao, X.Y.; Chen, G.; Pecht, M.; Chen, B. A novel graph-based framework for state of health prediction of lithium-ion battery. J. Energy Storage 2023, 58, 106437. [Google Scholar] [CrossRef]
  22. Shi, D.; Zhao, J.; Wang, Z.; Zhao, H.; Wang, J.; Lian, Y.; Burke, A.F. Spatial-Temporal Self-Attention Transformer Networks for Battery State of Charge Estimation. Electronics 2023, 12, 2598. [Google Scholar] [CrossRef]
  23. Chen, D.; Hong, W.; Zhou, X. Transformer network for remaining useful life prediction of lithium-ion batteries. IEEE Access 2022, 10, 19621–19628. [Google Scholar] [CrossRef]
  24. Zhang, H.; Tang, W.; Na, W.; Lee, P.Y.; Kim, J. Implementation of generative adversarial network-CLS combined with bidirectional long short-term memory for lithium-ion battery state prediction. J. Energy Storage 2020, 31, 101489. [Google Scholar] [CrossRef]
  25. Li, X.; Zhang, L.; Wang, Z.; Dong, P. Remaining useful life prediction for lithium-ion batteries based on a hybrid model combining the long short-term memory and Elman neural networks. J. Energy Storage 2019, 21, 510–518. [Google Scholar] [CrossRef]
  26. Ma, G.; Zhang, Y.; Cheng, C.; Zhou, B.; Hu, P.; Yuan, Y. Remaining useful life prediction of lithium-ion batteries based on false nearest neighbors and a hybrid neural network. Appl. Energy 2019, 253, 113626. [Google Scholar] [CrossRef]
  27. Zhao, G.; Li, S.; Li, Y.; Duan, B.; Shang, Y.; Zhang, C. Capacity Prediction and Remaining Useful Life Diagnosis of Lithium-ion Batteries Using CNN-LSTM Hybrid Neural Network. In Proceedings of the 2021 China Automation Congress (CAC), Beijing, China, 22–24 October 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 2179–2183. [Google Scholar]
  28. Song, X.; Yang, F.; Wang, D.; Tsui, K.L. Combined CNN-LSTM network for state-of-charge estimation of lithium-ion batteries. IEEE Access 2019, 7, 88894–88902. [Google Scholar] [CrossRef]
  29. Xu, H.; Wu, L.; Xiong, S.; Li, W.; Garg, A.; Gao, L. An improved CNN-LSTM model-based state-of-health estimation approach for lithium-ion batteries. Energy 2023, 276, 127585. [Google Scholar] [CrossRef]
  30. Ehteram, M.; Ghanbari-Adivi, E. Self-attention (SA) temporal convolutional network (SATCN)-long short-term memory neural network (SATCN-LSTM): An advanced python code for predicting groundwater level. Environ. Sci. Pollut. Res. 2023, 30, 92903–92921. [Google Scholar] [CrossRef] [PubMed]
  31. Lu, L.; Di, H.; Lu, Y.; Zhang, L.; Wang, S. A two-level attention-based interaction model for multi-person activity recognition. Neurocomputing 2018, 322, 195–205. [Google Scholar] [CrossRef]
  32. Sun, S.; Sun, J.; Wang, Z.; Zhou, Z.; Cai, W. Prediction of battery soh by cnn-bilstm network fused with attention mechanism. Energies 2022, 15, 4428. [Google Scholar] [CrossRef]
  33. Feng, X.; Hui, H.; Liang, Z.; Guo, W.; Que, H.; Feng, H.; Yao, Y.; Ye, C.; Ding, Y. A novel electricity theft detection scheme based on text convolutional neural networks. Energies 2020, 13, 5758. [Google Scholar] [CrossRef]
  34. Zhang, M.; Yang, D.; Du, J.; Sun, H.; Li, L.; Wang, L.; Wang, K. A review of SOH prediction of Li-ion batteries based on data-driven algorithms. Energies 2023, 16, 3167. [Google Scholar] [CrossRef]
  35. Huang, Z.; Pan, Z.; Lei, B. Transfer learning with deep convolutional neural network for SAR target classification with limited labeled data. Remote Sens. 2017, 9, 907. [Google Scholar] [CrossRef]
  36. Ketkar, N.; Moolayil, J.; Ketkar, N.; Moolayil, J. Convolutional neural networks. In Deep Learning with Python: Learn Best Practices of Deep Learning Models with PyTorch; Apress: New York, NY, USA, 2021; pp. 197–242. [Google Scholar]
  37. Jozefowicz, R.; Zaremba, W.; Sutskever, I. An empirical exploration of recurrent network architectures. In Proceedings of the International Conference on Machine Learning, PMLR, Lille, France, 6–11 July 2015; pp. 2342–2350. [Google Scholar]
  38. Shewalkar, A.N. Comparison of RNN, LSTM and GRU on Speech Recognition Data. 2018. Available online: https://library.ndsu.edu/ir/handle/10365/29111 (accessed on 6 December 2023).
  39. Yu, Y.; Si, X.; Hu, C.; Zhang, J. A review of recurrent neural networks: LSTM cells and network architectures. Neural Comput. 2019, 31, 1235–1270. [Google Scholar] [CrossRef]
  40. Feng, Q.; Xia, Y.; Yao, W.; Lu, T.; Zhang, X. Malicious Relay Detection for Tor Network Using Hybrid Multi-Scale CNN-LSTM with Attention. In Proceedings of the 2023 IEEE Symposium on Computers and Communications (ISCC), Gammarth, Tunisia, 9–12 July 2023; IEEE: Piscataway, NJ, USA, 2023; pp. 1242–1247. [Google Scholar]
  41. Saha, B.; Goebel, K. Battery Data Set, NASA Ames Prognostics Data Repository. CA: Moffett Field, 2007. Available online: http://ti.arc.nasa.gov/tech/dash/pcoe/prognosticdatarepository/ (accessed on 6 December 2023).
  42. Severson, K.A.; Attia, P.M.; Jin, N.; Perkins, N.; Jiang, B.; Yang, Z.; Chen, M.H.; Aykol, M.; Herring, P.K.; Fraggedakis, D.; et al. Data-driven prediction of battery cycle life before capacity degradation. Nat. Energy 2019, 4, 383–391. [Google Scholar] [CrossRef]
  43. Li, X.; Lyu, M.; Li, K.; Gao, X.; Liu, C.; Zhang, Z. Lithium-ion battery state of health estimation based on multi-source health indicators extraction and sparse Bayesian learning. Energy 2023, 282, 128445. [Google Scholar] [CrossRef]
Figure 1. Structure of the temporal attention mechanism.
Figure 1. Structure of the temporal attention mechanism.
Electronics 12 04951 g001
Figure 2. Structure of the indirect battery capacity prediction model based on the time-attention mechanism.
Figure 2. Structure of the indirect battery capacity prediction model based on the time-attention mechanism.
Electronics 12 04951 g002
Figure 3. (a) Battery capacity degradation curves for the NASA dataset. (b) Battery capacity degradation curves for the MIT dataset. The different colored lines represent the change in discharge capacity of different batteries.
Figure 3. (a) Battery capacity degradation curves for the NASA dataset. (b) Battery capacity degradation curves for the MIT dataset. The different colored lines represent the change in discharge capacity of different batteries.
Electronics 12 04951 g003
Figure 4. (a,b) are the charging and discharging current curves for the NASA dataset. (c,d) are the charging and discharging voltage curves for the NASA dataset. (e,f) are the charging and discharging battery temperature curves for the NASA dataset.
Figure 4. (a,b) are the charging and discharging current curves for the NASA dataset. (c,d) are the charging and discharging voltage curves for the NASA dataset. (e,f) are the charging and discharging battery temperature curves for the NASA dataset.
Electronics 12 04951 g004
Figure 5. Framework of the indirect battery capacity prediction model based on the time-attention mechanism combined with feature extraction.
Figure 5. Framework of the indirect battery capacity prediction model based on the time-attention mechanism combined with feature extraction.
Electronics 12 04951 g005
Figure 6. Prediction plots for the five battery datasets. (a) is the prediction plot for the B_5 battery dataset. (b) is the prediction plot for the B_7 battery dataset. (c) is the prediction plot for the B_18 battery dataset. (d) is the prediction plot for the B_MIT battery dataset.
Figure 6. Prediction plots for the five battery datasets. (a) is the prediction plot for the B_5 battery dataset. (b) is the prediction plot for the B_7 battery dataset. (c) is the prediction plot for the B_18 battery dataset. (d) is the prediction plot for the B_MIT battery dataset.
Electronics 12 04951 g006
Figure 7. Combined prediction charts of the five models for the five battery datasets. (a) is the combined prediction chart of five network models for the B_5 battery dataset. (b) is the combined prediction chart of the five network models for the B_7 battery dataset. (c) is the combined prediction chart of five network models for the B_18 battery dataset. (d) is the combined prediction chart of five network models for the B_MIT battery dataset.
Figure 7. Combined prediction charts of the five models for the five battery datasets. (a) is the combined prediction chart of five network models for the B_5 battery dataset. (b) is the combined prediction chart of the five network models for the B_7 battery dataset. (c) is the combined prediction chart of five network models for the B_18 battery dataset. (d) is the combined prediction chart of five network models for the B_MIT battery dataset.
Electronics 12 04951 g007
Figure 8. Summarized error curve charts for the five battery datasets under the five network structures. (a) is the summary error curve chart for the B_5 battery dataset. (b) is the summary error curve chart of B_7 battery dataset. (c) is the summary error curve chart of B_18 battery dataset. (d) is the summary error curve chart of B_MIT battery dataset.
Figure 8. Summarized error curve charts for the five battery datasets under the five network structures. (a) is the summary error curve chart for the B_5 battery dataset. (b) is the summary error curve chart of B_7 battery dataset. (c) is the summary error curve chart of B_18 battery dataset. (d) is the summary error curve chart of B_MIT battery dataset.
Electronics 12 04951 g008
Figure 9. Summarized evaluation coefficient radar charts for the four battery datasets under the five network structures. (a) is the evaluation coefficient radar chart for the B_5 battery dataset. (b) is the evaluation coefficient radar chart for the B_7 battery dataset. (c) is the evaluation coefficient radar chart for the B_18 Battery dataset. (d) is the evaluation coefficient radar chart for the B_MIT Battery dataset.
Figure 9. Summarized evaluation coefficient radar charts for the four battery datasets under the five network structures. (a) is the evaluation coefficient radar chart for the B_5 battery dataset. (b) is the evaluation coefficient radar chart for the B_7 battery dataset. (c) is the evaluation coefficient radar chart for the B_18 Battery dataset. (d) is the evaluation coefficient radar chart for the B_MIT Battery dataset.
Electronics 12 04951 g009
Table 1. Summary of deep learning methods for battery capacity prediction.
Table 1. Summary of deep learning methods for battery capacity prediction.
MethodApplication in Battery PredictionAdvantagesDrawbacks
CNN-LSTM NetworkMultidimensional time series data processingEfficient in extracting spatial and temporal featuresMay struggle with long time series data
Graph Convolutional Networks + RNNModeling complex chemical and physical processesAccurate representation of battery processesHigh complexity, not suitable for real-time applications
Transformer Networks + Other NetworksHandling various battery prediction tasksParallel processing, attention mechanismsRequires a large amount of training data
Generative Adversarial Networks (GANs)Data augmentation for trainingImproves model’s generalization ability and prediction accuracyTraining instability issues
Hybrid Models and Integrated LearningEnhancing predictive accuracy and stabilityHigher predictive accuracy and stability
Table 2. Correlation analysis between different features and battery capacity for various batteries.
Table 2. Correlation analysis between different features and battery capacity for various batteries.
FeatureB_5 Correlation with CapacityB_7 Correlation with CapacityB_18 Correlation with CapacityB_MIT Correlation with Capacity
ETCV−0.9895−0.9869−0.9295−0.9603
tcc0.99550.99350.98890.9308
Tpeak_L0.99760.99920.99940.9798
ICP0.98800.98130.97890.9829
ICPL0.93600.86550.92280.9249
SampEn−0.9841−0.8260−0.9740−0.9753
Table 3. Description of the model structure.
Table 3. Description of the model structure.
Layer TypeUnits/ParametersDescription
Input Layer-Accepts fixed time-step multivariate time series data
Convolutional Layer64 filters, kernel size of 3Extracts local features from time series data
Max Pooling Layer-Reduces the spatial dimensions of the data
Dropout LayerDropout rate: 0.3Mitigates the phenomenon of overfitting
LSTM Layer50 units per layerCaptures long-term dependencies in the data
Time-Attention Mechanism4 heads, key dimension of 2Enhances the model’s ability to understand time series by processing information from different representation subspaces in parallel
LSTM Layer50 units per layerCaptures long-term dependencies in the data after processing by the time-attention mechanism
Dropout LayerDropout rate: 0.3Mitigates the phenomenon of overfitting
Output Layer-Produces the prediction results
Table 4. Performance metrics of the prediction model based on temporal attention mechanism on various batteries.
Table 4. Performance metrics of the prediction model based on temporal attention mechanism on various batteries.
BatteryMSE (%)RMSE (%)MAE (%)MAPE (%)MaxAE (%)
B_50.01261.12180.73650.55504.4539
B_70.01101.04740.74090.51373.9064
B_180.02641.62391.14830.82755.1729
B_MIT0.00550.74390.46160.50632.6950
The values are rounded to appropriate decimal points for better readability and expressed as percentages.
Table 5. Performance metrics of various models on selected batteries.
Table 5. Performance metrics of various models on selected batteries.
BatteryModelTest MSE (%)Test RMSE (%)Test MAE (%)Test MAPE (%)Test MaxAE (%)
B_5time_attention0.01261.12180.73650.55504.4539
cnn_lstm0.06202.48982.28611.74084.4446
cnn_lstm_trans0.38566.20945.82764.43209.4027
cnn0.09653.10602.87522.18945.4075
lstm0.20044.47624.32403.28516.5544
B_7time_attention0.01101.04740.74090.51373.9064
cnn_lstm0.07552.74772.49671.74784.7860
cnn_lstm_trans1.234811.112010.88697.593215.2542
cnn0.09093.01442.66731.86895.1959
lstm0.33585.79455.60413.91278.5977
B_18time_attention0.02641.62391.14830.82755.1729
cnn_lstm0.03091.75861.30340.93765.7559
cnn_lstm_trans0.10483.23722.77061.99686.7867
cnn0.02781.66840.94360.67486.0050
lstm0.08512.91732.69791.95385.3611
B_MITtime_attention0.00550.74390.46160.00512.6950
cnn_lstm0.03951.98731.48180.01614.9751
cnn_lstm_trans0.02401.54801.13480.01243.9657
cnn0.01381.17290.68520.00753.8693
lstm0.05342.31071.97830.02135.1158
The values are rounded to appropriate decimal points for better readability and expressed as percentages.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Chu, F.; Shan, C.; Guo, L. Temporal Attention Mechanism Based Indirect Battery Capacity Prediction Combined with Health Feature Extraction. Electronics 2023, 12, 4951. https://doi.org/10.3390/electronics12244951

AMA Style

Chu F, Shan C, Guo L. Temporal Attention Mechanism Based Indirect Battery Capacity Prediction Combined with Health Feature Extraction. Electronics. 2023; 12(24):4951. https://doi.org/10.3390/electronics12244951

Chicago/Turabian Style

Chu, Fanyuan, Ce Shan, and Lulu Guo. 2023. "Temporal Attention Mechanism Based Indirect Battery Capacity Prediction Combined with Health Feature Extraction" Electronics 12, no. 24: 4951. https://doi.org/10.3390/electronics12244951

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop