A Transformer-Based Model for State of Charge Estimation of Electric Vehicle Batteries
수소연료전지 · (5) 연료전지용 수분제어장치(가습기)
기본 정보
- 저자
- DOI
- 10.1109/access.2025.3542961
- 저널
- IEEE Access
- 발행년도
- 2025
- 발행기관
- Institute of Electrical and Electronics Engineers
- 피인용수
- 17
- 라이선스
- cc-by-nc-nd
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1109/access.2025.3542961
- 토픽
- Electric and Hybrid Vehicle Technologies
- OpenAlex ID
- W4407638328
평가 내용
- 관련도
- 사업분야
- 수소연료전지 · (5) 연료전지용 수분제어장치(가습기)
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '수소연료전지 > 연료전지용 수분제어장치(가습기)' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
본문 64,025자
본문 펼치기
섹션 본문 98문단 · 45,891자
(제목 없음)
1Batteries play a critical role in Electric Vehicle (EV) systems devices.The safety and performance of these applications rely on accurate Battery Management Systems (BMS) to monitor and optimize battery performance.Traditional BMS systems face challenges in charge prediction processes due to complex chemical processes and battery aging, leading to faults.The absence of a perfect sensor highlights limitations in measurement issues arising from external factors, especially sensor noise.Therefore, there is a need for algorithms that can solve the real-world battery charge prediction problem.This study compares an innovative solution, the Transformer model, with traditional Long Short-Term Memory (LSTM), Bidirectional LSTM (Bi-LSTM) models, and Support Vector Regression (SVR).This research aims to provide new perspectives on Battery State of Charge (SoC) predictions using NASA, BMW i3, Stanford University Battery Datasets, and real-world battery data obtained from L5 EV of the Musoshi brand collected for this work.This research's primary objective is to apply the Transformer model to real-world battery data, evaluating it as a significant step in EV range optimization and battery management.The Transformer model in the study achieved the best result with Root Mean Square Error (RMSE) value closest to 1 (∼0.99).INDEX TERMS Transformer, state of charge, electric vehicle, batteries.
I. INTRODUCTION
2Batteries are critical for various applications, including EVs and portable electronic devices.Monitoring and optimizing battery performance are essential for the safety and efficiency of these applications [1].BMS have become industry and academic research focal points [2].Predictions of battery health and SoC are essential in real-world applications, impacting EVs range optimization, battery lifespan extension, and energy management.
3However, traditional BMS systems have limitations due to the complicated chemical processes and battery aging.Dynamic chemical changes and battery component aging can introduce errors in charge prediction processes.Additionally, the absence of a perfect sensor capable of making exact measurements across all variables reveals the limitations of direct measurement methods.These limitations result from
4The associate editor coordinating the review of this manuscript and approving it for publication was Jenny Mahoney .measurement issues caused by external factors, such as sensor noise, which can cause misleading results.
5To deal with these challenges, researchers explore various approaches to increase battery health and SoC prediction accuracy.The primary goal is to make battery systems more reliable and efficient while extending battery lifespan.Therefore, data-driven modeling solutions are becoming more valuable, especially artificial intelligence and machine learning approaches that can learn from data and generalize unobservable factors.
6The Transformer model's capability to model time-series dependencies more effectively than traditional models aims to achieve more accurate SoC predictions.The self-attention mechanism, designed to adapt to instantaneous changes, enables the Transformer to handle sudden and real-time variations in battery dynamics.This feature can enhance the accuracy of SoC predictions under dynamic charge/discharge conditions.The ability of the Transformer model to capture the nonlinear patterns and temporal dependencies in battery charge/discharge cycles is one of its standout characteristics for SoC estimation.
7Moreover, the Transformer model offers an innovative solution to challenges where traditional methods fall short, such as sensor noise, dynamic chemical processes, and aging effects.Its superior accuracy in SoC prediction represents a significant innovation aimed at optimizing EV's range, charging efficiency, and battery life.To the best of our knowledge, this is the first study to apply the Transformer model in SoC estimation with real-world battery data, potentially setting a new standard in battery health monitoring.
8Various approaches have been proposed in the literature to enhance the accuracy of SoC and State of Health (SoH) estimation for lithium-ion batteries.Qian et al. [3] introduced a method combining dual Extended Kalman Filters (DEKF) with a PSO-based (Particle Swarm Optimization) Modified Gray Wolf Optimizer (MGWO) to achieve accurate SoC estimation.The study utilized a second-order equivalent circuit model, with battery parameters identified through battery testing.
9Another study by Qian et al. [4] proposed an approach to improve the accuracy of SoC/SoH estimation by employing DEKF optimized with a Modified Sine-Cosine Algorithm (MSCA).The second-order RC model was applied, and the model parameters were derived using Pulse Discharge and Open Circuit Voltage tests.MSCA optimized the model's parameters, ensuring better estimation accuracy.
10Additionally, Li et al., in their study [5], focused on SoH estimation and introduced a method based on Kernel Extreme Learning Machine (KELM) optimized with an Improved Bat Algorithm (IBA).Health indicators (HIs) were extracted from datasets, and redundancy among the HIs was reduced using Principal Component Analysis (PCA).The IBA was employed to optimize the kernel function parameters and regularization coefficients of the KELM, providing robust and accurate results.
11The study further enhances its findings' practical applicability and real-world relevance by using battery data collected from a Musoshi L5 EV.This approach addresses the increasingly critical issue of charge prediction as EV adoption grows.By incorporating real-world data, the study provides a more substantial contribution than research limited to simulations or small datasets.
12The research offers comprehensive insights by analyzing various models and datasets, enabling comparisons under different conditions.The Transformer model has been benchmarked against LSTM, Bi-LSTM, and SVR models using diverse datasets, including NASA, BMW i3, Stanford datasets, and real-world data from Musoshi L5 EV.This comprehensive evaluation highlights the model's advantages across various scenarios.
13In summary, the main contributions are following:
14• This study highlights the Transformer model's advantage in time series data analysis, particularly its ability to effectively model long-term dependencies and learn complex relationships.
15• Real-world battery data has been collected by driving the Musoshi brand L5 EV on a test track.In addition to this real-world study, commonly used battery datasets have also been utilized.It has been compared the Transformer model with traditional machine learning and deep learning algorithms to highlight the advantages of Transformer-based approaches.
16• In this context, research is represented the first utilization of the Transformer model for SoC prediction with real-world battery data according to the available literature.
17This paper is structured as follows: Section II reviews the literature review for batteries and transformer works.Section III details the proposed method and the datasets used in the study.Section IV presents the experimental studies and results.Finally, Section V discusses the results and provides suggestions for future research.
II. LITERATURE REVIEW
18Batteries are essential due to their high efficiency, lower volume, lightweight, temperature sensitivity, and maintenance advantages [1], [6].These advantages make batteries a promising technology for applications such as portable electronic devices, EVs, aviation systems, and power storage for renewable energy sources [7].BMS is critical in predicting the Remaining Useful Life (RUL) as they connect the battery and EVs.The main goals of BMS include preventing battery system damage, predicting and extending battery life, and maintaining the battery system in accurate and reliable operating conditions [8].BMS combines software algorithms, sensors, controllers, communication, and computing hardware [2].The Transformer, an innovative model, has been shown to significantly improve long-term and multivariate time series prediction [9].However, its self-attention mechanism comes with high computational complexity and memory requirements for modeling long sequences, making it challenging for such tasks.Various modifications and techniques have been proposed in the literature [10], [11], [12].For instance, adaptations like layer-wise adaptive significant batch optimization [13], distributed training [14], knowledge inheritance [15], progressive training [16], and techniques such as matching the parameters of smaller models to initialize larger models [17] have been suggested to overcome these challenges.
19The Transformer architecture can deliver high-quality results in detecting anomalies within time series data.In various studies, Transformer has been combined with neural generative models like Variational Autoencoder (VAE) to enhance performance in anomaly detection.Multivariate time series VAE (MT-RVAE) [18] and TransAnomaly [19] have employed a combination of VAE and Transformer for anomaly detection.Graph Structures with Transformer Multivariate Time Series Anomaly Detection (GTA) also integrates the Transformer with a graph-based learning architecture for multivariate anomaly detection [20].These studies highlight various applications of Transformers in anomaly detection tasks.Moreover, Gated Transformer Networks (GTN) achieved multivariate time series classification by employing a two-towered Transformer, focusing on temporal and channel-based attention over time steps [21].Rußwurm and Korner [22] demonstrated that Transformer outperforms recurrent and convolutional neural networks for raw optical satellite time series classification.
20Transformer models have increased interest in time series modeling due to the success demonstrated in natural language processing and computer vision, attributed to the effectiveness of the multi-head self-attention mechanism [23].Various Transformer variants have been introduced to time series models, incorporating different time series features for performance or efficiency enhancements and using time series decomposition strategies.For instance, Autoformer includes normalization and seasonal-trend decomposition methods [24].FEDformer, on the other hand, proposes a mixture of expert strategies for extracting trend components with various kernel sizes [12].
21In the study by Vaswani et al. [25], the Transformer network architecture was introduced, designed solely based on attention mechanisms, eliminating the need for recurrent and convolutional layers.Experiments demonstrated the superior quality of this new model and its ability to require less time for training when parallelized.The research also showcased the successful generalization of the Transformer model to different tasks, such as the English constituency parsing task, even with large and limited training data.The research has made significant progress by presenting a more practical approach, replacing complex models relying on recurrence and convolution.
22In the study by Wu et al. [26], an enhanced approach to time series prediction was developed, building upon the Transformer architecture.This approach learns dependencies within the data by processing the entire data sequence rather than sequentially.Consequently, Transformer models can potentially model the complex dynamics of time series data.The study demonstrated the applicability of the Transformer model in time series prediction tasks by addressing ILI (Influenza-Like Illness) forecasting.Apart from researchers proposing their unique mathematical models, the most commonly encountered model-based methods are the Kalman Filter (KF) and Extended Kalman Filter (EKF).In Plett's [27] study, an Extended Kalman Filter (EKF) algorithm is used for SoC estimation in BMS for hybrid EVs.The study suggests that BMS can predict parameters indicating the health status of the battery system, such as battery charge status, instantaneously available power, power fade, and capacity fade.It can adapt to cell characteristics over time.The Kalman Filter (KF) is considered an optimal state predictor and is used for linear systems with the described assumptions.For nonlinear situations, a time-variant approach is employed to linearize the system for use in KF.The authors model the approximated system using KF and the actual nonlinear system using EKF.Koohfar et al., in their study [28], the authors applied Transformer models to predict EV charging demand, addressing both short-term and long-term forecasting.Their findings showed that the Transformer outperformed traditional methods like ARIMA and SARIMA and deep learning models such as LSTM, demonstrating its effectiveness for time-series problems and its potential for efficient electricity grid management.
23Time series decomposition is a crucial preprocessing Time Series Forecasting (TSF) [29].Transformers revolutionized deep learning with the multi-head self-attention mechanism, enabling exceptional modeling of semantic relationships in long sequences.Transformers are particularly advantageous due to their multi-head self-attention mechanism, which captures long-term dependencies and intricate patterns in time-series data.This situation is particularly beneficial for load forecasting and anomaly detection tasks, where traditional methods like SVR and recurrent architectures such as LSTM and Bi-LSTM often encounter limitations in handling longer sequences or complex temporal relationships.
24Moreover, recent advancements inspired by the Transformer architecture, such as the ProbSparse mechanism in Informer and the seasonal-trend decomposition approach in Autoformer, have significantly improved its computational efficiency and scalability for long-sequence data [30].These innovations address the high computational costs traditionally associated with Transformers, making them more accessible and efficient for large-scale time-series applications.
25Additionally, the Transformer model demonstrates a remarkable ability to generalize across different domains and datasets, which is a critical advantage for time-series problems involving diverse data sources.Its inherent parallelization capabilities also allow for faster training and inference than sequential models, further establishing it as a transformative solution for time-series prediction.
26Regarding data-driven methods, Rezvani et al. [31] developed Prognostics and Health Management (PHM) using two models: Adaptive Neural Networks (AdNN) and Linear Prediction Error Methods (L-PEM), capable of predicting SoH and RUL of Li-ion battery cells.The AdNN technique involves multiplying inputs by weights and then representing an artificial neuron's activation through a mathematical function.By combining artificial neurons, the authors use artificial neural networks to find relationships between inputs and outputs.
27Dong et al.'s [32] study presents a probabilistic method for modeling battery degradation and health prediction using a Dynamic Bayesian Network (DBN).They develop a feature by combining Incremental Capacity Analysis (ICA) of Constant Current (CC) charge and the time constant of Constant Voltage (CV) charge to characterize the degradation dynamics of the battery in the absence of some CC or CV charge information.Similarly, Hu et al.'s [33] study uses a Sparse Bayesian Predictive Modeling (SBPM) methodology for battery SoH indication and prognosis in EVs.The approach extracts accurate and flexible predictions using a nonlinear model with a few automatically selected essential functions.
28Hemdani et al. [34] use a Levenberg-Marquardt Backpropagation Neural Network (LM-BPNN), a type of AdNN algorithm, to predict RUL and aging rate in a Lithium-Ferrous-Phosphate (LFP) battery used in EVs.In He et al.'s [35] study, a method based on Kalman filtering is proposed for self-adjusting model parameters and providing SoC predictions.The performance of the proposed method is demonstrated using data collected from LiFePO4 batteries converted with two dynamic discharge profiles.In Yayan et al.'s [36] study, SoH is predicted using data collected during the battery charging.The study predicts battery SoH during fast charging using a proposed deep neural network structure, LSTM Bi-LSTM.LSTM, although similar to Recurrent Neural Network (RNN), is more effective at utilizing past data and maintaining long-term dependencies, making it an ideal tool for prediction and classification processes in time series, resolving the vanishing gradient problem in such scenarios.
III. METHODOLOGY
29This section provides an exposition of the methods employed in battery SoC estimation.
A. MODEL SELECTION AND ARCHITECTURE
30This section explains various artificial intelligence methods employed in SoC prediction, including the Transformer model and traditional LSTM, Bi-LSTM models, and SVR.Furthermore, datasets created with real-world battery data provided by the Musoshi brand L5 EV and NASA, BMW i3, and Stanford University Battery Datasets have been examined.The details of these models will be provided in the following sections.
1) TRANSFORMER MODEL
31The method utilized is the Transformer model [26], as depicted in Figure 1, consisting of encoder and decoder layers.The Encoder employs the input layer to transform input data.Positional encoding with sinusoidal and cosine functions is added to encode sequential information.Following this process, four encoder layers come into play, each comprising multi-head self-attention and feed-forward sublayers.These encoders generate a vector of size d model .The size d model refers to the dimensionality of the vector space in which the Transformer model operates.A hyperparameter determines the size of the hidden representations and embeddings within the model.The Decoder starts with the input layer and utilizes the data from the Encoder.It transforms input data into a vector of size d model .Each decoder layer includes multi-head self-attention mechanisms and feedforward sub-layers.
32Additionally, the Decoder applies self-attention to the encoder output.The output layer aligns predictions with the target time series.Predictions rely on previous data points and utilize self-attention mechanisms with positional offsets.Each encoder layer consists of self-attention, add & normalize, and feed-forward sublayers, with positional encoding applied to the input.The decoder layers incorporate an additional encoder-decoder attention mechanism to facilitate input and output sequence interaction.This architecture enables efficient processing and contextual understanding of sequential data.
33The Encoder in the Transformer architecture consists of a stack of identical layers.Each layer contains two sub-layers: the first is a multi-head self-attention mechanism, and the second is a simple feed-forward neural network.A residual connection is applied around each sub-layer, followed by layer normalization.To enable residual connections, all sub-layers in the model, as well as the embedding layers, generate outputs with a fixed dimension of d model .
34Similarly, the Decoder comprises a stack of identical layers.Each layer in the Decoder includes two sub-layers similar to those in the Encoder.A third sub-layer is introduced, which performs multi-head attention over the Encoder's output.As in the Encoder, residual connections are applied around each sub-layer, followed by layer normalization.
35The Transformer model eliminates recurrence and convolution, relying instead on positional encoding to capture sequential information in the data.The positional encodings share the same dimensionality (d model ) as the embeddings, allowing them to be summed.The positional encoding is computed using the following sine and cosine functions as shown in Equations 1 and 2 [25]:
36where pos represents the position, i denotes the dimension, and d model corresponds to the model dimension.Each dimension of the positional encoding is represented by a sinusoidal function, where the wavelengths follow a geometric progression ranging from 2π to 10,000• 2π.
37The Feed-Forward Network (FFN) within the Transformer consists of two linear transformations, with a rectified linear unit (ReLU) activation function applied between them.This simple yet effective architecture contributes significantly to the model's expressive power.FFN function is shown in Equation 3 [25].
38let H 0 denote the output of the preceding layer, while Residual connections link each preceding layer's output to the subsequent layer's input.These connections are followed by layer normalization, which is critical in stabilizing the training process and improving convergence.Normalization functions are shown in Equations 4 and 5 [25].
39here SelfAttention is the self-attention module, LayerNorm is the layer normalization operation, and X is input to the layer.
40The core innovation of the Transformer architecture lies in its self-attention mechanism, embedded within the multihead self-attention layers.This mechanism enables the model to evaluate the relative importance of different input tokens during prediction.Unlike traditional approaches that rely on fixed-size context windows, the self-attention mechanism simultaneously considers the relationships between all input tokens.
41The Transformer employs the Query-Key-Value framework to compute scaled dot-product attention, defined as Equation 6 [25].
42here, the queries Q ∈ R l q ×d k , keys K ∈ R l k ×d k , and values V∈ R l k ×d v represent the core components of the self-attention mechanism.l q and l k denote the lengths of the queries and keys (or values), respectively, while d k and d v represent the dimensions of the keys (or queries) and values.
43The input values are weighted by these attention scores before being passed through multiple layers of Transformer encoder blocks.The attention-weighted output vectors are processed through a fully connected feed-forward network to generate the final predictions.
44The outputs of multiple attention heads operating in parallel are concatenated to produce the final output values of the multi-head attention mechanism, defined as Equation 7 [25].
45This study employs a state-of-the-art Transformer deep learning architecture for SoC prediction.The Transformer is renowned for effectively modeling sequential data, making it suitable for time series forecasting tasks.The Transformer model is customized during configuration to fit the dataset and specific requirements.This customization involves configuring the model's architecture, the number of layers, attention mechanisms, and embedding dimensions to adapt to the dataset and cater to specific needs.
46Hyperparameter optimization is a critical step in enhancing the performance of the Transformer model.In this study, the Transformer architecture was customized to adapt to the dataset and meet specific requirements.The adjustments encompassed various hyperparameters, including the number of layers, attention mechanisms, and embedding dimensions.
2) LSTM
47LSTM, a type of RNN, is a model that utilizes past data and can maintain long-term dependencies within this data [36].LSTM is widely employed for classifying and predicting time series data.An LSTM cell comprises a forget, input, and output gate.The internal structure of an LSTM unit consists of a forget gate, an input gate, and an output gate.The LSTM structure is depicted in Equation 8 [36].
48At time step t, F t represents the forget gate, I t is the input gate, Ct the candidate memory cell, C t the memory cell, O t the output gate, H t the hidden state, and X t the input.The hidden state from the previous time step is denoted as H t−1 .
49The weight parameters are defined as W xi , W xf , W xo , and W xc for the input, and W hi , W hf , W ho , and W hc for the hidden state.σ is the gate activation function, typically the sigmoid function, and tanh refers to the hyperbolic tangent function.
3) BI-LSTM
50A Bi-LSTM unit consists of two LSTM units.In the training of Bi-LSTM, the data is fed forward once from beginning to end and then backward from end to beginning.It generally learns more quickly than a one-directional approach.The critical distinction between LSTM and Bi-LSTM lies in the bidirectional operation of Bi-LSTM.One LSTM unit moves forward with past data, while the other moves backward with future data.The structure of Bi-LSTM, including the output of the hidden unit, as described in Equation 9 [36], provides a robust framework for sequential data processing.
514) SVR SVR is a machine-learning method for solving regression problems [37].It proves helpful in modeling complex relationships between data points when working with highdimensional data.Instead of drawing a regression line, SVR aims to position data points within a margin.This margin represents the distance between the regression line and the data points.The goal is to maximize this margin as much as possible.SVR also employs ''support vectors'' for regression problems.These data points closest to the regression line are critical in margin calculation.SVR can handle linear and nonlinear regression problems and uses kernel functions for nonlinear problems.These functions transform the data into high-dimensional spaces, creating complex regression curves.An essential parameter in SVR is known as ''epsilon.''This parameter controls how many error data points can be made within or outside the margin.The epsilon value determines the flexibility or rigidity of the model.SVR possesses generalization capabilities for new data, helping mitigate overfitting tendencies.This model enhances the model's ability to align predictions with real-world data.
B. EXPERIMENTAL DATASETS
52Results have been obtained using an EV dataset gathered from Musoshi Company.Standard datasets have also been used which often used in the literature, including NASA [38], Stanford [39], and BMW i3 [40].
53In the Musoshi EV Dataset, a three-wheeled Pop-Up small vehicle produced by the Musoshi Company is loaded with a total weight of 1100 kg.On the designated course, the car finished two circuits.The road map and SoC change chart are shown in Figure 2. Around 49 minutes are needed for the car to finish one lap.The car had a full charge when it began the first lap and an 80% charge when it began the second.A total of 194 data features, including instantaneous current, temperature, and voltage values, were collected from the vehicle's BMS systems.The Musoshi dataset fields are presented in Table 1.
54The NASA Ames Prognostics Center of Excellence (PCoE) has developed a dedicated battery prognostic test platform where the NASA Li-ion Battery Aging Dataset Portal (2023) has been collected [38].At different temperatures, li-ion batteries were run using three distinct operating profiles (charge, discharge, and Electrochemical Impedance Spectroscopy).Various current levels were used for discharges until the battery voltage hit certain thresholds.To cause deep discharge aging effects, several of these thresholds are lower than the OEM-recommended value of 2.7 V. Battery aging was shown to be accelerated by repeated cycles of charging and discharging, and the trials were stopped after the battery's capacity dropped by 30% (from 2 Ah to 1.4 Ah).The information has been prepared for training purposes.Both software and hardware are included in the Stanford Battery Dataset [39].The Arbin measurement system and Arbin Instruments LBT21024 have been used on the hardware side.This system used an Omega T-type thermocouple sensor and the IncuMax IC-500R thermal chamber from Arbin Instruments LBT21024.Additionally, Data Watcher and MITS Pro were used on the software side.
55A comprehensive vehicle model that includes the engine system and the heating circuit was validated using the BMW i3 Battery Dataset, comprising 72 authentic driving trips recorded with the BMW i3 (60 Ah) [40].
C. TRAINING AND EVALUATION
56The dataset has been partitioned into training and test sets to facilitate model training and evaluation.Different dataset subsets have been utilized for training and testing to prevent overfitting.Transformer and other models have been trained to learn complex relationships and patterns within the dataset.Appropriate loss functions and optimization techniques have been employed to enhance the model.The model's performance was assessed on the validation set, which monitored training progress and adjusted hyperparameters.Finally, the model test set has been evaluated, and its generalization ability and SoC prediction ranking for EVs have been assessed and compared with other deep learning and machine options methods.
1) IMPLEMENTATION DETAILS
57The hyperparameter optimization process played a crucial role in enhancing the performance of the Transformer model.The number of encoder and decoder layers and the embedding dimensions were tested across various configurations to achieve an optimal balance between accuracy and computational cost.The multi-head self-attention mechanism, a core component of the Transformer, was also carefully fine-tuned by evaluating different numbers of attention heads.While increasing the number of heads improved feature representation, it also introduced higher computational costs, necessitating a trade-off for optimal performance.The Adam optimizer was employed for weight optimization, with the learning rate adjusted through iterative trials.Advanced techniques like cosine annealing, which progressively reduces the learning rate over time, were also explored to boost model efficiency.
58Additionally, various dropout rates were tested to mitigate overfitting, and their impact on the model's overall performance was assessed.The hyperparameter search process, which included random and grid search methods, was systematically carried out to identify the best combination of parameters.Each configuration was evaluated using error metrics such as Mean Absolute Error (MAE), RMSE, and R-squared (R 2 ) on the validation dataset.This meticulous optimization process significantly improved the model's performance, showcasing the Transformer's exceptional ability to handle complex tasks like SoC estimation when tailored to a specific problem domain.
59The hyperparameters used in this study are as follows:
60The model's dimensionality (d model ) and embedding dimension have been set to 64.The number of attention heads in the multi-head attention mechanism has been configured to 4. The FFN dimensionality has been specified as 128.Training has been conducted 100 epochs.The Adam optimizer has been employed, with the Mean Squared Error (MSE) loss function used for optimization.The activation function utilized has been ReLU.A dropout rate of 0.1 has been applied to prevent overfitting.The batch size for training has been set to 64.Layer normalization has been implemented with an epsilon value of 1 × 10−6.
IV. RESULTS AND DISCUSSION
61The study delves into three key aspects: Performance Metrics, where measures such as MAE, RMSE, R 2 , and Max Error gauge the accuracy of SoC predictions; Comparison, involving the evaluation of the Transformer model against SVR, LSTM, and Bi-LSTM, with a particular emphasis on highlighting the Transformer's advantages; and Interpretability, where model interpretability techniques are employed to understand the prediction mechanism of the Transformer model and identify pivotal features for effective SoC prediction.The testing phase involves all four models across four datasets, with subsequent individual explanations of each model and a comprehensive matrix presentation for overall interpretation.
A. TRANSFORMER RESULTS
62The Transformer model is a deep learning architecture specifically used for Natural Language Processing (NLP) and sequential data analysis.The Transformer model is robust in processing time series data, predicting sequential data, and capturing the complexity of features.Therefore, using it for battery SoC prediction is suitable for achieving accurate and effective results.In this study, the Transformer model has been employed to predict battery SoC using time series data.
63The input data includes various features such as current, voltage, temperature, and velocity.Each feature is used to describe the state of a data point.These features are combined to create an input tensor.The Transformer model is utilized to process these input data.The model incorporates a complex internal mechanism to correlate features, understand temporal context, and predict future values.The Transformer model is highly effective in capturing relationships between data points, making it a preferred choice, especially when working with sequential data.
64The Transformer model is trained to predict SoC using battery data.This model involves determining relationships between data points and adjusting weights.Training occurs by minimizing the MSE loss function, measuring how close the predictions are to the actual SoC values.After completing the training, the model's performance is evaluated using test data.Metrics such as R 2 value, MAE, and RMSE are used to measure the accuracy and consistency of predictions.The performance of the Transformer model in predicting the SoC is evaluated using various battery datasets, as shown in Figure 3.
B. LSTM RESULTS
65A deep learning model based on LSTM has been trained using time series data for SoC prediction, and its performance has been assessed.The input layer includes five features utilized to support SoC prediction.Results have been visualized, and the model's success has been measured using specific error metrics.
66The datasets have been refined to include only the relevant features for training and testing and CSV files have been generated accordingly.These features include battery voltage, battery current, battery temperature, current load, voltage load, motor torque, and velocity.
67Data has been read from a CSV file and normalized using Min-Max scaling.The data has then been restructured into input features and target variables.
C. BI-LSTM RESULTS
68The Bi-LSTM automates an artificial intelligence model's training and testing processes for predicting batteries' SoC.This method allows for effective monitoring and management of batteries.The prediction steps are as follows.
69The datasets, intended for time series forecasting, are transformed into a shape that includes data from the t-1 time step to the t-time step for the t prediction, and rows with NaN
D. SVR RESULTS
70Another approach involves using the SVR model to predict the SoC of the battery based on input data.The model's performance is evaluated by comparing the predicted SoC values with the actual values, and the results are visualized with graphs.Such a model is an essential tool for monitoring and managing the state of batteries.
71A model utilizing the SVR algorithm to predict SoC using battery data is created and evaluated.The prediction process begins with data preprocessing.The data is read from a CSV file containing time, voltage, current, and SoC (estimated).Input (dataInput) and output (dataOutput) data are separated.The dataset is then split into training and test data.The training data will be used for the model's training, while the test data will be used to evaluate the model's performance.The input data is scaled using Min-Max scaling to compress the data into a specific range.
72An SVR model for regression is created.This model predicts SoC using the data.The model utilizes a 'linear' kernel and sets the C parameter to 10. Predictions are made, and after comparing them with the actual SoC values, the model's performance metrics are calculated, including R 2 , MAE, and RMSE.
E. COMPARISON RESULTS
73In this study on battery charge prediction, the loss functions for the Transformer, LSTM, and Bi-LSTM models of the Musoshi dataset are shown in Figure 6.This model has no graph since SVR does not have a loss function.Overfitting or underfitting was not experienced; the optimal results remained consistent.) also shows stable learning, with consistent validation loss and no indication of overfitting.However, its loss values are slightly higher than the Transformer model's, suggesting somewhat less accurate predictions.Bi-LSTM (Figure 6(c)) is similar to LSTM, as the Bi-LSTM model exhibits stable convergence with no significant gap between training and validation losses.Its loss is slightly higher than that of the Transformer model but comparable to that of LSTM, making it a strong alternative.
74The SoC prediction performance of four different models on the Musoshi battery dataset has been comparatively analyzed, and the results have been presented in a single view in Figure 7.This comparison allows for a visual assessment of the performance differences between the models.
75The Transformer (Figure 7(a)) closely tracks the ground truth curve, demonstrating exceptional accuracy and minimal deviation throughout the series.Its robust performance is particularly evident in dynamic regions with sharp transitions, where it maintains high fidelity.LSTM (Figure 7 When evaluating all the results, the data in Table 2 present battery SoC prediction performance of four different models (LSTM, Bi-LSTM, SVR, and Transformer) on four distinct battery datasets (NASA, Stanford, BMW i3, and L5).The interpretations of the results according to the datasets are as follows: for the NASA dataset, LSTM and Bi-LSTM models can make highly accurate predictions with significantly low RMSE values (1.716 and 2.226, respectively).The high R 2 score of 0.998 indicates that the predictions closely align with the data.In contrast, the SVR model is less successful, with a considerably high RMSE (16.662) and a low R 2 score (0.361) compared to other models.For all datasets, the Transformer model consistently achieves the lowest Max Error, indicating its robustness in minimizing extreme deviations.SVR exhibits the highest Max Error across all datasets, demonstrating weaker performance in handling outliers.Among LSTM and Bi-LSTM, performance is dataset-dependent, but they generally perform better than SVR and close to the Transformer in some cases.
76One of the key challenges in the practical application of Transformer models lies in their computational cost and memory requirements.The use of multi-head attention mechanisms in both the encoder and decoder layers leads to significant memory consumption and computational complexity.This can pose difficulties when deploying such models on resource-constrained devices, such as embedded systems.
77Another challenge is the hardware resources needed to efficiently train Transformer models on large datasets.For less powerful systems, this can become a limiting factor.
78In terms of scalability, while Transformer models have the potential to improve accuracy with larger datasets, their training times can increase substantially.To mitigate this issue, future work could explore the integration of sparse attention mechanisms or efficient model architectures, such as Informer, to enhance scalability and reduce training time.Field implementation studies in this area are also actively progressing in the literature, further highlighting the potential for real-world applications.
V. CONCLUSION
79This study demonstrates the remarkable effectiveness of the Transformer model for SoC prediction across various datasets, consistently achieving high accuracy with low RMSE values and high R 2 scores.The results highlight the superior performance of the Transformer model, particularly in capturing nonlinear patterns and temporal dependencies, which are critical for accurate SoC estimation.While the Bi-LSTM model also performs well in specific datasets, the SVR model shows comparatively lower predictive accuracy.
80The findings underline the importance of model selection based on dataset characteristics and application requirements.Its successful application in SoC prediction has significant implications for battery management systems, including improving vehicle range, extending battery lifespan, and optimizing performance under dynamic conditions.
81The broader impact of this work lies in its potential to enable the design of more intelligent, more reliable battery management systems.These systems can contribute to industrial efficiency by optimizing energy use, enhancing production processes, and supporting sustainable energy practices.
82This study highlights the transformative potential of the Transformer model in SoC estimation.Leveraging its ability to capture complex nonlinear patterns and temporal dependencies, the Transformer model demonstrated exceptional accuracy across diverse datasets, establishing itself as a significant advancement in battery management systems.These findings suggest promising applications in key areas, such as extending EV range, prolonging battery life, and optimizing performance under dynamic conditions.
83However, the study also identifies opportunities for improvement.While the Transformer model exhibited superior performance, further work is needed to enhance its adaptability for real-time applications and ensure it remains effective in resource-limited environments such as embedded systems.Future research could explore integrating sparse attention mechanisms or model compression techniques to make the Transformer model more lightweight.Additionally, incorporating domain-specific features or hybrid modeling approaches could be considered to enhance prediction accuracy further.
84Addressing these aspects will contribute to the existing body of knowledge and pave the way for future advancements in battery charge estimation algorithms, offering significant opportunities for sustainable energy applications and industrial efficiency.
85Future research directions include addressing the limitations of this study, such as data accessibility and computational requirements, while further refining the Transformer model for real-time applications.Expanding the analysis to more extensive and diverse datasets will provide deeper insights into its robustness and adaptability in practical scenarios.This study establishes a foundation for advancing EV battery management, positioning the Transformer model as a promising tool for addressing modern energy challenges.
FIGURE 1 .
86FIGURE 1.The architecture of the Transformer model.The figure illustrates the core components of the Transformer, including the encoder and decoder blocks [26].
87b f , b i , b c , and b o are additional input parameters representing bias vectors.
FIGURE 2 .
88FIGURE 2. The Musoshi vehicle routes for Tour 1 and Tour 2 are shown on the map, highlighting the roads traversed during the experiments.The corresponding SoC profiles for each tour are plotted against the distance traveled (in kilometers).The blue line represents the SoC profile for Tour 1, while the orange line corresponds to Tour 2. The shaded regions in the SoC plot indicate sections of the route where significant changes in energy consumption were observed, potentially due to road conditions, traffic, or variations in driving patterns.
89Training and test datasets have been separated.For example, in NASA battery dataset B005 battery data used for model training and B006 battery data used for testing.An LSTM-based deep learning model has been constructed, including an input layer (5 features: voltage measured, current measured, temperature measured, current load, voltage load), an LSTM layer, and an output layer.The model has been compiled and trained.Using training data, the model learned from time series data and made predictions.The training process results have been plotted, illustrating how the model's loss function has changed.The model has made predictions on the training data compared with actual data.The RMSE has been computed for the training data.The exact process for the test data was repeated, and RMSE was calculated.Additionally, MAE and R 2 scores have been computed to assess the accuracy of the model's predictions.Finally, a graph depicting the model's predictions and actual data has been plotted, as shown in Figure 4.The charts highlight the consistency of predictions and any deviations, thereby showcasing the model's robustness.
FIGURE 3 .
90FIGURE 3. Results of the Transformer model for SoC prediction across battery datasets (a) Musoshi (b) NASA (c) Stanford (d) BMW i3.
FIGURE 4 .
91FIGURE 4. Results of the LSTM model for SoC prediction across battery datasets (a) Musoshi (b) NASA (c) Stanford (d) BMW i3.
FIGURE 5 .
92FIGURE 5. Results of the Bi-LSTM model for SoC prediction across battery datasets (a) Musoshi (b) NASA (c) Stanford (d) BMW i3.
93(b)) also performs well, with predictions closely aligned with the ground truth.However, minor deviations are observed in specific segments, indicating slightly reduced accuracy compared to the Transformer.Bi-LSTM (Figure 7(c)) achieves predictions similar to LSTM, with strong alignment to the ground truth.It slightly underperforms the Transformer model, particularly in regions with abrupt changes, where minor discrepancies are visible.The results demonstrate each model's predictive accuracy and alignment with the actual SoC values across the time series.The Transformer model consistently outperforms the other models in terms of both training efficiency and prediction accuracy.LSTM and Bi-LSTM models provide competitive results, while the SVR model lags significantly behind.All deep learning models (Transformer, LSTM, and Bi-LSTM) exhibit excellent generalization, as indicated by their consistent validation losses and close alignment with the ground truth.
FIGURE 6 .
94FIGURE 6. Model loss results for the Musoshi battery dataset.The subplots illustrate the loss and validation loss curves for (a) Transformer, (b) LSTM, and (c) Bi-LSTM models over 100 epochs.These curves indicate each model's convergence behavior and generalization capabilities during training.
FIGURE 7 .
95FIGURE 7. Compression test results for SoC prediction on the Musoshi battery dataset.The subplots compare the actual SoC values (Grand Truth) with the model-estimated values for (a) Transformer, (b) LSTM, and (c) Bi-LSTM models.
96and b 2 ∈ R d model bias vectors represent trainable parameters.The input and output dimensionality are d model , whereas the inner layer has a dimensionality of d f .
TABLE 1 .
97Musoshi battery dataset.
TABLE 2 .
98Comparison of results.
참고문헌 27건
- Battery Health Management System for Automotive Applications: A retroactivity-based aging propagation study 2022 American Control Conference (ACC) · 2015 10.1109/acc.2015.7170817
- State of charge estimation for electric vehicle batteries under an adaptive filtering framework 2012 10.1109/phm.2012.6228849
- A Comparative Analysis of Techniques for Electric Vehicle Battery Prognostics and Health Management (PHM) SAE technical papers on CD-ROM/SAE technical paper series · 2011 10.4271/2011-01-2247
- Extended Kalman filtering for battery management systems of LiPB-based HEV battery packs Journal of Power Sources · Elsevier BV · 2004 10.1016/j.jpowsour.2004.02.031
- Battery Management System—Balancing Modularization Based on a Single Switched Capacitor and Bi-Directional DC/DC Converter with the Auxiliary Battery Energies · Multidisciplinary Digital Publishing Institute · 2014 10.3390/en7052897
- Support Vector Regression Apress eBooks · 2015 10.1007/978-1-4302-5990-9_4
- Battery Health Prognosis for Electric Vehicles Using Sample Entropy and Sparse Bayesian Predictive Modeling IEEE Transactions on Industrial Electronics · Institute of Electrical and Electronics Engineers · 2015 10.1109/tie.2015.2461523
- Modeling stationary lithium-ion batteries for optimization and predictive control 2017 10.1109/peci.2017.7935755
- Self-attention for raw optical Satellite Time Series Classification ISPRS Journal of Photogrammetry and Remote Sensing · Elsevier BV · 2020 10.1016/j.isprsjprs.2020.06.006
- Dynamic Bayesian Network-Based Lithium-Ion Battery Health Prognosis for Electric Vehicles IEEE Transactions on Industrial Electronics · Institute of Electrical and Electronics Engineers · 2020 10.1109/tie.2020.3034855
- Experimental data of lithium-ion batteries under galvanostatic discharge tests at different rates and temperatures of operation Data in Brief · Elsevier BV · 2021 10.1016/j.dib.2021.106894
- A Novel Method for SoH Prediction of Batteries Based on Stacked LSTM with Quick Charge Data Applied Artificial Intelligence · Taylor & Francis · 2021 10.1080/08839514.2021.1901033
- Learning Graph Structures with Transformer for Multivariate Time Series Anomaly Detection in IoT arXiv (Cornell University) · Cornell University · 2021 10.1109/jiot.2021.3100509
- Prediction of aging of battery for electric vehicles based on a modified version of neural networks 2022 30th Mediterranean Conference on Control and Automation (MED) · 2021 10.1109/med51440.2021.9480161
- Modified dual extended Kalman filters for SOC estimation and online parameter identification of lithium-ion battery via modified gray wolf optimizer Proceedings of the Institution of Mechanical Engineers Part D Journal of Automobile Engineering · SAGE Publishing · 2021 10.1177/09544070211046693
- Hybrid optimization strategy for lithium-ion battery's State of Charge/Health using joint of dual Kalman filter and Modified Sine-cosine Algorithm Journal of Energy Storage · Elsevier BV · 2021 10.1016/j.est.2021.103319
- Unsupervised Anomaly Detection in Multivariate Time Series through Transformer-based Variational Autoencoder 2021 10.1109/ccdc52312.2021.9601669
- Variational transformer-based anomaly detection approach for multivariate time series Measurement · Elsevier BV · 2022 10.1016/j.measurement.2022.110791
- Learning to Rotate Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining · 2022 10.1145/3534678.3539234
- Automated Progressive Learning for Efficient Training of Vision Transformers 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · 2022 10.1109/cvpr52688.2022.01216
- Prediction of Electric Vehicles Charging Demand: A Transformer-Based Deep Learning Approach Sustainability · Multidisciplinary Digital Publishing Institute · 2023 10.3390/su15032105
- Are Transformers Effective for Time Series Forecasting? Proceedings of the AAAI Conference on Artificial Intelligence · Association for the Advancement of Artificial Intelligence · 2023 10.1609/aaai.v37i9.26317
- Transformers in Time-Series Analysis: A Tutorial Circuits Systems and Signal Processing · Birkhäuser · 2023 10.1007/s00034-023-02454-8
- Transformers in Time Series: A Survey 2023 10.24963/ijcai.2023/759
- State of health estimation for lithium-ion batteries based on improved bat algorithm optimization kernel extreme learning machine Journal of Energy Storage · Elsevier BV · 2024 10.1016/j.est.2024.113756
- Transformer Models for EV Charging Demand Forecasting: Comparing Attention Mechanisms 2024 10.1109/mscc62288.2024.10697066
- Pyraformer: Low-Complexity Pyramidal Attention for Long-Range Time Series Modeling and Forecasting reposiTUm (TU Wien) · TU Wien · 2022 10.34726/2945