In the context of growing environmental concerns and the depletion of traditional energy sources, new energy vehicles have emerged as a pivotal direction for the automotive industry. The li ion battery serves as a critical component in these vehicles, and accurate estimation of its State of Charge (SOC) is essential for optimizing performance and extending driving range. The Battery Management System (BMS) relies heavily on precise SOC estimation to ensure efficient operation. Traditional methods for SOC estimation, such as the Ampere-hour integral method, Kalman filter-based approaches, and model-based techniques, often face challenges like cumulative errors, sensitivity to noise, and dependency on accurate battery models. To address these limitations, data-driven methods, particularly neural networks, have gained attention due to their ability to model complex nonlinear relationships without explicit physical models.
However, a single Backpropagation (BP) neural network, while capable of approximating nonlinear functions, tends to suffer from slow convergence and susceptibility to local minima, leading to reduced estimation accuracy for li ion battery SOC. In this work, we propose an enhanced method that integrates an Improved Grey Wolf Optimization (IGWO) algorithm with a BP neural network to estimate the SOC of li ion batteries. The IGWO algorithm optimizes the weights and thresholds of the BP neural network, mitigating local optimal traps and accelerating convergence. Our simulations demonstrate that this hybrid approach significantly improves SOC estimation precision compared to a standalone BP neural network.

The li ion battery is a rechargeable energy storage device widely used in electric vehicles due to its high energy density and long cycle life. Accurate SOC estimation is crucial for preventing overcharge or over-discharge, which can degrade battery health and pose safety risks. SOC represents the remaining capacity of the li ion battery as a percentage of its total capacity, and it is influenced by factors such as current, voltage, temperature, and aging effects. Existing estimation methods can be categorized into conventional techniques, model-based approaches, and data-driven methods. Conventional methods like the Ampere-hour integral are simple but prone to error accumulation. Model-based methods, such as those using Kalman filters, require accurate battery models and can be computationally intensive. Data-driven methods, including neural networks, offer a flexible alternative by learning from operational data.
In this study, we focus on data-driven estimation using a BP neural network, which is a multilayer feedforward network trained with the error backpropagation algorithm. The BP neural network consists of an input layer, one or more hidden layers, and an output layer. For SOC estimation of the li ion battery, we select voltage and current as input parameters, and SOC as the output. The network structure is defined as follows: input layer nodes (n) = 2 (for voltage and current), output layer nodes (l) = 1 (for SOC), and hidden layer nodes (m) determined by the empirical formula: $$ m = n + l + a $$ where $$ a $$ is a constant between 1 and 10. Through experimental tuning, we set $$ m = 12 $$ for optimal performance. The activation function used is the Sigmoid function, which is defined as: $$ f(x) = \frac{1}{1 + e^{-x}} $$ This function introduces nonlinearity, enabling the network to capture complex patterns in li ion battery behavior.
The forward propagation process computes the output based on inputs, weights, and thresholds. Let $$ W_{ij} $$ be the weight between input layer node i and hidden layer node j, $$ \theta_j $$ be the threshold of hidden layer node j, $$ W_{jk} $$ be the weight between hidden layer node j and output layer node k, and $$ \theta_k $$ be the threshold of output layer node k. The output of hidden layer node j is: $$ H_j = f\left( \sum_{i=1}^{n} W_{ij} \cdot X_i + \theta_j \right) $$ where $$ X_i $$ is the input value. The final output Y (SOC estimate) is: $$ Y = f\left( \sum_{j=1}^{m} W_{jk} \cdot H_j + \theta_k \right) $$ During training, the mean squared error (MSE) between the predicted output and the actual SOC is minimized through backpropagation, adjusting weights and thresholds iteratively. However, this process can be slow and may converge to suboptimal solutions, especially for dynamic li ion battery systems.
To overcome these drawbacks, we employ the Grey Wolf Optimization (GWO) algorithm, a metaheuristic inspired by the social hierarchy and hunting behavior of grey wolves. In GWO, wolves are categorized into four levels: alpha (α), beta (β), delta (δ), and omega (ω). The α wolf represents the best solution, β the second-best, δ the third-best, and ω the remaining solutions. The position of each wolf corresponds to a potential solution in the search space. The hunting mechanism involves encircling prey, which is mathematically modeled as follows: $$ D = || C \cdot X_P(t) – X(t) || $$ $$ A = 2a r_1 – a $$ $$ a = 2 – 2 \cdot \frac{t}{t_{\text{max}}} $$ $$ C = 2r_2 $$ where $$ D $$ is the distance between a wolf and the prey (best solution), $$ t $$ is the current iteration, $$ t_{\text{max}} $$ is the maximum iterations, $$ X_P(t) $$ is the prey’s position, $$ X(t) $$ is the wolf’s position, $$ a $$ is a convergence factor that decreases linearly from 2 to 0, $$ r_1 $$ and $$ r_2 $$ are random numbers in [0,1], and $$ A $$ and $$ C $$ are coefficient vectors. The position update for a wolf is: $$ X(t+1) = X_P(t) – A \cdot D $$ In the context of the li ion battery SOC estimation, the prey represents the optimal set of weights and thresholds for the BP neural network.
The collective hunting behavior is simulated by updating positions based on α, β, and δ wolves: $$ D_{\alpha} = || C_1 \cdot X_{\alpha}(t) – X(t) || $$ $$ D_{\beta} = || C_2 \cdot X_{\beta}(t) – X(t) || $$ $$ D_{\delta} = || C_3 \cdot X_{\delta}(t) – X(t) || $$ $$ X_1 = X_{\alpha} – A_1 \cdot D_{\alpha} $$ $$ X_2 = X_{\beta} – A_2 \cdot D_{\beta} $$ $$ X_3 = X_{\delta} – A_3 \cdot D_{\delta} $$ The updated position is: $$ X(t+1) = \frac{X_1 + X_2 + X_3}{3} $$ This standard GWO algorithm efficiently explores the search space but may still suffer from premature convergence and limited population diversity when applied to complex problems like li ion battery SOC estimation.
We introduce three enhancements to the standard GWO algorithm, forming the Improved GWO (IGWO). First, we use Tent chaotic mapping to initialize the wolf population. Chaos theory provides ergodicity and randomness, which helps maintain population diversity and avoid local optima. The Tent map is defined as: $$ x_{i+1} = \begin{cases} \frac{x_i}{u}, & 0 \leq x_i < u \\ \frac{1 – x_i}{1 – u}, & u \leq x_i \leq 1 \end{cases} $$ where $$ u $$ is a parameter in [0,1]. For $$ u = 0.5 $$, the sequence exhibits uniform distribution, enhancing global search capability for the li ion battery SOC estimation problem.
Second, we adopt a nonlinear parameter control strategy for the convergence factor $$ a $$. In standard GWO, $$ a $$ decreases linearly, which may not balance exploration and exploitation effectively. We propose a nonlinear adjustment: $$ a_1(t) = a_{\text{ini}} – \frac{a_{\text{ini}} – a_{\text{fin}}}{1 + e^{-10 \left( \frac{t}{T_{\text{max}}} – \frac{1}{2} \right)}} $$ where $$ a_{\text{ini}} $$ and $$ a_{\text{fin}} $$ are the initial and final values of $$ a $$, typically set to 2 and 0, respectively. This function ensures a slow decrease in early iterations, promoting global exploration, and a rapid decrease in later iterations, enhancing local exploitation. Compared to other control strategies, such as linear decay $$ a_2(t) = a_{\text{ini}} – a_{\text{ini}} \cdot \left( \frac{t}{T_{\text{max}}} \right) $$ or quadratic decay $$ a_3(t) = a_{\text{ini}} – (a_{\text{ini}} – a_{\text{fin}}) \cdot \left( \frac{t}{T_{\text{max}}} \right)^2 $$, our method better adapts to the nonlinear dynamics of li ion battery systems.
Third, we incorporate ideas from Particle Swarm Optimization (PSO) to improve position updating. In PSO, particles adjust their positions based on personal and global best experiences. We modify the GWO position update formula by introducing weighting factors and a personal best term: $$ \omega_1 = \frac{||X_1||}{||X_1 + X_2 + X_3||} $$ $$ \omega_2 = \frac{||X_2||}{||X_1 + X_2 + X_3||} $$ $$ \omega_3 = \frac{||X_3||}{||X_1 + X_2 + X_3||} $$ $$ X(t+1) = c_1 r_3 (\omega_1 X_1 + \omega_2 X_2 + \omega_3 X_3) + c_2 r_4 [X_{\text{ibest}} – X(t)] $$ where $$ c_1 $$ and $$ c_2 $$ are social and cognitive learning factors, $$ r_3 $$ and $$ r_4 $$ are random numbers in [0,1], and $$ X_{\text{ibest}} $$ is the personal best position of the wolf. This enhancement increases information sharing among wolves and accelerates convergence for li ion battery SOC estimation.
The IGWO algorithm is then integrated with the BP neural network to optimize its weights and thresholds. Each wolf’s position vector encodes all weights and thresholds of the BP network. The fitness function is the Mean Squared Error (MSE) between the predicted SOC and the actual SOC from training data. The optimization process aims to minimize this fitness value, thereby improving the network’s accuracy for li ion battery SOC estimation. The steps of the IGWO-BP algorithm are summarized in Table 1.
| Step | Description |
|---|---|
| 1 | Initialize wolf population using Tent chaotic mapping, set parameters a, A, C. |
| 2 | Encode wolf positions as BP network weights and thresholds, compute fitness (MSE). |
| 3 | Identify α, β, δ wolves based on fitness. |
| 4 | Update wolf positions using enhanced formulas with nonlinear control and PSO ideas. |
| 5 | Update a, A, C values using nonlinear strategy. |
| 6 | Repeat steps 2-5 until maximum iterations or precision is reached. |
| 7 | Extract optimal weights and thresholds from α wolf, assign to BP network. |
| 8 | Train BP network with optimized parameters, perform SOC estimation for li ion battery. |
For experimental validation, we use discharge data from a ternary li ion battery under the UDDS (Urban Dynamometer Driving Schedule) cycle, provided by NASA. The dataset includes voltage, current, and SOC values with 12,315 samples. We randomly select 900 samples, using 700 for training and 200 for testing. The input features are voltage and current, normalized to [0,1] using: $$ X_{\text{inor}} = \frac{X_i – X_{\text{min}}}{X_{\text{max}} – X_{\text{min}}} $$ where $$ X_i $$ is the original value, $$ X_{\text{inor}} $$ is the normalized value, and $$ X_{\text{min}} $$ and $$ X_{\text{max}} $$ are the minimum and maximum of the feature. This preprocessing ensures stable and efficient network training for the li ion battery data. A subset of the data is shown in Table 2.
| Voltage (V) | Current (A) | SOC |
|---|---|---|
| 4.051 | 13.123 | 0.9076 |
| 3.563 | 25.689 | 0.3043 |
| 3.979 | 22.107 | 0.8087 |
| 4.047 | 15.038 | 0.9084 |
| 3.729 | 26.528 | 0.5053 |
| 3.759 | 12.071 | 0.5078 |
| 3.672 | 11.811 | 0.4061 |
| 3.644 | 16.043 | 0.4039 |
| 4.074 | 6.326 | 0.6082 |
| 3.493 | 8.182 | 0.3094 |
The simulation is conducted in MATLAB, comparing the performance of a standard BP neural network and the IGWO-BP neural network for li ion battery SOC estimation. The BP network has a structure of 2-12-1, as described earlier. The IGWO parameters are set as: population size = 30, maximum iterations = 100, $$ a_{\text{ini}} = 2 $$, $$ a_{\text{fin}} = 0 $$, $$ c_1 = 1.5 $$, $$ c_2 = 1.5 $$. The fitness function is MSE, and the training stops when the error falls below 0.001 or iterations reach the maximum.
The results indicate that the IGWO-BP neural network achieves superior accuracy in estimating SOC for the li ion battery. The predicted SOC values closely match the actual values, with most errors within 2%. In contrast, the standard BP network shows larger deviations, with errors up to 9%. The Mean Absolute Error (MAE) is used as a performance metric, calculated as: $$ \text{MAE} = \frac{1}{N} \sum_{i=1}^{N} | \text{SOC}_{\text{predicted}, i} – \text{SOC}_{\text{actual}, i} | $$ where $$ N $$ is the number of test samples. The MAE for the BP network is 6.39%, while for the IGWO-BP network, it is 1.45%, representing a reduction of 4.94%. This significant improvement highlights the effectiveness of the IGWO optimization in enhancing BP network performance for li ion battery applications.
Convergence speed is another critical factor. The IGWO-BP network reaches the desired precision in 14 iterations, whereas the standard BP network requires 21 iterations. This faster convergence is attributed to the improved exploration and exploitation capabilities of the IGWO algorithm, which efficiently navigates the weight space of the neural network. The error iteration curves demonstrate that IGWO-BP not only achieves lower final error but also converges more rapidly, making it suitable for real-time SOC estimation in li ion battery systems.
To further analyze the robustness of our method, we consider the impact of noise and varying operating conditions on li ion battery SOC estimation. The IGWO-BP network, with its optimized parameters, shows resilience to minor fluctuations in input data, maintaining stable performance. This is crucial for practical applications where sensor noise and environmental changes are common. Additionally, the nonlinear activation functions in the BP network allow it to adapt to the dynamic behavior of li ion batteries, such as voltage hysteresis and capacity fade over time.
The integration of IGWO with BP neural network offers several advantages for li ion battery SOC estimation. First, it automates the tuning of network parameters, reducing manual intervention and subjective bias. Second, it enhances global search ability, preventing convergence to poor local solutions. Third, it accelerates training, which is beneficial for large datasets from li ion battery monitoring systems. These benefits collectively contribute to more reliable and accurate SOC estimates, supporting better battery management and longevity.
In conclusion, we have presented an IGWO-BP neural network approach for estimating the State of Charge of li ion batteries. By leveraging an improved grey wolf optimization algorithm, we optimize the weights and thresholds of a BP neural network, addressing its limitations in convergence and local optima. Experimental results using NASA li ion battery data confirm that our method reduces estimation error and speeds up convergence compared to a standard BP network. The MAE improvement of 4.94% underscores the potential of this hybrid algorithm for enhancing BMS performance in electric vehicles and energy storage systems. Future work may explore adaptive parameter tuning, integration with other metaheuristics, and application to diverse li ion battery chemistries and conditions.
