Method and system for predicting remaining service life of lithium batteries based on optimized neural network
By combining BiLSTM and BIGRU models, using CEEMDAN and improved whale optimization algorithm, the problem of interference with lithium battery capacity regeneration is solved, high-precision prediction of the remaining life of lithium battery is achieved, and battery management and reliability are improved.
Patent Information
- Application Number
- CN202311680202.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-07
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2043-12-07
AI Technical Summary
The prior art is difficult to accurately predict the remaining service life of lithium batteries, and fails to effectively consider the phenomenon of battery capacity regeneration, resulting in low prediction accuracy and affecting battery management and reliability.
Using an optimization neural network-based approach, combining bidirectional long and short-term memory (BiLSTM) and bidirectional gating cyclic unit (BIGRU) models, the adaptive noise-complete ensemble empirical modal decomposition (CEEMDAN) and the improved whale optimization algorithm (IWOA). Decompose battery capacity data, capture long-term degradation trends and random fluctuations, and improve prediction accuracy.
Long-term high-precision prediction of lithium battery capacity is achieved, the accuracy and reliability of residual life prediction is improved, the problems of complex parameters and nonlinear trajectories in battery capacity degradation are solved, and the competitiveness in battery application field is enhanced.
Smart Images

Figure CN117665627B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lithium battery remaining service life prediction, and in particular to a lithium battery remaining service life prediction method and system based on an optimized neural network. Background Art
[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.
[0003] Lithium-ion batteries are one of the most widely used rechargeable batteries and are widely used in mobile devices, electric vehicles, energy storage systems and other fields. By predicting the remaining service life of lithium-ion batteries, we can timely understand the attenuation of the battery and take corresponding measures to improve the reliability of the battery, thereby optimizing the management and maintenance of the battery and evaluating the performance and quality of the battery. The attenuation and failure of lithium batteries are important factors affecting battery reliability. However, with the increase in the number of charge and discharge cycles, the capacity and performance of lithium-ion batteries will gradually decrease, resulting in a shortened battery usable time and service life. Therefore, accurately predicting the remaining service life of lithium-ion batteries can optimize battery management, improve battery reliability, enhance battery performance evaluation, and save costs and resources, which is of great significance to the development and sustainability of battery application fields. Summary of the invention
[0004] In order to address the deficiencies in the prior art, the present invention provides a method and system for predicting the remaining service life of a lithium battery based on an optimized neural network; the method takes into account the phenomenon of lithium battery capacity regeneration, combines a sequence decomposition algorithm with a neural network algorithm, and uses an RNN framework based on a bidirectional long short-term memory (BILSTM) and a bidirectional gated recurrent unit (BIGRU) to capture the long-term degradation trend and the random fluctuation trend, respectively, so that it can effectively reflect the decline trend of the lithium battery capacity, so as to accurately predict the lithium battery capacity regeneration and the random fluctuation trend, thereby improving the accuracy of the prediction of the remaining service life of the lithium battery.
[0005] On the one hand, a method for predicting the remaining service life of a lithium battery based on an optimized neural network is provided, including:
[0006] Obtain the battery capacity time series data to be predicted;
[0007] Preprocess the battery capacity time series data to be predicted;
[0008] The preprocessed battery capacity time series data is divided using a sliding window to obtain several battery capacity sub-time series;
[0009] Decompose each battery capacity sub-time series to obtain residual components and modal components;
[0010] The residual component is input into the trained BiLSTM model to output the first predicted value of the dischargeable capacity of the lithium battery; the modal component is input into the trained BiGRU model to output the second predicted value of the dischargeable capacity of the lithium battery; wherein the trained BiLSTM model and the trained BiGRU model both use the improved whale algorithm to optimize the parameters of the model during the training process;
[0011] The first predicted value of the dischargeable capacity of the lithium battery and the second predicted value of the dischargeable capacity of the lithium battery are integrated and added to obtain a predicted discharge capacity sequence of the future number of charge and discharge cycles of the lithium battery, and the predicted discharge capacity decays to a set proportion of the rated capacity as the end point of the remaining service life; the starting point of the remaining service life is set, and the number of charge and discharge cycles experienced from the starting point of the remaining service life to the end point of the remaining service life is calculated, and the obtained number of charge and discharge cycles is used as the remaining service life of the lithium battery.
[0012] On the other hand, a lithium battery remaining service life prediction system based on an optimized neural network is provided, including:
[0013] An acquisition module is configured to: acquire time series data of battery capacity to be predicted;
[0014] A preprocessing module, which is configured to: preprocess the battery capacity time series data to be predicted;
[0015] A partitioning module is configured to: partition the pre-processed battery capacity time series data using a sliding window to obtain a plurality of battery capacity sub-time series;
[0016] A decomposition module is configured to: decompose each battery capacity sub-time series to obtain a residual component and a modal component;
[0017] The prediction module is configured to: input the residual component into the trained BiLSTM model to output a first prediction value of the dischargeable capacity of the lithium battery; input the modal component into the trained BiGRU model to output a second prediction value of the dischargeable capacity of the lithium battery; wherein the trained BiLSTM model and the trained BiGRU model both use an improved whale algorithm to optimize the parameters of the model during the training process;
[0018] The output module is configured to: integrate and add the first predicted value of the dischargeable capacity of the lithium battery and the second predicted value of the dischargeable capacity of the lithium battery to obtain a predicted discharge capacity sequence of the future number of charge and discharge cycles of the lithium battery, and use the predicted discharge capacity decaying to a set proportion of the rated capacity as the remaining service life end point; set the remaining service life starting point, calculate the number of charge and discharge cycles experienced between the remaining service life starting point and the remaining service life end point, and use the obtained number of charge and discharge cycles as the remaining service life of the lithium battery.
[0019] On the other hand, there is also provided an electronic device, comprising:
[0020] a memory for non-transitory storage of computer-readable instructions; and
[0021] a processor for executing the computer readable instructions,
[0022] When the computer-readable instructions are executed by the processor, the method described in the first aspect is executed.
[0023] On the other hand, a storage medium is provided, which non-temporarily stores computer-readable instructions, wherein when the non-temporary computer-readable instructions are executed by a computer, the instructions of the method described in the first aspect are executed.
[0024] On the other hand, a computer program product is provided, comprising a computer program, wherein the computer program is used to implement the method described in the first aspect when running on one or more processors.
[0025] The above technical solution has the following advantages or beneficial effects:
[0026] The Complete Ensemble Empirical Mode Decomposition with Adaptive Noise (CEEMDAN) is used to decompose the complex unstable capacity decay data to obtain stable components, thereby effectively improving the accuracy and authenticity of the data.
[0027] The whale optimization algorithm is improved in three aspects. Compared with the original whale algorithm, the improved whale optimization algorithm has a more comprehensive search range and faster convergence speed, enriches the diversity of the population, and improves the defect of the traditional algorithm that it is easy to fall into local optimality.
[0028] The Improved Whale Optimization Algorithm (IWOA) optimizes and selects some hyperparameters of the neural network model, solving the problem that the model hyperparameter selection is difficult and the neural network prediction model is prone to fall into local optimality after gradient descent training.
[0029] Improve the learning ability of BiLSTM and BiGRU models for complex data features, so that their hidden layer output distribution is closer to the actual input features, thereby improving the prediction accuracy of remaining life.
[0030] The present invention solves the difficult problems of complex parameters and highly nonlinear trajectories in battery capacity degradation, discloses a technical solution for capturing the correlation of characteristic parameters in the battery self-regeneration process, and proposes a method for reliable uncertainty management of batteries, which can achieve long-term and high-precision battery capacity prediction in actual application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0032] Figure 1 This is a flow chart of a method for predicting the remaining useful life of a lithium battery based on an improved whale algorithm and optimized neural network according to Embodiment 1 of the present invention;
[0033] Figure 2 The capacity degradation curve of the B005 lithium-ion battery of the first embodiment of the present invention;
[0034] Figure 3(a)-Figure 3(g) This is a diagram of the empirical mode decomposition results of the B005 battery in Example 1 of the present invention;
[0035] Figure 4 This is a flow chart of an improved whale algorithm according to Embodiment 1 of the present invention;
[0036] Figure 5 The network structure of the BILSTM of the first embodiment of the present invention;
[0037] Figure 6 The network structure of the BIGRU of the first embodiment of the present invention;
[0038] Figure 7 This is a diagram of the prediction results of the B005 battery combination model of Example 1 of the present invention. DETAILED DESCRIPTION
[0039] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0040] Effective prediction of battery life depends on many parameters, including but not limited to physical parameters such as current, voltage, temperature and humidity, as well as virtual parameters such as capacity and health status. Physical parameters are directly measurable, while virtual parameters need to be inferred or represented by other physical parameters. Virtual parameters are often more important than measurable physical parameters. For example, changes in battery capacity directly reflect the degree of battery degradation during the charge and discharge cycles. Therefore, most battery researchers recognize that battery capacity is a decisive indicator of battery degradation. The battery capacity degradation curve can be used to directly evaluate the battery health and predict the battery's RUL (Remaining Useful Life).
[0041] In the existing technology, technicians in this field mainly conduct research on the problem of RUL prediction of lithium batteries from the perspectives of models, statistical methods and data-driven. Based on the historical cycle data of the battery, various data processing technologies such as vector machines, neural networks, autoregressive modeling, Bayesian prediction and Box-Cox transformation are combined to simulate and verify the battery capacity and RUL prediction, and some algorithms have been put into practical application. However, the capacity obtained by the existing technology is the original capacity signal, and the battery self-regeneration phenomenon is not considered. The capacity self-regeneration phenomenon is a temporary increase in battery capacity caused by frequent switching between battery charging and discharging cycles. Due to the complex and highly nonlinear trajectory of battery capacity degradation, it is very necessary to consider the regeneration phenomenon for further quantification of uncertainty in capacity prediction. In addition, the battery capacity undergoes long-term degradation over hundreds of cycles, and the degradation information between these cycles is highly correlated. Therefore, studying how to capture the correlation of characteristic parameters in the battery self-regeneration process, reliably manage the uncertainty of the battery, and achieve long-term and high-precision battery capacity prediction is the key to enhancing the core competitiveness in the field of battery applications in the future.
[0042] The present invention discloses a method for predicting the remaining service life of a lithium battery based on an improved whale algorithm-optimized neural network. Since battery capacity is a decisive indicator of battery degradation, the adaptive white noise complete integrated empirical mode decomposition (CEEDMAN) algorithm is first used to decompose the lithium battery discharge capacity sequence into long-term residuals and short-term fluctuations to reduce the interference of capacity regeneration phenomena; then a bidirectional long short-term memory neural network (BILSTM) is established to predict the stable residual component, and a bidirectional gated recurrent unit neural network (BIGRU) model is used to predict the IMF component with high complexity and strong randomness, and an improved whale optimization algorithm (IWOA) is used to optimize the hyperparameters of the model; finally, the model prediction results are synthesized to obtain the remaining service life of the lithium battery. The proposed method can accurately and reliably predict battery capacity and RUL in the long term, and has stronger generalization ability.
[0043] Embodiment 1
[0044] This embodiment provides a method for predicting the remaining service life of a lithium battery based on an optimized neural network;
[0045] like Figure 1 As shown, the remaining service life prediction method of lithium battery based on optimized neural network includes:
[0046] S101: Obtaining time series data of battery capacity to be predicted;
[0047] S102: Preprocessing the battery capacity time series data to be predicted;
[0048] S103: using a sliding window to divide the pre-processed battery capacity time series data to obtain a number of battery capacity sub-time series;
[0049] S104: Decomposing each battery capacity sub-time series to obtain a residual component and a modal component;
[0050] S105: inputting the residual component into the trained BiLSTM model, and outputting a first prediction value of the dischargeable capacity of the lithium battery; inputting the modal component into the trained BiGRU model, and outputting a second prediction value of the dischargeable capacity of the lithium battery; wherein the trained BiLSTM model and the trained BiGRU model both use the improved whale algorithm to optimize the parameters of the model during the training process;
[0051] S106: Integrate and add the first predicted value of the dischargeable capacity of the lithium battery and the second predicted value of the dischargeable capacity of the lithium battery to obtain a predicted discharge capacity sequence of the future number of charge and discharge cycles of the lithium battery, and take the time when the predicted discharge capacity decays to a set proportion of the rated capacity as the end point of the remaining service life; set the starting point of the remaining service life, calculate the number of charge and discharge cycles experienced from the starting point of the remaining service life to the end point of the remaining service life, and take the obtained number of charge and discharge cycles as the remaining service life of the lithium battery.
[0052] Furthermore, the S102: preprocessing the battery capacity time series data to be predicted, the preprocessing refers to using a maximum and minimum value normalization algorithm to normalize the battery capacity data so as to constrain the battery capacity data to be between 0 and 1.
[0053] Exemplarily, the original battery capacity data is subjected to min-max normalization processing to constrain the battery capacity data to be between [0, 1].
[0054]
[0055] Among them, x * is the training data after capacity normalization, x is the capacity data, and x min is the minimum value of the capacity data, xmax It is the maximum value of capacity data.
[0056] Furthermore, the S103: using a sliding window to divide the pre-processed battery capacity time series data to obtain a plurality of battery capacity sub-time series, specifically including:
[0057] The size and step length of the sliding window are set; the sliding window slides on the preprocessed battery capacity time series data, and each time the sliding window slides one step, the time series in the sliding window is used as a battery capacity sub-time series, and a number of battery capacity sub-time series are obtained by sliding a number of steps.
[0058] It should be understood that the sliding window method is used to segment the data, and the input and output of the segmented battery capacity data are expressed as:
[0059]
[0060] The segmentation window size is W, m=M-1, and the value range of i is [1, W].
[0061] Furthermore, the S104: decomposing each battery capacity sub-time series to obtain residual components and modal components specifically includes:
[0062] Complete Ensemble Empirical Mode Decomposition with Adaptive Noise (CEEMDAN) is used to decompose each battery capacity sub-time series to obtain a residual component and several modal components.
[0063] Furthermore, the S104: decomposing each battery capacity sub-time series to obtain residual components and modal components specifically includes:
[0064] S104-1: Assume that X(t) is the capacity decay data of the lithium battery, and convert the adaptively decomposable Gaussian white noise w j (t) is added to the original signal X(t):
[0065] X j (t) = X (t) + λ 0 w j (t);
[0066] Where t represents different time points, j represents the jth white noise added to the data, and λ 0 represents the noise figure, and X j (t) represents the signal with Gaussian white noise capacity sequence added, w j (t) is Gaussian white noise;
[0067] S104-2: Use the Empirical Mode Decomposition (EMD) algorithm to analyze X j (t) Repeat the decomposition N times and take the average value of the N intrinsic mode functions (IMF) to obtain the first IMF modal component IMF 1 (t):
[0068]
[0069] S104-3: The original signal X(t) and the first IMF modal component IMF 1 (t) is subtracted to calculate the first residual component R 1 (t):
[0070] R 1 (t) = X(t)-IMF 1 (t);
[0071] S104-4: In the first residual component R 1 Add Gaussian white noise with noise coefficient λ to (t) 0 w j (t), E k (·) represents the kth component obtained by empirical mode decomposition, and the signal R is decomposed multiple times 1 (t)+ε 1 E 1 (w j (t)) and find the mean to get the second IMF modal component IMF 2 (t):
[0072]
[0073] S104-5: Calculate the second residual component R 2 (t):
[0074] R 2 (t) = X(t)-IMF 2 (t);
[0075] S104-6: For k=2, 3, ..., K, decompose R in turn by EMD k-1 (t)+ε k-1 E k (w j (t)), and obtain the kth IMF modal component IMF decomposed by CEEMDAN k (t) and the kth residual component R k (t):
[0076]
[0077] R k (t) = R k-1 (t)-IMF k (t);
[0078] S104-7: Repeat S104-6 until the residual components obtained cannot be further decomposed, that is, the number of extreme value points of the residual sequence is less than or equal to two, and the termination condition of the decomposition is met. Assuming that the number of IMF components obtained at this time is K, the original signal x(t) is decomposed into:
[0079]
[0080] It should be understood that the original capacity series is processed using the complete ensemble empirical mode decomposition with adaptive noise (CEEMDAN) algorithm to obtain multiple short-term fluctuation IMF components (IMF 1 , …, IMF n ) and a long-term residual RES component R(t). The residual component represents the long-term degradation trend of the lithium battery, and the fluctuation component represents the capacity regeneration phenomenon of the battery. Figure 3(a)-Figure 3(g) This is the result of the empirical mode decomposition of the B005 battery. The residual component represents the long-term degradation trend of the lithium battery, and the fluctuation component represents the capacity regeneration phenomenon of the battery.
[0081] For the residual component and short-term fluctuation component after decomposition of battery capacity data, a bidirectional long short-term memory neural network (BILSTM) and a bidirectional gated recurrent unit neural network (BIGRU) structure are constructed respectively. To solve the problem of difficulty in selecting hyperparameters of the neural network model, the whale optimization algorithm is used to optimize the hyperparameters.
[0082] Further, S105: inputting the residual component into the trained BiLSTM model to output a first predicted value of the dischargeable capacity of the lithium battery, wherein the training process of the trained BiLSTM model includes:
[0083] Constructing a first training set and a first test set; wherein the first training set and the first test set both include: a residual component of a known dischargeable capacity of a lithium battery; the residual component is obtained by decomposing the battery capacity;
[0084] Input the first training set into the bidirectional long short-term memory neural network BiLSTM to train the bidirectional long short-term memory neural network BiLSTM;
[0085] Input the first test set into the bidirectional long short-term memory neural network BiLSTM to test the bidirectional long short-term memory neural network BiLSTM;
[0086] Calculate the mean square error between the actual output value and the predicted output value corresponding to the first test set, input the mean square error into the fitness function of the improved whale optimization algorithm, and output the fitness value of the current hyperparameter combination. If the fitness value of the current hyperparameter combination is less than the fitness value corresponding to the set optimal hyperparameter combination, the current hyperparameter combination is used as the optimal hyperparameter combination.
[0087] Iterate the improved whale optimization algorithm. When the number of iterations exceeds the set number or reaches the set convergence condition, stop the iteration and get the optimal hyperparameter combination.
[0088] The hyperparameter combination includes: the number M of hidden units in the first layer, the number L of hidden units in the second layer, the learning efficiency ξ, and the Dropout rate.
[0089] For example, the specific steps of predicting the residual component R(t) after decomposing the lithium battery capacity degradation data based on IWOA-BiLSTM are as follows:
[0090] S105-a1: Construct a bidirectional long short-term memory neural network structure, such as Figure 5 As shown. Determine the optimal hyperparameter combination of the BILSTM neural network [M, E, ε, c], where M represents the number of hidden units in the first layer, E represents the number of hidden units in the second layer, ε represents the learning rate, and c represents the batch size. Set the optimization range of the hyperparameters, set M and E to [0,50], and set the learning rate to [0.001,0.01].
[0091] S105-a2: Set the population size N, the maximum number of iterations T, and the search space dimension D. Initialize the IOWA parameters and randomly generate the position X according to IWOA.
[0092] S105-a3: Use the possible combinations of hyperparameters in the population to train the BILSTM model and calculate the fitness of this set of hyperparameters. Use RMSE as the fitness function, and its formula is as follows:
[0093]
[0094] S105-a4: Use the whale optimization algorithm to update the population, select the hyperparameter combination with the best fitness, and generate new hyperparameter combinations.
[0095] S105-a5: Repeat steps S104-a3 and S104-a4 until the adaptation reaches convergence or the maximum number of iterations of the algorithm is reached.
[0096] S105-a6: Finally, the optimal hyperparameter value optimized by the IWOA algorithm is assigned to the BILSTM neural network to construct an IWOA-BiLSTM capacity degradation data prediction model to train and predict the lithium battery capacity data.
[0097] It should be understood that by adopting a bidirectional long short-term memory network structure and combining historical capacity data, current capacity data, and future capacity data for modeling, the present invention more fully explores the correlation between capacity data and achieves a higher accuracy prediction of the long-term degradation trend R(t) component of lithium batteries compared to the prior art.
[0098] Exemplarily, the IWOA optimization problem is to find the maximum or minimum value of the fitness function. In the present invention, the minimum mean square deviation between the expected output and the actual output of the BILSTM network is used as the fitness function, and the number of hidden units in the first layer M, the number of hidden units in the second layer L, the learning efficiency ξ, and the Dropout rate are optimized to minimize the error of the BILSTM-attention network.
[0099] It should be understood that the construction process of the bidirectional long short-term memory neural network BiLSTM includes:
[0100] S105-11: Constructing LSTM network structure: The long short-term memory (LSTM) neural network consists of multiple memory units. In order to manage the long-term cell state, the LSTM model applies a gate structure and introduces the logic control unit of the forget gate, input gate and output gate to maintain and update the cell state. In this way, the long-term memory ability of the model is enhanced. The LSTM model consists of the following parts:
[0101] S105-12: Forget gate: The forget gate determines the degree of retention of the information passed in at the previous moment. The forget gate is obtained by linearly transforming the input at time t and the output at time t-1, and then applying the activation function. The calculation formula is as follows:
[0102]
[0103] S105-13: The function of the input gate is mainly to determine the retention degree of the information input at time t. The calculation formula of the input gate is as follows:
[0104]
[0105] S105-14: Use c t To represent the input state at time t, the hidden layer output at time t-1 and the input at time t are linearly transformed and then the tanh function is applied to obtain the state. The formula is as follows:
[0106]
[0107] S105-15: The output control of the output gate depends on the degree of the state unit, and the calculation formula is as follows:
[0108]
[0109] S105-16: Implicit state output h at the final moment t ,, is determined by the internal state and the output gate, and its calculation is as follows:
[0110] h t =o t tanh(c t );
[0111] Among them, x t represents the network input of the LSTM neural network; h t-1 represents the network output at time t-1; c t-1 represents the unit state output at time t-1; σ represents the S-shaped activation function; tanh represents the hyperbolic tangent activation function; the network structure diagram of the LSTM model is shown in the figure; i t represents the input gate of the LSTM neural network; f t Represents the forget gate of the LSTM neural network; c t Represents the cell state of the LSTM neural network; o t Represents the output value of the output gate of the LSTM neural network; h t Represents the output value of the LSTM neural network; W and B represent the corresponding weight matrix and offset vector.
[0112] S105-17: Construct the BILSTM neural network structure. BiLSTM adds back propagation on the basis of LSTM. First, the forward data is input into the forward LSTM layer to obtain the output of this layer. Then, the data is input into the reverse LSTM layer to obtain the reverse output. Finally, the forward LSTM layer output and the reverse LSTM layer output are linearly superimposed according to certain weights to obtain the final output. The structural diagram of the BILSTM model is shown in the figure below. Figure 4 The relevant formula of the model is shown below:
[0113] A t =f 1 (w 1 x t +w 2 A t-1 )
[0114] B t =f 2 (w 3 x t +w5 B t+1 )
[0115] h t =f 3 (w 4 A t +w 6 B t )
[0116] Where: x t Indicates the corresponding input data; A t represents the corresponding LSTM hidden state of the forward iteration; B t represents the LSTM hidden state of the corresponding backward iteration; w 1 、w 2 、w 3 , ..., w 6 represents the corresponding weight of each layer; h t Represents the corresponding output data.
[0117] Further, S105: inputting the modal component into the trained BiGRU model, and outputting a second predicted value of the dischargeable capacity of the lithium battery, wherein the training process of the trained BiGRU model includes:
[0118] Constructing a second training set and a second test set; wherein the second training set and the second test set are intrinsic mode functions (IMF) components of known dischargeable capacity; the IMF components are obtained by decomposing the battery capacity;
[0119] Inputting the second training set into the bidirectional gated recurrent neural network BiGRU to train the bidirectional gated recurrent neural network BiGRU;
[0120] Input the second test set into the bidirectional gated recurrent neural network BiGRU to test the bidirectional gated recurrent neural network BiGRU;
[0121] Calculate the mean square error between the actual output value and the predicted output value corresponding to the second test set, input the mean square error into the fitness function of the improved whale optimization algorithm, and output the fitness value of the current hyperparameter combination. If the fitness value of the current hyperparameter combination is less than the fitness value corresponding to the set optimal hyperparameter combination, the current hyperparameter combination is used as the optimal hyperparameter combination.
[0122] Iterate the improved whale optimization algorithm. When the number of iterations exceeds the set number or reaches the set convergence condition, stop the iteration and get the optimal hyperparameter combination.
[0123] The hyperparameter combination is the number of neurons, the learning rate and the Dropout rate.
[0124] Exemplarily, the five IMF components obtained by decomposition are input into the optimized BIGRU neural network for training and prediction. The specific steps are as follows:
[0125] S105-b1: Construct a bidirectional gated recurrent unit neural network structure, such as Figure 6 As shown in the figure, the optimal hyperparameter combination is determined to be [L, H, u, d], where L represents the number of neurons in the input layer, H represents the number of neurons in the hidden layer, u represents the learning rate, and d represents the Dropout rate.
[0126] S105-b2: Set the population size N, the maximum number of iterations T, and the search space dimension D. Initialize the parameters of the improved whale optimization algorithm, and randomly generate the position X according to the improved whale optimization algorithm.
[0127] S105-b3: Setting of BIGRU neural network model parameters and hyperparameter range to be optimized. As shown in the following table:
[0128] Table 1. Settings of BIGRU neural network model parameters and hyperparameter ranges to be optimized
[0129]
[0130]
[0131] S105-b4: Use possible combinations of hyperparameters in the population to train the BIGRU model, using the root mean square error (RMSE) as the fitness function, the formula is as follows:
[0132]
[0133] in is the predicted value of capacity, y i is the actual value of capacity.
[0134] S105-b5: Use the improved whale optimization algorithm to update the population and select the hyperparameter combination with the best fitness until the adaptation reaches convergence or the maximum number of algorithm iterations is reached.
[0135] The optimal hyperparameter values are assigned to the BIGRU neural network to train and predict the lithium battery capacity data.
[0136] It should be understood that a bidirectional gated recurrent neural network is constructed. For the local regeneration and short-term fluctuation of lithium battery capacity, a BIGRU neural network is used to predict the IMF component, achieving the effect of fewer training parameters and high prediction accuracy.
[0137] Exemplarily, it is proposed to use the IWOA algorithm to optimize the number of neurons, learning rate and Dropout rate of the BiGRU model, and to use the minimum mean square deviation between the expected output and the actual output of the BIGRU network as the fitness function to improve the prediction accuracy of the model.
[0138] The mean square error between the predicted effect value and the true value of the model capacity is taken as the fitness value. The BiLSTM and BIGRU neural networks decode the parameter vector transmitted by the IWOA part to obtain specific parameters. Secondly, the training set is passed to the network for training using the data part, and then the trained model is used to predict the test set to obtain the mean square error between the actual output value and the predicted output value, and the value is passed to the IWOA part to calculate the fitness value and compare it with the global best result. If the fitness value of the best result is less than the fitness value corresponding to the global best result, the best result is better, so as to achieve the update of the population and the global optimal solution. Start iteration and use the improved whale optimization algorithm to find the optimal combination of parameters. Repeat until the maximum number of iterations is reached to obtain the optimal hyperparameter combination.
[0139] It should be understood that the bidirectional gated recurrent neural network construction process includes:
[0140] S105-21: GRU is a special variant of RNN recurrent neural network. Both GRU and LSTM can record the correlation of long sequence data and effectively suppress the vanishing gradient. Unlike LSTM, in order to improve the efficiency of the model and simplify the calculation of hidden states in the network, GRU combines the input gate and the forget gate to form a new update gate. The GRU unit contains two gates for controlling information transmission, namely the reset gate and the update gate.
[0141] S105-22: Update gate is used to determine the earlier hidden layer state h t-1 is retained to the current hidden layer state h t The reset gate mainly controls the fusion of the previous state information and the current input information of the network, that is, it is used to control the degree to which GRU ignores the state information of the previous moment. GRU will reset the gate r t With h t-1 and x t Combine to form a candidate hidden state h t Finally, the GRU unit calculates the current hidden node output y t and the hidden state h at time t t .
[0142] z t =σ(x t W zx +h t-1 Uzh +b z )
[0143] r t =σ(x t W rx +h t-1 U rh +b r )
[0144]
[0145] In the above equation, x t Indicates the input at the current moment; h t-1 and h t Represent the hidden layer states at earlier and current times respectively; h t Represents the candidate memory state; r t and z t Represent the reset gate and update gate respectively; W zx , W rx and W hx represents x with respect to the update gate, reset gate, and candidate hidden state t The weight matrix, W zh , W rh and W hh h represents the update gate, reset gate and candidate hidden state respectively. t-1 Weight matrix.
[0146] S105-23: The BiGRU neural network structure consists of an input layer, a forward hidden layer, a backward hidden layer, and an output layer. Input data x t is fed back to both the forward and backward hidden layers. The forward and backward units receive the input and the forward hidden state and backward hidden state of the previous time step, respectively. The current forward and backward hidden states and are then combined to produce the current hidden state h t The whole process can be expressed as follows:
[0147]
[0148] Furthermore, if Figure 4 As shown, the improved whale optimization algorithm is iterated. When the number of iterations exceeds the set number or reaches the set convergence condition, the iteration is stopped to obtain the optimal hyperparameter combination. The specific process of the improved whale optimization algorithm includes:
[0149] (1) Initialize each hyperparameter, specify the range of each hyperparameter to be optimized, set the population size N, the maximum number of iterations T, and the search space dimension D′;
[0150] (2) Surrounding prey: When whales determine the location of their prey, they shrink and gather in groups around it; the whale optimization algorithm simulates this behavior by taking the current best position as the target prey, and other whale individuals (search agents) try to update their positions towards the target (best search agent). This behavior is represented by the following equation:
[0151]
[0152] A = 2a*ra;
[0153] B = 2r;
[0154]
[0155] Where t is the current iteration number, is the current optimal solution, X(t) is the position vector of the whale to be updated, X(t+1) represents the optimal solution of the current position, A and B are variable coefficients, D represents the relative distance between the best individual and the current individual, a represents the control parameter, r is a random value in [0,1], t max is the maximum number of iterations.
[0156] (3) Bubble net attack stage: The whale spits out bubbles to create a trap and swims towards the target prey in a spiral trajectory. Local optimization is achieved by shrinking the periphery and updating the position of the spiral;
[0157]
[0158] Where b is a constant used to define the logarithmic spiral shape, b=1, l is a random number in [-1, 1] to make the spiral shape irregular, p is a random number in [0, 1], and w is the adaptive weight.
[0159] (4) Searching for prey: During the prey search phase, the positions of individual whales are updated based on randomly selected whales rather than the best search strategy found so far. As the algorithm continues to iterate, the Gaussian distribution function coefficients are introduced to perturb the population, thereby helping the algorithm reduce the risk of falling into a local optimal solution.
[0160] When |A|>1, the search strategy can be forced to stay away from the reference whale, allowing the WOA algorithm to perform a global search. The process is expressed as follows:
[0161] D=|B·X rand (txt)
[0162]
[0163] Among them, X rand(t) is the position of a randomly selected whale, p′ is the weight coefficient, whose value is 0.5, and f is a Gaussian function with a mean of 0 and a variance of 1.
[0164] It should be understood that the improved whale optimization algorithm includes the following three aspects:
[0165] Improvement 1: Adjust parameter a to determine the change of parameter |A|, thereby changing the global and local search capabilities of the whale optimization algorithm. This solves the problem that the traditional whale optimization algorithm cannot truly reflect the actual optimization process during the iteration process because a shows a linear decreasing trend.
[0166] Improvement 2: Inertia weight is a key parameter in population optimization. A new adaptive weight is introduced to improve the WOA algorithm.
[0167] Improvement 3: When the number of iterations increases, the diversity of the population will decrease, which will cause the algorithm to converge prematurely. Based on the known position information in the population, the Gaussian mutation operation can solve this problem. This helps particles jump out of local extremes and conduct global search.
[0168] It should be understood that the improved whale optimization algorithm has made three improvements to the whale optimization algorithm in order to improve the optimization accuracy of the whale optimization algorithm. The improved whale optimization algorithm is used to automatically adjust and optimize the hyperparameters of the BILSTM and BIGRU algorithms to further improve the accuracy of the RUL prediction of lithium-ion batteries. The improved whale optimization algorithm (Whale Optimization Algorithm, referred to as WOA) has the characteristics of fast computing speed, high search accuracy, and fewer parameters that need to be adjusted, and is more suitable for lithium battery capacity prediction.
[0169] The basic whale algorithm is improved by adjusting the control parameter a, inertia weight and nonlinear convergence that affect the global search capability of the algorithm. Compared with the original whale algorithm, it has a more comprehensive search range and faster convergence speed, enriches the diversity of the population, and effectively improves the defect of traditional algorithms that they are prone to fall into local optimality.
[0170] The IWOA optimization algorithm optimizes and selects some hyperparameters of the neural network model, solving the problem of difficulty in selecting model hyperparameters and the problem that the neural network prediction model is prone to fall into local optimality after gradient descent training. It improves the learning ability of BiLSTM and BIGRU models for complex data features, making their hidden layer output distribution closer to the actual input features, thereby improving the prediction accuracy of the remaining life of the battery capacity.
[0171] Further, S106: integrating and adding the first predicted value of the dischargeable capacity of the lithium battery and the second predicted value of the dischargeable capacity of the lithium battery to obtain a predicted discharge capacity sequence of the number of future charge and discharge cycles of the lithium battery, taking the predicted discharge capacity decaying to a set ratio of the rated capacity as the end point of the remaining service life; setting the starting point of the remaining service life, calculating the number of charge and discharge cycles experienced from the starting point of the remaining service life to the end point of the remaining service life, and taking the obtained number of charge and discharge cycles as the remaining service life of the lithium battery, specifically including:
[0172] The remaining service life is determined when the capacity decays to 70% (1.4Ahr) of the rated capacity. The predicted starting point ST is set, and the number of cycles from the starting point to the end point of the remaining service life is calculated as the remaining service life of the lithium battery.
[0173] RUL=T 1 -T 2
[0174] Among them, T 1 T is the cumulative value of the number of lithium battery cycles corresponding to the predicted discharge capacity reaching the end of the remaining service life. 2 It is the cumulative value of the number of lithium battery cycles corresponding to the starting point of the remaining service life, and RUL is the remaining service life of the lithium battery.
[0175] The B5 single cell battery from the NASA data set was selected as the experimental object. B5 has 168 cycles, and the prediction starting point is set to ST = 50. According to the failure threshold of the set capacity, it is predicted that the B5 battery has experienced 126 cycles before reaching the threshold, and it actually experienced 124 cycles. It can be seen that the predicted remaining life RUL of battery B5 is 76, which is 2 cycles more than the actual remaining life.
[0176] The present invention uses a public data set of battery capacity degradation to verify the effectiveness of the algorithm in this paper. The B005 battery in the data set is selected as the research object, and the data of battery capacity degradation as the number of cycles increases is extracted. The rated capacity of the battery is 2Ah. When the measured power is 70% (1.4Ah) of the original battery capacity, the battery is considered to be in a failed state. The battery was charged and discharged at a constant temperature (24°C). Obtain battery capacity data: Filter out the capacity decay data and the corresponding cycle life data from the discharge process of the lithium-ion battery as the data set for predicting the remaining life of the lithium battery. Figure 2 The capacity curve of NASA battery as the number of cycles increases is depicted. It is stipulated that when the battery capacity decays to 70% of its rated capacity (from 2Ah to 1.4Ah), it is considered to have reached the failure threshold of the battery.
[0177] The results of lithium battery RUL prediction show that CEEMDAN decomposes multiple feature components, reduces data complexity and instability, and can reflect the real degradation trend. It can truly reflect the degradation trend of the battery. At the same time, it combines the advantages of BILSTM and BIGRU, and can effectively capture the short-term and long-term dependencies in the sequence data. It can also have a good prediction trend in the face of random fluctuations in capacity data. This combined model has high accuracy and reliability for future capacity and RUL prediction. Figure 7 This is a diagram of the prediction results of the B005 battery combination model of Example 1 of the present invention.
[0178] Embodiment 2
[0179] This embodiment provides a lithium battery remaining service life prediction system based on an optimized neural network;
[0180] The lithium battery remaining service life prediction system based on optimized neural network includes:
[0181] An acquisition module is configured to: acquire time series data of battery capacity to be predicted;
[0182] A preprocessing module, which is configured to: preprocess the battery capacity time series data to be predicted;
[0183] A partitioning module is configured to: partition the pre-processed battery capacity time series data using a sliding window to obtain a plurality of battery capacity sub-time series;
[0184] A decomposition module is configured to: decompose each battery capacity sub-time series to obtain a residual component and a modal component;
[0185] The prediction module is configured to: input the residual component into the trained BiLSTM model to output a first prediction value of the dischargeable capacity of the lithium battery; input the modal component into the trained BiGRU model to output a second prediction value of the dischargeable capacity of the lithium battery; wherein the trained BiLSTM model and the trained BiGRU model both use an improved whale algorithm to optimize the parameters of the model during the training process;
[0186] The output module is configured to: integrate and add the first predicted value of the dischargeable capacity of the lithium battery and the second predicted value of the dischargeable capacity of the lithium battery to obtain a predicted discharge capacity sequence of the future number of charge and discharge cycles of the lithium battery, and use the predicted discharge capacity decaying to a set proportion of the rated capacity as the remaining service life end point; set the remaining service life starting point, calculate the number of charge and discharge cycles experienced between the remaining service life starting point and the remaining service life end point, and use the obtained number of charge and discharge cycles as the remaining service life of the lithium battery.
[0187] It should be noted that the acquisition module, preprocessing module, partitioning module, decomposition module, prediction module and output module described above correspond to steps S101 to S106 in Embodiment 1, and the examples and application scenarios implemented by the modules and corresponding steps are the same, but are not limited to the contents disclosed in Embodiment 1. It should be noted that the modules described above as part of the system can be executed in a computer system such as a set of computer executable instructions.
[0188] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0189] The proposed system can be implemented in other ways. For example, the system embodiment described above is only illustrative, and the division of the modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.
[0190] Embodiment 3
[0191] This embodiment also provides an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory so that the electronic device executes the method described in the above embodiment one.
[0192] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0193] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0194] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software.
[0195] The method in the first embodiment can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
[0196] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0197] Embodiment 4
[0198] This embodiment further provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the method described in the first embodiment is completed.
[0199] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for predicting the remaining service life of lithium batteries based on an optimized neural network, characterized in that: include: Obtain the battery capacity time series data to be predicted; Preprocess the battery capacity time series data to be predicted; The preprocessed battery capacity time series data is divided using a sliding window to obtain several battery capacity sub-time series; Decompose each battery capacity sub-time series to obtain residual components and modal components; The residual component is input into the trained BiLSTM model to output the first predicted value of the dischargeable capacity of the lithium battery; The modal component is input into the trained BiGRU model to output the second predicted value of the dischargeable capacity of the lithium battery; wherein the trained BiLSTM model and the trained BiGRU model both use the improved whale algorithm to optimize the parameters of the model during the training process; The improved whale optimization algorithm is iterated. When the number of iterations exceeds the set number or reaches the set convergence condition, the iteration is stopped to obtain the optimal hyperparameter combination. The specific process of the improved whale optimization algorithm includes: (1) Initialize each hyperparameter, specify the range of each hyperparameter to be optimized, set the population size N, the maximum number of iterations T, and the search space dimension D′; (2) Surrounding prey: When whales determine the location of their prey, they shrink and gather in groups around it; the whale optimization algorithm simulates this behavior by taking the current best position as the target prey, and other whale individuals try to update their positions toward the target. This behavior is represented by the following equation: A = 2a*ra; B=2r; Where t is the current iteration number, is the current optimal solution, X(t) is the position vector of the whale to be updated, X(t+1) represents the optimal solution of the current position, A and B are variable coefficients, D represents the relative distance between the best individual and the current individual, a represents the control parameter, r is a random value in [0,1], t max is the maximum number of iterations; (3) Bubble net attack stage: The whale spits out bubbles to create a trap and swims towards the target prey in a spiral trajectory. Local optimization is achieved by shrinking the periphery and updating the position of the spiral; Where b is a constant used to define the logarithmic spiral shape, b=1, l is a random number in [-1, 1] to make the spiral shape irregular, p is a random number in [0, 1], and w is an adaptive weight; (4) Searching for prey: In the prey search phase, the positions of individual whales are updated based on randomly selected whales rather than the best search strategy found so far. As the algorithm continues to iterate, the Gaussian distribution function coefficients are introduced to perturb the population, thereby helping the algorithm reduce the risk of falling into a local optimal solution. When |A|>1, the search strategy can be forced to stay away from the reference whale, allowing the WOA algorithm to perform a global search. The process is expressed as follows: D=|B·X rand (t)-X(t) Among them, X rand (t) is the position of a randomly selected whale, p′ is a weight coefficient whose value is 0.5, and f is a Gaussian function with a mean of 0 and a variance of 1; The first predicted value of the dischargeable capacity of the lithium battery and the second predicted value of the dischargeable capacity of the lithium battery are integrated and added to obtain a predicted discharge capacity sequence of the future number of charge and discharge cycles of the lithium battery, and the predicted discharge capacity decays to a set proportion of the rated capacity as the end point of the remaining service life; the starting point of the remaining service life is set, and the number of charge and discharge cycles experienced from the starting point of the remaining service life to the end point of the remaining service life is calculated, and the obtained number of charge and discharge cycles is used as the remaining service life of the lithium battery.
2. The method for predicting the remaining service life of a lithium battery based on an optimized neural network as claimed in claim 1, characterized in that: The preprocessed battery capacity time series data is divided using a sliding window to obtain several battery capacity sub-time series, including: The size and step length of the sliding window are set; the sliding window slides on the preprocessed battery capacity time series data, and each time the sliding window slides one step, the time series in the sliding window is used as a battery capacity sub-time series, and a number of battery capacity sub-time series are obtained by sliding a number of steps.
3. The method for predicting the remaining service life of a lithium battery based on an optimized neural network as claimed in claim 1, characterized in that: Each battery capacity sub-time series is decomposed to obtain residual components and modal components, including: Adaptive noise complete set empirical mode decomposition is used to decompose each battery capacity sub-time series to obtain a residual component and several modal components.
4. The method for predicting the remaining service life of a lithium battery based on an optimized neural network as claimed in claim 1, characterized in that: The residual component is input into the trained BiLSTM model to output the first predicted value of the dischargeable capacity of the lithium battery, wherein the training process of the trained BiLSTM model includes: Constructing a first training set and a first test set; wherein the first training set and the first test set both include: a residual component of a known dischargeable capacity of a lithium battery; the residual component is obtained by decomposing the battery capacity; Input the first training set into the bidirectional long short-term memory neural network BiLSTM to train the bidirectional long short-term memory neural network BiLSTM; Input the first test set into the bidirectional long short-term memory neural network BiLSTM to test the bidirectional long short-term memory neural network BiLSTM; Calculate the mean square error between the actual output value and the predicted output value corresponding to the first test set, input the mean square error into the fitness function of the improved whale optimization algorithm, and output the fitness value of the current hyperparameter combination. If the fitness value of the current hyperparameter combination is less than the fitness value corresponding to the set optimal hyperparameter combination, the current hyperparameter combination is used as the optimal hyperparameter combination. Iterate the improved whale optimization algorithm. When the number of iterations exceeds the set number or reaches the set convergence condition, stop the iteration and get the optimal hyperparameter combination. The hyperparameter combination includes: the number M of hidden units in the first layer, the number L of hidden units in the second layer, the learning efficiency ξ, and the Dropout rate.
5. The method for predicting the remaining service life of a lithium battery based on an optimized neural network as claimed in claim 1, characterized in that: The modal component is input into the trained BiGRU model to output a second predicted value of the dischargeable capacity of the lithium battery, wherein the training process of the trained BiGRU model includes: Constructing a second training set and a second test set; wherein the second training set and the second test set are IMF components of known dischargeable capacity; the IMF components are obtained by decomposing the battery capacity; Inputting the second training set into the bidirectional gated recurrent neural network BiGRU to train the bidirectional gated recurrent neural network BiGRU; Input the second test set into the bidirectional gated recurrent neural network BiGRU to test the bidirectional gated recurrent neural network BiGRU; Calculate the mean square error between the actual output value and the predicted output value corresponding to the second test set, input the mean square error into the fitness function of the improved whale optimization algorithm, and output the fitness value of the current hyperparameter combination. If the fitness value of the current hyperparameter combination is less than the fitness value corresponding to the set optimal hyperparameter combination, the current hyperparameter combination is used as the optimal hyperparameter combination. Iterate the improved whale optimization algorithm. When the number of iterations exceeds the set number or reaches the set convergence condition, stop the iteration and get the optimal hyperparameter combination. The hyperparameter combination is the number of neurons, the learning rate and the Dropout rate.
6. The method for predicting the remaining service life of a lithium battery based on an optimized neural network as claimed in claim 1, characterized in that: The battery capacity time series data to be predicted is preprocessed, and the preprocessing refers to using a maximum and minimum value normalization algorithm to normalize the battery capacity data so that the battery capacity data is constrained to be between 0 and 1.
7. A lithium battery remaining service life prediction system based on an optimized neural network, characterized in that: include: An acquisition module is configured to: acquire time series data of battery capacity to be predicted; A preprocessing module, which is configured to: preprocess the battery capacity time series data to be predicted; A partitioning module is configured to: partition the pre-processed battery capacity time series data using a sliding window to obtain a plurality of battery capacity sub-time series; A decomposition module is configured to: decompose each battery capacity sub-time series to obtain a residual component and a modal component; The prediction module is configured to: input the residual component into the trained BiLSTM model to output a first prediction value of the dischargeable capacity of the lithium battery; input the modal component into the trained BiGRU model to output a second prediction value of the dischargeable capacity of the lithium battery; wherein the trained BiLSTM model and the trained BiGRU model both use an improved whale algorithm to optimize the parameters of the model during the training process; The improved whale optimization algorithm is iterated. When the number of iterations exceeds the set number or reaches the set convergence condition, the iteration is stopped to obtain the optimal hyperparameter combination. The specific process of the improved whale optimization algorithm includes: (1) Initialize each hyperparameter, specify the range of each hyperparameter to be optimized, set the population size N, the maximum number of iterations T, and the search space dimension D′; (2) Surrounding prey: When whales determine the location of their prey, they shrink and gather in groups around it; the whale optimization algorithm simulates this behavior by taking the current best position as the target prey, and other whale individuals try to update their positions toward the target. This behavior is represented by the following equation: A = 2a*ra; B=2r; Where t is the current iteration number, is the current optimal solution, X(t) is the position vector of the whale to be updated, X(t+1) represents the optimal solution of the current position, A and B are variable coefficients, D represents the relative distance between the best individual and the current individual, a represents the control parameter, r is a random value in [0,1], t max is the maximum number of iterations; (3) Bubble net attack stage: The whale spits out bubbles to create a trap and swims towards the target prey in a spiral trajectory. Local optimization is achieved by shrinking the periphery and updating the position of the spiral; Where b is a constant used to define the logarithmic spiral shape, b=1, l is a random number in [-1, 1] to make the spiral shape irregular, p is a random number in [0, 1], and w is an adaptive weight; (4) Searching for prey: In the prey search phase, the positions of individual whales are updated based on randomly selected whales rather than the best search strategy found so far. As the algorithm continues to iterate, the Gaussian distribution function coefficients are introduced to perturb the population, thereby helping the algorithm reduce the risk of falling into a local optimal solution. When |A|>1, the search strategy can be forced to stay away from the reference whale, allowing the WOA algorithm to perform a global search. The process is expressed as follows: D=|B·X rand (t)-X(t) Among them, X rand (t) is the position of a randomly selected whale, p′ is a weight coefficient whose value is 0.5, and f is a Gaussian function with a mean of 0 and a variance of 1; The output module is configured to: integrate and add the first predicted value of the dischargeable capacity of the lithium battery and the second predicted value of the dischargeable capacity of the lithium battery to obtain a predicted discharge capacity sequence of the future number of charge and discharge cycles of the lithium battery, and use the predicted discharge capacity decaying to a set proportion of the rated capacity as the remaining service life end point; set the remaining service life starting point, calculate the number of charge and discharge cycles experienced between the remaining service life starting point and the remaining service life end point, and use the obtained number of charge and discharge cycles as the remaining service life of the lithium battery.
8. An electronic device, comprising: a memory for non-transitory storage of computer readable instructions; as well as a processor for executing the computer readable instructions, Wherein, when the computer-readable instructions are executed by the processor, the method described in any one of claims 1 to 6 is executed.
9. A storage medium characterized by being non-temporary The computer-readable instructions are stored, wherein when the non-transitory computer-readable instructions are executed by a computer, the instructions of the method according to any one of claims 1 to 6 are executed.
