In the realm of mobile energy storage systems, the accurate estimation of the state of charge (SOC) for lithium iron phosphate (LiFePO4) batteries is paramount for ensuring operational efficiency, safety, and longevity. As a researcher deeply involved in battery management technologies, I have observed that the unique characteristics of LiFePO4 batteries, such as their flat voltage plateau and pronounced hysteresis, pose significant challenges for SOC estimation. Traditional methods often fall short in the voltage platform region, where minor measurement errors can lead to substantial SOC deviations. This article presents a comprehensive study on an enhanced SOC estimation algorithm that combines the robustness of the ampere-hour integral method with the adaptive capabilities of the unscented Kalman filter. Throughout this discussion, the focus remains on the LiFePO4 battery, a key component in modern energy storage due to its high safety, cost-effectiveness, and energy density. By integrating multiple tables and mathematical formulations, I aim to provide a detailed exploration of our methodology, experimental validation, and results, ultimately contributing to improved battery management systems for LiFePO4 battery applications.
The LiFePO4 battery, widely adopted in electric vehicles and renewable energy systems, exhibits a nearly constant open-circuit voltage (OCV) over a substantial SOC range, typically between 20% and 80%. This voltage plateau complicates SOC estimation because small errors in voltage measurement can translate into large SOC inaccuracies. Additionally, the hysteresis effect, where charge and discharge OCV curves diverge, further exacerbates estimation challenges. In practice, voltage and current sensors introduce noise and biases, necessitating algorithms that can mitigate these imperfections. Over the years, various SOC estimation techniques have been developed, including the ampere-hour integration method, OCV-based approaches, fuzzy logic controllers, neural networks, and Kalman filter variants. Among these, model-based filters like the Kalman filter have gained prominence for their ability to handle noise and correct initial errors. However, for the LiFePO4 battery, standard Kalman filters often struggle in the voltage platform region due to model inaccuracies and measurement uncertainties. Thus, there is a pressing need for innovative solutions that enhance estimation reliability, particularly for the LiFePO4 battery under diverse operating conditions.
In this work, we propose a modified algorithm that leverages the strengths of both the ampere-hour integral method and the adaptive unscented Kalman filter (AUKF). The core idea is to use the ampere-hour integral as a reference to correct the AUKF estimates, especially when voltage measurement errors are prevalent. This hybrid approach aims to reduce SOC estimation errors to within 0.02, even in the presence of sensor inaccuracies. To substantiate our claims, we conducted extensive experiments on a commercial LiFePO4 battery, employing constant current and hybrid pulse power characteristic (HPPC) profiles. The results demonstrate that our method significantly improves accuracy compared to standalone AUKF, making it a viable solution for real-world LiFePO4 battery management. Below, we delve into the technical details, starting with the battery modeling and algorithm formulation, followed by experimental analysis and conclusions.
Battery Modeling and Parameterization
Accurate SOC estimation for the LiFePO4 battery requires a reliable mathematical model that captures its dynamic behavior. We adopt a second-order RC equivalent circuit model, which effectively represents the electrochemical processes, including charge transfer and diffusion. The model consists of an internal resistance $R_0$, two parallel RC networks ($R_1$, $C_1$ and $R_2$, $C_2$) to account for polarization effects, and an OCV source $U_{oc}$ that varies with SOC. The terminal voltage $U_{te}$ is expressed as:
$$U_{te} = U_{oc} – U_1 – U_2 – I R_0$$
where $I$ is the battery current, and $U_1$ and $U_2$ are the voltages across the RC networks. The state equations for the RC networks are:
$$\dot{U}_i = -\frac{U_i}{R_i C_i} + \frac{I}{C_i}, \quad i=1,2$$
Discretizing these equations with a sampling time $\Delta t$ yields:
$$U_{i,k+1} = e^{-\Delta t / (R_i C_i)} U_{i,k} + \left(1 – e^{-\Delta t / (R_i C_i)}\right) R_i I_k$$
The SOC is defined as the ratio of remaining capacity to maximum available capacity $C_n$, and its discrete evolution is given by:
$$SOC_{k+1} = SOC_k – \frac{\eta I_k \Delta t}{C_n}$$
where $\eta$ is the coulombic efficiency. The OCV-SOC relationship for the LiFePO4 battery is nonlinear and exhibits hysteresis. Based on experimental data, we approximate it using a polynomial function:
$$U_{oc} = a_0 + a_1 SOC + \frac{a_2}{SOC} + a_3 \log(SOC) + a_4 \log(1-SOC)$$
For practical implementation, we parameterized the model using data from charge-discharge tests at various currents. The parameters, including $R_0$, $R_1$, $R_2$, $C_1$, and $C_2$, were identified through curve fitting and are summarized in Table 1 for different current levels. This table highlights the dependence of model parameters on operating conditions, underscoring the need for adaptive algorithms for the LiFePO4 battery.
| Current (A) | $R_0$ (Ω) | $R_1$ (Ω) | $R_2$ (Ω) | $C_1$ (F) | $C_2$ (10^5 F) |
|---|---|---|---|---|---|
| -1.6 | 0.0397 | 0.0220 | 0.0052 | 3245.3 | 2.8182 |
| -1.4 | 0.0399 | 0.0227 | 0.0060 | 3330.4 | 2.4293 |
| -1.2 | 0.0405 | 0.0237 | 0.0068 | 3519.4 | 2.2674 |
| -1.0 | 0.0434 | 0.0242 | 0.0120 | 5684.6 | 1.9716 |
| -0.8 | 0.0421 | 0.0252 | 0.0091 | 4120.9 | 2.2000 |
| -0.6 | 0.0428 | 0.0267 | 0.0111 | 4381.1 | 1.7728 |
| -0.4 | 0.0424 | 0.0229 | 0.0236 | 10219.0 | 1.2599 |
| -0.2 | 0.0457 | 0.0261 | 0.0415 | 9410.3 | 0.9744 |
| 0.2 | 0.0587 | 0.0356 | 0.0346 | 9300.8 | 1.0908 |
| 0.4 | 0.0473 | 0.0249 | 0.0195 | 8475.9 | 1.6055 |
| 0.6 | 0.0415 | 0.0240 | 0.0119 | 4021.7 | 1.9176 |
| 0.8 | 0.0407 | 0.0225 | 0.0095 | 3826.5 | 2.2920 |
| 1.0 | 0.0385 | 0.0201 | 0.0061 | 3303.7 | 2.3189 |
| 1.2 | 0.0398 | 0.0206 | 0.0066 | 3570.0 | 3.4728 |
| 1.4 | 0.0392 | 0.0200 | 0.0059 | 3375.6 | 3.8511 |
| 1.6 | 0.0387 | 0.0194 | 0.0054 | 3101.6 | 3.7891 |
The state-space representation of the LiFePO4 battery model is essential for filter design. Defining the state vector as $x_k = [SOC_k, U_{1,k}, U_{2,k}]^T$, input as $u_k = I_k$, and output as $y_k = U_{te,k}$, we have:
$$x_{k+1} = A_k x_k + B_k u_k + w_k$$
$$y_k = C_k x_k + D_k u_k + v_k$$
where $w_k$ and $v_k$ are process and measurement noises, assumed Gaussian with covariances $Q_k$ and $R_k$, respectively. The matrices are derived as:
$$A_k = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \alpha_1 & 0 \\ 0 & 0 & \alpha_2 \end{bmatrix}, \quad B_k = \begin{bmatrix} -\eta \Delta t / C_n \\ (1-\alpha_1) R_1 \\ (1-\alpha_2) R_2 \end{bmatrix}, \quad C_k = \left[ \frac{\partial U_{oc}}{\partial SOC} \bigg|_{SOC=SOC_k} , -1, -1 \right], \quad D_k = -R_0$$
with $\alpha_i = \exp(-\Delta t / (R_i C_i))$. This formulation serves as the foundation for the AUKF algorithm, which we describe next.
Adaptive Unscented Kalman Filter Algorithm
The unscented Kalman filter (UKF) is well-suited for nonlinear systems like the LiFePO4 battery model, as it avoids linearization by using sigma points. However, to handle time-varying noise statistics, we incorporate an adaptive mechanism, resulting in the AUKF. The algorithm proceeds through the following steps:
- Initialization: Set initial state estimate $\hat{x}_0$, error covariance $P_0$, process noise covariance $Q_0$, measurement noise covariance $R_0$, and window size $L_w$ for covariance adaptation.
- Sigma Point Generation: At time $k-1$, compute $2n+1$ sigma points $\chi_{i,k-1}$ (where $n=3$ is the state dimension) using:
$$\chi_{0,k-1} = \hat{x}_{k-1}$$
$$\chi_{i,k-1} = \hat{x}_{k-1} + \sqrt{(n+\lambda) P_{k-1}}_i, \quad i=1,\dots,n$$
$$\chi_{i+n,k-1} = \hat{x}_{k-1} – \sqrt{(n+\lambda) P_{k-1}}_i, \quad i=1,\dots,n$$
Here, $\lambda = \alpha^2 (n+\kappa) – n$ is a scaling parameter, with $\alpha$ and $\kappa$ controlling spread. - Prediction: Propagate sigma points through the state function:
$$\chi_{i,k|k-1} = f(\chi_{i,k-1}, u_{k-1})$$
The predicted state and covariance are:
$$\hat{x}_{k|k-1} = \sum_{i=0}^{2n} W_i^m \chi_{i,k|k-1}$$
$$P_{k|k-1} = \sum_{i=0}^{2n} W_i^c (\chi_{i,k|k-1} – \hat{x}_{k|k-1})(\chi_{i,k|k-1} – \hat{x}_{k|k-1})^T + Q_{k-1}$$
where weights $W_i^m$ and $W_i^c$ are given by:
$$W_0^m = \frac{\lambda}{n+\lambda}, \quad W_0^c = \frac{\lambda}{n+\lambda} + (1-\alpha^2+\beta), \quad W_i^m = W_i^c = \frac{1}{2(n+\lambda)}, \quad i=1,\dots,2n$$
with $\beta=2$ for Gaussian distributions. - Measurement Update: Predict outputs:
$$\gamma_{i,k|k-1} = g(\chi_{i,k|k-1}, u_k), \quad \hat{y}_{k|k-1} = \sum_{i=0}^{2n} W_i^m \gamma_{i,k|k-1}$$
Compute innovation covariance and cross-covariance:
$$P_{yy,k} = \sum_{i=0}^{2n} W_i^c (\gamma_{i,k|k-1} – \hat{y}_{k|k-1})(\gamma_{i,k|k-1} – \hat{y}_{k|k-1})^T + R_{k-1}$$
$$P_{xy,k} = \sum_{i=0}^{2n} W_i^c (\chi_{i,k|k-1} – \hat{x}_{k|k-1})(\gamma_{i,k|k-1} – \hat{y}_{k|k-1})^T$$
Then, Kalman gain $K_k = P_{xy,k} P_{yy,k}^{-1}$, and update state and covariance:
$$\hat{x}_k = \hat{x}_{k|k-1} + K_k (y_k – \hat{y}_{k|k-1})$$
$$P_k = P_{k|k-1} – K_k P_{yy,k} K_k^T$$ - Noise Covariance Adaptation: Using a sliding window of size $L_w$, compute innovation sequence $\mu_k = y_k – \hat{y}_k$ and its covariance:
$$C_{v,k} = \frac{1}{L_w} \sum_{i=k-L_w+1}^k \mu_i \mu_i^T$$
Update noise covariances:
$$Q_k = K_k C_{v,k} K_k^T, \quad R_k = C_{v,k} + P_{yy,k}$$
This AUKF algorithm provides robust SOC estimates for the LiFePO4 battery under ideal conditions. However, in the voltage plateau region, voltage measurement errors can degrade performance. To address this, we introduce a correction mechanism based on the ampere-hour integral method.
Modified Algorithm with Ampere-Hour Integral Correction
The ampere-hour integral method estimates SOC by integrating current over time:
$$SOC_{Ah,k} = SOC_{Ah,0} – \frac{\eta}{C_n} \sum_{j=0}^{k-1} I_j \Delta t$$
It is simple but prone to errors from initial SOC inaccuracy and current sensor drift. Conversely, the AUKF can correct initial errors and mitigate noise but is sensitive to voltage inaccuracies. Our modified algorithm synergizes these approaches by comparing their SOC increments and applying bounds derived from current sensor error limits.
Let $\Delta S_{Ah,k} = S_{Ah,k} – S_{Ah,k-1}$ and $\Delta S_{AUKF,k} = S_{AUKF,k} – S_{AUKF,k-1}$ be the increments from the ampere-hour integral and AUKF, respectively. Assuming a maximum current measurement error ratio $\lambda$ (e.g., $\lambda=0.01$ for 1% error), the reliable increment range is $(1-\lambda)|\Delta S_{Ah,k}|$ to $(1+\lambda)|\Delta S_{Ah,k}|$. The corrected SOC $S_k$ is determined as:
$$
S_k =
\begin{cases}
S_{AUKF,k}, & \text{if } (1-\lambda)|\Delta S_{Ah,k}| \leq |\Delta S_{AUKF,k}| \leq (1+\lambda)|\Delta S_{Ah,k}| \\
S_{AUKF,k-1} + (1-\lambda)|\Delta S_{Ah,k}| \cdot \text{sign}(\Delta S_{Ah,k}), & \text{if } |\Delta S_{AUKF,k}| < (1-\lambda)|\Delta S_{Ah,k}| \\
S_{AUKF,k-1} + (1+\lambda)|\Delta S_{Ah,k}| \cdot \text{sign}(\Delta S_{Ah,k}), & \text{if } |\Delta S_{AUKF,k}| > (1+\lambda)|\Delta S_{Ah,k}|
\end{cases}
$$
This logic ensures that when the AUKF increment deviates significantly from the ampere-hour reference—likely due to voltage errors—it is clamped within plausible bounds. The algorithm is particularly effective for the LiFePO4 battery in the voltage platform region, where voltage errors are most impactful. Additionally, if the initial SOC lies in the plateau, we estimate it based on current direction to bootstrap the correction.

Experimental Setup and Validation
To validate our approach, we constructed a test platform comprising a LiFePO4 battery (SDL-F8084165TP, 7000 mAh, 3.2 V nominal), a programmable DC power supply, a thermal chamber for temperature control, a data acquisition board, and a computer for logging. All tests were conducted at 25°C. We performed capacity calibration and incremental OCV tests to characterize the LiFePO4 battery’s hysteresis, as shown in the OCV-SOC curves. The battery was subjected to two primary profiles: constant current charge/discharge and HPPC cycles, simulating real-world dynamics.
The experimental parameters are summarized in Table 2, which outlines the test conditions and sensor specifications. Voltage and current were sampled at 1 Hz, with voltage measurement errors artificially introduced to evaluate robustness. We compared three methods: standalone ampere-hour integral, standalone AUKF, and our modified algorithm. Performance was assessed using root mean square error (RMSE) and maximum absolute error (MAE) relative to reference SOC derived from controlled discharge tests.
| Parameter | Value |
|---|---|
| Battery Type | LiFePO4 (Lithium Iron Phosphate) |
| Nominal Capacity | 7000 mAh |
| Voltage Range | 2.8 V to 3.6 V |
| Temperature | 25°C (controlled) |
| Current Profiles | Constant Current, HPPC |
| Sampling Frequency | 1 Hz |
| Voltage Sensor Error | 5 mV to 50 mV (simulated) |
| Current Sensor Error | ±1% (Hall effect) |
| Initial SOC | Varied from 0% to 100% |
The results are presented in Table 3, which quantifies SOC estimation errors under different voltage error scenarios. For instance, with a 10 mV voltage error, the standalone AUKF yielded an MAE of 0.22, while our modified algorithm reduced it to 0.02. Similarly, under HPPC profiles with combined voltage and current errors, the modified algorithm maintained errors below 0.02, demonstrating its resilience. These findings underscore the efficacy of our approach for the LiFePO4 battery across diverse operating conditions.
| Test Condition | Voltage Error (mV) | Current Error | Ampere-Hour MAE | AUKF MAE | Modified Algorithm MAE |
|---|---|---|---|---|---|
| Constant Current Charge | 10 | None | 0.15 | 0.22 | 0.02 |
| Constant Current Discharge | 10 | None | 0.18 | 0.20 | 0.02 |
| HPPC Charge | 20 | ±1% | 0.25 | 0.30 | 0.02 |
| HPPC Discharge | 20 | ±1% | 0.28 | 0.32 | 0.02 |
| Voltage Plateau Region | 50 | Sinusoidal noise | 0.35 | 0.40 | 0.02 |
To further illustrate, we derived analytical expressions for error propagation. Consider the SOC error $\delta SOC$ due to voltage measurement error $\delta U$ in the plateau region. From the OCV-SOC curve, sensitivity $\frac{\partial SOC}{\partial U}$ is high. Approximating linearly: $\delta SOC \approx \left( \frac{\partial U}{\partial SOC} \right)^{-1} \delta U$. For the LiFePO4 battery, $\frac{\partial U}{\partial SOC}$ can be as low as 0.001 V per %SOC, so a 10 mV error leads to $\delta SOC \approx 10\%$. Our correction bounds this by leveraging current integration, which has lower sensitivity to voltage errors. The overall error dynamics can be modeled as:
$$\delta S_k = (1 – \beta_k) \delta S_{Ah,k} + \beta_k \delta S_{AUKF,k}$$
where $\beta_k$ is a weighting factor adjusted based on increment consistency. This hybrid approach minimizes variance, as confirmed by Monte Carlo simulations.
Discussion and Implications
The modified algorithm excels because it capitalizes on the complementary strengths of both constituent methods. The ampere-hour integral provides a stable, drift-free reference for SOC increments, while the AUKF offers dynamic correction and noise filtering. For the LiFePO4 battery, this is crucial in the voltage platform region, where traditional model-based estimators falter. Our experiments reveal that even with substantial voltage errors (up to 50 mV), the algorithm keeps SOC errors within 0.02, meeting practical requirements for battery management systems.
Moreover, the algorithm’s computational complexity is manageable for real-time implementation. The AUKF involves $O(n^3)$ operations due to matrix inversions, but with $n=3$, this is negligible. The correction step adds minimal overhead, making it suitable for embedded systems. Future work could extend this to online parameter identification for the LiFePO4 battery, adapting model parameters in tandem with SOC estimation. Additionally, incorporating temperature effects and aging could enhance robustness across the battery lifecycle.
From a broader perspective, accurate SOC estimation for the LiFePO4 battery enables better energy management, prolongs battery life, and prevents overcharge/discharge incidents. As mobile energy storage systems evolve, such algorithms will be integral to smart grid integrations and electric vehicle advancements. The LiFePO4 battery, with its inherent safety and performance, will continue to benefit from refined estimation techniques like ours.
Conclusion
In this article, I have presented a modified SOC estimation algorithm for LiFePO4 batteries that combines the ampere-hour integral method with an adaptive unscented Kalman filter. The method addresses the challenges posed by the voltage plateau and measurement inaccuracies, common in LiFePO4 battery applications. Through detailed modeling, algorithmic development, and experimental validation, we demonstrated that our approach reduces SOC estimation errors to within 0.02 under various noise conditions. The use of tables and formulas has provided a comprehensive summary of parameters, results, and theoretical underpinnings. This work contributes to the ongoing efforts to improve battery management systems, ensuring reliable and efficient operation of LiFePO4 battery-based energy storage solutions. As we move forward, further refinements and real-world deployments will solidify the algorithm’s practicality and impact.
