Lithium iron phosphate battery state of charge estimation method, device, medium, and apparatus

CN122983684APending Publication Date: 2026-10-27JINAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611060885.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-16
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

开路电压法依赖电池充分静置条件,难以在线实时应用;安时积分法容易因初值误差和电流测量误差产生累计漂移;扩展卡尔曼滤波需要对非线性系统进行一阶线性化,存在截断误差和雅可比矩阵计算负担;无迹卡尔曼滤波虽避免了显式线性化,但中心采样点权重较大,参数选择不当时可能造成协方差矩阵失去正定性;容积卡尔曼滤波采用球面-径向容积准则,具有较好的非线性估计稳定性,但传统容积卡尔曼滤波仍采用固定噪声假设和统一观测修正强度

Benefits of technology

[0016]本申请一些实施例提供的技术方案带来的有益效果至少包括:在容积卡尔曼滤波框架下,通过构建由物理先验分支、创新一致性分支和门控循环单元分支协同生成的动态增益,使滤波器能够根据开路电压-荷电状态曲线局部斜率自适应调整观测修正强度,在电压平台区有效降低微小端电压偏差对荷电状态估计的放大影响,同时利用归一化创新平方统计量识别并抑制异常残差干扰,并借助门控循环单元的记忆能力实现增益的平滑调节;在此基础上,通过递推更新与稳定性增强机制的配合,在不同动态工况下有助于提高荷电状态估计的精度、鲁棒性和在线部署的数值稳定性,解决了现有固定增益滤波方法无法细粒度适应工况变化的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122983684A_ABST
    Figure CN122983684A_ABST
Patent Text Reader

Abstract

The application discloses a lithium iron phosphate battery state of charge estimation method and device, medium and equipment, relates to the battery management technical field, and the method comprises the following steps: a battery state space model is established, volume Kalman filtering step prediction is performed to obtain prior state and observation residual; then, according to the open-circuit voltage local slope, the normalized innovation square statistics and the branch of the gated recurrent unit, a physical baseline gain, an innovation consistency correction term and a gated recurrent unit correction term are generated, and a dynamic gain is obtained by fusing and smoothing; the measurement update is carried out by using the dynamic gain to scale the Kalman gain, and the state of charge estimation value is obtained; and the continuous estimation result is output through recursion and stability enhancement mechanism.The application adaptively reduces the observation weight in the voltage platform area, suppresses abnormal residual interference, and improves the accuracy and robustness of the state of charge estimation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery management technology, and in particular to a method, apparatus, medium and device for estimating the state of charge of a lithium iron phosphate battery. Background Technology

[0002] Lithium-ion batteries are widely used in new energy vehicles, energy storage systems, and smart power supplies. Battery management systems need to estimate the battery's state of charge (SOC) in real time and accurately to indicate remaining capacity and driving range, and to prevent lifespan degradation and safety risks caused by overcharging and over-discharging. Lithium iron phosphate (LFP) batteries have become one of the mainstream power batteries due to their high safety and long cycle life. However, there is a significant voltage plateau between their open-circuit voltage and SOC. Within this range, when the SOC changes significantly, the open-circuit voltage changes very little, resulting in a significant decrease in the identifiability of SOC based on terminal voltage observations.

[0003] Currently, commonly used methods for estimating the state of charge (SOC) of batteries include the open-circuit voltage method, the ampere-hour integral method, the extended Kalman filter (EPF), the unscented Kalman filter (UKF), the volumetric Kalman filter (VKF), and neural network methods. The open-circuit voltage method relies on the battery being fully quiescent, making it difficult to apply in real-time online. The ampere-hour integral method is prone to cumulative drift due to initial value errors and current measurement errors. The EPF requires first-order linearization of the nonlinear system, resulting in truncation errors and the burden of Jacobian matrix calculations. While the unscented Kalman filter avoids explicit linearization, the weight of the central sampling point is relatively large, and improper parameter selection may cause the covariance matrix to lose its positive definiteness. The VKF uses the spherical-radial volume criterion, exhibiting good stability in nonlinear estimation; however, traditional VKF still employs the fixed noise assumption and a uniform observation correction strength. To address the plateau problem in lithium iron phosphate batteries, existing solutions employ fixed-gain volumetric Kalman filtering, which reduces the weighting of terminal voltage observations during the plateau period to mitigate estimation bias. However, this fixed gain cannot change in real time with variations in the state of charge range, residual consistency, and load dynamics. Pure neural network methods, on the other hand, suffer from insufficient interpretability and their generalization ability depends on data quality.

[0004] Therefore, the existing technology lacks a state of charge estimation method that can simultaneously combine battery physical priors, statistical consistency of observation residuals, and time series memory capabilities to dynamically adjust the intensity of observation corrections. This results in lithium iron phosphate batteries being prone to large state of charge estimation errors due to small terminal voltage observation deviations within the voltage plateau range. Summary of the Invention

[0005] Based on the above problems, this application provides a method, apparatus, medium and device for estimating the state of charge of lithium iron phosphate batteries. It can adaptively reduce the observation weight in the voltage plateau region, suppress abnormal residual interference, and improve the accuracy and robustness of the state of charge estimation.

[0006] In a first aspect, embodiments of this application provide a method for estimating the state of charge (SOC) of a lithium iron phosphate battery, the method comprising: A state-space model of the battery is established, and the mapping relationship between open-circuit voltage and state of charge is obtained. The state-space model uses the battery state of charge and polarization voltage as state variables, and is used to describe the state equations that describe the evolution of the battery state over time and the observation equations that describe the terminal voltage observations. One-step prediction based on state-space model of capacitive Kalman filtering includes: constructing capacitive points based on the posterior state and posterior covariance of the previous time step; propagating the capacitive points through state equation to obtain the prior state and prior covariance of the current time step; and obtaining the predicted terminal voltage, observation covariance, cross covariance and observation residual through observation equation. Based on the prior state of charge, the absolute value of the observation residual, the observation covariance, the absolute value of the current current, and the absolute value of the local slope obtained from the mapping relationship between open-circuit voltage and state of charge based on the prior state of charge or its moving average, a feature vector is constructed; and based on the observation residual and the observation covariance, a normalized squared innovation statistic characterizing the consistency between the observation residual and the filtering uncertainty is calculated. The absolute value of the local slope is input into the physical prior branch to generate the physical baseline gain. The normalized squared innovation statistic and its smoothing statistic are input into the innovation consistency branch to generate the innovation consistency correction term. The feature vector is input into the gated recurrent unit branch to generate the gated recurrent unit correction term. The physical baseline gain, innovation consistency correction term and gated recurrent unit correction term are fused and smoothed to obtain the dynamic gain at the current time. The Kalman gain of the capacitive Kalman filter is scaled using dynamic gain, and the scaled Kalman gain is used to measure and update the prior state and prior covariance to obtain the posterior state and posterior covariance at the current time. The posterior state includes the estimated state of charge at the current time. The posterior state obtained at the current time is used as the posterior state of the previous time for the next sampling time to perform recursion. During the recursion process, a stability enhancement mechanism is executed according to a preset scheduling strategy, and continuous state of charge estimates are output at each sampling time.

[0007] In one possible implementation, the state-space model is a second-order resistor-capacitor equivalent circuit model, and the polarization voltage includes the voltage of the first RC branch and the voltage of the second RC branch.

[0008] In one possible implementation, generating the physical baseline gain includes: Obtain the absolute value of the local slope of the mapping relationship between open-circuit voltage and state of charge. After normalizing the absolute value of the local slope, map it to a preset gain range to obtain the physical baseline gain.

[0009] In one possible implementation, the absolute value of the local slope of the mapping relationship between open-circuit voltage and state of charge is obtained. After normalizing the absolute value of the local slope, it is mapped to a preset gain range to obtain the physical baseline gain, including: Calculate the normalized slope value sk=clip(|dOCV / dSOC| / sref,0,1), where sref is the reference slope; Calculate the physical baseline gain Gbase,k=0.5+0.5*sk, where the physical baseline gain ranges from [0.5,1.0].

[0010] In one possible implementation, the innovation consistency correction term is generated through the following steps: Calculate the normalized squared innovation statistic NISk=rk^2 / max(Pyy,k,ε), where rk is the observation residual and Pyy,k is the observation covariance; The normalized squared innovation statistic is subjected to an exponentially weighted moving average according to NISema,k=βNISema,k-1+(1-β)NISk to obtain a smoothing statistic, where β is the smoothing coefficient in the range of (0,1). The innovation consistency correction term is calculated based on the deviation of the smoothing statistic from the ideal value of 1 and the platform interval weight determined by the normalized slope value; when the normalized slope value is not less than the preset slope threshold, the innovation consistency correction term is set to zero.

[0011] In one possible implementation, the physical baseline gain, innovation consistency correction term, and gated recurrent unit correction term are fused and smoothed to obtain the dynamic gain at the current moment, including: The physical baseline gain, innovation consistency correction term, and gated cyclic unit correction term are summed, fused, and clipped to obtain the original gain Graw,k=clip(Gbase,k+ΔGNIS,k+ΔGGRU,k,0.01,1.0); The original gain is smoothed by a first-order low-pass filter to obtain the dynamic gain Gk = 0.85 * Gk-1 + 0.15 * Graw,k.

[0012] In one possible implementation, the stability enhancement mechanism includes at least one of the following: preheating-transition-online three-stage scheduling, upper and lower bound protection of the state of charge covariance, and residual sign consistency correction; The three-stage scheduling of preheating-transition-online includes: in the preheating stage, a preset reference gain is used to perform measurement updates, and the gated loop unit branches only update the hidden state without participating in measurement gain adjustment; in the transition stage, the preset reference gain is smoothly switched to dynamic gain according to the mixing coefficient that increases over time; and in the online stage, dynamic gain is used completely. The protection of upper and lower bounds of the state of charge covariance includes: when the dynamic gain is lower than a first threshold and the variance component corresponding to the state of charge in the posterior covariance exceeds the upper limit, compressing the variance component to the upper limit and synchronously scaling the cross-covariance between the state of charge and each polarization voltage according to the square root of the compression coefficient; when the variance component is lower than the lower limit, raising it to the lower limit. The residual sign consistency correction includes: counting the signs of the most recent preset number of observation residuals, and applying a single-step micro-correction to the state of charge when the sign consistency index exceeds a preset threshold.

[0013] Secondly, embodiments of this application provide a lithium iron phosphate battery state-of-charge estimation device, which includes: an establishment module, an execution module, a construction module, an input module, an acquisition module, and a recursion module, wherein: A module is established to build the state-space model of the battery and obtain the mapping relationship between open-circuit voltage and state of charge. The state-space model uses the battery state of charge and polarization voltage as state variables, and is used to describe the state equations that describe the evolution of the battery state over time and the observation equations that describe the terminal voltage observations. The execution module is used to perform one-step prediction of capacitive Kalman filtering based on the state-space model. One-step prediction includes: constructing a capacitive point based on the posterior state and posterior covariance of the previous time step; propagating the capacitive point through the state equation to obtain the prior state and prior covariance of the current time step; and then obtaining the predicted terminal voltage, observation covariance, cross covariance, and observation residual through the observation equation. The module is used to construct a feature vector based on the prior state of charge, the absolute value of the observation residual, the observation covariance, the absolute value of the current current, and the absolute value of the local slope obtained from the mapping relationship between open-circuit voltage and state of charge based on the prior state of charge or its moving average; and to calculate the normalized squared innovation statistic, which characterizes the consistency between the observation residual and the filtering uncertainty, based on the observation residual and the observation covariance. The input module is used to input the absolute value of the local slope into the physical prior branch to generate the physical baseline gain, input the normalized squared innovation statistic and its smoothing statistic into the innovation consistency branch to generate the innovation consistency correction term, and input the feature vector into the gated recurrent unit branch to generate the gated recurrent unit correction term; the physical baseline gain, innovation consistency correction term and gated recurrent unit correction term are fused and smoothed to obtain the dynamic gain at the current time. The module is used to scale the Kalman gain of the capacitive Kalman filter using dynamic gain, and to measure and update the prior state and prior covariance using the scaled Kalman gain to obtain the posterior state and posterior covariance at the current time. The posterior state includes the estimated state of charge at the current time. The recursive module is used to recursively use the posterior state obtained at the current time as the posterior state of the previous time for the next sampling time, and executes a stability enhancement mechanism according to a preset scheduling strategy during the recursive process, outputting continuous state of charge estimates at each sampling time.

[0014] Thirdly, embodiments of this application provide a computer storage medium storing multiple instructions adapted for loading by a processor and executing the steps of the above-described method.

[0015] Fourthly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being adapted to be loaded by the processor and to execute the steps of the method described above.

[0016] The beneficial effects of the technical solutions provided by some embodiments of this application include at least the following: Under the capacitive Kalman filter framework, by constructing a dynamic gain generated collaboratively by a physical prior branch, an innovation consistency branch, and a gated cyclic unit branch, the filter can adaptively adjust the observation correction intensity according to the local slope of the open-circuit voltage-state-of-charge curve, effectively reducing the amplified impact of small terminal voltage deviations on state-of-charge estimation in the voltage plateau region. At the same time, it uses the normalized innovation square statistic to identify and suppress abnormal residual interference, and achieves smooth gain adjustment by leveraging the memory capability of the gated cyclic unit. On this basis, through the combination of recursive update and stability enhancement mechanisms, it helps to improve the accuracy, robustness, and numerical stability of online deployment of state-of-charge estimation under different dynamic operating conditions, solving the problem that existing fixed-gain filtering methods cannot adapt to changes in operating conditions with fine granularity. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying 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.

[0018] Figure 1 An exemplary system architecture diagram of the lithium iron phosphate battery state-of-charge estimation method provided in the embodiments of this application; Figure 2 A flowchart illustrating the method for estimating the state of charge of a lithium iron phosphate battery provided in this application embodiment; Figure 3 This is a schematic diagram illustrating the OCV-SOC relationship and voltage plateau interval identification provided in the embodiments of this application. Figure 4 This is a schematic diagram of the second-order RC equivalent circuit model structure provided in the embodiments of this application; Figure 5 Flowchart of dynamic gain G-CKF measurement update provided for embodiments of this application Figure 6 A framework diagram for GRU-Physics dynamic gain generation provided in the embodiments of this application; Figure 7 A structural block diagram of the lithium iron phosphate battery state of charge estimation device provided in the embodiments of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0019] To make the features and advantages of this application more apparent and understandable, the technical solutions in 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.

[0020] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0021] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0022] As mentioned earlier, there is a significant voltage plateau between the open-circuit voltage and the state of charge (SOC) of lithium iron phosphate (LFP) batteries. Within this plateau, the terminal voltage is insensitive to changes in SOC, leading to significant SOC estimation errors in traditional methods such as extended Kalman filtering, unscented Kalman filtering, and capacitive Kalman filtering due to small voltage observation biases. While existing fixed-gain capacitive Kalman filters can reduce the observation correction weight within the plateau, their gain cannot be dynamically adjusted in real time according to the SOC interval, residual consistency, and load dynamics. Pure neural network methods suffer from poor interpretability and generalization dependence on data quality. Therefore, there is an urgent need for a dynamic gain adjustment method that can integrate battery physical priors, statistical consistency of observation residuals, and time-series memory capabilities to address the problems of low observation reliability within the plateau, large interference from anomalous residuals, and the inability to finely adjust the fixed gain.

[0023] In view of this, this application provides a method, apparatus, medium, and device for estimating the state of charge (SOC) of lithium iron phosphate batteries. The aim is to introduce a time-varying dynamic gain generated jointly by a physical prior branch, an innovation consistency branch, and a gated recurrent unit branch within a volumetric Kalman filter framework. This allows the filter to adjust the strength of the posterior correction of the SOC by the terminal voltage observations online based on the local slope of the open-circuit voltage-SOC curve, the normalized squared innovation statistic, and the historical operating condition trends. This adaptively reduces the observation weights and suppresses abnormal residual interference within the voltage plateau range, and helps improve the accuracy, robustness, and engineering deployability of SOC estimation under different dynamic operating conditions.

[0024] Please see Figure 1 , Figure 1 An exemplary system architecture diagram of the lithium iron phosphate battery state-of-charge estimation method provided in the embodiments of this application.

[0025] like Figure 1 As shown, the system architecture may include a lithium iron phosphate battery 101, a voltage / current acquisition unit 102, a BMS processor 103, and a SOC output unit 104. The terminal voltage and loop current of the lithium iron phosphate battery 101 are sampled by the voltage / current acquisition unit 102 and converted into sampling signals that can be processed by the BMS processor 103.

[0026] The voltage / current acquisition unit 102 may include a voltage sampling circuit, a current sensor, and an analog-to-digital conversion circuit, used to acquire battery terminal voltage and current according to a preset sampling period. The BMS processor 103 receives the sampling signal, executes the state of charge estimation method described in this embodiment, and sends the obtained state of charge estimation value to the SOC output unit 104. The SOC output unit 104 can output the state of charge estimation result through an onboard communication interface, a display interface, or a data storage interface.

[0027] In this embodiment, the BMS processor 103 can establish a state-space model of the battery and obtain the mapping relationship between open-circuit voltage and state of charge. The state-space model uses the battery state of charge and polarization voltage as state variables, and is used to describe the state equations describing the evolution of the battery state over time and the observation equations describing the terminal voltage observations. Based on the state-space model, a one-step prediction of capacitive Kalman filtering is performed. This one-step prediction includes: constructing a volume point based on the posterior state and posterior covariance of the previous time step; propagating the volume point through the state equations to obtain the prior state and prior covariance of the current time step; and obtaining the predicted terminal voltage, observation covariance, cross-covariance, and observation residual through the observation equations. A feature vector is constructed based on the current prior state of charge, the absolute value of the observation residual, the observation covariance, the absolute value of the current current, and the absolute value of the local slope obtained from the mapping relationship between open-circuit voltage and state of charge based on the prior state of charge or its moving average. Finally, based on the observation residual and the observation covariance, a feature vector is calculated representing the relationship between the observation residual and the filter. The normalized squared innovation statistic is used to calculate the degree of consistency of wave uncertainty. The absolute value of the local slope is input to the physical prior branch to generate the physical baseline gain. The normalized squared innovation statistic and its smoothing statistic are input to the innovation consistency branch to generate the innovation consistency correction term. The eigenvector is input to the gated recurrent unit branch to generate the gated recurrent unit correction term. The physical baseline gain, innovation consistency correction term, and gated recurrent unit correction term are fused and smoothed to obtain the dynamic gain at the current time. The dynamic gain is used to scale the Kalman gain of the capacitive Kalman filter, and the scaled Kalman gain is used to measure and update the prior state and prior covariance to obtain the posterior state and posterior covariance at the current time. The posterior state includes the estimated state of charge at the current time. The posterior state obtained at the current time is used as the posterior state of the previous time for the next sampling time for recursion. During the recursion process, a stability enhancement mechanism is executed according to a preset scheduling strategy, and a continuous state of charge estimate is output at each sampling time.

[0028] The BMS processor 103 can be implemented by a microcontroller, a digital signal processor, or a processing chip with corresponding computing capabilities. The state of charge estimation program and related model parameters can be stored in a memory connected to the BMS processor 103 and loaded and executed by the BMS processor 103.

[0029] In one alternative implementation, the voltage / current acquisition unit 102, the BMS processor 103, and the SOC output unit 104 can be integrated into the same battery management system, or they can be set separately according to hardware layout requirements. This application embodiment does not limit this.

[0030] It should be understood that Figure 1 The units shown and their connections are schematic and can be adjusted according to the battery pack size, the number of sampling channels, and the BMS hardware configuration.

[0031] Please see Figure 2 , Figure 2 This is a schematic flowchart illustrating the state-of-charge estimation method for lithium iron phosphate batteries provided in an embodiment of this application. Figure 2 As shown, the method for estimating the state of charge of lithium iron phosphate batteries can include at least: S201. Establish the state-space model of the battery and obtain the mapping relationship between open-circuit voltage and state of charge.

[0032] Specifically, to transform the physical characteristics of the battery into a mathematically computable state estimation problem, a mathematical model describing the battery's dynamic behavior is first needed. In this embodiment, the battery's state of charge (SOC) and polarization voltage are selected as state variables, forming a state vector xk=[SOCk, U1,k, U2,k]^T, where U1,k and U2,k represent the voltages of the two RC polarization branches, respectively. The state-space model contains two core parts: state equations and observation equations. The state equations describe how the state variables evolve with input current and time, typically constructed based on ampere-hour integrals and RC network characteristics; the observation equations describe the functional relationship between terminal voltage and state variables. This embodiment uses a discretized form for execution in a digital controller. Simultaneously, the mapping relationship between open-circuit voltage and state of charge needs to be obtained; please refer to [link to relevant documentation]. Figure 3 , Figure 3 This embodiment of the application provides a schematic diagram of the OCV-SOC relationship and voltage plateau interval identification. The parameters required for the second-order RC model are configured according to the battery type, including the ohmic internal resistance R0, the resistance R1 and capacitance C1 of the first RC branch, the resistance R2 and capacitance C2 of the second RC branch, and the battery capacity Cn. These parameters can be obtained from at least one of the following: offline calibration data, an online identification module, or an existing parameter library of the battery management system. Furthermore, the mapping relationship between the open-circuit voltage OCV and SOC needs to be configured, specifically using a lookup table function or a polynomial function, i.e., OCV = f(SOC), and the calculation method of its derivative |dOCV / dSOC| is simultaneously saved for use in the generation of physical prior gains in subsequent steps. This mapping relationship and related parameters can be obtained from at least one of the following: offline calibration data, an online identification module, or an existing parameter library of the battery management system.

[0033] Optionally, the state-space model specifically adopts a second-order resistor-capacitor equivalent circuit model. Please refer to [link / reference]. Figure 4 , Figure 4 This is a schematic diagram of the second-order RC equivalent circuit model structure provided in the embodiments of this application, such as... Figure 4As shown, the polarization voltage includes the first RC branch voltage U1 and the second RC branch voltage U2, which respectively simulate the dynamic processes of electrochemical polarization and concentration polarization inside the battery. Compared with the first-order RC model, this model can more accurately capture the voltage response characteristics of lithium iron phosphate batteries in the mid-to-high frequency range, while maintaining computational efficiency compared with higher-order models, making it the preferred configuration for battery management system engineering applications. This embodiment adopts this second-order RC model, and the definitions of U1 and U2 are used in subsequent steps. Through this specific model setting, a good balance can be achieved between model accuracy and computational burden, effectively supporting the real-time recursion of volumetric Kalman filtering.

[0034] S202, One-step prediction of capacitive Kalman filtering based on state-space model.

[0035] For details, please refer to Figure 5 , Figure 5 The flowchart for dynamic gain G-CKF measurement update provided in the embodiments of this application is as follows: Figure 5 As shown, after obtaining the posterior state and posterior covariance of the previous time step, the time update (prediction) stage of capacitive Kalman filtering is performed. First, based on the dimension of the state vector (n=3 in this embodiment), 2n equally weighted volume points are constructed according to the spherical-radial volume rule of capacitive Kalman filtering. During construction, the Cholesky decomposition factor of the posterior covariance is used to transform the volume points from the standard normal distribution space to the actual state distribution space. Then, each volume point is substituted into the state equation, and the propagated volume points are obtained after state propagation. By weighted averaging of all propagated volume points, the prior state estimate of the current time step is obtained. Further, the deviation of each propagated volume point relative to the prior state is calculated, weighted summed, and the process noise covariance is added to obtain the prior covariance. Next, the propagated volume points are substituted into the observation equation to obtain the predicted measurement volume points, and weighted averaged to obtain the predicted terminal voltage. Then, the observation covariance, cross-covariance, and observation residual are calculated, where the observation residual is the difference between the actual terminal voltage and the predicted terminal voltage. For example, firstly, based on the posterior state xk-1 and covariance Pk-1 of the previous time step, 2n volume points are constructed, and state propagation is performed through a second-order RC model to obtain the prior state xk-, prior covariance Pk-, actual terminal voltage yk, predicted terminal voltage yk-, observation covariance Pyy,k, cross-covariance Pxy,k, and observation residual rk=yk-yk- at the current time step. Through this step, a one-step prediction based on the state and covariance before the arrival of the current measurement information is completed, preparing prior information for subsequent measurement updates.

[0036] S203. Construct a feature vector based on the prior state of charge, the absolute value of the observation residual, the observation covariance, the absolute value of the current current, and the absolute value of the local slope obtained from the mapping relationship between open-circuit voltage and state of charge based on the prior state of charge or its moving average; and calculate the normalized squared innovation statistic, which characterizes the consistency between the observation residual and the filtering uncertainty, based on the observation residual and the observation covariance.

[0037] Specifically, firstly, the prior charged state SOCk- is extracted from the prior state, the absolute value of the observation residual |rk| is taken, the observation covariance Pyy,k is obtained, and the absolute value of the current |Ik| is obtained. According to the OCV-SOC mapping relationship, the absolute value of the local slope |dOCV / dSOC| is calculated at the current prior charged state or its moving average, and the normalized slope value sk=clip(|dOCV / dSOC| / sref,0,1) is calculated. After scaling the above quantities, a five-dimensional feature vector fk=[SOCk-, ar·|rk|, aP·Pyy,k, sk, |Ik| / Imax]^T is constructed, where ar and aP are preset scaling coefficients, and Imax is the normalization reference of the absolute value of the current; in one embodiment, the moving average is the average value of the most recent 20 prior charged states, and ar and aP are both 10. Secondly, to quantitatively determine whether the current observation residuals are consistent with the filter forecast uncertainty, the normalized squared innovation statistic NISk = rk^2 / max(Pyy,k,ε) is calculated, where ε is a positive number to prevent the denominator from being zero. An excessively large statistic indicates potential abnormal noise or model mismatch in the observations. Applying an exponentially weighted moving average to this statistic allows gain adjustment to reflect short-term trends rather than single-point fluctuations.

[0038] S204. Input the absolute value of the local slope into the physical prior branch to generate the physical baseline gain. Input the normalized innovation squared statistic and its smoothing statistic into the innovation consistency branch to generate the innovation consistency correction term. Input the feature vector into the gated recurrent unit branch to generate the gated recurrent unit correction term. Fuse and smooth the physical baseline gain, innovation consistency correction term and gated recurrent unit correction term to obtain the dynamic gain at the current time.

[0039] Specifically, please refer to Figure 6 , Figure 6 The GRU-Physics dynamic gain generation framework diagram provided for the embodiments of this application is as follows: Figure 6As shown, gain components are generated in parallel through three independent and complementary branches, and then fused to obtain the dynamic gain at the current moment. First, the physical baseline gain is generated based on the local slope of OCV-SOC. The absolute value of the local slope is normalized. During normalization, a preset reference slope is used to map the slope value to the interval [0,1]. Then, the normalized value is linearly mapped to the preset gain interval. When in the voltage plateau region, the local slope is close to 0, and the physical baseline gain takes a low value to reduce the observation correction weight; when in the non-plateau region, the local slope is larger, and the physical baseline gain takes a high value to maintain a strong observation correction capability. Specifically, the normalized slope value sk=clip(|dOCV / dSOC| / sref,0,1) is calculated, where sref is the reference slope. Then, the physical baseline gain Gbase,k=0.50+0.50*sk is calculated, so that the value range of the physical baseline gain is [0.5,1.0]. This setting ensures that minimal observation corrections are retained even in the plateau region, avoiding a completely open-loop filter.

[0040] Furthermore, an innovation consistency correction term is generated based on the normalized squared innovation statistic. The smoothing statistic is calculated according to NISema,k = 0.92NISema,k-1 + 0.08NISk. When the normalized slope value sk is less than the preset slope threshold of 0.35, the plateau interval weight pk = 1 - sk / 0.35 is calculated, and the innovation consistency correction term is calculated according to ΔGNIS,k = pk·clip(1 - NISema,k, -0.5, 0.5)·0.06. When sk is not less than 0.35, ΔGNIS,k = 0. Thus, within the plateau region, the observation correction intensity is increased or decreased based on the deviation of the innovation statistic from the ideal value of 1, while in the non-plateau region, the physical baseline gain remains dominant. The parameters 0.92, 0.35, and 0.06 mentioned above are parameters used in this embodiment; in other embodiments, they can be calibrated according to the sampling period and battery characteristics.

[0041] Furthermore, the time memory capability of the gated recurrent unit (ROU) is utilized to generate the GROU correction term ΔGGRU,k. The five-dimensional feature vector fk is input into the GROU, and the hidden state hk is updated through update and reset gates. In one embodiment, the input dimension of the GROU is 5 and the hidden state dimension is 16. The hidden state is sequentially input into the first output layer and the second output layer, wherein the first output layer uses linear transformation and ReLU activation, and the second output layer uses tanh activation. The GROU correction term is generated according to ΔGGRU,k=0.05·tanh(W2·ReLU(W1·hk+b1)+b2), limiting its value to the range of [-0.05, 0.05]. After the warm-up period, during the transition and online phases, the weights W2 and biases b2 of the second output layer can be lightly adjusted online according to the truncated observation residuals with a preset learning rate. In this embodiment, the learning rate is 10^-3, while the gating parameters of the GROU remain unchanged.

[0042] Furthermore, after obtaining the outputs of the three branches, they are summed and fused, and the fused result is amplitude-limited to obtain the original gain. Specifically, the physical baseline gain, innovation consistency correction term, and gated recurrent unit correction term are summed, fused, and amplitude-limited to obtain the original gain Graw,k=clip(Gbase,k+ΔGNIS,k+ΔGGRU,k,0.01,1.0). Then, the original gain is smoothed using a first-order low-pass filter to obtain the dynamic gain Gk=0.85*Gk-1+0.15*Graw,k. This smoothing process prevents estimation jitter caused by abrupt gain changes and improves the stability of the estimation.

[0043] S205. Scale the Kalman gain of the capacitive Kalman filter using dynamic gain, and use the scaled Kalman gain to measure and update the prior state and prior covariance to obtain the posterior state and posterior covariance at the current time. The posterior state includes the estimated state of charge at the current time.

[0044] Specifically, firstly, the Kalman gain of the standard volumetric Kalman filter is calculated, which is the cross-covariance divided by the observation covariance: Kk = Pxy,k / Pyy,k. Then, this Kalman gain is scaled using dynamic gain, i.e., the dynamic gain is multiplied by the Kalman gain to obtain the modified Kalman gain with dynamic gain: KG,k = GkKk. Next, a measurement update is performed: the modified Kalman gain is multiplied by the observation residual to obtain the correction amount: xk = xk - + KG,krk. This correction amount is added to the prior state to obtain the posterior state. Simultaneously, according to the Kalman filter covariance update formula, the prior covariance is updated using the modified Kalman gain, the observation covariance, and the transpose of the modified Kalman gain to obtain the posterior covariance: Pk = Pk - KG,kPyy,kKG,k^T. The updated posterior state vector contains the current state of charge estimate, and the two polarization voltages are also updated. This step uses dynamic gain scaling of the Kalman gain to reduce the intervention of observation corrections in the state estimation during voltage plateaus or observational anomalies, thereby suppressing SOC estimation drift caused by small voltage deviations. By directly applying the dynamic gain to the Kalman gain, a physically clear control over the intensity of observation corrections is achieved. Compared with traditional fixed-gain methods, this approach has a clear theoretical basis for filtering and is more interpretable.

[0045] S206. The posterior state obtained at the current time is used as the posterior state of the previous time for the next sampling time to perform recursion. During the recursion process, a stability enhancement mechanism is executed according to the preset scheduling strategy, and continuous state of charge estimates are output at each sampling time.

[0046] Specifically, to achieve continuous online estimation, this step stores the posterior state and posterior covariance at the current time and uses them as input for the next sampling time, repeating steps S202 to S206 to form a recursive closed loop. Simultaneously, to further improve numerical stability and estimation reliability in engineering applications, the algorithm implements a stability enhancement mechanism based on a preset scheduling strategy during operation.

[0047] In one possible implementation, the stability enhancement mechanism includes at least one of the following: preheating-transition-online three-stage scheduling, upper and lower bound protection of the state of charge covariance, and residual sign consistency correction; The three-stage scheduling of warm-up, transition, and online operation includes: In the initial stage of the algorithm, a warm-up period is set. In this embodiment, the first 550 sampling points are used as the warm-up period. The baseline gain Gref = 1.0 is set, and measurement updates are performed according to the standard volumetric Kalman filter gain. Simultaneously, the gated loop unit branch is called for forward propagation to update the hidden state, but its output is not used for measurement gain adjustment, nor is online adjustment of the output layer parameters performed. At the end of the warm-up period, the gain smoothing state is initialized to the current physical baseline gain, and the NIS smoothing statistic is initialized to 1. Then, a sampling interval of 550 ≤ k < 650 is set as the transition period. The linear mixing coefficient is calculated according to αk = (k - 550) / (650 - 550), and Gk = (1 - αk)Gref + αkGdyn,k is set. After the transition period, the online stage begins, using the dynamic gain Gdyn,k. The protection of the upper and lower bounds of the state of charge covariance includes: after the completion of the arithmetic covariance update, when Gk < 0.99 and Pk[0,0] > 10^-7, let the scaling factor c = 10^-7 / Pk[0,0], scale Pk[0,0] to 10^-7, and synchronously scale Pk[0,j] and Pk[j,0] according to the square root of c, where j represents the state index corresponding to the polarization voltage; when Pk[0,0] < 10^-9, raise it to 10^-9. The residual sign consistency correction includes: at the end of the warm-up period and when Gk < 0.99, count the signs of the most recent 500 observation residuals and calculate the sign mean mk; when |mk| > 0.90, apply single-step state of charge correction according to δSOCk = 10^-6·mk·|mk|. The number of sampling points, threshold, and upper and lower limits mentioned above are parameters of this embodiment. In other embodiments, they can be calibrated according to the sampling period, battery model, and numerical stability requirements.

[0048] This application provides a method for estimating the state of charge (SOC) of lithium iron phosphate (LFP) batteries. It generates dynamic gains through the collaborative generation of a physical prior branch, an innovative consistency branch, and a GRU time memory branch. In the voltage plateau region, it adaptively reduces the observation correction weight and suppresses abnormal residual interference. Simultaneously, it utilizes GRU historical operating condition memory to achieve smooth gain adjustment. Combined with stability enhancement mechanisms such as a three-stage scheduling process (preheating-transition-online), covariance upper and lower bound protection, and residual sign consistency correction, it effectively solves the problem of amplified SOC estimation errors caused by small voltage deviations in the LFP battery voltage plateau region. This method helps improve the estimation accuracy, robustness, and engineering deployment feasibility under different dynamic operating conditions.

[0049] Please see Figure 7 , Figure 7 This is a structural block diagram of a lithium iron phosphate battery state-of-charge estimation device provided in an embodiment of this application. Figure 7As shown: The lithium iron phosphate battery state of charge estimation device 700 includes: a setup module 710, an execution module 720, a construction module 730, an input module 740, an acquisition module 750, and a recursion module 760, wherein: Module 710 is used to establish the state-space model of the battery and obtain the mapping relationship between open-circuit voltage and state of charge. The state-space model uses the battery state of charge and polarization voltage as state variables, and is used to describe the state equations that describe the evolution of the battery state over time and the observation equations that describe the terminal voltage observations. The execution module 720 is used to perform one-step prediction of capacitive Kalman filtering based on the state-space model. The one-step prediction includes: constructing a capacitive point based on the posterior state and posterior covariance of the previous time step; propagating the capacitive point through the state equation to obtain the prior state and prior covariance of the current time step; and then obtaining the predicted terminal voltage, observation covariance, cross covariance, and observation residual through the observation equation. Module 730 is used to construct a feature vector based on the prior state of charge, the absolute value of the observation residual, the observation covariance, the absolute value of the current current, and the absolute value of the local slope obtained from the mapping relationship between open-circuit voltage and state of charge based on the prior state of charge or its moving average; and to calculate the normalized squared innovation statistic, which characterizes the consistency between the observation residual and the filtering uncertainty, based on the observation residual and the observation covariance. The input module 740 is used to input the absolute value of the local slope to the physical prior branch to generate the physical baseline gain, input the normalized innovation squared statistic and its smoothing statistic to the innovation consistency branch to generate the innovation consistency correction term, and input the feature vector to the gated recurrent unit branch to generate the gated recurrent unit correction term; the physical baseline gain, the innovation consistency correction term and the gated recurrent unit correction term are fused and smoothed to obtain the dynamic gain at the current time. Module 750 is obtained, which is used to scale the Kalman gain of the capacitive Kalman filter using dynamic gain, and to measure and update the prior state and prior covariance using the scaled Kalman gain to obtain the posterior state and posterior covariance at the current time. The posterior state includes the estimated state of charge at the current time. The recursion module 760 is used to recursively use the posterior state obtained at the current time as the posterior state of the previous time for the next sampling time, and executes a stability enhancement mechanism according to a preset scheduling strategy during the recursion process, outputting continuous state of charge estimates at each sampling time.

[0050] It should be noted that the lithium iron phosphate battery state-of-charge estimation device provided in the above embodiments is only illustrated by the division of the functional modules described above when executing the lithium iron phosphate battery state-of-charge estimation method. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the lithium iron phosphate battery state-of-charge estimation device and the lithium iron phosphate battery state-of-charge estimation method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.

[0051] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0052] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 8 As shown, the electronic device 800 may include: at least one processor 801, at least one network interface 804, a user interface 803, a memory 805, and at least one communication bus 802.

[0053] The communication bus 802 is used to enable communication between these components.

[0054] The user interface 803 may include a display screen and a camera. Optional user interfaces 803 may include standard wired interfaces and wireless interfaces.

[0055] The network interface 804 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0056] The processor 801 may include one or more processing cores. The processor 801 connects to various parts within the electronic device 800 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 805, and by calling data stored in the memory 805. Optionally, the processor 801 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 801 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 801 and may be implemented as a separate chip.

[0057] The memory 805 may include random access memory (RAM) or read-only memory. Optionally, the memory 805 may include a non-transitory computer-readable storage medium. The memory 805 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 805 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 805 may also be at least one storage device located remotely from the aforementioned processor 801. Figure 8 As shown, the memory 805, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a lithium iron phosphate battery state-of-charge estimation application.

[0058] exist Figure 8In the illustrated electronic device 800, the user interface 803 is mainly used to provide an input interface for the user and to acquire user input data; while the processor 801 can be used to call the lithium iron phosphate battery state-of-charge estimation application stored in the memory 805, and specifically perform the following operations: A state-space model of the battery is established, and the mapping relationship between open-circuit voltage and state of charge is obtained. The state-space model uses the battery state of charge and polarization voltage as state variables, and is used to describe the state equations that describe the evolution of the battery state over time and the observation equations that describe the terminal voltage observations. One-step prediction based on state-space model of capacitive Kalman filtering includes: constructing capacitive points based on the posterior state and posterior covariance of the previous time step; propagating the capacitive points through state equation to obtain the prior state and prior covariance of the current time step; and obtaining the predicted terminal voltage, observation covariance, cross covariance and observation residual through observation equation. Based on the prior state of charge, the absolute value of the observation residual, the observation covariance, the absolute value of the current current, and the absolute value of the local slope obtained from the mapping relationship between open-circuit voltage and state of charge based on the prior state of charge or its moving average, a feature vector is constructed; and based on the observation residual and the observation covariance, a normalized squared innovation statistic characterizing the consistency between the observation residual and the filtering uncertainty is calculated. The absolute value of the local slope is input into the physical prior branch to generate the physical baseline gain. The normalized squared innovation statistic and its smoothing statistic are input into the innovation consistency branch to generate the innovation consistency correction term. The feature vector is input into the gated recurrent unit branch to generate the gated recurrent unit correction term. The physical baseline gain, innovation consistency correction term and gated recurrent unit correction term are fused and smoothed to obtain the dynamic gain at the current time. The Kalman gain of the capacitive Kalman filter is scaled using dynamic gain, and the scaled Kalman gain is used to measure and update the prior state and prior covariance to obtain the posterior state and posterior covariance at the current time. The posterior state includes the estimated state of charge at the current time. The posterior state obtained at the current time is used as the posterior state of the previous time for the next sampling time to perform recursion. During the recursion process, a stability enhancement mechanism is executed according to a preset scheduling strategy, and continuous state of charge estimates are output at each sampling time.

[0059] In one possible embodiment, the state-space model is a second-order resistor-capacitor equivalent circuit model, and the polarization voltage includes the first RC branch voltage and the second RC branch voltage.

[0060] In one possible embodiment, processor 801 performs the generation of physical baseline gain, specifically by performing: Obtain the absolute value of the local slope of the mapping relationship between open-circuit voltage and state of charge. After normalizing the absolute value of the local slope, map it to a preset gain range to obtain the physical baseline gain.

[0061] In one possible embodiment, processor 801 executes the process of obtaining the absolute value of the local slope of the mapping relationship between open-circuit voltage and state of charge, normalizes the absolute value of the local slope, and maps it to a preset gain range to obtain the physical baseline gain. Specifically, this is used to perform the following: Calculate the normalized slope value sk=clip(|dOCV / dSOC| / sref,0,1), where sref is the reference slope; Calculate the physical baseline gain Gbase,k=0.5+0.5*sk, where the physical baseline gain ranges from [0.5,1.0].

[0062] In one possible embodiment, the innovation consistency correction term is generated through the following steps: Calculate the normalized squared innovation statistic NISk=rk^2 / max(Pyy,k,ε), where rk is the observation residual and Pyy,k is the observation covariance; The normalized squared innovation statistic is subjected to an exponentially weighted moving average according to NISema,k=βNISema,k-1+(1-β)NISk to obtain a smoothing statistic, where β is the smoothing coefficient in the range of (0,1). The innovation consistency correction term is calculated based on the deviation of the smoothing statistic from the ideal value of 1 and the platform interval weight determined by the normalized slope value; when the normalized slope value is not less than the preset slope threshold, the innovation consistency correction term is set to zero.

[0063] In one possible embodiment, processor 801 performs a process of fusing and smoothing the physical baseline gain, innovation consistency correction term, and gated loop unit correction term to obtain the dynamic gain at the current moment, specifically for the following purpose: The physical baseline gain, innovation consistency correction term, and gated cyclic unit correction term are summed, fused, and clipped to obtain the original gain Graw,k=clip(Gbase,k+ΔGNIS,k+ΔGGRU,k,0.01,1.0); The original gain is smoothed by a first-order low-pass filter to obtain the dynamic gain Gk = 0.85 * Gk-1 + 0.15 * Graw,k.

[0064] In one possible embodiment, the stability enhancement mechanism includes at least one of the following: preheating-transition-online three-stage scheduling, upper and lower bound protection of the state of charge covariance, and residual sign consistency correction; The three-stage scheduling of preheating-transition-online includes: in the preheating stage, a preset reference gain is used to perform measurement updates, and the gated loop unit branches only update the hidden state without participating in measurement gain adjustment; in the transition stage, the preset reference gain is smoothly switched to dynamic gain according to the mixing coefficient that increases over time; and in the online stage, dynamic gain is used completely. The protection of upper and lower bounds of the state of charge covariance includes: when the dynamic gain is lower than a first threshold and the variance component corresponding to the state of charge in the posterior covariance exceeds the upper limit, compressing the variance component to the upper limit and synchronously scaling the cross-covariance between the state of charge and each polarization voltage according to the square root of the compression coefficient; when the variance component is lower than the lower limit, raising it to the lower limit. The residual sign consistency correction includes: counting the signs of the most recent preset number of observation residuals, and applying a single-step micro-correction to the state of charge when the sign consistency index exceeds a preset threshold.

[0065] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform the above-described instructions. Figure 2 One or more steps in the illustrated embodiment. If the constituent modules of the above-described lithium iron phosphate battery state-of-charge estimation device are implemented as software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.

[0066] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital versatile discs (DVDs)), or semiconductor media (e.g., solid state disks (SSDs)).

[0067] 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. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium includes various media capable of storing program code, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. Unless otherwise specified, the technical features of this embodiment and its implementation schemes can be combined arbitrarily.

[0068] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. It will be apparent to those skilled in the art that various modifications can be made to these embodiments, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for estimating the state of charge of a lithium iron phosphate battery, characterized in that, The method includes: A state-space model of the battery is established, and the mapping relationship between open-circuit voltage and state of charge is obtained. The state-space model uses the battery state of charge and polarization voltage as state variables, and is used to describe the state equations that describe the evolution of the battery state over time and the observation equations that describe the terminal voltage observations. One-step prediction of capacitive Kalman filtering is performed based on the state-space model. The one-step prediction includes: constructing a capacitive point based on the posterior state and posterior covariance of the previous time step; propagating the capacitive point through the state equation to obtain the prior state and prior covariance of the current time step; and then obtaining the predicted terminal voltage, observation covariance, cross covariance, and observation residual through the observation equation. Based on the prior state of charge at the current moment, the absolute value of the observed residual, the observed covariance, the absolute value of the current, and the absolute value of the local slope obtained from the mapping relationship between the open-circuit voltage and the state of charge based on the prior state of charge or its moving average, a feature vector is constructed; and based on the observed residual and the observed covariance, a normalized squared innovation statistic characterizing the consistency between the observed residual and the filtering uncertainty is calculated. The absolute value of the local slope is input into the physical prior branch to generate the physical baseline gain. The normalized innovation squared statistic and its smoothing statistic are input into the innovation consistency branch to generate the innovation consistency correction term. The feature vector is input into the gated recurrent unit branch to generate the gated recurrent unit correction term. The physical baseline gain, the innovation consistency correction term, and the gated recurrent unit correction term are fused and smoothed to obtain the dynamic gain at the current time. The dynamic gain is used to scale the Kalman gain of the capacitive Kalman filter, and the scaled Kalman gain is used to measure and update the prior state and the prior covariance to obtain the posterior state and posterior covariance at the current time. The posterior state includes the estimated state of charge at the current time. The posterior state obtained at the current time is used as the posterior state of the previous time for the next sampling time to perform recursion. During the recursion process, a stability enhancement mechanism is executed according to a preset scheduling strategy, and continuous state of charge estimates are output at each sampling time.

2. The method for estimating the state of charge of a lithium iron phosphate battery according to claim 1, characterized in that, The state-space model is a second-order resistor-capacitor equivalent circuit model, and the polarization voltage includes the first RC branch voltage and the second RC branch voltage.

3. The method for estimating the state of charge of a lithium iron phosphate battery according to claim 1, characterized in that, The generation of physical baseline gain includes: Obtain the absolute value of the local slope of the mapping relationship between the open-circuit voltage and the state of charge, normalize the absolute value of the local slope, and then map it to a preset gain range to obtain the physical baseline gain.

4. The method for estimating the state of charge of a lithium iron phosphate battery according to claim 3, characterized in that, The process of obtaining the absolute value of the local slope of the mapping relationship between the open-circuit voltage and the state of charge, normalizing the absolute value of the local slope, and mapping it to a preset gain range to obtain the physical baseline gain includes: Calculate the normalized slope value sk=clip(|dOCV / dSOC| / sref,0,1), where sref is the reference slope; Calculate the physical baseline gain Gbase,k = 0.5 + 0.5 * sk, where the physical baseline gain ranges from [0.5, 1.0].

5. The method for estimating the state of charge of a lithium iron phosphate battery according to claim 1, characterized in that, The innovation consistency correction term is generated through the following steps: Calculate the normalized squared innovation statistic NISk=rk^2 / max(Pyy,k,ε), where rk is the observation residual and Pyy,k is the observation covariance; The normalized squared innovation statistic is subjected to an exponentially weighted moving average according to NISema,k=βNISema,k-1+(1-β)NISk to obtain a smoothing statistic, where β is the smoothing coefficient in the range of (0,1). The innovation consistency correction term is calculated based on the deviation of the smoothing statistic from the ideal value of 1 and the platform interval weight determined by the normalized slope value obtained by normalizing the absolute value of the local slope; when the normalized slope value is not less than the preset slope threshold, the innovation consistency correction term is set to zero.

6. The method for estimating the state of charge of a lithium iron phosphate battery according to claim 1, characterized in that, The process of fusing and smoothing the physical baseline gain, the innovation consistency correction term, and the gated recurrent unit correction term to obtain the dynamic gain at the current moment includes: The physical baseline gain, the innovation consistency correction term, and the gated loop unit correction term are summed, fused, and clipped to obtain the original gain Graw,k=clip(Gbase,k+ΔGNIS,k+ΔGGRU,k,0.01,1.0); The original gain is smoothed by a first-order low-pass filter to obtain the dynamic gain Gk = 0.85 * Gk-1 + 0.15 * Graw,k.

7. The method for estimating the state of charge of a lithium iron phosphate battery according to claim 1, characterized in that, The stability enhancement mechanism includes at least one of the following: preheating-transition-online three-stage scheduling, upper and lower bound protection of the state of charge covariance, and residual sign consistency correction; The preheating-transition-online three-stage scheduling includes: in the preheating stage, a preset reference gain is used to perform measurement updates, and the gated loop unit branches only update the hidden state and do not participate in measurement gain adjustment; in the transition stage, the preset reference gain is smoothly switched to the dynamic gain according to the mixing coefficient that increases over time; and in the online stage, the dynamic gain is used completely. The protection of the upper and lower bounds of the state of charge covariance includes: when the dynamic gain is lower than a first threshold and the variance component corresponding to the state of charge in the posterior covariance exceeds the upper limit, compressing the variance component to the upper limit and synchronously scaling the cross-covariance between the state of charge and each polarization voltage according to the square root of the compression coefficient; when the variance component is lower than the lower limit, raising it to the lower limit. The residual sign consistency correction includes: counting the signs of the most recent preset number of observation residuals, and applying a single-step micro-correction to the state of charge when the sign consistency index exceeds a preset threshold.

8. A state-of-charge estimation device for lithium iron phosphate batteries, characterized in that, The device includes: A module is established to build a state-space model of the battery and obtain the mapping relationship between open-circuit voltage and state of charge; wherein, the state-space model uses the battery state of charge and polarization voltage as state variables, and is used to describe the state equations that describe the evolution of the battery state over time and the observation equations that describe the terminal voltage observations. The execution module is used to perform a one-step prediction of capacitive Kalman filtering based on the state space model. The one-step prediction includes: constructing a capacitive point based on the posterior state and posterior covariance of the previous time step; propagating the capacitive point through the state equation to obtain the prior state and prior covariance of the current time step; and then obtaining the predicted terminal voltage, observation covariance, cross covariance, and observation residual through the observation equation. The construction module is used to construct a feature vector based on the prior state of charge at the current moment, the absolute value of the observation residual, the observation covariance, the absolute value of the current current, and the absolute value of the local slope obtained from the mapping relationship between the open-circuit voltage and the state of charge based on the prior state of charge or its moving average; and to calculate the normalized squared innovation statistic, which characterizes the consistency between the observation residual and the filtering uncertainty, based on the observation residual and the observation covariance. The input module is used to input the absolute value of the local slope into the physical prior branch to generate the physical baseline gain, input the normalized innovation squared statistic and its smoothing statistic into the innovation consistency branch to generate the innovation consistency correction term, and input the feature vector into the gated recurrent unit branch to generate the gated recurrent unit correction term; the physical baseline gain, the innovation consistency correction term and the gated recurrent unit correction term are fused and smoothed to obtain the dynamic gain at the current time. The module is used to scale the Kalman gain of the capacitive Kalman filter using the dynamic gain, and to measure and update the prior state and the prior covariance using the scaled Kalman gain to obtain the posterior state and posterior covariance at the current time. The posterior state includes the estimated state of charge at the current time. The recursive module is used to recursively use the posterior state obtained at the current time as the posterior state of the previous time for the next sampling time, and executes a stability enhancement mechanism according to a preset scheduling strategy during the recursive process, outputting continuous state of charge estimates at each sampling time.

9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions adapted for loading by a processor and executing the steps of the method as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method as described in any one of claims 1 to 7.