Method for estimating SOC (State of Charge) of battery through Kalman filtering of self-adaptive adjustment noise matrix
By using the Kalman filtering method with adaptive adjustment of the noise matrix, a second-order equivalent model of lithium battery is constructed and the process noise matrix is optimized. This solves the problem of inaccurate SOC estimation caused by changes in battery model parameters in energy storage power stations, achieves high-precision battery state of charge estimation, and ensures the safe and reliable operation of the power station.
Patent Information
- Application Number
- CN202511009534.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-12-12
AI Technical Summary
In energy storage power stations, existing Kalman filtering methods are inaccurate in SOC estimation due to changes in battery model parameters, making it impossible to accurately estimate the battery state of charge under actual operating conditions.
An adaptive Kalman filtering method with adjustable noise matrix is adopted. By constructing a second-order equivalent model of lithium battery, an unscented Kalman filter is initialized, the process noise matrix is optimized, and the adaptive unscented Kalman filtering process is executed cyclically to update the state estimate in real time to overcome the model parameter mismatch.
Accurate estimation of battery SOC under the operating conditions of energy storage power stations improves estimation accuracy and supports the safe and reliable operation and maintenance of power stations.
Smart Images

Figure CN121124264A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of lithium battery energy storage technology, and in particular relates to a method for estimating battery SOC using Kalman filtering with adaptive adjustment of the noise matrix. Background Technology
[0002] In the Battery Management System (BMS) of an energy storage power station, State of Charge (SOC) is the most important and fundamental parameter. The State of Charge (SOC) represents the ratio of the currently stored energy to the energy that can be stored in a fully charged state, usually expressed as a percentage. Its calculation formula is as follows:
[0003]
[0004] Q t Q refers to the remaining capacity of the battery at time t. N State of Charge (SOC) refers to the maximum usable capacity of a battery. While it cannot be directly measured, research often uses parameters such as voltage and current to estimate it through modeling and algorithms. Existing research on these algorithms primarily utilizes Kalman filtering and its improved versions; however, in energy storage power station scenarios, their accuracy and stability still have room for improvement.
[0005] In actual use, the parameters of the battery equivalent model of energy storage lithium batteries will change with the characteristic parameters such as battery capacity, temperature, discharge rate and aging degree. This causes the state equation parameter values of the algorithm to differ from the true values during the Kalman filtering process, resulting in a large error in the SOC estimate. Summary of the Invention
[0006] The purpose of this invention is to address the aforementioned shortcomings in the prior art by proposing a method for estimating battery SOC using Kalman filtering with adaptive adjustment of the noise matrix. This method solves the problem of inaccurate SOC estimation caused by mismatched battery model parameters in the actual operating conditions of existing energy storage power stations.
[0007] To achieve the above objectives, this application provides a method for estimating battery SOC using Kalman filtering with adaptive adjustment of the noise matrix, comprising the following steps:
[0008] S1. Construct a second-order equivalent model of the lithium battery based on the voltage and current characteristics during charging and discharging, and then discretize the model to obtain the state-space equation.
[0009] S2. Initialize the unscented Kalman filter, determine the number of Sigma points, calculate the Sigma point set and determine the weights;
[0010] S3. Unscented Kalman Filter State Prediction: In each filtering step, the prior state estimate, the observed variable estimate, the Kalman gain, the residual, and the posterior state estimate are calculated.
[0011] S4. With the goal of minimizing the oscillations and biases of the state estimation, select the most suitable process noise matrix. This includes optimizing the cost function in each filtering step to balance the oscillations and biases of the state estimation and solving for the optimal process noise matrix for that step.
[0012] S5. Repeat steps S3-S4 to perform the adaptive unscented Kalman filtering process, updating the unscented Kalman filter state in real time to obtain the real-time SOC estimate. It should be noted that the adaptive unscented Kalman filtering process updates the state prior error covariance matrix based on the process noise matrix, calculates the Kalman gain, updates the state posterior error covariance matrix, updates the posterior state based on sensor measurements, and outputs the SOC estimate.
[0013] As a preferred and feasible approach, step S1 involves constructing a second-order equivalent model of the lithium battery and discretizing it to obtain the state-space equations, specifically including:
[0014] S1.1 The state-space equations established based on the second-order equivalent model of a lithium battery are as follows:
[0015]
[0016] Where U1 is the voltage across R1, U2 is the voltage across R2, I is the battery current, η is the battery coulombic efficiency parameter, Q is the maximum usable battery capacity, and U oc The open-circuit voltage of the battery is represented, which has a non-linear relationship with the battery's state of charge (SOC). The ohmic internal resistance R0 characterizes the instantaneous voltage change of the battery. The two pairs of polarization resistors R1 and R2 and the polarization capacitors C1 and C2 are used to describe the polarization phenomenon of the battery. t0 represents the initial time point for SOC calculation, and t represents the current time. Let U1 be the derivative of U1 with respect to time. Let i(τ) represent the derivative of U2 with respect to time, and let i(τ) represent the battery current at time τ.
[0017] S1.2 Discretize the state-space equations (1) and (2) to obtain the following equation:
[0018]
[0019] U t (k)=U oc (k)+R0I(k)+U1(k)+U2(k) (4)
[0020] Where k represents the k-th sampling time, k-1 represents the (k-1)-th sampling time, T represents the sampling time interval; SOC(k) represents the state of charge of the battery at the k-th sampling time, U t (k) represents the k-th sampling time U t The values of U1(k) and U2(k) represent the value of U1 at the k-th sampling time, respectively. oc (k) represents the k-th sampling time U oc The value of I is given by I(k), which represents the value of I at the k-th sampling time.
[0021] S1.3. Obtain the parameter values of the discretized state-space equations using the offline parameter identification method.
[0022] As a preferred implementation method, it should be noted that step S2 initializes the unscented Kalman filter, determines the number of Sigma points, calculates the Sigma point set, and determines the weights. Specifically, for the nonlinear system of a battery, the Sigma point set is selected, substituted into the state equation of the nonlinear system, and assigned corresponding weights. This includes:
[0023] S2.1 Introducing process noise and measurement noise, the discretized battery state-space equation is described by the following formula:
[0024]
[0025] in, For system state, u k =i[k] is the system input, y k =U t (k) represents the system measurement, w k For process noise, v k For measuring noise;
[0026] Let be the state transition equation, representing the transition process from the state at time k-1 to the state at time k;
[0027] h(x k ,u k )=U oc (k)+R0I(k)+U1(k)+U2(k) is the measurement equation, which represents the relationship between the state at time k and the actual measurable output quantity;
[0028] S2.2 Setting initial battery status values Initial value of state covariance matrix P0, initial value of process noise matrix Q0, value of measurement noise matrix R;
[0029] Wherein, SOC(0) is based on the terminal voltage U when the battery is at rest. ocBy querying U oc (SOC) table obtained; U1(0)=U2(0)=0; R value is calculated based on the noise value of the test voltage sensor; P0 value and Q0 value are set based on experience;
[0030] S2.3 Determine the number of Sigma points and calculate the initial Sigma points, including a center point and 2n discrete points set around the center point, for a total of 2n+1 points, where n is the dimension of the state variables. The value methods are as follows:
[0031]
[0032] Where λ=α 2 (n+γ)-n is used to measure the distance between the selected Sigma point and the mean. The larger the value, the farther away from the mean. The scaling factor α and parameter γ of the interval (0,1] are determined empirically.
[0033] S2.4 Calculate the weights corresponding to the sigma points. The calculation method is as follows:
[0034]
[0035] in, and Weighted by mean, and The values of α, n, and λ are set in S2.3 to represent the covariance weights, and β is the skewness compensation parameter of the prior distribution, which is usually taken as 2.
[0036] As a preferred and feasible approach, step S3, in each filtering process, calculates the prior state estimate, the observed variable estimate, the Kalman gain, the residual, and the posterior state estimate as follows:
[0037] S3.1, Based on the posterior estimate at time k-1 State covariance P k-1|k-1 Calculate the Sigma point set The value methods are as follows:
[0038]
[0039] The value of λ is the same as the value of λ in S2.3;
[0040] S3.2, Sigma point set Substituting into the state equation f(x) k-1 u k This allows us to obtain the state transition value of each sigma point at time k. Then, the prior state estimate is calculated, and the estimate is as follows:
[0041]
[0042] Among them, u k The control input current at time k, The prior estimates of the state variables are the transition values of 2n+1 states. Multiply by the corresponding mean weight The value obtained by summing;
[0043] S3.3, Using the optimal process noise covariance matrix Q obtained at time k-1. * (k-1), the prior estimates of the state variables calculated according to S3.2. The state transition result of the sigma point at time k Calculate the state prior error covariance matrix P xx,k|k-1 The formula is as follows:
[0044]
[0045] in, Here, T represents the covariance weights, and T denotes the matrix transpose.
[0046] S3.4 Using prior estimates of state variables and the state prior error covariance matrix P xx,k|k-1 Update Sigma point set The formula is as follows:
[0047]
[0048] S3.5, Set the Sigma point set Substitute into the measurement equation h(x) k u k This yields the observed transition value at time k for each sigma point. Then calculate the estimated values of the observed variables.
[0049]
[0050] Among them, u k The control input current at time k, The estimated value of the observed variable is obtained by taking 2n+1 observations. Multiply by the corresponding mean weight The value obtained by summing.
[0051] S3.6 Based on the measurement noise matrix R defined in S2.2, calculate the observation error covariance matrix P. zz,k|k-1 The formula is as follows:
[0052]
[0053] in, Here, T represents the covariance weights, and T denotes the matrix transpose.
[0054] S3.7 Calculate the covariance matrix P of the state variables and the observed variables. xz,k|k-1 The calculation formula is as follows:
[0055]
[0056] in, The calculation was obtained in step S3.4. The result is obtained in step S3.2. and The result is obtained in step S3.5. Here, T represents the covariance weights, and T denotes the matrix transpose.
[0057] S3.8 Calculate the Kalman gain K at time k. k residual ε k posterior estimates of state variables and the posterior state covariance matrix P k|k The calculation formula is as follows:
[0058]
[0059] Among them, y k These are system measurement values.
[0060] As a preferred and feasible approach, step S4, in each filtering step, optimizes the cost function to balance the oscillation and bias of the state estimation, and solves for the optimal process noise matrix Q for that step. * (k), specifically including:
[0061] S4.1, due to the model state The dimension is 3, and the process noise matrix Q(k) at time k is represented in the following form:
[0062]
[0063] Here, q1(k), q2(k), and q3(k) reflect the noise characteristics related to the state variables SOC(k), U1(k), and U2(k) at time k, respectively. The goal is to find the most suitable values for q1(k), q2(k), and q3(k) that minimize the oscillations and biases of the three state estimates.
[0064] S4.2. Define the cost functions for q1(k), q2(k), and q3(k) as follows:
[0065] J(q i(k))=δ i A(q i (k))+(1-δ i )B(q i (k)), i = 1, 2, 3 (9)
[0066] Where A(q) i (k) represents the oscillation, used to measure the difference between the state estimate and the reference smoothed value; B(q) i (k) represents the bias, used to measure the difference between the state estimate and the observed value; δ i It is the weighting coefficient, the equilibrium oscillation A(q) i (k)) and deviation B(q) i The contribution of (k) to the cost function ranges from [0,1].
[0067] At time k in the Kalman filtering process, taking an interval of width Δ [k-Δ, k-Δ+1, ..., k], the oscillation A(q) i (k) is defined as the sum of squared differences between the posterior estimate and the smoothed value of the i-th state variable within the interval, and its specific expression is as follows:
[0068]
[0069] in, Denotes the posterior estimated state vector at time κ. The i-th component, The fitted value is obtained by performing a quadratic polynomial smoothing fit on the estimated state value within the interval, and its expression is: The fitting coefficients α0, α1, and α2 are obtained by minimizing the following equation:
[0070]
[0071] Deviation B(q) i (k) By calculating the residual value ε at time k k The square norm is obtained as follows:
[0072]
[0073] Where, ε κ This represents the residual value at time κ, calculated using S3.8;
[0074] S4.3, To obtain the optimal value at time k and The cost function described in S4.2 is minimized using the grid method, and the solution formula is as follows:
[0075]
[0076] S4.4, Based on the obtained optimal... and Value, construct and obtain the optimal process noise covariance matrix Q at time k. * (k), in the following specific form:
[0077]
[0078] As a preferred and feasible approach, step S4.3 employs a grid-based solution method to minimize the cost function, specifically including:
[0079] For q i Set the interval range q i ∈[q imin q imax ], i = 1, 2, 3;
[0080] For the interval [q imin q ima x], with step size Δq i It is decomposed into several discrete values, forming a grid; q i =q imin +m·Δq i Where m = 0, 1, 2, ..., N;
[0081] By using a grid search method, traversing the entire search interval, the globally optimal solution is found as shown in the following equation:
[0082]
[0083] As a preferred implementation, step 5 iteratively executes the adaptive unscented Kalman filtering process of steps S3 to S4 to obtain the SOC estimate at each time step, specifically including: S5.1, obtaining the posterior state estimation vector at time k. The first dimension is extracted from the vector and used as an estimate of the battery SOC at the current moment.
[0084] S5.2. The maximum number of iterations in the preset loop is set. The filtering process stops when the preset maximum number of iterations is reached or when the data flow stops.
[0085] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0086] This invention constructs a second-order equivalent model of a lithium battery, initializes an unscented Kalman filter, predicts the state of the unscented Kalman filter, and optimizes the process noise matrix. It then iteratively executes an adaptive unscented Kalman filter process, updating the unscented Kalman filter state in real time to obtain a real-time SOC estimate. This enables the invention to overcome the mismatch between battery model parameters under the operating conditions of an energy storage power station, accurately estimating the battery's SOC when there are differences between the actual battery condition and the parameter values. This provides data support for the safe and reliable operation and maintenance of energy storage power stations. Attached Figure Description
[0087] Figure 1 The method for estimating battery SOC using Kalman filtering with adaptive adjustment of the noise matrix provided in this application;
[0088] Figure 2 The diagram shown is a second-order equivalent model of a battery.
[0089] Figure 3 Flowchart of adaptive unscented Kalman filtering;
[0090] Figure 4 The figure shows the results of the battery SOC estimation accuracy using the method of this application. Detailed Implementation
[0091] The technical solution proposed in this application will be further described in detail below with reference to the accompanying drawings.
[0092] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0093] To enable those skilled in the art to better understand the present invention, the invention will be further described below with reference to the accompanying drawings. A method for adaptively adjusting the noise matrix using Kalman filtering to estimate battery SOC is described, and the flowchart of this method is attached. Figure 1 As shown,
[0094] To achieve the above objectives, this application provides a method for estimating battery SOC using Kalman filtering with adaptive adjustment of the noise matrix, comprising the following steps:
[0095] S1. Construct a second-order equivalent model of the lithium battery based on the voltage and current characteristics during charging and discharging, and then discretize the model to obtain the state-space equation.
[0096] It should be noted that, as shown in the appendix Figure 2 As shown, this application focuses on lithium iron phosphate batteries used in energy storage power stations. This embodiment uses an A123 26650 lithium iron phosphate battery with a nominal capacity of 2.5Ah, a nominal voltage of 3.3V, and a charging cut-off voltage of 3.6V. Based on the voltage and current characteristics of the battery during charging and discharging, a second-order equivalent model is adopted. (U...) oc The open-circuit voltage of the battery is represented by the ohmic internal resistance R0, which has a non-linear relationship with the battery's state of charge (SOC). The instantaneous voltage change of the battery is characterized by the two pairs of polarization resistors R1 and R2 and polarization capacitors C1 and C2. These are used to describe the polarization phenomenon of the battery.
[0097] Step S1 specifically includes:
[0098] S1.1 The state-space equations established based on the second-order equivalent model of a lithium battery are as follows:
[0099]
[0100] Where U1 is the voltage across R1, U2 is the voltage across R2, I is the battery current, η is the battery coulombic efficiency parameter, Q is the maximum usable battery capacity, and U oc The open-circuit voltage of the battery is represented, which has a non-linear relationship with the battery's state of charge (SOC). The ohmic internal resistance R0 characterizes the instantaneous voltage change of the battery. The two pairs of polarization resistors R1 and R2 and the polarization capacitors C1 and C2 are used to describe the polarization phenomenon of the battery. t0 represents the initial time point for SOC calculation, and t represents the current time. Let U1 be the derivative of U1 with respect to time. Let i(τ) represent the derivative of U2 with respect to time, and let i(τ) represent the battery current at time τ.
[0101] S1.2 Discretize the state-space equations (1) and (2) to obtain the following equation:
[0102]
[0103] U t (k)=U oc (k)+R0I(k)+U1(k)+U2(k) (4)
[0104] Where k represents the k-th sampling time, k-1 represents the (k-1)-th sampling time, T represents the sampling time interval; SOC(k) represents the state of charge of the battery at the k-th sampling time, U t(k) represents the k-th sampling time U t The values of U1(k) and U2(k) represent the value of U1 at the k-th sampling time, respectively. oc (k) represents the k-th sampling time U oc The value of I is given by I(k), which represents the value of I at the k-th sampling time.
[0105] S1.3. Based on the offline parameter identification method, obtain the parameter values of the discretized state-space equation. The parameter values include R0, R1, R2, C1, C2, Q, and η. Specifically, in this embodiment, under room temperature conditions of 25°C, the battery is slowly charged and discharged using a constant current-constant voltage method with a current of C / 50. The relationship curves between the battery charging terminal voltage and discharging terminal voltage and the battery's SOC are obtained, and the coulombic efficiency parameter η is calculated by the ratio of the charge / discharge ampere-hours. The average of the two curves is taken as the battery's OCV-SOC relationship curve. Further, a hybrid pulse dynamic characteristic (HPPC) experiment is conducted, and the parameter values R0, R1, R2, C1, and C2 are obtained using the least squares method with a forgetting factor. Initial state values are set according to the battery's initial conditions, and initial values of the noise matrix are set according to the estimated values and the sensor's accuracy data.
[0106] S2. Initialize the unscented Kalman filter, determine the number of Sigma points, calculate the Sigma point set, and determine the weights; specifically including:
[0107] S2.1 Introducing process noise and measurement noise, the discretized battery state-space equation is described using a nonlinear time-varying system, as shown in the following formula:
[0108] The following formula describes:
[0109]
[0110] in, For system state, u k =i[k] is the system input, y k =U t (k) represents the system measurement, w k For process noise, v k For measuring noise;
[0111] Let be the state transition equation, representing the transition process from the state at time k-1 to the state at time k;
[0112] h(x k ,u k )=U oc (k)+R0I(k)+U1(k)+U2(k) is the measurement equation, which represents the relationship between the state at time k and the actual measurable output quantity;
[0113] S2.2 Setting initial battery status values Initial value of state covariance matrix P0, initial value of process noise matrix Q0, value of measurement noise matrix R;
[0114] Wherein, SOC(0) is based on the terminal voltage U when the battery is at rest. oc By querying U oc (SOC) table obtained; U1(0)=U2(0)=0; R value is calculated based on the noise value of the test voltage sensor; P0 value and Q0 value can be preset according to empirical values; because the statistical characteristics of the observed noise are related to the external sensor of the battery and will not change much, the present invention sets the observed noise matrix R unchanged and adaptively adjusts the process noise matrix Q value to make it conform to the statistical characteristics of the process noise.
[0115] S2.3 Determine the number of Sigma points and calculate the initial Sigma points, including: determining the number of Sigma points n, and setting the parameters α, β, and γ of the Sigma points. Select a set of Sigma points at a certain time, including a center point, which is the state value estimated by Kalman in the previous step. Then, further construct 2n discrete points around the center point, for a total of 2n+1 points.
[0116] Calculate the initial Sigma point set The value methods are as follows:
[0117]
[0118] Where λ=α 2 (n+γ)-n is used to measure the distance between the selected Sigma point and the mean. The larger the value, the farther away from the mean. The scaling factor α is in the range of (0,1] and the parameter γ is generally determined based on experience.
[0119] S2.4 Finally, calculate the weights corresponding to the Sigma points based on the Sigma point set. The calculation method is as follows:
[0120]
[0121] in, and Weighted by mean, and The values of α, n, and λ are set in step S2.3 as covariance weights, and β is the skewness compensation parameter of the prior distribution, which is usually taken as 2.
[0122] S3. In each filtering step, calculate the prior state estimate, observed variable estimate, Kalman gain, residual, and posterior state estimate; S3.1. Based on the posterior estimate at time k-1... State covariance P k-1|k-1 Calculate the Sigma point set The value methods are as follows:
[0123]
[0124] The value of λ is the same as the value of λ in S2.3;
[0125] S3.2, Sigma point set Substituting into the state equation f(x) k-1 ,u k This allows us to obtain the state transition value of each sigma point at time k. Then, the prior state estimate is calculated, and the estimate is as follows:
[0126]
[0127] Among them, u k The control input current at time k, The prior estimates of the state variables are the transition values of 2n+1 states. Multiply by the corresponding mean weight The value obtained by summing;
[0128] S3.3, Using the optimal process noise covariance matrix Q obtained at time k-1. * (k-1), the prior estimates of the state variables calculated according to S3.2. The state transition result of the sigma point at time k Calculate the state prior error covariance matrix P xx,k|k-1 The formula is as follows:
[0129]
[0130] in, The values represent the covariance weights, and T represents the matrix transpose.
[0131] S3.4 Using prior estimates of state variables and the state prior error covariance matrix P xx,k|k-1 Update Sigma point set The formula is as follows:
[0132]
[0133] S3.5, Set the Sigma point set Substitute into the measurement equation h(x) k , u k), to obtain the observed transition value of each sigma point at time k. Then calculate the estimated values of the observed variables.
[0134]
[0135] Among them, u k The control input current at time k, The estimated value of the observed variable is obtained by taking 2n+1 observations. Multiply by the corresponding mean weight The value obtained by summing;
[0136] S3.6 Based on the measurement noise matrix R defined in S2.2, calculate the observation error covariance matrix P. zz,k|k-1 The formula is as follows:
[0137]
[0138] in, The values represent the covariance weights, and T represents the matrix transpose.
[0139] S3.7 Calculate the covariance matrix P of the state variables and the observed variables. xz,k|k-1 The calculation formula is as follows:
[0140]
[0141] in, Calculated by step S3.4, Calculated by step S3.2, and Calculated by step S3.5, The values represent the covariance weights, and T represents the matrix transpose.
[0142] S3.8 Calculate the Kalman gain K at time k. k residual ε k posterior estimates of state variables and the posterior state covariance matrix P k|k The calculation formula is as follows:
[0143]
[0144] Among them, y k These are system measurement values.
[0145] S4. In each filtering step, the optimal process noise matrix for that step is solved by optimizing the cost function to balance the oscillation and bias of the state estimation; specifically including:
[0146] S4.1, due to the model state The dimension is 3, and the process noise matrix Q(k) at time k is represented in the following form:
[0147]
[0148] Here, q1(k), q2(k), and q3(k) reflect the noise characteristics related to the state variables SOC(k), U1(k), and U2(k) at time k, respectively. The goal is to find the most suitable values for q1(k), q2(k), and q3(k) that minimize the oscillations and biases of the three state estimates.
[0149] S4.2. Define the cost functions for q1(k), q2(k), and q3(k) as follows:
[0150] J(q i (k))=δ i A(q i (k))+(1-δ i )B(q i (k)), i = 1, 2, 3 (9)
[0151] Where A(q) i (k) represents the oscillation, used to measure the difference between the state estimate and the reference smoothed value; B(q) i (k) represents the bias, used to measure the difference between the state estimate and the observed value; δ i It is the weighting coefficient, the equilibrium oscillation A(q) i (k)) and deviation B(q) i The contribution of (k) to the cost function ranges from [0,1].
[0152] At time k in the Kalman filtering process, taking an interval of width Δ [k-Δ, k-Δ+1, ..., k], the oscillation A(q) i (k) is defined as the sum of squared differences between the posterior estimate and the smoothed value of the i-th state variable within the interval, and its specific expression is as follows:
[0153]
[0154] in, Denotes the posterior estimated state vector at time κ. The i-th component, The fitted value is obtained by performing a quadratic polynomial smoothing fit on the estimated state value within the interval, and its expression is: The fitting coefficients α0, α1, and α2 are obtained by minimizing the following equation:
[0155]
[0156] Deviation B(q) i (k) By calculating the residual value ε at time kk The square norm is obtained as follows:
[0157]
[0158] Where, ε κ The residual value at time κ is calculated using S3.8 and includes the following:
[0159] For q i Set the interval range q i ∈[q imin q imax ], i = 1, 2, 3;
[0160] For the interval [q imin q imax ], with step size Δq i It is decomposed into several discrete values, forming a grid;
[0161] q i =q imin +m·Δq i Where m = 0, 1, 2, ..., N;
[0162] By using a grid search method, traversing the entire search interval, the globally optimal solution is found as shown in the following equation:
[0163]
[0164] S4.3, To obtain the optimal value at time k and The cost function described in S4.2 is minimized using the grid method, and the solution formula is as follows:
[0165]
[0166] It should be noted that this specifically includes:
[0167] For q i Set the interval range q i ∈[q imin q ima x], i = 1, 2, 3;
[0168] For the interval [q imin q ima x], with step size Δq i It is decomposed into several discrete values, forming a grid;
[0169] q i =q imin +m·Δq i Where m = 0, 1, 2, ..., N;
[0170] By using a grid search method, traversing the entire search interval, the globally optimal solution is found as shown in the following equation:
[0171]
[0172] S4.4, Based on the obtained optimal... and Value, construct and obtain the optimal process noise covariance matrix Q at time k. * (k), in the following specific form:
[0173]
[0174] S5. Repeat steps S3-S4 to perform the adaptive unscented Kalman filtering process to obtain the SOC estimate at each time step. It should be noted that during the filtering process, the state estimate, state covariance, and optimal process noise covariance matrix at the current time step are recursively updated by repeating steps S3-S4. Specifically, the posterior estimate of the state variables at the current time step (k) is... Posterior state covariance matrix P k|k and the optimal process noise covariance matrix Q * Information such as (k) is based on the posterior estimates of the state variables obtained in step S3 at the previous time (k-1), and the posterior state covariance matrix P. k-1|k-1 and the optimal process noise covariance matrix Q obtained in step S4 * The calculation is performed using information such as (k-1).
[0175] This step specifically includes:
[0176] S5.1 Obtain the posterior state estimation vector at time k. The first dimension is extracted from the vector and used as an estimate of the battery SOC at the current moment.
[0177] S5.2. The maximum number of iterations in the preset loop is set. The filtering process stops when the preset maximum number of iterations is reached or when the data flow stops.
[0178] The proposed method for estimating battery SOC using Kalman filtering with adaptive noise matrix adjustment solves the problem of inaccurate SOC estimation caused by mismatched battery model parameters in the actual operating conditions of existing energy storage power stations by establishing a battery state-space expression, using unscented Kalman filtering, and optimizing the process noise matrix. It can accurately estimate the battery SOC when there is a difference between the actual battery condition and the parameter values, providing data support for the safe and reliable operation and maintenance of energy storage power stations.
[0179] This embodiment selects an A123 26650 lithium iron phosphate battery and verifies the algorithm under actual operating conditions of an energy storage power station. Data from a high-precision current sensor is recorded to obtain an accurate initial State of Charge (SOC). The capacity is calculated using ampere-hour integration and used as a true reference value for SOC. The system input for algorithm verification is the current value measured by the current sensor at the energy storage power station, and the system measurement is the voltage value measured by the voltage sensor at the energy storage power station. Both a standard unscented Kalman filter algorithm and the algorithm proposed in this patent are used to estimate the battery SOC. The battery SOC is estimated using both the standard UKF algorithm and the algorithm proposed in this application (represented by Q-AUKF), and the estimation accuracy is shown in Table 1.
[0180] Table 1 Performance Indicators of Algorithm Model
[0181]
[0182] From Table 1 and Figure 4 It is known that UKF is a filtering estimation algorithm. Compared with the ordinary UKF algorithm, the SOC result of the Q-AUKF algorithm is closer to the true value. The maximum error of this application is 0.0239, the mean absolute error is 0.0084, and the mean percentage error is 0.0449. The maximum error of the existing UKF algorithm is 0.0365, the mean absolute error is 0.0209, and the mean percentage error is 0.1380. Therefore, the algorithm proposed in this patent has significant advantages, improving the accuracy of SOC estimation. This method can overcome the mismatch of battery model parameters and achieve high-precision SOC estimation under the operating conditions of energy storage power stations.
[0183] The above examples are numerical analyses of the patent protection content and are not intended to limit the present invention in any way. Any modifications, equivalent substitutions, improvements, etc., made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of the technical solution of the present invention.
Claims
1. A method for estimating battery SOC using Kalman filtering with adaptive adjustment of the noise matrix, characterized in that, Includes the following steps: S1. Construct a second-order equivalent model of the lithium battery based on the voltage and current characteristics during charging and discharging, and then discretize the model to obtain the state-space equation. S2. Initialize the unscented Kalman filter, determine the number of Sigma points, calculate the Sigma point set and determine the weights; S3. Unscented Kalman filtering state prediction, including calculating the prior estimate of the state variable, the estimate of the observed variable, the Kalman gain, the residual, and the posterior estimate of the state variable at each step of the filtering process; S4. Optimize the process noise matrix, including solving for the optimal process noise matrix in each filtering step by optimizing the cost function, balancing the oscillation and bias of the state estimation. S5. Repeat steps S3 to S4 to perform the adaptive unscented Kalman filtering process, and update the unscented Kalman filter state in real time to obtain the real-time SOC estimate.
2. The method for estimating battery SOC using Kalman filtering with adaptive noise matrix adjustment according to claim 1, characterized in that, Step S1 involves constructing a second-order equivalent model of the lithium battery and discretizing it to obtain the state-space equations, specifically including: S1.1 The state-space equations established based on the second-order equivalent model of a lithium battery are as follows: Where U1 is the voltage across R1, U2 is the voltage across R2, I is the battery current, η is the battery coulombic efficiency parameter, Q is the maximum usable battery capacity, and U oc The open-circuit voltage of the battery is represented, which has a non-linear relationship with the battery's state of charge (SOC). The ohmic internal resistance R0 characterizes the instantaneous voltage change of the battery. The two pairs of polarization resistors R1 and R2 and the polarization capacitors C1 and C2 are used to describe the polarization phenomenon of the battery. t0 represents the initial time point for SOC calculation, and t represents the current time. Let U1 be the derivative of U1 with respect to time. Let i(τ) represent the derivative of U2 with respect to time, and let i(τ) represent the battery current at time τ. S1.2 Discretize the state-space equations (1) and (2) to obtain the following equation: U t (k)=U oc (k)+R0I(k)+U1(k)+U2(k) (4) Where k represents the k-th sampling time, k-1 represents the (k-1)-th sampling time, T represents the sampling time interval; SOC(k) represents the state of charge of the battery at the k-th sampling time, U t (k) represents the k-th sampling time U t The values of U1(k) and U2(k) represent the value of U1 at the k-th sampling time, respectively. oc (k) represents the k-th sampling time U oc The value of I is given by I(k), which represents the value of I at the k-th sampling time. S1.
3. Obtain the parameter values of the discretized state-space equations using the offline parameter identification method.
3. The method for estimating battery SOC using Kalman filtering with adaptive noise matrix adjustment according to claim 2, characterized in that, Step S2 initializes the unscented Kalman filter, determines the number of Sigma points, calculates the Sigma point set, and determines the weights. Specifically, this includes: S2.1 Introducing process noise and measurement noise, the discretized battery state-space equation is described using a nonlinear time-varying system, as shown in the following formula: Where, x k For system state parameters, u k For system input, y k =U t (k) represents the system measurement, w k For process noise, v k To measure noise, f(x) k-1 u k h(x) is the state transition equation, used to represent the transition process from the state at time k-1 to the state at time k. k u k The equation is a measurement equation used to represent the relationship between the state at time k and the actual measurable output quantity. S2.2 Set system parameter values, including initial battery state value x0, initial state covariance matrix value P0, initial process noise matrix value Q0, and measurement noise matrix value R; S2.3 Determine the number of Sigma points and calculate the initial Sigma points, specifically including: Determine a center point and 2n discrete points around the center point, for a total of 2n+1 points, where n is the dimension of the state variables, and then calculate the initial Sigma point set; S2.4 Finally, calculate the weights corresponding to the Sigma points based on the Sigma point set.
4. The method for estimating battery SOC using Kalman filtering with adaptive noise matrix adjustment according to claim 3, characterized in that, Step S3 calculates the prior estimate of the state variable, the estimate of the observed variable, the Kalman gain, the residual, and the posterior estimate of the state variable at each filtering step; specifically: S3.1 Based on the posterior estimate of the state variables at time k-1 State covariance P k-1|k-1 Calculate the Sigma point set at that moment. The value; S3.2, Sigma point set Substituting into the state equation f(x) k-1 ,u k This allows us to obtain the state transition value of each sigma point at time k. Then, the prior estimates of the state variables are calculated, and the estimates are as follows: Among them, u k The control input current at time k, The prior estimates of the state variables are the transition values of 2n+1 states. Multiply by the corresponding mean weight The value obtained by summing; S3.3, Using the optimal process noise covariance matrix Q obtained at time k-1. * (k-1), based on the calculated prior estimates of the state variables The state transition value of the sigma point at time k Calculate the state prior error covariance matrix P xx,k|k-1 The formula is as follows: in, The values represent the covariance weights, and T represents the matrix transpose. S3.4 Using prior estimates of state variables and the state prior error covariance matrix P xx,k|k-1 Update Sigma point set S3.5, Set the Sigma point set Substitute into the measurement equation h(x) k u k This yields the observed transition value at time k for each sigma point. Then calculate the estimated values of the observed variables. Among them, u k The control input current at time k, The estimated value of the observed variable is obtained by taking 2n+1 observations. Multiply by the corresponding mean weight The value obtained by summing; S3.6 Calculate the observation error covariance matrix P based on the defined measurement noise matrix R. zz,k|k-1 ; S3.7 Based on the updated Sigma point set and prior estimates of state variables Observed transfer value Observed variable estimates Calculate the covariance matrix P xz,k|k-1 ; S3.8 Calculate the Kalman gain K at time k. k residual ε k posterior estimates of state variables and the posterior state covariance matrix P k|k .
5. The method for estimating battery SOC using Kalman filtering with adaptive noise matrix adjustment according to claim 4, characterized in that, In step S4, during each filtering process, the optimal process noise matrix Q is solved by optimizing the cost function to balance the oscillation and bias of the state estimation. * (k), specifically including: S4.1, due to the model state The dimension is 3, and the process noise matrix Q(k) at time k is represented in the following form: Wherein, q1(k), q2(k) and q3(k) reflect the noise characteristics related to the state variables SOC(k), U1(k) and U2(k) at time k, respectively. The goal is to obtain the most suitable values of q1(k), q2(k) and q3(k) so that the oscillations and biases of the three state estimates are minimized. S4.
2. Define the cost functions for q1(k), q2(k), and q3(k) as follows: J(q i (k))=δ i A(q i (k))+(1-δ i )B(q i (k)),i=1,2,3 (9) Where A(q) i (k) represents the oscillation, used to measure the difference between the state estimate and the reference smoothed value; B(q) i (k) represents the bias, used to measure the difference between the state estimate and the observed value; δ i It is the weighting coefficient, the equilibrium oscillation A(q) i (k)) and deviation B(q) i The contribution of (k) to the cost function has a range of [0,1]. S4.
3. Minimize the cost function using the grid solution method to obtain the optimal value at time k. and The solution formula is as follows: S4.4, Based on the obtained optimal... and Value, construct and obtain the optimal process noise covariance matrix Q at time k. * (k), in the following specific form:
6. The method for estimating battery SOC using Kalman filtering with adaptive noise matrix adjustment according to claim 5, characterized in that, Step S4.3 uses a grid-based solution method to minimize the cost function, specifically including: For q i Set the interval range q i ∈[q imin q imax ], i = 1, 2, 3; For the interval [q imin q imax ], with step size Δq i It is decomposed into several discrete values, forming a grid; q i =q imin +m·Δq i Where m = 0, 1, 2, ..., N; By using a grid search method, traversing the entire search interval, the globally optimal solution is found as shown in the following equation:
7. The method for estimating battery SOC using Kalman filtering with adaptive noise matrix adjustment according to claim 6, characterized in that, Step 5 involves iteratively executing the adaptive unscented Kalman filtering process from steps S3 to S4 to obtain the SOC estimate at each time step, specifically including: S5.1 Obtain the posterior state estimation vector at time k. The first dimension is extracted from the vector and used as an estimate of the battery SOC at the current moment. S5.
2. The maximum number of iterations in the preset loop is set. The filtering process stops when the preset maximum number of iterations is reached or when the data flow stops.