Skip to main content
Frontiers in Artificial Intelligence logoLink to Frontiers in Artificial Intelligence
. 2026 Sep 10;9:1924449. doi: 10.3389/frai.2026.1924449

NBE-VLT-PFO: hybrid deep learning transformer architecture for joint estimation of lithium-ion batteries

G Tamizharasi 1, G K Rajini 1,*
PMCID: PMC13601255  PMID: 42787361

Abstract

Lithium-ion batteries are utilized in electric vehicles (EVs), and accurate predictions of battery state of charge (SOC), state of health (SOH), and remaining useful life (RUL) are needed to ensure reliability, security, and durability of these batteries. This study provides a hybrid deep learning (DL) system, termed as Neural Basis Expansion Variational Ladder Transformer (NBE-VLT), integrating Polar Fox Optimization (PFO) for effective global hyperparameter tuning to produce accurate SOC, SOH, and RUL predictions from raw battery cycle data. The preprocessed battery cycle data were sent through a series of steps before the analysis to increase data features and reliability; these steps involved removing outliers, encoding features, normalizing the data, and aligning time. The Neural Basis Expansion (NBE) layer decomposes the battery's temporal signals using an adaptive basis function. The Variational Ladder Autoencoder (VLAE) generates hierarchical latent representations capable of learning and capturing degradation patterns and uncertainty information from battery data. In addition, a transformer encoder is used to learn long-range temporal dependencies, and an attention fusion mechanism combines features at different scales to produce accurate estimates of SOC, SOH, and RUL. The efficiency of the proposed model is shown through experimental evaluation conducted with the National Aeronautics and Space Administration (NASA) battery datasets, achieving SOC predictions with R2 of 0.9943, root mean squared error (RMSE) of 0.0225, mean absolute error (MAE) of 0.0164, and mean absolute percentage error (MAPE) of 1.64%. The SOH prediction achieved an R2 of 0.9606, RMSE of 0.0414, MAE of 0.0243, and MAPE of 2.43%, whereas RUL predictions achieved an R2 of 0.9936, RMSE of 0.0196, MAE of 0.0156, and MAPE of 1.56%. This indicates that the proposed framework, NBE-VLT-PFO, offers greater accuracy, robustness, and reliability for battery health forecasting.

Keywords: lithium-ion batteries, NBE-VLT, Polar Fox Optimization, SOC, SOH, and RUL

1. Introduction

Due to the rapid growth of electric machines and the increased use of renewable energy sources by consumers, there is growing demand for better methods of storing energy from renewable sources. Lithium-ion battery technology is at the center of this transformation in energy storage for multiple applications (Qian et al., 2024). Electric vehicle (EV) and stationary energy storage applications show a strong trend toward lithium-ion battery technologies due to their numerous advantages. However, lithium-ion battery systems present significant challenges (Wang et al., 2024). As batteries are dynamic devices that experience variable loads, temperature, and charging conditions from external sources, they experience an accelerated rate of degradation and altered performance. Some measures on the batteries produce increased rates of degradation and create potentially hazardous conditions through thermal runaway (Liu et al., 2024; Gomathi, 2025).

Battery management systems (BMS) are critical to ensuring proper and safe operation of all lithium-ion battery systems due to the volatile nature of their use. Modern BMS designs require sophisticated algorithms capable of estimating the internal condition of the battery, which are capable of predicting the internal battery behavior under the diverse operating conditions encountered by the battery (Yao et al., 2024; Sakthimurugan et al., 2025).

Internal battery states such as state of charge (SOC), state of health (SOH), and remaining useful life (RUL) are crucial to battery management and computed from measurable quantities. Lithium-ion batteries are non-linear processes, creating complex relationships between observable quantities and battery state variables (Wei et al., 2025; Zhang et al., 2023; Wu et al., 2024). The time-varying nature of these systems, combined with the impact of operating circumstances, makes state estimation an inverse problem. More sources of uncertainty result from mature and cell-to-cell variations in battery pack characteristics (Babu et al., 2024; Fu et al., 2024).

Although electrochemical methods yield accurate physical and dynamic descriptions of battery systems, they are computationally expensive and not implementable in real time. Conversely, Equivalent Circuit Models (ECMs), such as Thevenin's or multi-resistor-capacitor (RC) type circuits, represent batteries using lumped electrical resistance, capacitance, and inductance with low complexity but limited accuracy compared to physical models. These types of models frequently use state observers, including extended Kalman filter (EKF), and unscented Kalman filter (UKF) (Lin et al., 2025; Zhang et al., 2025; Chen et al., 2024). However, because of the inherent complexities within model-based techniques, they experience significant parameter sensitivity, little robustness to aging, and limited ability to identify strong non-linearity and heterogeneous operation (Xie et al., 2023).

To address the problems of model-based methods, data-driven methods using ML and artificial intelligence (AI) have been thoroughly researched. Data-driven methods are designed to fit a non-linear mapping from measurable quantities to the battery's internal state without an explicit physical model (Shen et al., 2024; Fang et al., 2023). There are many different classification algorithms that are successfully used in estimating SOC and RUL. Recently deep learning (DL) architectures have been found to be useful in identifying temporal dependencies and non-linear degradation patterns. However, data-driven methods present their own challenges, including issues with dataset heterogeneity, interpretation of features, ability to generalize to new data, and potential for information leakage due to the correlation between the target and derived features in a controlled experimental environment (Mu et al., 2025; Zhao et al., 2023). Table 1 represents the summary of related models.

Table 1.

Related works of existing models for SOC, SOH, and RUL predictions.

S. No. References Methods Merits Demerits Metrics
1 Gao et al. (2023) Convolutional Neural Networks—Bidirectional Long Short-Term Memory (CNN-BiLSTM) CNN-BiLSTM model can extract local features of batteries effectively through the use of CNN and identify long-term temporal dependencies through the use of BiLSTM networks. It has a high degree of computational complexity and takes a long time to train. MAE: 0.5930, RMSE: 0.8306, R2: 0.957
2 Krishnasamy and Muniandi (2026) Random Forest—Long Short-Term Memory—Extreme Gradient Boosting (RF-LSTM-XGBoost) The integration enables improved feature learning, temporal modeling, and more robust prediction. The combination of models results in increased implementation complexities and requires numerous hyperparameter tuning processes to complete. MAE: 0.025, RMSE: 0.035, R2: 0.96
3 Li and Chen (2025) Long Short-Term Memory—Particle Swarm Optimization (LSTM-PSO) PSO automatically tunes the hyperparameters of LSTM models, thereby improving prediction accuracy and reducing effort. It is computationally expensive to run the optimization process, which requires multiple iterations before optimal performance is achieved. MAE: 0.67, RMSE: 0.94, R2: 0.929
4 Li et al. (2025) Sparrow Search Algorithm—Long Short-Term Memory (SSA-LSTM) The SSA optimizes the hyperparameters for LSTM, leading to improved convergence behavior and more stable predictions of battery states. Execution times and resource demands are larger than the single methods. MAE: 0.517, RMSE: 0.708, R2: 0.956
5 Dini and Paolini (2026) Extra trees Extra Trees offers rapid training, good generalization ability, and high resistance to noise in battery-generated data due to its ensemble learning strategy. Its lack of explicit modeling of temporal dependencies leads to a reduced ability to capture the trend in degradation over time. MAE: 0.0173, RMSE: 0.0367, R2: 0.982
6 Chen et al. (2023) Genetic Algorithm—Support Vector Regression (GASVR) It demonstrates improved non-linear regression performance and superior estimation accuracy when training data is limited. Due to a large-sized time-series battery dataset, it is expensive in computational tasks. MAE: 0.77, RMSE: 0.95, R2: 0.9892

To tackle these problems, a proposed Neural Basis Expansion Variational Ladder Transformer integrating Polar Fox Optimization (NBE-VLT-PFO) framework is used for hierarchical latent feature learning to give more robust results through improved generalization of transformer-based temporal modeling and to reduce the risk of overfitting by performing hyperparameter optimization using PFO.

1.1. Major contributions

The primary contributions of this research include the following:

  • In preprocessing, to increase data quality, reduce noise, and improve battery degradation model stability, some methods are applied, such as encoding features, eliminating outliers, including relevant features, and normalizing features.

  • The NBE-VLT model is designed to perform well in learning non-linear dependencies of lithium-ion batteries, producing precise estimation.

  • PFO is allowed for faster convergence and less manual hyperparameter tuning by improving accuracy and generalization for forecasting.

2. Proposed system description

The Hybrid NBE-VLT-PFO framework is a complete DL architecture that is developed for estimating lithium-ion battery parameters. The structure of the suggested system is displayed in Figure 1.

Figure 1.

Flowchart diagram illustrating a machine learning pipeline for battery dataset analysis, showing steps from raw data input, preprocessing tasks like feature encoding and normalization, model input division into trend, seasonality, and exogenous components, hybrid NBE-VLT model processing using stacked and block layers, deep learning operations including attention mechanisms, output encoding, final output generation, and performance evaluation with metrics such as MAE, RMSE, R-squared, and MAPE. Includes icons, graphical plots, and a decorative animal image.

Overall proposed framework.

These parameters include SOC, SOH, and RUL. The process starts with a raw battery dataset, followed by a series of preprocessing steps, including feature encoding, outlier detection, assessing feature relevance to the task using statistical methods, and applying normalization to ensure the data are clean, relevant, and standardized before being fed into the model. The base model uses techniques such as NBE to learn non-linear degradation patterns, Variational Ladder Encoding to create a hierarchical latent representation of an observation and capture uncertainty in the built-in model, and a Transformer Encoder to learn the temporal dependencies between the batteries throughout their mission life. An attention fusion method is used to combine information from all features to create robust latent embeddings for all observed battery cycles. PFO automatically tunes hyperparameters, such as learning rate, latent dimensions, and network depth, to improve convergence, stability, and predictive capabilities, enabling accurate and efficient modeling of complex battery behavior across a wide range of operational conditions.

3. Proposed system modeling

3.1. Preprocessing

3.1.1. Feature encoding

To predict lithium-ion battery condition, large amounts of charge and discharge data are compressed into a small set of representative features using a feature encoding technique. The diagram is presented in Figure 2.

Figure 2.

Diagram illustrating a process where a complex waveform labeled S is divided into segments. Each segment is connected by arrows to corresponding simplified shapes below, representing codeword assignment in feature encoding.

Feature encoding.

The encoding coefficients are calculated to minimize reconstruction error while preserving local relationships among battery features. Equation (1) represents the encoding coefficient vector

v=argminv||x-Cv||22+λ||d⊙v||22,  s.t.1Mv=1 (1)

Here, x is the feature vector for the extracted battery feature, C is the codebook of features, v is the encoding coefficient vector, λ is a regularization coefficient, and d is the locality adopter. This process reduces feature redundancy while obtaining representative encoded features that capture critical battery degradation and performance characteristics.

3.1.2. Outlier detection

Detection of outliers is a crucial component in estimating lithium-ion batteries. Outlier detection identifies data points that are significantly different from the majority of the data. The outlier data points stem from operational differences across testing conditions, age-related effects on lithium-ion batteries, or an atypical lithium-ion battery type. Developing a clearer view of battery performance by identifying outlier data points assists in more accurate estimation of key considerations. Furthermore, the analysis of unusual observations produces useful information about their respective battery characteristics and degradation profile, which in turn ultimately contribute to building more robust battery management systems and monitoring systems. In determining the outliers, the Interquartile range (IQR) procedure is applied, whereby data points that fall outside the range are excluded.

3.1.3. Feature analysis

Feature analysis examines the voltage, current, temperature, capacity, internal resistance, and cycle count associated with a set of batteries to assist in studying battery behavior based on these characteristics. It discovers the most pertinent information needed to estimate the battery's three primary states. Feature analysis improves the reliability and efficiency of lithium-ion battery estimation models. Pearson correlation analysis is used to assess feature importance, whereby only highly correlated features are used to train the model.

3.1.4. Feature normalization

An important step in lithium-ion battery estimation is the normalization of features in the dataset. Several battery-related features have different ranges and units. The most effective method to normalize these features is to perform Minimum–Maximum (Min–Max) normalization, which is accomplished by scaling the original values of each feature in the dataset and transforming them into a new set of values that fall within the common range of [0,1]. Min–Max normalization equation is given in Equation (2):

xtransformed=x-min(x)max(x)-min(x) (2)

Normalizing all features to a common range allows Min–Max normalization to improve learning and create more accurate estimates of key characteristics.

3.2. Model training

3.2.1. Neural basis expansion variational ladder transformer (NBE-VLT)

The proposed NBE-VLT structure comprises two main components: NBE modules and VLT, which together enable non-linear understanding of the relationship between empirical data and estimated states. Initially, NBE learns to extract the temporal and spatial correlations in the time-series signals of a lithium-ion battery to construct the battery cells' time-series using a combined approach that decomposes the time-series database into basis functions. Let Yback be the historical measurements of batteries. For block b of stack s, a fully connected neural network learns to extract and represent hidden features of block s. The relevant formulations are provided in Equations (3–16)

hs,b=FCNNs,b(Ys,b-1back,Xb-1) (3)

Let Ys,b-1back denote the residual backcast of battery cells from the previous block, Xb−1 represent the exogenous battery variables for block s of time t+1, and hs, b is defined as learned hidden representations. Finally, learned hidden representations of neural networks in block b from all stacks are used to create the expansion coefficients for battery cells.

θs,bback=LINEARback(hs,b) (4)
θs,bfor=LINEARfor(hs,b) (5)

Here, θs,bback represents a backcast expansion coefficient and θs,bfor represents a forecast expansion coefficient. The learned coefficients are expanded into their respective basis vectors to reconstruct the backcast and create the forecast representation.

Ŷs,bback=Vs,bbackθs,bback (6)
Ŷs,bfor=Vs,bforθs,bfor (7)

where Vs,bback and Vs,bfor denote the backcast and forecast basis matrices. The process of basis expansion decomposes battery performance into temporal components that are described independently of one another according to degradation and operational dynamics. The framework of NBE-VLT is displayed in Figure 3.

Figure 3.

Diagram illustrating a neural network model architecture for time series forecasting. Key components include trend, seasonality, and exogenous inputs, which flow through multiple stacked processing blocks and full connection stacks. The lower section shows embedding, multi-head attention, normalization, and softmax layers, emphasizing input/output encoding, residual connections, and the process of generating both forecasts and backcasts.

Model of NBE-VLT.

The use of residual stacking helps to eliminate the explained components of the signal and improves the extraction of features, namely:

Ys,b+1back=Ys,bback-Ŷs,bback (8)
Ŷsfor=∑b=1BŶs,bfor (9)

where, B is the block count within a stack. The final NBE representation is generated by aggregating all outputs from the different stacks. This number of stacks provides a compact and interpretable representation of battery degradation over time.

Y^for=∑S=1SŶsfor (10)

The total number of battery stacks is denoted by S, the overall stack number, to provide a compact and interpretable framework for representing battery degradation trajectories through additive decomposition. To encode these basis-expansion-extracted features, VLAE is employed. Regularization of the latent distribution is performed to prevent the collapse of latent variables and to derive interpretable hierarchical representations using the Maximum Mean Discrepancy (MMD) criterion.

MMD(q(z),p(z))=Eq(z),q(z0)[k(z,z0)]+Ep(z),p(z0)[k(z,z0)]-2Ep(z),q(z0)[k(z,z0)] (11)

An expectation operator (E[·]) and kernel function (k(·)) are included in the definition of the MMD distance of the posterior distribution (q(z)) relative to the prior distribution (p(z)) is defined as:

k(z,z′)=e-||z-z′||22/σ2 (12)

The MMD distance is calculated using a Gaussian kernel function based on the original formulation and σ is the kernel bandwidth.

LMMD-VLAE=Eqφ(z|x)[logpθ(x|z)]-MMD(P(z0),qφ(z0))-MMD(P(z1),qφ(z1)) (13)

MMD is preferred over KL divergence since it offers better flexibility in distribution matching and a lower chance of posterior collapse. Thus, VLAE is capable of learning expressive latent representations enabling to extract the information of non-linear degradation characteristics of lithium-ion batteries more efficiently. Therefore, the resulting MMD-VLAE is defined by the two respective distributions, the encoder posterior distribution qφ(z1) and decoder function pθ(z1), in addition to both encoder and decoder parameters, the hierarchical latent representation exhibits both short-term operational characteristics and long-term degradation mechanisms.

To characterize long-term temporal dependencies in the data, the hierarchical latent structures are processed by a Transformer module. The input to the Transformer is the scaled dot-product attention, which is calculated as follows:

Attention(Q,K,V)=softmax(QKTdk)V (14)

where dk is the dimension of the key vector. This model dynamically focuses on the most relevant temporal states contributing to battery degradation. Multi-head attention is used to capture different degradation patterns.

MultiHead(Q,K,V)=Concat(head1,. . .,headh)WO (15)

where,

headi=Attention(QWiQ,KWiK,VWiV) (16)

Here h indicates the number of heads, WiQ, WiK, and WiV are the learned projections for queries, keys, and values, respectively, and WO is the output projection. Thus, the method learns about diverse behaviors of the battery such as thermal behavior, voltage recovery, charge transfer, and long-term capacity degradation.

By combining NBE, VLAE, and a Transformer attention model, where NBE obtains non-linear degradation features and multi-scale battery patterns, VLAE acquires hierarchical latent representations and uncertainty information, and Transformer captures long-term temporal dependencies via self-attention. The modules are integrated sequentially to efficiently perform feature extraction, representation learning, and temporal modeling, thereby improving the accuracy of SOC, SOH, and RUL estimation.

3.3. Hyperparameter tuning

3.3.1. Polar Fox Optimization (PFO)

PFO employs a bio-inspired heuristic optimization method to optimize estimation, inspired by the adaptive hunting, survival, and group behaviors that Arctic foxes display when hunting together. As such, their adaptive behaviors allow the algorithm to maintain a balance between exploration and exploitation while conducting an optimization search. The optimization starts by randomly defining a population of potential candidate solutions. Equations (17–26) represent the relevant expressions of PFO

Each candidate solution, xij, is created within the search limits by the following equation:

xij=LB+r1.(UB-LB) (17)

where LB and UB are the search space's lower and upper bounds, and r1 is a randomly generated value from the range of 0 to 1. After this initial population is created, the potential candidates are divided into different behavioral groups, and each behavioral group's weights continue to be modified through an iterative updating process. The group weighting update rule is given by the following equation:

Winew=Wi+t2NGi (18)

where t indicates the present repetition and NGi is the sum of members of the group i. Subsequently, each candidate solution updates its position based upon its previous experience. The following equations determine this new position and mimic the ability of the fox to find its prey based upon its previous hunting experiences.

The update of position, the calculation of the jump force (P) and the movement direction (D) is as follows:

xit+1=xit+PD (19)
P=r2PFi (20)
D=cos(r3) (21)

In this equation, PFi indicates the strength of the person based on their prior experience, while r2 and r3 are random numbers. Within the subgroup, the best-performing person is the group leader, while others update their positions based on the leader's location. This is presented as follows:

xit+1=xit+r4.(xit-L)LFi (22)

where L is the leader location, LFi is the leader influence factor, and r4 is a random number between −1 and 1. A motivational factor for the leader is undermined if the members detect no improvement at all. This condition is expressed as follows:

critical=(NLM[MLM])∨(tNI≥0.8) (23)

where NLM is the leader motivation number, MLM is the predetermined threshold, t is the current iteration, and NI is the extreme number of iterations permitted. Through mutation, the poorly performing individuals are replaced, adding diversity to the overall population. The flowchart of PFO is shown in Figure 4. New location coordinates of the individuals are computed as follows:

Figure 4.

Flowchart illustrating a battery estimation algorithm using Population Formation Optimization, starting from parameter initialization, population grouping, group weight computation, battery fitness evaluation (SoC, SoH, RUL), movement and parameter calculation, leader selection, guidance update, leadership motivation and mutation phases, fatigue simulation, and checking for termination conditions before outputting optimal parameters and ending.

Flowchart of PFO.

xi=LB+r5.(UB-LB) (24)

where r5 is a random number between 0 and 1. The algorithm simulates the effect of exhaustion on group members by decreasing the group's total energy after each iteration. The energy use for group G1 is as follows:

G1=min(G1-G1r,G1i) (25)

If there are few members in the group, the energy is reset to ensure the following expression achieves stability, and it is expressed as follows:

G1=Gm (26)

Algorithm 1 represents the pseudo code of PFO. Table 2 denotes the optimized values of PFO. The PFO algorithm provides an overall solution for improving candidate solutions by continually updating, learning from others in the group, and adapting. Due to these aspects, the PFO algorithm finds optimal parameter values for lithium-ion battery estimation models, significantly increasing the accuracy of predicting the battery's SOC, SOH, and RUL.

Table 2.

Optimized values of PFO.

S. no. Parameter name Value
1 Population size 30
2 Maximum iterations 5
3 Lower bound −10
4 Upper bound 10
5 Exploration factor 1.0
6 Exploitation factor 1.0
7 Random walk coefficient 0.5
8 Adaptive control parameter 0.3
9 Inertia weight 0.7
10 Stopping criterion 1e−6
Algorithm 1

Pseudocode: PFO.

  START
  Initialize population size N, MaxIter, bounds LB
and UB
  Initialize fox positions Xi randomly within bounds
  Evaluate fitness of all foxes
  Set best fox Xbest based on fitness
  FOR iter = 1 to MaxIter DO
      FOR each fox i = 1 to N DO
        Generate random parameters α, β, γ
        Compute exploration movement Ei
        Compute exploitation movement Si
        Update position:
        Xi_new = Xi + α*Ei + β*Si + γ*random_walk
        IF Xi_new < LB THEN
          Xi_new = LB
        ELSE IF Xi_new > UB THEN
          Xi_new = UB
        END IF
        Evaluate fitness of Xi_new
        IF fitness(Xi_new) < fitness(Xi) THEN
          Xi = Xi_new
        END IF
        IF fitness(Xi) < fitness(Xbest) THEN
          Xbest = Xi
        END IF
       END FOR
      RETURN Xbest
  END

4. Results and discussion

The proposed model integrates an architecture based on transformers, DL, and PFO to effectively reflect both temporal relationships and non-linearity associated with battery behavior. Table 3 provides a description of the dataset used in the proposed system. Table 4 denotes the samples in NASA battery dataset grouped by battery ID.

Table 3.

Dataset description.

Dataset name NASA battery dataset
Number of samples 29,180
Number of features 8
Target features SOC, SOH, and RUL

Table 4.

Samples in NASA battery dataset grouped by battery ID.

S. no. Battery ID Samples
1 B0036 3,920
2 B0007 3,340
3 B0005 2,460
4 B0033 2,300
5 B0006 2,180
6 B0018 2,080
7 B0034 1,400
8 B0042 1,140
9 B0043 1,080
10 B0044 1,000
11 B0030 800
12 B0031 800
13 B0032 800
14 B0029 800
15 B0038 700
16 B0039 600
17 B0040 660
18 B0027 560
19 B0025 560
20 B0028 560
21 B0026 540
22 B0046 340
23 B0048 280
24 B0047 220

Figure 5 illustrates the steps in preprocessing battery data and analyzing the selected features. It depicts the distributions of cycle numbers and SOH before and after data processing; here, outliers (140 cycle numbers and 20 SOH values) are removed to achieve a higher quality dataset. The voltage distribution approximates a normal distribution additionally with closely matching mean and median values. The feature impact analysis demonstrates that cycle number has the greatest effect on SOH, charge voltage has the strongest correlation with SOC, whereas temperature and current have a moderate effect across different states of charge for the six batteries tested.

Figure 5.

Grid of four data visualizations related to battery analytics: Top left, a histogram compares raw and processed data distributions for cycle number with 140 values removed or adjusted. Top right, a histogram compares raw and processed State of Health (SoH) distributions, noting 20 adjustments. Bottom left, a bar chart displays statistical distribution of measured battery voltage with mean and median reference lines. Bottom right, a horizontal bar chart shows comparative correlation scores of battery features against SoH, Remaining Useful Life (RUL), and State of Charge (SoC) targets.

Battery data visualization.

The ablation study in Table 5 establishes that each added component improves SOC estimation performance. The proposed Hybrid NBE-VLT-PFO model achieves the maximum R2 (0.9943) and the minimum RMSE (0.0225), MAE (0.0164), and MAPE (1.64%), indicating high precision in estimating different variables.

Table 5.

Ablation study for SOC estimation.

Model R 2 RMSE MAE MAPE (%)
NBE 0.9648 0.0584 0.0432 4.31
NBE-VLAE 0.9759 0.0468 0.0346 3.47
NBE-transformer 0.9798 0.0417 0.0305 3.06
NBE-VLT 0.9850 0.0360 0.0260 2.63
Hybrid NBE-VLT-PFO (proposed) 0.9943 0.0225 0.0164 1.64

The ablation study in Table 6 shows that each component increases SOH estimation performance. The Hybrid NBE-VLT-PFO model achieves the maximum R2 (0.9606) and the minimum RMSE (0.0414), MAE (0.0243), and MAPE (2.43%) values, making it more accurate in in estimating the SOH value.

Table 6.

Ablation study for SOH estimation.

Model R 2 RMSE MAE MAPE (%)
NBE 0.8918 0.0728 0.0496 4.98
NBE-VLAE 0.9075 0.0649 0.0438 4.41
NBE-transformer 0.9152 0.0608 0.0405 4.06
NBE-VLT 0.9240 0.0570 0.0380 3.81
Hybrid NBE-VLT-PFO (proposed) 0.9606 0.0414 0.0243 2.43

The convergence analysis in Figure 6 indicates that the proposed PFO converges quickly and achieves a lower fitness value than other techniques such as PSO, GWO, WOA, HHO, and SSA, which shows effective optimization performance and fast hyperparameter tuning.

Figure 6.

Line chart comparing hyperparameter optimization algorithms by plotting fitness value against number of iterations. Proposed PFO converges fastest, followed by SSA, HHO, WOA, GWO, and PSO.

Convergence analysis of hyperparameter optimization.

The ablation study in Table 7 shows that each component enhances RUL estimation performance. The Hybrid NBE-VLT-PFO model achieves the best performance in terms of R2 value (0.9936) and the lowest calculated values of RMSE (0.0196), MAE (0.0156), and MAPE (1.56%), indicating reliable operation.

Table 7.

Ablation study for RUL estimation.

Model R 2 RMSE MAE MAPE (%)
NBE 0.9524 0.0598 0.0413 4.12
NBE-VLAE 0.9646 0.0497 0.0335 3.35
NBE-transformer 0.9713 0.0438 0.0286 2.87
NBE-VLT 0.9780 0.0370 0.0240 2.37
Hybrid NBE-VLT-PFO (proposed) 0.9936 0.0196 0.0156 1.56

Figure 7 shows that the SOH of all six batteries decreases with increasing total charge cycles, indicating this is typical of battery degradation over time, although some batteries exhibit small fluctuations in their SOH values. In certain critical cycle moments, the SOH gains are caused by the effects of capacity recovery, measurement noise, or changes in conditions of operation. The proposed model (NBE-VLT-PFO) handles non-monotonic behavior by enabling recognition of various degradation processes and time dependencies, thereby calculating SOH reliably.

Figure 7.

Six line graphs compare state of health (SoH) value decline patterns for batteries B0018, B0007, B0005, B0030, B0036, and B0033 across charge cycles. All graphs show SoH decreasing as cycle count increases, with B0036 and B0033 exhibiting sharp SoH spike anomalies.

Battery-wise SOH evolution across charge cycles.

In Figure 8, the heat map illustrates the degree of correlation among variables, highlighting a strong positive correlation (0.79) between charge voltage and SOC (−0.51) between cycle number and SOH, and (0.25) between RUL and SOH. In summary, the heat map captures the primary interdependencies among variables related to electrical performance, temperature behavior, and aging.

Figure 8.

Heatmap displaying the correlation coefficients between seven battery features: Voltage_measured, Current_measured, Temperature_measured, SoC, cycle_number, SoH, and RUL. Correlation values are color-coded from -0.6 to 1.0, with strongest positive correlations in blue, negative in yellow.

Comprehensive correlation analysis of battery features.

In Table 8, the comparison of the optimizers reveals that the proposed PFO obtains the greatest outcomes with the minimum fitness value (0.0052) and minimum execution time (114 s), as well as having the highest prediction accuracy with the R2 values 0.9943, 0.9606, and 0.9936, respectively, compared to PSO, GWO, WOA, HHO, and SSA optimizers.

Table 8.

Comparison of optimization.

Optimizer Best fitness SOC R2 SOH R2 RUL R2 Time (s)
PSO 0.0335 0.9881 0.9412 0.9827 148
GWO 0.0278 0.9894 0.9469 0.9853 136
WOA 0.0224 0.9906 0.9517 0.9875 129
HHO 0.0186 0.9920 0.9558 0.9902 123
SSA 0.0137 0.9932 0.9584 0.9921 118
Proposed PFO 0.0052 0.9943 0.9606 0.9936 114

The convergence plot in Figure 9 of the proposed PFO shows a considerable reduction in fitness value in the first iterations, followed by a steady approach toward the optimal solution. The fitness value is close to zero, which indicates a high convergence rate and efficiency of the suggested PFO algorithm.

Figure 9.

Line graph titled “Convergence Curve of Proposed PFO” displaying fitness value on the y-axis and number of iterations on the x-axis; the plotted curve shows fitness value dropping rapidly and flattening near zero as iterations increase to fifty.

Convergence curve of the proposed PFO.

Figure 10 provides insight into the distribution of battery data and characteristics. When plotting the battery state-of-charge density, the distribution was uniform, with the mean and median at approximately 50%. SOH across varying states of charge was between approximately 80%−84%. The RUL curve shows a decrease with cycle index (battery cycles), indicating that all batteries eventually degrade over time; therefore, the RUL prediction decreases when calculating RUL for subsequent cycles. The dataset was split into a training and testing dataset and proportioned appropriately (80% for training and 20% for testing) to equalize the training and testing of the model.

Figure 10.

Top-left panel displays a density line graph showing the probability density of battery state of charge, with mean and median marked near 60 percent. Top-right panel presents a horizontal bar chart comparing average state of health for four battery IDs, with values ranging from 80.20 to 84.14 percent. Bottom-left panel depicts a line chart of remaining useful life versus battery cycle index, indicating a general decline with intermittent drops. Bottom-right panel shows a donut chart dividing train and test sample data counts, with 80 percent as train and 20 percent as test.

Battery performance analysis.

In Table 9, the loss factors are determined manually, such as 0.35 for SOC, 0.45 for SOH, and 0.20 for RUL, depending on their significance and level of difficulty. Depending on the value, the proportion of effort devoted to it changes: the larger the value of a task, the more effort it receives, which means greater accuracy, although it may affect the performance of other tasks. The chosen weight values allow for satisfactory accuracy across all types of estimation.

Table 9.

Loss weights of SOC, SOH, and RUL.

Parameter SOC SOH RUL
Loss weight 0.35 0.45 0.20

The graph of loss curves in Figure 11 shows that all the models had reasonable learning curves over time. The loss values for training and validation for the Hybrid NBE-VLT-PFO model were consistently lower than the other models; thus, it outperformed the other two models in terms of performance and generalization. The NBE-VLT model had moderate loss values, whereas the Neural Transformer Model had the highest; therefore, it was the least effective of the three models.

Figure 11.

Three line charts compare train versus validation loss over 80 epochs for different models: HYBRID NBE-VLT-PFO, NBE-VLT, and Neural Transformer Model. All charts show loss values decreasing with epochs, with training loss generally higher than validation loss throughout.

Train vs. validation loss of hybrid NBE-VLT-PFO, NBE-VLT, and neural transformer model.

The scatterplots for the SOC, SOH, and RUL in Figure 12 show a very strong correlation among these metrics. The majority of points in each scatterplot cluster around the diagonal line representing the ideal regression line. This indicates that the Hybrid NBE-VLT-PFO model is the most accurate predictor of SOC, SOH, and RUL, with particularly strong performance in RUL and minimal error across all three battery metrics.

Figure 12.

Three scatter plots titled “Actual vs Predicted Scatter Plot - HYBRID : NBE-VLT-PFO” display predicted versus actual values for SoC, SoH, and RUL. Blue dots align closely with red dashed ideal lines, indicating strong prediction accuracy in all three cases.

Actual vs. Predicted scatter plot of Hybrid NBE-VLT-PFO.

The scatterplots for the SOC, SOH, and RUL metrics in Figure 13 show that the NBE-VLT model replicated the actual test metrics for SOC, SOH, and RUL. However, the scatterplots for both SOH and RUL show greater variance in the predictive values of the NBE-VLT model than in those of the hybrid model, suggesting that the NBE-VLT model is more error-prone than the hybrid model.

Figure 13.

Three scatter plots display actual versus predicted values for SoC, SoH, and RUL, each with magenta points and a red dashed ideal line. Axes are labeled “Actual Values” and “Predicted Values.” The plots evaluate model prediction accuracy.

Actual vs. predicted scatter plot of NBE-VLT.

The accuracy of the Neural Transformer model for prediction of SOC, SOH, and RUL is illustrated by the scatter plots in Figure 14. It shows that SOC and RUL have low scatter (near the ideal line) and high agreement between actual and predicted values, whereas the SOH prediction shows greater spread around the ideal prediction line and therefore has lower accuracy than either the SOC or RUL predictions.

Figure 14.

Three scatter plots compare actual versus predicted values using a neural transformer model for SoC, SoH, and RUL. Each plot displays data points and a red dashed “Ideal Line” indicating perfect prediction alignment.

Actual vs. predicted scatter plot of neural transformer model.

In Table 10, the performance metric results obtained using the NASA battery dataset and CALCE battery dataset show the feasibility of the method for SOC, SOH, and RUL. The model achieved efficient accuracy results with the NASA dataset: the R2 score 0.9943 for SOC, 0.9606 for SOH, and 0.9936 for RUL estimation. The CALCE dataset performance results show R2 scores 0.9912, 0.9485, and 0.9891 for respective estimations.

Table 10.

Performance evaluation on different public battery datasets.

Dataset Target MSE RMSE MAE MASE R2 score
NASA SOC 0.0005 0.0225 0.0164 0.0128 0.9943
SOH 0.0017 0.0414 0.0243 0.0189 0.9606
RUL 0.0004 0.0196 0.0156 0.0117 0.9936
National Aeronautics and Space Administration (CALCE) SOC 0.0008 0.0283 0.0205 0.0162 0.9912
SOH 0.0024 0.0490 0.0301 0.0238 0.9485
RUL 0.0007 0.0265 0.0198 0.0151 0.9891

The evaluation process in Table 11 uses different battery datasets such as NASA and CALCE. If the system is exposed to learning with the NASA dataset and tested on the CALCE dataset, it gives effective results, such as R2 are 0.9867, 0.9318, and 0.9825 for SOC, SOH, and RUL, respectively. When tested in reverse cases, the results of R2 values are 0.9908, 0.9547, and 0.9919.

Table 11.

Cross-dataset generalization analysis.

Training dataset Testing dataset Target MSE RMSE MAE MASE R2 score
NASA CALCE SOC 0.0010 0.0316 0.0234 0.0185 0.9867
SOH 0.0031 0.0557 0.0342 0.0269 0.9318
RUL 0.0011 0.0332 0.0247 0.0189 0.9825
CALCE NASA SOC 0.0007 0.0265 0.0191 0.0149 0.9908
SOH 0.0020 0.0447 0.0275 0.0214 0.9547
RUL 0.0006 0.0245 0.0182 0.0138 0.9919

The comparative performance evaluation results in Figure 15 indicate that the suggested method steadily exceeded both the Neural Transformer model and the NBE-VLT models for all target variables such as SOC, SOH, and RUL. The proposed model achieved the greatest R2 values and the lowest RMSE, MAE, and MAPE, resulting in a much higher level of prediction accuracy, lower error, and higher reliability standards.

Figure 15.

Four bar charts show comparative model performance on battery prediction tasks: R², RMSE, MAE, and MAPE each cover three targets—SoC, SoH, and RUL. Purple represents Neural Transformer Model, teal is NBE-VLT, and orange is the Proposed model. Proposed achieves highest R², lowest RMSE, MAE, and MAPE across all targets, indicating superior predictive accuracy and error minimization. Values are labeled above each bar for precise comparison.

Comparison of evaluation metrics.

In Table 12, the proposed method overtook both the CNN-BiLSTM (Gao et al., 2023) and the RF-LSTM-XGBoost (Krishnasamy and Muniandi, 2026) methods with minimum MAE (0.0156) and RMSE (0.0196) values and maximum R2 (0.9936) value, demonstrating that the proposed method provides reliable estimates of lithium-ion battery RUL.

Table 12.

Comparison of RUL predictions for estimating lithium-ion batteries.

S. No. Methods MAE RMSE R 2
1 CNN-BiLSTM (Gao et al., 2023) 0.5930 0.8306 0.9576
2 RF-LSTM-XGBoost (Krishnasamy and Muniandi, 2026) 0.025 0.035 0.96
3 Proposed 0.0156 0.0196 0.9936

The SOH prediction on lithium-ion batteries in Figure 16 shows that the proposed technique ensures a stronger performance than SSA-LSTM (Li et al., 2025) and PSO-LSTM (Li and Chen, 2025). The maximum R2 (0.96), minimum RMSE (0.0414), and MAE (0.0243) values indicate that the suggested technique is significantly more precise than either of the other techniques.

Figure 16.

Bar chart comparing three models—Proposed, SSA-LSTM, and PSO-LSTM—for state of health prediction of lithium-ion batteries using R-squared, root mean square error, and mean absolute error metrics; Proposed model shows highest R-squared value 0.96, lowest RMSE 0.0414, and lowest MAE 0.0243, outperforming the other models.

Comparative analysis of SOH prediction.

SOC prediction of lithium-ion batteries in Table 13 indicates that the suggested process is greater compared to the Extra Trees model (Dini and Paolini, 2026) and GASVR (Chen et al., 2023), with lower MAE (0.0164) and RMSE (0.0225) and a higher R2 value (0.9943).

Table 13.

Comparative analysis of SOC prediction.

S. No. Methods MAE RMSE R 2
1 Extra trees (Dini and Paolini, 2026) 0.0173 0.0367 0.982
2 GASVR (Chen et al., 2023) 0.77 0.95 0.9892
3 Proposed 0.0164 0.0225 0.9943

5. Conclusion

The NBE-VLT-PFO framework combines all data activities, including data preprocessing, hyperparameter optimization, hierarchical latent feature learning, Transformer-based temporal dependency modeling, and attention-based feature fusion. During the data preprocessing stage, data quality is improved through techniques such as feature encoding, outlier removal, feature analysis, and normalization. The PFO determines the optimal model configurations to improve convergence and the generalization ability of all models. Within the NBE, non-linear battery behavior is captured. At the same time, the Variational Ladder Encoder learns uncertainty-appropriate latent representations, and the Transformer Encoder learns to model the degradation pattern over time. The proposed model improves performance by incorporating fully connected regression layers, which yield accurate estimates of SOC, SOH, and RUL. The NASA battery dataset was used to evaluate the efficiency of the suggested architecture. For SOC, it provided R2 of 0.9943, RMSE of 0.0225, MAE of 0.0164, and MAPE of 1.64%. For SOH prediction, the model provided R2 of 0.9606, RMSE of 0.0414, MAE of 0.0243, and MAPE of 2.43%. Finally, for RUL prediction, the model achieved R2 of 0.9936, RMSE of 0.0196, MAE of 0.0156, and MAPE of 1.56%. These functional results show that the hybrid model is effective at providing accurate, reliable, and generalizable estimates of battery performance, thereby enabling predictive maintenance for EVs.

Funding Statement

The author(s) declared that financial support was not received for this work and/or its publication.

Footnotes

Edited by: Feng Chen, Dallas County, United States

Reviewed by: Yonghong Xu, Beijing Information Science and Technology University, China

Jinxin Wu, Guangxi University, China

Data availability statement

Publicly available datasets were analyzed in this study. This data can be found here: https://drive.google.com/file/d/1H46hCYBJkGFz5MIT3ER4iy143CFkcyOh/view?usp=drivesdk.

Author contributions

GT: Supervision, Validation, Writing – review & editing, Conceptualization, Formal analysis, Methodology, Software, Writing – original draft. GR: Supervision, Validation, Writing – review & editing, Investigation, Visualization.

Conflict of interest

The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The author(s) declared that Generative AI was not used in the creation of this manuscript.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher's note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

References

  1. Babu P. S., Indragandhi V., Ashok B., Vedhanayaki S., Kavitha C. (2024). Enhanced SOC estimation of lithium ion batteries with RealTime data using machine learning algorithms. Sci. Rep. 14:16036. doi: 10.1038/s41598-024-66997-9 [DOI] [PMC free article] [PubMed] [Google Scholar]
  2. Chen C., Li Z., Wei J. (2023). Estimation of lithium-ion battery state of charge based on genetic algorithm support vector regression under multiple temperatures. Electronics 12:4433. doi: 10.3390/electronics12214433 [DOI] [Google Scholar]
  3. Chen K., Li J., Liu K., Bai C., Zhu J., Gao G., et al. (2024). State of health estimation for lithium-ion battery based on particle swarm optimization algorithm and extreme learning machine. Green Energy Intell. Transp. 3:100151. doi: 10.1016/j.geits.2024.100151 [DOI] [Google Scholar]
  4. Dini P., Paolini D. (2026). Data-driven analysis and machine learning-based estimation of SOC and RUL in lithium-ion batteries using heterogeneous operational Data. Batteries 12:199. doi: 10.3390/batteries12060199 [DOI] [Google Scholar]
  5. Fang D., Wu W., Li J., Yuan W., Liu T., Dai C., et al. (2023). Performance simulation method and state of health estimation for lithium-ion batteries based on aging-effect coupling model. Green Energy Intell. Transp. 2:100082. doi: 10.1016/j.geits.2023.100082 [DOI] [Google Scholar]
  6. Fu S., Tao S., Fan H., He K., Liu X., Tao Y., et al. (2024). Data-driven capacity estimation for lithium-ion batteries with feature matching based transfer learning method. Appl. Energy 353:121991. doi: 10.1016/j.apenergy.2023.121991 [DOI] [Google Scholar]
  7. Gao D., Liu X., Zhu Z., Yang Q. (2023). A hybrid CNN-BiLSTM approach for remaining useful life prediction of EVs lithium-Ion battery. Meas. Control 56, 371–383. doi: 10.1177/00202940221103622 [DOI] [Google Scholar]
  8. Gomathi S. (2025). “Predictive intelligence for battery state-of-health: a machine learning approach to energy reliability,” 2025 10th international conference on communication and electronics systems (ICCES) (Coimbatore), 419–425. doi: 10.1109/ICCES67310.2025.11336954 [DOI] [Google Scholar]
  9. Krishnasamy M., Muniandi K. A. (2026). Hybrid machine learning framework for battery remaining useful life prediction with time-series modelling and statistical validation. PeerJ Comput. Sci. 12:e3478. doi: 10.7717/peerj-cs.3478 [DOI] [Google Scholar]
  10. Li C., Yan B., Zhu C., Zhou X., Jia Y. (2025). Swarm intelligence–optimized deep neural network for intelligent diagnosis of lithium-ion battery state of health. Sci. Rep. 16:3809. doi: 10.1038/s41598-025-34022-2 [DOI] [PMC free article] [PubMed] [Google Scholar]
  11. Li K., Chen X. (2025). Machine learning-based lithium battery state of health prediction research. Appl. Sci. 15:516. doi: 10.3390/app15020516 [DOI] [Google Scholar]
  12. Lin C., Wu L., Tuo X., Liu C., Zhang W., Huang Z., et al. (2025). A lightweight two-stage physics-informed neural network for SOH estimation of lithium-ion batteries with different chemistries. J. Energy Chem. 10, 261–279. doi: 10.1016/j.jechem.2025.01.057 [DOI] [Google Scholar]
  13. Liu D., Wang S., Fan Y., Fernandez C., Blaabjerg F. (2024). A novel multi-factor fuzzy membership function-adaptive extended Kalman filter algorithm for the state of charge and energy joint estimation of electric-vehicle lithium-ion batteries. J. Energy Storage 86:111222. doi: 10.1016/j.est.2024.111222 [DOI] [Google Scholar]
  14. Mu G., Wei Q., Xu Y., Li J., Zhang H., Yang F., et al. (2025). State of health estimation of lithium-ion batteries based on feature optimization and data-driven models. Energy 316:134578. doi: 10.1016/j.energy.2025.134578 [DOI] [Google Scholar]
  15. Qian C., Guan H., Xu B., Xia Q., Sun B., Ren Y., et al. (2024). A CNN-SAM-LSTM hybrid neural network for multi-state estimation of lithium-ion batteries under dynamical operating conditions. Energy 294:130764. doi: 10.1016/j.energy.2024.130764 [DOI] [Google Scholar]
  16. Sakthimurugan V., Devarajan Y., Singh R. P. (2025). Advancing electric vehicles through nanotechnology: overcoming challenges in battery performance, energy efficiency, and sustainability. Battery Energy 5:70069. doi: 10.1002/bte2.70069 [DOI] [Google Scholar]
  17. Shen J., Zhang Z., Shen S., Zhang Y., Chen Z., Liu Y. (2024). Accurate state of temperature estimation for lithium-ion batteries based on square root cubature Kalman filter. Appl. Therm. Eng. 242:122452. doi: 10.1016/j.applthermaleng.2024.122452 [DOI] [Google Scholar]
  18. Wang J., Song J., Li Y., Ren T., Yang Z. (2024). State of charge estimation for lithium-ion battery based on improved online parameters identification and adaptive square root unscented Kalman filter. J. Energy Storage 77:109977. doi: 10.1016/j.est.2023.109977 [DOI] [Google Scholar]
  19. Wei Z., Sun X., Li Y., Liu W., Liu C., Lu H. (2025). A joint estimation method for the soc and soh of lithium-ion batteries based on ar-ecm and data-driven model fusion. Electronics 14:1290. doi: 10.3390/electronics14071290 [DOI] [Google Scholar]
  20. Wu L., Chen C., Li Z., Chen Z., Li H. (2024). The joint estimation of SOC-SOH for lithium-ion batteries based on BiLSTM-SA. Electronics 14:97. doi: 10.3390/electronics14010097 [DOI] [Google Scholar]
  21. Xie J., Wei X., Bo X., Zhang P., Chen P., Hao W., et al. (2023). State of charge estimation of lithium-ion battery based on extended Kalman filter algorithm. Front. Energy Res. 11:1180881. doi: 10.3389/fenrg.2023.1180881 [DOI] [Google Scholar]
  22. Yao J., Neupert S., Kowal J. (2024). Cross-stitch networks for joint state of charge and state of health online estimation of lithium-ion batteries. Batteries 10:171. doi: 10.3390/batteries10060171 [DOI] [Google Scholar]
  23. Zhang R., Li X., Sun C., Yang S., Tian Y., Tian J. (2023). State of charge and temperature joint estimation based on ultrasonic reflection waves for lithium-ion battery applications. Batteries 9:335. doi: 10.3390/batteries9060335 [DOI] [Google Scholar]
  24. Zhang Z., Gu X., Zhu Y., Wang T., Gong Y., Shang Y. (2025). Data-driven available capacity estimation of lithium-ion batteries based on fragmented charge capacity. Commun. Eng. 4:32. doi: 10.1038/s44172-025-00372-y [DOI] [PMC free article] [PubMed] [Google Scholar]
  25. Zhao H., Chen Z., Shu X., Shen J., Lei Z., Zhang Y. (2023). State of health estimation for lithium-ion batteries based on hybrid attention and deep learning. Reliab. Eng. Syst. Saf. 232:109066. doi: 10.1016/j.ress.2022.109066 [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

Publicly available datasets were analyzed in this study. This data can be found here: https://drive.google.com/file/d/1H46hCYBJkGFz5MIT3ER4iy143CFkcyOh/view?usp=drivesdk.


Articles from Frontiers in Artificial Intelligence are provided here courtesy of Frontiers Media SA

RESOURCES