State of charge estimation of lithium-ion batteries using improved BP neural network and filtering techniques

The state of charge (SOC) is a critical parameter in the battery management system (BMS), and its accurate estimation is essential for ensuring the safety and reliability of batteries. This paper presents a lithium-ion battery SOC estimation method that combines an improved neural network with a filtering algorithm. Firstly, the backpropagation (BP) algorithm is chosen as the architecture of the neural network in the hybrid method due to its strong nonlinear approximation ability, and the particle swarm optimization (PSO) algorithm is used to optimize it to avoid falling into local optimal solutions. By combining the search ability of PSO with the learning ability of the BP neural network, the accuracy of the neural network model is improved. The proposed method integrates the PSO-BP model with the extended Kalman filter based on minimum error entropy (MEE-EKF). PSO-BP is utilized as the measurement equation for MEE-EKF, while the ampere-hour integration method is employed as the state equation to achieve closed-loop SOC estimation. Finally, experimental validation is conducted under four typical operating conditions and one random condition across a wide temperature range. The results demonstrate that the proposed method achieves high accuracy across all conditions compared with the results of other algorithms, with a maximum absolute error of not exceeding 3.13%, a mean absolute error of less than 0.54%, and a root mean square error of no more than 0.66%.


Introduction
As fossil fuel reserves are depleting and environmental pollution is worsening, electric vehicles (EVs) have shown promising market prospects as the future trend.Lithium-ion batteries serve as the core energy source of EVs, owing to their advantages including high energy density, no memory effect, long cycle life, and low self-discharge rate [1].To ensure the stable operation of EVs, it is essential to implement an efficient BMS to monitor and control the battery state, improve battery performance and safety, and extend the battery's service life.SOC represents the ratio of the battery's current available capacity to its maximum available capacity.However, accurate estimation of SOC remains challenging due to the complex chemical reactions within the power battery and external interference.Therefore, developing accurate SOC estimation methods is of great significance.
Currently, there are four main types of methods used for SOC estimation of lithium-ion batteries including ampere-hour integration (AHI), open circuit voltage (OCV) methods, model-based methods, and data-driven methods.Although the AHI method is simple to implement and has good long-term stability, its cumulative error will lead to low accuracy of SOC estimation.The OCV method estimates the SOC of a battery by analyzing its static characteristics, which does not require the measurement of the internal current of the battery, thereby avoiding the use of additional sensors and reducing the cost and complexity of the system [2].However, the OCV methods rely on the relationship curve linking the OCV and SOC of the lithium-ion battery, which could alter due to factors such as the battery's lifespan and temperature changes, resulting in an increase in SOC estimation errors.Furthermore, the OCV method can only obtain accurate SOC estimation values after the battery has been placed for a period of time, thus accurate SOC estimation cannot be performed during the initial use of the battery.Model-based methods can accurately model the battery and achieve accurate SOC estimation [3,4].However, it requires high computational power and accuracy, as well as multi-parameter testing and calibration of the battery, making it difficult to be implemented in practical applications.Additionally, with changes in external environments, its generalization ability and estimation accuracy will fluctuate.
The data-driven method does not require knowledge of the physical characteristics and parameters of the battery, but instead utilizes historical data for learning and prediction, thus simplifying the complexity of SOC estimation [5].Furthermore, compared with other methods, the data-driven method is more accurate as it can dynamically adjust and optimize based on the actual operating conditions, without being affected by model bias values and errors, thereby enhancing the accuracy and stability of SOC estimation [6,7].The BP neural network is a commonly used data-driven method, which has strong nonlinear approximation ability and can handle the nonlinear characteristics of SOC well.It is robust to data noise and uncertainty, and can handle incomplete or inaccurate data in practical applications.In addition, the network structure of BP can be adjusted according to actual needs, which can handle SOC estimation problems of different scales and types.However, the BP algorithm uses gradient descent to solve, which may fall into local optimal solutions, resulting in slow convergence and inability to reach global optimal solutions [8].Additionally, BP is sensitive to initial weights, and different initial weights may lead to different training results of the neural network.Therefore, this paper proposes a hybrid algorithm that combines an improved BP algorithm with the improved Kalman filter (KF) algorithm named MEE-EKF [9].The optimized PSO-BP algorithm can find the global optimal solution faster and has better robustness to the noise and nonlinearity of the training data [10].The neural network results are set as the state equation, and the AHI method is set as the state equation of MEE-EKF, with the aim to improve the estimation accuracy of SOC.Finally, the proposed method demonstrates accurate estimation and good generalization performance across diverse operating conditions.

PSO-BP algorithm
The BP algorithm is a traditional feedforward neural network algorithm including an input layer, a hidden layer, and an output layer, which is relatively simple in principle and has strong implementation ability.By propagating signals forward and errors backward, the weights between each layer are obtained to construct the required estimation model.The BP network structure with n th input neurons, i th hidden neurons, and j th output neurons is shown in Figure 1, where ‫ݒ‬ and ߱ represent the connection weights between the input-hidden and hidden-output layer neurons, respectively.However, traditional BP algorithm has some drawbacks, such as being prone to getting trapped in local optima and sensitive to hyperparameter settings [8].Therefore, PSO is used to optimize the BP neural network.In this study, the global search capability of the PSO algorithm is utilized to optimize the BP neural network by defining the fitness function as the network's error, so that the PSO-BP algorithm can help the neural network escape from local optima and find the global optimum, thus improving the accuracy of classification or regression [11].Due to its fast convergence speed, few parameter settings, resistance to getting trapped in local optima, and wide applicability, PSO-BP algorithm is chosen as the neural network framework for the hybrid algorithm in this study.The algorithm involves five main steps: (1) randomly initializing a group of particles, where each particle corresponds to a weight and bias of the BP neural network; (2) evaluating each particle's fitness based on the BP neural network error; (3) updating each particle's position and velocity based on its current and historical optimal fitness; (4) updating the corresponding BP's weight and bias values based on the updated particle position; and (5) repeating steps 2-4 until the stop condition is met.The optimized BP consists 1 input layer, 2 hidden layers and 1 output layer.
Through this approach, the PSO-BP algorithm is capable of exploring various local optima within the search space, ultimately converging towards the global optimum, thereby improving the performance of the neural network and thus enhancing the accuracy of the SOC estimation at the first stage.

MEE-EKF
The KF algorithm used in the proposed hybrid method is an improved version of the basic KF algorithm called MEE-EKF, which employs the minimum error entropy criterion instead of the traditional minimum mean square error and the maximum correntropy criterion to handle more complex non-Gaussian noise.The MEE-EKF algorithm used in the proposed hybrid method is more suitable for handling nonlinear system-related problems under non-Gaussian noise, and related experiments have demonstrated its strong robustness and high accuracy.The specific implementation process of the MEE-EKF algorithm can be found in Literature [9], and its main steps are shown in Table 1.

Main steps of MEE-EKF algorithm
Step 1: Initialize prior estimation and state prediction error covariance matrix, and set the appropriate core size and a smaller positive value ߝ.
Step 2: Obtain a prior estimate and its corresponding covariance matrix.The related parameters of augmented model can be obtained by performing the Cholesky decomposition on the covariance matrix of the augmented noise.
Step 3: Set and ,where represents the estimated state at the fixed-point iteration.
Step 4: According to the updated position, the weight and offset value of the corresponding BP neural network are updated.
Step 5: Use available measures to update .
Step 6: Calculate the updated k value and a posterior covariance matrix and , and then proceed to step 2.
Since the correlation between temperature data and SOC is not high according to Literature [7], accessible voltage and current are directly used as input information for the neural network, while SOC is used as output information.The measurement equation for the MEE-EKF algorithm is given by Equation (1). , where ݂ denotes the results computed by the PSO-BP, ‫ݐ‬ denotes the sampling time, ܷ and ‫ܫ‬ denote the voltage and current at ‫,ݐ‬ and ߱ ௧ represents the measurement noise.The state equation of the MEE-EKF algorithm is shown in Equation ( 2).
where SOC t represents the SOC value obtained at the current sampling time using the AHI method, ∆ܶ denotes the sampling time interval, ‫ܥ‬ ே represents the current maximum available capacity of the battery, and ܳ represents the process noise.
Figure 2 shows the closed-loop estimation process of the hybrid method based on PSO-BP and MEE-EKF.The PSO-BP module is incorporated into the measurement equation of the Kalman filter architecture, and the state equation of the KF architecture is modeled using the AHI method, achieving high-precision closed-loop SOC estimation.

Battery test and performance evaluation metric
The battery testing platform used in this study consists of a battery test system, a test chamber, and a host computer, as shown in Figure 3.The battery model of INR18650-2200A is used in the test, featuring a nominal capacity of 2200mAh, a minimum capacity of 2150mAh, and a rated voltage of 3.7V, with a standard charge and discharge current of 0.2C (440mA).random mixed working condition (RMWC).The RMWC is a random combination of the first five test conditions, with temperature ranging from 10 °C to 40 °C, which is different from the first five test conditions performed at 25 °C to verify the method's generalization performance.Figure 4 displays the voltage-current curves collected from the test under different cycling conditions.The root mean square error (RMSE) and mean absolute error (MAE) are adopted as evaluation metrics for the model, and due to the large sample size, the maximum absolute error (MAX) is also introduced as an evaluation metric, as shown in Equations (3) to (5).
MAX maximum estimated actual x x (5) where ‫ݔ‬ ௦௧௧ௗ represents the estimated SOC value, ‫ݔ‬ ௧௨ represents the actual SOC value, and ݊ represents the sample number.Considering the estimation results across all the operating conditions, the BP and LSTM exhibit the poorest performance.The MAX value of LSTM is the largest, around 60% in every cycling condition, mainly due to the error generated in the initial estimation stage.In contrast, the improved algorithm PSO-BP demonstrates strong estimation capability, with an average reduction of around 86% in MAX value compared to LSTM in all working conditions.Moreover, the proposed hybrid method shows an average reduction of around 73% in MAX value compared to the PSO-BP in each working condition.Not only that, the proposed method shows a very low range of MAE and RMSE values compared to other methods, indicating that it contributes to a significant improvement in SOC estimation accuracy.Although a simple feedforward neural network is used, its performance is still excellent.The good generalization ability of the proposed method is further demonstrated by its performance in the RMWC working condition.With only the constant temperature DST data used for training, the proposed hybrid method can achieve good estimation accuracy in a wide temperature and random working conditions, providing further validation of its feasibility.

Conclusions
The main conclusions obtained by the proposed method are as follows.
(1) A simple feedforward neural network is used as the neural network architecture in the proposed method, as well as the measurement equation in the KF module.The weights and bias values of the BP network are optimized by the conventional PSO algorithm to improve the performance of the neural network module.
(2) The utilization of MEE-EKF effectively tackles the challenge of battery state estimation in the presence of non-linear system characteristics.By incorporating MEE-EKF, the estimation errors of PSO-BP are substantially reduced, resulting in the establishment of a high-precision closed-loop estimation system, with a RMSE no more than 0.66%.
(3) The SOC estimation results of the proposed method outperforms BP, LSTM, and PSO-BP algorithms under different typical cycle conditions and a wide temperature random condition, demonstrating excellent generalization ability and estimation accuracy.

Figure 1 .
Figure 1.The architecture of a BP neural network.

Figure 2 .
Figure 2. Process diagram of the proposed SOC estimation method.

Figure 3 .
Figure 3. Testing platform.For this battery test, two identical 18650 batteries are used for charge and discharge testing.First, the tested batteries are charged with a standard constant current-constant voltage of 0.2C until the charging termination current of 0.02C (44mA) is reached.The fully charged batteries are then rested for 30 minutes before undergoing dynamic stress testing.The test cycle conditions used includes dynamic stress test (DST), highway driving schedule (US06), federal urban driving schedule (FUDS), urban dynamometer driving schedule (UDDS), Beijing dynamic stress test (BJDST), and a custom

Table 2 .
Error analysis of SOC estimation under different working conditions.