Lithium battery SOH prediction method based on Times Net-BiGRU neural network
By converting the SOH data of lithium batteries from one dimension to two dimensions and combining the TimesNet-BiGRU neural network of the BiGRU layer, the complexity problem of timing information characterization and prediction in the SOH prediction of lithium batteries is solved, achieving a more stable and accurate Predict the effect.
Patent Information
- Application Number
- CN202411050141.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-11-15
AI Technical Summary
The existing SOH prediction methods of lithium batteries have limitations when expressing complex timing information, especially the single timing analysis method is prone to gradient vanishing problems, resulting in prediction instability.
The method based on TimesNet-BiGRU neural network is adopted to convert one-dimensional time series into two-dimensional space for modeling, and combined with the BiGRU layer to reduce the problem of gradient vanishing, improve model stability and prediction effect.
Through the combination of two-dimensional space timing analysis and BiGRU layer, the limitations of single timing expression are broken through, the prediction effect of SOH in lithium batteries is enhanced, and the stability and accuracy of prediction are improved.
Smart Images

Figure CN118962457A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of lithium-ion battery fault prediction and health management, and specifically relates to a lithium battery SOH prediction method based on TimesNet-BiGRU neural network. Background Art
[0002] As a clean energy with high energy density and long service life, lithium-ion batteries are currently widely used in energy storage systems. However, lithium batteries will naturally age over time, and their performance may decline or even cause safety problems due to problems such as improper human operation. At present, the evaluation technology for the state-of-health (SOH) of lithium batteries is not yet fully mature. On the one hand, there are errors and noises in the measurement by the sensor, and on the other hand, there are differences in the aging process of lithium batteries under different working conditions. Therefore, accurate lithium battery SOH is of great significance.
[0003] In recent years, prediction methods for lithium battery SOH have emerged, which can be divided into physical model-based methods and data-driven methods. The physical model-based method models and simulates according to the internal and external characteristics of lithium batteries. However, the generalization ability of this method is relatively weak, and different models need to be established for different types of batteries, and its effect varies greatly with the selection of models. In addition, relying solely on a single equivalent circuit model cannot fully reflect the changes inside the battery, and the effect is not good in practical applications.
[0004] With the explosive growth of data volume, data-driven methods have received widespread attention. This method does not require detailed analysis of the internal chemical reactions and external characteristics of lithium batteries. It only needs to use various parameters recorded during the use of lithium batteries to make a relatively accurate estimate of SOH. At present, neural networks such as RNN, LSTM, CNN, Transformer, and Informer have been widely used in SOH estimation. First, according to the principle of battery aging, we clearly know that the capacity decreases with the increase of charge and discharge cycles, which shows that the lithium battery SOH data can be regarded as a long-term time series. However, past neural network prediction methods almost all directly modeled from one-dimensional time series, which is extremely challenging for the actual complex lithium battery SOH. This modeling method ignores the correlation between signal values during a single charge and discharge and between charge and discharge at different times. Due to the limitations of one-dimensional time series in terms of expressive power, this correlation is difficult to accurately present only on one-dimensional time series. To overcome this limitation, we explored the two-dimensional structure of time changes, which can clearly present the changes within and between time periods, thus having greater advantages in characterization ability and facilitating subsequent feature learning, but using only this method is prone to gradient vanishing problems and the prediction is not stable. Summary of the invention
[0005] Therefore, the present invention provides a lithium battery SOH prediction method based on TimesNet-BiGRU neural network to solve the above problems, comprising the following steps:
[0006] S1: Charge and discharge a certain number of lithium batteries multiple times, and collect physical information of the lithium batteries during the test, including voltage, current, and temperature;
[0007] S2: Preprocess the data and construct the required data set, including: training set and validation set. The ratio of training set to validation set is 4:1.
[0008] S3: Build TimesNet-BiGRU neural network prediction model;
[0009] TimesNet-BiGRU neural network prediction model, including: improved TimesNet neural network part and BiGRU part;
[0010] S4: Training of TimesNet-BiGRU neural network using training dataset;
[0011] S5: Use the TimesNet-BiGRU lithium battery SOH prediction model to predict the validation dataset.
[0012] Beneficial effects of the present invention:
[0013] Aiming at the problem of characterizing and predicting complex time series information, the present invention proposes a time series analysis backbone network TimesNet to analyze one-dimensional time series changes from a two-dimensional space perspective, and transforms the original multi-period one-dimensional time series into two-dimensional space to achieve modeling of changes between and within cycles, perform feature extraction, break through the limitations of one-dimensional space expression, and enhance the characterization ability;
[0014] Aiming at the problem of gradient vanishing easily in the single time series analysis backbone network TimesNet, the present invention adds a BiGRU layer to establish a TimesNet-BiGRU neural network prediction model, which is used to alleviate the gradient vanishing problem and improve the model stability. In addition, the BiGRU can perform parallel calculations to accelerate the computing efficiency and prediction speed, effectively enhancing the prediction effect of lithium battery SOH. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 TimesNet-BiGRU neural network structure diagram of the present invention;
[0016] Figure 2 This is a flow chart of the lithium battery SOH prediction method based on the TimesNet-BiGRU neural network of the present invention. DETAILED DESCRIPTION
[0017] The present invention proposes a lithium battery SOH prediction method based on TimesNet-BiGRU, comprising the following steps:
[0018] S1: Obtaining limited charge and discharge data of lithium battery cycles;
[0019] S2: Preprocess the data and construct the required data set;
[0020] S3: Build TimesNet-BiGRU neural network prediction model;
[0021] S4: Training of TimesNet-BiGRU neural network using training dataset;
[0022] S5: Use the TimesNet-BiGRU lithium battery SOH prediction model to predict the validation dataset.
[0023] Figure 1 It is a TimesNet-BiGRU neural network TimesNet-BiGRU structure diagram used in the present invention;
[0024] First is the timing analysis TimesNet part, which consists of multiple TimeBlocks based on residual connections, where: each TimesBlock analyzes the spectrum by fast Fourier transform FFT; uses Reshape to convert the one-dimensional time series to a two-dimensional tensor; then uses the 2D deep convolution model ConvNeX to capture the two-dimensional features; then uses ReshapeBack to convert the two-dimensional tensor back to one-dimensional space; obtains the output one-dimensional time series with feature information through adaptive fusion; then inputs the sequence into the bidirectional gated recurrent unit BiGRU to obtain the predicted value, and obtains the lithium battery health status prediction value SOH through denormalization;
[0025] Figure 2 The invention discloses a flow chart of a lithium battery SOH prediction method based on a TimesNet-BiGRU neural network, which comprises the following steps: firstly obtaining charging and discharging data of a lithium battery with a limited number of cycles; obtaining charging and discharging data of a lithium battery with a limited number of cycles; preprocessing the data; constructing a required data set and dividing it into a training set and a validation set; constructing a TimesNet-BiGRU neural network prediction model; training the TimesNet-BiGRU neural network prediction model using the training set; optimizing network hyperparameters; and evaluating the model using the validation set; and finally completing the prediction of the battery health status of the lithium battery.
[0026] Lithium battery SOH prediction steps based on TimesNet-BiGRU; (e.g. Figure 2 shown).
[0027] Step 1: At room temperature, use relevant sensors to collect the timing signals of physical information of continuous multiple charge and discharge of a certain number of lithium batteries, including the terminal voltage, terminal current, and surface temperature of the lithium batteries, and ensure that the sampling process is as fast and accurate as possible;
[0028] Step 2, the data sets of the three types of data collected in S1 are spliced in sequence according to the number of charge and discharge times to form a long time series data set, and are divided into a training set and a validation set respectively, with a division ratio of 4:1, and the training set is processed with missing values, outliers and normalization;
[0029] Step 3, create Figure 1 The prediction model based on TimesNet-BiGRU neural network shown;
[0030] The prediction model is composed of a time series analysis backbone network (TimesNet) neural network and a bidirectional gated recurrent unit (BiGRU);
[0031] Step 4: Input the training set obtained in S2 into the prediction model based on TimesNet-BiGRU neural network constructed in S3, and record the input one-dimensional time series as X 1D ;
[0032] The TimesNet part of the prediction model of the TimesNet-BiGRU neural network is composed of multiple TimesBlock layers based on residual connections. 1D Get deep features through the embedding layer The input of the t-th TimesBlock layer in the subsequent process is recorded as The output is recorded as Where TimesBlock(·) indicates processing by the TimesBlock layer;
[0033] In the tth TimesBlock layer:
[0034] Step 5: For the input one-dimensional time series Expand it in the frequency domain through fast Fourier transform (FFT):
[0035]
[0036] Where A represents the average amplitude at different frequencies, FFT(·) represents fast Fourier transform of one-dimensional time series, Amp(·) represents the calculation of amplitude at each frequency, and Avg(·) represents the average amplitude of different time series;
[0037] Step 6: To avoid the influence of high-frequency noise, sort the frequencies in descending order according to their amplitude values, and take the first k frequencies as:
[0038]
[0039] Where arg Topk(·) means arranging the frequencies in descending order of amplitude and extracting the first k frequencies corresponding to the largest amplitude, f 1 Indicates the frequency corresponding to the maximum amplitude value, f 2 Indicates the frequency corresponding to the second largest amplitude value, f k represents the frequency corresponding to the kth largest amplitude value, T represents the length of the original time series, and f * It refers to the above {f 1 ,…,f k}, in order to improve the computational efficiency, we use the conjugate symmetry in the frequency domain, f * The value range is 1 to T / 2;
[0040] Take the k periods corresponding to the k frequencies as: Among them, T represents the length of the original time series, p i Represented as f i The corresponding period;
[0041] The process of step 5 and step 6 above is briefly recorded as: Where A represents the average amplitude at different frequencies, f 1 Indicates the frequency corresponding to the maximum amplitude value, f 2 Indicates the frequency corresponding to the second largest amplitude value, p 1 represents f 1 The corresponding period, p k represents f k The corresponding period is represented by Period(·), which is used to explore and process the periodicity of the time series before the time series changes within and between periods are uniformly represented, that is, to complete the selection of the size of the period fragment;
[0042] Step 7, based on the selected period {p 1 ,…,p k}For the original one-dimensional sequence Folding is done to convert the time series from one dimension to two dimensions:
[0043]
[0044] Where Padding(·) means to add zeros to the end of the original one-dimensional sequence so that the sequence length can be p i divisible, It means to convert a one-dimensional time series into a period p i As rows, with frequency f i A 2D tensor as a set of columns Each column and row of this two-dimensional tensor corresponds to adjacent moments and adjacent periods, respectively. Adjacent moments and periods often contain similar timing changes, so information can be easily captured through 2D convolution.
[0045] Step 8, for the two-dimensional tensor Use the two-dimensional convolution model ConvNeXt to extract the two-dimensional temporal change representation:
[0046]
[0047] in, It represents the two-dimensional time series feature information extracted using the two-dimensional convolutional network ConvNeXt. ConvNeXt(·) represents the extraction of two-dimensional time series features by performing two-dimensional convolution on the two-dimensional tensor.
[0048] Step 9: extract the two-dimensional time series feature information Convert back to one-dimensional space:
[0049]
[0050] in, Indicates that the two-dimensional time series feature information Transformed back into one-dimensional time series feature information in one-dimensional space, The two-dimensional time series feature information is converted back to one-dimensional space according to the corresponding period and frequency. Trunc(·) means removing the 0 added at the end of the one-dimensional sequence using Padding(·) in step 7, so that the length of the one-dimensional time series feature information returns to the original T;
[0051] Step 10, get the output frequency f of the t-1th TimesBlock layer k The corresponding weight of the corresponding amplitude value:
[0052]
[0053] in, Represents the frequency f output by the t-1th TimesBlock layer 1 The corresponding amplitude, Indicates the output frequency f of the t-1th TimesBlock layer k The corresponding amplitude, Softmax(·) represents the weight of the amplitude value corresponding to each frequency, express Get the weighted strength, express Get the weighted strength;
[0054] Step 11: The one-dimensional time series feature information obtained in step 9 The weighted summation is performed based on the intensities weighted by their corresponding frequencies:
[0055]
[0056] in It represents the one-dimensional time series obtained after adaptive fusion, that is, weighted summation;
[0057] Step 12: Establish a bidirectional gated recurrent unit BiGRU part, which consists of two GRU layers. The forward GRU layer is responsible for forward transmission of the information of the previous state, and the backward GRU layer is responsible for reverse feedback of the information of the next moment to the current state.
[0058] Step 13: Output the one-dimensional time series of TimesNet Input into BiGRU to get the forward and backward hidden layer output vectors:
[0059]
[0060] in, is the actual output of the backward hidden layer at the current moment, is the output of the backward hidden layer at the previous moment, is the actual output of the forward hidden layer at the current moment, is the actual output of the forward hidden layer at the current moment, f GRU (·) indicates processing by a GRU layer;
[0061] Step 14: Input the forward and backward hidden layer output vectors into the output layer to obtain the predicted sequence:
[0062] Where X pre0 is the prediction sequence, W t1 , W t2 are the forward and backward output weights respectively, and b is the bias;
[0063] Step 15: Combine the prediction value X output by the timing analysis backbone network and the bidirectional gated recurrent unit TimesNet-BiGRU neural network pre0 After denormalization, the actual lithium battery SOH prediction sequence X is obtained pre1 ;
[0064] Step 16, train the TimesNet-BiGRU prediction model according to the training set in the data set constructed in the above step, use the mean square error as the loss function, and optimize the network hyperparameters;
[0065] Step 17, use the validation set for verification, and perform mean square error (WSE) analysis on the prediction results. If the requirements are met, the prediction process is completed, that is, if the mean square error (WSE) is less than 0.1 and approaches 0, the prediction process is completed.
[0066] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A lithium battery SOH prediction method based on TimesNet-BiGRU neural network, characterized in that: The steps include: S1: Obtaining limited charge and discharge data of lithium battery cycles; S2: preprocess the data to construct the required data set, including: a training set and a validation set, wherein the ratio of the training set to the validation set is 4:1; S3: Build TimesNet-BiGRU neural network prediction model; TimesNet-BiGRU neural network prediction model, including: improved TimesNet neural network part and BiGRU part; S4: Training of TimesNet-BiGRU neural network using training dataset; S5: Use the TimesNet-BiGRU lithium battery SOH prediction model to predict the validation dataset.
2. A lithium battery SOH prediction method based on TimesNet-BiGRU neural network according to claim 1, characterized in that: A certain number of lithium batteries are charged and discharged multiple times, and the physical information of the lithium batteries is collected during the test, including voltage, current, and temperature.
3. A lithium battery SOH prediction method based on TimesNet-BiGRU neural network according to claim 1, characterized in that: According to S3, the improved TimesNet neural network is partially improved as follows: Let the input one-dimensional time series be X 1D The TimesNet part in TimesNet-BiGRU is composed of multiple TimesBlock layers based on residual connections. 1D Get deep features through the embedding layer The input of the t-th TimesBlock layer in the subsequent process is recorded as The output is recorded as Among them, TimesBlock(·) indicates processing by the TimesBlock layer; In the tth TimesBlock layer: For the input one-dimensional time series Expand it in the frequency domain by fast Fourier transform: Where A represents the average amplitude at different frequencies, FFT(·) represents fast Fourier transform of one-dimensional time series, Amp(·) represents the calculation of amplitude at each frequency, and Avg(·) represents the average amplitude of different time series. Arrange the frequencies in descending order according to their amplitude values, and take the first k frequencies as The k cycles corresponding to the k frequencies are: i∈{1,…,k}, where T represents the length of the original time series, p i Represented as f i The corresponding period; Based on the selected period {p1,…,p k }For the original one-dimensional sequence Folding is done to convert the time series from one dimension to two dimensions: Where Padding(·) means to add zeros to the end of the original one-dimensional sequence so that the sequence length can be divided by pi. It means to convert a one-dimensional time series into a period p i As a row, with frequency f i A 2D tensor as a set of columns Using a two-dimensional tensor The two-dimensional convolutional model ConvNeXt extracts two-dimensional temporal change representation: For the extracted two-dimensional time series feature information Convert back to one-dimensional space: Get the output frequency f of the t-1th TimesBlock layer k The corresponding weight of the corresponding amplitude value: One-dimensional time series feature information The weighted summation is performed based on the intensity of the weight obtained by its corresponding frequency in Represents the one-dimensional time series obtained after adaptive fusion, that is, weighted summation.
4. A lithium battery SOH prediction method based on TimesNet-BiGRU neural network according to claim 1, characterized in that: According to S3, the improved BiGRU part is composed of a forward GRU layer and a backward GRU layer. In the improved BiGRU: One-dimensional time series Input into BiGRU to get the forward and backward hidden layer output vectors: Input the forward and backward hidden layer output vectors into the output layer to get the predicted sequence: Among them, X pre0 is the prediction sequence, W t1 , W t2 are the forward and backward output weights respectively, and b is the bias; The output predicted value X pre0进行 Denormalization is performed to obtain the actual lithium battery SOH prediction sequence X pre1 .
5. According to the lithium battery SOH prediction method based on TimesNet-BiGRU neural network in claim 1, the TimesNet-BiGRU prediction model is trained by a training set, and the mean square error is used as a loss function to optimize the network hyperparameters.
6. According to the lithium battery SOH prediction method based on TimesNet-BiGRU neural network in claim 1, the network hyperparameters of the TimesNet-BiGRU prediction model are verified by the validation set, and the prediction results are subjected to mean square error analysis. If the requirements are met, the prediction process is completed.
Citation Information
Cited By
Method and system for rapidly estimating state of health of battery based on frequency domain analysis
CN119395563A
Lithium ion battery state-of-charge prediction method and model based on TimesNet
CN119848461A
Battery health state detection method and device
CN120595132A
Battery capacity recession trajectory prediction method and system based on fusion time sequence characteristic model and key point interpolation
CN122218512A
