Lithium battery capacity prediction model, training method and prediction method
The multi-time step self-attention spiking neural network (MSSA-SNN) architecture is used to extract the global pulse characteristics of lithium batteries, which solves the problems of poor biological rationality and complex calculation of traditional ANN methods in lithium battery capacity prediction, and improves the prediction accuracy and efficiency. Ensure the safe and healthy operation of lithium batteries.
Patent Information
- Application Number
- CN202410674579.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-08-23
AI Technical Summary
The traditional ANN method has poor biological rationality, complex calculation and insufficient generalization ability in lithium battery capacity prediction, resulting in the extracted battery features being inaccurate and difficult to be widely promoted and applied.
Using the multi-time step self-attention spiking neural network (MSSA-SNN) architecture, combined with the static convolution coding module, global feature extraction module and fully connected module, global spiking features are extracted through the spiking convolution coding and self-attention mechanism to improve lithium Accuracy and efficiency of battery capacity prediction.
It achieves high accuracy, efficiency and generalization ability improvement in lithium battery capacity prediction, ensuring the safe and healthy operation of lithium batteries.
Smart Images

Figure CN118534329A
Abstract
Description
Technical Field
[0001] This article relates to the field of lithium battery capacity prediction, and in particular to a lithium battery capacity prediction model, training method and prediction method. Background Art
[0002] At present, artificial neural network (ANN) technology based on deep learning has shown excellent performance in battery capacity prediction and battery health status assessment. For example, convolutional neural network (CNN) is combined with random forest to evaluate battery health status; long short-term memory network (LSTM) is combined with particle swarm optimization algorithm to predict battery capacity; convolutional neural network (CNN) and recurrent neural network (RNN) are combined to predict battery capacity; The traditional ANN-based methods are based on artificial neural networks (ANNs) to achieve accurate end-to-end prediction of battery health status; the wavelet attention framework is combined with artificial neural networks (ANNs) to extract high-value features from the perspective of frequency learning to achieve battery health status prediction; although these methods perform well to a certain extent, the methods based on traditional ANNs still face a series of challenges: the traditional ANN methods have poor biological rationality and cannot accurately simulate the behavior of biological neurons, resulting in inaccurate battery features extracted by traditional ANN methods, resulting in poor generalization ability of the above methods and difficulty in widespread promotion and application; traditional ANN neurons are based on continuous activation functions, which are complex to calculate, require more computing resources, have low computing efficiency, and continuous activation functions do not produce sparse activations, which is not conducive to feature selection. Summary of the invention
[0003] The present application provides a lithium battery capacity prediction model, training method and prediction method. The lithium battery capacity prediction model is based on a multi-time-step self-attention spiking neural network (MSSA-SNN, full name Multi-time-Step Self-Attention--Spiking Neural Network), which realizes the extraction of global pulse features of lithium batteries, obtains enough degradation features of lithium batteries, and improves the accuracy, efficiency and generalization ability of lithium battery capacity prediction.
[0004] On the one hand, an embodiment of the present application provides a lithium battery capacity prediction model, comprising: a static convolutional coding module, a global feature extraction module, and a fully connected module connected in sequence;
[0005] The static convolutional coding module is used to encode the full life cycle data of the lithium battery charge and discharge cycle into a time series matrix with multiple time steps;
[0006] The global feature extraction module includes M feature extraction submodules and the M+1th pulse convolution encoding module connected in sequence, wherein each of the feature extraction submodules includes a pulse convolution encoding module and a multi-time step self-attention module, M is a positive integer greater than or equal to 1, and the global feature extraction module is used to obtain the pulse time information of the time series matrix and perform layer-by-layer extraction of lithium battery health features, realize global pulse feature encoding, and obtain a global pulse feature matrix;
[0007] The fully connected module is used to establish a mapping relationship between features and the health status of the lithium battery according to the global pulse feature matrix, and to predict the capacity of the lithium battery.
[0008] On the other hand, the embodiment of the present application also provides a method for training a lithium battery capacity prediction model, comprising:
[0009] Before and during the cyclic charge-discharge test on N training lithium batteries, full life cycle data corresponding to each lithium battery is obtained as training data, where N is a positive integer;
[0010] Based on the training data, the initial lithium battery capacity prediction model is iteratively trained and gradient replaced and optimized until the loss value calculated according to the loss function is less than or equal to the preset loss threshold, thereby obtaining the trained lithium battery capacity prediction model as described in any one of claims 1 to 4.
[0011] On the other hand, the present application also provides a lithium battery capacity prediction method, including:
[0012] When performing a cyclic charge and discharge test on S lithium batteries to be tested, full life cycle data corresponding to each lithium battery is obtained as test data, where S is a positive integer;
[0013] The data to be tested is input into the lithium battery capacity prediction model as described in the above embodiment, and the lithium battery capacities corresponding to the S lithium batteries to be tested are respectively obtained.
[0014] Compared with the related art, the lithium battery capacity prediction model, training method and prediction method of the embodiments of the present application are based on the convolutional topology architecture of the multi-time-step self-attention pulse neural network (MSSA-SNN), which has strong bio-simulation, small computational complexity, and low resource consumption. It can flexibly and robustly realize the extraction of global pulse characteristics of lithium batteries, obtain enough degradation characteristics of lithium batteries, and use gradient replacement to optimize the neuron synaptic weights of the model during the training process of the lithium battery capacity prediction model, thereby improving the training efficiency of the lithium battery capacity prediction model, and ultimately improving the accuracy, efficiency and generalization ability of lithium battery capacity prediction, thereby ensuring the safe and healthy operation of lithium batteries.
[0015] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by implementing the present application. Other advantages of the present application can be realized and obtained by the schemes described in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings are used to provide an understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0017] Figure 1 is a schematic diagram of a lithium battery capacity prediction model according to an embodiment of the present application;
[0018] Figure 2 is a schematic diagram of a multi-time-step self-attention module in an embodiment of the present application;
[0019] Figure 3 is a schematic diagram of a lithium battery capacity prediction model of a specific example 1 of the present application;
[0020] Figure 4 is a flow chart of a training method for a lithium battery capacity prediction model according to an embodiment of the present application;
[0021] Figure 5 It is a flow chart of the lithium battery capacity prediction method of an embodiment of the present application. DETAILED DESCRIPTION
[0022] The present application describes multiple embodiments, but the description is exemplary rather than restrictive, and it is obvious to those skilled in the art that there may be more embodiments and implementations within the scope of the embodiments described in the present application. Although many possible feature combinations are shown in the drawings and discussed in the specific embodiments, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with any other feature or element in any other embodiment, or may replace any other feature or element in any other embodiment.
[0023] The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements disclosed in the present application may also be combined with any conventional features or elements to form a unique invention scheme defined by the claims. Any features or elements of any embodiment may also be combined with features or elements from other invention schemes to form another unique invention scheme defined by the claims. Therefore, it should be understood that any feature shown and / or discussed in the present application may be implemented individually or in any appropriate combination. Therefore, except for the limitations made according to the attached claims and their equivalents, the embodiments are not subject to other restrictions. In addition, various modifications and changes may be made within the scope of protection of the attached claims.
[0024] In addition, when describing representative embodiments, the specification may have presented the method and / or process as a specific sequence of steps. However, to the extent that the method or process does not rely on the specific order of the steps described herein, the method or process should not be limited to the steps of the specific order described. As will be understood by those of ordinary skill in the art, other sequences of steps are also possible. Therefore, the specific sequence of the steps set forth in the specification should not be interpreted as a limitation to the claims. In addition, the claims for the method and / or process should not be limited to the steps of performing them in the order written, and those skilled in the art can easily understand that these sequences can be changed and still remain within the spirit and scope of the embodiments of the present application.
[0025] At present, lithium batteries have become the preferred power solution in many modern electronic devices and electric vehicles due to their many advantages, such as high energy density, long cycle life, no memory effect, low self-discharge rate, fast charging and discharging, compact size, and environmental friendliness. Accurately predicting the capacity of lithium batteries has become a key technology. It has a wide range of application needs in studying the endurance of electric vehicles, planning the charging time and usage frequency of electronic devices, lithium battery health management, lithium battery product design and optimization, and lithium battery safety assessment. Predicting the capacity of lithium batteries plays an important role in ensuring the reliability, safety, and economic benefits of battery systems. However, due to the complex electrochemical degradation process inside lithium batteries, accurately predicting the capacity of lithium-ion batteries is a challenging task.
[0026] The present application embodiment provides a lithium battery capacity prediction model, including a static convolutional coding module, a global feature extraction module and a fully connected module connected in sequence, such as Figure 1 As shown:
[0027] The static convolutional coding module is used to encode the full life cycle data of the lithium battery charge and discharge cycle into a time series matrix with multiple time steps;
[0028] The global feature extraction module includes M feature extraction submodules and the M+1th pulse convolution encoding module connected in sequence, wherein each of the feature extraction submodules includes a pulse convolution encoding module and a multi-time step self-attention module, M is a positive integer greater than or equal to 1, and the global feature extraction module is used to obtain the pulse time information of the time series matrix and perform layer-by-layer extraction of lithium battery health features, realize global pulse feature encoding, and obtain a global pulse feature matrix;
[0029] The fully connected module is used to establish a mapping relationship between features and the health status of the lithium battery according to the global pulse feature matrix, and to predict the capacity of the lithium battery.
[0030] In this embodiment, the static convolutional coding module is a learnable encoder, which can be constructed based on a convolutional neural network (CNN) or a recurrent neural network (RNN). Its input data is the full life cycle data of the lithium battery's cyclic charge and discharge. The static convolutional coding module is used to perform a linear convolution operation between the input data and the convolution kernel, perform static feature extraction on the full life cycle data of the lithium battery, and implement preliminary information encoding. The full life cycle data of the lithium battery is mapped to a neuron activation state, and a time series matrix of multiple time steps is output. The dimension of the time series matrix of multiple time steps is T*C*L, where T represents the time step, C represents the number of channels, L represents the static feature length, and C*L represents the number of static features in each time step. The time series matrix of multiple time steps is used as input data for the global feature extraction module.
[0031] In this embodiment, the global feature extraction module includes M+1 pulse convolution coding modules and M multi-time step self-attention modules that are alternately connected in sequence. These M+1 pulse convolution coding modules and M multi-time step self-attention modules are constructed based on a pulse neural network (SNN for short, full name Spiking Neural Network), including at least 2 pulse convolution coding modules and 1 multi-time step self-attention module, that is, at least 1 feature extraction submodule and another pulse convolution coding module; compared with traditional artificial neural networks, SNN uses pulse time coding to simulate communication between neurons. Each neuron accumulates input pulses over time, and generates output pulses and performs calculations only when a certain threshold is reached. It has stronger biological rationality, small amount of calculation, saves system calculation overhead, and is more suitable for processing time series data, which is convenient for extracting features of lithium battery life cycle data.
[0032] In this embodiment, the global feature extraction module is based on biological neurons, with a convolutional topology architecture as its core, and has excellent spatiotemporal pulse feature encoding capabilities. It is characterized by sparse connections, weight sharing, and hierarchical learning. It can fully realize pulse feature filtering and aggregate valuable information flows, and can realize hierarchical pulse learning representation of lithium battery life cycle data, and realize layer-by-layer pulse feature extraction of lithium battery health characteristics from low-level to high-level, obtain sufficient and deep lithium battery aging characteristics, and output a global pulse feature matrix, which provides a data basis for accurate lithium battery capacity prediction.
[0033] In this embodiment, the dimension of the global pulse feature matrix is still T*C*L, where T represents the time step, C represents the number of channels, L represents the global pulse feature length, and C*L represents the number of global pulse features in each time step.
[0034] In this embodiment, the fully connected module uses the global pulse feature matrix as input data, maps the input data to the output space, establishes a mapping relationship between the feature and the health status of the lithium battery, and outputs the prediction result - the lithium battery capacity.
[0035] The lithium battery capacity prediction model of this embodiment is based on the convolutional topology architecture of the multi-time-step self-attention spike neural network (MSSA-SNN), has strong bio-simulation, small computational complexity, and low resource usage, and can flexibly and robustly extract the global pulse characteristics of the lithium battery, obtain enough degradation characteristics of the lithium battery, and improve the accuracy and efficiency of the lithium battery capacity prediction, thereby ensuring the safe and healthy operation of the lithium battery.
[0036] In an exemplary embodiment, each of the feature extraction submodules can be used to extract features from a corresponding input matrix to generate a corresponding sub-feature matrix
[0037] The M+1th pulse convolutional coding module can be used to generate the sub-feature matrix generated by the Mth feature extraction submodule. Performing feature extraction to generate the global pulse feature matrix;
[0038] Among them, the input matrix of the first feature extraction submodule is the time series matrix; the input matrices of the second to the Mth feature extraction submodules are the sub-feature matrices generated by the first to the M-1th feature extraction submodules respectively.
[0039] Among them, the M+1 pulse convolutional coding modules all perform feature extraction based on pulse neural networks.
[0040] In this embodiment, each feature extraction submodule includes two sequentially connected modules: a pulse convolution encoding module and a multi-time-step self-attention module. In each feature extraction submodule, the output matrix of the pulse convolution encoding module serves as the input matrix of the multi-time-step self-attention module.
[0041] In this embodiment, the global feature extraction module may include multiple feature extraction submodules, and the output matrix of the previous feature extraction submodule, i.e., the sub-feature matrix As the input matrix of the next feature extraction submodule.
[0042] In an exemplary embodiment, the multi-time-step self-attention module in each of the feature extraction submodules may include: a Q convolutional coding module, a K convolutional coding module, a V convolutional coding module, a first matrix multiplication module, a softmax module, a second matrix multiplication module, and a residual link module, such as Figure 2 As shown;
[0043] The Q convolutional coding module is used to encode the initial feature matrix Pulse convolution coding is performed to generate a query vector Q, and the initial feature matrix The encoding result of the pulse convolution encoding module in the feature extraction submodule;
[0044] The K convolutional coding module is used to encode the initial feature matrix Perform pulse convolution coding to generate a key vector K;
[0045] The V convolutional encoding module is used to encode the initial feature matrix Perform pulse convolution coding to generate a value vector V;
[0046] The first matrix multiplication module is used to perform matrix multiplication calculation on the query vector Q and the key vector K time by time step and encode the product to generate an attention score Φ;
[0047] The softmax module is used to normalize the attention score Φ to obtain a normalized attention score
[0048] The second matrix multiplication module is used to multiply the standard attention score Perform matrix multiplication with the value vector V and encode the product to generate the attention weight optimization feature matrix
[0049] The residual link module is used to generate the sub-feature matrix corresponding to the feature extraction sub-module according to the first formula The first formula is: in, is the learnable weight;
[0050] Among them, the M Q convolutional coding modules, the M K convolutional coding modules, and the M V convolutional coding modules all perform feature extraction based on pulse neural networks.
[0051] In this embodiment, each pulse convolution encoding module is provided with multiple convolution kernels. When the multiple convolution kernels are performing feature extraction, the convolution kernels are independent of each other and will not affect each other. Each convolution kernel is responsible for specific feature extraction and learns different feature representations respectively. The feature representations extracted by each convolution kernel are independent of each other. Therefore, the global feature extraction module is also provided with a multi-time-step self-attention module; the multi-time-step self-attention module can process the feature representation based on a global perspective, establish mutual connections between each feature representation, and obtain global pulse feature information.
[0052] In this embodiment, the Q convolutional coding module, the K convolutional coding module, and the V convolutional coding module can all be modules with a 1*1 convolution kernel; the first matrix multiplication module and the second matrix multiplication module can be constructed based on the matrix multiplication function Matmul; the attention score Φ represents the degree of association between each query vector Q and each key vector K, which is essentially a set of weight data; the softmax module is constructed based on the softmax function and is used to normalize the attention score Φ, including appropriately scaling or normalizing Φ so that the sum of the attention scores corresponding to each query vector Q is 1, and outputs the standardized attention score Will As the input data of the second matrix multiplication module; the attention weights optimize the feature matrix Established The association relationship between each value vector V; the residual link module solves the problem of gradient disappearance in deep pulse neural networks and inputs the initial feature matrix of the multi-time step self-attention module It is directly passed to the next pulse convolutional encoding module, which enhances the feature learning expression ability of the multi-time-step self-attention module and facilitates the capture of more complex feature information.
[0053] In an exemplary embodiment, the fully connected module may include a time step prediction module and a lithium battery capacity prediction result generation module;
[0054] The time step prediction module is used to generate a corresponding time step prediction result according to each time step of the global pulse feature matrix, and generate T time step prediction results in total;
[0055] The lithium battery capacity prediction result generation module is used to calculate the mean of the T time step prediction results, and output the mean result as the lithium battery capacity prediction result.
[0056] In this embodiment, the time step prediction module predicts the global pulse feature matrix in time steps. The global pulse feature matrix has a total of T time steps, and the number of global pulse features in each time step is C*L; for each time step, prediction is performed based on C*L pulse features to obtain the time step prediction result corresponding to the time step Among them, 1≤t≤T.
[0057] In this embodiment, the lithium battery capacity prediction result generation module is used to calculate T The mean value of is calculated as in, It is the lithium battery capacity prediction result obtained according to the lithium battery capacity prediction model.
[0058] To further illustrate the lithium battery capacity prediction model of the present application, the lithium battery capacity prediction model is described in detail using a specific example 1. Figure 3 As shown:
[0059] In this example, there are two feature extraction sub-modules, namely, the global feature extraction module includes three pulse convolution coding modules and two multi-time step self-attention modules that are connected alternately in sequence, and the static convolution coding module, the two feature extraction sub-modules, the pulse convolution coding module, and the fully connected module are connected in sequence to constitute the lithium battery capacity prediction model of this example, wherein each feature extraction sub-module includes a static convolution coding module and a multi-time step self-attention module that are connected in sequence, and the fully connected module includes a time step prediction module and a lithium battery capacity prediction result generation module that are connected in sequence; this example is only used as an illustrative description and is not used as a limitation of the lithium battery capacity prediction model of this application. In actual applications, the number of feature extraction sub-modules of the lithium battery capacity prediction model can be any number, and this article will not go into details one by one.
[0060] The present application embodiment also provides a method for training a lithium battery capacity prediction model, including steps S100-S200, such as Figure 4 Shown:
[0061] S100: Before and during the cyclic charge-discharge test on N training lithium batteries, respectively obtain the full life cycle data corresponding to each lithium battery as training data, where N is a positive integer;
[0062] S200: Based on the training data, the initial lithium battery capacity prediction model is iteratively trained and gradient replaced and optimized until the loss value calculated according to the loss function is less than or equal to a preset loss threshold, thereby obtaining a trained lithium battery capacity prediction model as described in the above embodiment.
[0063] In this embodiment, the loss value calculated by the loss function in step S200 is used as the evaluation standard of the lithium battery capacity prediction model, and the mean square error (MSE for short, full name Mean Squared Error), root mean square error (RMSE for short, full name Root Mean Squared Error), mean absolute error (MAE for short, full name Mean Absolute Error), determination coefficient (R 2 -Score) as the loss function, and the following are various loss function formulas:
[0064]
[0065] In the above formula, is the lithium battery capacity prediction result of the nth training lithium battery, is the actual capacity of the nth training lithium battery, For N The average value; when MSE, RMSE, and MAE are used as loss functions, the smaller the calculated loss value, the better the performance of the lithium battery capacity prediction model; when R 2 When -Score is used as the loss function, the larger the calculated loss value is, the better the performance of the lithium battery capacity prediction model is.
[0066] In this embodiment, during forward propagation, the pulse neural network in the global feature extraction module uses the Heaviside step transition function Θ(x) to simulate the neuron discharge process; during back propagation, due to the non-differentiability of the step transition function, if Θ(x) continues to be used, it is difficult to perform gradient propagation and gradient update, and efficient model training cannot be achieved. Therefore, the gradient substitution method is used for gradient propagation during back propagation to optimize the neuron synaptic weights, simplify the model training process, and improve the training efficiency of the lithium battery capacity prediction model.
[0067] In an exemplary embodiment, step S100 may include steps S110-S120:
[0068] For each of the lithium batteries, the following operations are performed:
[0069] S110: before the charge and discharge test, obtaining the initial battery capacity, initial remaining life and initial electrochemical impedance spectrum of the lithium battery;
[0070] S120: After each cycle of the charge and discharge test, the battery capacity, remaining life and electrochemical impedance spectrum of the lithium battery are obtained.
[0071] The full life cycle data of the lithium battery includes the initial battery capacity, the initial remaining life and the initial electrochemical impedance spectrum, and the battery capacity, the remaining life and the electrochemical impedance spectrum of all cycles.
[0072] In this embodiment, an AC voltage signal with varying frequency can be applied to the lithium battery, and then the AC response of the lithium battery can be measured. By analyzing the frequency dependence between the applied excitation signal and the response signal, the impedance data of the lithium battery from low frequency to high frequency can be obtained, that is, the electrochemical impedance spectrum (EIS for short) of the lithium battery. The electrochemical impedance spectrum includes a real part and an imaginary part, wherein the real part can represent the resistance component, and the imaginary part can represent the capacitance component, which can provide the complex electrochemical process inside the lithium battery.
[0073] In this embodiment, a "battery capacity-remaining life curve" can be obtained based on the initial battery capacity and initial remaining life obtained before the charge and discharge test, and the battery capacity and remaining life obtained after each cycle of the charge and discharge test. When the lithium battery capacity prediction model is actually used, the remaining life of the lithium battery can be obtained based on the lithium battery capacity predicted by the lithium battery capacity prediction model and the "battery capacity-remaining life curve".
[0074] In an exemplary embodiment, step S200 may include steps S210-S230:
[0075] The following steps are executed in a loop, wherein the current lithium battery capacity prediction model during the first iteration training is the initial lithium battery capacity prediction model:
[0076] S210: Input the full life cycle data corresponding to the N training lithium batteries into the current lithium battery capacity prediction model respectively, and perform forward propagation according to the initial electrochemical impedance spectrum and the electrochemical impedance spectrum to obtain the lithium battery capacity prediction results corresponding to the N training lithium batteries respectively.
[0077] S220: Calculate the loss value according to the loss function, wherein the parameters of the loss function include N and the actual capacities corresponding to the N training lithium batteries The actual capacity including the initial battery capacity and the battery capacity;
[0078] S230: Determine the relationship between the loss value and the preset loss threshold. When the loss value is greater than the preset loss threshold, use an optimizer to optimize the parameters of the current lithium battery capacity prediction model, including using a gradient substitution algorithm to optimize the global feature extraction module, to obtain the current lithium battery capacity prediction model for the next iterative training.
[0079] In an exemplary embodiment, in step S210, when performing forward propagation, each pulse convolutional coding module and each multi-time-step self-attention module of the global feature extraction module can use a pulse neural network convolutional coding method to extract features;
[0080] The pulse neural network convolutional coding method realizes the pulse information transmission mechanism of neurons based on the Heaviside step transition function Θ(x). x represents the spiking neural network membrane potential.
[0081] In an exemplary embodiment, the optimization of the global feature extraction module using a gradient substitution algorithm in step S230 may include steps S231-S233:
[0082] S231: For each pulse convolutional coding module and each multi-time-step self-attention module in the global feature extraction module, during back propagation, use a continuous function Replacing the Heaviside step transition function Θ(x) used in the forward propagation;
[0083] S232: Differentiate ATan(x) to obtain a gradient replacement function
[0084] S233: using the gradient substitution function to perform reverse gradient propagation and parameter update;
[0085] Among them, α represents a hyperparameter.
[0086] In this embodiment, during back propagation, although the gradient replacement function is used The generated gradient is not completely correct, but it has been shown to be very effective in training deep spiking neural network models.
[0087] The present application also provides a lithium battery capacity prediction method, including steps S300-S400, such as Figure 5 Shown:
[0088] S300: when performing a cyclic charge and discharge test on S lithium batteries to be tested, respectively obtaining full life cycle data corresponding to each lithium battery as test data, where S is a positive integer;
[0089] S400: Inputting the test data into the lithium battery capacity prediction model described in the above embodiment, and respectively obtaining the lithium battery capacities corresponding to the S lithium batteries to be tested.
[0090] In this embodiment, when step S300 obtains the full life cycle data of the S lithium batteries to be tested respectively, the same method as steps S110-S120 can be used to obtain the battery capacity, remaining life and electrochemical impedance spectrum corresponding to the S lithium batteries to be tested respectively.
[0091] In order to illustrate the technical effects of the embodiments of the present application, two specific examples (Specific Example 2 and Specific Example 3) are used below to describe in detail the application effects of the lithium battery capacity prediction model of the present application in the field of lithium battery capacity prediction.
[0092] Specific example 2: Predicting the capacity of lithium batteries for Eunicell lithium batteries
[0093] First, this example collects the full life cycle data of ten lithium-ion button batteries of model LR2032. Among them, eight batteries (numbered 2501-2508) were subjected to cyclic charge and discharge tests at a temperature of 25°C, and the other two batteries (numbered 3501-3502) were subjected to cyclic charge and discharge tests at a temperature of 35°C. In each cycle of the charge and discharge test, the lithium battery was charged to a voltage of 4.2V at a current of 45mA, and discharged to a voltage of 3V at a current of 90mA, and then the electrochemical impedance spectroscopy EIS data was obtained.
[0094] Among them, the batteries numbered 2502 and 3502 are used as lithium batteries to be tested, and the remaining batteries are used as training lithium batteries. According to the training method of the lithium battery capacity prediction model of the embodiment of the present application, the initial lithium battery capacity prediction model is trained using the full life cycle data of the training lithium battery, and the trained lithium battery capacity prediction model is obtained: MSSA-SNN MODEL1. In order to quantitatively evaluate the prediction effect of MSSA-SNN MODEL1, Table 1 shows the performance of the lithium battery capacity prediction model constructed by MSSA-SNN MODEL1 and the other five methods for the batteries numbered 2502 and 3502, and the performance evaluation indicators all use MSE, RMSE, MAE, R 2 -Score is evaluated separately, and the other five methods are:
[0095] Multi-SNN: consists of multiple spiking fully connected layers, trained and optimized using a surrogate gradient algorithm;
[0096] Conv-SNN: It consists of multiple spike convolutional layers and fully connected layers, and uses dropout for regularization. It also uses the alternative gradient algorithm for training and optimization.
[0097] DNN: A fully connected model based on deep neural networks (DNN for short), which contains three fully connected layers with 180, 256, and 256 hidden layers respectively;
[0098] Bi-LSTM: uses three bidirectional long short-term memory (LSTM) units and the number of hidden layers is set to 256;
[0099] CNN-LSTM: It integrates the advantages of CNN and LSTM, first uses the convolution layer for feature pre-extraction, and then uses multiple LSTM units to obtain battery degradation information.
[0100] As shown in Table 1, for batteries 2502 and 3502, the MSE, RMSE, and MAE of MSSA-SNN MODEL1 are all smaller than those of the other five models.2 -Score is greater than that of the other five models, that is, the lithium battery capacity prediction model of the embodiment of the present application has good performance in both batteries 2502 and 3502, and is not only better than DNN, Bi-LSTM, and CNN-LSTM based on traditional neural networks, but also better than the existing Multi-SNN and Conv-SNN based on pulse neural networks.
[0101] Since the degradation patterns of lithium batteries of the same model are very different at 25°C and 35°C, it is difficult for the same model to achieve good performance on both 2502 and 3502 batteries. The lithium battery capacity prediction model MSSA-SNNMODEL1 of the embodiment of the present application has good performance on both 2502 and 3502 batteries, indicating that the lithium battery capacity prediction model of the embodiment of the present application has excellent generalization performance and can be applied to lithium battery degradation patterns at different temperatures.
[0102] Table 1 Performance comparison of six Eunicell lithium battery capacity prediction models
[0103]
[0104] Specific example 3: Predicting the capacity of lithium batteries for Powerstream lithium batteries
[0105] First, this example collects the full life cycle data of 16 lithium-ion button batteries (numbered 1-16) of model LiR2032. Cyclic charge and discharge tests are performed at a temperature of 25°C. In each cycle of the charge and discharge test, the charging current is controlled at 70-140mA or 35-105mA during charging, and the discharge current is set at 52.5mA during discharging. Then, electrochemical impedance spectroscopy (EIS) data is obtained.
[0106] Among them, the batteries numbered 1-12 are used as training lithium batteries, and the batteries numbered 13-16 are used as lithium batteries to be tested. According to the training method of the lithium battery capacity prediction model of the embodiment of the present application, the initial lithium battery capacity prediction model is trained using the full life cycle data of the training lithium battery, and the trained lithium battery capacity prediction model is obtained: MSSA-SNN MODEL2. In order to quantitatively evaluate the prediction effect of MSSA-SNN MODEL2, Table 2 shows the performance of the lithium battery capacity prediction model constructed by MSSA-SNN MODEL2 and other five methods for the batteries numbered 13-16, and the performance evaluation indicators all use MSE, RMSE, MAE, R 2-Score are evaluated respectively. The other five methods are the same as the other five methods in specific example 2, namely: Multi-SNN, Conv-SNN, DNN, Bi-LSTM, CNN-LSTM. In addition, for each model, Table 2 also includes MSE, RMSE, MAE, R 2 -The average values corresponding to the scores (average value of MSE: average value of the 4 MSEs corresponding to batteries 13-16; average value of RMSE: average value of the 4 RMSEs corresponding to batteries 13-16; average value of MAE: average value of the 4 MAEs corresponding to batteries 13-16; R 2 -Score average: 4 Rs corresponding to batteries 13-16 2 -Score average).
[0107] As shown in Table 2, for batteries 13, 14, and 16, the MSE, RMSE, and MAE of MSSA-SNN MODEL2 are all smaller than those of the other five models. 2 -Score is greater than that of the other five models, that is, the lithium battery capacity prediction model of the embodiment of the present application has good performance in batteries 13, 14 and 16, not only better than DNN, Bi-LSTM, CNN-LSTM based on traditional neural networks, but also better than the existing Multi-SNN and Conv-SNN based on pulse neural networks; for battery 15, the performance of MSSA-SNN MODEL2 is second only to Conv-SNN. These results show that the lithium battery capacity prediction model of the embodiment of the present application has good performance.
[0108] Table 2 Performance comparison of six lithium battery capacity prediction models of Powerstream
[0109]
[0110] Specific Example 2 and Specific Example 3 both prove that the lithium battery capacity prediction model based on the multi-time-step self-attention pulse neural network (MSSA-SNN) of the embodiment of the present application has excellent lithium battery capacity prediction capabilities. MSSA-SNN has powerful bionic characteristics and neuron-based information transmission mechanisms. The multi-time-step self-attention module further improves the performance of the model based on the pulse neural network, so that the global feature extraction module of the embodiment of the present application has the ability to encode global pulse features and can pay more attention to valuable pulse performance.
[0111] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
Claims
1. A lithium battery capacity prediction model, It is characterized in that include: A static convolutional coding module, a global feature extraction module, and a fully connected module connected in sequence; The static convolutional coding module is used to encode the full life cycle data of the lithium battery charge and discharge cycle into a time series matrix with multiple time steps; The global feature extraction module includes M feature extraction submodules and the M+1th pulse convolution encoding module connected in sequence, wherein each of the feature extraction submodules includes a pulse convolution encoding module and a multi-time step self-attention module, M is a positive integer greater than or equal to 1, and the global feature extraction module is used to obtain the pulse time information of the time series matrix and perform layer-by-layer extraction of lithium battery health features, realize global pulse feature encoding, and obtain a global pulse feature matrix; The fully connected module is used to establish a mapping relationship between features and the health status of the lithium battery according to the global pulse feature matrix, and to predict the capacity of the lithium battery.
2. The lithium battery capacity prediction model according to claim 1, Features: Each of the feature extraction submodules is used to extract features from the corresponding input matrix and generate a corresponding sub-feature matrix The M+1th pulse convolutional coding module is used to process the sub-feature matrix generated by the Mth feature extraction submodule. Performing feature extraction to generate the global pulse feature matrix; Among them, the input matrix of the first feature extraction submodule is the time series matrix; the input matrices of the second to the Mth feature extraction submodules are the sub-feature matrices generated by the first to the M-1th feature extraction submodules respectively. Among them, the M+1 pulse convolutional coding modules all perform feature extraction based on pulse neural networks.
3. The lithium battery capacity prediction model as claimed in claim 2, It is characterized in that The multi-time-step self-attention modules in each of the feature extraction submodules respectively include: a Q convolutional coding module, a K convolutional coding module, a V convolutional coding module, a first matrix multiplication module, a softmax module, a second matrix multiplication module, and a residual link module; The Q convolutional coding module is used to encode the initial feature matrix Pulse convolution coding is performed to generate a query vector Q, and the initial feature matrix The encoding result of the pulse convolution encoding module in the feature extraction submodule; The K convolutional coding module is used to encode the initial feature matrix Perform pulse convolution coding to generate a key vector K; The V convolutional encoding module is used to encode the initial feature matrix Perform pulse convolution coding to generate a value vector V; The first matrix multiplication module is used to perform matrix multiplication calculation on the query vector Q and the key vector K time by time step and encode the product to generate an attention score Φ; The softmax module is used to normalize the attention score Φ to obtain a normalized attention score The second matrix multiplication module is used to multiply the standard attention score Perform matrix multiplication with the value vector V and encode the product to generate the attention weight optimization feature matrix The residual link module is used to generate the sub-feature matrix corresponding to the feature extraction sub-module according to the first formula The first formula is: in, is the learnable weight; Among them, the M Q convolutional coding modules, the M K convolutional coding modules, and the M V convolutional coding modules all perform feature extraction based on pulse neural networks.
4. The lithium battery capacity prediction model as claimed in claim 1, Features: The fully connected module includes a time step prediction module and a lithium battery capacity prediction result generation module; The time step prediction module is used to generate a corresponding time step prediction result according to each time step of the global pulse feature matrix, and generate T time step prediction results in total; The lithium battery capacity prediction result generation module is used to calculate the mean of the T time step prediction results, and output the mean result as the lithium battery capacity prediction result.
5. A training method for a lithium battery capacity prediction model, It is characterized in that include: Before and during the cyclic charge-discharge test on N training lithium batteries, full life cycle data corresponding to each lithium battery is obtained as training data, where N is a positive integer; Based on the training data, the initial lithium battery capacity prediction model is iteratively trained and gradient replaced and optimized until the loss value calculated according to the loss function is less than or equal to the preset loss threshold, thereby obtaining the trained lithium battery capacity prediction model as described in any one of claims 1 to 4.
6. The training method of the lithium battery capacity prediction model according to claim 5, It is characterized in that Before and during the cyclic charge and discharge test on the N training lithium batteries, the full life cycle data corresponding to each lithium battery is obtained as training data, including: For each of the lithium batteries, the following operations are performed: Before the charge and discharge test, obtaining the initial battery capacity, initial remaining life and initial electrochemical impedance spectrum of the lithium battery; After each cycle of the charge and discharge test, the battery capacity, remaining life and electrochemical impedance spectrum of the lithium battery are obtained; The full life cycle data of the lithium battery includes the initial battery capacity, the initial remaining life and the initial electrochemical impedance spectrum, and the battery capacity, the remaining life and the electrochemical impedance spectrum of all cycles.
7. The training method of the lithium battery capacity prediction model according to claim 5, It is characterized in that The method of iteratively training and gradient substitution optimization the initial lithium battery capacity prediction model based on the training data until the loss value calculated according to the loss function is less than or equal to a preset loss threshold, and obtaining a trained lithium battery capacity prediction model includes: The following steps are executed in a loop, wherein the current lithium battery capacity prediction model during the first iteration training is the initial lithium battery capacity prediction model: The full life cycle data corresponding to the N training lithium batteries are respectively input into the current lithium battery capacity prediction model, and forward propagation is performed according to the initial electrochemical impedance spectrum and the electrochemical impedance spectrum to obtain the lithium battery capacity prediction results corresponding to the N training lithium batteries respectively. The loss value is calculated according to the loss function, wherein the parameters of the loss function include N and the actual capacities corresponding to the N training lithium batteries The actual capacity including the initial battery capacity and the battery capacity; Determine the relationship between the loss value and the preset loss threshold. When the loss value is greater than the preset loss threshold, use an optimizer to optimize the parameters of the current lithium battery capacity prediction model, including optimizing the global feature extraction module using a gradient substitution algorithm to obtain the current lithium battery capacity prediction model for the next iterative training.
8. The training method of the lithium battery capacity prediction model according to claim 7, Features: During the forward propagation, each pulse convolutional coding module and each multi-time-step self-attention module of the global feature extraction module all use a pulse neural network convolutional coding method to extract features; The pulse neural network convolutional coding method realizes the pulse information transmission mechanism of neurons based on the Heaviside step transition function Θ(x). x represents the spiking neural network membrane potential.
9. The training method of the lithium battery capacity prediction model according to claim 8, It is characterized in that The global feature extraction module is optimized by using a gradient substitution algorithm, including: For each pulse convolutional coding module and each multi-time-step self-attention module in the global feature extraction module, during back propagation, a continuous function is used. Replacing the Heaviside step transition function Θ(x) used in the forward propagation; Differentiate ATan(x) to obtain the gradient replacement function Using the gradient substitution function to perform reverse gradient propagation and parameter update; Here, α represents a hyperparameter.
10. A lithium battery capacity prediction method, It is characterized in that include: When performing a cyclic charge and discharge test on S lithium batteries to be tested, full life cycle data corresponding to each lithium battery is obtained as test data, where S is a positive integer; The test data is input into the lithium battery capacity prediction model as described in any one of claims 1 to 4, and the lithium battery capacities corresponding to the S lithium batteries to be tested are respectively obtained.
