A method and system for estimating the state of charge of lithium-ion batteries
By using a fusion method of second-order Thevenin equivalent circuit model, wavelet denoising, EKF and SSA-BP neural network, the noise interference and model bias problems in lithium-ion battery SOC estimation are solved, achieving high-precision and stable SOC estimation that can adapt to complex operating conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTHWEAT UNIV OF SCI & TECH
- Filing Date
- 2026-05-25
- Publication Date
- 2026-06-30
AI Technical Summary
Existing methods for estimating the state of charge (SOC) of lithium-ion batteries struggle to achieve high-precision and stable SOC estimation when faced with problems such as sampling noise interference, model parameter drift, and poor adaptability to dynamic operating conditions.
A second-order Thevenin equivalent circuit model is used in combination with wavelet denoising, extended Kalman filtering (EKF) and a BP neural network optimized by sparrow search algorithm (SSA-BP) for fusion estimation. Through accurate identification of battery parameters, denoising processing and error correction, real-time high-precision estimation of SOC is achieved.
It significantly improves the accuracy and stability of lithium-ion battery state of charge estimation, reduces estimation errors, enhances noise immunity and robustness, and adapts to complex operating conditions.
Smart Images

Figure CN122307406A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of battery state of charge estimation technology, and in particular to a method and system for estimating the state of charge of lithium-ion batteries. Background Technology
[0002] Currently, the new energy vehicle industry is developing rapidly, with a continuously increasing market share. Lithium-ion batteries have become the mainstream power source for new energy vehicles due to their superior performance. The Battery Management System (BMS) is a core component ensuring the safe, stable, and efficient operation of batteries. It primarily undertakes key functions such as battery status monitoring, intelligent charge and discharge control, and cycle life management. Among these, State of Charge (SOC) estimation is the core technical indicator of the BMS, and its estimation accuracy directly determines the accuracy of the vehicle's range display, battery lifespan, and overall vehicle operational safety.
[0003] Lithium-ion batteries possess inherent characteristics such as strong nonlinearity and complex dynamic properties. Under actual operating conditions, voltage and current sampling signals are easily affected by environmental and circuit interference, resulting in noise. Simultaneously, the battery's equivalent circuit model is prone to parameter drift and inherent model biases, making traditional SOC estimation methods unable to meet the high-precision, high-stability, and robust engineering application requirements. Current mainstream SOC estimation methods all have significant limitations. Existing open-circuit voltage estimation methods are simple in principle and have high accuracy in static conditions, but require long-term battery rest, making them unsuitable for dynamic operating conditions and difficult to implement in real-time. Ampere-hour integration estimation methods are simple to implement and have good real-time performance, but estimation errors accumulate over time, are sensitive to initial SOC and current measurement errors, and their accuracy decreases with long-term use. Kalman filtering algorithms, such as the Extended Kalman Filter (EKF), Unscented Kalman Filter (UKF), and Cubature Kalman Filter (Cubature Kalman Filter), are also relevant. Represented by Filter (CKF), EKF processes nonlinear models through linearization, resulting in low computational cost, good real-time performance, and ease of engineering implementation, making it the most widely used solution currently. However, the linearization process is prone to losing system information, limiting estimation accuracy. UKF replaces linearization with unscented transformation, improving estimation accuracy and anti-interference capabilities, but its computational complexity is higher than EKF. CKF is based on volume transformation, offering stronger nonlinear fitting capabilities and higher estimation accuracy, but it has the highest computational cost, requiring high hardware computing power and making it unsuitable for deployment on automotive embedded platforms. Neural network algorithms, with BP neural networks as a typical example, do not rely on accurate battery models and have strong nonlinear fitting capabilities, but training depends on a large number of samples, and the random initial parameters are prone to getting trapped in local optima, resulting in poor training stability and large fluctuations in estimation results.
[0004] Single estimation methods cannot simultaneously address core issues such as sampling noise interference, model parameter drift, and poor adaptability to dynamic operating conditions, making it difficult to meet the high-precision SOC estimation requirements of lithium-ion batteries under complex operating conditions. Current technologies have not yet formed a complete solution that effectively integrates wavelet denoising, EKF, the Sparrow Search Algorithm (SSA), and BP neural networks, failing to achieve synergistic complementarity between signal preprocessing, real-time preliminary estimation, and accurate model bias correction. Therefore, it is necessary to propose a lithium-ion battery SOC estimation method that integrates wavelet denoising, EKF, and SSA-optimized BP neural networks to meet the application needs of new energy vehicles under complex dynamic operating conditions. Summary of the Invention
[0005] The purpose of this application is to provide a method and system for estimating the state of charge (SOC) of lithium-ion batteries, which can improve the accuracy of SOC estimation.
[0006] To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides a method for estimating the state of charge (SOC) of a lithium-ion battery, including: Collect the terminal voltage, charging and discharging current, and open-circuit voltage of the lithium-ion battery under test at different states of charge. Construct a second-order Thevenin equivalent circuit model based on Thevenin's theorem; Based on the terminal voltage and charging / discharging current of the lithium-ion battery under test, the parameters in the second-order Thevenin equivalent circuit model are identified to obtain the parameter identification vector. Based on the open-circuit voltage of the lithium-ion battery under test at different states of charge, a nonlinear mapping relationship between open-circuit voltage and state of charge is established. The collected terminal voltage and charge / discharge current of the lithium-ion battery under test are processed to obtain the noise-reduced terminal voltage and charge / discharge current. Based on the denoised terminal voltage, denoised charging and discharging current, parameter identification vector, and the nonlinear mapping relationship between open-circuit voltage and state of charge, the state of charge of the lithium-ion battery under test is estimated using extended Kalman filtering to obtain the estimated state of charge value. A BP neural network is constructed, and the initial weights and thresholds of the BP neural network are optimized using the sparrow search algorithm to obtain the optimized BP neural network. The optimized BP neural network is used to fit and compensate the estimated state of charge to obtain the final estimated state of charge.
[0007] Optionally, the second-order Thevenin equivalent circuit model is expressed by the following formula: Optionally, based on the terminal voltage and charge / discharge current of the lithium-ion battery under test, the parameters in the second-order Thevenin equivalent circuit model are identified to obtain a parameter identification vector, specifically including: Based on the terminal voltage and charge / discharge current of the lithium-ion battery under test, the parameters in the second-order Thevenin equivalent circuit model are identified using the recursive least squares method to obtain the parameter identification vector, as expressed in the following formula: Optionally, based on the open-circuit voltage of the lithium-ion battery under test at different states of charge, a nonlinear mapping relationship between open-circuit voltage and state of charge is established, specifically including: The open-circuit voltage of the lithium-ion battery under test was obtained through a static battery test at different states of charge. An open-circuit voltage-state-of-charge curve was constructed using a polynomial fitting method. This curve characterizes the nonlinear mapping relationship between open-circuit voltage and state of charge, and is expressed by the following formula: Optionally, the collected terminal voltage and charge / discharge current of the lithium-ion battery under test are processed to obtain noise-reduced terminal voltage and charge / discharge current, specifically including: The terminal voltage of the lithium-ion battery under test is decomposed into N-level wavelet components using the db4 wavelet basis to obtain a low-frequency component of the terminal voltage and N high-frequency noise components of the terminal voltage. The charge and discharge current of the lithium-ion battery under test is decomposed into N-level wavelet components using the db4 wavelet basis to obtain one low-frequency component of the charge and discharge current and N high-frequency noise components of the charge and discharge current. The high-frequency noise components of the N terminal voltages and the N charging and discharging currents are processed by a soft threshold function to obtain the denoised high-frequency components of the N terminal voltages and the denoised high-frequency components of the N charging and discharging currents. Perform inverse wavelet transform on the low-frequency component of the single terminal voltage and the high-frequency components of the N denoised terminal voltages to obtain the denoised terminal voltage. Perform inverse wavelet transform on the low-frequency component of the single charging / discharging current and the high-frequency components of the N denoised charging / discharging currents to obtain the denoised charging / discharging current.
[0008] Optionally, based on the denoised terminal voltage, the denoised charge / discharge current, the parameter-identified second-order Thevenin equivalent circuit model, and the open-circuit voltage-state-of-charge nonlinear mapping relationship, the state of charge of the lithium-ion battery under test is estimated using an extended Kalman filter to obtain the estimated state of charge value, specifically including: The second-order Thevenin equivalent circuit model after parameter identification is linearized by Taylor expansion of extended Kalman filter to obtain the state-space equation. Based on the state space equation, the state vector at the current moment is predicted; Based on the predicted state vector at the current moment, the state vector at the current moment is updated to obtain the optimal estimate of the state vector at the current moment; Based on the optimal estimate of the state vector at the current moment, the estimated value of the charged state at the current moment is obtained.
[0009] Optionally, the state-space equation is expressed as follows: Based on the state-space equation, the state vector at the current moment is predicted, and the formula is expressed as follows: Based on the predicted state vector at the current moment, the state vector at the current moment is updated to obtain the optimal estimate of the state vector at the current moment, as expressed by the following formula: Optionally, a backpropagation (BP) neural network is constructed, and the initial weights and thresholds of the BP neural network are optimized using the sparrow search algorithm to obtain an optimized BP neural network, specifically including: Step 701: Construct a BP neural network containing an input layer, hidden layers, and an output layer; Step 702: Using the denoised terminal voltage, the denoised charging and discharging current, and the estimated state of charge as inputs, establish the mapping relationship between the input features and the state of charge estimation error through the hidden layer nonlinear mapping, and output the predicted value of the state of charge estimation error. Step 703: Concatenate all weights and thresholds in the BP neural network into a one-dimensional vector, and define the one-dimensional vector as the position of a sparrow; Step 704: Set the parameter search range for the weights and thresholds of the BP neural network and initialize the sparrow population size, maximum number of iterations, warning value, and safety value; Step 705: Based on the sparrow population size, randomly generate a number of one-dimensional vectors equal to the population size within the parameter search range to construct an initial sparrow population containing multiple sparrows; Step 706: Using the reciprocal of the prediction error of the BP neural network as the fitness function, calculate the fitness value corresponding to each sparrow, and sort them to obtain the current global best sparrow position and the global worst sparrow position; Step 707: Iteratively update the positions of all sparrows according to the three role rules of discoverer, joiner, and vigilant. Among them: discoverers are individuals with fitness higher than a set threshold, and perform global foraging search or danger zone relocation based on the relationship between the warning value and the safety value; joiners are individuals with fitness lower than a set threshold, and update their positions based on the difference between their own position and the worst sparrow position in the world; vigilant are randomly selected warning individuals, and perform small-scale perturbation-style position updates based on the difference between their own position and the best sparrow position in the world. Step 708: Repeat steps 706 and 707 until the maximum number of iterations is reached, and output the weights and biases corresponding to the globally optimal sparrow position as the optimal initial parameters of the BP neural network. Step 709: Assign the optimal initial parameters to the BP neural network and complete the training to obtain the optimized BP neural network.
[0010] Optionally, the formula for the hidden layer output value is expressed as: The formula for the output layer error prediction value is expressed as follows: The discovery location update formula is expressed as follows: The formula for updating the position of the joiner is expressed as follows: The formula for updating the location of the vigilant is expressed as follows: Secondly, this application provides a lithium-ion battery state of charge estimation system, the lithium-ion battery state of charge estimation system comprising: The data acquisition module is used to acquire the terminal voltage, charging and discharging current, and open-circuit voltage of the lithium-ion battery under test at different states of charge. The second-order Thevenin equivalent circuit model construction module is used to construct a second-order Thevenin equivalent circuit model based on Thevenin's theorem. The parameter identification module is used to identify the parameters in the second-order Thevenin equivalent circuit model based on the terminal voltage and charging / discharging current of the lithium-ion battery under test, and obtain the parameter identification vector. The mapping relationship construction module is used to establish a nonlinear mapping relationship between open circuit voltage and state of charge based on the open circuit voltage of the lithium-ion battery under test at different states of charge. The noise reduction module is used to process the collected terminal voltage and charge / discharge current of the lithium-ion battery under test to obtain the noise-reduced terminal voltage and charge / discharge current. The state of charge estimation module is used to estimate the state of charge of the lithium-ion battery under test based on the denoised terminal voltage, denoised charging and discharging current, parameter identification vector and open-circuit voltage-state of charge nonlinear mapping relationship, using extended Kalman filter to obtain the estimated state of charge value. The BP neural network construction and optimization module constructs a BP neural network and uses the sparrow search algorithm to optimize the initial weights and thresholds of the BP neural network to obtain the optimized BP neural network. The final state of charge estimation module fits and compensates the estimated state of charge based on the optimized BP neural network to obtain the final estimated state of charge.
[0011] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a method and system for estimating the state of charge (SOC) of lithium-ion batteries, proposing a fusion estimation method based on a second-order Thevenin equivalent circuit model and denoising + EKF + SSA-BP. This method first accurately identifies battery model parameters and establishes a nonlinear mapping relationship between open-circuit voltage and SOC. Then, it preprocesses voltage and current sampling signals to remove high-frequency noise, uses the EKF algorithm to achieve a real-time preliminary SOC estimation, and finally uses an SSA-BP neural network to accurately correct the estimation error of the EKF, effectively improving the accuracy and stability of SOC estimation. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating a method for estimating the state of charge of a lithium-ion battery according to an embodiment of this application; Figure 2 This is a schematic diagram showing the comparison between the estimated SOC value and the actual SOC value of a lithium-ion battery under test, provided in an embodiment of this application. Figure 3 This is a schematic diagram of the comparison curve of the SOC estimation error of the lithium-ion battery under test provided in an embodiment of this application; Figure 4 This is a schematic diagram showing the comparison between the actual and estimated values of the terminal voltage of a lithium-ion battery under test, provided in an embodiment of this application. Figure 5 This is a schematic diagram of the error curve for estimating the terminal voltage of a lithium-ion battery under test, provided in an embodiment of this application. Figure 6This is a schematic diagram of the functional modules of a lithium-ion battery state-of-charge estimation system provided in another embodiment of this application. Detailed Implementation
[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0015] With the widespread adoption of new energy vehicles, the estimation of the state of charge (SOC) of lithium-ion battery management systems (BMS) is crucial. Addressing issues such as strong battery nonlinearity, noisy sampling signals, and model bias in single filtering algorithms, this application employs a second-order Thevenin equivalent circuit to characterize battery properties, uses recursive least squares (RLS) to identify model parameters, and fits the OCV-SOC curve. First, wavelet denoising is used to purify the raw voltage and current data. Then, an extended Kalman filter (EKF) is used to perform a preliminary SOC estimation. Finally, a sparrow search algorithm (SSA) is used to optimize the BP neural network to compensate for the inherent error of the EKF. The fusion algorithm presented in this application has lower estimation error, better stability, a clear structure, and is easily reproducible.
[0016] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0017] This application proposes a wavelet denoising + EKF + SSA-BP fusion SOC estimation algorithm. Its core advantage lies in achieving synergistic complementarity among the modules, maximizing their strengths and minimizing their weaknesses. Wavelet denoising is used to purify the sampled data, solving the noise interference problem. EKF is used to achieve preliminary real-time SOC estimation, ensuring dynamic response performance. SSA-BP accurately corrects the inherent biases of the EKF model, improving estimation accuracy. The entire algorithm has a clear structure, moderate computational load, and strong stability, effectively adapting to the SOC estimation needs of lithium-ion batteries under complex operating conditions.
[0018] Combining the advantages of the second-order Thevenin equivalent circuit model, this application constructs a complete SOC estimation scheme. The second-order Thevenin model is selected to balance the model accuracy and computational complexity. The model parameters are identified online by RLS and the OCV-SOC relationship curve is fitted. Combined with the above-mentioned fusion algorithm, a simple, feasible and accurate SOC estimation scheme is formed.
[0019] In one exemplary embodiment, such as Figure 1As shown, a method for estimating the state of charge (SOC) of a lithium-ion battery is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. The SOC estimation method for a lithium-ion battery described in this embodiment includes the following steps 1 to 8. Wherein: Step 1: Collect the terminal voltage, charging and discharging current, and open-circuit voltage of the lithium-ion battery under test at different states of charge.
[0020] Step 2: Construct a second-order Thevenin equivalent circuit model based on Thevenin's theorem. The formula for the second-order Thevenin equivalent circuit model is as follows:
[0021] Specifically, the selection of the equivalent circuit model for a lithium-ion battery requires a trade-off between accuracy and computational complexity. Internal resistance models only include ohmic internal resistance and lack polarization branches, failing to reflect the battery's dynamic characteristics and resulting in severely insufficient estimation accuracy. While third-order RC models can accurately characterize the battery's nonlinear characteristics, their complex structure and massive computational load make them difficult to apply in engineering. First-order RC models can characterize basic polarization characteristics but struggle to simultaneously describe electrochemical and concentration polarization, resulting in limited fitting accuracy. This embodiment selects a second-order Thevenin model, which introduces two sets of parallel RC branches, simultaneously characterizing both electrochemical and concentration polarization phenomena, significantly outperforming first-order models in terms of accuracy. Furthermore, its structure is simpler than third-order models, and computational overhead is controllable. Therefore, the second-order Thevenin model achieves the optimal balance between estimation accuracy and computational complexity, and this embodiment ultimately uses this model to characterize the battery's dynamic characteristics.
[0022] Step 3: Based on the terminal voltage and charge / discharge current of the lithium-ion battery under test, identify the parameters in the second-order Thevenin equivalent circuit model to obtain the parameter identification vector, specifically including: Based on the terminal voltage and charge / discharge current of the lithium-ion battery under test, the parameters in the second-order Thevenin equivalent circuit model are identified using the recursive least squares method to obtain the parameter identification vector, as expressed in the following formula: In this embodiment, there is no need to store a large amount of historical data during the parameter identification process, resulting in high computational efficiency and adaptability to dynamic battery operating conditions.
[0023] Step 4: Based on the open-circuit voltage of the lithium-ion battery under test at different states of charge, establish a nonlinear mapping relationship between open-circuit voltage and state of charge, specifically including: The open-circuit voltage of the lithium-ion battery under test was obtained through a static battery test at different states of charge. An open-circuit voltage-state-of-charge curve was constructed using a polynomial fitting method. This curve characterizes the nonlinear mapping relationship between open-circuit voltage and state of charge, and is expressed by the following formula: Step 5: Process the collected terminal voltage and charge / discharge current of the lithium-ion battery under test to obtain the noise-reduced terminal voltage and charge / discharge current, specifically including: The terminal voltage of the lithium-ion battery under test is decomposed into N-level wavelet components using the db4 wavelet basis to obtain one low-frequency component of the terminal voltage and N high-frequency noise components of the terminal voltage.
[0024] The charge and discharge current of the lithium-ion battery under test is decomposed into N-level wavelet components using the db4 wavelet basis to obtain one low-frequency component of the charge and discharge current and N high-frequency noise components of the charge and discharge current.
[0025] A soft threshold function is used to process the high-frequency noise components of the N terminal voltages and the N charging and discharging currents respectively, to obtain the denoised high-frequency components of the N terminal voltages and the denoised high-frequency components of the N charging and discharging currents.
[0026] Specifically, the soft threshold function expression used in this application is as follows: Perform inverse wavelet transform on the low-frequency component of the single terminal voltage and the high-frequency components of the N denoised terminal voltages to obtain the denoised terminal voltage.
[0027] Perform inverse wavelet transform on the low-frequency component of the single charging / discharging current and the high-frequency components of the N denoised charging / discharging currents to obtain the denoised charging / discharging current.
[0028] In actual sampling, voltage and current signals are easily mixed with high-frequency noise, which affects the accuracy of SOC estimation. Therefore, wavelet denoising is used to preprocess the original data to remove noise and retain effective signal features.
[0029] Step 6: Based on the denoised terminal voltage, denoised charge / discharge current, parameter identification vector, and the open-circuit voltage-state-of-charge nonlinear mapping relationship, the state of charge of the lithium-ion battery under test is estimated using an extended Kalman filter to obtain the estimated state of charge value, specifically including: The second-order Thevenin equivalent circuit model after parameter identification is linearized by Taylor expansion of extended Kalman filter to obtain the state-space equation.
[0030] Based on the state-space equation, the state vector at the current moment is predicted.
[0031] Based on the predicted state vector at the current moment, the state vector at the current moment is updated to obtain the optimal estimate of the state vector at the current moment.
[0032] Based on the optimal estimate of the state vector at the current moment, the estimated value of the charged state at the current moment is obtained.
[0033] In this embodiment, the state-space equation is expressed as follows: Based on the state-space equation, the state vector at the current moment is predicted, and the formula is expressed as follows: Based on the predicted state vector at the current moment, the state vector at the current moment is updated to obtain the optimal estimate of the state vector at the current moment, as expressed by the following formula: Step 7: Construct a BP neural network. Use the sparrow search algorithm to optimize the initial weights and thresholds of the BP neural network to obtain the optimized BP neural network. Specifically, this includes: Step 701: Construct a BP neural network containing an input layer, hidden layers, and an output layer.
[0034] Step 702: Using the denoised terminal voltage, the denoised charging and discharging current, and the estimated state of charge as inputs, establish the mapping relationship between the input features and the state of charge estimation error through the hidden layer nonlinear mapping, and output the predicted value of the state of charge estimation error.
[0035] Step 703: Concatenate all weights and thresholds in the BP neural network into a one-dimensional vector, and define the one-dimensional vector as the position of a sparrow.
[0036] Step 704: Set the parameter search range of the weights and thresholds of the BP neural network and initialize the sparrow population size, maximum number of iterations, warning value, and safety value.
[0037] Step 705: Based on the sparrow population size, randomly generate a number of one-dimensional vectors equal to the population size within the parameter search range to construct an initial sparrow population containing multiple sparrows.
[0038] Step 706: Using the reciprocal of the prediction error of the BP neural network as the fitness function, calculate the fitness value corresponding to each sparrow, and sort them to obtain the current global best sparrow position and the global worst sparrow position.
[0039] Step 707: Iteratively update the positions of all sparrows according to the three role rules of discoverer, joiner, and vigilant. Among them: discoverer is an individual with fitness higher than a set threshold, which performs global foraging search or danger zone transfer based on the relationship between the warning value and the safety value; joiner is an individual with fitness lower than a set threshold, which updates its position based on the difference between its own position and the worst sparrow position in the world; vigilant is a randomly selected warning individual, which performs small-scale perturbation-style position update based on the difference between its own position and the best sparrow position in the world.
[0040] Step 708: Repeat steps 706 and 707 until the maximum number of iterations is reached, and output the weights and biases corresponding to the globally optimal sparrow position as the optimal initial parameters of the BP neural network.
[0041] Step 709: Assign the optimal initial parameters to the BP neural network and complete the training to obtain the optimized BP neural network.
[0042] In this embodiment, the formula for the hidden layer output value is expressed as: The formula for the output layer error prediction value is expressed as follows: In this embodiment, the initial weights and biases of the BP neural network are randomly selected, which easily leads to local optima and poor training stability. Therefore, the Sparrow Search Algorithm (SSA) is used to globally optimize the parameters and improve the accuracy of error compensation. SSA achieves optimization by simulating the foraging and anti-predation behavior of sparrows, determining the optimal initial weights and biases of the BP neural network, enabling the network to accurately fit the EKF estimation error, and finally compensating the error to the preliminary SOC value to obtain a high-precision SOC estimation result. The discoverer position update formula is expressed as: The formula for updating the position of the joiner is expressed as follows: The formula for updating the location of the vigilant is expressed as follows: Step 8: Fit and compensate the estimated state of charge based on the optimized BP neural network to obtain the final estimated state of charge.
[0043] This embodiment also uses MATLAB / Simulink to build a simulation platform and selects the publicly available lithium-ion battery dataset from the University of Maryland as experimental data. This dataset includes battery charge and discharge voltage, current, and actual SOC value to verify the accuracy and stability of the algorithm. This embodiment sets up two sets of comparative experiments to verify the superiority of the fusion algorithm of this application: the first set uses a single EKF algorithm; the second set uses a wavelet denoising + EKF + SSA-BP fusion algorithm.
[0044] This embodiment uses Mean Absolute Error (MAE) and Root Mean Square Error (RMSE) as evaluation indicators for SOC estimation accuracy. The smaller the error value, the higher the estimation accuracy of the algorithm. The core formula is as follows: like Figure 2 As shown in the simulation, the traditional EKF algorithm's estimated value deviates from the true value, and this deviation accumulates over time. The EKF-SSA-BP fusion algorithm's estimation curve closely matches the true value throughout the entire range, with no significant error divergence. The fusion algorithm significantly improves the accuracy and robustness of SOC estimation, exhibiting good adaptability across the entire SOC range.
[0045] like Figure 3 As shown, comparing the error changes of the traditional EKF algorithm and the EKF-SSA-BP fusion algorithm, it can be seen that the traditional EKF algorithm has a larger error fluctuation range, and its peak error is significantly higher than that of the fusion algorithm; the error of the fusion algorithm remains stable at an extremely low level with less fluctuation. The error of the traditional EKF algorithm shows a slow accumulation trend over time; the error of the fusion algorithm does not accumulate significantly and remains stable throughout. The EKF-SSA-BP fusion algorithm significantly reduces the SOC estimation error and effectively improves the estimation accuracy and stability.
[0046] like Figure 4 As shown, the blue line represents the actual terminal voltage, and the pink line represents the model estimate based on the initial SOC=0.6. It is evident that the estimated voltage curve closely matches the actual voltage curve throughout, with no significant deviation, indicating that the second-order Thevenin equivalent circuit model and parameter identification method can accurately reflect the dynamic characteristics of the battery.
[0047] like Figure 5 As shown, the deviation between the model-estimated voltage and the actual voltage is reflected. It can be seen that the error is basically controlled within ±100 mV throughout the process, with a small fluctuation range and no divergence. The model parameter identification and state estimation in this application have high accuracy and strong robustness.
[0048] As can be seen, the MAE and RMSE of the fusion algorithm in this application are significantly lower than those of the single EKF and UKF algorithms, and the estimation error is greatly reduced. At the same time, after wavelet denoising preprocessing, the algorithm in this application has stronger noise resistance, the estimation curve is more closely aligned with the real SOC curve, and the stability is better, which verifies the feasibility and superiority of the fusion scheme in this application.
[0049] This application addresses key issues in lithium-ion battery SOC estimation, such as sampling signal noise interference, battery model bias, and insufficient estimation accuracy of single algorithms. It constructs a fusion estimation method based on a second-order Thevenin equivalent circuit model and wavelet denoising + EKF + SSA-BP. This method first accurately identifies battery model parameters and fits the OCV-SOC relationship curve using the RLS algorithm. Then, wavelet denoising technology is used to preprocess the voltage and current sampling signals to remove high-frequency noise. The EKF algorithm is then used to achieve a real-time preliminary SOC estimation. Finally, the SSA-BP neural network is used to accurately correct the estimation error of the EKF algorithm, effectively improving the accuracy and stability of SOC estimation. Simulation results show that the estimation error of the proposed fusion algorithm is significantly lower than that of traditional EKF and UKF single algorithms, exhibiting stronger anti-interference capability and robustness.
[0050] In one exemplary embodiment, such as Figure 6 As shown, a lithium-ion battery state-of-charge (SOC) estimation system is provided. The system comprises: a data acquisition module, a second-order Thevenin equivalent circuit model construction module, a parameter identification module, a mapping relationship construction module, a denoising module, a SOC estimation value acquisition module, a BP neural network construction and optimization module, and a final SOC estimation value acquisition module. Wherein: The data acquisition module is used to collect the terminal voltage, charging and discharging current, and open-circuit voltage of the lithium-ion battery under test at different states of charge.
[0051] The second-order Thevenin equivalent circuit model construction module is used to construct second-order Thevenin equivalent circuit models based on Thevenin's theorem.
[0052] The parameter identification module is used to identify the parameters in the second-order Thevenin equivalent circuit model based on the terminal voltage and charge / discharge current of the lithium-ion battery under test, and obtain the parameter identification vector.
[0053] The mapping relationship construction module is used to establish a nonlinear mapping relationship between open circuit voltage and state of charge based on the open circuit voltage of the lithium-ion battery under test at different states of charge.
[0054] The noise reduction module is used to process the collected terminal voltage and charge / discharge current of the lithium-ion battery under test to obtain the noise-reduced terminal voltage and charge / discharge current.
[0055] The state of charge (SOC) estimation module is used to estimate the SOC of the lithium-ion battery under test using an extended Kalman filter based on the denoised terminal voltage, denoised charge / discharge current, parameter identification vector, and open-circuit voltage-SOC nonlinear mapping relationship, thereby obtaining the SOC estimation value.
[0056] The BP neural network construction and optimization module constructs a BP neural network and uses the sparrow search algorithm to optimize the initial weights and thresholds of the BP neural network, resulting in an optimized BP neural network.
[0057] The final state of charge estimation module fits and compensates the estimated state of charge based on the optimized BP neural network to obtain the final estimated state of charge.
[0058] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0059] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0060] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0061] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for estimating the state of charge of a lithium-ion battery, characterized in that, The method for estimating the state of charge of a lithium-ion battery includes: Collect the terminal voltage, charging and discharging current, and open-circuit voltage of the lithium-ion battery under test at different states of charge. Construct a second-order Thevenin equivalent circuit model based on Thevenin's theorem; Based on the terminal voltage and charging / discharging current of the lithium-ion battery under test, the parameters in the second-order Thevenin equivalent circuit model are identified to obtain the parameter identification vector. Based on the open-circuit voltage of the lithium-ion battery under test at different states of charge, a nonlinear mapping relationship between open-circuit voltage and state of charge is established. The collected terminal voltage and charge / discharge current of the lithium-ion battery under test are processed to obtain the noise-reduced terminal voltage and charge / discharge current. Based on the denoised terminal voltage, denoised charging and discharging current, parameter identification vector, and the nonlinear mapping relationship between open-circuit voltage and state of charge, the state of charge of the lithium-ion battery under test is estimated using extended Kalman filtering to obtain the estimated state of charge value. A BP neural network is constructed, and the initial weights and thresholds of the BP neural network are optimized using the sparrow search algorithm to obtain the optimized BP neural network. The optimized BP neural network is used to fit and compensate the estimated state of charge to obtain the final estimated state of charge.
2. The method for estimating the state of charge of a lithium-ion battery according to claim 1, characterized in that, The second-order Thevenin equivalent circuit model is expressed by the following formula:
3. The method for estimating the state of charge of a lithium-ion battery according to claim 1, characterized in that, Based on the terminal voltage and charge / discharge current of the lithium-ion battery under test, the parameters in the second-order Thevenin equivalent circuit model are identified to obtain a parameter identification vector, which specifically includes: Based on the terminal voltage and charge / discharge current of the lithium-ion battery under test, the parameters in the second-order Thevenin equivalent circuit model are identified using the recursive least squares method to obtain the parameter identification vector, as expressed in the following formula:
4. The method for estimating the state of charge of a lithium-ion battery according to claim 1, characterized in that, Based on the open-circuit voltage of the lithium-ion battery under test at different states of charge, a nonlinear mapping relationship between open-circuit voltage and state of charge is established, specifically including: The open-circuit voltage of the lithium-ion battery under test was obtained through a static battery test at different states of charge. An open-circuit voltage-state-of-charge curve was constructed using a polynomial fitting method. This curve characterizes the nonlinear mapping relationship between open-circuit voltage and state of charge, and is expressed by the following formula:
5. The method for estimating the state of charge of a lithium-ion battery according to claim 1, characterized in that, The collected terminal voltage and charge / discharge current of the lithium-ion battery under test are processed to obtain the noise-reduced terminal voltage and charge / discharge current, specifically including: The terminal voltage of the lithium-ion battery under test is decomposed into N-level wavelet components using the db4 wavelet basis to obtain a low-frequency component of the terminal voltage and N high-frequency noise components of the terminal voltage. The charge and discharge current of the lithium-ion battery under test is decomposed into N-level wavelet components using the db4 wavelet basis to obtain one low-frequency component of the charge and discharge current and N high-frequency noise components of the charge and discharge current. The high-frequency noise components of the N terminal voltages and the N charging and discharging currents are processed by a soft threshold function to obtain the denoised high-frequency components of the N terminal voltages and the denoised high-frequency components of the N charging and discharging currents. Perform inverse wavelet transform on the low-frequency component of the single terminal voltage and the high-frequency components of the N denoised terminal voltages to obtain the denoised terminal voltage. Perform inverse wavelet transform on the low-frequency component of the single charging / discharging current and the high-frequency components of the N denoised charging / discharging currents to obtain the denoised charging / discharging current.
6. The method for estimating the state of charge of a lithium-ion battery according to claim 1, characterized in that, Based on the denoised terminal voltage, denoised charge / discharge current, parameter-identified second-order Thevenin equivalent circuit model, and the open-circuit voltage-state-of-charge nonlinear mapping relationship, the state of charge (SOC) of the lithium-ion battery under test is estimated using extended Kalman filtering to obtain the estimated SOC value, specifically including: The second-order Thevenin equivalent circuit model after parameter identification is linearized by Taylor expansion of extended Kalman filter to obtain the state-space equation. Based on the state space equation, the state vector at the current moment is predicted; Based on the predicted state vector at the current moment, the state vector at the current moment is updated to obtain the optimal estimate of the state vector at the current moment; Based on the optimal estimate of the state vector at the current moment, the estimated value of the charged state at the current moment is obtained.
7. The method for estimating the state of charge of a lithium-ion battery according to claim 6, characterized in that, The state-space equation is expressed as follows: Based on the state-space equation, the state vector at the current moment is predicted, and the formula is expressed as follows: Based on the predicted state vector at the current moment, the state vector at the current moment is updated to obtain the optimal estimate of the state vector at the current moment, as expressed by the following formula:
8. The method for estimating the state of charge of a lithium-ion battery according to claim 1, characterized in that, A backpropagation (BP) neural network is constructed, and the initial weights and thresholds of the BP neural network are optimized using the sparrow search algorithm to obtain the optimized BP neural network. Specifically, this includes: Step 701: Construct a BP neural network containing an input layer, hidden layers, and an output layer; Step 702: Using the denoised terminal voltage, the denoised charging and discharging current, and the estimated state of charge as inputs, establish the mapping relationship between the input features and the state of charge estimation error through the hidden layer nonlinear mapping, and output the predicted value of the state of charge estimation error. Step 703: Concatenate all weights and thresholds in the BP neural network into a one-dimensional vector, and define the one-dimensional vector as the position of a sparrow; Step 704: Set the parameter search range for the weights and thresholds of the BP neural network and initialize the sparrow population size, maximum number of iterations, warning value, and safety value; Step 705: Based on the sparrow population size, randomly generate a number of one-dimensional vectors equal to the population size within the parameter search range to construct an initial sparrow population containing multiple sparrows; Step 706: Using the reciprocal of the prediction error of the BP neural network as the fitness function, calculate the fitness value corresponding to each sparrow, and sort them to obtain the current global best sparrow position and the global worst sparrow position; Step 707: Iteratively update the positions of all sparrows according to the three role rules of discoverer, joiner, and vigilant. Among them: discoverers are individuals with fitness higher than a set threshold, and perform global foraging search or danger zone relocation based on the relationship between the warning value and the safety value; joiners are individuals with fitness lower than a set threshold, and update their positions based on the difference between their own position and the worst sparrow position in the world; vigilant are randomly selected warning individuals, and perform small-scale perturbation-style position updates based on the difference between their own position and the best sparrow position in the world. Step 708: Repeat steps 706 and 707 until the maximum number of iterations is reached, and output the weights and biases corresponding to the globally optimal sparrow position as the optimal initial parameters of the BP neural network. Step 709: Assign the optimal initial parameters to the BP neural network and complete the training to obtain the optimized BP neural network.
9. The method for estimating the state of charge of a lithium-ion battery according to claim 8, characterized in that, The formula for the hidden layer output value is expressed as follows: The formula for the output layer error prediction value is expressed as follows: The discovery location update formula is expressed as follows: The formula for updating the position of the joiner is expressed as follows: The formula for updating the location of the vigilant is expressed as follows:
10. A lithium-ion battery state-of-charge estimation system, characterized in that, The lithium-ion battery state-of-charge estimation system includes: The data acquisition module is used to acquire the terminal voltage, charging and discharging current, and open-circuit voltage of the lithium-ion battery under test at different states of charge. The second-order Thevenin equivalent circuit model construction module is used to construct a second-order Thevenin equivalent circuit model based on Thevenin's theorem. The parameter identification module is used to identify the parameters in the second-order Thevenin equivalent circuit model based on the terminal voltage and charging / discharging current of the lithium-ion battery under test, and obtain the parameter identification vector. The mapping relationship construction module is used to establish a nonlinear mapping relationship between open circuit voltage and state of charge based on the open circuit voltage of the lithium-ion battery under test at different states of charge. The noise reduction module is used to process the collected terminal voltage and charge / discharge current of the lithium-ion battery under test to obtain the noise-reduced terminal voltage and charge / discharge current. The state of charge estimation module is used to estimate the state of charge of the lithium-ion battery under test based on the denoised terminal voltage, denoised charging and discharging current, parameter identification vector and open-circuit voltage-state of charge nonlinear mapping relationship, using extended Kalman filter to obtain the estimated state of charge value. The BP neural network construction and optimization module constructs a BP neural network and uses the sparrow search algorithm to optimize the initial weights and thresholds of the BP neural network to obtain the optimized BP neural network. The final state of charge estimation module fits and compensates the estimated state of charge based on the optimized BP neural network to obtain the final estimated state of charge.