Lithium battery SOC estimation method, device and medium based on SGPR and adaptive infinite filtering

By combining sparse Gaussian process regression and adaptive infinite filtering, the problems of low accuracy and long training time in lithium-ion battery state of charge estimation are solved, achieving more efficient and accurate SOC estimation.

CN115291126BActive Publication Date: 2024-11-26HUNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210968282.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-12
Publication Date
2024-11-26
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

Existing methods for estimating the state of charge of lithium-ion batteries suffer from low accuracy, poor robustness, and long training time. In particular, when the dataset is large, Gaussian process regression is inefficient and lacks effective feature parameter selection methods.

Method used

A combined approach of Sparse Gaussian Process Regression (SGPR) and Adaptive Infinite Filtering is adopted. By processing the charge and discharge test data of lithium batteries under different operating conditions, the SOC value is calculated using the ampere-chronometry method. A nonlinear relationship is established by combining SGPR with adaptive infinite filtering. Then, SOC is estimated by adaptive infinite filtering, and the hyperparameters are optimized to improve the estimation accuracy and robustness.

Benefits of technology

It reduces the training and prediction time of Gaussian process regression, improves the accuracy and robustness of SOC estimation, avoids the trial-and-error approach of manually trying hyperparameter values, saves time, and obtains more accurate SOC estimation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115291126B_ABST
    Figure CN115291126B_ABST
Patent Text Reader

Abstract

The present invention discloses a lithium battery SOC estimation method, device and medium based on SGPR and adaptive infinite filtering, the method comprising: performing charge and discharge tests on lithium batteries under different working conditions, collecting voltage, current and temperature data sets during the charge and discharge process; calculating the SOC value of each sampling point during the charge and discharge process of the lithium battery using the ampere timing method; using the sparse Gaussian process regression algorithm to establish a nonlinear relationship between the SOC of the lithium battery and the voltage, current and temperature; obtaining the current voltage, battery and temperature of the lithium battery to be tested, and calculating the current SOC of the lithium battery to be tested using the ampere timing method and the nonlinear relationship respectively; using the SOC values ​​obtained by the ampere meter and the nonlinear relationship as the observation quantity and the state quantity respectively, performing adaptive infinite filtering, and using the obtained SOC value as the final estimated value of the current SOC of the lithium battery to be tested. The present invention can improve the SOC estimation accuracy and robustness of the lithium battery, and reduce the estimation time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of battery management, and in particular relates to a lithium battery SOC estimation method, device and medium based on SGPR (sparse Gaussian process regression) and adaptive infinite filtering. Background Art

[0002] New energy sources such as wind and solar energy have received much attention due to their abundance and environmental friendliness, and have also led to the rapid development of electric vehicles. Lithium-ion batteries have the advantages of high power density, fast charging speed, long life, and low self-discharge rate, and are widely used in electric vehicles as a new energy storage system. However, the state of charge (SOC) of electric vehicle battery packs is an important parameter in its use. Since it cannot be measured directly, it can only be estimated through relevant algorithms.

[0003] At present, there are three main methods for estimating the state of charge of lithium ions, namely open-loop methods, state estimation methods, and data-driven methods. The open-loop method is very common in the engineering field because it is simple and easy to implement. However, the inaccuracy of the initial value of the battery's state of charge and the current measurement can easily cause inaccurate and drifting state of charge estimation. The state estimation method is established on the basis of the open-loop method. This method requires an accurate electrochemical model or equivalent circuit model to obtain accurate state of charge estimation results. However, in practical applications, it is often difficult to obtain an accurate equivalent circuit model. The data-driven method aims to use a machine learning toolbox to develop a "black box computing toolbox" for state of charge estimation. The current main data-driven methods include artificial neural networks, support vector machines, relevance vector machines, and Gaussian process regression.

[0004] Gaussian process regression is often used for estimation and prediction. However, for lithium-ion battery SOC estimation, when the data set sample is large, the Gaussian process regression training and prediction time is long, resulting in low algorithm efficiency. At the same time, existing research has not given an effective feature parameter selection method. In addition, when the Gaussian process regression method is used for SOC estimation, it is easy to obtain results with low estimation accuracy and poor robustness. Summary of the invention

[0005] The present invention provides a lithium battery SOC estimation method based on SGPR and adaptive infinite filtering, which provides a technical solution for accurately estimating the state of charge of a lithium ion battery and improves the estimation accuracy and robustness.

[0006] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:

[0007] A lithium battery SOC estimation method based on SGPR and adaptive infinite filtering, comprising:

[0008] S1, performs charge and discharge tests on lithium batteries under different working conditions and collects voltage, current and temperature data sets during the charge and discharge process;

[0009] S2, using the ampere timing method to calculate the SOC value of each sampling point during the charging and discharging process of the lithium battery;

[0010] S3, uses sparse Gaussian process regression algorithm to establish the nonlinear relationship between the SOC of lithium batteries and voltage, current and temperature;

[0011] S4, obtaining the current voltage, battery and temperature of the lithium battery to be tested, calculating the current SOC of the lithium battery to be tested by using the ampere timing method, and calculating the current SOC value of the lithium battery to be tested based on the nonlinear relationship established in step S3;

[0012] S5, taking the SOC value obtained by the ampere meter as the observation quantity, taking the SOC value obtained by the nonlinear relationship as the state quantity, performing adaptive infinite filtering, and taking the obtained SOC value as the final estimated value of the current SOC of the lithium battery to be tested.

[0013] Furthermore, the different operating conditions in step S1 refer to operating conditions obtained by combining different temperatures and different charge and discharge rates.

[0014] Furthermore, the method for calculating the SOC value of a lithium battery using the ampere timing method is:

[0015]

[0016] Where: I k-1 is the current at sampling point k-1; ΔT is the sampling time interval; Q n is the rated capacity of the lithium battery, and its value is given by the battery manufacturer; SOC A,k-1 , SOC A,k They are the SOC values ​​of sampling points k-1 and k calculated by the ampere timing method respectively.

[0017] Furthermore, when the nonlinear relationship is established in step S3 and the SOC value is calculated based on the nonlinear relationship, the voltage, battery and temperature of the lithium battery are first normalized respectively, and then the nonlinear relationship is established and the SOC value is calculated based on the normalized data.

[0018] Furthermore, the kernel function expression of the sparse Gaussian process regression is:

[0019]

[0020] Among them, x i ,x j ∈D,D n ={(x i ,y i)|i=1,2,3,....,n} is the normalized sample set, x i Includes the normalized voltage, current and temperature data of the ith sampling point, y i is the SOC of the i-th sampling point; hyperparameter σ f is the control kernel function k(x i ,x j ), the hyperparameter l is the scale factor of the distance calculation;

[0021] The posterior distribution of the sparse Gaussian process regression is expressed as:

[0022] y * ~N(μ,σ)

[0023]

[0024]

[0025] Where μ, σ are the mean and covariance of the sparse Gaussian process regression estimate; x n is the normalized sample set D n Any sample point in, n is the sample set D n The number of samples in x s is the normalized sample subset D s Any sample point in, s is the sample subset D s The number of samples in k f (x i ,x j ) is the covariance function, σ n is the variance of Gaussian white noise of Gaussian process regression; k f (x s ,x * ) = k f (x * ,x s ) is the new input test point x * With the sample subset input point x s The s×1 order covariance matrix of k f (x n ,x s ) = k f (x s ,x n ) is the sample set input point x n With the sample subset input point x s The s×n order covariance matrix of k f (x s ,x s ) is the sample subset itself point x sThe s×s symmetric positive definite covariance matrix of .

[0026] Furthermore, in step S3, the following hyperparameters of the sparse Gaussian process regression method are optimized using the fruit fly optimization algorithm: σ f , σ n and l.

[0027] Furthermore, the specific process of using the fruit fly optimization algorithm to optimize the hyperparameters of the sparse Gaussian process regression method is as follows:

[0028] (1) Parameter initialization: Determine the population size h of the fruit fly, the number of iterations, and initialize the position (X, Y) of the fruit fly population. The calculation formula is:

[0029]

[0030] The subscript m in the formula is used to distinguish different optimization parameters;

[0031] (2) Initialize the flight distance of each fruit fly individual i and determine the distance D(i) from the origin:

[0032]

[0033] (3) The flavor concentration judgment value S(i) is calculated by D(i), and the calculation formula of S(i) is S(i) = 1 / D(i). The fitness function F is determined, and the flavor concentration judgment value S(i) is substituted into its fitness function to calculate the current optimal flavor concentration S of the fruit fly individual. m (i), σ f (i) = S 1 (i),σ n =S 2 (i),l=S 3 (i); The fitness function is the root mean square error of sparse Gaussian process regression;

[0034] (4) comparing the flavor concentration values ​​of each generation of fruit flies, iteratively retaining the position and flavor concentration of the optimal value, and recording the optimal value of each generation of fruit flies; the optimal value is the minimum value of the fitness function, that is, the minimum value of the root mean square error of the sparse Gaussian process regression;

[0035] (5) Iterate the optimization of the fruit flies to determine whether the number of iterations has been reached. If so, output the minimum value of the best values ​​of all generations of fruit flies. The σ corresponding to this minimum value is f ,l,σ n As the optimal value, if not, return to step (2) and repeat;

[0036] (6) The optimal σ f ,l,σ nBy bringing it into sparse Gaussian process regression, we can obtain the nonlinear relationship between the SOC of the lithium battery and its voltage, current and temperature.

[0037] Furthermore, the specific method of performing adaptive infinite filtering to obtain the final estimated value in step S5 is:

[0038] S5.1, taking the SOC value obtained by the ampere meter as the observation quantity, taking the SOC value obtained by regressing all nonlinear relationships based on the sparse Gaussian process as the state quantity, and establishing a state space equation, the state space equation is:

[0039]

[0040] SOC L,k =SOC A,k-1 +v k

[0041] Where: I k-1 is the current at sampling point k-1; ΔT is the sampling time interval; Q n is the rated capacity of the lithium battery, and its value is given by the battery manufacturer; SOC A,k-1 , SOC A,k are the SOC values ​​of sampling points k-1 and k calculated by the ampere timing method; SOC L,k is the SOC value of sampling point k calculated by sparse Gaussian process regression; w k and v k They are process noise and observation noise, which are independent and uncorrelated noises;

[0042] S5.2, Establishing the state transfer equation using the state space equation Perform infinite filtering, where X k ,u k ,Y k Corresponding to the state space equation SOC A,k-1 ,I k-1 ,SOC L,k , A k and C k Equal to 1, D k Equal to 0, B k equal The SOC value is iteratively updated according to the following adaptive infinite filtering algorithm as the final estimated value of the current SOC of the lithium battery to be tested:

[0043] (a) Based on the idea of ​​game theory, establish the cost function X 0 and are the initial value and initial setting value of the state quantity, P 0 is the initial error covariance matrix, Q k , Rk are the state noise covariance matrix and measurement noise covariance matrix of sampling point k respectively; S k It is an artificially set positive definite matrix, specifically set as the unit matrix, and N is the sequence length;

[0044] (b) Set a boundary condition θ to satisfy The cost function can be obtained:

[0045]

[0046] (c) Set X 0 , P 0 ,Q 0 ,R 0 and S k The initial value and sequence length N are calculated

[0047] (d) According to the cost function and the state transfer equation, the following iterative relationship can be established;

[0048] Calculate the state estimation prediction for sampling point k Error covariance prior prediction Gain matrix K k , status update and the error covariance update matrix

[0049]

[0050]

[0051]

[0052]

[0053]

[0054] where I is the identity matrix, is the prior prediction of the state estimate at sampling point k, is the prior prediction of the error covariance of sampling point k, K k is the gain matrix of sampling point k, is the error covariance update matrix of sampling point k, is the state update of sampling point k, Q of sampling point k k and R k It can be calculated by the following formula:

[0055]

[0056] Where δ is the forgetting factor, which is 0.99; is the new information matrix;

[0057] (e) repeat step (d) until the number of cycles reaches the sequence length N;

[0058] (f) Finally, output all The data is the filtering result and also the final estimated value of the current SOC of the lithium battery to be tested.

[0059] An electronic device comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the lithium battery SOC estimation method based on SGPR and adaptive infinite filtering as described in any of the above technical solutions.

[0060] A computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the method for estimating the SOC of a lithium battery based on SGPR and adaptive infinite filtering described in any one of the above technical solutions is implemented.

[0061] The present invention carefully considers the long training and prediction time of Gaussian process regression and the difficulty in obtaining the optimal hyperparameters. It uses the sparseness and hyperparameter optimization of the Gaussian process regression algorithm to reduce the dimension of the data set, reduce the training time and prediction time of Gaussian process regression, get rid of the trial and error method of artificially trying to take hyperparameter values, save a lot of time, and do not require a lot of professional knowledge, thereby improving the computational efficiency of the Gaussian process regression algorithm. In addition, the error caused by FOA-SGPR estimation is reduced by smoothing through adaptive infinite filtering, thereby obtaining a more accurate and robust SOC estimation result. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 It is a flow chart of the method described in the embodiment of the present application. DETAILED DESCRIPTION

[0063] The following is a detailed description of an embodiment of the present invention. This embodiment is based on the technical solution of the present invention, and provides a detailed implementation method and a specific operation process to further explain the technical solution of the present invention.

[0064] A lithium battery SOC estimation method based on SGPR and adaptive infinite filtering, reference Figure 1 As shown, the following steps are included:

[0065] S1, performs charge and discharge tests on lithium batteries under different working conditions, and collects voltage, current and temperature data sets during the charge and discharge process.

[0066] The battery testing system was used to charge and discharge the lithium battery 10 times at different temperatures of -10, 0, 10, 25, and 40°C and different rates of 0.5, 1, and 2C to obtain the battery voltage, current, and temperature data sets, with a sampling time interval of 0.1 second.

[0067] S2, use the ampere timing method to calculate the SOC value of each sampling point during the charging and discharging process of the lithium battery:

[0068]

[0069] Where: I k-1 is the current at sampling point k-1; ΔT is the sampling time interval; Q n is the rated capacity of the lithium battery, and its value is given by the battery manufacturer; SOC A,k-1 , SOC A,k They are the SOC values ​​of sampling points k-1 and k calculated by the ampere timing method respectively.

[0070] S3, uses sparse Gaussian process regression algorithm to establish the nonlinear relationship between the SOC of lithium batteries and voltage, current and temperature.

[0071] First, the voltage, current and temperature data sets collected in step S1 are normalized respectively:

[0072]

[0073] In the formula: x represents the original data; x max and x min are the maximum and minimum values ​​in the data respectively; x norm is the normalized result.

[0074] Then the normalized voltage, current and temperature data of each sampling point i are used as the input x of the model. i , the SOC value of the corresponding sampling point calculated by the ampere timing method in step S2 is used as the output y of the model i , construct a normalized sample set D = {(x i ,y i )|i=1,2,3,....,n}, n is the number of sample points in the sample set D.

[0075] Finally, the normalized sample set is used to train the sparse Gaussian process regression model.

[0076] In the existing Gaussian process regression model, the square exponential kernel function is often selected as the kernel of the model. The expression of the kernel function is:

[0077]

[0078] where x i ,xj For different inputs in the sample set, the hyperparameter σ f To control the amplitude of the kernel function, the hyperparameter l is the scale factor of the distance calculation;

[0079] Considering the impact of noise on regression estimation, it is assumed that the noise has a mean of 0 and a variance of σ n Gaussian white noise, whose distribution is N(0,σ n ), the final covariance function is:

[0080]

[0081] According to the Gaussian process prior assumption, y and y * The combination of follows a joint Gaussian distribution, expressed as follows:

[0082]

[0083] Where k f (x,x * ) = k f (x * ,x) is the new input test point x * The n×1 order covariance matrix with all input points x; k f (x * ,x * ) is the self point x * The covariance matrix of n is the n-dimensional identity matrix; k f (x,x) is the n×n symmetric positive definite covariance matrix of the self-point x, y * is the estimated SOC series;

[0084] According to Bayesian theory, the posterior distribution is:

[0085]

[0086]

[0087]

[0088] The mean As an estimate, cov(y * ) is the covariance of the estimates.

[0089] Considering the long training and prediction time of Gaussian process regression and the difficulty in obtaining the optimal hyperparameters, the present invention sparses the Gaussian process regression algorithm and only considers a subset of the data sample set. Then, equation (7) is simply approximated as shown below:

[0090]

[0091] Then the posterior distribution after Gaussian process regression sparsification can be expressed as the following formula:

[0092]

[0093] Where μ, σ are the mean and covariance of the sparse Gaussian process regression estimate; k f (x s ,x * ) = k f (x * ,x s ) is the new input test point x * With the sample subset input point x s The s×1 order covariance matrix of k f (x n ,x s ) = k f (x s ,x n ) is the sample set input point x n With the sample subset input point x s The s×n order covariance matrix of k f (x s ,x s ) is the sample subset itself point x s The s×s order symmetric positive definite covariance matrix of . The covariance matrix is ​​a multi-order matrix composed of the covariances of all input point pairs.

[0094] In this step S3, the sparse Gaussian process regression model is trained using the normalized sample set to optimize the hyperparameter σ in the above sparse Gaussian process regression estimation model. f ,l,σ n In this embodiment, the fruit fly optimization algorithm is specifically used for optimization. The optimization process includes:

[0095] (1) Parameter initialization: Determine the population size h of the fruit fly, the number of iterations, and initialize the position (X, Y) of the fruit fly population. The calculation formula is:

[0096]

[0097] The subscript m in the formula is used to distinguish different optimization parameters;

[0098] (2) Initialize the flight distance of each fruit fly individual i and determine the distance D(i) from the origin:

[0099]

[0100] (3) The flavor concentration judgment value S(i) is calculated by D(i), and the calculation formula of S(i) is S(i) = 1 / D(i). The fitness function F is determined, and the flavor concentration judgment value S(i) is substituted into its fitness function to calculate the current optimal flavor concentration S of the fruit fly individual. m (i), σ f (i) = S 1 (i),σ n =S 2 (i),l=S 3 (i); The fitness function is the root mean square error of sparse Gaussian process regression;

[0101] (4) comparing the flavor concentration values ​​of each generation of fruit flies, iteratively retaining the position and flavor concentration of the optimal value, and recording the optimal value of each generation of fruit flies; the optimal value is the minimum value of the fitness function, that is, the minimum value of the root mean square error of the sparse Gaussian process regression;

[0102] (5) Iterate the optimization of the fruit flies to determine whether the number of iterations has been reached. If so, output the minimum value of the best values ​​of all generations of fruit flies. The σ corresponding to this minimum value is f ,l,σ n As the optimal value, if not, return to step (2) and repeat;

[0103] (6) The optimal σ f ,l,σ n By bringing it into sparse Gaussian process regression, we can obtain the nonlinear relationship between the SOC of the lithium battery and its voltage, current and temperature.

[0104] S4, obtaining the current voltage, battery and temperature of the lithium battery to be tested, calculating the current SOC of the lithium battery to be tested by using the ampere timing method, and calculating the current SOC value of the lithium battery to be tested based on the nonlinear relationship established in step S3.

[0105] S5, taking the SOC value obtained by the ampere meter as the observation quantity, taking the SOC value obtained by the nonlinear relationship as the state quantity, performing adaptive infinite filtering, and taking the obtained SOC value as the final estimated value of the current SOC of the lithium battery to be tested.

[0106] S5.1, taking the SOC value obtained by the ampere meter as the observation quantity, taking the SOC value obtained by regressing all nonlinear relationships based on the sparse Gaussian process as the state quantity, and establishing a state space equation, the state space equation is:

[0107]

[0108] SOC L,k =SOC A,k-1 +v k

[0109] Where: I k-1 is the current at sampling point k-1; ΔT is the sampling time interval; Q n is the rated capacity of the lithium battery, and its value is given by the battery manufacturer; SOC A,k-1 , SOC A,k are the SOC values ​​of sampling points k-1 and k calculated by the ampere timing method; SOC L,k is the SOC value of sampling point k calculated by sparse Gaussian process regression; w k and v k They are process noise and observation noise, which are independent and uncorrelated noises;

[0110] S5.2, Establishing the state transfer equation using the state space equation Perform infinite filtering, where X k ,u k ,Y k Corresponding to the state space equation SOC A,k-1 ,I k-1 ,SOC L,k . A k and C k Equal to 1, D k Equal to 0, B k equal The SOC value is iteratively updated according to the following adaptive infinite filtering algorithm as the final estimated value of the current SOC of the lithium battery to be tested:

[0111] (a) Based on the idea of ​​game theory, establish the cost function X 0 and are the initial value and initial setting value of the state quantity, P 0 is the initial error covariance matrix, Q k , R k are the state noise covariance matrix and measurement noise covariance matrix of sampling point k respectively. k It is an artificially set positive definite matrix. In this patent, it is set as the unit matrix, and N is the sequence length.

[0112] (b) Set a boundary condition θ to satisfy The cost function can be obtained:

[0113]

[0114] (c) Set X 0 , P 0 ,Q 0 ,R 0 and S k The initial value and sequence length N are calculated

[0115] (d) According to the cost function and the state transfer equation, the following iterative relationship can be established;

[0116] Calculate the state estimation prediction for sampling point k Error covariance prior prediction Gain matrix K k , status update and the error covariance update matrix

[0117]

[0118]

[0119]

[0120]

[0121]

[0122] where I is the identity matrix, is the prior prediction of the state estimate at sampling point k, is the prior prediction of the error covariance of sampling point k, K k is the gain matrix of sampling point k, is the error covariance update matrix of sampling point k, is the state update of sampling point k, Q of sampling point k k and R k It can be calculated by the following formula:

[0123]

[0124] Where δ is the forgetting factor, which is 0.99; is the new information matrix of sampling point k.

[0125] (e) Repeat step (d) until the number of cycles reaches the sequence length N. Finally, output all The data is the filtering result and also the final estimated value of the current SOC of the lithium battery to be tested.

[0126] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor implements the lithium battery SOC estimation method based on SGPR and adaptive infinite filtering described in the above embodiment.

[0127] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the lithium battery SOC estimation method based on SGPR and adaptive infinite filtering described in the above embodiment.

[0128] The above embodiments are preferred embodiments of the present application. Ordinary technicians in this field can also make various changes or improvements on this basis. Without departing from the overall concept of the present application, these changes or improvements should fall within the scope of protection required by the present application.

Claims

1. A lithium battery SOC estimation method based on SGPR and adaptive infinite filtering, It is characterized in that include: S1, performs charge and discharge tests on lithium batteries under different working conditions and collects voltage, current and temperature data sets during the charge and discharge process; S2, using the ampere timing method to calculate the SOC value of each sampling point during the charging and discharging process of the lithium battery; S3, uses sparse Gaussian process regression algorithm to establish the nonlinear relationship between the SOC of lithium batteries and voltage, current and temperature; S4, obtaining the current voltage, battery and temperature of the lithium battery to be tested, calculating the current SOC of the lithium battery to be tested by using the ampere timing method, and calculating the current SOC value of the lithium battery to be tested based on the nonlinear relationship established in step S3; S5, taking the SOC value obtained by the ampere meter as the observation quantity, taking the SOC value obtained by the nonlinear relationship as the state quantity, performing adaptive infinite filtering, and taking the obtained SOC value as the final estimated value of the current SOC of the lithium battery to be tested.

2. The lithium battery SOC estimation method according to claim 1, It is characterized in that The different operating conditions in step S1 refer to operating conditions obtained by combining different temperatures and different charge and discharge rates.

3. The lithium battery SOC estimation method according to claim 1, It is characterized in that The method for calculating the SOC value of lithium battery using the ampere timing method is: Where: I k-1 is the current at sampling point k-1; ΔT is the sampling time interval; Q n is the rated capacity of the lithium battery, and its value is given by the battery manufacturer; SOC A,k-1 , SOC A,k They are the SOC values ​​of sampling points k-1 and k calculated by the ampere timing method respectively.

4. The lithium battery SOC estimation method according to claim 1, It is characterized in that When the nonlinear relationship is established in step S3 and the SOC value is calculated based on the nonlinear relationship, the voltage, battery and temperature of the lithium battery are first normalized respectively, and then the nonlinear relationship is established and the SOC value is calculated based on the normalized data.

5. The lithium battery SOC estimation method according to claim 1, It is characterized in that The kernel function expression of the sparse Gaussian process regression is: Among them, x i ,x j ∈D,D n ={(x i ,y i )|i=1,2,3,....,n} is the normalized sample set, x i Includes the normalized voltage, current and temperature data of the ith sampling point, y i is the SOC of the i-th sampling point; hyperparameter σ f is the control kernel function k(x i ,x j ), the hyperparameter l is the scale factor of the distance calculation; The posterior distribution of the sparse Gaussian process regression is expressed as: y * ~N(μ,σ) Where μ, σ are the mean and covariance of the sparse Gaussian process regression estimate; x n is the normalized sample set D n Any sample point in, n is the sample set D n The number of samples in x s is the normalized sample subset D s Any sample point in, s is the sample subset D s The number of samples in k f (x i ,x j ) is the covariance function, σ n is the variance of Gaussian white noise of Gaussian process regression; k f (x s ,x * ) = k f (x * ,x s ) is the new input test point x * With the sample subset input point x s The s×1 order covariance matrix of k f (x n ,x s ) = k f (x s ,x n ) is the sample set input point x n With the sample subset input point x s The s×n order covariance matrix of k f (x s ,x s ) is the sample subset itself point x s The s×s symmetric positive definite covariance matrix of .

6. The lithium battery SOC estimation method according to claim 5, It is characterized in that In step S3, the fruit fly optimization algorithm is used to optimize the following hyperparameters of the sparse Gaussian process regression method: σ f , σ n and l.

7. The lithium battery SOC estimation method according to claim 6, It is characterized in that The specific process of optimizing the hyperparameters of the sparse Gaussian process regression method using the fruit fly optimization algorithm is as follows: (1) Parameter initialization: Determine the population size h of the fruit fly, the number of iterations, and initialize the position (X, Y) of the fruit fly population. The calculation formula is: The subscript m in the formula is used to distinguish different optimization parameters; (2) Initialize the flight distance of each fruit fly individual i and determine the distance D(i) from the origin: (3) Through D m (i) Determining the taste concentration judgment value S m (i), S m (i) The calculation formula is S m (i) = 1 / D m (i) and determine the fitness function F, and convert the flavor concentration judgment value S m (i) Substitute its fitness function to find the current optimal flavor concentration S of the fruit fly individual m (i), σ f (i) = S 1 (i),σ n =S 2 (i),l=S 3 (i); The fitness function is the root mean square error of sparse Gaussian process regression; (4) comparing the flavor concentration values ​​of each generation of fruit flies, iteratively retaining the position and flavor concentration of the best value, and recording the best value of each generation of fruit flies; The optimal value is the minimum value of the fitness function, that is, the minimum value of the root mean square error of the sparse Gaussian process regression; (5) Iterate the optimization of the fruit flies to determine whether the number of iterations has been reached. If so, output the minimum value of the best values ​​of all generations of fruit flies. The σ corresponding to this minimum value is f ,l,σ n As the optimal value, if not, return to step (2) and repeat; (6) The optimal σ f ,l,σ n By bringing it into sparse Gaussian process regression, we can obtain the nonlinear relationship between the SOC of the lithium battery and its voltage, current and temperature.

8. The lithium battery SOC estimation method according to claim 1, It is characterized in that The specific method of performing adaptive infinite filtering to obtain the final estimated value in step S5 is: S5.1, taking the SOC value obtained by the ampere meter as the observation quantity, taking the SOC value obtained by regressing all nonlinear relationships based on the sparse Gaussian process as the state quantity, and establishing a state space equation, the state space equation is: SOC L,k =SOC A,k-1 +v k Where: I k-1 is the current at sampling point k-1; ΔT is the sampling time interval; Q n is the rated capacity of the lithium battery, and its value is given by the battery manufacturer; SOC A,k-1 , SOC A,k are the SOC values ​​of sampling points k-1 and k calculated by the ampere timing method; SOC L,k The SOC value of sampling point k calculated by sparse Gaussian process regression; w k and v k They are process noise and observation noise, which are independent and uncorrelated noises; S5.2, Establishing the state transfer equation using the state space equation Perform infinite filtering, where X k ,u k ,Y k Corresponding to the state space equation SOC A,k-1 ,I k-1 ,SOC L,k , A k and C k Equal to 1, D k Equal to 0, B k equal The SOC value is iteratively updated according to the following adaptive infinite filtering algorithm as the final estimated value of the current SOC of the lithium battery to be tested: (a) Based on the idea of ​​game theory, establish the cost function X 0 and are the initial value and initial setting value of the state quantity, P 0 is the initial error covariance matrix, Q k , R k are the state noise covariance matrix and measurement noise covariance matrix of sampling point k respectively; S k It is an artificially set positive definite matrix, specifically set as the unit matrix, and N is the sequence length; (b) Set a boundary condition θ to satisfy The cost function can be obtained: (c) Set X 0 , P 0 ,Q 0 ,R 0 and S k The initial value and sequence length N are calculated (d) According to the cost function and the state transfer equation, the following iterative relationship can be established; Calculate the state estimation prediction for sampling point k Error covariance prior prediction P k - , the gain matrix K k , status update and the error covariance update matrix where I is the identity matrix, is the prior prediction of the state estimate at sampling point k, is the prior prediction of the error covariance of sampling point k, K k is the gain matrix of sampling point k, is the error covariance update matrix of sampling point k, is the state update of sampling point k, Q of sampling point k k and R k It can be calculated by the following formula: Where δ is the forgetting factor, which is 0.99; is the new information matrix; (e) repeat step (d) until the number of cycles reaches the sequence length N; (f) Finally, output all The data is the filtering result and also the final estimated value of the current SOC of the lithium battery to be tested.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the computer program is executed by the processor, the processor is caused to implement the method according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.