In this study, we focus on accurately estimating the state of charge (SOC) of lithium-ion batteries used in energy storage systems. Reliable SOC estimation is crucial for ensuring safe and stable operation of these systems, as overcharging or deep discharging can lead to thermal runaway and other safety hazards. We propose a model-driven approach that combines a Thevenin equivalent circuit model with online parameter identification using the forgetting factor recursive least squares (FFRLS) method, followed by state estimation using the unscented Kalman filter (UKF). Our method addresses two common challenges: inaccurate model parameters due to battery aging and uncertain noise in complex operational environments. Through interval constant-current discharge experiments on a 18650 energy storage battery, we first identify the open-circuit voltage (OCV)-SOC relationship and then perform real-time parameter identification. The identified parameters are validated by comparing calculated voltages with measured values. We then apply the UKF algorithm to estimate SOC and compare its performance with the extended Kalman filter (EKF) and ampere-hour integral (AH) methods. Our results show that the FFRLS-UKF approach achieves high accuracy (up to 99.2%) when initial SOC and model parameters are correct, and it converges quickly even under incorrect initial SOC conditions, demonstrating strong robustness. We also evaluate the effect of different initial SOC values and find that our method requires fewer steps to converge than EKF. This work provides an effective online SOC estimation solution for energy storage batteries, suitable for real-world applications in containerized battery energy storage stations.
1. Introduction
Energy storage systems play a vital role in integrating renewable energy sources such as wind and solar power into the grid. Lithium-ion batteries are widely used in these systems due to their high energy density, long cycle life, and environmental friendliness. However, the relatively enclosed environment of containerized energy storage stations and limited heat dissipation make batteries prone to thermal runaway if not properly managed. Accurate SOC estimation is therefore essential for battery management systems to prevent overcharging and overdischarging, thereby ensuring safety and prolonging battery life.
Numerous SOC estimation methods have been proposed in the literature, including open-circuit voltage (OCV) lookup, ampere-hour integration, neural networks, and Kalman filtering. OCV methods require long rest periods and are not suitable for online estimation. Ampere-hour integration suffers from cumulative errors due to current sensor drift and initial SOC uncertainty. Neural networks require extensive training data and may not generalize well. Kalman filter-based methods, particularly the extended Kalman filter (EKF), have been widely used but perform poorly when the system is highly nonlinear because they linearize the model and neglect higher-order terms. The unscented Kalman filter (UKF) improves upon EKF by using a set of sigma points to capture the mean and covariance of the state distribution, achieving better accuracy for nonlinear systems.
In this paper, we propose an FFRLS-UKF framework for estimating the SOC of energy storage batteries. We first establish a Thevenin equivalent circuit model, then use FFRLS to identify the model parameters online. These parameters are fed into a UKF algorithm for real-time SOC estimation. We validate our method through experiments and compare it with EKF and AH methods. The contributions of our work include: (1) online parameter identification that adapts to battery aging; (2) high estimation accuracy under various initial SOC conditions; and (3) fast convergence even when initial SOC is inaccurate.
2. Equivalent Circuit Model and Parameter Identification
2.1 OCV-SOC Relationship
To build an accurate battery model, we first characterize the OCV-SOC relationship. We conduct interval constant-current discharge experiments at room temperature. The battery is fully charged and then discharged in steps of 5% of its rated capacity at a 1C rate. After each step, the battery rests for 900 seconds to reach equilibrium, and the open-circuit voltage is recorded. The resulting OCV-SOC data points are fitted with a sixth-order polynomial:
$$
V_{OCV} = A + A_0 S_{OC} + A_1 S_{OC}^2 + A_2 S_{OC}^3 + A_3 S_{OC}^4 + A_4 S_{OC}^5 + A_5 S_{OC}^6
$$
The fitted coefficients are given in Table 1. This polynomial is used in the model to relate SOC to open-circuit voltage.
Table 1. Fitted coefficients of the OCV-SOC polynomial
| $A$ | 240.4653 |
| $A_0$ | 2.4823 |
| $A_1$ | 21.5399 |
| $A_2$ | -162.5463 |
| $A_3$ | 622.9878 |
| $A_4$ | 1308.5389 |
| $A_5$ | 1538.6869 |
| $A_6$ | -950.8749 |
2.2 Thevenin Equivalent Circuit Model
We adopt the Thevenin model as it provides a good balance between accuracy and computational efficiency for online estimation. The model consists of an internal resistance $R_0$, a polarization resistance $R_1$, and a polarization capacitance $C_1$ in parallel. The circuit equations are:
$$
\dot{U}_1 = \frac{I}{C_1} – \frac{U_1}{R_1 C_1}
$$
$$
U = V_{OCV} – I R_0 – U_1
$$
where $U_1$ is the voltage across the RC branch, $U$ is the terminal voltage, and $I$ is the load current. The unknown parameters $R_0, R_1, C_1$ need to be identified online.
2.3 Online Parameter Identification Using FFRLS
To track time-varying parameters due to aging and temperature, we apply the forgetting factor recursive least squares (FFRLS) algorithm. The transfer function of the Thevenin model in the discrete domain is derived using bilinear transformation:
$$
G(z^{-1}) = \frac{U_{oc}(z^{-1}) – U_t(z^{-1})}{I(z^{-1})} = \frac{c_2 + c_3 z^{-1}}{1 + c_1 z^{-1}}
$$
The coefficients $c_1, c_2, c_3$ are related to the model parameters as follows:
$$
c_1 = \frac{T – 2R_1 C_1}{T + 2R_1 C_1}
$$
$$
c_2 = \frac{R_0 T + R_1 T + 2R_0 R_1 C_1}{T + 2R_1 C_1}
$$
$$
c_3 = \frac{R_0 T + R_1 T – 2R_0 R_1 C_1}{T + 2R_1 C_1}
$$
where $T$ is the sampling period. In the time domain, we have:
$$
y_k = U_{oc,k} – U_{t,k} = -c_1 y_{k-1} + c_2 I_k + c_3 I_{k-1}
$$
Define $\theta = [c_1, c_2, c_3]^T$ and $\phi_k = [-y_{k-1}, I_k, I_{k-1}]^T$. The FFRLS algorithm updates the parameter vector:
$$
\hat{\theta}_k = \hat{\theta}_{k-1} + K_k (y_k – \phi_k^T \hat{\theta}_{k-1})
$$
$$
K_k = \frac{P_{k-1} \phi_k}{\lambda + \phi_k^T P_{k-1} \phi_k}
$$
$$
P_k = \frac{1}{\lambda} (I – K_k \phi_k^T) P_{k-1}
$$
The forgetting factor $\lambda$ is set to 0.95 to emphasize recent data. After obtaining $c_1, c_2, c_3$, the physical parameters are recovered:
$$
R_0 = \frac{c_2 – c_3}{1 – c_1}
$$
$$
R_1 = \frac{c_2 + c_3}{1 + c_1} – R_0
$$
$$
C_1 = \frac{T(1 – c_1) / (2(1 + c_1))}{R_1}
$$
We apply the FFRLS algorithm to the experimental current and voltage data. The identified parameters $R_0$, $R_1$, and $C_1$ during the discharge process are shown in Figures (not included due to citation constraints). The voltage calculated using these parameters closely matches the measured voltage, with an error less than 0.1 V, indicating that the identified model is accurate.
3. SOC Estimation Based on FFRLS-UKF
3.1 State-Space Model of the Battery
We select SOC and $U_1$ as state variables, current $I$ as input, and terminal voltage $U$ as output. The discrete state equations are:
$$
\begin{bmatrix} SOC_{k+1} \\ U_{1,k+1} \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & \exp(-T/(R_1 C_1)) \end{bmatrix} \begin{bmatrix} SOC_k \\ U_{1,k} \end{bmatrix} + \begin{bmatrix} T/Q_0 \\ R_1(1-\exp(-T/(R_1 C_1))) \end{bmatrix} I_k + w_k
$$
$$
U_k = F(SOC_k) – U_{1,k} – I_k R_{0,k} + v_k
$$
Here $Q_0$ is the battery rated capacity, $w_k$ and $v_k$ are process and measurement noise with covariances $Q$ and $R$, respectively. $F(SOC_k)$ is the OCV-SOC function. The system matrices are:
$$
A = \begin{bmatrix} 1 & 0 \\ 0 & \exp(-T/(R_1 C_1)) \end{bmatrix}, \quad B = \begin{bmatrix} T/Q_0 \\ R_1(1-\exp(-T/(R_1 C_1))) \end{bmatrix}
$$
$$
C = \begin{bmatrix} \partial F(SOC_k)/\partial SOC_k & -1 \end{bmatrix}, \quad D = -R_{0,k}
$$
3.2 Unscented Kalman Filter (UKF)
The UKF algorithm uses a set of sigma points to propagate the nonlinear system. The steps are as follows:
Initialization:
$$
\hat{x}_0 = E[x_0], \quad P_0 = E[(x_0 – \hat{x}_0)(x_0 – \hat{x}_0)^T]
$$
Sigma point generation ($k=0,1,\dots$):
$$
\chi_{k-1}^{(0)} = \hat{x}_{k-1}, \quad \chi_{k-1}^{(i)} = \hat{x}_{k-1} + \sqrt{(n+\kappa)P_{k-1}}, \quad i=1,\dots,n
$$
$$
\chi_{k-1}^{(i)} = \hat{x}_{k-1} – \sqrt{(n+\kappa)P_{k-1}}, \quad i=n+1,\dots,2n
$$
Time update:
$$
\chi_{k}^{(i)-} = f(\chi_{k-1}^{(i)}, u_{k-1})
$$
$$
\hat{x}_k^- = \sum_{i=0}^{2n} W_m^{(i)} \chi_{k}^{(i)-}
$$
$$
P_k^- = \sum_{i=0}^{2n} W_c^{(i)} (\chi_{k}^{(i)-} – \hat{x}_k^-)(\chi_{k}^{(i)-} – \hat{x}_k^-)^T + Q
$$
Measurement update:
$$
\mathcal{Y}_{k}^{(i)-} = h(\chi_{k}^{(i)-})
$$
$$
\hat{y}_k^- = \sum_{i=0}^{2n} W_m^{(i)} \mathcal{Y}_{k}^{(i)-}
$$
$$
P_{y_k} = \sum_{i=0}^{2n} W_c^{(i)} (\mathcal{Y}_{k}^{(i)-} – \hat{y}_k^-)(\mathcal{Y}_{k}^{(i)-} – \hat{y}_k^-)^T + R
$$
$$
P_{xy_k} = \sum_{i=0}^{2n} W_c^{(i)} (\chi_{k}^{(i)-} – \hat{x}_k^-)(\mathcal{Y}_{k}^{(i)-} – \hat{y}_k^-)^T
$$
$$
K_k = P_{xy_k} P_{y_k}^{-1}
$$
$$
\hat{x}_k = \hat{x}_k^- + K_k (y_k – \hat{y}_k^-)
$$
$$
P_k = P_k^- – K_k P_{y_k} K_k^T
$$
We use standard weights for sigma points: $W_m^{(0)} = \kappa/(n+\kappa)$, $W_c^{(0)} = \kappa/(n+\kappa) + (1-\alpha^2+\beta)$, and $W_m^{(i)} = W_c^{(i)} = 1/[2(n+\kappa)]$ for $i=1,\dots,2n$. In our implementation, we set $\alpha=1$, $\beta=2$, $\kappa=0$, $n=2$.
The overall FFRLS-UKF algorithm works as follows: at each time step, we first use FFRLS to identify $R_0, R_1, C_1$ from current and voltage measurements. Then we update the state-space model matrices and run one step of UKF to estimate SOC. This approach allows the model parameters to adapt to battery aging and operating conditions, improving SOC estimation accuracy.
4. Experimental Validation and Results
4.1 Experimental Setup
We conduct experiments on a single 18650 lithium-ion battery used in an energy storage system. The battery has a nominal capacity of 3000 mAh. A constant current discharge of 1C (3 A) is applied until the voltage reaches the cutoff voltage (2.8 V). The current and voltage are recorded at a sampling frequency of 1 Hz (total 13000 samples). We use the FFRLS-UKF method to estimate SOC online. For comparison, we also implement the traditional ampere-hour integration (AH) and the extended Kalman filter (EKF) with the same Thevenin model. The initial SOC is set to 1.0 (100%) for the accuracy test, and then we test robustness by setting initial SOC to 0.75 and 0.50.
4.2 Accuracy Comparison
Figure (not shown) illustrates the SOC estimation curves for the three methods when initial SOC is 1.0. Our proposed FFRLS-UKF method tracks the true SOC more closely than EKF and AH. Table 2 presents the quantitative evaluation metrics: mean error (ME), mean square error (MSE), and accuracy. Our method achieves an ME of 0.3997%, MSE of 0.0201%, and accuracy of 99.20%, significantly outperforming EKF (0.7051%, 0.0602%, 98.61%) and AH (0.9337%, 0.1082%, 97.93%).
Table 2. Performance comparison of SOC estimation methods
| Algorithm | ME (%) | MSE (%) | Accuracy (%) |
|---|---|---|---|
| AH | 0.9337 | 0.1082 | 97.93 |
| EKF | 0.7051 | 0.0602 | 98.61 |
| FFRLS-UKF | 0.3997 | 0.0201 | 99.20 |
4.3 Robustness to Initial SOC Errors
To test robustness, we deliberately set the initial SOC to 0.75 and 0.50 (i.e., 75% and 50% of true value). Since the AH method relies entirely on the initial value and integration, it cannot recover from large errors, so we only compare FFRLS-UKF with EKF. Tables 3 and 4 summarize the convergence steps and final errors. For initial SOC = 0.50, our method converges to within 1% error after 133 steps, whereas EKF requires 722 steps. For initial SOC = 0.75, our method converges in 104 steps, while EKF needs 690 steps. Moreover, after convergence, the steady-state error of our method remains lower than that of EKF.
Table 3. Convergence behavior for different initial SOC
| Initial SOC | Algorithm | Steps to converge |
|---|---|---|
| 0.50 | FFRLS-UKF | 133 |
| 0.50 | EKF | 722 |
| 0.75 | FFRLS-UKF | 104 |
| 0.75 | EKF | 690 |
Table 4. Steady-state error after convergence (initial SOC = 0.50)
| Algorithm | ME (%) | MSE (%) |
|---|---|---|
| EKF | 0.85 | 0.08 |
| FFRLS-UKF | 0.41 | 0.03 |
These results demonstrate that our FFRLS-UKF method is robust to initial SOC uncertainty. The adaptive parameter identification and the UKF’s ability to handle nonlinearity allow the algorithm to correct errors quickly. In contrast, EKF’s linearization leads to slower convergence and larger residual errors.
5. Discussion
The proposed FFRLS-UKF method addresses two critical challenges in SOC estimation for energy storage batteries: time-varying parameters and nonlinear dynamics. The forgetting factor in FFRLS ensures that the model adapts to changes in internal resistance and polarization, which are influenced by aging, temperature, and SOC. The UKF, by using sigma points, avoids the linearization errors of EKF, especially when the OCV-SOC relationship is strongly nonlinear. Our experiments confirm that the method achieves high accuracy and fast convergence, even under adverse initial conditions.
Compared to other advanced methods such as neural network-based estimators, our approach does not require large training datasets and is computationally efficient enough for real-time implementation on embedded platforms. The online parameter identification also eliminates the need for offline calibration, making it suitable for field-deployed energy storage systems.
One limitation is that the model assumes a single RC branch, which may not capture all polarization effects under very high current pulses. Future work could explore higher-order models (e.g., 2RC) and investigate the influence of temperature on parameters. Additionally, we plan to validate the method on battery packs and over a wider range of aging conditions.
6. Conclusion
We have presented an FFRLS-UKF framework for online SOC estimation of energy storage batteries. The method integrates Thevenin model parameter identification using FFRLS with state estimation using UKF. Experimental results show that the proposed method achieves 99.2% accuracy under nominal conditions and converges rapidly even when the initial SOC is unknown. Compared to EKF and AH, it provides superior performance in terms of accuracy, robustness, and convergence speed. This work offers a reliable solution for battery management systems in containerized energy storage stations, contributing to safer and more efficient operation of grid-integrated energy storage systems.

