Battery charge state estimation method
Through the weighted multi-innovation adaptive unscented Kalman filter algorithm and the multi-time scale recursive least squares method with forgetting factors, combined with the equivalent potential model, the problem of accuracy and large calculation amount of lithium battery state of charge estimation is solved, and the implementation It achieves high-precision and low-computation SOC estimation.
Patent Information
- Application Number
- CN202410648726.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-10-18
AI Technical Summary
Existing lithium battery state-of-charge estimation methods have problems such as low accuracy and large amount of calculation. In particular, model-based methods have defects in parameter matching and filtering algorithms, making it difficult to achieve high-precision SOC estimation.
The weighted multi-innovation adaptive unscented Kalman filter algorithm is used, combined with the multi-time scale recursive least squares method with forgetting factors to identify battery parameters online, and the equivalent potential model is used to fit the OCV-SOC function to achieve the battery state of charge. high-precision estimation.
It achieves high-precision estimation of the state of charge of lithium batteries, has a small amount of calculation, can adapt to changes in battery parameters, and improves the accuracy and robustness of SOC estimation.
Smart Images

Figure CN118795344A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of lithium batteries, and specifically relates to a battery state of charge estimation method based on weighted multi-information adaptive unscented Kalman filtering (WMIAUKF), which is suitable for battery state of charge estimation of LFP (lithium iron phosphate) batteries and other types of lithium batteries. Background Art
[0002] As environmental problems become increasingly serious, people are paying more and more attention to the consumption of traditional energy and environmental pollution. As a clean energy, renewable energy has received widespread attention and support, promoting the rapid development of the new energy industry. Lithium batteries have been widely used in the new energy industry due to their advantages such as high energy density, low self-discharge rate, environmental protection, and long life. The SOC (state of charge) of a lithium battery refers to the ratio of the remaining power to the total power, which has guiding significance for the use and management of the battery. Lithium battery SOC estimation is an important function in the battery management system (BMS), which estimates the battery state of charge by monitoring battery voltage, current, temperature and other parameters.
[0003] There are four main existing SOC estimation methods: open circuit voltage method, ampere-hour integration method, model-based method, and data-driven method. The open circuit voltage method is simple, but it requires a long period of static state to obtain the open circuit voltage and cannot be used in practice. The ampere-hour integration method is widely used, but there are cumulative errors. The data-driven method requires a large amount of data training, and different models of batteries need to be retrained. The model-based method has higher accuracy and is more interpretable.
[0004] At present, the model-based methods mainly involve battery model establishment, model parameter identification and filtering algorithms. Battery models include equivalent circuit models, electrochemical models, etc. Parameter identification is divided into offline parameter identification and online parameter identification. Offline parameter identification uses intelligent algorithms such as genetic algorithms and particle swarm algorithms. Online identification includes least squares-based methods and filtering methods. The filtering algorithms include extended Kalman filtering (EKF), cubature Kalman filtering (CKF), and unscented Kalman filtering (UKF). Specifically, Kalman filtering is based on the SOC value and current measurement value at the previous moment, uses ampere-hour integration to calculate the SOC estimate, calculates the model terminal voltage based on the model, and then corrects the SOC estimate based on the difference between the model terminal voltage and the voltage measurement value. This method has high estimation accuracy.
[0005] Among them, existing model-based methods mostly use offline parameter identification and Kalman filtering methods to estimate battery SOC, which has the disadvantages of parameter mismatch and insufficient SOC estimation accuracy. Summary of the invention
[0006] The object of the present invention is to provide a battery state of charge estimation method to achieve high-precision estimation of the battery state of charge with less calculation complexity.
[0007] In order to achieve the above object, the present invention provides a battery state of charge estimation method, characterized by comprising:
[0008] Step S1: acquiring current and voltage data of the battery to be tested under UDDS working conditions, obtaining a first set of current and voltage data and a second set of current and voltage data, and establishing a circuit model of the battery and a corresponding state space expression;
[0009] Step S2: according to the first set of current and voltage data, the open circuit voltage is identified by using the recursive least square method with a forgetting factor, and the reference battery state of charge is determined; the open circuit voltage and the reference battery state of charge are used to fit the open circuit voltage-battery state of charge function;
[0010] Step S3: Based on the second set of current and voltage data, a multi-time scale recursive least square method with a forgetting factor is used to online identify battery parameters, where the battery parameters include ohmic internal resistance, polarization internal resistance and time constant;
[0011] Step S4: Based on the state space expression established in step S1 and the battery parameters identified in step S3, a weighted multi-innovation unscented Kalman filter algorithm is used to estimate the battery state of charge for the second set of current and voltage data, and the time window size of the innovation is changed, and the optimal time window size is selected according to the estimation accuracy of the battery state of charge;
[0012] Step S5: Based on the state space expression established in step S1 and the battery parameters identified in step S3, the time window size determined in step S4 is set, and a weighted multi-innovation adaptive unscented Kalman filter algorithm is used to estimate the battery state of charge of the battery to be tested.
[0013] The state space expression includes a state equation and an observation equation, and the formula term of the observation equation includes at least the open circuit voltage.
[0014] The identification time interval of step S2 is 1 second, and the identification time interval of step S3 is 30 seconds.
[0015] In step S2, the open circuit voltage is identified by using a recursive least square method with a forgetting factor, which specifically includes:
[0016] Step S21: Based on the state space expression of the battery circuit model, the battery terminal voltage U at time k is established with the open circuit voltage as part of the parameter to be identified. k An expression in the form of a regression model of ;
[0017] Step S22: the data of each sampling moment in the first set of current and voltage data arrives in sequence. When the data of each sampling moment arrives, the gain vector K is calculated using the formula of the recursive least square method with a forgetting factor, and then the parameter θ to be identified and the covariance matrix P are updated;
[0018] Step S23: After the sampling data processing is completed, the parameters identified at all sampling moments are counted to obtain an OCV sequence.
[0019] In step S21, the battery terminal voltage U at time k is established. k The regression model form of is expressed as:
[0020]
[0021] Where θ1 is equal to OCV k , OCV k is the open circuit voltage at time k, θ2 is equal to R0+R1, R0 is the internal resistance, R1 is the polarization internal resistance, θ3 is equal to τ1, τ1 is the time constant, τ1=R1C1, C1 is the polarization capacitance, θ4 is equal to τ1R0, θ k is the parameter to be identified at time k, is the input value at time k, U k represents the battery terminal voltage at time k, U k-1 is the polarization voltage at time k-1, I k is the current at time k, T is the sampling time interval;
[0022] In step S22, the formula of the recursive least square method with forgetting factor is:
[0023]
[0024] In the formula, k represents the time sequence number, K k is the gain at time k, P k is the covariance matrix of the state estimate at time k, μ is the forgetting factor, and I is the identity matrix.
[0025] The battery state refers to the state of charge;
[0026] In step S1, the discretized state space expression of the first-order equivalent circuit model is obtained by combining the circuit model of the battery and the ampere-hour integral calculation formula of the state of charge as follows:
[0027]
[0028] The first equation of the above discretized state space expression is the state equation, and the second equation is the observation equation;
[0029] In step S2, a reference state of charge is obtained using the ampere-hour integral calculation formula according to the first set of current and voltage data, and then an open circuit voltage-state of charge function is obtained by fitting the equivalent potential model based on the identified open circuit voltage and the reference state of charge calculated by the ampere-hour integral.
[0030] The step S4 specifically includes:
[0031] Step S41: Set the initial value of the state variable Set the initial value of the Kalman filter covariance matrix and the initial value of the state variable As the posterior estimate of the state at time 0;
[0032] Step S42: Construct the first type sigma point at time k-1 according to the state posterior estimate at time k-1 and weights;
[0033] Step S43: According to the first type of sigma point at time k-1 and weights, and determine the state prior estimate at time k based on the state equation of the state space expression And determine the prior estimate of the covariance matrix P k / k-1 ;
[0034] Step S44: Based on the prior estimate of the state at time k To construct the second type of sigma point at time k According to the second type of sigma point at time k and the observation equation of the state space expression to determine the corresponding observed value prediction and the observed value estimate
[0035] Step S45: Predict the value based on the observed value at time k and the observed value estimate Determine the observation equation autocorrelation matrix P yy,k , according to the prior estimate of the state at time k The second type of sigma point Observed value predicted value and the observed value estimate Determine the covariance matrix P of the state variables and the observed quantities xy,k ;
[0036] Step S46: Covariance matrix P of state variables and observations xy,k Divide by the observation equation autocorrelation matrix P yy,k , get the Kalman gain K k ;
[0037] Step S47: Subtract the estimated value of the observation at time k from the estimated value of the observation as the estimated error e of the observation at time k k , using the estimated error of the observation at each moment as a single new information to expand the new information matrix E L , and calculate the weight matrix W of the new information e,L , W t,L , to construct a weighted multi-innovation matrix;
[0038] Step S48: According to the Kalman gain K k The state and variance matrix are updated with the new information and the process returns to step S42 until all time stamps are traversed. At this time, the estimated result and error of SOC are obtained according to the state variables.
[0039] Step S49: modify the value of the time window size L of the new information, and return to step S41 to obtain the estimation results and errors of the SOC under different time window sizes L.
[0040] The time window size chosen is 5.
[0041] In step S5, the weighted multi-innovation adaptive unscented Kalman filter algorithm further adaptively updates the process noise covariance matrix Q and the observation noise covariance matrix R based on the weighted multi-innovation unscented Kalman filter in step S4.
[0042] (1) The battery state of charge estimation method of the present invention uses the recursive least squares method to identify OCV online, and the equivalent potential model fitting function obtains the OCV-battery state of charge relationship.
[0043] (2) The battery state of charge estimation method of the present invention is based on a first-order equivalent circuit model, and adopts a multi-time scale recursive least squares method to identify model parameters online. The model parameters obtained by macroscopic scale identification are used in the WMIAUKF algorithm to estimate the battery state of charge of the lithium battery at the microscopic scale, and the amount of calculation is relatively small.
[0044] (3) The WMIAUKF algorithm proposed in the battery state of charge estimation method of the present invention improves the UKF, uses new information from multiple time points, and calculates its weight according to the size of the new information and the sequence of time points, so as to more reasonably use more new information, and then combine it with the adaptive method to update the process noise covariance matrix Q and the measurement noise covariance matrix R, thereby achieving high-precision estimation of the battery state of charge in any interval.
[0045] In summary, the battery state of charge estimation method of the present invention adopts the multi-time scale recursive least squares method with forgetting factor (MFFRLS) to online identify model parameters in view of the characteristic of slow parameter changes; in addition, the UKF is improved, combined with the multi-innovation theory and adaptive method, and the lithium battery SOC is estimated by weighted multi-innovation adaptive unscented Kalman filter (WMIAUKF), which can achieve high-precision estimation of the battery state of charge with less calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is a flow chart of a battery state of charge estimation method according to an embodiment of the present invention.
[0047] Figure 2 Yes Figure 1 Circuit diagram of the first-order equivalent circuit model selected for the battery state of charge estimation method shown.
[0048] Figure 3 This is the OCV-SOC curve obtained by fitting.
[0049] Figure 4 It is the estimation error diagram of SOC under different time window sizes.
[0050] Figure 5 It is a comparison chart of the SOC estimation results of the battery state of charge estimation method of the present invention, the UKF method, and the WMIUKF method.
[0051] Figure 6 It is a comparison diagram of the SOC error results of the battery state of charge estimation method of the present invention, the UKF method, and the WMIUKF method. DETAILED DESCRIPTION
[0052] The present invention is further described below in conjunction with specific examples. It should be understood that the following examples are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0053] The battery state of charge estimation method of the present invention is used to achieve high-precision estimation of the battery state of charge with a small amount of calculation. The battery state of charge estimation method is mainly used to accurately estimate the state of charge (SOC) of the battery. In addition to being used for accurate SOC estimation, it can also be used for other battery state estimations based on the SOC estimation results, such as health state (SOH), power state (SOP), etc., which plays an important role in battery use, preventing overcharging and over-discharging, and extending battery life. The battery state of charge estimation method of the present invention is specifically based on a combination of a multi-time scale recursive least squares method (MFFRLS) and a weighted multi-information adaptive unscented Kalman filter (WMIAUKF).
[0054] If SOH is estimated, two Kalman filters are generally used for joint estimation, one to estimate SOC (the state variables are SOC and U1), and one to estimate SOH (the state variable is capacity), or SOH is directly calculated based on the estimated SOC. The SOP estimate is calculated based on the estimated SOC result, the model terminal voltage result, and the current constraint. The parameters that need to be identified for the three estimates are the same, which are all parameters of the battery model.
[0055] like Figure 1 As shown, according to one embodiment of the present invention, the battery state of charge estimation method is used to estimate the battery SOC, which includes the following steps:
[0056] Step S1: obtaining the current and voltage data of the battery to be tested under the UDDS (urban road cycle) working condition, obtaining a first set of current and voltage data and a second set of current and voltage data, and establishing a circuit model of the battery and a corresponding state space expression;
[0057] Under the UDDS working condition, the current size is given by the UDDS test condition, that is, the current excitation is set to charge and discharge the battery, and the voltage is measured by the battery test platform.
[0058] It should be noted that in the present invention, it is necessary to obtain two sets of current and voltage data under UDDS conditions for the same battery to be tested. Since estimating SOC requires obtaining the functional relationship between OCV and SOC, and this functional relationship is obtained through battery testing, the present invention uses the first set of current and voltage data in the current and voltage data measured under UDDS conditions to identify OCV (open circuit voltage), and then fits the OCV-SOC function. The second set of current and voltage data in the current and voltage data measured under UDDS conditions for the second time is used to verify the proposed SOC estimation method, that is, the second set of current and voltage data is used to estimate SOC. Among them, the first set of current and voltage data and the second set of current and voltage data can be measured twice, for example, the second set of current and voltage data can be measured before step S3.
[0059] In subsequent steps S2 and S3, the identification time interval of the second set of current and voltage data is greater than the identification time interval of the first set of current and voltage data. In this embodiment, the identification time interval of the first set of current and voltage data is consistent with the sampling time interval, both of which are 1s, and the identification time interval of the second set of current and voltage data is 30s.
[0060] In this embodiment, a first-order equivalent circuit model is selected as the circuit model of the battery.
[0061] The selected first-order equivalent circuit model is as follows: Figure 2As shown, U represents the battery terminal voltage, OCV is the open circuit voltage, R0 is the internal resistance, U1 is the polarization voltage, R1 is the polarization internal resistance, C1 is the polarization capacitance, and I is the current.
[0062] In this embodiment, since the battery state refers to the battery SOC (state of charge), the discretized state space expression of the first-order equivalent circuit model is obtained by combining the battery circuit model (i.e., the first-order equivalent circuit model) and the ampere-hour integral calculation formula of the SOC as follows:
[0063]
[0064] The first equation of the above discretized state space expression is the state equation, and the second equation is the observation equation.
[0065] Wherein, subscript k represents time k; η is the Coulomb efficiency, which is taken as 1 in the present invention; T is the sampling time interval, which is set to 1s in the experiment; Q cap is the battery capacity, obtained from the capacity test; SOC k is the SOC at time k, U k represents the battery terminal voltage at time k, U 1,k is the polarization voltage at time k, τ 1,k is the time constant at time k, τ 1,k =R 1,k C 1,k , C 1,k is the polarized capacitance at time k, R 0,k is the internal resistance at time k, R 1,k is the polarization internal resistance at time k, I k is the current at time k; OCV(SOC k ) represents the open circuit voltage-state of charge function when SOC is SOC k The function value at time , that is, the OCV value at time k.
[0066] In this embodiment, OCV changes with SOC. When the battery power is high, OCV is also high, and when the battery power is low, OCV is low. For example, when the current I is positive during charging, the SOC will increase compared to the previous moment, and the OCV will also increase. Since OCV (open circuit voltage) changes with SOC (state of charge), there is a functional relationship between OCV and SOC. The equivalent potential model is used to fit the open circuit voltage-state of charge function.
[0067] In other embodiments, the state space expression includes a state equation and an observation equation, and the formula term of the observation equation includes at least the open circuit voltage.
[0068] Step S2: according to the first set of current and voltage data, the open circuit voltage is identified by using the recursive least square method with forgetting factor (FFRLS), and the reference battery state of charge is determined; the open circuit voltage and the reference battery state of charge are used to fit to obtain the open circuit voltage-battery state of charge function;
[0069] The OCV (open circuit voltage) under UDDS working condition is identified by using the recursive least squares method with forgetting factor (FFRLS). The principle is as follows:
[0070] Since the change of OCV at each moment is very small, assuming that the change of OCV at each moment is approximately equal to 0, the state space expression of the circuit model obtained previously is discretized in the time domain, and the battery terminal voltage U at time k can be obtained. k The discretized expression of .
[0071] The battery terminal voltage U at time k k The discretized expression of is:
[0072]
[0073] In the formula, the subscript k represents the kth moment, U k represents the battery terminal voltage at time k, U k-1 is the polarization voltage at time k-1, OCV k Indicates the open circuit voltage, I k is the current at time k, R0 is the internal resistance, R1 is the polarization internal resistance, τ1 is the time constant, τ1=R1C1, C1 is the polarization capacitance, and T is the sampling time interval.
[0074] Then, the battery terminal voltage U at time k k The discretized expression can be converted into the battery terminal voltage U at time k k The expression in the form of a regression model.
[0075] The battery terminal voltage U at time k k The regression model form of is expressed as:
[0076]
[0077] Where θ1 is equal to OCV k , OCV k is the open circuit voltage at time k, θ2 is equal to R0+R1, R0 is the internal resistance, R1 is the polarization internal resistance, θ3 is equal to τ1, τ1 is the time constant, τ1=R1C1, C1 is the polarization capacitance, θ4 is equal to τ1R0, θ k is the parameter to be identified at time k, is the input value at time k, which is calculated from the voltage and current at time k.
[0078] Based on the battery terminal voltage U at time k above k The regression model form of the expression, we can use the recursive least squares method with forgetting factor (FFRLS) to identify the parameters to identify the OCV.
[0079] The formula of the recursive least squares method with forgetting factor (FFRLS) is as follows:
[0080]
[0081] In the formula, k represents the time sequence number, K k is the gain at time k, P k is the covariance matrix of the state estimate at time k, μ is the forgetting factor, and I is the identity matrix. The forgetting factor μ controls the weight of historical data and is usually between 0 and 1. A larger μ value means more forgetting, that is, more emphasis on new data, while a smaller μ value means less forgetting, that is, a smoother update process.
[0082] Therefore, in step S2, the open circuit voltage is identified by using the recursive least square method with forgetting factor (FFRLS), which specifically includes:
[0083] Step S21: Based on the state space expression of the battery circuit model, the battery terminal voltage U at time k is established with the open circuit voltage as part of the parameter to be identified. k An expression in the form of a regression model of ;
[0084] Among them, the battery terminal voltage U at time k is established k The regression model form of is as described above.
[0085] Step S22: the data of each sampling moment in the first set of current and voltage data arrives in sequence. When the data of each sampling moment arrives, the gain vector K is calculated using the formula of the recursive least square method with forgetting factor (FFRLS), and then the parameter to be identified θ and the covariance matrix P of the state estimation are updated;
[0086] Among them, the formula of the recursive least squares method with forgetting factor (FFRLS) is as described above.
[0087] Step S23: After the sampling data processing is completed, the parameters identified at all sampling moments are counted to obtain an OCV sequence.
[0088] In step S22, by using the recursive least square method with forgetting factor (FFRLS), the input value at each sampling moment is obtained when the current and voltage data arrive at the moment, the gain vector K is calculated first, and then the parameter θ to be identified and the covariance matrix P of the state estimation are updated. There is no order in which the parameter θ to be identified and the covariance matrix P of the state estimation are updated. The input value refers to the voltage U and the current I. For example, the voltage U and the current I of the 1st second are input. After obtaining the voltage and current data, the input value at the kth moment is Update, first calculate the gain vector K, then update the parameter to be identified θ and the covariance matrix P of the state estimation, and then input the voltage U and current I at the 2nd second, the input value at time k Update, recalculate the gain vector K, update the parameter θ to be identified and the covariance matrix P of the state estimation. In step S23, recurse until the end of time, and an OCV sequence can be statistically obtained.
[0089] In the present embodiment, the reference battery state of charge refers to the reference SOC. Therefore, in the step S2, the reference SOC is obtained by using the ampere-hour integral calculation formula according to the first set of current and voltage data, and then the OCV-SOC function is obtained by fitting the equivalent potential model based on the identified open circuit voltage (OCV) and the reference SOC calculated by the ampere-hour integral, that is, the OCV-SOC relationship is obtained.
[0090] The ampere-hour integral calculation formula is:
[0091]
[0092] The discretized ampere-hour integral calculation formula is:
[0093]
[0094] In the formula, the Coulomb efficiency η is equal to 1, the sampling time interval T is 1s, and Q cap is the battery capacity, which will not change in a short time and is also a constant value.
[0095] Therefore, as long as the initial SOC, voltage and current at each moment are known, the reference SOC can be calculated recursively.
[0096] The expression of the fitted OCV-SOC function is as follows:
[0097]
[0098] Among them, a, b, c, d, e, f are the parameters to be fitted, n i 、n j 、n l is the number of general terms. The OCV-SOC curve obtained by fitting is as follows Figure 3 shown.
[0099] Step S3: Based on the second set of current and voltage data, a multi-time scale recursive least square method with forgetting factor (MFFRLS) is used to online identify battery parameters, where the battery parameters include ohmic internal resistance R0, polarization internal resistance R1 and time constant τ1;
[0100] The step S3 adopts the formula of the recursive least squares method with forgetting factor (FFRLS) mentioned in the step S2, but because the identification time interval (30s) of the second set of current and voltage data is greater than the identification time interval (1s) of the first set of current and voltage data, the step S3 does not identify every 1s, but once every 30s, that is, when the timestamp is a multiple of 30, the parameters are updated once, and the parameters of the previous moment are maintained at other times.
[0101] It should be noted that the identification of step S2 is to obtain the relationship between OCV and SOC, which is a prerequisite for SOC estimation. Although OCV and other parameters are obtained, only OCV is used to fit the functional relationship. The online identification of step S3 is to obtain the ohmic internal resistance R0, polarization internal resistance R1, and time constant τ1 in the state equation, and can also identify OCV, but this OCV is not used in the SOC estimation of the subsequent steps.
[0102] Therefore, there are three differences between the parameter identification of step S2 and step S3: (1) The data sources are different. The data source of the parameter identification of step S2 is the first set of current and voltage data under the UDDS working condition, and the data source of the parameter identification of step S3 is the second set of current and voltage data; (2) The time scale is different. The identification time interval of step S2 is equal to the sampling time interval, which is 1s. Therefore, the parameters are updated once every second in order to obtain more OCV data fitting curves; the identification time interval of step S3 is 30s, and the parameters are updated every 30s in order to reduce the amount of calculation. (3) The parameters are obtained differently. Step S2 is to obtain the value of OCV, and step S3 is to obtain the ohmic internal resistance R0, polarization internal resistance R1 and time constant τ1.
[0103] It should be noted that although step S2 calculates the other three parameters, ohmic internal resistance R0, polarization internal resistance R1 and time constant τ1, while obtaining the OCV value, step S2 cannot be directly used as the identification result of step S3. The reason is that step S2 is to obtain a complete OCV curve from 100% SOC discharge to 0%, while the starting SOC and the end SOC are not fixed in step S3, and the discharge time of the two does not match, and the parameters taken every 30 seconds cannot correspond. Moreover, the recursive least squares method (FFRLS) of the forgetting factor in step S3 itself is an online parameter identification method, which can better cope with parameter changes, while the method of taking values in step S2 is more similar to offline parameter identification (fitting the relationship between parameters and SOC, and then using it in the model).
[0104] Since the change of battery parameters is a slow process, it is not necessary to identify the battery parameters at every moment. Setting a large time scale to identify the parameters can reduce the amount of calculation. The time scale Ls=30s of the second set of current and voltage data set in the present invention, so the battery parameters are identified every 30s, and then the battery parameters are maintained until the next identification.
[0105] Step S4: Based on the state space expression established in step S1 and the battery parameters identified in step S3, a weighted multi-information unscented Kalman filter algorithm is used to estimate the battery state of charge for the second set of current and voltage data, and the time window size of the innovation is changed, and the optimal time window size is selected according to the estimation accuracy of the battery state of charge.
[0106] Since the present invention needs to estimate the battery state of charge (SOC), in the weighted multi-innovation unscented Kalman filter algorithm, the state variable x at least includes SOC. k represents the state variable at time k, but the state variable is unmeasurable, so we use Represents the prior estimate of the state at time k, which is predicted by the state equation in the state space expression and the posterior estimate of the state at the previous time. Represents the posterior estimate of the state at time k, which is obtained by fusing the prior estimate of the state with the latest measurement data.
[0107] Accordingly, the step S4 specifically includes:
[0108] Step S41: Algorithm initialization, including: setting the initial value of the state variable (The state variables include the initial values of SOC and polarization voltage U1, also called the state matrix), set the initial value of the Kalman filter covariance matrix (including the initial value P0 of the state estimation covariance matrix, the initial value Q0 of the process noise covariance matrix, and the initial value R0 of the observation noise covariance matrix), and set the initial value of the state variables As the posterior estimate of the state at time 0.
[0109] The initial value P0 of the covariance matrix of state estimation, the initial value Q0 of the covariance matrix of process noise, and the initial value R0 of the covariance matrix of observation noise are set based on experience. In this embodiment, the initial value P0 of the covariance matrix of state estimation, the initial value Q0 of the covariance matrix of process noise, and the initial value R0 of the covariance matrix of observation noise are:
[0110]
[0111] Step S42: Construct the first type sigma point at time k-1 according to the state posterior estimate at time k-1 and weights;
[0112] The i-th first-kind sigma point at time k-1 for:
[0113]
[0114] In the formula, is the i-th first-class sigma point at time k-1, i represents the ordinal number of the sigma point, represents the state posterior estimate at time k-1 (i.e., the mean point), P k-1 is the covariance matrix of the state estimation at time k-1, the subscripts i and in represent the i-th column and in-th column of the matrix in the previous brackets, λ is the scale scaling parameter, and n is the state quantity dimension of the sigma point. The first type of sigma point of the present invention has two state quantities, SOC and polarization voltage, n = 2, then i = 0, 1, ..., 4, so there are 5 first type sigma points.
[0115] The weight of the i-th first-class sigma point includes the mean weight and covariance weights
[0116] Mean Weight and covariance weights for:
[0117]
[0118] In the formula, is the mean weight of the i-th sigma point, is the covariance weight of the i-th sigma point, α and β are constants. Adjusting α can control the distance between the sigma point and the mean point. β is generally 2 in Gaussian distribution.
[0119] The Unscented Kalman Filter (UKF) approximates the distribution of the system state by selecting a set of first-class sigma points. These first-class sigma points are selected as the mean point around the current state and the points obtained by translating and scaling the covariance matrix of the current state. The mean point is a weighted average of the first-class sigma points and is usually used to approximate the mean state of the system.
[0120] Step S43: According to the first type of sigma point at time k-1 and weights, and determine the state prior estimate at time k based on the state equation of the state space expression And determine the prior estimate of the covariance matrix P k / k-1 ;
[0121]
[0122] In the formula, represents the one-step prediction value of the i-th first-category sigma point, represents the prior estimate of the state at time k, that is, the one-step prediction result of the state variable; P k / k-1 Represents the prior estimate of the covariance matrix at time k, that is, the prediction result of the state variable The covariance matrix of is the i-th first-class sigma point at time k-1, u k-1 is the current excitation at time k-1, i.e., the system input, is a nonlinear function, that is, the state equation in the state space expression, is the mean weight of the i-th first-class sigma point, is the covariance weight of the i-th first-class sigma point, Q k represents the process noise covariance matrix at time k.
[0123] Step S44: Based on the prior estimate of the state at time k To construct the second type of sigma point at time k According to the second type of sigma point at time k and the observation equation of the state space expression to determine the corresponding observed value prediction and the observed value estimate
[0124] in, Represents the second type of sigma point at time k, which is the prior estimate of the state calculated previously The same construction method as step S42 is performed to obtain the second type of sigma point
[0125] In the present invention, the second type of sigma point has the same state quantity dimension n and weight as the first type of sigma point, so there is no need to calculate the weight again.
[0126] Among them, the estimated value of the observation for:
[0127]
[0128] represents the estimated value of the observed quantity, represents the second type sigma point at time k, i represents the ordinal number of the sigma point, u k represents the current excitation at time k, Represents the observation equation, which is a nonlinear function. is the observed value prediction, which is the second type of sigma point Calculated by the observation equation, is the estimated value of the observation obtained by weighted summation of all observation prediction values. is the mean weight.
[0129] Step S45: Predict the value based on the observed value at time k and the observed value estimate Determine the observation equation autocorrelation matrix P yy,k , according to the prior estimate of the state at time k The second type of sigma point Observed value predicted value and the observed value estimate Determine the covariance matrix P of the state variables and the observed quantities xy,k ;
[0130]
[0131] Among them, P yy,k represents the autocorrelation matrix of the observation equation, P xy,k represents the covariance matrix of state variables and observations, represents the covariance weight, represents the predicted value of the observed value at time k, represents the estimated value of the observation at time k, represents the second type sigma point at time k, represents the prior estimate of the state at time k, R k represents the measurement noise covariance matrix at time k.
[0132] Step S46: Covariance matrix P of state variables and observations xy,k Divide by the observation equation autocorrelation matrix P yy,k , get the Kalman gain K k ;
[0133] That is, the Kalman gain K k for:
[0134] K k =P xy,k / P yy,k .
[0135] Step S47: Subtract the estimated value of the observation at time k from the estimated value of the observation as the estimated error e of the observation at time k k , using the estimated error of the observation at each moment as a single new information to expand the new information matrix E L , and calculate the weight matrix W of the new information e,L , W t,L , to construct a weighted multi-innovation matrix.
[0136] Among them, the innovation matrix E L Multiply by the weight matrix W e,L , W t,L The following is the weighted multi-innovation matrix W e,L W t,L E L .
[0137] Innovation matrix E L for:
[0138]
[0139] Among them, e k represents the estimation error of the observation at time k, which is a single new information, y k is the measured value at time k, that is, the terminal voltage at time k, represents the estimated value of the observation at time k, E L is the new information matrix, also called the error matrix, and L is the time window size of the new information, that is, the dimension of the new information matrix.
[0140] The weight matrix W of the innovation e,L , W t,L According to the error distribution and time distribution of the new information, we can calculate:
[0141]
[0142] Among them, w e,i represents the weight calculated based on the error distribution of the new information. If the moment with larger error requires more correction, a larger weight will be assigned. t,i W represents the weight calculated based on the time distribution of the new information. It is believed that the error closer to the current time has more reference value and is assigned a larger weight. e,L represents the weight matrix calculated based on the error distribution of the new information; W t,L Represents the weight matrix calculated based on the time distribution of the new information.
[0143] Therefore, the weight matrix W of the new information e,L , W t,L Be able to make more reasonable use of new information.
[0144] Step S48: According to the Kalman gain K k The state and variance matrix are updated with the new information and the process returns to step S42 until all time stamps are traversed. At this time, the estimated result and error of SOC are obtained according to the state variables.
[0145] In this embodiment, in the first 100 seconds, a single new information is used to update the state and the variance matrix to obtain the state posterior estimate at time k And the covariance matrix P of the state estimate at time kk .
[0146] The posterior estimate of the state at time k And the covariance matrix P of the state estimate at time k k The update formula is as follows:
[0147]
[0148] in, represents the state prior value at time k, P k / k-1 represents the prior estimate of the covariance matrix at time k, y k is the measured value at time k, represents the estimated value of the observation at time k, K k represents the Kalman gain, P yy,k represents the observation equation autocorrelation matrix.
[0149] After 100s, multiple new information is used, and the Kalman gain K k Expand to get the Kalman gain matrix K L , update the state and variance matrix.
[0150] By Kalman gain K k The expanded Kalman gain matrix K L for:
[0151] K L =[K k K k-1 …K k-L+1 ].
[0152] The formulas for state update and variance matrix update are as follows:
[0153]
[0154] Step S49: modify the value of the time window size L of the new information, and return to step S41 to obtain the estimation results and errors of the SOC under different time window sizes L.
[0155] The SOC estimation error under different time window sizes L is as follows: Figure 4 As shown, Figure 4 The lines of different colors in represent different time window sizes. Figure 4 It can be seen that as the time window size L increases, the SOC estimation error gradually decreases. When the time window size L is 5 or 6, the error is close and the effect is the best. When the time window size L exceeds 6, the error becomes larger because too much new information is introduced. The present invention selects the time window size L to be 5.
[0156] Step S5: Based on the state space expression established in step S1 and the battery parameters identified in step S3, the time window size determined in step S4 is set, and a weighted multi-innovation adaptive unscented Kalman filter algorithm is used to estimate the battery state of charge of the battery to be tested.
[0157] Among them, since step S3 identifies the battery parameters according to the identification time interval, the battery parameters in step S5 are updated according to the identification time interval. For example, step S3 identifies the battery parameters every 30 seconds, and the battery parameters in step S5 are also updated every 30 seconds, that is, one set of battery parameters is used for 1-30 seconds, and one set of battery parameters is used for 31-60 seconds..., and the battery parameters are continuously updated.
[0158] After determining the appropriate time window size L in step S4, both the weighted multi-innovation unscented Kalman filter algorithm and the weighted multi-innovation adaptive unscented Kalman filter algorithm fix the window size to 5. The difference is that the process noise covariance matrix Q and the observation noise covariance matrix R of the weighted multi-innovation adaptive unscented Kalman filter algorithm will be adaptively updated.
[0159] Compared with the weighted multi-information adaptive unscented Kalman filter algorithm of step S4, the weighted multi-information adaptive unscented Kalman filter algorithm of step S5 adapts to the dynamic changes of the system by adaptively updating the process noise covariance matrix Q and the measurement noise covariance matrix R. The advantage of doing so is that the filter can respond to changes in system noise and measurement noise more flexibly, thereby improving the performance and robustness of the filter. The process noise covariance matrix Q and the observation noise covariance matrix R in the weighted multi-information adaptive unscented Kalman filter algorithm in step S4 are set to fixed values. The process noise covariance matrix Q and the observation noise covariance matrix R in the weighted multi-information adaptive unscented Kalman filter algorithm in step S5 will be updated at each time step.
[0160] In step S5, since the weighted multi-innovation adaptive unscented Kalman filter algorithm is adopted, the weighted multi-innovation adaptive unscented Kalman filter algorithm also adaptively updates the process noise covariance matrix Q and the observation noise covariance matrix R based on the weighted multi-innovation unscented Kalman filter in step S4.
[0161] The formulas for the process noise covariance matrix Q and the observation noise covariance matrix R are as follows:
[0162]
[0163] In the formula, K L is the Kalman gain matrix, E L is the error matrix, represents the covariance weight, represents the predicted value of the observed value at time k, Represents the estimated value of the observation at time k.
[0164] That is, step S5 updates Q and R at each time step, which are then used in the weighted multi-innovation unscented Kalman filter algorithm (ie, step S43 and step S45 of step S4).
[0165] Experimental results:
[0166] To verify the effectiveness of the method, the same initial value is set, and the unscented Kalman filter (UKF), the weighted multi-innovation unscented Kalman filter (WMIUKF), and the battery state of charge estimation method based on the weighted multi-innovation adaptive unscented Kalman filter (WMIAUKF) of the present invention are used to estimate the SOC. The initial value setting of the state and the initial value setting of the Kalman filter matrix are the same. The estimated results of the SOC are as follows: Figure 5 As shown, the error result is Figure 6 As shown. It can be found that the weighted multi-innovation method can effectively reduce the estimation error, and the adaptive method further reduces the error. The average absolute error of UKF estimating SOC is 0.83%, and the average absolute error of WMIUKF is reduced to 0.38%. The weighted multi-innovation adaptive unscented Kalman filter SOC estimation error proposed by the present invention is the smallest, with an average absolute error of 0.13%.
[0167] In order to verify the robustness of the method proposed in the present invention, SOC estimation is performed from different intervals, and the initial value of SOC is uniformly given as 80%. The initial value setting of the Kalman filter covariance matrix is shown in Table 1. The estimation results obtained by the battery state of charge estimation method of the present invention are shown in Table 2. The average absolute error does not exceed 4%. The maximum MAE occurs when the estimated starting SOC is 10%. At this time, the initial value is given as 80%, and the initial error is 70%. It can also achieve an estimation error of 3.2%, indicating that the battery state of charge estimation method of the present invention has good convergence, good robustness, and high estimation accuracy. Only using two sets of covariance matrix initial value parameters, better estimation results can be obtained in each starting interval. The adaptive method reduces the difficulty of initial value adjustment and is more convenient for algorithm implementation.
[0168] Table 1: Initial value settings
[0169] Table 2: Error results Estimated start SOC Error MAE 100% 0.26% 90% 1.63% 80% 0.40% 70% 0.77% 60% 1.43% 50% 1.23% 40% 1.53% 30% 0.55% 20% 0.99% 10% 3.20%
[0170] (1) The battery state of charge estimation method of the present invention uses the recursive least squares method to identify OCV online, and the equivalent potential model fitting function obtains the OCV-battery state of charge relationship.
[0171] (2) The battery state of charge estimation method of the present invention is based on a first-order equivalent circuit model, and adopts a multi-time scale recursive least squares method to identify model parameters online. The model parameters obtained by macroscopic scale identification are used in the WMIAUKF algorithm to estimate the battery state of charge of the lithium battery at the microscopic scale, and the amount of calculation is relatively small.
[0172] (3) The WMIAUKF algorithm proposed in the battery state of charge estimation method of the present invention improves the UKF, uses new information from multiple time points, and calculates its weight according to the size of the new information and the sequence of time points, so as to more reasonably use more new information, and then combine it with the adaptive method to update the process noise covariance matrix Q and the measurement noise covariance matrix R, thereby achieving high-precision estimation of the battery state of charge in any interval.
[0173] In summary, the battery state of charge estimation method of the present invention adopts the multi-time scale recursive least squares method with forgetting factor (MFFRLS) to online identify model parameters in view of the characteristic of slow parameter changes; in addition, the UKF is improved, combined with the multi-innovation theory and adaptive method, and the lithium battery SOC is estimated by weighted multi-innovation adaptive unscented Kalman filter (WMIAUKF), which can achieve high-precision estimation of the battery state of charge with less calculation.
[0174] The above is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. The above embodiments of the present invention can also be modified in various ways. All simple, equivalent changes and modifications made according to the claims and the description of the present invention fall within the scope of protection of the claims of the present invention. The contents not described in detail in the present invention are all conventional technical contents.
Claims
1. A method for estimating a battery state of charge, characterized in that: include: Step S1: acquiring current and voltage data of the battery to be tested under UDDS working conditions, obtaining a first set of current and voltage data and a second set of current and voltage data, and establishing a circuit model of the battery and a corresponding state space expression; Step S2: according to the first set of current and voltage data, the open circuit voltage is identified by using the recursive least square method with a forgetting factor, and the reference battery state of charge is determined; the open circuit voltage and the reference battery state of charge are used to fit the open circuit voltage-battery state of charge function; Step S3: Based on the second set of current and voltage data, a multi-time scale recursive least square method with a forgetting factor is used to online identify battery parameters, where the battery parameters include ohmic internal resistance, polarization internal resistance and time constant; Step S4: Based on the state space expression established in step S1 and the battery parameters identified in step S3, a weighted multi-innovation unscented Kalman filter algorithm is used to estimate the battery state of charge for the second set of current and voltage data, and the time window size of the innovation is changed, and the optimal time window size is selected according to the estimation accuracy of the battery state of charge; Step S5: Based on the state space expression established in step S1 and the battery parameters identified in step S3, the time window size determined in step S4 is set, and a weighted multi-innovation adaptive unscented Kalman filter algorithm is used to estimate the battery state of charge of the battery to be tested.
2. The battery state of charge estimation method according to claim 1, characterized in that: The state space expression includes a state equation and an observation equation, and the formula term of the observation equation includes at least the open circuit voltage.
3. The battery state of charge estimation method according to claim 1, characterized in that: The identification time interval of step S2 is 1 second, and the identification time interval of step S3 is 30 seconds.
4. The battery state of charge estimation method according to claim 1, characterized in that: In step S2, the open circuit voltage is identified by using a recursive least square method with a forgetting factor, which specifically includes: Step S21: Based on the state space expression of the battery circuit model, the battery terminal voltage U at time k is established with the open circuit voltage as part of the parameter to be identified. k An expression in the form of a regression model of ; Step S22: the data of each sampling moment in the first set of current and voltage data arrives in sequence. When the data of each sampling moment arrives, the gain vector K is calculated using the formula of the recursive least square method with a forgetting factor, and then the parameter θ to be identified and the covariance matrix P of the state estimation are updated; Step S23: After the sampling data processing is completed, the parameters identified at all sampling moments are counted to obtain an OCV sequence.
5. The battery state of charge estimation method according to claim 4, characterized in that: In step S21, the battery terminal voltage U at time k is established. k The regression model form of is expressed as: Where θ1 is equal to OCV k , OCV k is the open circuit voltage at time k, θ2 is equal to R0+R1, R0 is the internal resistance, R1 is the polarization internal resistance, θ3 is equal to τ1, τ1 is the time constant, τ1=R1C1, C1 is the polarization capacitance, θ4 is equal to τ1R0, θ k is the parameter to be identified at time k, is the input value at time k, U k represents the battery terminal voltage at time k, U k-1 is the polarization voltage at time k-1, I k is the current at time k, T is the sampling time interval; In step S22, the formula of the recursive least square method with forgetting factor is: In the formula, k represents the time sequence number, K k is the gain at time k, P k is the covariance matrix of the state estimate at time k, μ is the forgetting factor, and I is the identity matrix.
6. The battery state of charge estimation method according to claim 1, characterized in that: In step S1, the discretized state space expression of the first-order equivalent circuit model is obtained by combining the circuit model of the battery and the ampere-hour integral calculation formula of the state of charge as follows: The first equation of the above discretized state space expression is the state equation, and the second equation is the observation equation; In step S2, a reference state of charge is obtained using the ampere-hour integral calculation formula according to the first set of current and voltage data, and then an open circuit voltage-state of charge function is obtained by fitting the equivalent potential model based on the identified open circuit voltage and the reference state of charge calculated by the ampere-hour integral.
7. The battery state of charge estimation method according to claim 1, characterized in that: The step S4 specifically includes: Step S41: Set the initial value of the state variable Set the initial value of the Kalman filter covariance matrix and the initial value of the state variable As the posterior estimate of the state at time 0; Step S42: Construct the first type sigma point at time k-1 according to the state posterior estimate at time k-1 and weights; Step S43: According to the first type of sigma point at time k-1 and weights, and determine the state prior estimate at time k based on the state equation of the state space expression And determine the prior estimate of the covariance matrix P k / k-1 ; Step S44: Based on the prior estimate of the state at time k To construct the second type of sigma point at time k According to the second type of sigma point at time k and the observation equation of the state space expression to determine the corresponding observed value prediction and the observed value estimate Step S45: Predict the value based on the observed value at time k and the observed value estimate Determine the observation equation autocorrelation matrix P yy,k , according to the prior estimate of the state at time k The second type of sigma point Observed value predicted value and the observed value estimate Determine the covariance matrix P of the state variables and the observed quantities xy,k ; Step S46: Covariance matrix P of state variables and observations xy,k Divide by the observation equation autocorrelation matrix P yy,k , get the Kalman gain K k ; Step S47: Subtract the estimated value of the observation at time k from the estimated value of the observation as the estimated error e of the observation at time k k , using the estimated error of the observation at each moment as a single new information to expand the new information matrix E L , and calculate the weight matrix W of the new information e,L , W t,L , to construct a weighted multi-innovation matrix; Step S48: According to the Kalman gain K k The state and variance matrix are updated with the new information and the process returns to step S42 until all time stamps are traversed. At this time, the estimated result and error of SOC are obtained according to the state variables. Step S49: modify the value of the time window size L of the new information, and return to step S41 to obtain the estimation results and errors of the SOC under different time window sizes L.
8. The battery state of charge estimation method according to claim 7, characterized in that: The time window size chosen is 5.
9. The battery state of charge estimation method according to claim 1, characterized in that: In step S5, the weighted multi-innovation adaptive unscented Kalman filter algorithm further adaptively updates the process noise covariance matrix Q and the observation noise covariance matrix R based on the weighted multi-innovation unscented Kalman filter in step S4.
Citation Information
Cited By
Method, device and equipment for monitoring battery state of sightseeing vehicle and storage medium
CN119636511A
Sightseeing car battery status monitoring method, device, equipment and storage medium
CN119636511B
Power lithium battery SOH and SOC joint estimation method based on data and model fusion
CN119986380A
State of charge estimation method and device, electronic equipment and storage medium
CN121114788A
Battery pack state-of-charge estimation method and device and electronic equipment
CN122330726A
