Next Article in Journal
AoI- and DS-Enhanced Cooperative Search for Multi-UAV Systems Under Spatially Structured Communication Constraints
Next Article in Special Issue
A Review of Energy Management for Distributed PV-Storage-Integrated Railway Traction Power Supply Systems: Architectures, Interfaces, and Control Strategies
Previous Article in Journal
Selecting the Minimal Multi-Hop Radius for Resilient Consensus: A Hybrid Robustness–Proxy Framework for MW-MSR
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Comparative Analysis of Errors in Sodium-Ion Battery SOC Estimation Algorithm Based on Hardware-in-the-Loop Validation

1
National Active Distribution Network Technology Research Center (NANTEC), Beijing Jiaotong University, Beijing 100044, China
2
Guangdong Provincial Key Laboratory of Source-Grid-Load-Storage Interactive Collaborative Technology (No. 2024B1212020004), Shenzhen Power Supply Co., Ltd., Shenzhen 518000, China
*
Author to whom correspondence should be addressed.
Electronics 2026, 15(9), 1871; https://doi.org/10.3390/electronics15091871
Submission received: 2 April 2026 / Revised: 22 April 2026 / Accepted: 24 April 2026 / Published: 28 April 2026
(This article belongs to the Special Issue Electrical Energy Storage Systems and Grid Services)

Abstract

To improve the state-of-charge (SOC) estimation accuracy of sodium-ion batteries under complex operating conditions, this paper proposes a particle swarm optimization-based heterogeneous adaptive extended Kalman filter. A hardware-in-the-loop (HIL) validation platform is also established to reproduce the sampling-chain constraints of a practical battery management system. In addition, a second-order equivalent circuit model (ECM) serves to characterize battery dynamics and generate validation data. Within this framework, the degradation in estimation performance from the theoretical environment to practical hardware execution is quantitatively analyzed. The feasibility of using ECM-generated data for SOC estimation algorithm validation is also evaluated. Using measured Federal Urban Driving Schedule data at 25 °C, the proposed method achieves high estimation accuracy and stable convergence in both environments. Specifically, the mean absolute error and root-mean-square error in the theoretical environment are 0.11% and 0.25%, respectively. Under HIL conditions, the corresponding values are 0.60% and 0.63%. Additional tests under different temperatures and composite disturbance conditions further verify the adaptability and robustness of the proposed algorithm. The results also show that practical hardware constraints introduce non-negligible performance degradation. In addition, ECM-generated data remain highly consistent with measured data in terms of error-evolution trends. Therefore, ECM-generated data can serve as a feasible validation data source for SOC estimation algorithm performance evaluation and rapid validation.

1. Introduction

With the development of renewable energy systems and electric transportation technologies, battery energy storage systems have been increasingly deployed in large-scale renewable-energy integration, frequency regulation, and other grid-support services [1,2]. Against this background, sodium-ion batteries have attracted growing attention because of their abundant resources, low cost, and favorable rate performance [3,4]. As a key state variable of the battery management system (BMS), the state of charge (SOC) provides an important basis for energy management, power allocation, driving-range evaluation, and overcharge/overdischarge protection [5]. Therefore, accurate online SOC estimation for sodium-ion batteries under complex operating conditions is of great significance for practical BMS applications.
Existing SOC estimation methods can generally be classified into three categories: direct measurement methods, data-driven methods, and model-driven methods [6]. Direct measurement methods are simple to implement, but the ampere-hour integration method is prone to cumulative errors [7,8], while the open-circuit voltage method relies on long rest periods and is, therefore, difficult to apply under dynamic operating conditions [9]. Data-driven methods exhibit strong nonlinear fitting capability [10,11]. Chen et al. [12] proposed a multi-output fusion algorithm based on deep network migration for joint SOC and SOE estimation, in which transfer learning was introduced to improve estimation accuracy and robustness under varying temperatures, aging conditions, and noise disturbances. Yi et al. [13] developed a Time Series Transformer with a De-noise De-stationary Inception Network for SOC estimation, showing the potential of transformer-based sequence modeling in capturing long-term temporal dependencies of battery signals. Nevertheless, these methods still depend heavily on high-quality training data and remain limited in operating-condition transferability, generalization capability, and real-time deployment [14]. By contrast, model-driven methods provide a better balance among estimation accuracy, computational complexity, and engineering feasibility, making them more suitable for real-time onboard and energy-storage BMS applications [15].
Model-driven SOC estimation depends on the accurate characterization of battery voltage dynamics. Compared with electrochemical mechanism models, equivalent circuit models (ECMs) have become a mainstream approach for engineering-oriented SOC estimation because of their simple structure, convenient parameter identification, and low computational complexity [16,17]. Among ECM-based SOC estimation methods, the extended Kalman filter (EKF) has been widely adopted because it can address the nonlinear characteristics of batteries through linearization [18,19]. However, in the conventional EKF, the process noise covariance matrix Q and the measurement noise covariance matrix R are usually treated as constants, making it difficult to accommodate noise variations caused by changing operating conditions and sensor drift, which, in turn, may degrade convergence and robustness [20,21]. Therefore, the adaptive extended Kalman filter has gradually become a research focus. Related improvements mainly include the introduction of online parameter identification and forgetting-factor mechanisms as well as adaptive adjustment of noise covariance matrices and robust statistical criteria to enhance estimation stability and accuracy under complex operating conditions [22,23,24,25].
Although adaptive extended Kalman filtering methods have demonstrated relatively high SOC estimation accuracy under ideal simulation conditions, their engineering application to sodium-ion batteries is still constrained by two factors. First, sodium-ion batteries typically exhibit a pronounced voltage plateau over the intermediate SOC range, where the slope of the open-circuit voltage (OCV)–SOC curve is relatively small. This weakens the corrective effect of measurement information on the state update, such that even slight fluctuations in the sampling chain may alter the Kalman gain and, consequently, induce abrupt changes in SOC estimation [26]. Second, practical embedded systems are generally subject to physical hardware constraints, including limited sampling accuracy, quantization errors, communication delays, and environmental noise, which often lead to significant performance degradation when the algorithm is transferred from the theoretical environment to the physical execution environment [27].
In recent years, hardware-in-the-loop (HIL) technology has gradually become an important means of bridging theoretical algorithms and engineering applications, as it incorporates hardware links such as sampling, communication, execution, and control into a unified validation framework [28,29]. In the field of battery applications, Suti et al. [30] established a HIL test platform for a commercial passive balancing BMS to verify its functions under typical operating conditions. Le et al. [31] developed a lithium-ion battery SOC estimation method based on a second-order Thevenin model and an adaptive unscented Kalman filter and employed a HIL platform to jointly validate online parameter identification and the SOC estimation process. Zhang et al. [32] proposed a joint estimation method for lithium-ion battery pack SOC and state of energy based on adaptive H-infinity filtering and real-time parameter identification, and further, established a HIL platform to comparatively evaluate its estimation accuracy and robustness. However, these studies have mainly focused on functional verification, control feasibility, or algorithm operability, while few have quantitatively examined how the physical constraints of the hardware sampling chain affect SOC estimation accuracy and how such effects propagate from theoretical evaluation to practical execution.
Apart from hardware deployment validation, the source of evaluation data is also a key factor affecting the effectiveness of algorithm validation. Owing to limitations in testing cost, experimental duration, and operating-condition coverage, large-scale dynamic measured data are often difficult to obtain [33]. Therefore, the use of model-generated data for algorithm validation is of practical significance. Existing studies have proposed various data-generation methods for SOC estimation algorithms. Channegowda et al. [34] proposed a deep learning-based method for generating high-fidelity and diverse synthetic battery datasets. Chianese et al. [35] proposed a data-generation method based on an electrothermal model. Hou et al. [36] proposed a data-generation method that integrates an equivalent circuit model with a neural network model. Ramshankar et al. [37] further explored the integrated application of digital twin technology in state estimation. However, it remains unclear whether, when used for SOC estimation algorithm performance evaluation under complex operating conditions, ECM-generated data can produce error-evolution patterns consistent with those obtained from measured data and thereby support rapid performance assessment in engineering deployment-oriented scenarios.
To address the above issues, this paper proposes a heterogeneous adaptive extended Kalman filter (HAEKF) for SOC estimation of sodium-ion batteries under complex operating conditions. Particle swarm optimization (PSO) is employed to optimize the key hyperparameters. A HIL validation framework is also established to reproduce the constraints of a practical BMS hardware sampling chain. Within this framework, the degradation in estimation performance from theoretical evaluation to practical hardware execution is systematically analyzed. In addition, measured and ECM-generated FUDS data are comparatively analyzed to assess whether ECM-generated data can serve as a feasible source for SOC estimation algorithm validation. The main contributions of this paper are summarized as follows:
  • A HAEKF-based SOC estimation method is developed for sodium-ion batteries to address the weak observability caused by the pronounced voltage plateau over the intermediate SOC range. This method integrates an OCV–SOC–slope-based measurement-noise regulation mechanism with the Sage–Husa posterior correction scheme. In this method, the OCV–SOC slope characterizes observability variation, while the voltage residual reflects state-prediction uncertainty, thereby enabling heterogeneous adaptive regulation of the measurement and process noise covariance matrices. Meanwhile, PSO is employed to globally optimize the key hyperparameters, thus improving SOC estimation accuracy and plateau-region robustness under complex operating conditions.
  • A HIL validation platform applicable to full-cell battery systems is established by incorporating key hardware links, including sampling, communication, control, and execution, thereby reproducing practical BMS hardware sampling-chain constraints and enabling quantitative evaluation of the degradation in estimation performance from theoretical evaluation to practical hardware execution.
  • A comparative analysis is conducted using measured and ECM-generated FUDS data. It examines whether ECM-generated data can reproduce the SOC-estimation-error evolution trends obtained with measured data. The analysis further evaluates whether such data can serve as a feasible source for SOC estimation algorithm performance evaluation and rapid validation.
The remainder of this paper is organized as follows. Section 2 presents battery modeling. Section 3 details the design of the proposed HAEKF algorithm with PSO-based hyperparameter optimization. Section 4 reports the experiments conducted on the HIL platform and discusses the corresponding results. Section 5 concludes the paper.

2. Battery Modeling

Accurate battery modeling is essential not only for SOC estimation but also for assessing the validity of ECM-generated data. Therefore, before developing the estimation algorithm and conducting data-source validation, a model capable of reproducing the battery’s dynamic behavior must first be established and verified.

2.1. Selection of the Equivalent Circuit Model

Sodium-ion batteries exhibit pronounced polarization dynamics and nonlinear voltage responses during charge and discharge. For engineering-oriented SOC estimation, the battery model should reproduce terminal-voltage variations under dynamic operating conditions while maintaining low parameterization complexity and real-time implementability. Common equivalent circuit models include the Rint model, the Thevenin model, the PNGV model, and higher-order RC network models [38]. The Rint model is simple but cannot adequately capture polarization behavior. The Thevenin and PNGV models improve transient fitting, but they require more parameters and higher computational cost. Although higher-order RC network models can describe dynamic responses in greater detail, their strong parameter coupling and implementation cost limit their suitability for online estimation and hardware-oriented validation [39].
Considering model accuracy, parameter identification difficulty, and the requirements of online SOC estimation and real-time HIL operation, a second-order ECM is selected in this paper. While maintaining low computational complexity, it can effectively characterize the ohmic internal resistance effect and polarization behavior over different time scales, thus achieving a practical balance between estimation accuracy and engineering feasibility. The structure of the adopted second-order ECM is shown in Figure 1.
According to Kirchhoff’s voltage and current laws, the mathematical equations of the second-order ECM can be expressed as follows:
{ U t = U O C I R 0 U 1 U 2 d U 1 d t = U 1 R 1 C 1 + I C 1 d U 2 d t = U 2 R 2 C 2 + I C 2 ,
where U O C denotes the open-circuit voltage, U t denotes the terminal voltage, I denotes the operating current of the battery, and R 0 denotes the ohmic internal resistance. R 1 and C 1 represent the electrochemical polarization resistance and capacitance, respectively, whereas R 2 and C 2 represent the concentration polarization resistance and capacitance, respectively. U 1 and U 2 denote the polarization voltages across the two RC branches, respectively.

2.2. Model Parameter Identification Based on Genetic Algorithm

A 200 Ah prismatic sodium-ion battery is selected as the test object. The experimental platform, shown in Figure 2, consists of a charge–discharge tester, a temperature chamber, a host computer, and the battery under test. Current and voltage data are collected by an Arbin BT2000 test system with a sampling interval of 1 s.
In this paper, the hybrid pulse power characterization (HPPC) test is employed to obtain the dynamic data required for model parameterization over the SOC range of 10–90%. At each 10% SOC interval, charge–discharge current pulses are applied, and the corresponding terminal-voltage response is recorded.
After each pulse test, the battery is allowed to rest for 30 min to reduce polarization effects from which the open-circuit voltage corresponding to the given SOC point is obtained. The experimental current profile and terminal-voltage response are shown in Figure 3a, whereas the resulting OCV–SOC relationship is shown in Figure 3b.
To identify the parameters of the second-order ECM at different SOC levels, a genetic algorithm is employed to optimize the parameter vector θ = [ R 0 , R 1 , R 2 , τ 1 , τ 2 ] , where R 0 denotes the ohmic internal resistance, R 1 and R 2 denote the polarization resistances, and τ 1 and τ 2 denote the time constants of the two RC branches, respectively. The genetic algorithm is adopted here because it can search a relatively large parameter space and reduce the dependence of the identification results on initial values, which is advantageous for the nonlinear and strongly coupled parameter identification problem of the second-order ECM.
For each SOC point and current direction, an initial population is randomly generated. The model terminal voltage is calculated from the current parameter set, and the mean-squared error between the calculated and measured voltages is used as the fitness function. The population is then updated through selection, crossover, and mutation until the stopping criterion is met. Mutation is retained to alleviate premature convergence and maintain population diversity. The detailed GA procedure is given in Algorithm 1, the corresponding settings are listed in Table 1, and the identified parameters under charge and discharge conditions at 25 °C are shown in Figure 4.
Algorithm 1: Genetic algorithm-based parameter identification
1: Input: HPPC test data segmented by SOC points S O C j { 10 % , 20 % , , 90 % } and current directions d i r { c h a r g e , d i s c h a r g e } , each with data length K .
2: Input: GA parameters: maximum generations G m a x , population size N p o p , crossover probability P c , mutation probability P m , and parameter search bounds.
3: Step 1: Initialization.
4: for each SOC point S O C j  do
5:   for each current direction d i r  do
6:    Generate initial population of individual X i = [ R 0 , R 1 , R 2 , τ 1 , τ 2 ] ,     i [ 1 , N p o p ] .
7: Step 2: Fitness evaluation.
8:    Compute model terminal voltage U ^ k = U o c v ( S O C j ) U 1 , k U 2 , k R 0 I k .
9:    Calculate MSE fitness F i t ( X i ) = 1 k k = 1 K ( U m e a n , k U ^ k ) 2 .
10: Step 3: GA optimization loop.
11:   for generation g = 1 to G m a x  do
12:    Evaluate fitness F i t ( X i ) for each individual i = 1,2 , , N p o p .
13:    Perform selection, crossover, and mutation to generate offspring.
14:    Update population for the next generation.
15:   end for
16:    Extract best individual X * = [ R 0 * , R 1 * , R 2 * , τ 1 * , τ 2 * ] , compute C 1 * = τ 1 * / R 1 * , C 2 * = τ 2 * / R 2 * .
17:    Record the identified parameters for current S O C j and d i r .
18:   end for
19: end for
20: Output: Optimal parameter sets { R 0 * , R 1 * , R 2 * , C 1 * , C 2 * } for all SOC points under charge and discharge conditions.

2.3. Model Validation Under Dynamic Operating Conditions

In this paper, the ECM is established not only as the voltage observation model for EKF-based SOC correction, but also as the basis for generating terminal-voltage sequences to evaluate SOC estimation performance under dynamic operating conditions. Therefore, an FUDS test is conducted under the same experimental conditions to verify whether the established second-order ECM can accurately reproduce the dynamic terminal-voltage characteristics of the battery.
The measured FUDS current is used as the model input, and the terminal-voltage response is calculated using the parameters identified in Section 2.2. Figure 5 compares the simulated and measured terminal voltages and shows the corresponding voltage error. The model can still track the terminal-voltage trajectory well under transient current fluctuations. The root-mean-square error (RMSE), mean absolute error (MAE), and maximum absolute error (MaxAE) are 5.97 mV, 4.35 mV, and 33.89 mV, respectively, indicating that the overall modeling error remains within a relatively small range.
Notably, the fitting error becomes more pronounced in the latter half of the FUDS profile. This is because the battery gradually enters the low-SOC region, where the voltage dynamics become more nonlinear, and the parameters identified at discrete SOC points and extended over the full SOC range through interpolation cannot fully characterize the local dynamic behavior. Under such conditions, a weighted fitness function may further improve the fitting performance.
Overall, these results demonstrate that the established second-order ECM can reproduce the dynamic voltage behavior of the battery with sufficient accuracy, thereby providing a reliable basis for the subsequent SOC estimation method and for model-based operating-condition data generation.

3. PSO-Based HAEKF Algorithm

To address the degraded observability in the voltage plateau region and the state-prediction uncertainty under complex operating conditions, a PSO-based HAEKF framework is proposed in this paper. As shown in Figure 6, the proposed framework constructs a multi-layer collaborative architecture composed of a parameter optimization layer, a heterogeneous adaptive layer, and an EKF estimation layer. By integrating battery characteristic information with online noise statistical information, this framework achieves dynamic regulation of noise statistical characteristics and coordinated optimization of the estimation process through the interactions among parameter optimization, adaptive regulation, and state estimation, thereby improving the accuracy, stability, and robustness of SOC estimation under complex operating conditions.

3.1. EKF-Based SOC Estimation

Based on the second-order ECM determined in Section 2, S O C and the polarization voltages U 1 and U 2 are selected as the system state variables. The system state vector is defined as x k = [ S O C k , U 1 , k , U 2 , k ] T , the current is selected as the system input u k = I k , and the battery terminal voltage is selected as the system observation y k = U k . Considering the significant nonlinear characteristics of the battery system, the general form of the discrete state-space equations can be written as follows:
{ x k + 1 = f ( x k , u k ) + w k y k = h ( x k , u k ) + v k ,
where w k denotes the process noise and v k denotes the measurement noise.
In the battery model considered in this paper, f ( x k , u k ) is a linear function, whereas h ( x k , u k ) is nonlinear because it involves the nonlinear mapping relationship between OCV and SOC. To apply the EKF, h ( x , u ) is expanded by first-order Taylor series about the a priori state estimate x ^ k + 1 , and by neglecting higher-order terms, the following approximation is obtained,
h ( x k + 1 , u k + 1 ) h ( x ^ k + 1 , u k + 1 ) + C k + 1 ( x k + 1 x ^ k + 1 ) ,
where C k + 1 denotes the Jacobian matrix of the observation function evaluated at x ^ k + 1 .
By combining the continuous-time differential equations of the second-order ECM and applying the zero-order hold discretization method under the sampling period T , the discrete parameter matrices of the model can be further derived. Specifically, the system state transition matrix A k , control input matrix B k , linearized observation matrix C k + 1 , and feedthrough matrix D k are given as follows:
A k = [ 1 0 0 0 e x p ( T / τ 1 ) 0 0 0 e x p ( T / τ 2 ) ] ,
B k = [ T / C n R 1 ( 1 e x p ( T / τ 1 ) ) R 2 ( 1 e x p ( T / τ 2 ) ) ] ,
C k + 1 = [ d O C V ( S O C ) d S O C | S O C ^ k + 1 1   1 ] ,
D k = R 0 ,
where τ j = R j C j denotes the time constant of the j th-order RC network, and C n denotes the rated capacity of the battery.
Accordingly, the complete discrete state-space model of the second-order ECM can be written as
{ x k + 1 = A k x k + B k u k + w k y k + 1 = h ( x k + 1 , u k + 1 ) + v k + 1 ,
where the observation function h ( x k + 1 , u k + 1 ) can be further expressed as
h ( x k + 1 , u k + 1 ) = O C V ( S O C k + 1 ) U 1 , k + 1 U 2 , k + 1 R 0 u k + 1 .
Based on the above discrete state-space model of the second-order equivalent circuit, the EKF can then be employed for SOC estimation. The initial estimate of the system state vector at the initial instant is set as x ^ 0 , and the initial error covariance matrix is set as P 0 . Meanwhile, according to the system modeling error and external disturbance characteristics, the process noise covariance matrix Q and the measurement noise covariance matrix R are specified. At the discrete time step k = 1,2 , , the recursive procedure of the EKF mainly consists of two stages, namely, state prediction and measurement correction, and the detailed flow is shown in Figure 7.

3.2. Heterogeneous Adaptive Mechanism

In the proposed HAEKF, two heterogeneous adaptive updates are introduced to address the time-varying uncertainty under complex operating conditions. Specifically, the measurement noise covariance matrix R is regulated according to the OCV–SOC slope to account for observability variation over different SOC intervals, while the process noise covariance matrix Q is updated using the voltage residual through the Sage–Husa scheme to reflect state-prediction uncertainty. These two adaptive paths jointly rebalance the relative weights of model prediction and measurement correction.

3.2.1. Adaptive Adjustment of the R Matrix Based on the OCV–SOC Slope

To address the weakened observation correction capability caused by the small OCV–SOC slope in the voltage plateau region, an OCV-slope-based adaptive regulation strategy for the measurement noise covariance matrix is introduced as follows,
R k , a d a p t i v e = R k   ×   R b a s e | d O C V / d S O C |   +   0.005 ,
where R k , a d a p t i v e denotes the adapted measurement noise covariance matrix, and R b a s e denotes the baseline sampling-noise level of the hardware measurement chain. In this paper, R b a s e is set to 0.002, according to the overall voltage sampling error level of the hardware system. R k is the tuning coefficient used to linearly scale the contribution of the slope to the observation weighting. | d O C V / d S O C | denotes the absolute value of the first derivative of the open-circuit voltage with respect to SOC. The constant 0.005 is introduced as a limiting term to prevent the denominator from becoming excessively small when the OCV–SOC slope approaches zero in the plateau region, thereby maintaining numerical stability. These two terms provide only the basic scaling and limiting settings, while the final adaptive measurement-noise covariance is jointly determined with the PSO-optimized coefficient R k .
This strategy uses the OCV–SOC slope to characterize the variation in observability over different SOC intervals. In the voltage plateau region, the small slope implies weak voltage sensitivity to SOC variation; accordingly, R is increased to reduce the Kalman gain and prevent over-reliance on weakly informative voltage measurements. In regions with a larger slope, R decreases accordingly, allowing the filter to place greater trust in measurement correction. In this manner, the balance between model prediction and measurement correction can be adaptively adjusted across different SOC intervals, thereby improving estimation stability in the plateau region as well as the overall estimation accuracy.

3.2.2. Adaptive Adjustment of the Q Matrix Based on the Sage–Husa Scheme

Because the prediction uncertainty of the battery model varies with operating conditions, a fixed process noise covariance matrix Q cannot adequately reflect the time-varying uncertainty in the state prediction process. To address this issue, a Sage–Husa-based update scheme is introduced to adapt Q online using the voltage residual, and the update equation is given by
Q k = ( 1 d k ) Q k 1 + d k [ K k r e s k r e s k T K k T ] ,
where Q k denotes the updated process noise covariance matrix at time k ; K k denotes the Kalman gain; r e s k denotes the residual between the measured voltage and the predicted voltage; and d k is the dynamic forgetting factor, which is calculated as
d k = ( 1 d ) / ( 1 d k ) ,
where d is the base forgetting factor used to control the relative weight between the estimate at the previous time step and the current residual information during the updating process of Q . By adjusting the value of d , the stability of the update and the response speed to error variations can be tuned.
This strategy realizes online adaptive correction of the process noise covariance matrix Q through the observation residual. An increase in the residual indicates that the inconsistency between the model prediction and the actual measurement is becoming larger, implying an increase in state-prediction uncertainty. Under this condition, Q is correspondingly increased so that the filter becomes more responsive to measurement correction. In contrast, when the residual remains relatively small, the updating magnitude of Q is reduced to avoid unnecessary fluctuations and to maintain estimation stability. Through this adaptive update mechanism, the algorithm can dynamically characterize the time-varying uncertainty of the prediction process and promptly adjust the filtering behavior when model mismatch occurs, thereby improving the tracking performance and robustness of SOC estimation under complex operating conditions.

3.3. Hyperparameter Optimization of the HAEKF Algorithm Based on PSO

To determine the key hyperparameters of the proposed heterogeneous adaptive mechanism, a PSO algorithm is employed to jointly optimize the forgetting factor d and the tuning coefficient R k in the offline stage.
PSO performs iterative global search in a two-dimensional hyperparameter space through particle information sharing and position updating. At the t-th iteration, the velocity and position of the i-th particle are updated as follows:
v i t + 1 = ω v i t + c 1 r 1 ( p b e s t i x i t ) + c 2 r 2 ( g b e s t x i t ) ,
x i t + 1 = x i t + v i t + 1 ,
where v i t + 1 and v i t denote the velocities of particle i at the (t + 1)-th and t-th iterations, respectively; x i t denotes the current position of the particle; x i t + 1 denotes the updated particle position; ω is the inertia weight; c 1 and c 2 are the cognitive and social learning factors, respectively; r 1 and r 2 are random numbers distributed within the interval [0, 1]; p b e s t i denotes the historical best position found by particle i ; and g b e s t denotes the global best position found by the entire particle swarm.
In the offline optimization stage, the sodium-ion battery data collected under the FUDS operating condition at 25 °C are used as the hyperparameter optimization dataset, and the particle position is defined as the candidate hyperparameter combination to be searched, namely, [ d i , R k , i ] . During each iteration, the HAEKF is executed using the current particle to obtain the corresponding SOC estimation result. The root-mean-square error of SOC estimation is then adopted as the fitness function to evaluate the quality of the current hyperparameter combination. Based on the individual best position of each particle and the global best position of the swarm, the particle velocity and position are iteratively updated, thereby balancing global exploration and local convergence in the hyperparameter search process.
Through iterative PSO search, the optimal hyperparameter combination is gradually identified. The detailed execution procedure is shown in Algorithm 2. To ensure numerical stability of the adaptive update and effective regulation of the adaptive mechanism, the search bounds of the forgetting factor d and the tuning coefficient R k are determined accordingly. The corresponding parameter settings, search bounds, and optimization results are listed in Table 2. Based on the offline optimization results, the optimal values of the forgetting factor d * and the tuning coefficient R k * are determined and then fixed for subsequent online HAEKF execution.
Algorithm 2: PSO-based parameter optimization for HAEKF SOC estimation
1: Input: FUDS dataset collected under laboratory conditions at 25 °C (current, voltage, and true SOC, with length N ).
2: Input: PSO parameters: maximum iterations I t e r m a x , swarm size N s w a r m , and search bounds.
3: Step 1: Initialization.
4: Generate initial 2D swarm of particles X i = [ d i , R k , i ] ,     i [ 1 , N s w a r m ] .
5: Initialize particle velocities V i .
6: Step 2: PSO optimization loop.
7: for iteration t = 1 to I t e r m a x  do
8:  for each particle i = 1,2 , , N s w a r m  do
9:      Update the HAEKF hyperparameters using the current particle X i .
10:    Execute the HAEKF to obtain the estimated SOC sequence { S O C e s t , k } k = 1 N .
11:    Calculate the SOC error with respect to the true SOC.
12:    Evaluate the fitness function F i t ( X i ) :
F i t ( X i ) = 1 N k = 1 N ( S O C e s t , k S O C t r u e , k ) 2
13:    end for
14:    Update individual best position ( p B e s t ) and global best position ( g B e s t ).
15:    if  t < I t e r m a x  then
16:   Particle evolution: update velocity and position for all particles.
17:    end if
18: end for
19: Extract the optimal parameters from g B e s t .
20: Output: Optimal parameters d * and R k * .

4. Experiments and Discussion

To evaluate the performance of the proposed PSO-based HAEKF under complex operating conditions, this section presents the HIL experimental platform and validates the battery simulator. It then compares the SOC estimation results under different execution environments and data-source conditions. By comparing the theoretical environment with the HIL execution environment, the performance variation from theoretical evaluation to practical hardware execution is quantitatively analyzed. In addition, measured and ECM-generated FUDS data are compared to examine whether ECM-generated data can reproduce the SOC-estimation-error evolution trends obtained with measured data and serve as a feasible data source for algorithm validation.

4.1. HIL Platform Architecture Design

To quantify the variation in SOC estimation performance from theoretical evaluation to practical hardware execution, a HIL validation platform based on a self-developed battery simulator is established in this paper.
As shown in Figure 8, the proposed platform forms a closed-loop validation chain integrating model execution, hardware response, signal sampling, and online estimation. Within this framework, dSPACE executes the battery model in real time, while the current source and the self-developed battery simulator reproduce the corresponding operating response. Based on the sampled voltage and current signals, the BMS then performs online SOC estimation. According to their respective functions, the platform can be divided into three modules, namely, the real-time simulation control module, the hardware execution module, and the sampling and algorithm execution module.
  • Real-Time Simulation Control Module
The real-time simulation control module is responsible for battery-model execution, control-command generation, and timing coordination. According to the requirements of different validation scenarios, a real-time battery model is first developed in Simulink (The MathWorks, Inc., Natick, MA, USA) on the host computer and then deployed to the dSPACE (dSPACE GmbH, Paderborn, Germany) platform for online execution. This module communicates with the hardware execution module via Ethernet and updates the control commands at a fixed time step of 1 s, thereby ensuring coordinated operation and real-time interaction among the different components of the HIL platform.
  • Hardware Execution Module
The hardware execution module converts the digital commands generated by dSPACE into physical signals that can be acquired by the BMS. For terminal-voltage emulation, the self-developed battery simulator updates the cell voltage in real time according to the model output, with an update period of 1 s, thereby reproducing the terminal-voltage response of the sodium-ion battery under dynamic operating conditions. For current execution, an IT-M3903D programmable current source (ITECH Electronic Co., Ltd., Nanjing, China) receives the current command and outputs the corresponding loop current. Its command update period is also 1 s, enabling accurate reproduction of current pulses in operating-condition tests.
  • Sampling and Algorithm Execution Module
The sampling and algorithm execution module is intended to reproduce the practical sampling-chain characteristics and online estimation workflow of the BMS. Specifically, the cell voltage is acquired by the LTC6804G-1 analog front-end chip (Analog Devices, Inc., Wilmington, MA, USA) and transmitted to the BMS main control board through daisy-chain communication, while the battery current is measured by the HNC-LT500 Hall sensor (Nanjing Zhongxu Electronic Technology Co., Ltd., Nanjing, China). The voltage and current data are processed by the BMS at an update period of 1 s. Based on the acquired signals, the BMS main control board runs the proposed HAEKF for real-time SOC estimation. The estimated SOC, together with the raw voltage and current data, is then uploaded to the host computer via Ethernet every 1 s, thereby enabling online observation of the estimation process and subsequent result analysis.

4.2. Performance Validation of the Battery Simulator

Before analyzing the SOC estimation results, the output performance of the self-developed battery simulator is first validated. As the core execution unit of the HIL platform, the simulator should provide sufficient output accuracy and dynamic response capability. This step is necessary to reduce the influence of simulator-induced output deviation and response delay on the subsequent comparison of SOC estimation performance. Specifically, the steady-state output accuracy and dynamic response characteristics of the simulator are evaluated to determine whether its physical output can reproduce the commanded voltage with sufficient accuracy and responsiveness over the operating range of the HIL platform.

4.2.1. Steady-State Output Accuracy

The voltage output module is driven by host-computer software developed in LabWindows, while the output voltage is measured in a closed loop using an Agilent 34410A 61/2-digit digital multimeter (Agilent Technologies, Inc., Santa Clara, CA, USA) controlled through the VISA library. Figure 9 illustrates the overall test setup used for steady-state output accuracy evaluation. During the test, the single-channel output voltage is varied from 0.1 V to 5 V, with a step size of 10 mV, in order to examine the output accuracy of the battery simulator over the selected voltage range.
The test results are shown in Figure 10. Over the tested voltage range, the error between the preset output value of the battery simulator and the value measured by the digital multimeter is controlled within 0.2 mV. These results indicate that the developed battery simulator provides high steady-state output accuracy and can support accurate voltage-command reproduction in the subsequent HIL experiments.

4.2.2. Dynamic Response Characteristics

To evaluate the dynamic response capability of the battery simulator, its output voltage is switched between 0.1 V and 5 V, and the corresponding transition process is measured using a Tektronix TPS2014 oscilloscope and a P2220 probe (Tektronix, Inc., Beaverton, OR, USA).
The test results are shown in Figure 11. When the system output voltage changes from 0.1 V to 5 V, the rise time is approximately 1 ms, corresponding to an average voltage slew rate of about 4900 V/s. When the voltage changes from 5 V to 0.1 V, the fall time is approximately 2 ms, corresponding to an average voltage slew rate of about 2450 V/s.
In summary, the developed battery simulator exhibits high steady-state output accuracy and fast dynamic voltage response within the tested voltage range. Specifically, the steady-state output error is controlled within 0.2 mV, while the average voltage slew rates during the rising and falling processes are approximately 4900 V/s and 2450 V/s, respectively. Considering that the voltage-command update period of the HIL platform is 1 s, the response speed of the simulator is sufficient for the subsequent HIL-based SOC estimation experiments. Therefore, the influence of simulator-induced output deviation and response lag on the subsequent comparative analysis is expected to be limited.

4.3. Comparative Analysis of SOC Estimation Errors Under Multiple Scenarios

Within the unified HIL validation framework established in this paper, four comparative scenarios are designed under different data-source and execution-environment conditions to quantify the variation in SOC estimation performance from theoretical evaluation to practical hardware execution, as shown in Figure 12.
Specifically, the data sources include measured FUDS data and ECM-generated FUDS data, whereas the execution environments include the host-computer-based theoretical environment and the HIL execution environment. To eliminate the influence of hyperparameter differences on the error comparison results, the HAEKF algorithm with fixed hyperparameters is adopted for SOC estimation in all four scenarios, where the hyperparameters are determined by the PSO-based offline optimization described in the previous section. The specific scenarios and their purposes are as follows.
  • Scenario 1 (Measured Data—Ideal Baseline)
Measured voltage and current data of the sodium-ion battery under the FUDS operating condition are collected using the Arbin BT2000 test system, and the HAEKF algorithm is executed in the host-computer-based theoretical environment for SOC estimation. This scenario excludes the influence of hardware sampling and execution constraints and serves as the ideal baseline for subsequent comparison.
  • Scenario 2 (Measured Data—HIL Execution)
The same measured FUDS data used in Scenario 1 are introduced into the HIL platform, where the BMS performs online SOC estimation based on the real-time physical signals provided by the platform. This scenario is used to quantify the degradation in SOC estimation performance when the algorithm is transferred from the theoretical environment to the HIL execution environment under measured-data conditions.
  • Scenario 3 (ECM-Generated Data—Ideal Baseline)
Based on the second-order ECM established in Section 2, the corresponding terminal-voltage sequence is generated using the original FUDS current profile, and the HAEKF algorithm is executed in the host-computer-based theoretical environment for SOC estimation. This scenario is used to examine whether ECM-generated data can reproduce error-evolution patterns consistent with those of measured data under ideal conditions and thereby serve as a feasible validation data source in the theoretical environment.
  • Scenario 4 (ECM-Generated Data—HIL Execution)
The terminal-voltage sequence generated in Scenario 3 is introduced into the HIL platform under the same sampling and execution constraints as those in Scenario 2, and the BMS main controller executes the HAEKF algorithm online to complete SOC estimation. This scenario is used to examine whether ECM-generated data can maintain error-evolution patterns consistent with those observed under measured-data HIL execution and can, therefore, serve as a feasible validation data source in the hardware execution environment.
Through a comparative analysis of the above four scenarios, the degradation in SOC estimation performance from theoretical evaluation to practical hardware execution is quantitatively analyzed, while the feasibility of ECM-generated data as a validation data source under both the theoretical environment and HIL conditions is also evaluated.

4.3.1. Performance Comparison Between the Ideal Baseline and HIL Execution

This subsection compares Scenario 1 and Scenario 2 under measured FUDS data to quantify the degradation in SOC estimation performance from theoretical evaluation to practical hardware execution at 25 °C with an initial SOC deviation of 10%. In addition, Scenario 1 is further examined at 15 °C and 35 °C and under composite sampling disturbances to evaluate the adaptability and robustness of the proposed algorithm.
The SOC estimation results of Scenario 1 and Scenario 2 are shown in Figure 13a,b, respectively. Under the ideal conditions in Scenario 1, the proposed HAEKF algorithm rapidly corrects the 10% initial SOC deviation and stably tracks the true SOC trajectory throughout the entire FUDS profile. The RMSE and MAE are 0.25% and 0.11%, respectively, and the deviation is corrected within 722 s. After convergence, the MaxAE remains within 0.43%. These results indicate that the proposed HAEKF maintains good convergence capability and high estimation accuracy under ideal conditions.
Scenario 2 introduces the practical sampling and execution constraints of the HIL platform on the basis of Scenario 1. The corresponding SOC estimation result is shown in Figure 13b, and the associated current and voltage sampling results are presented in Figure 14. As shown in Figure 14a, the sampled current exhibits an MAE of 309.08 mA and an RMSE of 421.96 mA. As shown in Figure 14b, the sampled voltage exhibits an MAE of 3.16 mV and an RMSE of 3.24 mV. These results indicate that measurable current and voltage sampling errors are introduced by the practical hardware chain. Even under these conditions, the proposed HAEKF still achieves an RMSE of 0.63% and an MAE of 0.60%, and it corrects the 10% initial SOC deviation within 771 s. After convergence, the MaxAE remains within 1.07%, indicating that the proposed algorithm retains stable online estimation capability under practical hardware non-idealities.
To further examine the temperature adaptability of the proposed algorithm, additional FUDS tests are conducted in Scenario 1 at 15 °C and 35 °C. The results are shown in Figure 15a,b, respectively. The proposed algorithm maintains stable tracking performance under both temperature conditions. At 15 °C, the RMSE and MAE are 0.33% and 0.15%, respectively. At 35 °C, the corresponding values are 0.42% and 0.35%, respectively. Compared with the result at 25 °C, the estimation error increases slightly at non-nominal temperatures. However, the overall error remains low, and no divergence is observed. These results indicate good estimation accuracy and convergence capability within the tested temperature range.
Beyond temperature adaptability, a composite-disturbance test is further conducted in Scenario 1 to evaluate the algorithm’s robustness under extreme sensing environments, and the result is shown in Figure 16. In this test, additional perturbations are introduced into the sampled current and voltage signals to emulate sensing abnormalities involving both systematic and random errors. Since random measurement errors in practical sensing systems are commonly approximated by a Gaussian distribution, Gaussian perturbations are adopted to construct the disturbance conditions. The magnitudes of the imposed perturbations are selected according to the upper error bounds specified in the datasheets of the sensing devices used in the established HIL platform so as to construct a severe yet physically meaningful boundary-condition scenario. Specifically, Gaussian perturbations with a mean of 2 A and a standard deviation of 2 A are superimposed on the current samples, while Gaussian perturbations with a mean of 20 mV and a standard deviation of 20 mV are superimposed on the voltage samples. In these settings, the mean value represents the systematic error component, whereas the standard deviation characterizes the magnitude of the random error component. In addition, 50 current sampling points and 50 voltage sampling points are randomly forced to zero to emulate communication abnormalities or intermittent sensor faults.
Even under these composite disturbances, the proposed HAEKF still maintains stable tracking of the true SOC trajectory, with an MAE of 1.04% and an RMSE of 1.20%. Although the estimation error increases compared with that in Scenario 1 at 25 °C, no evident divergence or sustained oscillation is observed, indicating that the proposed algorithm preserves stable estimation capability under severe sensing disturbances and intermittent sampling anomalies.
Overall, the proposed HAEKF maintains stable convergence and satisfactory estimation accuracy in Scenario 1 and Scenario 2 while also exhibiting good adaptability and robustness under the additional tests at 15 °C, 35 °C, and composite disturbance conditions. Meanwhile, the comparison between Scenario 1 and Scenario 2 at 25 °C indicates that practical hardware sampling and execution constraints introduce non-negligible degradation in estimation performance when the algorithm is transferred from the theoretical environment to the HIL execution environment, thereby demonstrating the necessity of HIL validation for engineering-oriented SOC estimation.

4.3.2. Effectiveness of ECM-Generated Data for Validation

This subsection evaluates the feasibility of using ECM-generated data as a validation data source for SOC estimation algorithm performance assessment under the FUDS condition at 25 °C based on the results of Scenario 3 and Scenario 4. Specifically, it examines whether ECM-generated data can reproduce error-evolution patterns consistent with those obtained from measured data under both the theoretical environment and HIL conditions.
The SOC estimation results of Scenario 3 are shown in Figure 17a. Under an initial SOC deviation of 10%, the estimation curve obtained using ECM-generated data stably tracks the reference SOC trajectory, and its error-evolution trend, convergence process, and steady-state error level remain highly consistent with those of Scenario 1. In particular, Scenario 3 exhibits a convergence pattern similar to that observed under measured-data conditions. These results indicate that, under ideal conditions, ECM-generated data can reproduce the overall error-evolution pattern obtained from measured data and can, therefore, serve as a feasible validation data source for algorithm performance assessment in the theoretical environment.
The SOC estimation results of Scenario 4 are shown in Figure 17b, and the corresponding current and voltage sampling results and errors are shown in Figure 18. Under the same hardware execution chain constraints, the current and voltage sampling errors in Scenario 4 are generally close to those in Scenario 2 in both amplitude and fluctuation characteristics, indicating that the sampling error levels introduced by the hardware execution chain remain comparable in the two scenarios. Under this condition, the SOC estimation error-evolution trend and convergence process in Scenario 4 remain highly consistent with those in Scenario 2. These results indicate that, under HIL conditions, ECM-generated data can still reproduce error-evolution patterns consistent with those obtained from measured data and can, therefore, serve as a feasible validation data source in the hardware execution environment.
A further comparison of the error metrics of the four scenarios at 25 °C with an initial SOC deviation of 10%, as summarized in Table 3, shows that ECM-generated data yield slightly higher estimation accuracy than the corresponding measured data in both the theoretical and HIL environments. This result mainly arises because ECM-generated data are derived from deterministic equivalent-circuit equations. Therefore, their state evolution and terminal-voltage response are more consistent with the prediction and update mechanism of the Kalman filter. By contrast, measured data contain polarization hysteresis, time-varying parameters, sensor noise, and stronger electrochemical nonlinearities. These factors cannot be fully captured by the model, and thus, increase the difficulty of state identification. Nevertheless, despite the difference in absolute error magnitude, the two data sources remain highly consistent in terms of SOC-estimation-error evolution trends and cross-environment variation patterns.
Overall, ECM-generated data can effectively reflect the error characteristics of the algorithm in the theoretical environment. They can also characterize, with relatively high fidelity, the performance variation under hardware-execution constraints in the HIL environment. Therefore, ECM-generated data can serve as a feasible data source for SOC-estimation algorithm performance evaluation and rapid validation.

5. Conclusions

This paper investigates SOC estimation for sodium-ion batteries under complex operating conditions. A PSO-HAEKF is proposed, and a HIL validation platform is established to reproduce practical BMS hardware sampling-chain constraints. The feasibility of using ECM-generated data as a validation data source is also evaluated. The main conclusions are as follows: (1) The proposed PSO-HAEKF achieves high estimation accuracy and stable convergence in both the theoretical and HIL environments. Under measured FUDS data at 25 °C, the MAE and RMSE are 0.11% and 0.25% in the theoretical environment, respectively. Under HIL conditions, the corresponding values are 0.60% and 0.63%, respectively. Even under HIL conditions, the proposed algorithm still achieves fast convergence, correcting the 10% initial SOC deviation within 771 s. Additional tests at different temperatures and under composite disturbance conditions further demonstrate the adaptability and robustness of the proposed algorithm. (2) The HIL results show that practical hardware sampling-chain constraints introduce noticeable degradation in SOC estimation performance. Under the FUDS condition at 25 °C, the RMSE increases from 0.25% in the theoretical environment to 0.63% under HIL conditions. This indicates that such degradation cannot be fully captured by software-only evaluation. Therefore, HIL validation is necessary to quantify the performance degradation from theoretical evaluation to practical hardware execution. (3) Under both the theoretical and HIL conditions, ECM-generated and measured FUDS data remain highly consistent in terms of SOC-estimation-error evolution trends. Although ECM-generated data yield slightly higher estimation accuracy than measured data, the difference is mainly reflected in the absolute error magnitude and does not change the overall error-evolution pattern. Therefore, ECM-generated data can serve as a feasible validation data source for SOC estimation algorithm performance evaluation and rapid validation under the tested conditions.
Overall, SOC estimation assessment should consider not only accuracy in the theoretical environment, but also performance degradation caused by practical hardware constraints. These results provide a useful reference for the deployment-oriented validation and engineering application of sodium-ion battery SOC estimation algorithms under the tested conditions.

Author Contributions

Conceptualization, Y.L. and X.F.; methodology, Y.W., J.D. and J.T.; software, Y.W.; validation, Y.W. and J.D.; formal analysis, J.T.; investigation, Y.L.; resources, X.F.; data curation, J.T.; writing—original draft preparation, Y.L.; writing—review and editing, Y.W. and J.D.; visualization, J.T.; supervision, Y.L.; project administration, X.F.; funding acquisition, Y.W., J.D. and J.T. All authors have read and agreed to the published version of the manuscript.

Funding

This work is supported by the China Southern Power Grid Technology Project (090000KC25010006/SZKJXM20250009).

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Conflicts of Interest

Authors Yizeng Wu, Jinqiao Du, and Jie Tian are employed by the Shenzhen Power Supply company. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest. The authors declare that this study receives funding from the China Southern Power Grid Technology Project. The funder is not involved in the study design, collection, analysis, interpretation of data, the writing of this article or the decision to submit it for publication.

Abbreviations

BMSBattery management system
ECMEquivalent circuit model
EKFExtended Kalman filter
FUDSFederal Urban Driving Schedule
GAGenetic algorithm
HAEKFHeterogeneous adaptive extended Kalman filter
HILHardware-in-the-loop
HPPCHybrid pulse power characterization
MAEMean absolute error
MaxAEMaximum absolute error
OCVOpen-circuit voltage
PSOParticle swarm optimization
RMSERoot-mean-square error
SOCState of charge

References

  1. Xiong, L.; Li, T.; Huang, S.; Li, P.; Wang, Z.; Sun, Z.; Niu, T. Optimized sizing of ESSs in non-array formed wind farm for frequency support considering multi-directional wake effect. IEEE Trans. Sustain. Energy 2026, 17, 1878. [Google Scholar] [CrossRef]
  2. Zhao, C.; Andersen, P.B.; Træholt, C.; Hashemi, S. Grid-connected battery energy storage system: A review on application and integration. Renew. Sustain. Energy Rev. 2023, 182, 113400. [Google Scholar] [CrossRef]
  3. Kumar, K.; Kundu, R. Empowering energy storage technology: Recent breakthroughs and advancement in sodium-ion batteries. ACS Appl. Energy Mater. 2024, 7, 3523–3539. [Google Scholar] [CrossRef]
  4. Wu, Y.; Shuang, W.; Wang, Y.; Chen, F.; Tang, S.; Wu, X.-L.; Bai, Z.; Yang, L.; Zhang, J. Recent progress in sodium-ion batteries: Advanced materials, reaction mechanisms and energy applications. Electrochem. Energy Rev. 2024, 7, 17. [Google Scholar] [CrossRef]
  5. Che, Y.; Xu, L.; Teodorescu, R.; Hu, X.; Onori, S. Enhanced SOC estimation for LFP batteries: A synergistic approach using Coulomb counting reset, machine learning, and relaxation. ACS Energy Lett. 2025, 10, 741–749. [Google Scholar] [CrossRef]
  6. Wu, L.; Lyu, Z.; Huang, Z.; Zhang, C.; Wei, C. Physics-based battery SOC estimation methods: Recent advances and future perspectives. J. Energy Chem. 2024, 89, 27–40. [Google Scholar] [CrossRef]
  7. Hannan, M.A.; Lipu, M.S.H.; Hussain, A.; Mohamed, A. A review of lithium-ion battery state of charge estimation and management system in electric vehicle applications: Challenges and recommendations. Renew. Sustain. Energy Rev. 2017, 78, 834–854. [Google Scholar] [CrossRef]
  8. Tian, J.; Xiong, R.; Shen, W.; Lu, J. State-of-charge estimation of LiFePO4 batteries in electric vehicles: A deep-learning enabled approach. Appl. Energy 2021, 291, 116812. [Google Scholar] [CrossRef]
  9. Wang, L.; Gao, K.; Han, J.; Zhao, X.; Liu, L.; Pan, C.; Li, G.; Wang, Y. Battery pack SOC estimation by Noise Matrix Self Adjustment-Extended Kalman Filter algorithm based on cloud data. J. Energy Storage 2024, 84, 110706. [Google Scholar] [CrossRef]
  10. Chai, X.; Li, S.; Liang, F. A novel battery SOC estimation method based on random search optimized LSTM neural network. Energy 2024, 306, 132583. [Google Scholar] [CrossRef]
  11. Li, M.; Fei, Z.; Yang, L.; Zhang, Z.; Tsui, K.-L. Domain-adaptive state of health prediction of vehicle batteries powered by deep learning. Cell Rep. Phys. Sci. 2025, 6, 102550. [Google Scholar] [CrossRef]
  12. Chen, Y.; Duan, W.; Huang, X.; Wang, S. Multi-output fusion SOC and SOE estimation algorithm based on deep network migration. Energy 2024, 308, 133032. [Google Scholar] [CrossRef]
  13. Yi, Z.; Wang, L.; Yang, K. State of charge estimation for lithium-ion battery using Time Series Transformer with De-noise De-stationary Inception Network. J. Energy Storage 2024, 93, 112224. [Google Scholar] [CrossRef]
  14. Zhao, B.; Zhang, W.; Zhang, Y.; Zhang, C.; Zhang, C.; Zhang, J. Lithium-ion battery remaining useful life prediction based on interpretable deep learning and network parameter optimization. Appl. Energy 2025, 379, 124713. [Google Scholar] [CrossRef]
  15. Yan, L.; Peng, J.; Li, H.; Huang, Z.; Sauer, D.U.; Li, W. Breaking the voltage plateau barrier: Slope-adaptive state-of-charge estimation for LFP batteries with temperature-aware hysteresis modeling. eTransportation 2025, 26, 100473. [Google Scholar] [CrossRef]
  16. Feng, Y.-F.; Shen, J.-N.; Ma, Z.-F.; He, Y.-J. Equivalent circuit modeling of sodium-ion batteries. J. Energy Storage 2021, 43, 103233. [Google Scholar] [CrossRef]
  17. Jiang, C.; Wang, Y.; Sun, Z.; Chen, Z. Fractional-order equivalent circuit model for commercial sodium-ion batteries in a wide temperature range considering aging. J. Energy Storage 2025, 105, 114552. [Google Scholar] [CrossRef]
  18. Sangeetha, E.P.; Subashini, N.; Santhosh, T.K.; Augusti Lindiya, S.; Uma, D. Validation of EKF based SoC estimation using vehicle dynamic modelling for range prediction. Electr. Power Syst. Res. 2024, 226, 109905. [Google Scholar] [CrossRef]
  19. Wang, C.; Yang, M.; Wang, X.; Xiong, Z.; Qian, F.; Deng, C.; Yu, C.; Zhang, Z.; Guo, X. A review of battery SOC estimation based on equivalent circuit models. J. Energy Storage 2025, 110, 115346. [Google Scholar] [CrossRef]
  20. Sun, D.; Yu, X.; Wang, C.; Zhang, C.; Huang, R.; Zhou, Q.; Amietszajew, T.; Bhagat, R. State of charge estimation for lithium-ion battery based on an intelligent adaptive extended Kalman filter with improved noise estimator. Energy 2021, 214, 119025. [Google Scholar] [CrossRef]
  21. Zhu, Q.; Xu, M.; Liu, W.; Zheng, M. A state of charge estimation method for lithium-ion batteries based on fractional order adaptive extended Kalman filter. Energy 2019, 187, 115880. [Google Scholar] [CrossRef]
  22. ElMenshawy, M.S.; Massoud, A.M.; Guglielmi, P. State-of-charge estimation using triple forgetting factor adaptive extended Kalman filter for battery energy storage systems in electric bus applications. IEEE Trans. Transp. Electrif. 2025, 11, 6664–6674. [Google Scholar] [CrossRef]
  23. Li, M.; Zhang, Y.; Hu, Z.; Zhang, Y.; Zhang, J. A Battery SOC Estimation Method Based on AFFRLS-EKF. Sensors 2021, 21, 5698. [Google Scholar] [CrossRef]
  24. Li, F.; Wang, H.; Chen, H.; Geng, L.; Wu, C. State-of-Charge Estimation of Lithium-Ion Batteries Based on GMMCC-AEKF in Non-Gaussian Noise Environment. Batteries 2026, 12, 29. [Google Scholar] [CrossRef]
  25. Rout, S.; Das, S. A noise covariance regulated robust modified adaptive extended Kalman filter for state of charge estimation of lithium-ion battery. IEEE Access 2024, 12, 78434–78448. [Google Scholar] [CrossRef]
  26. Wang, S.; Gao, F.; Tian, H.; Zhang, Y.; Pan, W. Accurate state-of-charge estimation for sodium-ion batteries based on a low-complexity model with hierarchical learning. J. Energy Storage 2024, 95, 112571. [Google Scholar] [CrossRef]
  27. Hong, S.; Kang, M.; Park, H.; Kim, J.; Baek, J. Real-time state-of-charge estimation using an embedded board for Li-ion batteries. Electronics 2022, 11, 2010. [Google Scholar] [CrossRef]
  28. Alharbi, T.; Restrepo, M.; Kazerani, M.; Bhattacharya, K. Control and hardware-in-the-loop simulation of community energy storage systems based on repurposed electric vehicle batteries. IEEE Access 2023, 11, 146238–146249. [Google Scholar] [CrossRef]
  29. Verani, A.; Di Rienzo, R.; Nicodemo, N.; Baronti, F.; Roncella, R.; Saletti, R. Modular battery emulator for development and functional testing of battery management systems: Hardware design and characterization. Electronics 2023, 12, 1232. [Google Scholar] [CrossRef]
  30. Suti, A.; Budinger, M.; Di Rito, G.; Reysset, A. Development and HIL validation of observer-based monitoring algorithms of battery packs for eVTOL UAV applications. Appl. Energy 2025, 401, 126637. [Google Scholar] [CrossRef]
  31. Le, Q.D.; Lam, Q.M.; Huynh, M.N.; Nguyen, H.H.; Duong, V.T. Hardware-in-the-loop simulation for online identification of lithium-ion battery model parameters and state of charge estimation. Results Eng. 2025, 25, 104509. [Google Scholar] [CrossRef]
  32. Zhang, Y.; Xiong, R.; He, H.; Shen, W. Lithium-ion battery pack state of charge and state of energy estimation algorithms using a hardware-in-the-loop validation. IEEE Trans. Power Electron. 2017, 32, 4421–4431. [Google Scholar] [CrossRef]
  33. Zhang, H.; Altaf, F.; Wik, T. Synthetic dataset of LG M50 batteries with different degradation pathways. Data Brief. 2024, 57, 111076. [Google Scholar] [CrossRef] [PubMed]
  34. Channegowda, J.; Maiya, V.; Lingaraj, C. A deep learning approach towards generating high-fidelity diverse synthetic battery datasets. IEEE Trans. Ind. Appl. 2023, 59, 4620–4627. [Google Scholar] [CrossRef]
  35. Chianese, G.; Iannucci, L.; Veneri, O.; Capasso, C. Real-time estimation of battery SoC through neural networks trained with model-based datasets: Experimental implementation and performance comparison. Appl. Energy 2025, 389, 125783. [Google Scholar] [CrossRef]
  36. Hou, J.; Xu, J.; Lin, C.; Jiang, D.; Mei, X. State of charge estimation for lithium-ion batteries based on battery model and data-driven fusion method. Energy 2024, 290, 130056. [Google Scholar] [CrossRef]
  37. Ramshankar, S.; Manimozhi, M. Integration of digital twin technologies for state estimation in electric vehicle batteries: A review. Results Eng. 2025, 27, 106858. [Google Scholar] [CrossRef]
  38. Manjunath, H.N.; Chilukoti, H.K. High-rate discharge behavior and augmented reduced-order modeling of 18650 sodium-ion battery. J. Energy Storage 2026, 145, 120068. [Google Scholar] [CrossRef]
  39. Zheng, B.; Deng, Z.; Luo, Z.; Mao, S.; Ouyang, M.; Han, X.; Wang, H.; Li, Y.; Sun, Y.; Wang, D.; et al. A comprehensive review of lithium-ion battery modelling research and prospects: In-depth analysis of current research and future directions. Appl. Energy 2025, 401, 126688. [Google Scholar] [CrossRef]
Figure 1. Schematic of the second-order equivalent circuit model.
Figure 1. Schematic of the second-order equivalent circuit model.
Electronics 15 01871 g001
Figure 2. Experimental setup for the HPPC test of the sodium-ion battery.
Figure 2. Experimental setup for the HPPC test of the sodium-ion battery.
Electronics 15 01871 g002
Figure 3. HPPC test results at 25 °C and the OCV–SOC curve: (a) current profile and terminal-voltage response during the HPPC test; (b) OCV–SOC curve.
Figure 3. HPPC test results at 25 °C and the OCV–SOC curve: (a) current profile and terminal-voltage response during the HPPC test; (b) OCV–SOC curve.
Electronics 15 01871 g003
Figure 4. Identified parameters of the second-order model at different SOC levels under charge and discharge conditions at 25 °C: (a) charging; (b) discharging.
Figure 4. Identified parameters of the second-order model at different SOC levels under charge and discharge conditions at 25 °C: (a) charging; (b) discharging.
Electronics 15 01871 g004
Figure 5. Simulated and measured terminal voltages under the FUDS condition at 25 °C and the corresponding voltage error.
Figure 5. Simulated and measured terminal voltages under the FUDS condition at 25 °C and the corresponding voltage error.
Electronics 15 01871 g005
Figure 6. Schematic of the proposed PSO-based HAEKF framework for SOC estimation. Solid arrows indicate the main signal/data and parameter-update flows, whereas dashed arrows indicate auxiliary adaptive feedback information.
Figure 6. Schematic of the proposed PSO-based HAEKF framework for SOC estimation. Solid arrows indicate the main signal/data and parameter-update flows, whereas dashed arrows indicate auxiliary adaptive feedback information.
Electronics 15 01871 g006
Figure 7. Flowchart of the EKF-based SOC estimation process. Downward arrows indicate the main calculation sequence, whereas curved arrows indicate measurement input and feedback correction paths.
Figure 7. Flowchart of the EKF-based SOC estimation process. Downward arrows indicate the main calculation sequence, whereas curved arrows indicate measurement input and feedback correction paths.
Electronics 15 01871 g007
Figure 8. The proposed HIL validation platform architecture.
Figure 8. The proposed HIL validation platform architecture.
Electronics 15 01871 g008
Figure 9. Schematic of the steady-state output accuracy test for the battery simulator.
Figure 9. Schematic of the steady-state output accuracy test for the battery simulator.
Electronics 15 01871 g009
Figure 10. Results of the steady-state output accuracy test for the battery simulator.
Figure 10. Results of the steady-state output accuracy test for the battery simulator.
Electronics 15 01871 g010
Figure 11. Results of the dynamic response characteristic test for the battery simulator: (a) rising-edge response; (b) falling-edge response.
Figure 11. Results of the dynamic response characteristic test for the battery simulator: (a) rising-edge response; (b) falling-edge response.
Electronics 15 01871 g011
Figure 12. Schematic of the multi-scenario comparative framework for SOC estimation errors.
Figure 12. Schematic of the multi-scenario comparative framework for SOC estimation errors.
Electronics 15 01871 g012
Figure 13. SOC estimation results and corresponding errors under measured FUDS data at 25 °C with an initial SOC deviation of 10%: (a) Scenario 1; (b) Scenario 2.
Figure 13. SOC estimation results and corresponding errors under measured FUDS data at 25 °C with an initial SOC deviation of 10%: (a) Scenario 1; (b) Scenario 2.
Electronics 15 01871 g013
Figure 14. Current and voltage sampling results and corresponding errors in Scenario 2: (a) current sampling result and error; (b) voltage sampling result and error.
Figure 14. Current and voltage sampling results and corresponding errors in Scenario 2: (a) current sampling result and error; (b) voltage sampling result and error.
Electronics 15 01871 g014
Figure 15. SOC estimation results and corresponding errors for Scenario 1 under different temperature conditions with an initial SOC deviation of 10%: (a) 15 °C; (b) 35 °C.
Figure 15. SOC estimation results and corresponding errors for Scenario 1 under different temperature conditions with an initial SOC deviation of 10%: (a) 15 °C; (b) 35 °C.
Electronics 15 01871 g015
Figure 16. Robustness test result of Scenario 1 under composite disturbances including Gaussian current and voltage perturbations and randomly imposed zero-value sampling anomalies.
Figure 16. Robustness test result of Scenario 1 under composite disturbances including Gaussian current and voltage perturbations and randomly imposed zero-value sampling anomalies.
Electronics 15 01871 g016
Figure 17. SOC estimation results and corresponding errors under ECM-generated FUDS data at 25 °C with an initial SOC deviation of 10%: (a) Scenario 3; (b) Scenario 4.
Figure 17. SOC estimation results and corresponding errors under ECM-generated FUDS data at 25 °C with an initial SOC deviation of 10%: (a) Scenario 3; (b) Scenario 4.
Electronics 15 01871 g017
Figure 18. Current and voltage sampling results and corresponding errors in Scenario 4: (a) current sampling result and error; (b) voltage sampling result and error.
Figure 18. Current and voltage sampling results and corresponding errors in Scenario 4: (a) current sampling result and error; (b) voltage sampling result and error.
Electronics 15 01871 g018
Table 1. Initial parameter settings of the genetic algorithm.
Table 1. Initial parameter settings of the genetic algorithm.
ParameterSymbolValue
Population size N p o p 100
Max. no. of generations G m a x 200
Probability of crossover P c 0.8
Probability of mutation P m 0.001
Dimension of the problem D 5
Resistance search bound R 0 , R 1 , R 2 [10−5, 10−1]
Time constant search bound τ 1 , τ 2 [1500]
Table 2. PSO parameter settings and optimization results.
Table 2. PSO parameter settings and optimization results.
ParameterSymbolValue
Swarm size N s w a r m 50
Max. no. of iterations I t e r m a x 100
Inertia weight ω 0.6
Cognitive learning factor c 1 1.5
Social learning factor c 2 1.5
Bound of forgetting factor d [0.01, 0.095]
Bound of adjustment coefficient R k [0.1, 10]
Optimal forgetting factor d * 0.4920
Optimal adjustment coefficient R k * 0.8117
Table 3. Comparison of errors for the four scenarios at 25 °C with an initial SOC deviation of 10%.
Table 3. Comparison of errors for the four scenarios at 25 °C with an initial SOC deviation of 10%.
ScenarioMAE (%)RMSE (%)MaxAE (%)
Scenario 10.110.250.43
Scenario 20.600.631.07
Scenario 30.090.220.30
Scenario 40.530.581.17
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Li, Y.; Wu, Y.; Du, J.; Tian, J.; Fan, X. Comparative Analysis of Errors in Sodium-Ion Battery SOC Estimation Algorithm Based on Hardware-in-the-Loop Validation. Electronics 2026, 15, 1871. https://doi.org/10.3390/electronics15091871

AMA Style

Li Y, Wu Y, Du J, Tian J, Fan X. Comparative Analysis of Errors in Sodium-Ion Battery SOC Estimation Algorithm Based on Hardware-in-the-Loop Validation. Electronics. 2026; 15(9):1871. https://doi.org/10.3390/electronics15091871

Chicago/Turabian Style

Li, Yang, Yizeng Wu, Jinqiao Du, Jie Tian, and Xinyuan Fan. 2026. "Comparative Analysis of Errors in Sodium-Ion Battery SOC Estimation Algorithm Based on Hardware-in-the-Loop Validation" Electronics 15, no. 9: 1871. https://doi.org/10.3390/electronics15091871

APA Style

Li, Y., Wu, Y., Du, J., Tian, J., & Fan, X. (2026). Comparative Analysis of Errors in Sodium-Ion Battery SOC Estimation Algorithm Based on Hardware-in-the-Loop Validation. Electronics, 15(9), 1871. https://doi.org/10.3390/electronics15091871

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

Article Metrics

Back to TopTop