A method for estimating the health status of lithium batteries based on neural network ordinary differential equations
By applying neural network ordinary differential equations and meta-learning pruning technology in lithium-ion battery health assessment, a lightweight model is constructed, which solves the accuracy problem of lithium-ion battery health assessment and improves the prediction accuracy and safety of the battery management system. sex.
Patent Information
- Application Number
- CN202210175767.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-24
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-02-24
AI Technical Summary
Existing technology makes it difficult to accurately assess the health status of lithium-ion batteries in practical applications, resulting in large errors in battery aging prediction and affecting the accuracy and safety of the battery management system.
Using ordinary differential equations (ODE network) based on neural networks combined with meta-learning pruning technology to build a lightweight lithium battery health state estimation model, optimize the network structure and hyperparameters to adapt to the limited computing power of embedded devices and improve prediction accuracy .
It achieves high-precision lithium battery health status prediction on devices with limited computing power, reduces the computing pressure on the battery management system, and improves battery service life and safety.
Smart Images

Figure CN114545279B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lithium battery health status assessment, and in particular to a lithium battery health status estimation method based on a neural network ordinary differential equation. Background Art
[0002] With the over-exploitation and consumption of energy and the increasingly serious environmental degradation, the electric vehicle industry has developed rapidly. Batteries are the power source of new energy vehicles and determine the endurance of electric vehicles, which is equivalent to the fuel tank of fuel vehicles. As one of the "three major components" of electric vehicles (battery, motor and electronic control), the technical level of power batteries determines the energy conversion efficiency and driving safety of vehicles. In recent years, with the rise of electric vehicles and the development of battery technology, the energy density and power intensity of batteries have also been greatly improved. Therefore, reliable management of high-energy-density power batteries is particularly important. The battery management system (BMS) is the core of power battery technology. Its main functions include: real-time monitoring of basic parameters, battery status estimation, fault diagnosis and early warning, thermal management, etc. As one of the core functions of the battery management system, the prediction accuracy and robustness of battery health status prediction restrict the development of battery management systems. Lithium-ion batteries are widely used in electric vehicles because of their advantages such as long cycle life, high energy density and low cost. In the actual operation process, the electrode material properties of lithium-ion batteries are partially destroyed, and the physical and chemical structures inside the battery will change, resulting in the gradual attenuation of battery performance. Battery aging is an irreversible process. Battery temperature, different charge and discharge rates, overcharge and over discharge and other bad usage habits will accelerate battery aging. How to evaluate the battery's state of health (SOH) is very important for the battery management system on electric vehicles. In addition, accurate prediction of the battery's SOH is also important for accurately estimating other information about the battery. When estimating the battery's state of charge (SOC), if the battery's SOH can be accurately estimated, the prediction accuracy of SOC can be improved. In addition, accurate battery SOH will also provide useful information for battery balancing control. Related studies have shown that parameters related to battery aging rate, such as charge and discharge rate, depth of discharge, ambient temperature, and storage conditions, determine the working state of the battery. If more information about battery aging can be obtained, the battery's service life can be increased and safety accidents can be avoided.
[0003] The battery state of health (SOH) is mainly used to evaluate the performance of the battery by judging the degree of battery aging, that is, the battery life. Under actual working conditions, the ever-changing environment and the battery's own working state will affect the battery aging rate. Related experiments show that the factors affecting the battery SOH include temperature, number of cycles, charge and discharge current, battery internal resistance, etc. At the same time, factors such as excessive charge and discharge of the battery, external force impact, or long-term operation in a corrosive environment will have an irreversible effect on the battery life and damage the battery, which may seriously affect driving safety.
[0004] The difficulty in accurately estimating SOH lies in the selection of features. The internal chemical reactions of lithium-ion batteries are complex under actual working conditions, and it is relatively complicated to establish a mathematical model. There is a nonlinear relationship between the influencing factors and the SOH itself, and the selection of influencing factors is closely related to the construction of the model. If the main influencing factors are ignored during the selection process, it will cause a large prediction error. Therefore, when building a prediction model, it is necessary to collect battery parameters related to the model (temperature, internal resistance, etc.) to improve the prediction accuracy. Due to the poor adaptability of some models, there are differences in the parameters of the input model, which makes it difficult to quantify uniformly. Therefore, it is very important to find a suitable method to build a prediction model.
[0005] In order to build a good prediction model through artificial neural network, a high-performance network structure and a large amount of training data are essential. However, in the process of building the network structure, blindly deepening the network depth and width in pursuit of higher performance is not suitable for practical applications. In actual application scenarios, the limited computing power of embedded development devices cannot well support large-scale deep artificial neural networks. It is very necessary to find the most suitable network structure to evaluate the health status of lithium batteries while meeting the prediction accuracy requirements. Summary of the invention
[0006] The present invention provides a lithium battery health state estimation method based on neural network ordinary differential equations, proposes a method of applying a lightweight network, neural network ordinary differential equations (ODE network) to the SOH estimation, and uses meta-learning pruning to further optimize the hyperparameters of the ODE network and optimize the network structure.
[0007] The present invention is achieved through the following technical solutions:
[0008] A method for estimating the health status of a lithium battery based on a neural network ordinary differential equation comprises the following steps:
[0009] Step 1: preprocess the collected lithium battery data set to obtain the original data set;
[0010] Step 2: classify the original data set into a training data set and a test data set;
[0011] Step 3: inputting the training data set into the lightweight ODE network obtained by meta-learning pruning, training the lightweight ODE network to obtain the predicted capacity of the lithium battery, and testing the trained lightweight ODE network by using the test data set;
[0012] Step 4: Input the data of the lithium battery to be estimated into the trained lightweight OED network to obtain the predicted capacity of the lithium battery, and obtain the predicted health status of the lithium battery through the predicted capacity and the rated capacity of the lithium battery.
[0013] As an optimization, in step 1, the lithium battery data set is preprocessed to obtain the original data set, specifically by performing a charge and discharge cycle on each lithium battery, and the cycle step specifically includes:
[0014] Step 1.1, fully charge the lithium battery at a constant current of 1.38A;
[0015] Step 1.2, discharge the lithium battery at a constant voltage for a period of time;
[0016] Step 1.3, let the lithium battery stand for a while to stabilize the battery temperature;
[0017] Step 1.4, discharge the lithium battery at a constant current of 2.9A for a period of time until the power of the lithium battery is 0, and then let it stand for a period of time;
[0018] Step 1.5, repeat steps 1.1 to 1.4 several times, and collect several lithium battery data obtained in step 1.4 as the original data set z(t_0).
[0019] As an optimization, the original data set includes the current value, voltage value, temperature value during each 2.9A constant current discharge of the lithium battery, the time factor as the time point for collecting the current value, voltage value, and temperature value, and the total amount of electricity dropped by the lithium battery. The total amount of electricity dropped by the lithium battery is defined as the capacity value.
[0020] As an optimization, the ODE network includes a neural network f obtained by automatically searching for neural network ordinary differential equations through meta-learning and an ordinary differential equation solver ODESolver. In step 3, the training data set is input into the lightweight ODE network obtained after meta-learning pruning. The specific steps of training the lightweight ODE network to obtain the predicted capacity of the lithium battery are:
[0021] Step 3.1, determining the step size of the ODESolver by using an error tolerance parameter;
[0022] Step 3.2: input the original data set and the neural network conversion function f(θ) into the ODE network, and calculate the back propagation error of the ODE network to obtain the predicted capacity of the lithium battery.
[0023] As an optimization, in step 3.1, the error tolerance includes relative error tolerance and absolute error tolerance.
[0024] As an optimization, in step 3.2, the calculation steps of the back propagation error of the ODE network are as follows:
[0025] Step 3.21, define the hidden layer at the current moment as: h c+1 =h c +f(h c ,θ c ),
[0026] Where f is the neural network obtained by automatically searching for neural network ordinary differential equations through meta-learning, θ is the inherent parameter of the neural network, c is the number of network layers, and h is c is the output of the hidden layer, h∈R D ;
[0027] Step 3.22, integrate the hidden layer and calculate the value of the hidden layer:
[0028] h(c)=∫f(c,h(c),θ c )dc;
[0029] Step 3.23, calculate h(c) by using the ODESolver:
[0030] y=h(c1)=ODESolver(h(c0),t0,t1,θ,f);
[0031] Among them, t0 and t1 correspond to the start time and end time of differentiation respectively, and θ represents the parameters of the neural network;
[0032] Step 3.24, calculate the back propagation error of the ODESolver through the loss function, the loss function is as follows:
[0033] L(t0,t1,θ c )=L(ODESolver(h(c0),t0,t1,θ,f)).
[0034] As an optimization, the specific calculation method of the back propagation error of the original data set is as follows:
[0035] Step 3.241, input the original data set into the first 4*25 linear fully connected layer and the second 25*4 linear fully connected layer in sequence to obtain a first intermediate result set;
[0036] Step 3.242, input the first intermediate result set and the first data set into the odeint function to calculate the second intermediate result set;
[0037] Step 3.243, input the second intermediate result set into the third linear fully connected layer of 4*25 and the fourth linear fully connected layer of 25*2 in sequence to obtain the predicted capacity of the lithium battery and the time t_p corresponding to the predicted capacity.
[0038] As an optimization, in step 3.2, when calculating the back propagation error of the original data set, the loss gradient of the hidden layer and the parameters of the hidden layer is calculated, and then the integral of the loss gradient of the hidden layer and the parameters of the hidden layer is calculated by ODESolver:
[0039]
[0040]
[0041] in, t0 and t1 correspond to the start and end time of differentiation respectively, and z(t) represents the hidden state at each moment.
[0042] As an optimization, the rated capacity NC of the lithium battery is the total amount of electricity that decreases when the lithium battery is discharged at a constant current of 2.9A to 0 in the first charge and discharge cycle of the lithium battery. The predicted capacity of the lithium battery obtained in step 4 is C, and the battery health status SOH of the lithium battery is:
[0043]
[0044] As an optimization, the specific process of automatically searching the neural network ordinary differential equation through meta-learning to obtain the neural network transfer function f is:
[0045] Training a PruningNet for providing network weights when inputting a network structure vector into the PrunedNet to obtain a pruned network;
[0046] The validation set is used to evaluate the network performance of several constructed pruned networks to obtain the pruned network with the best network performance. The pruned network with the best performance is the neural network f obtained by automatically searching the ordinary differential equations of the neural network through meta-learning.
[0047] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0048] 1. Taking into account the limited computing power of the mobile platform, the present invention applies the neural network of the lightweight neural network ordinary differential equation (ODE) to the prediction of lithium battery SOH, which provides a way of lightweighting the practical application of lithium battery SOH prediction and reduces the pressure on the overall lightweighting of the DMS system.
[0049] 2. The present invention improves the ordinary neural network ordinary differential equation, adds a data enhancement mechanism, proposes an enhanced neural network ordinary differential equation (AUG-ODENet), strengthens the network's feature extraction of SOH strongly correlated variables, and achieves better lithium battery SOH prediction accuracy on the basis of fewer overall network layers. That is, a neural network f is added to the ordinary ODE network, and then the output of this small network is added to the main network. The most fundamental difference is that the basic framework of the network structure is changed, which will have a better prediction effect than the ordinary ODE network.
[0050] 3. The present invention applies meta-pruning in the ODE network to simplify the network structure and reduce the number of network parameters, thereby achieving the effect of further streamlining and lightweighting the ODE network and improving the accuracy of the neural network in predicting the SOH of lithium batteries. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:
[0052] Figure 1 The overall technical flow chart of a lithium battery health state estimation method based on a neural network ordinary differential equation according to the present invention;
[0053] Figure 2 Schematic diagram of the difference in step size between residual network and ODE network;
[0054] Figure 3 It is a schematic diagram of the structure of the ODE network;
[0055] Figure 4 It is a structural schematic diagram of Recognition in a lithium battery health state estimation method based on a neural network ordinary differential equation according to the present invention;
[0056] Figure 5 It is a schematic diagram of the structure of a decoder in a lithium battery health state estimation method based on a neural network ordinary differential equation according to the present invention;
[0057] Figure 6 A back propagation path diagram of a loss function in a lithium battery health state estimation method based on a neural network ordinary differential equation according to the present invention;
[0058] Figure 7 This is a meta-learning pruning flowchart in a lithium battery health state estimation method based on a neural network ordinary differential equation described in the present invention. DETAILED DESCRIPTION
[0059] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0060] The present invention aims to solve the application difficulties of estimating the SOH of lithium batteries using data-driven methods. Because most of the current methods of estimating the SOH of lithium batteries using neural networks adopt deep large networks, which have high computing power requirements for the construction of platforms for practical applications. However, in practical application scenarios, such as smart vehicles, it is impossible to build a very expensive high-performance platform for a battery BMS, so the lightweight deployment problem of lithium battery SOH comes into being. The present invention proposes a feasible method to solve this problem.
[0061] Specifically, the present invention proposes to apply a lightweight network, Neural Ordinary Differential Equations (ODE network) to the estimation of SOH, and use meta-pruning to further optimize the hyperparameters and network structure of the ODE network.
[0062] The specific estimation method is shown in Example 1
[0063] Example
[0064] A method for estimating the health status of a lithium battery based on a neural network ordinary differential equation comprises the following steps:
[0065] Step 1: pre-process the collected lithium battery data set to obtain an original data set. In this embodiment, the lithium battery data set uses a battery public data set from the University of Maryland.
[0066] In this embodiment, in step 1, preprocessing the lithium battery data set to obtain the original data set is specifically to perform a charge and discharge cycle on each lithium battery, and the cycle step specifically includes:
[0067] Step 1.1, fully charge the lithium battery at a constant current of 1.38A;
[0068] Step 1.2, the lithium battery is discharged at a constant voltage for a period of time; here, the constant voltage discharge is used for 2522 seconds, that is, the discharge is about 42 minutes. In the present invention, after discharging for 2522 seconds, the capacity value of the battery is recorded.
[0069] Step 1.3: Let the lithium battery stand for a while to stabilize the battery temperature; here it is about 300 seconds, which is about 5 minutes.
[0070] Step 1.4, discharge the lithium battery at a constant current of 2.9A for a period of time until the power of the lithium battery is 0, and then let it stand for a period of time;
[0071] Step 1.5, repeat steps 1.1 to 1.4 several times, and collect several lithium battery data obtained in step 1.4 as the original data set Z(t_0).
[0072] In this embodiment, the original data set includes the current value, voltage value, temperature value during each 2.9A constant current discharge of the lithium battery, the time factor as the time point for collecting the current value, voltage value, and temperature value, and the total amount of electricity dropped by the lithium battery. The total amount of electricity dropped by the lithium battery is defined as the capacity value.
[0073] like Figure 1 As shown in the figure, the University of Maryland Lithium Battery Public Dataset (CALCE) is preprocessed, and each charge and discharge cycle adopts the following process: first, it is fully charged with a constant current of 1.38A, and then it is discharged at a constant voltage for a period of time, and then the battery is left to stand for a period of time to stabilize the battery temperature, and then it is discharged at a constant current of 2.9A, and then it is left to stand for a period of time before the next charge and discharge cycle.
[0074] The process of discharging the battery at a constant current of 2.9A until it is empty is called a cycle. The current, voltage, temperature and time factors of the battery during the discharge process at a constant current of 2.9A are extracted. Since the current and voltage data are collected every 2s, while the temperature data is collected every 1s, the temperature factor is sampled at intervals so that the four battery status factors are at the same time frequency, and the four battery status factors are combined into a four-dimensional vector X. The total amount of electricity that decreases during the entire discharge process is taken as the total capacity Y of the current battery, and it is input into the model training together as the label of X.
[0075] Step 2: Classify the original data set into a training data set and a test data set.
[0076] Specifically, the processed original data set is divided into a test data set and a training data set in a ratio of 3:7 for subsequent training and testing stages.
[0077] Step 3: inputting the training data set into the lightweight ODE network obtained by meta-learning pruning, training the lightweight ODE network to obtain the predicted capacity of the lithium battery, and testing the trained lightweight ODE network by using the test data set;
[0078] Use artificial neural networks for ordinary differential equations (Neural ODE) as the basic network structure to build a network model, combine neural networks with ordinary differential equations, and use ODE networks to make predictions. The currently constructed ODE network uses an adaptive ODEsolver, which does not move a fixed step size like the Euler method. On the contrary, it selects an appropriate step size to approximate the true solution based on a given error tolerance. This allows the neural network to adjust the error tolerance according to the accuracy requirements to achieve a balance between the required accuracy and calculation time. Figure 2 As shown in the figure, the residual network on the left defines a discrete sequence of finite transformations, which is a discrete number of layers from 0 to 1 to 5, and a nonlinear transformation is performed at each layer through the activation function. In addition, the black evaluation position can be regarded as a neuron, which will perform a transformation on the input to correct the transmitted value, while the ODE network on the right defines a vector field, the hidden state will have a continuous transformation, and the black evaluation point will also be automatically adjusted according to the error tolerance.
[0079] The ODE network structure is as follows Figure 3 As shown, its basic structure is a continuous neural network f and an ordinary differential equation solver ODE Solver, where the neural network f performs a nonlinear transformation on the input data Z(t_0) to obtain f(Z(t_0), θ), and then the ODE Solver integrates f and adds the initial input data Z(t_0) to obtain the final prediction result.
[0080] In actual application, the neural network f is a lightweight network structure function found by meta-learning. Before using ODE Solver, it is necessary to determine the relative error tolerance and absolute error tolerance of ODE Solver to determine the calculation step size. Then, the neural network f, the initial input data Z(t_0) of the battery, and the tolerance parameters (relative error tolerance and absolute error tolerance) are input into ODE Solver and the back propagation error is calculated to obtain the back propagation gradient of the ODE Solver method.
[0081] The specific steps are:
[0082] Step 3.1, determining the step size of the 0DESolver by the error tolerance parameter;
[0083] Step 3.2: input the original data set and the neural network conversion function f(θ) into the ODE network, and calculate the back propagation error of the ODE network to obtain the predicted capacity of the lithium battery.
[0084] In this embodiment, in step 3.1, the error tolerance includes relative error tolerance and absolute error tolerance.
[0085] Relative error tolerance and absolute error tolerance are parameters in 0DESolver, which can be customized. The size of relative tolerance and absolute tolerance can control the solver's approximation strategy: whether to reduce tolerance to achieve higher accuracy or increase tolerance to obtain faster fitting speed. Here we take the default relative tolerance and absolute tolerance, and the default tolerance range is Tol=1e-3.
[0086] In this embodiment, in step 3.2, the calculation steps of the back propagation error of the ODE network are as follows:
[0087] Step 3.21, define the hidden layer at the current moment as: h c+1 =h c +f(h c ,θ c ), where f is the neural network obtained by automatically searching for neural network ordinary differential equations through meta-learning, θ is the neural network's own parameters, c is the number of network layers, and h is c is the output of the hidden layer, h c ∈R D .h c ∈R D That is h c All are real numbers.
[0088] The built-in parameters here refer to the parameters in the neural network f, that is, the weights of each neuron in the neural network f.
[0089] Unlike traditional neural networks, ordinary differential equation artificial neural networks propose to replace the discrete number of layers between the input domain and the output domain, and make the changes in the hidden layer continuous, where h(c) is the value of the hidden state calculated for a certain network layer c, which can be understood as continuous:
[0090] Step 3.22, integrate the hidden layer and calculate the value of the hidden layer:
[0091] h(c)=∫f(c,h(c),θ c )dc;
[0092] Step 3.23, calculate h(c) by using the ODESolver:
[0093] y=h(c1)=ODESolver(h(c0),t0,t1,θ,f);
[0094] Among them, t0 and t1 correspond to the start time and end time of differentiation respectively, and θ represents the parameters (weights and parameters) of the neural network.
[0095] Step 3.24: Calculate the back propagation error of the ODESolver through the loss function, that is, dynamically back propagate (reverse mode integration) through continuous hidden states. The loss function is as follows:
[0096] L(t0,t1,θ c )=L(ODESolver(h(c0),t0,t1,θ,f)).
[0097] In the back propagation path, Loss is defined as the average of the parameters calculated by Recognition and Decoder and the actual value. The structure of Recognition is as follows: Figure 4 , the structure of Decoder is as follows Figure 5 ;
[0098] In this embodiment, the specific calculation method of calculating the back propagation error of the original data set is as follows:
[0099] Step 3.241, input the original data set into the first 4*25 linear fully connected layer and the second 25*4 linear fully connected layer in sequence to obtain a first intermediate result set;
[0100] Step 3.242, input the first intermediate result set and the first data set into the odeint function to calculate the second intermediate result set pred_z;
[0101] Step 3.243, input the second intermediate result set into the third linear fully connected layer of 4*25 and the fourth linear fully connected layer of 25*2 in sequence to obtain the predicted capacity of the lithium battery and the time t_p corresponding to the predicted capacity of the lithium battery charging and discharging process.
[0102] Linear is a linear fully connected layer, the input dimension and output dimension can be customized. Figure 6 and Figure 7 The weights of the two linear functions after ODESlover are different, and their weights can be set according to the actual situation.
[0103] The capacity prediction target of the present invention is SOH, that is, the current maximum capacity of the battery (the maximum capacity will continue to decay during the use of the battery), so the network model of the present invention inputs all the current, voltage, temperature and time of the entire discharge process of the battery into the network, and then outputs a current maximum capacity value of the battery. Therefore, the output time represents a sequence, and this time can be understood as the number of battery charging and discharging processes.
[0104] The specific back propagation path is as follows: Figure 6 ,
[0105] In this embodiment, in step 3.2, when calculating the back propagation error of the original data set, in order to reduce the error, it is necessary to find the gradient of these parameters (the influence of each neuron's weight on the overall error, that is, the normal neural network neuron gradient). Like traditional deep learning back propagation, the first step is to calculate the loss gradient relative to the hidden layer state h(t) Finally, the loss gradient of the loss function L for each parameter (hidden layer and its own parameters) is calculated, and then the integral of the loss gradient of the hidden layer and its own parameters is calculated by ODESolver:
[0106]
[0107] in, t0 and t1 correspond to the start time and end time of differentiation respectively. These two times can be understood as the start time and end time of the ordinary neural network derivation process. z(t) represents the hidden state at each moment.
[0108] ODESolver can be used to calculate the integral of these loss gradients, so that the network training process can be successfully solved. ODESolver can be understood as a callable function, whose input is the previous neural network f(g), the data to be predicted, and the parameters relative error tolerance (relative tolerance) and absolute error tolerance (absolute tolerance) that determine the step size. Then the ODESolver function will calculate the corresponding prediction results.
[0109] Step 4: Input the data of the lithium battery to be estimated into the trained lightweight OED network to obtain the predicted capacity of the lithium battery, and obtain the predicted health status of the lithium battery through the predicted capacity and the rated capacity of the lithium battery.
[0110] In this embodiment, the rated capacity NC of the lithium battery is the total amount of electricity that is reduced when the lithium battery is discharged at a constant current of 2.9A to 0 in the first charge and discharge cycle of the lithium battery. The predicted capacity of the lithium battery obtained in step 4 is C, and the battery health status SOH of the lithium battery is:
[0111]
[0112] like Figure 7 As shown, in this embodiment, meta-learning pruning (Meta_pruning) is used to optimize the hyperparameters and network structure of neural ODEs. For neural ODEs neural network, the network structure that needs to be found is the neural network structure before entering ODESolver. The network structure searched by the meta-learning pruning method is further trained by ODESlover to achieve the required prediction accuracy requirements. The specific process of automatically searching the neural network ordinary differential equation through meta-learning to obtain the neural network f is:
[0113] Training a PruningNet for providing network weights when inputting a network structure vector into the PrunedNet to obtain a pruned network;
[0114] The network weights are the parameters between neurons. For example, the network to be pruned has 1,000 neurons, and after being connected, there are 2,000 weights. Then, after training, the PruningNet will randomly provide parameters to the network to be pruned within a predetermined range according to the previously determined constraints. There is a certain probability that the provided weights are 0, and a weight of zero means that the neuron is discarded, thus achieving the effect of pruning the network structure by removing neurons. For example, PruningNet provides 1,000 sets of weights, which generates 1,000 neural networks with the same basic framework but different structural weights. These 1,000 neural networks are then used to verify the data sets, and the neural network with the best effect (highest accuracy) is selected as the pruned network after pruning.
[0115] The validation set is used to evaluate the performance of several constructed pruned networks to obtain the pruned network with the best performance. The pruned network with the best performance is the neural network f obtained by automatically searching the ordinary differential equations of the neural network through meta-learning. There is no fine-tuning or retraining of the network during the search time, so the search process is very efficient.
[0116] It has been verified that the ODE network built by the present invention has a Flops of 8.3M and a parameter volume of 5666, which is an extremely small lightweight network. It has been verified that under the computing conditions of AMD Ryzen 5 3500X, the entire network training can be completed within 300s and achieve an accuracy of more than 90%.
[0117] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for estimating the health status of a lithium battery based on a neural network ordinary differential equation, characterized in that: The steps include: Step 1: preprocess the collected lithium battery data set to obtain the original data set; Step 2: classify the original data set into a training data set and a test data set; Step 3: inputting the training data set into the lightweight ODE network obtained by meta-learning pruning, training the lightweight ODE network to obtain the predicted capacity of the lithium battery, and testing the trained lightweight ODE network by using the test data set; The ODE network includes a neural network f obtained by automatically searching for neural network ordinary differential equations through meta-learning and an ordinary differential equation solver ODESolver. The specific process is: Train a PruningNet to provide network weights when inputting a network structure vector to PrunedNetworks to obtain a pruned network; The validation set is used to evaluate the performance of several constructed pruned networks to obtain the pruned network with the best performance. The pruned network with the best performance is the neural network f obtained by automatically searching the ordinary differential equation of the neural network through meta-learning. In step 3, the training data set is input into the lightweight ODE network obtained by meta-learning pruning, and the specific steps of training the lightweight ODE network to obtain the predicted capacity of the lithium battery are: Step 3.1, determining the step size of the ODESolver by using an error tolerance parameter; Step 3.2, inputting the original data set and the neural network f into the ODE network, and calculating the back propagation error of the ODE network to obtain the predicted capacity of the lithium battery; In step 3.2, the calculation steps of the back propagation error of the ODE network are as follows: Step 3.21, define the hidden layer at the current moment as: h c+1 =h c +f(h c ,θ c ), Where f is the neural network obtained by automatically searching for neural network ordinary differential equations through meta-learning, θ is the inherent parameter of the neural network, c is the number of network layers, and h is c is the output of the hidden layer, h∈R D ; Step 3.22, integrate the hidden layer and calculate the value of the hidden layer: h(c)=∫f(c,h(c),θ c )dc; Step 3.23, calculate h(c) by using the ODESolver: y=h(c)=ODESolver(h(c),t0,t1,θ,f); Among them, t0 and t1 correspond to the start time and end time of differentiation respectively, and θ represents the parameters of the neural network; Step 3.24, calculate the back propagation error of the ODESolver through the loss function, the loss function is as follows: L(t0,t1,θ c )=L(ODESolver(h(c),t0,t1,θ,f)); The specific calculation method of calculating the back propagation error of the original data set is as follows: Step 3.241, input the original data set into the first 4*25 linear fully connected layer and the second 25*4 linear fully connected layer in sequence to obtain a first intermediate result set; Step 3.242, input the first intermediate result set and the first data set into the odeint function to calculate the second intermediate result set; Step 3.243: Input the second intermediate result set into the third linear fully connected layer of 4*25 and the fourth linear fully connected layer of 25*2 in sequence to obtain the predicted capacity of the lithium battery and the time t_p corresponding to the predicted capacity. Step 4: Input the data of the lithium battery to be estimated into the trained lightweight OED network to obtain the predicted capacity of the lithium battery, and obtain the predicted health status of the lithium battery through the predicted capacity and the rated capacity of the lithium battery.
2. The method for estimating the health status of a lithium battery based on a neural network ordinary differential equation according to claim 1, characterized in that: In step 1, the lithium battery data set is preprocessed to obtain the original data set, specifically by performing a charge and discharge cycle on each lithium battery, and the cycle step specifically includes: Step 1.1, fully charge the lithium battery at a constant current of 1.38A; Step 1.2, discharge the lithium battery at a constant voltage for a period of time; Step 1.3, let the lithium battery stand for a while to stabilize the battery temperature; Step 1.4, discharge the lithium battery at a constant current of 2.9A for a period of time until the power of the lithium battery is 0, and then let it stand for a period of time; Step 1.5, repeat steps 1.1 to 1.4 several times, and collect several lithium battery data obtained in step 1.4 as the original data set Z(t_0).
3. The method for estimating the health status of a lithium battery based on a neural network ordinary differential equation according to claim 2, characterized in that: The original data set includes the current value, voltage value, temperature value, time factor of the time point for collecting the current value, voltage value, and temperature value during each 2.9A constant current discharge of the lithium battery, and the total amount of electricity dropped by the lithium battery. The total amount of electricity dropped by the lithium battery is defined as the capacity value.
4. The method for estimating the health status of a lithium battery based on a neural network ordinary differential equation according to claim 1, characterized in that: In step 3.1, the error tolerance includes relative error tolerance and absolute error tolerance.
5. The method for estimating the health status of a lithium battery based on a neural network ordinary differential equation according to claim 1, characterized in that: In step 3.2, when calculating the back propagation error of the original data set, the loss gradient of the hidden layer and the parameters of the hidden layer is calculated, and then the integral of the loss gradient of the hidden layer and the parameters of the hidden layer is calculated by ODESolver: in, t0 and t1 correspond to the start and end time of differentiation respectively, and z(t) represents the hidden state at each moment.
6. The method for estimating the health status of a lithium battery based on a neural network ordinary differential equation according to claim 2, characterized in that: The rated capacity NC of the lithium battery is the total amount of electricity that is reduced when the lithium battery is discharged at a constant current of 2.9A to 0 in the first charge and discharge cycle of the lithium battery. The predicted capacity of the lithium battery obtained in step 4 is C, and the battery health status SOH of the lithium battery is:
