Lithium-ion battery SOC prediction method based on variable window adaptive unscented Kalman filter

By using the variable window adaptive unscented Kalman filtering method and the AGA and Allan variance analysis methods to adjust the window length of lithium battery SOC prediction, the prediction error problem caused by the fixed value of noise covariance is solved, and higher prediction accuracy and robustness are achieved.

CN116819343BActive Publication Date: 2025-09-12GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310881529.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-18
Publication Date
2025-09-12
Estimated Expiration
2043-07-18

AI Technical Summary

Technical Problem

In the existing lithium battery SOC prediction, the noise covariance takes a fixed value, which leads to prediction errors. In addition, the window length is determined by relying on empirical methods, which is inaccurate under complex working conditions, affecting the prediction accuracy and robustness.

Method used

A variable window adaptive unscented Kalman filter method is adopted. The optimal noise covariance matching window length is determined by adaptive genetic algorithm (AGA). The window length is adjusted in combination with overlapping group Allan variance analysis to improve the applicability and accuracy of the algorithm.

Benefits of technology

The accuracy and robustness of lithium battery SOC prediction are improved, the algorithm debugging process is simplified, it adapts to changes in different working conditions, and reduces the increase in calculation amount.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116819343B_ABST
    Figure CN116819343B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for predicting the SOC of a lithium-ion battery based on a variable window adaptive unscented Kalman filter. First, the parameters of the second-order RC lithium-ion battery equivalent circuit model are estimated by adaptive forgetting factor least squares (AFFRLS); then, the optimal noise covariance matching window size of the adaptive unscented Kalman filter (AUKF) is determined by adaptive genetic algorithm (AGA) training; the obtained window size is used as the window cardinality to predict the battery SOC by AUKF; then, the change in the distribution of the error information sequence is identified by Allan variance analysis, and the window size is updated according to the update rule. The present invention determines the time window size of the AUKF by AGA, which is more intelligent; in addition, the Allan variance analysis method is introduced to improve the estimation accuracy of the noise covariance, thereby improving the algorithm's tracking ability for nonlinear time-varying systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of lithium battery state assessment, and in particular relates to a lithium-ion battery SOC prediction method based on variable window adaptive unscented Kalman filtering. Background Art

[0002] Predicting the state of charge (SOC) of lithium batteries is crucial for battery management and control and is a key function of battery management systems (BMS). With the widespread application of lithium batteries in electronics, aviation, new energy vehicles, and other fields, accurate SOC prediction has attracted significant attention and research in this field. Accurate SOC helps manage the charge and discharge of lithium batteries, impacting their safety and reliability.

[0003] Currently, in the application and research of lithium battery SOC prediction, the Kalman family of algorithms has good time-varying tracking capabilities and can predict state quantities with the help of observed data to obtain the optimal estimate of the system. Among them, the extended Kalman and unscented Kalman have good prediction performance in the state prediction of nonlinear systems. Compared with the extended Kalman, the unscented Kalman does not require the calculation of the Jacobian matrix, has a smaller amount of calculation, and can obtain an approximation accuracy of the second order or above. However, the noise in the lithium battery system has time-varying characteristics. The traditional unscented Kalman filter algorithm takes the noise covariance as a fixed value. Adapting the noise covariance can effectively improve the prediction accuracy. According to the document "Online state of charge estimation of Li-ion battery based on animproved unscented Kalman filter approach", the noise covariance adaptation methods include covariance matching method, Bayesian method, maximum likelihood method, etc. The AUKF method based on noise covariance matching can obtain higher prediction accuracy. The present invention mainly realizes lithium battery SOC prediction based on the AUKF of the noise covariance matching method.

[0004] The AUKF based on noise covariance matching requires the establishment of a corresponding circuit model. Considering the simulation accuracy and model complexity of the comprehensive model, the second-order RC equivalent circuit model of lithium batteries is more widely used. After obtaining the model state equation, the AFFRLS is used to estimate the model parameters, and then the AUKF is used to predict the SOC. In the adaptive formula based on noise covariance matching, the noise matching window length is mainly determined by empirical methods, which can easily lead to unreasonable length selection under complex working conditions. In addition, the window length affects the noise statistics, and the distribution of the error information sequence is affected by model errors, charge and discharge rates, etc., and its distribution will change. In order to better determine the window length and improve the estimation accuracy of the noise covariance, the current optimal window length is determined by AGA, and the overlapping group Allan variance analysis method is introduced to identify the fluctuations of the error sequence, thereby improving the algorithm's prediction accuracy. Summary of the Invention

[0005] The present invention provides a lithium-ion battery SOC prediction method based on a variable window adaptive unscented Kalman filter. The method uses an adaptive generalization algorithm (AGA) to confirm the optimal noise covariance matching window length of the algorithm, and the noise covariance is updated by an adaptive formula. The SOC prediction is achieved through an AUKF, and the fluctuation of the error sequence is identified by an overlapping group Allan variance analysis method. The window length is adjusted to improve the prediction accuracy and robustness of the algorithm.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] A lithium-ion battery SOC prediction method based on a variable window adaptive unscented Kalman filter comprises the following steps:

[0008] Step 1: Establish the OCV-SOC mapping relationship from the HPPC test and fit it using a polynomial formula;

[0009] Step 2: Establish the state space equation of the second-order RC equivalent circuit model of the lithium battery and estimate the model parameters through AFFRLS;

[0010] Step 3: 50 sets of data are trained using an adaptive genetic algorithm, where the initial population is a random value of the noise covariance matching window size. AGA is used to determine the optimal window length L.

[0011] Step 4: Use the obtained L value as the window base of the adaptive unscented Kalman filter to update the window length;

[0012] Step 5: Update the state space equation of the lithium battery second-order RC equivalent circuit model, use AUKF to predict the SOC and update the error information sequence;

[0013] Step 6: Use the Allan variance analysis method to obtain the variance fluctuation of the error information sequence, and update the length L according to the set rules;

[0014] Step 7: Return to step 5 for the next prediction until the prediction is completed.

[0015] Furthermore, in step 1, the HPPC test is performed on the lithium-ion battery to obtain the relationship between OCV and SOC data, and a polynomial fitting method is used for fitting. The fitting formula is: U ocv =a1SOC+a2SOC 2 +…+a n SOC n , is the nth-order fitting, where a1,···,an are fitting parameters.

[0016] Furthermore, step 2 establishes the state space equation of the lithium battery second-order RC equivalent circuit model, and the method of estimating the model parameters by AFFRLS includes the following steps:

[0017] Step S2-1: Derived from Kirchhoff's law, the state space equation of the lithium battery second-order RC equivalent circuit model is obtained;

[0018] Step S2-2: Write the model into least squares form and derive the model parameter estimation expression;

[0019] Step S2-3: Using the measured lithium battery terminal voltage and load current data as input to the AFFRLS algorithm, and setting L to 0;

[0020] Step S2-4: perform AFFRLS algorithm iteration, estimate parameter vector, and calculate model parameters;

[0021] Step S2-5: Substitute the obtained model parameters into the model state space equation, and update the state equation and observation equation.

[0022] Furthermore, the state equation and observation equation of the lithium battery second-order RC equivalent circuit model described in step S2-1 are:

[0023]

[0024] Where T = 1, ω(k) represents process noise, ν(k) represents observation noise, both of which are uncorrelated white noise with zero mean; U1(k) and U2(k) are the voltages across the RC network, η is the Coulomb efficiency, Q N is the rated capacity.

[0025] Furthermore, the estimated parameter vector in step S2-4 is: θ(k) = [a0, a1, a2, a3, a4] T , the AFFRLS estimation formula is:

[0026]

[0027] Where e(k) is the correction error, Y(k) is the input data volume, K k is the gain, P(k) is the error covariance, λ is the forgetting factor, and its value range is generally between 0.95 and 1. max is the maximum λ value, λ min is the minimum λ value, e0 is the preset benchmark error, and round(·) is the rounding function.

[0028] Furthermore, step 3 uses an adaptive genetic algorithm to train multiple sets of data, including the following steps:

[0029] Step S3-1: Use the noise covariance matching window size L as the individual in the AGA population and randomly construct the initial generation population;

[0030] Step S3-2: Use the measured data as training data and take the first 50 sets of data;

[0031] Step S3-3: Update L to AUKF, iteratively update the observation prediction value, and update the error innovation sequence;

[0032] Step S3-4: Perform AGA selection crossover mutation operation to obtain a new population;

[0033] Step S3-5: updating the process noise covariance and the measurement noise covariance by the adaptive formula;

[0034] Step S3-6: Determine whether the termination condition is met. If so, output the optimal L value and proceed to the next step. If not, return to step S3-3 until the iteration ends.

[0035] Step S3-7: Input the L value into the parameter iteration operation of the AUKF algorithm, and calculate the variance value σ0 of the last 10 groups of data in the error innovation sequence using the overlapping group Allan variance analysis formula.

[0036] Furthermore, step 5 updates the state space equation of the lithium battery second-order RC equivalent circuit model, and the method of using AUKF to predict the SOC and update the error innovation sequence includes the following steps:

[0037] Step S5-1: Initialize the noise covariance matrix R0, Q0, error covariance matrix P0, and state vector x0 in AUKF;

[0038] Step S5-2: Determine whether L>0 holds true, and determine whether the AGA optimization result has been input into the AUKF algorithm;

[0039] Step S5-3: Start SOC prediction based on the updated model parameters of AFFRLS;

[0040] Step S5-4: Perform UT transformation on the state vector x(k), construct the sigma point set, and calculate the sampling point weights;

[0041] Step S5-5: Calculate the state vector prediction value x by the sigma point and the sampling point weight - (k) and the state error covariance matrix P - x ;

[0042] Step S5-6: Perform UT transformation on the state prediction value of step S5-4 again, construct a new sigma point, and then calculate the sampling point weight;

[0043] Step S5-7: Calculate the observation prediction value and the observation error covariance matrix P - y , cross-covariance matrix P xy , calculate the Kalman gain K k ;

[0044] Step S5-8: Update the error information sequence and perform the corresponding operation of step 6;

[0045] Step S5-9: Update the L value, and update the process noise covariance and measurement noise covariance by the adaptive formula;

[0046] Step S5-10: Update the state prediction value x(k) and the state error covariance P x (k);

[0047] Step S5-11: Set k=k+1, output the SOC prediction value, and return to step S5-3 to continue the AUKF algorithm iteration until the iteration ends.

[0048] Furthermore, step 5-2 automatically optimizes the AUKF noise covariance matching window length L based on AGA. The optimization of AGA includes the following:

[0049] (1) AGA initialization, including population size, termination number, upper and lower limits of crossover and mutation probabilities, encoding method uses real number encoding, and selection operation uses roulette method and best retention strategy;

[0050] (2) Calculate the individual fitness value, the formula is: In the formula, N is the sum of the UKF prediction iterations k plus the current individual, N = k + 1, y(k) is the true value of the voltage, is the voltage prediction value;

[0051] (3) The fitness value calculated by AGA requires the iterative operation of AUKF, with the individual size selected as 20 and the termination number of generations as 10;

[0052] (4) The total area S of the constructed roulette wheel sector is:

[0053]

[0054] Where i is the i-th individual, L is the individual size;

[0055] The probability J of an individual being selected is:

[0056] J(i)=1 / (fit(i)*S)

[0057] The roulette wheel method retains the superior individuals and eliminates the inferior individuals;

[0058] (5) Crossover strategy: arithmetic crossover is used to perform crossover operations on selected individuals under the crossover probability. The arithmetic crossover formula is:

[0059] α and β are random numbers ranging from 0 to 1, and x a 、x b Two chromosomes;

[0060] The crossover probability calculation formula is:

[0061]

[0062] i represents the i-th individual, F max 、F min are the maximum and minimum values ​​of the fitness function, P cmin is the minimum value of the crossover probability. The closer F(i) is to the minimum value, the higher the probability of P C The smaller it is, the closer the relative F(i) is to the maximum value, and P C The closer to 1;

[0063] (6) The mutation strategy uses non-uniform mutation, and the formula is as follows:

[0064]

[0065] Where M and N are the left and right boundaries of the optimization parameters, γ is a random number in the range of (0,1), k is in the range of (0,1), and d is a random number 0 or 1;

[0066]

[0067] Where k m is the maximum value of mutation probability, g(i) is the number of iterations of the current algorithm, g max To terminate the algebra.

[0068] Furthermore, in step 5-4, the sigma point is constructed by UT transformation, and the symmetric sampling method is as follows:

[0069]

[0070] in Among them, U and V are orthogonal matrices, S is a diagonal matrix, is the mean of the state vector, n is the dimension of the state vector, P k is the state vector covariance.

[0071] Furthermore, in step 6, the error innovation sequence is subjected to the Allan variance analysis method to obtain the variance fluctuation, and the method of updating the L length according to the set rules includes the following steps:

[0072] Step S6-1: Calculate the variance value of the current data group using the overlapping group Allan variance analysis formula;

[0073] Step S6-2: Compare the variance with that in step S3-7. If the multiple is greater than a, the L value is reduced by 1; if the multiple is less than 1 / a, the L value is increased by 1; in other cases, L remains unchanged;

[0074] Step S6-3: Update the L value to step S5-9 as the window size parameter AUKF prediction operation for the next noise covariance matching.

[0075] Compared with the prior art, the present invention has the following significant beneficial effects:

[0076] 1. The present invention addresses the problem of prediction error caused by fixed noise covariance values ​​when UKF is applied to lithium battery SOC prediction. The invention uses a noise covariance matching method to perform measurement and adaptive update of process noise covariance. Unlike previous empirical methods for determining the noise covariance window, the present invention uses AGA to optimize the window length, which helps avoid the uncertainty of window sizes determined by previous empirical methods in complex working condition prediction applications. Using AGA to confirm the window length improves the intelligence and applicability of the algorithm. When the type of lithium battery changes, only the OCV-SOC relationship needs to be changed, and the algorithm can automatically obtain the new window length, simplifying the algorithm debugging process.

[0077] 2. In view of the inaccuracy of noise covariance matching in the previous AUKF with a fixed window length, the present invention introduces an overlapping grouped Allan variance analysis method to identify changes in the error sequence. When the error information sequence is affected by model errors, charge and discharge rates, etc. and the distribution changes, the length of the matching window can be adjusted in time to improve the estimation accuracy of the noise covariance, thereby improving the algorithm's ability to estimate the time-varying nonlinear system and obtaining higher SOC prediction accuracy and robustness.

[0078] 3. The AGA algorithm introduced in the present invention determines the window length of the AUKF and confirms it in the case of a small number of data groups, which has little impact on the operational efficiency of the AUKF; the introduced Allan variance analysis method identifies the fluctuation of the error sequence through the basic formula, and the rule for adjusting the window length adopts a simple change rule, which improves the algorithm performance with a slight increase in the amount of calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 This is the second-order RC equivalent circuit model diagram of a lithium battery;

[0080] Figure 2 This is a flow chart of a lithium-ion battery SOC prediction method based on a variable window adaptive unscented Kalman filter;

[0081] Figure 3This is the parameter estimation flow chart of the AFFRLS model. DETAILED DESCRIPTION

[0082] The present invention is directed to a lithium-ion battery SOC prediction method based on a variable window adaptive unscented Kalman filter, comprising the following steps:

[0083] Step 1: Obtain OCV and SOC data from the HPPC test, fit them using a polynomial formula, and establish an OCV-SOC mapping relationship;

[0084] Step 2: Based on Kirchhoff's law, establish the state space equation of the lithium battery second-order RC equivalent circuit model and estimate the model parameters through AFFRLS;

[0085] Step S2-1: Based on Kirchhoff's law, the model is discretized to establish the state space equation of the second-order RC equivalent circuit model of the lithium battery. The second-order RC equivalent circuit model of the lithium battery is as follows: Figure 1 ;

[0086] Step S2-2: perform least squares derivation on the model and perform iterative estimation based on the model parameter estimation expression;

[0087] Step S2-3: The measured lithium battery terminal voltage and load current data are used as inputs to the AFFRLS algorithm, and L is set to 0. The overall algorithm flow chart is as follows: Figure 2 ;

[0088] Step S2-4: Iterate the AFFRLS algorithm, estimate the parameter vector, calculate the prediction error, update the algorithm forgetting factor value, and calculate the model parameters from the parameter vector. The AFFRLS parameter estimation flow chart is as follows: Figure 3 ;

[0089] Step S2-5: Substitute the obtained model parameters into the model state space equation, update the state equation and observation equation, and first use AGA to optimize the noise covariance matching window length L of AUKF. Then the system will perform SOC prediction based on AUKF. After each iteration, return to step S2-4 and continue to update the model parameters.

[0090] Step 3: Based on the adaptive genetic algorithm (AGA), the first 50 groups of data are taken for training, the initial population is set to the noise covariance matching window size, and the optimal window length L is determined through the selection, crossover, and mutation operations of the genetic algorithm;

[0091] Step S3-1: Use the window size L of the noise covariance matching as the number of individuals in the AGA population, randomly construct the initial population in the range of 3-50, and take the individual size as 20;

[0092] Step S3-2: Use the measured terminal voltage and load current data as training data, and take the first 50 sets of data for iterative optimization;

[0093] Step S3-3: Input the individual L in the population into the AUKF to participate in the operation, iteratively update the observation prediction value, and update the error innovation sequence;

[0094] Step S3-4: Calculate the fitness function value and select the best individual; then perform AGA selection, crossover, and mutation operations to obtain a new population, retain the best individual, and the best individual obtains the minimum mean square error between the observed predicted value and the measured value;

[0095] Step S3-5: Under the L window, the process noise covariance and the measurement noise covariance are updated by the adaptive formula;

[0096] Step S3-6: Determine whether the termination condition is met. If so, output the optimal L value and proceed to the next step. If not, return to step S3-3 until the iteration ends.

[0097] Step S3-7: Input the L value into the parameter iteration operation of the AUKF algorithm, and calculate the variance value σ0 of the last 10 groups of data in the error innovation sequence using the overlapping group Allan variance analysis formula;

[0098] Step 4: Use the obtained L value as the window base of AUKF to update the window length;

[0099] Step 5: Update the state space equation of the lithium battery second-order RC equivalent circuit model by AFFRLS, and predict the SOC through AUKF;

[0100] Step S5-1: Initialize the noise covariance matrix R0, Q0, error covariance matrix P0, and state vector x0 in AUKF;

[0101] Step S5-2: Determine whether L>0 holds true, and confirm that the AGA optimization result has been input into the AUKF algorithm;

[0102] Step S5-3: Combine steps S2-4 and S2-5 and start SOC prediction based on the model parameters estimated by AFFRLS;

[0103] Step S5-4: Perform UT transformation on the state vector x(k), construct the sigma point set, and calculate the sampling point weights;

[0104] Step S5-5: Calculate the state vector prediction value x by the sigma point and the sampling point weight - (k) and the state error covariance matrix P - x ;

[0105] Step S5-6: Perform UT transformation on the state prediction value of step S5-4 again, construct a new sigma point, and then calculate the sampling point weight;

[0106] Step S5-7: Calculate the observation prediction value and the observation error covariance matrix P - y , cross-covariance matrix P xy , calculate the Kalman gain K k ;

[0107] Step S5-8: Update the error information sequence and perform the corresponding operation of step 6;

[0108] Step S5-9: Update the L value, and update the process noise covariance and measurement noise covariance by the adaptive formula;

[0109] Step S5-10: Update the state prediction value x(k) and the state error covariance P x (k);

[0110] Step S5-11: Set k=k+1, output the SOC prediction value, and return to step S5-3 to continue the AUKF algorithm iteration until the iteration ends;

[0111] Step 6: Update the error innovation sequence, obtain the variance fluctuation through Allan variance analysis, and update the length L according to the set rules;

[0112] Step S6-1: Calculate the variance value of the current data group using the overlapping group Allan variance analysis formula;

[0113] Step S6-2: Compare the variance with that in step S3-7. If the multiple is greater than a, the L value is reduced by 1; if the multiple is less than 1 / a, the L value is increased by 1; in other cases, L remains unchanged;

[0114] Step S6-3: Update the L value to step S5-9 as the window size parameter AUKF prediction operation for the next noise covariance matching;

[0115] Step 7: Return to step 5 for the next prediction until the prediction is completed.

[0116] In order to make the present invention more fully disclosed, the following is a description of the present invention through a more specific technical solution:

[0117] 1. The OCV and SOC data of lithium batteries of the same specifications are measured through HPPC test, and the mapping relationship is established through polynomial fitting, with the fitting order taking 7th order fitting.

[0118] 2. Establish a second-order RC equivalent circuit model of the lithium battery, and its state equation and observation equation are:

[0119]

[0120] Where T = 1, ω(k) represents process noise, ν(k) represents observation noise, both of which are uncorrelated white noise with zero mean; U1(k) and U2(k) are the voltages across the RC network, η is the Coulomb efficiency, Q N is the rated capacity; τ1=R1C1, τ2=R2C2, R0, R1, R2, C1, C2 are model parameters; U L is the terminal voltage, Uoc is the open circuit voltage, I is the load current, and the parameters change with time k.

[0121] It can be further expressed as:

[0122]

[0123] 3. Measure the terminal voltage Y(k) and load current I(k) of lithium batteries of the same specifications, and combine the data into the AFFRLS input parameter vector, setting φ(k) = [Y(k-1), Y(k-2), I(k), I(k-1), I(k-2)] T , AFFRLS estimates the model parameters including the following:

[0124] 3-1. In AFFRLS, the estimated parameter vector is: θ(k) = [a0, a1, a2, a3, a4] T , the AFFRLS estimation formula is:

[0125]

[0126] Where e(k) is the correction error, Y(k) is the input data volume, K k is the gain, P(k) is the error covariance, λ is the forgetting factor, and its value range is generally between 0.95 and 1. max is the maximum λ value, λ min is the minimum λ value, e0 is the preset benchmark error, and round(·) is the rounding function.

[0127] 3-2. The parameter vector θ(k) is used to calculate the intermediate variables k1, k2, k3, and the time constants τ1 and τ2. τ1 = R1C1, τ2 = R2C2. The calculation formula is:

[0128]

[0129] 3-3. Calculate the model parameters R0, R1, R2, C1, and C2 using the formula in 3-2. The formula is:

[0130]

[0131] 4. Automatically optimize the AUKF noise covariance matching window length L based on AGA. The AGA optimization includes the following:

[0132] 4-1. AGA initialization, including population size, termination number, and upper and lower bounds for crossover and mutation probabilities. Real number encoding is used for encoding, and roulette wheel and best-retention strategies are used for selection.

[0133] 4-2. Calculate the individual fitness value. The formula is: In the formula, N is the sum of the UKF prediction iterations k plus the current individual, N = k + 1. y(k) is the true value of the voltage, is the predicted voltage value.

[0134] 4-3. AGA needs to call the iterative operation of AUKF to calculate the fitness value. In order to ensure the efficiency of the operation, the individual size is selected as 20 and the termination number of generations is 10.

[0135] 4-4. The total area S of the constructed roulette wheel sector is:

[0136]

[0137] Where i is the i-th individual and L is the individual size.

[0138] The probability J of an individual being selected is:

[0139] J(i)=1 / (fit(i)*S)

[0140] The roulette method retains the superior individuals and eliminates the inferior individuals.

[0141] 4-5. Crossover strategy uses arithmetic crossover to perform crossover operations on selected individuals under the crossover probability. The arithmetic crossover formula is:

[0142] α and β are random numbers ranging from 0 to 1, and x a 、x b Two chromosomes.

[0143] The crossover probability calculation formula is:

[0144]

[0145] i represents the i-th individual, F max 、F min are the maximum and minimum values ​​of the fitness function, P cmin is the minimum crossover probability. The closer F(i) is to the minimum value, the higher the probability of C The smaller it is, the closer the relative F(i) is to the maximum value, and P C The closer to 1.

[0146] 4-6. The mutation strategy uses non-uniform mutation, and the formula is as follows:

[0147]

[0148] Where M and N are the left and right boundaries of the optimization parameters, γ is a random number in the range of (0,1), k is in the range of (0,1), and d is a random number 0 or 1. The formula realizes the individual x c variation.

[0149]

[0150] Where k m is the maximum value of mutation probability, g(i) is the number of iterations of the current algorithm, g max To terminate the algebra.

[0151] 5. After obtaining the L value, the starting conditions for SOC prediction are met and SOC prediction is performed through AUKF. The AUKF iteration includes the following:

[0152] 5-1. AUKF can be used to make the optimal estimate of the state value by correcting the external observation data. The iterative steps are:

[0153] First initialize the state variables and covariance matrix:

[0154] 5-2. Construct sigma points by UT transformation. The symmetric sampling method is as follows:

[0155]

[0156] in Among them, U and V are orthogonal matrices, S is a diagonal matrix, is the mean of the state vector, n is the dimension of the state vector, P k is the state vector covariance.

[0157] 5-3. The sigma point weight distribution is as follows, i is the i-th column, λ = α 2 (n+k)-n is the scaling factor, α is the scale parameter, which takes a value between 0 and 1, and k is the scaling factor, which is generally 0. β is 0 when the parameter is a single variable and 2 under Gaussian distribution.

[0158]

[0159] 5-4. Combined with the formula in point 2 of the technical solution, the predicted value of the sampling point is calculated by the sigma point and the weight:

[0160]

[0161] 5-5. Calculate the state prediction value and error covariance prediction value from the sampling point prediction value:

[0162]

[0163] Where Q(k) is the state noise covariance matrix.

[0164] 5-6. Perform UT transformation again to obtain a new sigma point set and calculate the predicted value of the observation sampling point:

[0165]

[0166] 5-7. Calculate the observation prediction value and the observation equation error covariance prediction value:

[0167]

[0168] Where R(k) is the observation noise covariance matrix.

[0169] 5-8. Calculate the Kalman gain K k :

[0170] 5-9, combined with 5-5 state prediction value and error covariance predicted values Observation prediction values ​​in 5-7 5-8 Kalman gain K k , update the state prediction value and error covariance prediction value at time k+1:

[0171]

[0172] And update the error innovation sequence E=[ε1,ε2,···,ε k ]. Combined with the formula in point 2 of the technical solution, ε k The calculation formula is:

[0173]

[0174] 5-10. By updating the error information sequence E, the voltage measurement value y k , Kalman gain K k , the adaptive update process noise covariance Q, measurement noise covariance R, the formula is:

[0175]

[0176] 6. Analyze the error innovation sequence E. The Allan variance analysis method includes the following:

[0177] 6-1. Determine the time scale l, which is usually 3-5.

[0178] 6-2. The formula for overlapping group analysis is:

[0179]

[0180] Where τ is the sampling time, is the voltage mean, σ is the variance, group k = N / l, N is the size of the data to be analyzed, and i represents the statistics of each group starting from i after grouping.

[0181] 6-3. Obtain the variance σ at the current moment, compare it with σ0, and update L according to the following update rules:

[0182]

[0183] The updated noise covariance matching window L value returns to 5-10 to participate in the calculation, realizing the change of the length of the noise covariance matching window. When the amplitude distribution of the error innovation sequence changes, the window length can be adjusted to improve the algorithm's tracking ability for nonlinear systems and the robustness of the algorithm.

Claims

1. A lithium-ion battery SOC prediction method based on variable window adaptive unscented Kalman filtering is characterized by: The following steps are involved: Step 1: Establish the OCV-SOC mapping relationship from the HPPC test and fit it using a polynomial formula; Step 2: Establish the state space equation of the second-order RC equivalent circuit model of the lithium battery and estimate the model parameters through AFFRLS; Step 3: Using an adaptive genetic algorithm, multiple sets of data are trained. The initial population is a random value of the noise covariance matching window size. AGA is used to determine the optimal window length L. Step 4: Use the obtained L value as the window base of the adaptive unscented Kalman filter to update the window length; Step 5: Update the state space equation of the lithium battery second-order RC equivalent circuit model, use AUKF to predict the SOC and update the error information sequence; Step 6: Use the Allan variance analysis method to obtain the variance fluctuation of the error information sequence, and update the length L according to the set rules; Step 7: Return to step 5 for the next prediction until the prediction is completed.

2. The lithium-ion battery SOC prediction method based on variable window adaptive unscented Kalman filtering according to claim 1, characterized in that: In step 1, the HPPC test is performed on the lithium-ion battery to obtain the relationship between OCV and SOC data. The polynomial fitting method is used for fitting. The fitting formula is: U ocv =a1SOC+a2SOC 2 +…+a n SOC n , is the nth-order fitting, where a1,···,an are fitting parameters.

3. The lithium-ion battery SOC prediction method based on variable window adaptive unscented Kalman filtering according to claim 1, characterized in that: Step 2: Establish the state space equation of the lithium battery second-order RC equivalent circuit model and estimate the model parameters by AFFRLS, including the following steps: Step S2-1: Using Kirchhoff's law, derive the state space equation of the lithium battery second-order RC equivalent circuit model; Step S2-2: Write the model into least squares form and derive the model parameter estimation expression; Step S2-3: Using the measured lithium battery terminal voltage and load current data as input to the AFFRLS algorithm, and setting L to 0; Step S2-4: perform AFFRLS algorithm iteration, estimate parameter vector, and calculate model parameters; Step S2-5: Substitute the obtained model parameters into the model state space equation, and update the state equation and observation equation.

4. The method for predicting SOC of a lithium-ion battery based on a variable window adaptive unscented Kalman filter according to claim 3, characterized in that: The state equation and observation equation of the lithium battery second-order RC equivalent circuit model described in step S2-1 are: Where T = 1, ω(k) represents process noise, ν(k) represents observation noise, both of which are uncorrelated white noise with zero mean; U1(k) and U2(k) are the voltages across the RC network, η is the Coulomb efficiency, Q N is the rated capacity; τ1=R1C1, τ2=R2C2, R0, R1, R2, C1, C2 are model parameters; U L is the terminal voltage, Uoc is the open circuit voltage, I is the load current, and the parameters change with time k.

5. The method for predicting SOC of a lithium-ion battery based on a variable window adaptive unscented Kalman filter according to claim 3, characterized in that: The estimated parameter vector in step S2-4 is: θ(k) = [a0, a1, a2, a3, a4] T , input parameter vector φ(k)=[Y(k-1),Y(k-2),I(k),I(k-1),I(k-2)] T , the AFFRLS estimation formula is: Where e(k) is the correction error, Y(k) is the input data volume, K k is the gain, P(k) is the error covariance, λ is the forgetting factor, the value range is 0.95~1, λ max is the maximum λ value, λ min is the minimum λ value, e0 is the preset benchmark error, and round(·) is the rounding function.

6. The method for lithium-ion battery SOC prediction based on variable window adaptive unscented Kalman filtering according to claim 1, characterized in that: Step 3 is a method for training multiple sets of data using an adaptive genetic algorithm, including the following steps: Step S3-1: Use the noise covariance matching window size L as the individual in the AGA population and randomly construct the initial generation population; Step S3-2: Use the measured data as training data and take the first 50 sets of data; Step S3-3: Update L to AUKF, iteratively update the observation prediction value, and update the error innovation sequence; Step S3-4: Perform AGA selection crossover mutation operation to obtain a new population; Step S3-5: updating the process noise covariance and the measurement noise covariance by the adaptive formula; Step S3-6: Determine whether the termination condition is met. If so, output the optimal L value and proceed to the next step. If not, return to step S3-3 until the iteration ends. Step S3-7: Input the L value into the parameter iteration operation of the AUKF algorithm, and calculate the variance value σ0 of the last 10 groups of data in the error innovation sequence using the overlapping group Allan variance analysis formula.

7. The method for predicting SOC of a lithium-ion battery based on a variable window adaptive unscented Kalman filter according to claim 1, characterized in that: Step 5 updates the state space equation of the lithium battery second-order RC equivalent circuit model, uses AUKF to predict the SOC and updates the error innovation sequence, including the following steps: Step S5-1: Initialize the noise covariance matrix R0, Q0, error covariance matrix P0, and state vector x0 in AUKF; Step S5-2: Determine whether L>0 holds true, and determine whether the AGA optimization result has been input into the AUKF algorithm; Step S5-3: Start SOC prediction based on the updated model parameters of AFFRLS; Step S5-4: Perform UT transformation on the state vector x(k), construct the sigma point set, and calculate the sampling point weights; Step S5-5: Calculate the state vector prediction value x by the sigma point and the sampling point weight - (k) and the state error covariance matrix P - x ; Step S5-6: Perform UT transformation on the state prediction value of step S5-4 again, construct a new sigma point, and then calculate the sampling point weight; Step S5-7: Calculate the observation prediction value and the observation error covariance matrix P - y , cross-covariance matrix P xy , calculate the Kalman gain K k ; Step S5-8: Update the error information sequence and perform the corresponding operation of step 6; Step S5-9: Update the L value, and update the process noise covariance and measurement noise covariance by the adaptive formula; Step S5-10: Update the state prediction value x(k) and the state error covariance P x (k); Step S5-11: Set k=k+1, output the SOC prediction value, and return to step S5-3 to continue the AUKF algorithm iteration until the iteration ends.

8. The method for predicting SOC of a lithium-ion battery based on a variable window adaptive unscented Kalman filter according to claim 7, characterized in that: Step 5-2 automatically optimizes the AUKF noise covariance matching window length L based on AGA. The AGA optimization includes the following: (1) AGA initialization, including population size, termination number, upper and lower limits of crossover and mutation probabilities, encoding method uses real number encoding, and selection operation uses roulette method and best retention strategy; (2) Calculate the individual fitness value, the formula is: In the formula, N is the sum of the UKF prediction iterations k plus the current individual, N = k + 1, y(k) is the true value of the voltage, is the voltage prediction value; (3) The fitness value calculated by AGA requires the iterative operation of AUKF, the individual size in the population is selected as 20, and the termination number of generations is 10; (4) The total area S of the constructed roulette wheel sector is: Where i is the i-th individual, L is the individual size; The probability J of an individual being selected is: J(i)=1 / (fit(i)*S) The roulette wheel method retains the superior individuals and eliminates the inferior individuals; (5) Crossover strategy: arithmetic crossover is used to perform crossover operations on selected individuals under the crossover probability. The arithmetic crossover formula is: α and β are random numbers ranging from 0 to 1, and x a 、x b Two chromosomes; The crossover probability calculation formula is: i represents the i-th individual, F max 、F min are the maximum and minimum values ​​of the fitness function, P cmin is the minimum value of the crossover probability. The closer F(i) is to the minimum value, the higher the probability of P C The smaller it is, the closer the relative F(i) is to the maximum value, and P C The closer to 1; (6) The mutation strategy uses non-uniform mutation, and the formula is as follows: Where M and N are the left and right boundaries of the optimization parameters, γ is a random number in the range of (0,1), k is in the range of (0,1), and d is a random number 0 or 1; Where k m is the maximum value of mutation probability, g(i) is the number of iterations of the current algorithm, g max To terminate the algebra.

9. The method for predicting SOC of a lithium-ion battery based on a variable window adaptive unscented Kalman filter according to claim 7, characterized in that: In step 5-4, the sigma point is constructed by UT transformation, and the symmetric sampling method is as follows: in Among them, U and V are orthogonal matrices, S is a diagonal matrix, is the mean of the state vector, n is the dimension of the state vector, P k is the state vector covariance.

10. The method for lithium-ion battery SOC prediction based on variable window adaptive unscented Kalman filtering according to claim 1, characterized in that: Step 6: The error innovation sequence is subjected to the Allan variance analysis method to obtain the variance fluctuation. The method of updating the length L according to the set rules includes the following steps: Step S6-1: Calculate the variance value of the current data group using the overlapping group Allan variance analysis formula; Step S6-2: Compare the variance with that in step S3-7. If the multiple is greater than a, the L value is reduced by 1; if the multiple is less than 1 / a, the L value is increased by 1; in other cases, L remains unchanged; Step S6-3: Update the L value to step S5-9 as the window size parameter AUKF prediction operation for the next noise covariance matching.