A lithium battery SOC estimation method based on ordinary differential equation neural network

By using the ODE-RNN Net model based on ordinary differential equations in lithium battery SOC estimation, combined with the physical information of the equivalent circuit model, the problems of large data volume, high model complexity and poor robustness in the prior art are solved, and higher estimation accuracy and physical interpretability are achieved.

CN119414253BActive Publication Date: 2025-05-02HUNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510025726.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-05-02
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

The prior art faces problems such as large data volume, high model complexity and poor robustness in the accurate estimation of lithium batteries. Traditional neural network models require a large amount of training data and are relatively weak in versatility.

Method used

The lithium battery SOC estimation method based on the neural network of ordinary differential equations is adopted. By constructing an ODE-RNN Net model that integrates the common differential equations with the equivalent circuit model, combining physical information and data driving, the number of model parameters is reduced and the estimation accuracy is improved.

Benefits of technology

It reduces the demand for training data, improves the accuracy of lithium battery modeling and state of charge estimation, reduces the black box properties of the model, and enhances the physical interpretability and robustness of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119414253B_ABST
    Figure CN119414253B_ABST
Patent Text Reader

Abstract

A method for estimating the SOC of a lithium battery based on an ordinary differential equation neural network includes step S1, collecting the voltage and current data of the lithium battery during cyclic charge and discharge to form an original data set; step S2, establishing a second-order RC equivalent circuit model of the lithium battery, determining the state equation, output equation and ordinary differential equation group; step S3, integrating the ordinary differential equation group into a recursive neural network to parameterize hidden units, and establishing an ODE-RNN Net model that integrates the ordinary differential equations of the equivalent circuit model; step S4, initializing the ODE-RNN Net model parameters, and training the ODE-RNN Net model using the original data set; step S5, using the trained ODE-RNN Net model, inputting the current lithium battery operating current, and predicting the subsequent working state output and charge state of the lithium battery. The present invention can reduce the demand for the amount of training data and improve the accuracy of battery modeling and battery charge state estimation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of energy control technology, and in particular to a lithium battery SOC estimation method based on ordinary differential equation neural network. Background Art

[0002] As the primary or secondary energy source of many power systems, the long-term stable operation of batteries is the safety guarantee of power systems. The main factors affecting the long-term stable operation of batteries are their battery status and health life information. During the use of batteries, they will undergo frequent charging and discharging processes. The state of charge reflects the current available power of the battery. Overcharging and over-discharging will cause a serious decline in the health status of the battery. Therefore, during the use of batteries, accurate estimation of the state of charge is crucial to the service life of the battery, and accurate estimation of the health status is of great significance to the safety and reliability of system operation.

[0003] Currently, there are two main challenges in accurately estimating the state of charge and health of batteries:

[0004] On the one hand, there are battery modeling methods and parameter identification. As a highly complex nonlinear system, the battery model is affected by many mutually coupled physical quantities, such as electrode materials, electrolytes, etc. Moreover, the battery is also affected by environmental factors, charge and discharge status, and functional aging factors during actual operation. Therefore, establishing a model that accurately reflects battery characteristics is a prerequisite for accurate estimation of the battery's SOC and SOH. In the battery modeling process, battery models can usually be divided into three categories: electrochemical model, black box model, and equivalent circuit model. Among them, the electrochemical model focuses on the electrochemical mechanism inside the reaction battery, and analyzes the chemical characteristics of the battery from an electrochemical perspective. The model can accurately describe the polarization effect inside the battery, etc. However, the model is highly complex and has many model parameters, and is rarely used in practice; the black box model is a model established through data drive, which only considers the external output characteristics of the battery. Its physical meaning is unclear, and a large amount of training data is required to establish a model with strong generalization; the equivalent circuit model is a battery composed of circuit elements such as resistors and capacitors and voltage sources. Its physical meaning is clear and can be analyzed by mathematical formulas. It is convenient to identify the parameters of the battery model. The most widely used model is the equivalent circuit model. The battery model parameters are identified by the least squares method, but the parameters of the identification process may be over-identified and divergent under different working conditions, and its robustness is poor.

[0005] On the other hand, there is the accurate estimation method of battery SOC and SOH. At present, the most widely used SOC estimation method in practical applications is the ampere-hour integration method. The defect of this method is that it depends on the accuracy of the initial value and current, and the error of the current will continue to accumulate in the integration link. Another battery state estimation method is the neural network method. The battery system is learned through the neural network algorithm. Through a large amount of training data, the neural network model can be well adapted to various battery estimations and realize the pre-estimation of battery SOC and SOH. The disadvantage of this method is that it requires a large amount of experimental data as a training premise and has weak versatility. Another battery estimation method is to estimate the state of the battery using an intelligent prediction algorithm, such as the Kalman filter algorithm. A large part of its estimation results depends on the identification accuracy of the battery model parameters. Summary of the invention

[0006] In order to reduce the demand for training data volume and improve the accuracy of battery modeling and battery state of charge estimation, the present invention provides a lithium battery SOC estimation method based on ordinary differential equation neural network.

[0007] In order to solve the above technical problems, the present invention adopts the following technical method: a lithium battery SOC estimation method based on ordinary differential equation neural network, comprising:

[0008] Step S1, collecting and preprocessing the voltage and current data of the lithium battery during cyclic charge and discharge to form an original data set;

[0009] Step S2, establishing a second-order RC equivalent circuit model of the lithium battery, and determining a state equation, an output equation, and a group of ordinary differential equations of the second-order RC equivalent circuit model of the lithium battery;

[0010] Step S3, integrating the ordinary differential equations obtained in step S2 into the recursive neural network to parameterize the hidden units, and establishing an ODE-RNN Net model integrating the ordinary differential equations of the equivalent circuit model;

[0011] Step S4, initializing the ODE-RNN Net model parameters, and then using the original data set to train the ODE-RNN Net model to optimize the model parameters;

[0012] Step S5, inputting the current working current of the lithium battery into the trained ODE-RNN Net model to predict the subsequent working state output and charge state of the lithium battery.

[0013] Furthermore, in step S2:

[0014] The state equation of the second-order RC equivalent circuit model of a lithium battery is:

[0015] (1)

[0016] In the formula, It is the working current of lithium battery, indicating the charging and discharging current; Represents the two polarization resistances of lithium batteries; Represents the two polarized capacitors of a lithium battery; Represents the two polarization voltages of lithium batteries; and Respectively represent the current state of charge and initial state of charge of the lithium battery; For efficiency; is the rated capacity;

[0017] The output equation of the second-order RC equivalent circuit model of the lithium battery is:

[0018] (2)

[0019] In the formula, Output voltage for lithium battery; is the open circuit voltage of the lithium battery; Indicates the ohmic internal resistance of the lithium battery;

[0020] The ordinary differential equations obtained from the state equation of the second-order RC equivalent circuit model are:

[0021] (3).

[0022] Furthermore, the ODE-RNN Net model integrating the ordinary differential equation of the equivalent circuit model established in step S3 includes an input layer, a hidden layer and an output layer;

[0023] Input layer: input the working current of lithium battery;

[0024] Hidden layer: introduce the ordinary differential equations of the second-order RC equivalent circuit model, calculate and solve the hidden state values ​​of the ODE-RNN Net model, and construct the functional relationship between the open circuit voltage and SOC of the lithium battery to calculate the open circuit voltage;

[0025] Output layer: Output the predicted output voltage of the lithium battery:

[0026] (4)

[0027] (5)

[0028] (6)

[0029] (7)

[0030] In the formula, For lithium battery The predicted output voltage value at the moment; Indicates the open circuit voltage of lithium battery U oc The functional relationship with SOC is constructed through a fully connected layer network; Indicates the hidden state of the ODE-RNN Net model. and parameters ; They respectively represent the two polarization voltages of the lithium battery at the current moment.

[0031] Furthermore, in step S4, the loss function of the ODE-RNN Net model training is set Loss for:

[0032] (8)

[0033] In the formula, represents the root mean square error; is the total number of training data; For lithium battery The predicted output voltage value at the moment; For lithium battery The actual value of the output voltage at that moment.

[0034] Furthermore, in step S4, when training the ODE-RNN Net model, the loss function is calculated with respect to the parameter The gradient of the lithium battery output voltage is used to back propagate the error between the true value and the predicted value to optimize the parameters of the ODE-RNN Net model, which includes the parameters of the ordinary differential equation of the second-order RC equivalent circuit model and the parameters related to the fully connected layer weights of the lithium battery open circuit voltage and SOC.

[0035] Furthermore, in step S4, when calculating the loss function with respect to the parameter When the gradient is:

[0036] First determine the expression of the loss function value, as follows:

[0037] (9)

[0038] In the formula, Represents the loss function value; represents a system of ordinary differential equations; and are the initial time and the end time respectively; means solved by an ordinary differential equation solver;

[0039] Redefine the accompanying state , through this adjoint state, the loss function can be determined with respect to the parameter How the gradient of depends on the hidden state of the ODE-RNN Net model at each moment;

[0040] Finally, the integral of the loss gradient of the hidden state and the ordinary differential equation parameters is calculated through automatic differentiation and ordinary differential equation solver, as shown below:

[0041] (10)

[0042] (11)

[0043] In the formula, middle Indicates transpose.

[0044] Furthermore, in step S5, when predicting the subsequent working state output and charge state of the lithium battery:

[0045] First, input the working current of the lithium battery into the ODE-RNN Net model and give the corresponding hidden state initial value;

[0046] Then, the ODE-RNN Net model is solved using an ordinary differential equation solver as shown in Equation (12). The subsequent polarization voltage and SOC of the lithium battery are obtained:

[0047] (12)

[0048] Then, the output voltage change of the lithium battery under the corresponding working current is calculated according to the following formula (13):

[0049] (13)

[0050] In formulas (12) and (13), For the start time; for After that, the first,…, N a moment; The solved The hidden state value corresponding to each moment; represents a system of ordinary differential equations; For the ODE-RNN Net model Input data corresponding to each moment; Indicates the predicted value of the subsequent output voltage of the lithium battery; It represents the functional relationship between the subsequent open circuit voltage and SOC of the lithium battery; Indicates the subsequent working current of the lithium battery; Indicates the subsequent hidden state value of the lithium battery;

[0051] Finally, based on the obtained SOC and output voltage data of the lithium battery, the end time of charging and discharging under the current working current of the lithium battery is predicted. When the SOC or output voltage of the lithium battery is lower than the set threshold, it is predicted that the discharge of the lithium battery will end at the current moment. When the SOC or output voltage of the lithium battery is higher than the set threshold, it is predicted that the charging of the lithium battery will end at the current moment.

[0052] Furthermore, in step S1, at room temperature, a fixed charge and discharge strategy is adopted to perform a full charge and discharge process on a 18650 lithium battery with a rated capacity of 2Ah, and the lithium battery source operating condition data is collected. The process is as follows:

[0053] 1) First charge the lithium battery to 4.2V at a constant current of 4A, then maintain the charging voltage at 4.2V until the charging current drops to 0.1A, and let it stand for 5 minutes;

[0054] 2) Discharge the lithium battery at a fixed load current level of 2A until the voltage reaches 2.5V, then stop discharging and let it stand for 5 minutes;

[0055] 3) Cycle the charge and discharge process of step 1) and step 2), collect the charge and discharge voltage and current of the lithium battery at constant time intervals, and obtain the lithium battery source operating condition data.

[0056] Preferably, in step S1, the obtained lithium battery source operating condition data is processed for outliers, and the 3σ principle is adopted to delete the abnormal sampling values ​​of the source operating condition data, and then the operating condition data after deleting the abnormal values ​​is normalized to obtain the lithium battery original data set.

[0057] The present invention provides a lithium battery SOC estimation method based on an ordinary differential equation neural network, and estimates the relevant state of the lithium battery through a constructed ODE-RNN Net model. The core of the present invention lies in the ODE-RNN Net model, which incorporates a second-order RC equivalent circuit model containing physical information and a neural network model that learns model parameters from data. Further, the present invention integrates the ordinary differential equation of the second-order RC equivalent circuit model of the lithium battery into the neural network model to construct an ODE-RNN Net model that integrates the ordinary differential equation of the equivalent circuit model, and then solves the ordinary differential equation through ODEsolver to obtain the corresponding hidden state value of the lithium battery, and then substitutes it into the output equation of the second-order RC equivalent circuit model of the lithium battery to obtain the output voltage prediction value of the lithium battery, compares the output voltage prediction value with the real data, and optimizes the established ODE-RNN Net model parameters through the back propagation method, especially the parameters related to the ordinary differential equation, such as polarization network parameters and ohmic internal resistance parameters, and obtains the optimal ODE-RNN Net model parameters through training with real data. It can be seen that the ODE-RNN Net model can learn various behaviors of lithium batteries from real data, and the ODE-RNNNet model has real physical meaning because it incorporates the ordinary differential equations of the second-order RC equivalent circuit model. In summary, the ODE-RNN Net model proposed in the present invention is jointly driven by data and real models, which not only effectively solves the black box nature of conventional data-driven models and the problem that models driven only by data require a large amount of and extensive data to ensure the accuracy of the model, but also establishes the neural network of the model through ordinary differential equations. Compared with the method of establishing a large number of neurons and multiple hidden layers, this method can reduce the number of parameters of the model and solve the problem that traditional neural networks require a large number of training parameters. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 A flow chart of a lithium battery SOC estimation method based on an ordinary differential equation neural network according to the present invention;

[0059] Figure 2 It is a schematic diagram of the second-order RC equivalent circuit model of the lithium battery in the present invention;

[0060] Figure 3 Schematic diagram of the ODE RNN Net model in the present invention;

[0061] Figure 4 This is a block diagram for predicting the SOC and charge and discharge end time of a lithium battery in the present invention. DETAILED DESCRIPTION

[0062] In order to facilitate the understanding of those skilled in the art, the present invention is further described below in conjunction with embodiments and drawings. The contents mentioned in the implementation modes are not intended to limit the present invention.

[0063] Taking into account the problems of poor robustness and low model adaptability of the single model driven method and the problem of black box nature and complicated data requirement of the single data driven method, the present invention intends to integrate the ordinary differential equations of the equivalent circuit model into the recursive neural network to construct an ordinary differential equation neural network model with corresponding physical meaning. When learning data behavior, the model will add corresponding physical information, so it can learn the data behavior and physical behavior of lithium batteries at the same time, making the whole have practical physical meaning and greatly reducing the data volume requirement. Based on this, the present invention provides a lithium battery SOC estimation method based on ordinary differential equation neural network, see Figure 1 , the method comprises the following steps.

[0064] Step S1, collect lithium battery data set and preprocess

[0065] The voltage and current data of the lithium battery charge and discharge cycle are monitored and collected to obtain the lithium battery source operating data. Taking the 18650 lithium battery with a rated capacity of 2Ah as an example, a fixed charge and discharge strategy is adopted to fully charge and discharge the lithium battery at room temperature to collect the output voltage and current operating data of the lithium battery. The experimental steps are as follows:

[0066] 1) First charge the lithium battery to 4.2V at a constant current of 4A, then maintain the charging voltage at 4.2V until the charging current drops to 0.1A, and let it stand for 5 minutes;

[0067] 2) Discharge the lithium battery at a fixed load current level of 2A until the voltage reaches 2.5V, then stop discharging and let it stand for 5 minutes;

[0068] 3) Cycle the charge and discharge process of step 1) and step 2), collect the charge and discharge voltage and current of the lithium battery at constant time intervals, and obtain the lithium battery source operating condition data.

[0069] 4) The obtained lithium battery source operating condition data is processed for outliers. The 3σ principle is used to delete the abnormal sampling values ​​of the source operating condition data, and then the operating condition data after deleting the outliers is normalized:

[0070] (14)

[0071] In the formula, Indicates source operating condition data; and are the maximum and minimum values ​​in the source working condition data respectively; It represents the data set obtained after normalization processing, which is used as the original data set of lithium batteries.

[0072] Step S2: Establishing a second-order RC equivalent circuit model of a lithium battery

[0073] The present invention does not rely on the chemical composition and chemical reaction inside the battery for research, but uses circuit parameters such as resistance and capacitance to form an equivalent circuit model that describes the battery system and electrical performance parameters. The second-order RC equivalent circuit model of a lithium battery is as follows: Figure 2 As shown, the second-order RC equivalent circuit model consists of the following three parts: voltage source U oc 、Ohm internal resistance R 0, and series RC Network. Among them, the voltage source U oc Indicates the open circuit voltage of the lithium battery, which has a nonlinear relationship with the SOC of the lithium battery. R 0 represents the contact resistance of the diaphragm, electrolyte and other materials inside the battery. RC The network reflects the polarization phenomenon inside the lithium battery.

[0074] The state equation of the second-order RC equivalent circuit model of a lithium battery is:

[0075] (1)

[0076] In the formula, It is the working current of lithium battery, indicating the charging and discharging current; Represents the two polarization resistances of lithium batteries; Represents the two polarized capacitors of a lithium battery; Represents the two polarization voltages of lithium batteries; and Respectively represent the current state of charge and initial state of charge of the lithium battery; For efficiency; is the rated capacity.

[0077] The output equation of the second-order RC equivalent circuit model of the lithium battery is:

[0078] (2)

[0079] In the formula, Output voltage for lithium battery; is the open circuit voltage of the lithium battery; Indicates the ohmic internal resistance of the lithium battery.

[0080] The ordinary differential equations obtained from the state equation of the second-order RC equivalent circuit model are:

[0081] (3)

[0082] Will Set to the state value of the lithium battery, when the model parameter When known, the second-order lithium battery RC Substitute each state of the equivalent circuit model into the output equation to calculate the output voltage response of the lithium battery.

[0083] Step S3: Establish an ODE-RNN Net (ordinary differential equation recurrent neural network) model that integrates the differential equation of the equivalent circuit model

[0084] Recurrent neural networks (RNNs) construct complex changes by combining a series of linear and nonlinear transformations into hidden states, where the iteration of hidden variables is as follows:

[0085] (15)

[0086] In the formula, and Represents a recurrent neural network and Hidden variables at time; Represents the functional relationship between RNN hidden variables and parameters; Represents the parameters of RNN.

[0087] In the training process of RNN, a series of discretized data points are trained, and the subsequent iterative updates can also be regarded as the discretization of continuous changes. In formula (15), Considering it as a known set of ordinary differential equations, we can get:

[0088] (16)

[0089] Based on this, incorporating a system of ordinary differential equations into a recurrent neural network can parameterize the hidden units. In simple terms, it can be defined as First, the output layer It is defined as the solution to the initial value problem of the ordinary differential equation (ODE), which can be solved and calculated by an ordinary differential equation solver (ODE Solver).

[0090] The second-order RC equivalent circuit model established in the previous step S2 contains three ordinary differential equations and an output equation. Calculating the output voltage of the lithium battery is converted into solving these ordinary differential equations and the output equation. Therefore, the second-order RC equivalent circuit model is established in the RNN, and each RNN unit is integrated into the second-order RC equivalent circuit model of the lithium battery to form an ODERNN Net model. The solution of each RNN unit is solved by an ODE Slover to solve the ordinary differential equations within the tolerance error limit to solve the corresponding hidden state value. The ODE RNN Net solution process established therein can use the torchdiffeq library based on Pytorch, which is a high-precision and high-efficiency ordinary differential equation solver specially provided for the Pytorch framework. This can use the method of automatically adjusting the step size to solve the ODE. By setting the maximum tolerance error for solving the ordinary differential equation, the corresponding step size can be calculated.

[0091] Solve the hidden state values ​​of the ODE. Since the open circuit voltage value of the output equation is unknown, the open circuit voltage value of the lithium battery has a highly nonlinear functional relationship with the SOC of the battery. Therefore, the present invention constructs an open circuit voltage through a fully connected layer network. Functional relationship with SOC:

[0092] (5)

[0093] According to formula (5), U oc The calculation model and the hidden state value calculated by the ODE RNN Net model can calculate the output voltage response of the lithium battery:

[0094] (4)

[0095] (6)

[0096] (7)

[0097] In formulas (4)-(7), For lithium battery The predicted output voltage value at the moment; Indicates the open circuit voltage of lithium battery U oc The functional relationship with SOC is constructed through a fully connected layer network; Represents the hidden state of the ODE-RNNNet model and parameters ; They respectively represent the two polarization voltages of the lithium battery at the current moment.

[0098] In this way, the ordinary differential equation of the second-order RC equivalent circuit model can be encapsulated into a Moudel class in the form of a neural network. The entire ODE RNN Net model is as follows Figure 3 Specifically, the ODE-RNN Net model constructed by the present invention includes an input layer, a hidden layer and an output layer, wherein:

[0099] Input layer: input the working current of lithium battery.

[0100] Hidden layer: The ordinary differential equation group of the second-order RC equivalent circuit model shown in formula (3) is introduced to calculate and solve the hidden state values ​​of the ODE-RNN Net model, and the functional relationship between the open circuit voltage and SOC of the lithium battery is constructed to calculate the open circuit voltage.

[0101] Output layer: Output the predicted output voltage of the lithium battery.

[0102] As can be seen from the above, the ODE RNN Net model provided by the present invention is a physical and data-co-driven lithium battery model based on an equivalent circuit model and an ordinary differential equation neural network. It combines the advantages of the physical model and the data model, and can effectively predict the subsequent state of the battery under the conditions of a small data set and lightweight model parameters. Since the actual physical meaning of the lithium battery is taken into account, the model no longer has the black box nature of data drive, but is a gray box model with physical interpretability.

[0103] Step S4, initializing the ODE-RNN Net model parameters, and using the original data set to train the ODE-RNN Net model to optimize the model parameters.

[0104] Setting the loss function for ODE-RNN Net model training Loss for:

[0105] (8)

[0106] In the formula, represents the root mean square error; is the total number of training data; For lithium battery The predicted output voltage value at the moment; For lithium battery The actual value of the output voltage at that moment.

[0107] The training process of the ODE-RNN Net model can be seen as optimizing the loss function In the process of back propagating the error calculation on the original data set, consider optimizing the loss function value:

[0108] (9)

[0109] In the formula, Represents the loss function value; represents a system of ordinary differential equations; and are the initial time and the end time respectively; Represents solved by an ordinary differential equation solver.

[0110] In order to optimize the loss function, the present invention needs to calculate the loss function with respect to the parameter The gradient of Can determine the loss function with respect to parameters How does the gradient depend on the hidden state of the ODE-RNN Net model at each moment? :

[0111] (10)

[0112] The integral of the loss gradient of the hidden state and the ordinary differential equation parameters is calculated through automatic differentiation and ordinary differential equation solver, as shown below:

[0113] (11)

[0114] In the formula, middle Indicates transpose.

[0115] By calculating the loss function with respect to the parameters The gradient of the lithium battery output voltage is used to back propagate the error between the true value and the predicted value to optimize the parameters of the ODE-RNN Net model, which includes the parameters of the ordinary differential equation of the second-order RC equivalent circuit model and the parameters related to the fully connected layer weights of the lithium battery open circuit voltage and SOC. Here, the Pytorch third-party library torchdiffeq is used to support back propagation optimization through the solution of ODE through the above adjoint method.

[0116] Step S5, predicting the subsequent working status output and charge state of the lithium battery.

[0117] First, the working current of the lithium battery is input into the ODE-RNN Net model, and the corresponding hidden state initial value is given.

[0118] Then, the ODE-RNN Net model is solved using an ordinary differential equation solver as shown in Equation (12). The subsequent polarization voltage and SOC of the lithium battery are obtained:

[0119] (12)

[0120] Then, the output voltage change of the lithium battery under the corresponding working current is calculated according to the following formula (13):

[0121] (13)

[0122] In formulas (12) and (13), For the start time; for After that, the first,…, N a moment; The solved The hidden state value corresponding to each moment; represents a system of ordinary differential equations; For the ODE-RNN Net model Input data corresponding to each moment; Indicates the predicted value of the subsequent output voltage of the lithium battery; It represents the functional relationship between the subsequent open circuit voltage and SOC of the lithium battery; Indicates the subsequent working current of the lithium battery; Indicates the subsequent hidden state value of the lithium battery.

[0123] Finally, if Figure 4 As shown, based on the obtained SOC and output voltage data of the lithium battery, the end time of charging and discharging under the current working current of the lithium battery is predicted. When the SOC or output voltage of the lithium battery is lower than the set threshold, it is predicted that the discharge of the lithium battery will end at the current moment. When the SOC or output voltage of the lithium battery is higher than the set threshold, it is predicted that the charging of the lithium battery will end at the current moment.

[0124] The above embodiments are preferred implementation schemes of the present invention. In addition, the present invention may also be implemented in other ways. Any obvious replacement without departing from the concept of the present technical solution is within the protection scope of the present invention.

[0125] In order to make it easier for ordinary technicians in the field to understand the improvements of the present invention over the prior art, some drawings and descriptions of the present invention have been simplified, and for the sake of clarity, some other elements are omitted in this application document. Ordinary technicians in the field should realize that these omitted elements may also constitute the content of the present invention.

Claims

1. A lithium battery SOC estimation method based on ordinary differential equation neural network, characterized in that: include: Step S1, collecting and preprocessing the voltage and current data of the lithium battery during cyclic charge and discharge to form an original data set; Step S2, establishing a second-order RC equivalent circuit model of the lithium battery, and determining a state equation, an output equation, and a group of ordinary differential equations of the second-order RC equivalent circuit model of the lithium battery; The state equation of the second-order RC equivalent circuit model of a lithium battery is: (1) In the formula, It is the working current of lithium battery, indicating the charging and discharging current; Represents the two polarization resistances of lithium batteries; Represents the two polarized capacitors of a lithium battery; Represents the two polarization voltages of lithium batteries; and Respectively represent the current state of charge and initial state of charge of the lithium battery; For efficiency; is the rated capacity; The output equation of the second-order RC equivalent circuit model of the lithium battery is: (2) In the formula, Output voltage for lithium battery; is the open circuit voltage of the lithium battery; Indicates the ohmic internal resistance of the lithium battery; The ordinary differential equations obtained from the state equation of the second-order RC equivalent circuit model are: , Step S3, integrating the ordinary differential equations obtained in step S2 into the recursive neural network to parameterize the hidden units, and establishing an ODE-RNN Net model integrating the ordinary differential equations of the equivalent circuit model; The ODE-RNN Net model integrating the ordinary differential equation of the equivalent circuit model includes an input layer, a hidden layer, and an output layer; Input layer: input the working current of lithium battery; Hidden layer: introduce the ordinary differential equations of the second-order RC equivalent circuit model, calculate and solve the hidden state values ​​of the ODE-RNN Net model, and construct the functional relationship between the open circuit voltage and SOC of the lithium battery to calculate the open circuit voltage; Output layer: output the predicted output voltage of the lithium battery; (4) (5) (6) (7) In the formula, For lithium battery The predicted output voltage value at the moment; Indicates the open circuit voltage of lithium battery and The functional relationship is constructed through a fully connected layer network; Indicates the hidden state of the ODE-RNN Net model. and parameters ; Respectively represent the two polarization voltages of the lithium battery at the current moment; Step S4, initializing the ODE-RNN Net model parameters, and then using the original data set to train the ODE-RNN Net model to optimize the model parameters; Step S5, inputting the current working current of the lithium battery into the trained ODE-RNN Net model to predict the subsequent working state output and charge state of the lithium battery.

2. The method for estimating the SOC of a lithium battery based on an ordinary differential equation neural network according to claim 1, characterized in that: In step S4, the loss function of the ODE-RNN Net model training is set Loss for: (8) In the formula, represents the root mean square error; is the total number of training data; For lithium battery The predicted output voltage value at the moment; For lithium battery The actual value of the output voltage at that moment.

3. The method for estimating the SOC of a lithium battery based on an ordinary differential equation neural network according to claim 2, characterized in that: In step S4, when training the ODE-RNN Net model, the loss function is calculated with respect to the parameter The gradient of the lithium battery output voltage is used to back propagate the error between the true value and the predicted value to optimize the parameters of the ODE-RNN Net model, which includes the parameters of the ordinary differential equation of the second-order RC equivalent circuit model and the parameters related to the fully connected layer weights of the lithium battery open circuit voltage and SOC.

4. The method for estimating the SOC of a lithium battery based on an ordinary differential equation neural network according to claim 3, characterized in that: In step S4, when calculating the loss function with respect to the parameter When the gradient is: First determine the expression of the loss function value, as follows: (9) In the formula, Represents the loss function value; represents a system of ordinary differential equations; and are the initial time and the end time respectively; means solved by an ordinary differential equation solver; Redefine the accompanying state , through this adjoint state, the loss function can be determined with respect to the parameter How the gradient of depends on the hidden state of the ODE-RNN Net model at each moment; Finally, the integral of the loss gradient of the hidden state and the ordinary differential equation parameters is calculated through automatic differentiation and ordinary differential equation solver, as shown below: (10) (11) In the formula, middle Indicates transpose.

5. The method for estimating the SOC of a lithium battery based on an ordinary differential equation neural network according to claim 4, characterized in that: In step S5, when predicting the subsequent working state output and charge state of the lithium battery: First, input the working current of the lithium battery into the ODE-RNN Net model and give the corresponding hidden state initial value; Then, the ODE-RNN Net model is solved by an ordinary differential equation solver as shown in the following equation (12); the subsequent polarization voltage and SOC of the lithium battery are obtained; (12) Then, the output voltage change of the lithium battery under the corresponding working current is calculated according to the following formula (13); (13) In formulas (12) and (13), For the start time; for After that, the first,…, N a moment; The solved The hidden state value corresponding to each moment; represents a system of ordinary differential equations; For the ODE-RNN Net model Input data corresponding to each moment; Indicates the predicted value of the subsequent output voltage of the lithium battery; It represents the functional relationship between the subsequent open circuit voltage and SOC of the lithium battery; Indicates the subsequent working current of the lithium battery; Indicates the subsequent hidden state value of the lithium battery; Finally, based on the obtained SOC and output voltage data of the lithium battery, the end time of charging and discharging under the current working current of the lithium battery is predicted. When the SOC or output voltage of the lithium battery is lower than the set threshold, it is predicted that the discharge of the lithium battery will end at the current moment. When the SOC or output voltage of the lithium battery is higher than the set threshold, it is predicted that the charging of the lithium battery will end at the current moment.

6. The method for estimating the SOC of a lithium battery based on an ordinary differential equation neural network according to claim 5, characterized in that: In step S1, at room temperature, a fixed charge and discharge strategy is adopted to perform a full charge and discharge process on a 18650 lithium battery with a rated capacity of 2Ah, and the lithium battery source operating condition data is collected. The process is as follows: 1) First charge the lithium battery to 4.2V at a constant current of 4A, then maintain the charging voltage at 4.2V until the charging current drops to 0.1A, and let it stand for 5 minutes; 2) Discharge the lithium battery at a fixed load current level of 2A until the voltage reaches 2.5V, then stop discharging and let it stand for 5 minutes; 3) Cycle the charge and discharge process of step 1) and step 2), collect the charge and discharge voltage and current of the lithium battery at constant time intervals, and obtain the lithium battery source operating condition data.

7. The method for estimating the SOC of a lithium battery based on an ordinary differential equation neural network according to claim 6, characterized in that: In step S1, the obtained lithium battery source operating condition data is processed for outliers, and the 3σ principle is adopted to delete the abnormal sampling values ​​of the source operating condition data, and then the operating condition data after deleting the outliers is normalized to obtain the lithium battery original data set.

Citation Information

Patent Citations

  • Lithium battery health state estimation method based on neural network ordinary differential equation

    CN114545279A

  • High-precision segmented control method for unmanned vehicles based on ordinary differential neural network

    CN118092160A