State of Charge Estimation for LiFePO4 Batteries Using QPSO-LSSVM-AEKF with Expansion Force

In the rapidly evolving field of electric vehicles, lithium-ion batteries have become indispensable due to their high energy density and long cycle life. Among these, the LiFePO4 battery stands out for its excellent thermal stability, safety, and durability, making it a preferred choice for many applications. However, accurately estimating the State of Charge (SOC) of LiFePO4 batteries remains a significant challenge, primarily because of the flat voltage plateau during operation. This characteristic makes traditional voltage-based SOC estimation methods prone to errors, as the voltage signal does not vary significantly with SOC changes in certain ranges. To address this issue, I propose a novel SOC estimation method that leverages expansion force signals, which exhibit a more distinct relationship with SOC, and integrates advanced algorithms including Quantum Particle Swarm Optimization (QPSO), Least Squares Support Vector Machine (LSSVM), and Adaptive Extended Kalman Filter (AEKF). This approach aims to enhance the accuracy and robustness of SOC estimation for LiFePO4 batteries, overcoming the limitations of conventional techniques.

The SOC of a battery is a critical parameter in battery management systems, reflecting the remaining available energy. Accurate SOC estimation is essential for optimizing battery performance, preventing overcharge or over-discharge, and extending battery life. Various methods have been developed for SOC estimation, including ampere-hour integration, open-circuit voltage, machine learning, and Kalman filtering. Ampere-hour integration is simple but accumulates errors over time and relies on an accurate initial SOC. Open-circuit voltage methods are limited in dynamic conditions due to the need for stable voltage measurements. Machine learning techniques, such as support vector machines, can model complex relationships but require high-quality data and are sensitive to noise. Kalman filtering, particularly Extended Kalman Filter (EKF), offers a recursive prediction-correction mechanism but depends heavily on model accuracy and may struggle with nonlinearities. For LiFePO4 batteries, the voltage plateau exacerbates these issues, necessitating alternative signals like expansion force.

Expansion force arises from the volume changes in LiFePO4 batteries during charge and discharge cycles, driven by electrochemical reactions such as lithium-ion intercalation and deintercalation in electrodes. This force correlates with SOC and can serve as a reliable indicator, especially when voltage signals are unreliable. However, the relationship between expansion force and SOC is non-monotonic, presenting challenges for direct modeling. To tackle this, I combine QPSO-optimized LSSVM for precise expansion force modeling with AEKF for adaptive state estimation, creating a closed-loop SOC estimation framework. This hybrid method leverages the strengths of both machine learning and Kalman filtering, improving accuracy and adaptability in real-time applications.

In this paper, I first detail the theoretical foundations of QPSO, LSSVM, EKF, and AEKF. Then, I describe the integration of these components into the QPSO-LSSVM-AEKF method for SOC estimation using expansion force. Experimental validation is conducted on a 5Ah LiFePO4 battery under dynamic stress test (DST) and federal urban driving schedule (FUDS) conditions. Results show that the proposed method achieves superior performance compared to traditional approaches, with low error metrics. The contributions include a novel SOC estimation strategy for LiFePO4 batteries, enhanced model optimization via QPSO, and adaptive noise handling through AEKF, offering a practical solution for battery management systems.

Methodology

The proposed SOC estimation method for LiFePO4 batteries consists of three main stages: expansion force modeling using QPSO-LSSVM, state prediction with AEKF, and iterative correction. Below, I explain each component in detail, emphasizing the mathematical formulations and integration.

Quantum Particle Swarm Optimization (QPSO)

QPSO is an enhanced version of the traditional Particle Swarm Optimization (PSO) algorithm, incorporating quantum mechanics principles to improve global search capability and avoid local optima. In QPSO, particles are described by quantum behavior, where their positions are updated based on a probability density function derived from a delta potential well model. This allows for better exploration of the solution space, which is crucial for optimizing the parameters of the LSSVM model.

The probability density function for a particle’s position is given by:

$$ |\psi(x, t)|^2 = \frac{1}{L} e^{-\frac{2|x – p|}{L}} $$

where \( L \) is the characteristic length and \( p \) is the center of the potential well. The well center \( p \) is computed as a weighted combination of the particle’s personal best position \( pBest_i \) and the global best position \( gBest \):

$$ p(t) = \phi \cdot pBest_i + (1 – \phi) \cdot gBest $$

Here, \( \phi \) is a random weight uniformly distributed in [0, 1]. The new position of a particle is generated using Monte Carlo sampling:

$$ x_i(t+1) = p(t) \pm \frac{L_i(t)}{2} \ln\left(\frac{1}{u}\right) $$

with \( u \sim U(0,1) \) and \( L_i(t) = 2\beta \cdot |mBest(t) – x_i(t)| \). The mean best position \( mBest(t) \) is defined as:

$$ mBest(t) = \frac{1}{N} \sum_{i=1}^{N} pBest_i $$

The contraction-expansion coefficient \( \beta \) controls the search range and decreases linearly over iterations:

$$ \beta(t) = \beta_0 – (\beta_0 – \beta_f) \cdot \frac{t}{T_{\text{max}}} $$

where \( \beta_0 \) and \( \beta_f \) are initial and final values, typically set to 1.2 and 0.5, respectively. QPSO is used to optimize the kernel parameter \( \sigma \) and penalty factor \( \gamma \) in LSSVM, ensuring an accurate expansion force model for the LiFePO4 battery.

Least Squares Support Vector Machine (LSSVM)

LSSVM is a regression technique that transforms the standard support vector machine formulation into a linear system by using equality constraints and a least squares loss function. This reduces computational complexity while maintaining good generalization ability. For SOC estimation of LiFePO4 batteries, LSSVM models the nonlinear relationship between input variables (current and SOC) and output (expansion force).

The LSSVM model is expressed as:

$$ y_k = w^T \phi(x_k) + b $$

where \( y_k \) is the output (expansion force), \( x_k \) is the input vector (current and SOC), \( w \) is the weight vector, \( b \) is the bias term, and \( \phi(\cdot) \) is a mapping function to a high-dimensional feature space. The optimization problem minimizes:

$$ \min_{w,b,e} \frac{1}{2} \|w\|^2 + \frac{\gamma}{2} \sum_{k=1}^{n} e_k^2 $$

subject to \( y_k = w^T \phi(x_k) + b + e_k \), with \( e_k \) as error variables and \( \gamma \) as the regularization parameter. Using Lagrange multipliers \( \alpha_k \), the solution leads to a linear system:

$$ \begin{bmatrix} 0 & 1^T \\ 1 & \Omega + \gamma^{-1} I \end{bmatrix} \begin{bmatrix} b \\ \alpha \end{bmatrix} = \begin{bmatrix} 0 \\ y \end{bmatrix} $$

where \( \Omega_{ij} = K(x_i, x_j) \) is the kernel matrix. The radial basis function (RBF) kernel is employed:

$$ K(x_i, x_j) = \exp\left(-\frac{\|x_i – x_j\|^2}{2\sigma^2}\right) $$

The final LSSVM model for expansion force prediction is:

$$ F_k = \sum_{k=1}^{n} \alpha_k K(SOC_k, i_k) + b $$

where \( F_k \) is the expansion force, \( SOC_k \) is the state of charge, and \( i_k \) is the current. QPSO optimizes \( \sigma \) and \( \gamma \) to enhance model accuracy for the LiFePO4 battery data.

Extended Kalman Filter (EKF) and Adaptive EKF (AEKF)

EKF extends the standard Kalman filter to nonlinear systems by linearizing the state and observation equations around the current estimate. For SOC estimation, the state equation is based on ampere-hour integration:

$$ x_k = x_{k-1} + \frac{\eta I_{k-1} \Delta t}{Q} + w_{k-1} $$

where \( x_k \) is the SOC at time \( k \), \( \eta \) is the coulombic efficiency, \( I_{k-1} \) is the current, \( \Delta t \) is the sampling interval, \( Q \) is the battery capacity, and \( w_{k-1} \) is process noise. The observation equation uses the LSSVM expansion force model:

$$ z_k = \sum_{k=1}^{n} \alpha_k K(x_k, I_k) + b + v_k $$

with \( z_k \) as the observed expansion force and \( v_k \) as observation noise. EKF involves prediction and update steps:

Prediction:

$$ \hat{x}_{k|k-1} = f(\hat{x}_{k-1}, I_{k-1}) $$
$$ P_{k|k-1} = F_{k-1} P_{k-1} F_{k-1}^T + Q_{k-1} $$

Update:

$$ \hat{z}_{k|k-1} = h(\hat{x}_{k|k-1}, I_k) $$
$$ K_k = P_{k|k-1} H_k^T (H_k P_{k|k-1} H_k^T + R_k)^{-1} $$
$$ \hat{x}_k = \hat{x}_{k|k-1} + K_k (z_k – \hat{z}_{k|k-1}) $$
$$ P_k = (I – K_k H_k) P_{k|k-1} $$

Here, \( F_{k-1} \) and \( H_k \) are Jacobian matrices of the state and observation functions, respectively. To improve robustness, AEKF incorporates Sage-Husa adaptive filtering to dynamically adjust noise covariances \( Q_k \) and \( R_k \):

$$ Q_k = \frac{d_{k-1}}{d_k} Q_{k-1} + \frac{1}{d_k} (g_k g_k^T) $$
$$ R_k = \frac{d_{k-1}}{d_k} R_{k-1} + \frac{1}{d_k} (e_k e_k^T) $$

where \( g_k \) is the state residual, \( e_k \) is the observation residual, and \( d_k \) is a forgetting factor (e.g., 0.95). This adaptation handles uncertainties in the LiFePO4 battery system, enhancing SOC estimation accuracy.

Integration of QPSO-LSSVM-AEKF for SOC Estimation

The proposed method integrates QPSO-LSSVM and AEKF into a cohesive framework for SOC estimation of LiFePO4 batteries. The steps are as follows:

  1. Data Collection: Gather current, voltage, SOC, and expansion force data from LiFePO4 battery tests under dynamic conditions like DST and FUDS.
  2. Model Training: Use DST data to train the LSSVM expansion force model with QPSO optimization. Inputs are current and true SOC; output is expansion force.
  3. Model Validation: Evaluate the trained model on FUDS data to ensure generalization.
  4. SOC Estimation: Employ AEKF with the trained LSSVM model as the observation equation. Initialize SOC and covariances, then iteratively predict and correct using real-time expansion force measurements.

This closed-loop structure combines the predictive power of machine learning with the filtering capability of Kalman methods, addressing the voltage plateau issue in LiFePO4 batteries through expansion force signals.

Experimental Setup and Results

To validate the proposed QPSO-LSSVM-AEKF method, experiments were conducted on a commercial 5Ah LiFePO4 battery. The battery specifications are summarized in Table 1.

Table 1: Specifications of the LiFePO4 Battery Used in Experiments
Parameter Value
Rated Capacity 5 Ah
Nominal Voltage 3.2 V
Charge Cut-off Voltage 3.65 V
Discharge Cut-off Voltage 2.0 V
Operating Temperature -20°C to 60°C

The test setup included a battery cycler for applying current profiles, a voltage sensor, and a pressure sensor mounted at the battery bottom to measure expansion force. Data were collected under DST and FUDS driving cycles, simulating real-world conditions. The sampling interval was set to 1 second. For the LiFePO4 battery, expansion force data exhibited non-monotonic behavior with SOC, as shown in Figure 1 (inserted earlier). This complexity underscores the need for advanced modeling.

The LSSVM model was trained using DST data (current and SOC as inputs, expansion force as output) and optimized with QPSO. The optimized parameters were \( \sigma = 0.85 \) and \( \gamma = 120.5 \). The model was tested on FUDS data, yielding the performance metrics in Table 2.

Table 2: Performance of QPSO-LSSVM Expansion Force Model on FUDS Data
Metric Value
Mean Absolute Error (MAE) 0.2385%
Root Mean Square Error (RMSE) 0.1766%
Correlation Coefficient (R²) 0.992

The low errors indicate that the QPSO-LSSVM model accurately captures the expansion force dynamics for the LiFePO4 battery. This model was then integrated into AEKF for SOC estimation. The AEKF parameters were initialized as: initial SOC \( \hat{x}_0 = 1 \), process noise covariance \( Q_0 = 10^{-4} \), observation noise covariance \( R_0 = 10^{-3} \), and forgetting factor \( d_k = 0.95 \). The SOC estimation results under FUDS conditions are compared with other methods in Table 3.

Table 3: SOC Estimation Errors for Different Methods on LiFePO4 Battery
Method MAE (%) RMSE (%)
QPSO-LSSVM(F)-EKF 9.4487 20.9211
PSO-LSSVM(F)-AEKF 0.7508 0.7762
QPSO-LSSVM(V)-AEKF (voltage-based) 1.7020 1.7511
QPSO-LSSVM(F)-AEKF (proposed) 0.5212 0.5542
QPSO-LSSVM Data-Driven (pure ML) 3.4327 2.2032

The proposed QPSO-LSSVM(F)-AEKF method achieves the lowest MAE (0.5212%) and RMSE (0.5542%), demonstrating its superiority. In contrast, the voltage-based method (QPSO-LSSVM(V)-AEKF) shows higher errors due to the voltage plateau in LiFePO4 batteries. The pure data-driven approach also underperforms, highlighting the importance of the Kalman filter’s recursive correction. The AEKF’s adaptive noise tuning further reduces errors compared to standard EKF, as seen in the QPSO-LSSVM(F)-EKF results.

To illustrate the SOC estimation process, the state update in AEKF can be represented by the following equations, which combine the LSSVM model and adaptive mechanisms:

$$ \hat{x}_k = \hat{x}_{k|k-1} + K_k \left( F_k^{\text{measured}} – \sum_{j=1}^{n} \alpha_j K(\hat{x}_{k|k-1}, I_k) – b \right) $$

where \( F_k^{\text{measured}} \) is the actual expansion force from the LiFePO4 battery sensor. The Kalman gain \( K_k \) is computed adaptively, ensuring optimal weighting between prediction and observation. This closed-loop estimation continuously refines the SOC, leveraging the expansion force signal to overcome the limitations of voltage-based methods for LiFePO4 batteries.

Discussion and Analysis

The results confirm that expansion force is a viable alternative to voltage for SOC estimation in LiFePO4 batteries. The non-monotonic relationship between expansion force and SOC, while challenging, is effectively modeled by QPSO-LSSVM, thanks to the optimization of kernel parameters. The integration with AEKF adds robustness against noise and model uncertainties, which are common in real-time battery operations.

Key advantages of the proposed method include:

  • Accuracy: By using expansion force, the method avoids the voltage plateau issue inherent in LiFePO4 batteries, leading to more precise SOC estimates.
  • Adaptability: AEKF’s online adjustment of noise covariances accommodates variations in battery behavior, such as aging or temperature effects.
  • Computational Efficiency: LSSVM provides a fast regression model, and QPSO ensures optimal parameters with fewer iterations, making the method suitable for embedded systems in electric vehicles.

However, limitations exist. The expansion force measurement requires additional sensors, which may increase cost and complexity. Future work could explore sensor fusion techniques or model reduction to address this. Additionally, the method’s performance under extreme temperatures or high degradation conditions needs further validation for LiFePO4 batteries.

Conclusion

In this paper, I presented a novel SOC estimation method for LiFePO4 batteries based on QPSO-LSSVM-AEKF and expansion force. The approach tackles the voltage plateau problem by utilizing expansion force signals, which exhibit a stronger correlation with SOC. Through QPSO optimization, the LSSVM model accurately predicts expansion force from current and SOC inputs. This model is then embedded into an AEKF framework, enabling adaptive state estimation with real-time correction. Experimental results on a 5Ah LiFePO4 battery show that the proposed method achieves MAE and RMSE below 0.56%, outperforming traditional voltage-based and pure machine learning methods.

The integration of machine learning and Kalman filtering offers a robust solution for battery management systems, particularly for LiFePO4 batteries where voltage-based SOC estimation is challenging. Future research will focus on extending this method to multi-cell battery packs, incorporating thermal effects, and testing under diverse operating conditions to enhance its practicality for electric vehicles and energy storage systems.

Scroll to Top